Rebased ref, commits from common ancestor: commit e8381b5fe0e8c31040e0aa1167d2583d784f0956 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sun Sep 1 14:40:46 2024 +0100 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Thu Oct 24 07:22:24 2024 +0200
use final upstream merged fix for this boost issue Change-Id: I33a347d3c0efc4a38389d525f3c9e5f41a957d47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172723 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/external/libcmis/0001-Fix-boost-1.86-breakage.patch b/external/libcmis/0001-Fix-boost-1.86-breakage.patch new file mode 100644 index 000000000000..ef398dfcc98b --- /dev/null +++ b/external/libcmis/0001-Fix-boost-1.86-breakage.patch @@ -0,0 +1,47 @@ +From dfcb642a491f7ec2ae52e3e83d31bb6cdf3670c2 Mon Sep 17 00:00:00 2001 +From: David Seifert <s...@gentoo.org> +Date: Sat, 31 Aug 2024 12:39:39 +0200 +Subject: [PATCH] Fix boost 1.86 breakage + +The fix does not break building against <1.86 since we're now accessing the +object representation of the return value. + +Fixes #67 +--- + src/libcmis/xml-utils.cxx | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/src/libcmis/xml-utils.cxx b/src/libcmis/xml-utils.cxx +index e487d17..cdf088f 100644 +--- a/src/libcmis/xml-utils.cxx ++++ b/src/libcmis/xml-utils.cxx +@@ -531,16 +531,22 @@ namespace libcmis + boost::uuids::detail::sha1 sha1; + sha1.process_bytes( str.c_str(), str.size() ); + +- unsigned int digest[5]; ++ // on boost < 1.86.0, digest_type is typedef'd as unsigned int[5] ++ // on boost >= 1.86.0, digest_type is typedef'd as unsigned char[20] ++ boost::uuids::detail::sha1::digest_type digest; + sha1.get_digest( digest ); + ++ // by using a pointer to unsigned char, we can read the ++ // object representation of either typedef. ++ const unsigned char* ptr = reinterpret_cast<const unsigned char*>( digest ); ++ + stringstream out; +- // Setup writing mode. Every number must produce eight ++ // Setup writing mode. Every number must produce two + // hexadecimal digits, including possible leading 0s, or we get + // less than 40 digits as result. + out << hex << setfill('0') << right; +- for ( int i = 0; i < 5; ++i ) +- out << setw(8) << digest[i]; ++ for ( int i = 0; i < sizeof( digest ); ++ptr, ++i ) ++ out << setw(2) << static_cast<int>( *ptr ); + return out.str(); + } + +-- +2.45.1 + diff --git a/external/libcmis/UnpackedTarball_libcmis.mk b/external/libcmis/UnpackedTarball_libcmis.mk index 69bb6dd4b5c3..e47c7f81ef63 100644 --- a/external/libcmis/UnpackedTarball_libcmis.mk +++ b/external/libcmis/UnpackedTarball_libcmis.mk @@ -25,7 +25,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libcmis,\ external/libcmis/0001-cppcheck-operatorEqVarError-in-src-libcmis-http-sess.patch \ external/libcmis/0001-Take-into-account-m_CurlInitProtocolsFunction-in-cop.patch \ external/libcmis/initprotocols.patch.1 \ - external/libcmis/boost-1.86.0.patch.1 \ + external/libcmis/0001-Fix-boost-1.86-breakage.patch \ )) # vim: set noet sw=4 ts=4: diff --git a/external/libcmis/boost-1.86.0.patch.1 b/external/libcmis/boost-1.86.0.patch.1 deleted file mode 100644 index 74d6df54f832..000000000000 --- a/external/libcmis/boost-1.86.0.patch.1 +++ /dev/null @@ -1,12 +0,0 @@ ---- libcmis/src/libcmis/xml-utils.cxx 2024-08-22 12:06:16.595963754 +0200 -+++ libcmis/src/libcmis/xml-utils.cxx 2024-08-22 12:06:29.987877405 +0200 -@@ -536,7 +536,7 @@ - sha1.process_bytes( str.c_str(), str.size() ); - - unsigned int digest[5]; -- sha1.get_digest( digest ); -+ sha1.get_digest( reinterpret_cast<boost::uuids::detail::sha1::digest_type&>(digest) ); - - stringstream out; - // Setup writing mode. Every number must produce eight - commit b60b5c0e95c707be2c6c5d60e0305f5eb4e80859 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Aug 22 12:10:43 2024 +0200 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Thu Oct 24 07:22:23 2024 +0200 libcmis: fix build against boost-1.86.0 Based on https://github.com/tdf/libcmis/issues/67 Change-Id: I0de90a423110b03a649bd7b20f7392f3aa5a45c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172246 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/external/libcmis/UnpackedTarball_libcmis.mk b/external/libcmis/UnpackedTarball_libcmis.mk index d0b8e2b5c7bc..69bb6dd4b5c3 100644 --- a/external/libcmis/UnpackedTarball_libcmis.mk +++ b/external/libcmis/UnpackedTarball_libcmis.mk @@ -25,6 +25,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libcmis,\ external/libcmis/0001-cppcheck-operatorEqVarError-in-src-libcmis-http-sess.patch \ external/libcmis/0001-Take-into-account-m_CurlInitProtocolsFunction-in-cop.patch \ external/libcmis/initprotocols.patch.1 \ + external/libcmis/boost-1.86.0.patch.1 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/libcmis/boost-1.86.0.patch.1 b/external/libcmis/boost-1.86.0.patch.1 new file mode 100644 index 000000000000..74d6df54f832 --- /dev/null +++ b/external/libcmis/boost-1.86.0.patch.1 @@ -0,0 +1,12 @@ +--- libcmis/src/libcmis/xml-utils.cxx 2024-08-22 12:06:16.595963754 +0200 ++++ libcmis/src/libcmis/xml-utils.cxx 2024-08-22 12:06:29.987877405 +0200 +@@ -536,7 +536,7 @@ + sha1.process_bytes( str.c_str(), str.size() ); + + unsigned int digest[5]; +- sha1.get_digest( digest ); ++ sha1.get_digest( reinterpret_cast<boost::uuids::detail::sha1::digest_type&>(digest) ); + + stringstream out; + // Setup writing mode. Every number must produce eight + commit 451a8f8d53b083fa2c528bd0e63f5a881e734150 Author: Thorsten Behrens <thorsten.behr...@allotropia.de> AuthorDate: Tue Oct 22 23:08:45 2024 +0200 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Thu Oct 24 07:22:23 2024 +0200 Update .gitreview default branch Change-Id: I1fb257f6b9cd753a874242dce2bf308a68fc138d diff --git a/.gitreview b/.gitreview index 90dbf14f3add..439ba496a4e1 100644 --- a/.gitreview +++ b/.gitreview @@ -3,5 +3,4 @@ host=gerrit.libreoffice.org port=29418 project=core defaultremote=logerrit -defaultbranch=libreoffice-24-8 - +defaultbranch=feature/cib_contract49d commit 112da50cd361134b3f2c29854b9b4c74dc8f8a51 Author: Oliver Specht <oliver.spe...@cib.de> AuthorDate: Tue Oct 8 10:46:24 2024 +0200 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Thu Oct 24 07:22:23 2024 +0200 tdf#132274 follow-up fix to Writer zoom options Applying the zoom value works now as expected. The prior fix mixed up zoom value and 100% and didn't always apply special zoom values. Change-Id: I7cf1f34fca5724eea14339535e7614cfecffdd79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174688 Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> Tested-by: Jenkins diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 6d7534259ebe..d30ca4eeb61e 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -434,9 +434,11 @@ bool SwContentOptPage::FillItemSet(SfxItemSet* rSet) aElem.SetDefaultZoomValue(100); } else + { aElem.SetDefaultZoomType(SvxZoomType::PERCENT); + aElem.SetDefaultZoomValue(m_xZoomValue->get_value(FieldUnit::PERCENT)); + } } - aElem.SetDefaultZoomValue(m_xZoomValue->get_value(FieldUnit::PERCENT)); bool bRet = !pOldAttr || aElem != *pOldAttr; if(bRet) diff --git a/sw/source/uibase/app/swmodul1.cxx b/sw/source/uibase/app/swmodul1.cxx index 4f4bcd780e31..e131eb8b0a58 100644 --- a/sw/source/uibase/app/swmodul1.cxx +++ b/sw/source/uibase/app/swmodul1.cxx @@ -99,7 +99,7 @@ static void lcl_SetUIPrefs(const SwViewOption &rPref, SwView* pView, SwViewShell pView->CreateTab(); else pView->KillTab(); - + pView->SetZoom(rPref.GetZoomType(), rPref.GetZoom(), true); pView->GetPostItMgr()->PrepareView(true); } commit cfcbab4d2d4f125efef6e3f9612c467a41cb0cf4 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Wed Sep 18 08:22:46 2024 +0100 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Thu Oct 24 07:22:23 2024 +0200 cid#1619460 Uninitialized scalar field since: commit 4855bbfa4d0cbc6376ab2a40151886f84fafac40 CommitDate: Tue Sep 17 03:44:46 2024 +0200 tdf#132274 add zoom defaults to Writer options Change-Id: Ie7dae9add87fe14c87b53d9b86d77a84ce0c2a7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173587 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sw/source/uibase/config/cfgitems.cxx b/sw/source/uibase/config/cfgitems.cxx index 99f4fa38e5ea..0557fd90bca8 100644 --- a/sw/source/uibase/config/cfgitems.cxx +++ b/sw/source/uibase/config/cfgitems.cxx @@ -126,6 +126,9 @@ SwElemItem::SwElemItem(const SwViewOption& rVOpt) : m_bShowChangesInMargin = rVOpt.IsShowChangesInMargin(); m_bFieldHiddenText = rVOpt.IsShowHiddenField(); m_bShowHiddenPara = rVOpt.IsShowHiddenPara(); + m_bDefaultZoom = false; + m_eDefaultZoomType = rVOpt.GetZoomType(); + m_nDefaultZoomValue = rVOpt.GetZoom(); } SwElemItem* SwElemItem::Clone( SfxItemPool* ) const commit df16abb9aa24361b656d171bee2dbf275fd49f28 Author: Oliver Specht <oliver.spe...@cib.de> AuthorDate: Mon Aug 5 13:53:25 2024 +0200 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Thu Oct 24 07:22:23 2024 +0200 tdf#132274 add zoom defaults to Writer options Zoom value is sometimes stored at documents. But users might prefer local zoom settings over stored values. Users are now able to set preferred values in Writer's option dialog. Change-Id: Ia1c3926aac3dd236f15f84d8dc535d8aa3758238 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171482 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs index 124e0a3dd931..b2d7d503b35b 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs @@ -901,6 +901,59 @@ <value>1</value> </prop> </group> + <group oor:name="Zoom"> + <info> + <desc>Contains zoom settings of the document view.</desc> + </info> + <prop oor:name="DefaultZoom" oor:type="xs:boolean" oor:nillable="false"> + <!-- UIHints: Tools - Options - Text document Contents - [Section] ´Zoom--> + <info> + <desc>Determines whether zoom settings previously selected are applied to new/loaded document view or predefined zoom values are applied</desc> + </info> + <value>true</value> + </prop> + <prop oor:name="ZoomType" oor:type="xs:int" oor:nillable="false"> + <!-- UIHints: Tools - Options - Text document Contents - [Section] ´Zoom--> + <info> + <desc>Contains predefined zoom type</desc> + </info> + <constraints> + <enumeration oor:value="0"> + <info> + <desc>PERCENT</desc> + </info> + </enumeration> + <enumeration oor:value="1"> + <info> + <desc>OPTIMAL</desc> + </info> + </enumeration> + <enumeration oor:value="2"> + <info> + <desc>WHOLEPAGE</desc> + </info> + </enumeration> + <enumeration oor:value="3"> + <info> + <desc>PAGEWIDTH</desc> + </info> + </enumeration> + <enumeration oor:value="4"> + <info> + <desc>PAGEWIDTH_NOBORDER</desc> + </info> + </enumeration> + </constraints> + <value>0</value> + </prop> + <prop oor:name="ZoomValue" oor:type="xs:int" oor:nillable="false"> + <!-- UIHints: Tools - Options - Text document Contents - [Section] ´Zoom--> + <info> + <desc>Contains predefined zoom value in percent.</desc> + </info> + <value>100</value> + </prop> + </group> <group oor:name="NonprintingCharacter"> <info> <desc>Contains settings for the visibility of various non-printing characters.</desc> diff --git a/sw/qa/uitest/options/optionsDialog.py b/sw/qa/uitest/options/optionsDialog.py index 790d30c9b7ed..48c1d5d5bc6c 100644 --- a/sw/qa/uitest/options/optionsDialog.py +++ b/sw/qa/uitest/options/optionsDialog.py @@ -7,6 +7,7 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # from uitest.framework import UITestCase +from uitest.uihelper.common import get_state_as_dict class optionsDialog(UITestCase): @@ -48,5 +49,34 @@ class optionsDialog(UITestCase): xApplyBtn.executeAction("CLICK", tuple()) + def test_tdf132274Text(self): + with self.ui_test.create_doc_in_start_center("writer"): + + with self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") as xDialog: + xPages = xDialog.getChild("pages") + xWriterEntry = xPages.getChild('3') + xWriterEntry.executeAction("EXPAND", tuple()) + xContentEntry = xWriterEntry.getChild('1') + xContentEntry.executeAction("SELECT", tuple()) + xOptimal = xDialog.getChild("zoomoptimal") + self.assertEqual(get_state_as_dict(xOptimal)['Visible'], "true") + xApplyBtn = xDialog.getChild("apply") + + def test_tdf132274Web(self): + with self.ui_test.create_doc_in_start_center("writer"): + + with self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") as xDialog: + xPages = xDialog.getChild("pages") + xWriterWebEntry = xPages.getChild('4') + xWriterWebEntry.executeAction("EXPAND", tuple()) + xContentWebEntry = xWriterWebEntry.getChild('1') + xContentWebEntry.executeAction("SELECT", tuple()) + try: + xOptimalWeb = xDialog.getChild("zoomoptimal") + raise RuntimeError("Zoom controls visible in Web dialog") + except Exception: + xApplyBtn = xDialog.getChild("apply") + + # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index db57bc5455ce..6d7534259ebe 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -1,3 +1,4 @@ + /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. @@ -122,6 +123,15 @@ SwContentOptPage::SwContentOptPage(weld::Container* pPage, weld::DialogControlle , m_xFieldHiddenImg(m_xBuilder->weld_widget("lockhiddentextfield")) , m_xFieldHiddenParaCB(m_xBuilder->weld_check_button("hiddenparafield")) , m_xFieldHiddenParaImg(m_xBuilder->weld_widget("lockhiddenparafield")) + , m_xZoomFrame(m_xBuilder->weld_frame("zoomframe")) + , m_xZoomLatestRB(m_xBuilder->weld_radio_button("zoomlatest")) + , m_xZoomPreferredRB(m_xBuilder->weld_radio_button("zoompreferred")) + , m_xZoomOptimalRB(m_xBuilder->weld_radio_button("zoomoptimal")) + , m_xZoomWidthAndHeightRB(m_xBuilder->weld_radio_button("zoomfitwandh")) + , m_xZoomWidthRB(m_xBuilder->weld_radio_button("zoomfitw")) + , m_xZoom100RB(m_xBuilder->weld_radio_button("zoom100pc")) + , m_xZoomCustomRB(m_xBuilder->weld_radio_button("zoomcustom")) + , m_xZoomValue(m_xBuilder->weld_metric_spin_button("zoomvalue", FieldUnit::PERCENT)) { m_xShowOutlineContentVisibilityButton->connect_toggled(LINK(this, SwContentOptPage, ShowOutlineContentVisibilityButtonHdl)); @@ -133,6 +143,29 @@ SwContentOptPage::SwContentOptPage(weld::Container* pPage, weld::DialogControlle m_xSettingsLabel->hide(); m_xMetricLabel->hide(); m_xMetricLB->hide(); + + Link<weld::Toggleable&, void> aZoomLatestLink = LINK(this, SwContentOptPage, ZoomLatestHdl); + m_xZoomLatestRB->connect_toggled(aZoomLatestLink); + m_xZoomPreferredRB->connect_toggled(aZoomLatestLink); + Link<weld::Toggleable&, void> aZoomLink = LINK(this, SwContentOptPage, ZoomHdl); + m_xZoomOptimalRB->connect_toggled(aZoomLink); + m_xZoomWidthAndHeightRB->connect_toggled(aZoomLink); + m_xZoomWidthRB->connect_toggled(aZoomLink); + m_xZoom100RB->connect_toggled(aZoomLink); + m_xZoomCustomRB->connect_toggled(aZoomLink); + m_xZoomValue->set_range(MINZOOM, MAXZOOM, FieldUnit::PERCENT); + } + else + { + m_xZoomFrame->hide(); + m_xZoomLatestRB->hide(); + m_xZoomPreferredRB->hide(); + m_xZoomOptimalRB->hide(); + m_xZoomWidthAndHeightRB->hide(); + m_xZoomWidthRB->hide(); + m_xZoom100RB->hide(); + m_xZoomCustomRB->hide(); + m_xZoomValue->hide(); } if(!SvtCJKOptions::IsVerticalTextEnabled() ) @@ -285,6 +318,26 @@ void SwContentOptPage::Reset(const SfxItemSet* rSet) m_xFieldHiddenParaCB->set_active( pElemAttr->m_bShowHiddenPara ); m_xFieldHiddenParaCB->set_sensitive(!bReadOnly); m_xFieldHiddenParaImg->set_visible(bReadOnly); + + if (!bWebOptionsPage) + { + m_xZoomLatestRB->set_active(pElemAttr->IsDefaultZoom()); + m_xZoomPreferredRB->set_active(!pElemAttr->IsDefaultZoom()); + switch (pElemAttr->GetDefaultZoomType()) + { + case SvxZoomType::OPTIMAL: m_xZoomOptimalRB->set_active(true); break; + case SvxZoomType::WHOLEPAGE: m_xZoomWidthAndHeightRB->set_active(true); break; + case SvxZoomType::PAGEWIDTH: m_xZoomWidthRB->set_active(true); break; + case SvxZoomType::PERCENT: + m_xZoom100RB->set_active(pElemAttr->GetDefaultZoomValue() == 100); + m_xZoomCustomRB->set_active(pElemAttr->GetDefaultZoomValue() != 100); + break; + default: + break; + } + m_xZoomValue->set_value(pElemAttr->GetDefaultZoomValue(), FieldUnit::PERCENT); + ZoomLatestHdl(*m_xZoomLatestRB); + } } bReadOnly = !bWebOptionsPage ? officecfg::Office::Writer::Layout::Window::HorizontalRulerUnit::isReadOnly() : @@ -366,6 +419,25 @@ bool SwContentOptPage::FillItemSet(SfxItemSet* rSet) aElem.m_bFieldHiddenText = m_xFieldHiddenCB->get_active(); aElem.m_bShowHiddenPara = m_xFieldHiddenParaCB->get_active(); + if (m_xZoomLatestRB->is_visible()) + { + aElem.SetDefaultZoom(m_xZoomLatestRB->get_active()); + if (m_xZoomOptimalRB->get_active()) + aElem.SetDefaultZoomType(SvxZoomType::OPTIMAL); + else if (m_xZoomWidthAndHeightRB->get_active()) + aElem.SetDefaultZoomType(SvxZoomType::WHOLEPAGE); + else if (m_xZoomWidthRB->get_active()) + aElem.SetDefaultZoomType(SvxZoomType::PAGEWIDTH); + else if (m_xZoom100RB->get_active()) + { + aElem.SetDefaultZoomType(SvxZoomType::PERCENT); + aElem.SetDefaultZoomValue(100); + } + else + aElem.SetDefaultZoomType(SvxZoomType::PERCENT); + } + aElem.SetDefaultZoomValue(m_xZoomValue->get_value(FieldUnit::PERCENT)); + bool bRet = !pOldAttr || aElem != *pOldAttr; if(bRet) bRet = nullptr != rSet->Put(aElem); @@ -408,6 +480,30 @@ IMPL_LINK(SwContentOptPage, ShowOutlineContentVisibilityButtonHdl, weld::Togglea m_xTreatSubOutlineLevelsAsContent->set_sensitive(rBox.get_active()); } +IMPL_LINK_NOARG(SwContentOptPage, ZoomLatestHdl, weld::Toggleable&, void) +{ + bool bZoomPreferred = m_xZoomPreferredRB->get_active(); + m_xZoomOptimalRB->set_sensitive(bZoomPreferred); + m_xZoomWidthAndHeightRB->set_sensitive(bZoomPreferred); + m_xZoomWidthRB->set_sensitive(bZoomPreferred); + m_xZoom100RB->set_sensitive(bZoomPreferred); + m_xZoomCustomRB->set_sensitive(bZoomPreferred); + m_xZoomValue->set_sensitive(bZoomPreferred); + ZoomHdl(*m_xZoomOptimalRB); +} +IMPL_LINK_NOARG(SwContentOptPage, ZoomHdl, weld::Toggleable&, void) +{ + if (m_xZoomCustomRB->get_active() && m_xZoomCustomRB->get_sensitive()) + { + m_xZoomValue->set_sensitive(true); + m_xZoomValue->grab_focus(); + } + else + { + m_xZoomValue->set_sensitive(false); + } +} + // TabPage Printer additional settings SwAddPrinterTabPage::SwAddPrinterTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreSet) diff --git a/sw/source/uibase/app/appopt.cxx b/sw/source/uibase/app/appopt.cxx index f21fc733c92a..32bc1f8d4cae 100644 --- a/sw/source/uibase/app/appopt.cxx +++ b/sw/source/uibase/app/appopt.cxx @@ -107,13 +107,17 @@ std::optional<SfxItemSet> SwModule::CreateItemSet( sal_uInt16 nId ) aRet(GetPool()); aRet.Put( SwDocDisplayItem( aViewOpt ) ); - aRet.Put( SwElemItem( aViewOpt ) ); + SwElemItem aElemItem( aViewOpt ); if( bTextDialog ) { aRet.Put( SwShadowCursorItem( aViewOpt )); aRet.Put( SfxBoolItem(FN_PARAM_CRSR_IN_PROTECTED, aViewOpt.IsCursorInProtectedArea())); aRet.Put(SwFmtAidsAutoComplItem(aViewOpt)); + aElemItem.SetDefaultZoom(pPref->IsDefaultZoom()); + aElemItem.SetDefaultZoomType(pPref->GetDefaultZoomType()); + aElemItem.SetDefaultZoomValue(pPref->GetDefaultZoomValue()); } + aRet.Put( aElemItem ); if( pAppView ) { @@ -263,6 +267,12 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) if( const SwElemItem* pElemItem = rSet.GetItemIfSet( FN_PARAM_ELEM, false ) ) { pElemItem->FillViewOptions( aViewOpt ); + if (bTextDialog) + { + pPref->SetDefaultZoom(pElemItem->IsDefaultZoom()); + pPref->SetDefaultZoomType(pElemItem->GetDefaultZoomType()); + pPref->SetDefaultZoomValue(pElemItem->GetDefaultZoomValue()); + } // Outline-folding options if (SwWrtShell* pWrtShell = GetActiveWrtShell()) diff --git a/sw/source/uibase/config/cfgitems.cxx b/sw/source/uibase/config/cfgitems.cxx index 5b16a148f845..99f4fa38e5ea 100644 --- a/sw/source/uibase/config/cfgitems.cxx +++ b/sw/source/uibase/config/cfgitems.cxx @@ -104,6 +104,9 @@ SwElemItem::SwElemItem() : m_bShowChangesInMargin = m_bFieldHiddenText = m_bShowHiddenPara = false; + m_bDefaultZoom = true; + m_eDefaultZoomType = SvxZoomType::PERCENT; + m_nDefaultZoomValue = 100; } SwElemItem::SwElemItem(const SwViewOption& rVOpt) : @@ -149,7 +152,10 @@ bool SwElemItem::operator==( const SfxPoolItem& rAttr ) const m_bTreatSubOutlineLevelsAsContent == rItem.m_bTreatSubOutlineLevelsAsContent && m_bShowChangesInMargin == rItem.m_bShowChangesInMargin && m_bFieldHiddenText == rItem.m_bFieldHiddenText && - m_bShowHiddenPara == rItem.m_bShowHiddenPara); + m_bShowHiddenPara == rItem.m_bShowHiddenPara && + m_bDefaultZoom == rItem.m_bDefaultZoom && + m_eDefaultZoomType == rItem.m_eDefaultZoomType && + m_nDefaultZoomValue == rItem.m_nDefaultZoomValue ); } void SwElemItem::FillViewOptions( SwViewOption& rVOpt) const @@ -169,6 +175,12 @@ void SwElemItem::FillViewOptions( SwViewOption& rVOpt) const rVOpt.SetShowChangesInMargin( m_bShowChangesInMargin ); rVOpt.SetShowHiddenField(m_bFieldHiddenText ); rVOpt.SetShowHiddenPara(m_bShowHiddenPara ); + if (!m_bDefaultZoom) + { + rVOpt.SetZoomType(m_eDefaultZoomType); + if (m_eDefaultZoomType == SvxZoomType::PERCENT) + rVOpt.SetZoom(m_nDefaultZoomValue); + } } // CTOR for empty Item diff --git a/sw/source/uibase/config/usrpref.cxx b/sw/source/uibase/config/usrpref.cxx index d4c1849820d5..ea59c279b37e 100644 --- a/sw/source/uibase/config/usrpref.cxx +++ b/sw/source/uibase/config/usrpref.cxx @@ -57,7 +57,10 @@ SwMasterUsrPref::SwMasterUsrPref(bool bWeb) : m_aCursorConfig(*this), m_pWebColorConfig(bWeb ? new SwWebColorConfig(*this) : nullptr), m_aFmtAidsAutoComplConfig(*this), - m_bApplyCharUnit(false) + m_bApplyCharUnit(false), + m_bUseDefaultZoom(true), + m_nDefaultZoomValue(100), + m_eDefaultZoomType(SvxZoomType::PERCENT) { if (comphelper::IsFuzzing()) { @@ -87,6 +90,8 @@ SwMasterUsrPref::~SwMasterUsrPref() const auto g_UpdateLinkIndex = 17; const auto g_DefaultAnchor = 25; +const auto g_ZoomType = 27; +const auto g_ZoomValue = 28; Sequence<OUString> SwContentViewConfig::GetPropertyNames() const { @@ -117,12 +122,17 @@ Sequence<OUString> SwContentViewConfig::GetPropertyNames() const "Display/ShowOutlineContentVisibilityButton", // 22 "Display/TreatSubOutlineLevelsAsContent", // 23 "Display/ShowChangesInMargin", // 24 - "Display/DefaultAnchor" // 25 + "Display/DefaultAnchor", // 25 + "Zoom/DefaultZoom", // 26 + "Zoom/ZoomType", // 27 + "Zoom/ZoomValue" //28 }; #if defined(__GNUC__) && !defined(__clang__) // clang 8.0.0 says strcmp isn't constexpr static_assert(std::strcmp("Update/Link", aPropNames[g_UpdateLinkIndex]) == 0); static_assert(std::strcmp("Display/DefaultAnchor", aPropNames[g_DefaultAnchor]) == 0); + static_assert(std::strcmp("Zoom/ZoomType", aPropNames[g_ZoomType]) == 0); + static_assert(std::strcmp("Zoom/ZoomValue", aPropNames[g_ZoomValue]) == 0); #endif const int nCount = m_bWeb ? 12 : SAL_N_ELEMENTS(aPropNames); Sequence<OUString> aNames(nCount); @@ -190,8 +200,13 @@ void SwContentViewConfig::ImplCommit() case 23: bVal = m_rParent.IsTreatSubOutlineLevelsAsContent(); break;// "Display/TreatSubOutlineLevelsAsContent" case 24: bVal = m_rParent.IsShowChangesInMargin(); break;// "Display/ShowChangesInMargin" case 25: pValues[nProp] <<= m_rParent.GetDefaultAnchor(); break;// "Display/DefaultAnchor" + //TODO: Save zoom preferred, zoom type, zoom value + case 26: bVal = m_rParent.IsDefaultZoom(); break;// "Zoom/DefaultZoom" + case 27:pValues[nProp] <<= static_cast<sal_Int32>(m_rParent.GetDefaultZoomType()); break; // "Zoom/ZoomType" + case 28: pValues[nProp] <<= static_cast<sal_Int32>(m_rParent.GetDefaultZoomValue()); break; // "Zoom/ZoomValue" } - if ((nProp != g_UpdateLinkIndex) && (nProp != g_DefaultAnchor)) + if ((nProp != g_UpdateLinkIndex) && (nProp != g_DefaultAnchor) && + (nProp != g_ZoomType) && (nProp != g_ZoomValue)) pValues[nProp] <<= bVal; } PutProperties(aNames, aValues); @@ -209,7 +224,7 @@ void SwContentViewConfig::Load() { if(pValues[nProp].hasValue()) { - bool bSet = ((nProp != g_UpdateLinkIndex) && (nProp != g_DefaultAnchor)) + bool bSet = ((nProp != g_UpdateLinkIndex) && (nProp != g_DefaultAnchor) && (nProp != g_ZoomType)&& (nProp != g_ZoomValue)) && *o3tl::doAccess<bool>(pValues[nProp]); switch(nProp) { @@ -251,6 +266,21 @@ void SwContentViewConfig::Load() m_rParent.SetDefaultAnchor(nSet); } break; // "Display/DefaultAnchor" + case 26: m_rParent.SetDefaultZoom(bSet); break; // "Zoom/DefaultZoom" + case 27: + { + sal_Int32 nSet = 0; + pValues[nProp] >>= nSet; + m_rParent.SetDefaultZoomType(static_cast<SvxZoomType>(nSet), true); + } + break; //"Zoom/ZoomType", // 27 + case 28: + { + sal_Int32 nSet = 0; + pValues[nProp] >>= nSet; + m_rParent.SetDefaultZoomValue(static_cast<sal_uInt16>(nSet), true); + } + break; //"Zoom/ZoomValue" } } } diff --git a/sw/source/uibase/inc/cfgitems.hxx b/sw/source/uibase/inc/cfgitems.hxx index 26cd004cebb4..7b839bf9e028 100644 --- a/sw/source/uibase/inc/cfgitems.hxx +++ b/sw/source/uibase/inc/cfgitems.hxx @@ -24,6 +24,7 @@ #include <printdata.hxx> #include <cmdid.h> +#include <sfx2/zoomitem.hxx> class SwModule; #ifdef DBG_UTIL @@ -83,6 +84,9 @@ class SW_DLLPUBLIC SwElemItem final : public SfxPoolItem bool m_bShowChangesInMargin :1; bool m_bFieldHiddenText :1; bool m_bShowHiddenPara :1; + bool m_bDefaultZoom :1; + SvxZoomType m_eDefaultZoomType; + sal_uInt16 m_nDefaultZoomValue; friend class SwContentOptPage; @@ -95,6 +99,15 @@ public: void FillViewOptions( SwViewOption& rVOpt) const; + bool IsDefaultZoom() const {return m_bDefaultZoom; } + void SetDefaultZoom(bool bSet) { m_bDefaultZoom = bSet; } + + SvxZoomType GetDefaultZoomType() const { return m_eDefaultZoomType; } + void SetDefaultZoomType(SvxZoomType eType) { m_eDefaultZoomType = eType; } + + sal_uInt16 GetDefaultZoomValue() const { return m_nDefaultZoomValue;} + void SetDefaultZoomValue(sal_Int16 nValue){ m_nDefaultZoomValue = nValue; } + }; // OS 12.01.95 diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx index d162a707dd67..6279b8ed153f 100644 --- a/sw/source/uibase/inc/optpage.hxx +++ b/sw/source/uibase/inc/optpage.hxx @@ -75,8 +75,20 @@ class SwContentOptPage final : public SfxTabPage std::unique_ptr<weld::CheckButton> m_xFieldHiddenParaCB; std::unique_ptr<weld::Widget> m_xFieldHiddenParaImg; + std::unique_ptr<weld::Frame> m_xZoomFrame; + std::unique_ptr<weld::RadioButton> m_xZoomLatestRB; + std::unique_ptr<weld::RadioButton> m_xZoomPreferredRB; + std::unique_ptr<weld::RadioButton> m_xZoomOptimalRB; + std::unique_ptr<weld::RadioButton> m_xZoomWidthAndHeightRB; + std::unique_ptr<weld::RadioButton> m_xZoomWidthRB; + std::unique_ptr<weld::RadioButton> m_xZoom100RB; + std::unique_ptr<weld::RadioButton> m_xZoomCustomRB; + std::unique_ptr<weld::MetricSpinButton> m_xZoomValue; + DECL_LINK(VertRulerHdl, weld::Toggleable&, void); DECL_LINK(ShowOutlineContentVisibilityButtonHdl, weld::Toggleable&, void); + DECL_LINK(ZoomHdl, weld::Toggleable&, void); + DECL_LINK(ZoomLatestHdl, weld::Toggleable&, void); public: SwContentOptPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet); virtual ~SwContentOptPage() override; diff --git a/sw/source/uibase/inc/usrpref.hxx b/sw/source/uibase/inc/usrpref.hxx index 24d9c6a7a34b..764f52a1d457 100644 --- a/sw/source/uibase/inc/usrpref.hxx +++ b/sw/source/uibase/inc/usrpref.hxx @@ -168,6 +168,12 @@ class SwMasterUsrPref : public SwViewOption SwFmtAidsAutoComplConfig m_aFmtAidsAutoComplConfig; bool m_bApplyCharUnit; // apply_char_unit + + // Scale + bool m_bUseDefaultZoom; + sal_uInt16 m_nDefaultZoomValue; // percent. + SvxZoomType m_eDefaultZoomType; + public: SwMasterUsrPref(bool bWeb); ~SwMasterUsrPref(); @@ -262,6 +268,28 @@ public: } } + bool IsDefaultZoom() const { return m_bUseDefaultZoom;} + void SetDefaultZoom( bool bSet, bool bNoModify = false ) + { + m_bUseDefaultZoom = bSet; + if(!bNoModify) + m_aContentConfig.SetModified(); + } + sal_uInt16 GetDefaultZoomValue() const { return m_nDefaultZoomValue; } + void SetDefaultZoomValue ( sal_uInt16 nValue, bool bNoModify = false ) + { + m_nDefaultZoomValue = nValue; + if(!bNoModify) + m_aContentConfig.SetModified(); + } + SvxZoomType GetDefaultZoomType() const { return m_eDefaultZoomType;} + void SetDefaultZoomType( SvxZoomType eType, bool bNoModify = false ) + { + m_eDefaultZoomType = eType; + if(!bNoModify) + m_aContentConfig.SetModified(); + } + sal_Int32 GetDefTabInMm100() const { return m_nDefTabInMm100;} void SetDefTabInMm100( sal_Int32 nSet, bool bNoModify = false ) { diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 4b211bbf5bc6..3efa69a5447e 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -908,12 +908,17 @@ SwView::SwView(SfxViewFrame& _rFrame, SfxViewShell* pOldSh) aUsrPref.SetZoomType( SvxZoomType::PERCENT ); aUsrPref.SetZoom( 100 ); } - if (rDocSh.IsPreview()) + else if (rDocSh.IsPreview()) { aUsrPref.SetZoomType( SvxZoomType::WHOLEPAGE ); aUsrPref.SetViewLayoutBookMode( false ); aUsrPref.SetViewLayoutColumns( 1 ); } + else if (!pUsrPref->IsDefaultZoom()) + { + aUsrPref.SetZoomType(pUsrPref->GetDefaultZoomType()); + aUsrPref.SetZoom(pUsrPref->GetDefaultZoomValue()); + } m_pWrtShell.reset(new SwWrtShell(rDoc, m_pEditWin, *this, &aUsrPref)); // creating an SwView from a SwPagePreview needs to // add the SwViewShell to the ring of the other SwViewShell(s) @@ -1572,7 +1577,8 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue > ( pVOpt->GetViewLayoutColumns() != nViewLayoutColumns || pVOpt->IsViewLayoutBookMode() != bViewLayoutBookMode ); const bool bSetViewSettings = bGotZoomType && bGotZoomFactor && - ( pVOpt->GetZoom() != nZoomFactor || pVOpt->GetZoomType() != eZoom ); + ( pVOpt->GetZoom() != nZoomFactor || pVOpt->GetZoomType() != eZoom ) && + SW_MOD()->GetUsrPref(pVOpt->getBrowseMode())->IsDefaultZoom(); // In case we have a 'fixed' view layout of 2 or more columns, // we have to apply the view options *before* starting the action. diff --git a/sw/uiconfig/swriter/ui/viewoptionspage.ui b/sw/uiconfig/swriter/ui/viewoptionspage.ui index 7d1ba0354c27..2a569341b676 100644 --- a/sw/uiconfig/swriter/ui/viewoptionspage.ui +++ b/sw/uiconfig/swriter/ui/viewoptionspage.ui @@ -1,7 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.38.2 --> +<!-- Generated with glade 3.40.0 --> <interface domain="sw"> <requires lib="gtk+" version="3.20"/> + <object class="GtkAdjustment" id="adjustment2"> + <property name="upper">100</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> + </object> <object class="GtkBox" id="ViewOptionsPage"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -459,6 +464,105 @@ <property name="position">3</property> </packing> </child> + <child> + <object class="GtkFrame" id="outlineframe"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> + <child> + <!-- n-columns=2 n-rows=2 --> + <object class="GtkGrid"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="margin-start">12</property> + <property name="margin-top">6</property> + <property name="row-spacing">6</property> + <property name="column-spacing">6</property> + <child> + <object class="GtkCheckButton" id="outlinecontentvisibilitybutton"> + <property name="label" translatable="yes" context="viewoptionspage|outlinecontentvisibilitybutton">_Show outline-folding buttons</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="use-underline">True</property> + <property name="draw-indicator">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="outlinecontentvisibilitybutton-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="viewoptionspage|extended_tip|outlinecontentvisibilitybutton">Displays outline folding buttons on the left of the outline headings.</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">0</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="suboutlinelevelsascontent"> + <property name="label" translatable="yes" context="viewoptionspage|suboutlinelevelscontent">Include sub _levels</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="margin-start">12</property> + <property name="use-underline">True</property> + <property name="draw-indicator">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="suboutlinelevelsascontent-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="viewoptionspage|extended_tip|suboutlinelevelsascontent">Displays the folding buttons of the outline sub levels.</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">1</property> + </packing> + </child> + <child> + <object class="GtkImage" id="lockoutlinecontentvisibility"> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="icon-name">res/lock.png</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">0</property> + </packing> + </child> + <child> + <object class="GtkImage" id="locksuboutlinelevels"> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="icon-name">res/lock.png</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">1</property> + </packing> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="outlinelabel"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes" context="viewoptionspage|outlinelabel">Outline Folding</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">4</property> + </packing> + </child> </object> <packing> <property name="left-attach">0</property> @@ -766,92 +870,217 @@ </packing> </child> <child> - <object class="GtkFrame" id="outlineframe"> + <placeholder/> + </child> + <child> + <object class="GtkFrame" id="zoomframe"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="label-xalign">0</property> <property name="shadow-type">none</property> <child> - <!-- n-columns=2 n-rows=2 --> + <!-- n-columns=2 n-rows=7 --> <object class="GtkGrid"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="margin-start">12</property> <property name="margin-top">6</property> - <property name="row-spacing">6</property> + <property name="margin-bottom">43</property> + <property name="row-spacing">7</property> <property name="column-spacing">6</property> <child> - <object class="GtkCheckButton" id="outlinecontentvisibilitybutton"> - <property name="label" translatable="yes" context="viewoptionspage|outlinecontentvisibilitybutton">_Show outline-folding buttons</property> + <object class="GtkRadioButton" id="zoomlatest"> + <property name="label" translatable="yes" context="zoomdialog|zoomlatest">Use latest setting</property> <property name="visible">True</property> <property name="can-focus">True</property> <property name="receives-default">False</property> <property name="use-underline">True</property> + <property name="active">True</property> <property name="draw-indicator">True</property> <child internal-child="accessible"> - <object class="AtkObject" id="outlinecontentvisibilitybutton-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="viewoptionspage|extended_tip|outlinecontentvisibilitybutton">Displays outline folding buttons on the left of the outline headings.</property> + <object class="AtkObject" id="zoomlatest-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="zoomdialog|extended_tip|zoomlatest">Uses the zoom setting that has been applied manually.</property> </object> </child> </object> <packing> - <property name="left-attach">1</property> + <property name="left-attach">0</property> <property name="top-attach">0</property> </packing> </child> <child> - <object class="GtkCheckButton" id="suboutlinelevelsascontent"> - <property name="label" translatable="yes" context="viewoptionspage|suboutlinelevelscontent">Include sub _levels</property> + <object class="GtkRadioButton" id="zoompreferred"> + <property name="label" translatable="yes" context="zoomdialog|zoompreferred">Use preferred values</property> <property name="visible">True</property> <property name="can-focus">True</property> <property name="receives-default">False</property> - <property name="margin-start">12</property> <property name="use-underline">True</property> + <property name="active">True</property> <property name="draw-indicator">True</property> + <property name="group">zoomlatest</property> <child internal-child="accessible"> - <object class="AtkObject" id="suboutlinelevelsascontent-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="viewoptionspage|extended_tip|suboutlinelevelsascontent">Displays the folding buttons of the outline sub levels.</property> + <object class="AtkObject" id="zoompreferred-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="zoomdialog|extended_tip|zoompreferred">Applies preferred zoom settings to documents.</property> </object> </child> </object> <packing> - <property name="left-attach">1</property> + <property name="left-attach">0</property> <property name="top-attach">1</property> </packing> </child> <child> - <object class="GtkImage" id="lockoutlinecontentvisibility"> - <property name="can-focus">False</property> - <property name="no-show-all">True</property> - <property name="halign">center</property> - <property name="valign">center</property> - <property name="icon-name">res/lock.png</property> + <object class="GtkRadioButton" id="zoomoptimal"> + <property name="label" translatable="yes" context="zoomdialog|zoomoptimal">Optimal</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="margin-start">12</property> + <property name="use-underline">True</property> + <property name="draw-indicator">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="zoomoptimal-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="zoomdialog|extended_tip|zoomoptimal">Resizes the display to fit the width of the text in the document at the moment the command is started.</property> + </object> + </child> </object> <packing> <property name="left-attach">0</property> - <property name="top-attach">0</property> + <property name="top-attach">2</property> </packing> </child> <child> - <object class="GtkImage" id="locksuboutlinelevels"> - <property name="can-focus">False</property> - <property name="no-show-all">True</property> - <property name="halign">center</property> - <property name="valign">center</property> - <property name="icon-name">res/lock.png</property> + <object class="GtkRadioButton" id="zoomfitwandh"> + <property name="label" translatable="yes" context="zoomdialog|zoomfitwandh">Fit width and height</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="margin-start">12</property> + <property name="use-underline">True</property> + <property name="draw-indicator">True</property> + <property name="group">zoomoptimal</property> + <child internal-child="accessible"> + <object class="AtkObject" id="zoomfitwandh-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="zoomdialog|extended_tip|zoomfitwandh">Displays the entire page on your screen.</property> + </object> + </child> </object> <packing> <property name="left-attach">0</property> - <property name="top-attach">1</property> + <property name="top-attach">3</property> </packing> </child> + <child> + <object class="GtkRadioButton" id="zoomfitw"> + <property name="label" translatable="yes" context="zoomdialog|zoomfitw">Fit width</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="margin-start">12</property> + <property name="use-underline">True</property> + <property name="draw-indicator">True</property> + <property name="group">zoomoptimal</property> + <child internal-child="accessible"> + <object class="AtkObject" id="zoomfitw-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="zoomdialog|extended_tip|zoomfitw">Displays the complete width of the document page. The top and bottom edges of the page may not be visible.</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">4</property> + </packing> + </child> + <child> + <object class="GtkRadioButton" id="zoom100pc"> + <property name="label" translatable="yes" context="zoomdialog|zomm100pc">100%</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="margin-start">12</property> + <property name="use-underline">True</property> + <property name="draw-indicator">True</property> + <property name="group">zoomoptimal</property> + <child internal-child="accessible"> + <object class="AtkObject" id="zomm100pc-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="zoomdialog|extended_tip|zomm100pc">Displays the document at its actual size.</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">5</property> + </packing> + </child> + <child> + <object class="GtkRadioButton" id="zoomcustom"> + <property name="label" translatable="yes" context="zoomdialog|zoomcustom">Custom: </property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="margin-start">12</property> + <property name="use-underline">True</property> + <property name="draw-indicator">True</property> + <property name="group">zoomoptimal</property> + <accessibility> + <relation type="label-for" target="zoomvalue"/> + </accessibility> + <child internal-child="accessible"> + <object class="AtkObject" id="zoomcustom-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="zoomdialog|extended_tip|zoomcustom">Enter the zoom factor at which you want to display the document. Enter a percentage in the box.</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">6</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="zoomvalue"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="hexpand">True</property> + <property name="adjustment">adjustment2</property> + <accessibility> + <relation type="labelled-by" target="zoomcustom"/> + </accessibility> + <child internal-child="accessible"> + <object class="AtkObject" id="zoomvalue-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|zoomvalue">Enter the zoom factor at which you want to display the document. Enter a percentage in the box.</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">6</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> </child> <child type="label"> - <object class="GtkLabel" id="outlinelabel"> + <object class="GtkLabel" id="zoomlabel"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="label" translatable="yes" context="viewoptionspage|outlinelabel">Outline Folding</property> + <property name="label" translatable="yes" context="viewoptionspage|outlinelabel">Zoom</property> <attributes> <attribute name="weight" value="bold"/> </attributes> @@ -861,7 +1090,7 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">2</property> + <property name="position">3</property> </packing> </child> </object> commit a7c7ce75814d857532a3ac2cbfc489f2524c5c57 Author: Tibor Nagy <tibor.nagy.ext...@allotropia.de> AuthorDate: Tue Sep 10 12:04:13 2024 +0200 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Thu Oct 24 07:22:23 2024 +0200 tdf#76981 sd: opening linked presentation in slideshow mode (part2) If an MSO presentation(pptx,ppt) is opened via a document link while in slideshow mode, the linked presentation should open in slideshow mode and close when finished. If it is opened while in editing mode, the linked presentation should open in editing mode. Change-Id: Ia9df1e4daa55dc697285a3778102a850e2f6098c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173130 Tested-by: Jenkins Reviewed-by: Nagy Tibor <tibor.nagy.ext...@allotropia.de> diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 3b60fd176367..202d69fc0aad 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -447,16 +447,25 @@ bool DrawDocShell::ImportFrom(SfxMedium &rMedium, SfxItemSet& rSet = rMedium.GetItemSet(); if (SfxItemState::SET == rSet.GetItemState(SID_DOC_STARTPRESENTATION)) { - const sal_uInt16 nStartingSlide = rSet.Get(SID_DOC_STARTPRESENTATION).GetValue(); - if (nStartingSlide) + sal_uInt16 nStartingSlide = rSet.Get(SID_DOC_STARTPRESENTATION).GetValue(); + if (nStartingSlide == 0) { - mpDoc->SetStartWithPresentation(nStartingSlide); - - // tell SFX to change viewshell when in preview mode - if (IsPreview()) + OUString sStartPage = mpDoc->getPresentationSettings().maPresPage; + if (!sStartPage.isEmpty()) { - GetMedium()->GetItemSet().Put(SfxUInt16Item(SID_VIEW_ID, 1)); + bool bIsMasterPage = false; + sal_uInt16 nPageNumb = mpDoc->GetPageByName(sStartPage, bIsMasterPage); + nStartingSlide = (nPageNumb + 1) / 2; } + else + nStartingSlide = 1; + } + mpDoc->SetStartWithPresentation(nStartingSlide); + + // tell SFX to change viewshell when in preview mode + if (IsPreview()) + { + GetMedium()->GetItemSet().Put(SfxUInt16Item(SID_VIEW_ID, 1)); } } @@ -482,7 +491,19 @@ bool DrawDocShell::ConvertFrom( SfxMedium& rMedium ) if (SfxItemState::SET == rSet.GetItemState(SID_DOC_STARTPRESENTATION)) { - const sal_uInt16 nStartingSlide = rSet.Get(SID_DOC_STARTPRESENTATION).GetValue(); + sal_uInt16 nStartingSlide = rSet.Get(SID_DOC_STARTPRESENTATION).GetValue(); + if (nStartingSlide == 0) + { + OUString sStartPage = mpDoc->getPresentationSettings().maPresPage; + if (!sStartPage.isEmpty()) + { + bool bIsMasterPage = false; + sal_uInt16 nPageNumb = mpDoc->GetPageByName(sStartPage, bIsMasterPage); + nStartingSlide = (nPageNumb + 1) / 2; + } + else + nStartingSlide = 1; + } bStartPresentation = nStartingSlide; mpDoc->SetStartWithPresentation(nStartingSlide); } diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index c627056160c4..0564625ee8be 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -862,7 +862,21 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) pFilter = rMatcher.GetFilter4EA( aTypeName ); } - if (!pFilter || !lcl_isFilterNativelySupported(*pFilter)) + bool bStartPresentation = false; + if (pFilter) + { + const SfxUInt16Item* pSlide = rReq.GetArg<SfxUInt16Item>(SID_DOC_STARTPRESENTATION); + if (pSlide + && (pFilter->GetWildcard().Matches(u".pptx") + || pFilter->GetWildcard().Matches(u".ppt") + || pFilter->GetWildcard().Matches(u".ppsx") + || pFilter->GetWildcard().Matches(u".pps"))) + { + bStartPresentation = true; + } + } + + if (!pFilter || (!lcl_isFilterNativelySupported(*pFilter) && !bStartPresentation)) { // hyperlink does not link to own type => special handling (http, ftp) browser and (other external protocols) OS if ( aINetProtocol == INetProtocol::Mailto ) commit 56fb9252e73c7f86e0a8a8a47369f7d6adbd43f0 Author: Oliver Specht <oliver.spe...@cib.de> AuthorDate: Wed Aug 7 12:56:05 2024 +0200 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Thu Oct 24 07:22:23 2024 +0200 tdf#134902 Test added Import test added as follow-up to 0d512cb88757ced10a825a3d544e41696a54341a to check that the imported shape is not visible. Change-Id: I9671930a5613021be20c75e021213dfda5e763cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173057 Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> Tested-by: allotropia jenkins <jenk...@allotropia.de> diff --git a/sw/qa/extras/ww8import/data/tdf134902.docx b/sw/qa/extras/ww8import/data/tdf134902.docx new file mode 100644 index 000000000000..fc89611f65cd Binary files /dev/null and b/sw/qa/extras/ww8import/data/tdf134902.docx differ diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx index 0a82c320be1f..a7ea3c8a51a0 100644 --- a/sw/qa/extras/ww8import/ww8import.cxx +++ b/sw/qa/extras/ww8import/ww8import.cxx @@ -278,6 +278,28 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf142003) CPPUNIT_ASSERT(xParagraph->getString().startsWith("Lorem ipsum , consectetur adipiscing elit.")); } +CPPUNIT_TEST_FIXTURE(Test, testTdf134902) +{ + createSwDoc("tdf134902.docx"); + CPPUNIT_ASSERT_EQUAL(4, getShapes()); + uno::Reference<drawing::XShape> xShape; + uno::Reference< beans::XPropertySet > XPropSet; + for (int i = 3; i<= getShapes(); i++) + { + xShape = getShape(i); + XPropSet.set( xShape, uno::UNO_QUERY_THROW ); + try + { + bool isVisible = true; + XPropSet->getPropertyValue(u"Visible"_ustr) >>= isVisible; + CPPUNIT_ASSERT(!isVisible); + } + catch (beans::UnknownPropertyException &) + { /* ignore */ } + } + +} + // tests should only be added to ww8IMPORT *if* they fail round-tripping in ww8EXPORT } // end of anonymous namespace commit d2c314a2057e6ae41bc34620233b2ac15ea47115 Author: Tibor Nagy <tibor.nagy.ext...@allotropia.de> AuthorDate: Fri Sep 6 23:15:21 2024 +0200 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Thu Oct 24 07:22:23 2024 +0200 tdf#76981 sd: opening linked presentation in slideshow mode If an Impress presentation(odp) is opened via a document link while in slideshow mode, the linked presentation should open in slideshow mode and close when finished. If it is opened while in editing mode, the linked presentation should open in editing mode. Change-Id: I3fd410872472ed6391b2150151810b5da32fa29b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172984 Tested-by: Jenkins Reviewed-by: Nagy Tibor <tibor.nagy.ext...@allotropia.de> diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 76562ed093ca..3b60fd176367 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -285,13 +285,6 @@ bool DrawDocShell::Load( SfxMedium& rMedium ) mpDoc->SetStarDrawPreviewMode( true ); } - if (SfxItemState::SET == rSet.GetItemState(SID_DOC_STARTPRESENTATION)) - { - const sal_uInt16 nStartingSlide = rSet.Get(SID_DOC_STARTPRESENTATION).GetValue(); - bStartPresentation = nStartingSlide; - mpDoc->SetStartWithPresentation(nStartingSlide); - } - bRet = SfxObjectShell::Load( rMedium ); if (bRet) { @@ -335,6 +328,25 @@ bool DrawDocShell::Load( SfxMedium& rMedium ) SetError(ERRCODE_ABORT); } + if (SfxItemState::SET == rSet.GetItemState(SID_DOC_STARTPRESENTATION)) + { + sal_uInt16 nStartingSlide = rSet.Get(SID_DOC_STARTPRESENTATION).GetValue(); + if (nStartingSlide == 0) + { + OUString sStartPage = mpDoc->getPresentationSettings().maPresPage; + if (!sStartPage.isEmpty()) + { + bool bIsMasterPage = false; + sal_uInt16 nPageNumb = mpDoc->GetPageByName(sStartPage, bIsMasterPage); + nStartingSlide = (nPageNumb + 1) / 2; + } + else + nStartingSlide = 1; + } + bStartPresentation = nStartingSlide; + mpDoc->SetStartWithPresentation(nStartingSlide); + } + // tell SFX to change viewshell when in preview mode if( IsPreview() || bStartPresentation ) { @@ -972,7 +984,9 @@ void DrawDocShell::OpenBookmark( const OUString& rBookmarkURL ) { SfxStringItem aStrItem( SID_FILE_NAME, rBookmarkURL ); SfxStringItem aReferer( SID_REFERER, GetMedium()->GetName() ); - const SfxPoolItem* ppArgs[] = { &aStrItem, &aReferer, nullptr }; + SfxUInt16Item aPresentation( SID_DOC_STARTPRESENTATION ); + const SfxPoolItem* ppArgs[] = { &aStrItem, &aReferer, &aPresentation, nullptr }; + if (SfxViewFrame* pFrame = mpViewShell ? mpViewShell->GetViewFrame() : SfxViewFrame::Current()) pFrame->GetBindings().Execute( SID_OPENHYPERLINK, ppArgs ); } commit 555f98a2813a8dc8abe2796b2eadac20f812303a Author: Oliver Specht <oliver.spe...@cib.de> AuthorDate: Thu Jun 27 08:57:43 2024 +0200 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Thu Oct 24 07:22:23 2024 +0200 tdf#155229 Calculate row height incl. border if 'atLeast' is set Word includes the width of horizontal borders when calculating row height in case the row height is set as "atLeast" This is now handled via a compat flag for doc/rtf/docx formats. The default for ODF is unspecified, which (sanely) continues to treat the row size of "atLeast" and "fixed" as measuring the same thing. Change-Id: I37778e5cdc6e083e94a17f50bd0b75a291ededcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169611 Tested-by: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx index 9bf26880c01f..26ca334071d2 100644 --- a/sw/inc/IDocumentSettingAccess.hxx +++ b/sw/inc/IDocumentSettingAccess.hxx @@ -137,6 +137,8 @@ enum class DocumentSettingId USE_VARIABLE_WIDTH_NBSP, // overlap background shapes if anchored in body PAINT_HELL_OVER_HEADER_FOOTER, + // tdf#155229 calculate minimum row height including horizontal border width + MIN_ROW_HEIGHT_INCL_BORDER, }; /** Provides access to settings of a document diff --git a/sw/qa/core/layout/flycnt.cxx b/sw/qa/core/layout/flycnt.cxx index 397a67eb135b..3e9fcb981125 100644 --- a/sw/qa/core/layout/flycnt.cxx +++ b/sw/qa/core/layout/flycnt.cxx @@ -450,10 +450,10 @@ CPPUNIT_TEST_FIXTURE(Test, testSplitFlyWidow) SwFrame* pTab2 = pPage2Fly->GetLower(); SwFrame* pRow2 = pTab2->GetLower(); // Without the accompanying fix in place, this test would have failed with: - // - Expected: 1014 + // - Expected: 1029 // - Actual : 553 - // i.e. <w:trHeight w:val="1014"> from the file was ignored. - CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(1014), pRow2->getFrameArea().Height()); + // i.e. <w:trHeight w:val="1029"> from the file was ignored + CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(1029), pRow2->getFrameArea().Height()); SwFrame* pCell2 = pRow2->GetLower(); auto pText2 = dynamic_cast<SwTextFrame*>(pCell2->GetLower()); // And then similarly this was 1, not 2. diff --git a/sw/qa/extras/layout/data/tdf155229_row_height_at_least.docx b/sw/qa/extras/layout/data/tdf155229_row_height_at_least.docx new file mode 100644 index 000000000000..a42031a41f5b Binary files /dev/null and b/sw/qa/extras/layout/data/tdf155229_row_height_at_least.docx differ diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx index 7336cf61cbd1..4694a91b1bb0 100644 --- a/sw/qa/extras/layout/layout3.cxx +++ b/sw/qa/extras/layout/layout3.cxx @@ -3510,6 +3510,19 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, TestTdf146081) CPPUNIT_ASSERT_EQUAL(nTotalHeight, nHeight1 * 4); } +CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, TestTdf155229RowAtLeast) +{ + createSwDoc("tdf155229_row_height_at_least.docx"); + + xmlDocUniquePtr pXmlDoc = parseLayoutDump(); + sal_Int32 nTableHeight + = getXPath(pXmlDoc, "/root/page[1]/body/tab[1]/row[11]/infos/bounds"_ostr, "bottom"_ostr) + .toInt32(); + + // Without the fix, this was Actual : 14174 + CPPUNIT_ASSERT_EQUAL(sal_Int32(15494), nTableHeight); +} + CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, TestTdf157829LTR) { // Verify that line breaking inside a bidi portion triggers underflow to previous bidi portions diff --git a/sw/source/core/doc/DocumentSettingManager.cxx b/sw/source/core/doc/DocumentSettingManager.cxx index 2bbff10db856..47d629df7f45 100644 --- a/sw/source/core/doc/DocumentSettingManager.cxx +++ b/sw/source/core/doc/DocumentSettingManager.cxx @@ -108,7 +108,8 @@ sw::DocumentSettingManager::DocumentSettingManager(SwDoc &rDoc) mbNoNumberingShowFollowBy(false), mbDropCapPunctuation(true), mbUseVariableWidthNBSP(false), - mbPaintHellOverHeaderFooter(false) + mbPaintHellOverHeaderFooter(false), + mbMinRowHeightInclBorder(false) // COMPATIBILITY FLAGS END { @@ -271,6 +272,7 @@ bool sw::DocumentSettingManager::get(/*[in]*/ DocumentSettingId id) const case DocumentSettingId::DROP_CAP_PUNCTUATION: return mbDropCapPunctuation; case DocumentSettingId::USE_VARIABLE_WIDTH_NBSP: return mbUseVariableWidthNBSP; case DocumentSettingId::PAINT_HELL_OVER_HEADER_FOOTER: return mbPaintHellOverHeaderFooter; + case DocumentSettingId::MIN_ROW_HEIGHT_INCL_BORDER: return mbMinRowHeightInclBorder; default: OSL_FAIL("Invalid setting id"); } @@ -501,6 +503,10 @@ void sw::DocumentSettingManager::set(/*[in]*/ DocumentSettingId id, /*[in]*/ boo mbPaintHellOverHeaderFooter = value; break; + case DocumentSettingId::MIN_ROW_HEIGHT_INCL_BORDER: + mbMinRowHeightInclBorder = value; + break; + // COMPATIBILITY FLAGS END case DocumentSettingId::BROWSE_MODE: //can be used temporary (load/save) when no SwViewShell is available @@ -1087,6 +1093,11 @@ void sw::DocumentSettingManager::dumpAsXml(xmlTextWriterPtr pWriter) const BAD_CAST(OString::boolean(mbPaintHellOverHeaderFooter).getStr())); (void)xmlTextWriterEndElement(pWriter); + (void)xmlTextWriterStartElement(pWriter, BAD_CAST("mbMinRowHeightInclBorder")); + (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), + BAD_CAST(OString::boolean(mbMinRowHeightInclBorder).getStr())); + (void)xmlTextWriterEndElement(pWriter); + (void)xmlTextWriterStartElement(pWriter, BAD_CAST("mbContinuousEndnotes")); (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::boolean(mbContinuousEndnotes).getStr())); diff --git a/sw/source/core/inc/DocumentSettingManager.hxx b/sw/source/core/inc/DocumentSettingManager.hxx index c1d08a15d068..97ae5097376e 100644 --- a/sw/source/core/inc/DocumentSettingManager.hxx +++ b/sw/source/core/inc/DocumentSettingManager.hxx @@ -187,6 +187,7 @@ class DocumentSettingManager final : bool mbDropCapPunctuation; // tdf#150200, tdf#150438 bool mbUseVariableWidthNBSP : 1; // tdf#41652 bool mbPaintHellOverHeaderFooter : 1; // tdf#160198 + bool mbMinRowHeightInclBorder : 1; // tdf#155229 public: diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 857ed194efc3..cc8a8333b421 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -197,6 +197,8 @@ static bool lcl_InnerCalcLayout( SwFrame *pFrame, // cell height. static SwTwips lcl_CalcMinRowHeight( const SwRowFrame *pRow, const bool _bConsiderObjs ); +static sal_uInt16 lcl_GetTopSpace( const SwRowFrame& rRow ); + static SwTwips lcl_CalcTopAndBottomMargin( const SwLayoutFrame&, const SwBorderAttrs& ); static SwTwips lcl_calcHeightOfRowBeforeThisFrame(const SwRowFrame& rRow); @@ -4907,6 +4909,9 @@ static SwTwips lcl_CalcMinCellHeight( const SwLayoutFrame *_pCell, static SwTwips lcl_CalcMinRowHeight( const SwRowFrame* _pRow, const bool _bConsiderObjs ) { + //calc min height including width of horizontal border + const bool bMinRowHeightInclBorder = + _pRow->GetFormat()->GetDoc()->GetDocumentSettingManager().get(DocumentSettingId::MIN_ROW_HEIGHT_INCL_BORDER); SwTwips nHeight = 0; if ( !_pRow->IsRowSpanLine() ) { @@ -4948,6 +4953,11 @@ static SwTwips lcl_CalcMinRowHeight( const SwRowFrame* _pRow, { nHeight = rSz.GetHeight() - lcl_calcHeightOfRowBeforeThisFrame(*_pRow); } + if (bMinRowHeightInclBorder) + { + //get horizontal border(s) + nHeight += lcl_GetTopSpace(*_pRow); + } } } diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 138bbf26127b..c07629063b07 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1870,6 +1870,9 @@ void SwWW8ImplReader::ImportDop() DocumentSettingId::FOOTNOTE_IN_COLUMN_TO_PAGEEND, true); m_rDoc.getIDocumentSettingAccess().set( DocumentSettingId::EMPTY_DB_FIELD_HIDES_PARA, false); + // tdf#155229 calculate minimum row height including horizontal border width + m_rDoc.getIDocumentSettingAccess().set( + DocumentSettingId::MIN_ROW_HEIGHT_INCL_BORDER, true); // Import Default Tabs tools::Long nDefTabSiz = m_xWDop->dxaTab; diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx index 547339ec694f..b6448c702daf 100644 --- a/sw/source/uibase/uno/SwXDocumentSettings.cxx +++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx @@ -163,7 +163,8 @@ enum SwDocumentSettingsPropertyHandles HANDLE_APPLY_TEXT_ATTR_TO_EMPTY_LINE_AT_END_OF_PARAGRAPH, HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_EMPTY_LINE_AT_END_OF_PARAGRAPH, HANDLE_DO_NOT_MIRROR_RTL_DRAW_OBJS, - HANDLE_PAINT_HELL_OVER_HEADER_FOOTER + HANDLE_PAINT_HELL_OVER_HEADER_FOOTER, + HANDLE_MIN_ROW_HEIGHT_INCL_BORDER }; } @@ -274,6 +275,7 @@ static rtl::Reference<MasterPropertySetInfo> lcl_createSettingsInfo() { u"ApplyParagraphMarkFormatToEmptyLineAtEndOfParagraph"_ustr, HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_EMPTY_LINE_AT_END_OF_PARAGRAPH, cppu::UnoType<bool >::get(), 0 }, { OUString("DoNotMirrorRtlDrawObjs"), HANDLE_DO_NOT_MIRROR_RTL_DRAW_OBJS, cppu::UnoType<bool>::get(), 0 }, { OUString("PaintHellOverHeaderFooter"), HANDLE_PAINT_HELL_OVER_HEADER_FOOTER, cppu::UnoType<bool>::get(), 0 }, + { OUString("MinRowHeightInclBorder"), HANDLE_MIN_ROW_HEIGHT_INCL_BORDER, cppu::UnoType<bool>::get(), 0 }, /* * As OS said, we don't have a view when we need to set this, so I have to @@ -1182,6 +1184,14 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf DocumentSettingId::PAINT_HELL_OVER_HEADER_FOOTER, bTmp); } break; + case HANDLE_MIN_ROW_HEIGHT_INCL_BORDER: + { + bool bTmp; + if (rValue >>= bTmp) + mpDoc->getIDocumentSettingAccess().set( + DocumentSettingId::MIN_ROW_HEIGHT_INCL_BORDER, bTmp); + } + break; default: throw UnknownPropertyException(OUString::number(rInfo.mnHandle)); } @@ -1775,6 +1785,12 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf DocumentSettingId::PAINT_HELL_OVER_HEADER_FOOTER); } break; + case HANDLE_MIN_ROW_HEIGHT_INCL_BORDER: + { + rValue <<= mpDoc->getIDocumentSettingAccess().get( + DocumentSettingId::MIN_ROW_HEIGHT_INCL_BORDER); + } + break; default: throw UnknownPropertyException(OUString::number(rInfo.mnHandle)); } diff --git a/sw/source/writerfilter/dmapper/DomainMapper.cxx b/sw/source/writerfilter/dmapper/DomainMapper.cxx index 97b386c4b5c1..706bf1d162c1 100644 --- a/sw/source/writerfilter/dmapper/DomainMapper.cxx +++ b/sw/source/writerfilter/dmapper/DomainMapper.cxx @@ -151,6 +151,8 @@ DomainMapper::DomainMapper( const uno::Reference< uno::XComponentContext >& xCon m_pImpl->SetDocumentSettingsProperty(u"PaintHellOverHeaderFooter"_ustr,uno::Any(true)); m_pImpl->SetDocumentSettingsProperty(u"EmptyDbFieldHidesPara"_ustr,uno::Any(false)); m_pImpl->SetDocumentSettingsProperty(u"IgnoreTabsAndBlanksForLineCalculation"_ustr,uno::Any(true)); + // calculate table row height with 'atLeast' including horizontal border width + m_pImpl->SetDocumentSettingsProperty(u"MinRowHeightInclBorder"_ustr,uno::Any(true)); } // Initialize RDF metadata, to be able to add statements during the import. commit ea6f4e6da47db056eaaf7d0b3a39a65499678d95 Author: Thorsten Behrens <thorsten.behr...@allotropia.de> AuthorDate: Thu Jul 25 08:28:46 2024 +0200 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Thu Oct 24 07:22:23 2024 +0200 related tdf#115474: improve warning msg for slow autoformat Perhaps this alerts users that they've unintentionally selected a very large range (Ctrl-A vs. Ctrl-End for selecting content)? Change-Id: I8d60cf6186d1faf94c58684cad2ead49381819d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170995 Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> Tested-by: Jenkins diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc index b7e695404743..9a5409300f8c 100644 --- a/sc/inc/globstr.hrc +++ b/sc/inc/globstr.hrc @@ -271,7 +271,7 @@ #define STR_PRINT NC_("STR_PRINT", "Print") #define STR_INVALID_AFAREA NC_("STR_INVALID_AFAREA", "To apply an AutoFormat, a table range of at least 3 × 3 cells must be selected.") #define STR_AUTOFORMAT_WAIT_WARNING_TITLE NC_("STR_AUTOFORMAT_WAIT_WARNING_TITLE", "") -#define STR_AUTOFORMAT_WAIT_WARNING NC_("STR_AUTOFORMAT_WAIT_WARNING", "Applying AutoFormat to the selected range may take a long time. Do you want to proceed?") +#define STR_AUTOFORMAT_WAIT_WARNING NC_("STR_AUTOFORMAT_WAIT_WARNING", "Applying AutoFormat to the selected range (more than one million cells) may take a long time. Do you want to proceed?") #define STR_OPTIONAL NC_("STR_OPTIONAL", "(optional)") #define STR_REQUIRED NC_("STR_REQUIRED", "(required)") #define STR_NOTES NC_("STR_NOTES", "Comments") commit fee25c67d7a5735921a76e8e2b5db4b69b8c8179 Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Thu Jul 25 10:27:31 2024 +0200 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Thu Oct 24 07:22:22 2024 +0200 tdf#162174: fix crash when opening Bullets and Numbering dialog a second time It seems we must first retrieve the array of values from: - officecfg::Office::Common::BulletsNumbering::DefaultBullets - officecfg::Office::Common::BulletsNumbering::DefaultBulletsFonts before retrieving the value by index. Change-Id: I9cdf124f73c52f3027ae8e97a73e01e0efb73603 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171003 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 08f05c9b9a0f..6a838d001772 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -335,6 +335,8 @@ SvxBulletPickTabPage::SvxBulletPickTabPage(weld::Container* pPage, weld::DialogC m_xExamplesVS->SetSelectHdl(LINK(this, SvxBulletPickTabPage, NumSelectHdl_Impl)); m_xExamplesVS->SetDoubleClickHdl(LINK(this, SvxBulletPickTabPage, DoubleClickHdl_Impl)); m_xBtChangeBullet->connect_clicked(LINK(this, SvxBulletPickTabPage, ClickAddChangeHdl_Impl)); + m_aBulletSymbols = officecfg::Office::Common::BulletsNumbering::DefaultBullets::get(); + m_aBulletSymbolsFonts = officecfg::Office::Common::BulletsNumbering::DefaultBulletsFonts::get(); } SvxBulletPickTabPage::~SvxBulletPickTabPage() @@ -440,10 +442,9 @@ IMPL_LINK_NOARG(SvxBulletPickTabPage, NumSelectHdl_Impl, ValueSet*, void) bPreset = false; bModified = true; sal_uInt16 nIndex = m_xExamplesVS->GetSelectedItemId() - 1; - sal_Unicode cChar = officecfg::Office::Common::BulletsNumbering::DefaultBullets::get()[nIndex].toChar(); + sal_Unicode cChar = m_aBulletSymbols[nIndex].toChar(); vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); - rActBulletFont.SetFamilyName( - officecfg::Office::Common::BulletsNumbering::DefaultBulletsFonts::get()[nIndex]); + rActBulletFont.SetFamilyName(m_aBulletSymbolsFonts[nIndex]); sal_uInt16 nMask = 1; for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) @@ -524,8 +525,6 @@ IMPL_LINK_NOARG(SvxBulletPickTabPage, ClickAddChangeHdl_Impl, weld::Button&, voi _nMask <<= 1; } - m_aBulletSymbols = officecfg::Office::Common::BulletsNumbering::DefaultBullets::get(); - m_aBulletSymbolsFonts = officecfg::Office::Common::BulletsNumbering::DefaultBulletsFonts::get(); css::uno::Sequence<OUString> aBulletSymbolsList(m_aBulletSymbols.size()); css::uno::Sequence<OUString> aBulletSymbolsFontsList(m_aBulletSymbolsFonts.size()); auto aBulletSymbolsListRange = asNonConstRange(aBulletSymbolsList); commit 78121b39c03b8432135e922e8a8ce06229653863 Author: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> AuthorDate: Thu Jul 11 10:15:31 2024 +0200 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Thu Oct 24 07:22:22 2024 +0200 Don't save bullet changes when dialog was cancelled Change-Id: Ia2a7feb2f47a59f7c693e2023f9c2c8b3b934f81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170336 Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> Tested-by: Jenkins diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx index d90b6b938f7f..acfc0d2a1433 100644 --- a/cui/source/inc/numpages.hxx +++ b/cui/source/inc/numpages.hxx @@ -99,6 +99,8 @@ class SvxBulletPickTabPage final : public SfxTabPage std::unique_ptr<weld::Button> m_xBtChangeBullet; std::unique_ptr<SvxNumValueSet> m_xExamplesVS; std::unique_ptr<weld::CustomWeld> m_xExamplesVSWin; + css::uno::Sequence<OUString> m_aBulletSymbols; + css::uno::Sequence<OUString> m_aBulletSymbolsFonts; DECL_LINK(NumSelectHdl_Impl, ValueSet*, void); DECL_LINK(DoubleClickHdl_Impl, ValueSet*, void); diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index c0495541ca61..08f05c9b9a0f 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -394,6 +394,14 @@ void SvxBulletPickTabPage::ActivatePage(const SfxItemSet& rSet) DeactivateRC SvxBulletPickTabPage::DeactivatePage(SfxItemSet *_pSet) { + if (IsCancelMode()) + { + // Dialog cancelled, restore previous bullets + std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create()); + officecfg::Office::Common::BulletsNumbering::DefaultBullets::set(m_aBulletSymbols, batch); + officecfg::Office::Common::BulletsNumbering::DefaultBulletsFonts::set(m_aBulletSymbolsFonts, batch); + batch->commit(); + } if(_pSet) FillItemSet(_pSet); return DeactivateRC::LeavePage; @@ -516,15 +524,15 @@ IMPL_LINK_NOARG(SvxBulletPickTabPage, ClickAddChangeHdl_Impl, weld::Button&, voi _nMask <<= 1; } - css::uno::Sequence<OUString> aBulletSymbols(officecfg::Office::Common::BulletsNumbering::DefaultBullets::get()); - css::uno::Sequence<OUString> aBulletSymbolsFonts(officecfg::Office::Common::BulletsNumbering::DefaultBulletsFonts::get()); - css::uno::Sequence<OUString> aBulletSymbolsList(aBulletSymbols.size()); - css::uno::Sequence<OUString> aBulletSymbolsFontsList(aBulletSymbolsFonts.size()); + m_aBulletSymbols = officecfg::Office::Common::BulletsNumbering::DefaultBullets::get(); + m_aBulletSymbolsFonts = officecfg::Office::Common::BulletsNumbering::DefaultBulletsFonts::get(); + css::uno::Sequence<OUString> aBulletSymbolsList(m_aBulletSymbols.size()); + css::uno::Sequence<OUString> aBulletSymbolsFontsList(m_aBulletSymbolsFonts.size()); auto aBulletSymbolsListRange = asNonConstRange(aBulletSymbolsList); auto aBulletSymbolsFontsListRange = asNonConstRange(aBulletSymbolsFontsList); sal_uInt16 nIndex = m_xExamplesVS->GetSelectedItemId() - 1; - for (size_t i = 0; i < aBulletSymbols.size(); ++i) + for (size_t i = 0; i < m_aBulletSymbols.size(); ++i) { if (i == nIndex) { @@ -533,8 +541,8 @@ IMPL_LINK_NOARG(SvxBulletPickTabPage, ClickAddChangeHdl_Impl, weld::Button&, voi } else { - aBulletSymbolsListRange[i] = aBulletSymbols[i]; - aBulletSymbolsFontsListRange[i] = aBulletSymbolsFonts[i]; + aBulletSymbolsListRange[i] = m_aBulletSymbols[i]; + aBulletSymbolsFontsListRange[i] = m_aBulletSymbolsFonts[i]; } } diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx index 6a207a573027..828054bc562d 100644 --- a/include/sfx2/tabdlg.hxx +++ b/include/sfx2/tabdlg.hxx @@ -107,6 +107,11 @@ protected: */ bool PrepareLeaveCurrentPage(); + /** Called before user cancels the dialog. + Calls DeactivatePage of all tab pages with IsCancelMode() set to true + */ + void PrepareCancel(); + /** save the position of the TabDialog and which tab page is the currently active one */ void SavePosAndId(); @@ -192,6 +197,7 @@ private: const SfxItemSet* mpSet; OUString maUserString; bool mbHasExchangeSupport; + bool mbCancel; std::unordered_map<OUString, css::uno::Any> maAdditionalProperties; std::unique_ptr<TabPageImpl> mpImpl; @@ -258,6 +264,9 @@ public: } virtual void FillUserData(); virtual bool IsReadOnly() const; + // Whether the user has canceled the dialog. Allows to restore settings, etc. + virtual bool IsCancelMode() { return mbCancel; } + virtual void SetCancelMode(bool bCancel) { mbCancel = bCancel; } virtual void PageCreated (const SfxAllItemSet& aSet); virtual void ChangesApplied(); static const SfxPoolItem* GetItem( const SfxItemSet& rSet, sal_uInt16 nSlot, bool bDeep = true ); diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index c8bda80385f0..f95baa42cedc 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -149,6 +149,7 @@ SfxTabPage::SfxTabPage(weld::Container* pPage, weld::DialogController* pControll : BuilderPage(pPage, pController, rUIXMLDescription, rID, isLOKMobilePhone()) , mpSet(rAttrSet) , mbHasExchangeSupport(false) + , mbCancel(false) , mpImpl(new TabPageImpl) { mpImpl->mpSfxDialogController = dynamic_cast<SfxOkDialogController*>(m_pDialogController); @@ -678,6 +679,19 @@ bool SfxTabDialogController::PrepareLeaveCurrentPage() return bEnd; } +void SfxTabDialogController::PrepareCancel() +{ + for (auto pDataObject : m_pImpl->aData) + { + if (!pDataObject->xTabPage) + continue; + + SfxTabPage* pPage = pDataObject->xTabPage.get(); + pPage->SetCancelMode(true); + pPage->DeactivatePage(nullptr); + } +} + const WhichRangesContainer & SfxTabDialogController::GetInputRanges(const SfxItemPool& rPool) /* [Description] diff --git a/sw/qa/uitest/writer_tests2/formatBulletsNumbering.py b/sw/qa/uitest/writer_tests2/formatBulletsNumbering.py index e5ff843fa0f6..d0b78525c1c6 100644 --- a/sw/qa/uitest/writer_tests2/formatBulletsNumbering.py +++ b/sw/qa/uitest/writer_tests2/formatBulletsNumbering.py @@ -75,7 +75,7 @@ class formatBulletsNumbering(UITestCase): xindentatmf.executeAction("UP", tuple()) - with self.ui_test.execute_dialog_through_command(".uno:BulletsAndNumberingDialog", close_button="cancel") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:BulletsAndNumberingDialog", close_button="ok") as xDialog: xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "4") xalignedatmf = xDialog.getChild("alignedatmf") @@ -100,7 +100,7 @@ class formatBulletsNumbering(UITestCase): select_by_text(xnumfollowedbylb, "Space") - with self.ui_test.execute_dialog_through_command(".uno:BulletsAndNumberingDialog", close_button="cancel") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:BulletsAndNumberingDialog", close_button="ok") as xDialog: xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "4") xnumfollowedbylb = xDialog.getChild("numfollowedbylb") @@ -130,7 +130,7 @@ class formatBulletsNumbering(UITestCase): xallsame.executeAction("CLICK", tuple()) - with self.ui_test.execute_dialog_through_command(".uno:BulletsAndNumberingDialog", close_button="cancel") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:BulletsAndNumberingDialog", close_button="ok") as xDialog: xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "5") xnumfmtlb = xDialog.getChild("numfmtlb") @@ -151,7 +151,7 @@ class formatBulletsNumbering(UITestCase): with self.ui_test.execute_dialog_through_command(".uno:BulletsAndNumberingDialog", close_button="user") as xDialog: pass - with self.ui_test.execute_dialog_through_command(".uno:BulletsAndNumberingDialog", close_button="cancel") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:BulletsAndNumberingDialog", close_button="ok") as xDialog: xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "5") xnumfmtlb = xDialog.getChild("numfmtlb") @@ -185,7 +185,7 @@ class formatBulletsNumbering(UITestCase): xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "TAB"})) #TAB to move indent right - with self.ui_test.execute_dialog_through_command(".uno:BulletsAndNumberingDialog", close_button="cancel") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:BulletsAndNumberingDialog", close_button="ok") as xDialog: xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "4") xindentatmf = xDialog.getChild("indentatmf") @@ -193,7 +193,7 @@ class formatBulletsNumbering(UITestCase): self.assertEqual(indentValue < indentValue2 , True) xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "BACKSPACE"})) - with self.ui_test.execute_dialog_through_command(".uno:BulletsAndNumberingDialog", close_button="cancel") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:BulletsAndNumberingDialog", close_button="ok") as xDialog: xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "4") xindentatmf = xDialog.getChild("indentatmf") @@ -214,7 +214,7 @@ class formatBulletsNumbering(UITestCase): self.xUITest.executeCommand(".uno:DecrementSubLevels") - with self.ui_test.execute_dialog_through_command(".uno:BulletsAndNumberingDialog", close_button="cancel") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:BulletsAndNumberingDialog", close_button="ok") as xDialog: xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "4") xindentatmf = xDialog.getChild("indentatmf") @@ -222,7 +222,7 @@ class formatBulletsNumbering(UITestCase): self.assertEqual(indentValue < indentValue2 , True) self.xUITest.executeCommand(".uno:IncrementLevel") - with self.ui_test.execute_dialog_through_command(".uno:BulletsAndNumberingDialog", close_button="cancel") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:BulletsAndNumberingDialog", close_button="ok") as xDialog: xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "4") xindentatmf = xDialog.getChild("indentatmf") diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index 38763d825e29..4905a49eba55 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -870,6 +870,8 @@ SwSvxNumBulletTabDialog::SwSvxNumBulletTabDialog(weld::Window* pParent, weld::Button* pButton = GetUserButton(); pButton->connect_clicked(LINK(this, SwSvxNumBulletTabDialog, RemoveNumberingHdl)); pButton->set_sensitive(m_rWrtSh.GetNumRuleAtCurrCursorPos() != nullptr); + weld::Button& pCancelButton = GetCancelButton(); + pCancelButton.connect_clicked(LINK(this, SwSvxNumBulletTabDialog, CancelHdl)); AddTabPage(u"singlenum"_ustr, RID_SVXPAGE_PICK_SINGLE_NUM ); AddTabPage(u"bullets"_ustr, RID_SVXPAGE_PICK_BULLET ); AddTabPage(u"outlinenum"_ustr, RID_SVXPAGE_PICK_NUM ); @@ -946,4 +948,11 @@ IMPL_LINK_NOARG(SwSvxNumBulletTabDialog, RemoveNumberingHdl, weld::Button&, void m_xDialog->response(RET_USER); } +IMPL_LINK_NOARG(SwSvxNumBulletTabDialog, CancelHdl, weld::Button&, void) +{ + PrepareCancel(); + + m_xDialog->response(RET_CANCEL); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/inc/num.hxx b/sw/source/uibase/inc/num.hxx index 9dfa2bf9ea4f..1799ad3296cc 100644 --- a/sw/source/uibase/inc/num.hxx +++ b/sw/source/uibase/inc/num.hxx @@ -124,6 +124,7 @@ class SwSvxNumBulletTabDialog final : public SfxTabDialogController virtual short Ok() override; virtual void PageCreated(const OUString& rPageId, SfxTabPage& rPage) override; DECL_LINK(RemoveNumberingHdl, weld::Button&, void); + DECL_LINK(CancelHdl, weld::Button&, void); std::unique_ptr<weld::ComboBox> m_xDummyCombo; commit 6762c86c1b04c062fdf900912e3aeb5538ec1d99 Author: Oliver Specht <oliver.spe...@cib.de> AuthorDate: Mon Jul 22 09:42:41 2024 +0200 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Thu Oct 24 07:22:22 2024 +0200 Minimal size of variable field page increased With this change the edit size is almost the same as the insert field dialog shows. Change-Id: Iafee3d60d33c9eee6020e9ef49aaac900222a0e6 diff --git a/sw/uiconfig/swriter/ui/fldvarpage.ui b/sw/uiconfig/swriter/ui/fldvarpage.ui index 94782577de46..d6bea58f3034 100644 --- a/sw/uiconfig/swriter/ui/fldvarpage.ui +++ b/sw/uiconfig/swriter/ui/fldvarpage.ui @@ -46,8 +46,8 @@ </object> <!-- n-columns=3 n-rows=2 --> <object class="GtkGrid" id="FieldVarPage"> - <property name="width-request">600</property> - <property name="height-request">300</property> + <property name="width-request">700</property> + <property name="height-request">400</property> <property name="visible">True</property> <property name="can-focus">False</property> <property name="hexpand">True</property> commit 20340f38c555cc739b21a244c6a61ab138a02878 Author: Vasily Melenchuk <vasily.melenc...@cib.de> AuthorDate: Mon Mar 25 16:01:48 2024 +0300 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Thu Oct 24 07:22:22 2024 +0200 tdf#160553: writerfilter: RTF import: fix problem with first table in section Handles section properties between tables. JUnit test included Change-Id: I1db8b80749d18c0e73112e4fd1d13d6331aa7291 Change-Id: I8b00bfeb260af024f48ba8a3e6e6ac38e834b684 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170924 Tested-by: Thorsten Behrens <thorsten.behr...@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> -e ... etc. - the rest is truncated