core.git: cui/source cui/uiconfig svx/source sw/qa
cui/source/inc/numpages.hxx |2 cui/source/tabpages/numpages.cxx | 86 +++ cui/uiconfig/ui/pickbulletpage.ui| 56 +--- svx/source/sidebar/nbdtmg.cxx| 13 ++ sw/qa/uitest/writer_tests2/formatBulletsNumbering.py | 39 5 files changed, 178 insertions(+), 18 deletions(-) New commits: commit 2e1350593c26a70408b3cf7d1bac2f2ff8309852 Author: Tibor Nagy AuthorDate: Wed May 15 11:39:45 2024 +0200 Commit: Nagy Tibor CommitDate: Tue May 21 12:04:25 2024 +0200 tdf#69724 Allow to change default bullet symbols in UI Change-Id: Ife700096fb55ebc752ae289398a36ee78b3e5ccb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167660 Tested-by: Jenkins Reviewed-by: Nagy Tibor Tested-by: Gabor Kelemen diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx index 7c34d49fcc62..d90b6b938f7f 100644 --- a/cui/source/inc/numpages.hxx +++ b/cui/source/inc/numpages.hxx @@ -96,11 +96,13 @@ class SvxBulletPickTabPage final : public SfxTabPage OUStringsBulletCharFormatName; +std::unique_ptr m_xBtChangeBullet; std::unique_ptr m_xExamplesVS; std::unique_ptr m_xExamplesVSWin; DECL_LINK(NumSelectHdl_Impl, ValueSet*, void); DECL_LINK(DoubleClickHdl_Impl, ValueSet*, void); +DECL_LINK(ClickAddChangeHdl_Impl, weld::Button&, void); public: SvxBulletPickTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet); virtual ~SvxBulletPickTabPage() override; diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 320d6ab4e1dd..343b0ce9c7f0 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -325,6 +325,7 @@ SvxBulletPickTabPage::SvxBulletPickTabPage(weld::Container* pPage, weld::DialogC , bModified(false) , bPreset(false) , nNumItemId(SID_ATTR_NUMBERING_RULE) +, m_xBtChangeBullet(m_xBuilder->weld_button(u"changeBulletBtn"_ustr)) , m_xExamplesVS(new SvxNumValueSet(m_xBuilder->weld_scrolled_window(u"valuesetwin"_ustr, true))) , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, u"valueset"_ustr, *m_xExamplesVS)) { @@ -332,6 +333,7 @@ SvxBulletPickTabPage::SvxBulletPickTabPage(weld::Container* pPage, weld::DialogC m_xExamplesVS->init(NumberingPageType::BULLET); 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)); } SvxBulletPickTabPage::~SvxBulletPickTabPage() @@ -458,6 +460,90 @@ IMPL_LINK_NOARG(SvxBulletPickTabPage, DoubleClickHdl_Impl, ValueSet*, void) rOk.clicked(); } +IMPL_LINK_NOARG(SvxBulletPickTabPage, ClickAddChangeHdl_Impl, weld::Button&, void) +{ +SvxCharacterMap aMap(GetFrameWeld(), nullptr, nullptr); + +sal_uInt16 nMask = 1; +std::optional pFmtFont; +bool bSameBullet = true; +sal_UCS4 cBullet = 0; +bool bFirst = true; +for (sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) +{ +if (nActNumLvl & nMask) +{ +const SvxNumberFormat& rCurFmt = pActNum->GetLevel(i); +if (bFirst) +{ +cBullet = rCurFmt.GetBulletChar(); +} +else if (rCurFmt.GetBulletChar() != cBullet) +{ +bSameBullet = false; +break; +} +if (!pFmtFont) +pFmtFont = rCurFmt.GetBulletFont(); +bFirst = false; +} +nMask <<= 1; +} + +if (pFmtFont) +aMap.SetCharFont(*pFmtFont); +if (bSameBullet) +aMap.SetChar(cBullet); +if (aMap.run() != RET_OK) +return; + +sal_Unicode cChar = aMap.GetChar(); +vcl::Font aActBulletFont = aMap.GetCharFont(); + +sal_uInt16 _nMask = 1; +for (sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) +{ +if (nActNumLvl & _nMask) +{ +SvxNumberFormat aNumFmt(pActNum->GetLevel(i)); +aNumFmt.SetBulletFont(); +aNumFmt.SetBulletChar(cChar); +pActNum->SetLevel(i, aNumFmt); +} +_nMask <<= 1; +} + +css::uno::Sequence aBulletSymbols(officecfg::Office::Common::BulletsNumbering::DefaultBullets::get()); +css::uno::Sequence aBulletSymbolsFonts(officecfg::Office::Common::BulletsNumbering::DefaultBulletsFonts::get()); +css::uno::Sequence aBulletSymbolsList(aBulletSymbols.size()); +css::uno::Sequence aBulletSymbolsFontsList(aBulletSymbolsFonts.size()); +auto aBulletSymbolsListRange = asNonConstRange(aBulletSymbolsList); +auto aBulletSymbolsFontsListRange = asNonConstRange(aBulletSymbolsFontsList); + +sal_uInt16 nIndex =
core.git: cui/source
cui/source/dialogs/whatsnew.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7fc7d3b9fe6eabeddf43fbf72a041854fda51b27 Author: Heiko Tietze AuthorDate: Thu May 16 10:24:20 2024 +0200 Commit: Heiko Tietze CommitDate: Thu May 16 12:49:47 2024 +0200 Related tdf#159573 - WhatsNew dialog: 1px glitch with Wayland Change-Id: I6565fa32f4484e74abecc795c67e7afa13f7f55b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167734 Reviewed-by: Heiko Tietze Tested-by: Jenkins diff --git a/cui/source/dialogs/whatsnew.cxx b/cui/source/dialogs/whatsnew.cxx index 6092b7e4af50..5136c62f33ca 100644 --- a/cui/source/dialogs/whatsnew.cxx +++ b/cui/source/dialogs/whatsnew.cxx @@ -155,7 +155,7 @@ void WhatsNewProgress::Paint(vcl::RenderContext& rRenderContext, const tools::Re rRenderContext.Erase(); rRenderContext.SetAntialiasing(AntialiasingFlags::Enable); -tools::Rectangle aRect(Point(0, 0), Size(PROGRESS_DOTSIZE, PROGRESS_DOTSIZE)); +tools::Rectangle aRect(Point(1, 1), Size(PROGRESS_DOTSIZE, PROGRESS_DOTSIZE)); for (sal_Int32 i = 0; i < m_nTotal; i++) { if (i == m_nCurrent)
core.git: cui/source
cui/source/options/optpath.cxx | 35 --- 1 file changed, 16 insertions(+), 19 deletions(-) New commits: commit 3563fca550f678a6797769cd3b5e529e95ca7e36 Author: Noel Grandin AuthorDate: Tue May 7 13:57:38 2024 +0200 Commit: Noel Grandin CommitDate: Fri May 10 19:55:57 2024 +0200 replace createFromAscii with OUString literals in SvxPathTabPage Change-Id: I831bc78f4934c7d1c137ad70c7bb189d75237e88 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167473 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index e81d12043ed2..6357989e5fb9 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -92,42 +92,39 @@ struct PathUserData_Impl struct Handle2CfgNameMapping_Impl { SvtPathOptions::Paths m_nHandle; -const char* m_pCfgName; +OUString m_aCfgName; }; } -Handle2CfgNameMapping_Impl const Hdl2CfgMap_Impl[] = +constexpr Handle2CfgNameMapping_Impl Hdl2CfgMap_Impl[] { -{ SvtPathOptions::Paths::AutoCorrect, "AutoCorrect" }, -{ SvtPathOptions::Paths::AutoText,"AutoText" }, -{ SvtPathOptions::Paths::Backup, "Backup" }, -{ SvtPathOptions::Paths::Gallery, "Gallery" }, -{ SvtPathOptions::Paths::Graphic, "Graphic" }, -{ SvtPathOptions::Paths::Temp,"Temp" }, -{ SvtPathOptions::Paths::Template,"Template" }, -{ SvtPathOptions::Paths::Work,"Work" }, -{ SvtPathOptions::Paths::Dictionary,"Dictionary" }, -{ SvtPathOptions::Paths::Classification, "Classification" }, +{ SvtPathOptions::Paths::AutoCorrect, u"AutoCorrect"_ustr }, +{ SvtPathOptions::Paths::AutoText,u"AutoText"_ustr }, +{ SvtPathOptions::Paths::Backup, u"Backup"_ustr }, +{ SvtPathOptions::Paths::Gallery, u"Gallery"_ustr }, +{ SvtPathOptions::Paths::Graphic, u"Graphic"_ustr }, +{ SvtPathOptions::Paths::Temp,u"Temp"_ustr }, +{ SvtPathOptions::Paths::Template,u"Template"_ustr }, +{ SvtPathOptions::Paths::Work,u"Work"_ustr }, +{ SvtPathOptions::Paths::Dictionary, u"Dictionary"_ustr }, +{ SvtPathOptions::Paths::Classification, u"Classification"_ustr }, #if OSL_DEBUG_LEVEL > 1 -{ SvtPathOptions::Paths::Linguistic,"Linguistic" }, +{ SvtPathOptions::Paths::Linguistic, u"Linguistic"_ustr }, #endif -{ SvtPathOptions::Paths::LAST, nullptr } }; static OUString getCfgName_Impl( SvtPathOptions::Paths _nHandle ) { OUString sCfgName; -sal_uInt16 nIndex = 0; -while ( Hdl2CfgMap_Impl[ nIndex ].m_nHandle != SvtPathOptions::Paths::LAST ) +for (const auto & rMapping : Hdl2CfgMap_Impl) { -if ( Hdl2CfgMap_Impl[ nIndex ].m_nHandle == _nHandle ) +if ( rMapping.m_nHandle == _nHandle ) { // config name found -sCfgName = OUString::createFromAscii( Hdl2CfgMap_Impl[ nIndex ].m_pCfgName ); +sCfgName = rMapping.m_aCfgName; break; } -++nIndex; } return sCfgName;
core.git: cui/source cui/uiconfig schema/libreoffice sw/qa sw/source xmloff/source
cui/source/inc/paragrph.hxx|3 cui/source/tabpages/paragrph.cxx | 38 + cui/uiconfig/ui/textflowpage.ui| 29 + schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng|2 sw/qa/extras/layout/data/tdf132599_always.fodt | 249 ++ sw/qa/extras/layout/layout3.cxx| 27 + sw/qa/extras/odfexport/data/tdf132599_always.fodt | 249 ++ sw/qa/extras/odfexport/data/tdf132599_column.fodt | 12 sw/qa/extras/odfexport/data/tdf132599_page_in_last_column.fodt | 12 sw/qa/extras/odfexport/data/tdf132599_page_in_not_last_column.fodt | 12 sw/qa/extras/odfexport/data/tdf132599_spread-left-page.fodt| 20 sw/qa/extras/odfexport/data/tdf132599_spread.fodt | 16 sw/qa/extras/odfexport/odfexport2.cxx | 15 sw/source/core/text/guess.cxx | 40 + xmloff/source/text/txtprhdl.cxx|1 xmloff/source/text/txtprmap.cxx|2 16 files changed, 678 insertions(+), 49 deletions(-) New commits: commit c8a99cb8dce54de506ba66d1cc0818b9b5f7858b Author: László Németh AuthorDate: Mon May 6 17:17:43 2024 +0200 Commit: László Németh CommitDate: Tue May 7 13:58:28 2024 +0200 tdf#132599 sw schema xmloff: add hyphenation-keep-type='always' Add new hyphenation option to limit hyphenation of the last full line of the hyphenated paragraph. Move also loext:hyphenation-keep-type to paragraph-properties, following the associated hyphenation-keep. Note: value "always" is defined by CSS 4 hyphenate-limit-last, see https://www.w3.org/TR/css-text-4/#hyphenate-line-limits. Follow-up to commit 6e8819f29b6051a0e551d77512830539913ec277 "tdf#132599 cui offapi sw xmloff: add hyphenation-keep-type". Change-Id: I2121269205fc89fb5367dccdca00195aac68f3e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167232 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx index b35111f43b33..e219aa622e07 100644 --- a/cui/source/inc/paragrph.hxx +++ b/cui/source/inc/paragrph.hxx @@ -221,6 +221,7 @@ private: weld::TriStateEnabled aKeepParaState; weld::TriStateEnabled aOrphanState; weld::TriStateEnabled aWidowState; +weld::TriStateEnabled aAcrossParagraphState; weld::TriStateEnabled aAcrossColumnState; weld::TriStateEnabled aAcrossPageState; weld::TriStateEnabled aAcrossSpreadState; @@ -272,6 +273,7 @@ private: // avoid hyphenation across std::unique_ptr m_xAcrossText; +std::unique_ptr m_xAcrossParagraphBox; std::unique_ptr m_xAcrossColumnBox; std::unique_ptr m_xAcrossPageBox; std::unique_ptr m_xAcrossSpreadBox; @@ -294,6 +296,7 @@ private: DECL_LINK(PageBreakTypeHdl_Impl, weld::ComboBox&, void); DECL_LINK(PageNumBoxClickHdl_Impl, weld::Toggleable&, void); DECL_LINK(KeepParaBoxClickHdl_Impl, weld::Toggleable&, void); +DECL_LINK(AcrossParagraphHdl_Impl, weld::Toggleable&, void); DECL_LINK(AcrossColumnHdl_Impl, weld::Toggleable&, void); DECL_LINK(AcrossPageHdl_Impl, weld::Toggleable&, void); DECL_LINK(AcrossSpreadHdl_Impl, weld::Toggleable&, void); diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 034983ea73ce..56b697a046a6 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -1618,6 +1618,7 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) m_xMaxHyphenEdit->get_value_changed_from_saved() || m_xMinWordLength->get_value_changed_from_saved() || m_aHyphenZone.get_value_changed_from_saved() || + m_xAcrossParagraphBox->get_state_changed_from_saved() || m_xAcrossColumnBox->get_state_changed_from_saved() || m_xAcrossPageBox->get_state_changed_from_saved() || m_xAcrossSpreadBox->get_state_changed_from_saved() ) @@ -1643,6 +1644,7 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) aHyphen.GetTextHyphenZone() = static_cast(m_aHyphenZone.GetCoreValue(eUnit)); aHyphen.SetHyphen( eHyphenState == TRISTATE_TRUE ); aHyphen.SetNoLastWordHyphenation(m_xHyphenNoLastWordBox->get_state() != TRISTATE_TRUE); +const TriState eAcrossParagraphState = m_xAcrossParagraphBox->get_state(); const TriState eAcrossColumnState = m_xAcrossColumnBox->get_state(); const TriState eAcrossPageState = m_xAcrossPageBox->get_state(); const TriState eAcrossSpreadState = m_xAcrossSpreadBox->get_state(); @@ -1666,12 +1668,19 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
core.git: cui/source
cui/source/inc/align.hxx | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) New commits: commit ae4f76363dd25eaaa7d332512af067567e78ca0a Author: Zainab Abbasi <101zabb...@gmail.com> AuthorDate: Wed Apr 17 13:32:59 2024 -0700 Commit: Ilmari Lauhakangas CommitDate: Tue May 7 08:13:11 2024 +0200 tdf#145614 Convert #define to enum Change-Id: I50cad24e9cbda04cfe1209d824cad61da2287def Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166191 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas Reviewed-by: Ilmari Lauhakangas diff --git a/cui/source/inc/align.hxx b/cui/source/inc/align.hxx index caea33e42150..a1761607cfd8 100644 --- a/cui/source/inc/align.hxx +++ b/cui/source/inc/align.hxx @@ -19,20 +19,24 @@ #pragma once // list box indexes -#define ALIGNDLG_HORALIGN_STD 0 -#define ALIGNDLG_HORALIGN_LEFT 1 -#define ALIGNDLG_HORALIGN_CENTER2 -#define ALIGNDLG_HORALIGN_RIGHT 3 -#define ALIGNDLG_HORALIGN_BLOCK 4 -#define ALIGNDLG_HORALIGN_FILL 5 -#define ALIGNDLG_HORALIGN_DISTRIBUTED 6 - -#define ALIGNDLG_VERALIGN_STD 0 -#define ALIGNDLG_VERALIGN_TOP 1 -#define ALIGNDLG_VERALIGN_MID 2 -#define ALIGNDLG_VERALIGN_BOTTOM 3 -#define ALIGNDLG_VERALIGN_BLOCK 4 -#define ALIGNDLG_VERALIGN_DISTRIBUTED 5 +enum HorizontalAlign { +ALIGNDLG_HORALIGN_STD = 0, +ALIGNDLG_HORALIGN_LEFT = 1, +ALIGNDLG_HORALIGN_CENTER = 2, +ALIGNDLG_HORALIGN_RIGHT = 3, +ALIGNDLG_HORALIGN_BLOCK = 4, +ALIGNDLG_HORALIGN_FILL = 5, +ALIGNDLG_HORALIGN_DISTRIBUTED = 6 +}; + +enum VerticalAlign { +ALIGNDLG_VERALIGN_STD = 0, +ALIGNDLG_VERALIGN_TOP = 1, +ALIGNDLG_VERALIGN_MID = 2, +ALIGNDLG_VERALIGN_BOTTOM = 3, +ALIGNDLG_VERALIGN_BLOCK = 4, +ALIGNDLG_VERALIGN_DISTRIBUTED = 5 +}; #include #include
core.git: cui/source
cui/source/inc/treeopt.hxx |4 ++-- cui/source/options/treeopt.cxx | 22 +++--- 2 files changed, 5 insertions(+), 21 deletions(-) New commits: commit dd3953f705cc19aad4b0fcec7fd2961246b659e3 Author: Bayram Çiçek AuthorDate: Thu May 2 22:40:22 2024 +0300 Commit: Andreas Heinisch CommitDate: Mon May 6 16:45:25 2024 +0200 tdf#159375: remove initialization on Tools>Options - Initializing some dialogs at the startup of Options makes it opening very slow on some low-power systems. - This patch removes this initialization. This means, all dialogs will be initialized at the time of search. Therefore, we should wait a bit longer when typing on the search bar to get the results... - remove the default parameter "nNumberOfNode" from initializeFirstNDialog() - rename initializeFirstNDialog() to initializeAllDialogs() Change-Id: I4fd9c5673f7edecfe6a6621b6018d5d405f112a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167023 Tested-by: Jenkins Reviewed-by: Andreas Heinisch Reviewed-by: Moritz Duge diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx index 6d07d0981d5a..367d42c8ff50 100644 --- a/cui/source/inc/treeopt.hxx +++ b/cui/source/inc/treeopt.hxx @@ -231,8 +231,8 @@ public: voidActivatePage( const OUString& rPageURL ); voidApplyItemSets(); -// default value initializes all dialogs -void initializeFirstNDialog(sal_Int16 nNumberOfNode = -1); +// initialize all dialogs in "Tools > Options" +void initializeAllDialogs(); // helper functions to call the Languages and Locales TabPage from the SpellDialog static void ApplyLanguageOptions(const SfxItemSet& rSet); diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 6ab767bb8044..cf9cecfcb101 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -795,7 +795,7 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, SearchUpdateHdl, weld::Entry&, void) IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, Timer*, void) { -// initializeFirstNDialog() can take a long time, show wait cursor and disable input +// initializeAllDialogs() can take a long time, show wait cursor and disable input std::unique_ptr xWait(m_pParent ? new weld::WaitObject(m_pParent) : nullptr); // Pause redraw @@ -806,7 +806,7 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, Timer*, void) m_xSearchEdit->freeze(); xTreeLB->hide(); -initializeFirstNDialog(); +initializeAllDialogs(); m_xSearchEdit->thaw(); xTreeLB->show(); @@ -852,10 +852,9 @@ void OfaTreeOptionsDialog::selectFirstEntry() } } -void OfaTreeOptionsDialog::initializeFirstNDialog(sal_Int16 nNumberOfNode) +void OfaTreeOptionsDialog::initializeAllDialogs() { std::unique_ptr xEntry; -sal_Int16 nCount = 0; std::unique_ptr xTemp = xTreeLB->make_iterator(); bool bTemp = xTreeLB->get_iter_first(*xTemp); @@ -882,12 +881,6 @@ void OfaTreeOptionsDialog::initializeFirstNDialog(sal_Int16 nNumberOfNode) } } -/* if nNumberOfNode is -1 (which is the default value if no parameter provided), - this function will initialize all dialogs since nCount always greater than -1 */ -if (nCount == nNumberOfNode) -break; - -++nCount; bTemp = xTreeLB->iter_next(*xTemp); } } @@ -1192,15 +1185,6 @@ void OfaTreeOptionsDialog::ActivateLastSelection() xTreeLB->select(*xEntry); m_xSearchEdit->grab_focus(); SelectHdl_Impl(); - -// initializeFirstNDialog() can take a long time, show wait cursor -std::unique_ptr xWait(m_pParent ? new weld::WaitObject(m_pParent) : nullptr); - -/* initialize first 25 dialogs which are almost half of the dialogs -in a row while Options dialog opens. then clear to avoid UI test failures. */ -initializeFirstNDialog(25); -clearOptionsDialog(); -SelectHdl_Impl(); } void OfaTreeOptionsDialog::InitItemSets(OptionsGroupInfo& rGroupInfo)
core.git: cui/source
cui/source/dialogs/srchxtra.cxx |7 +-- cui/source/tabpages/chardlg.cxx |2 +- cui/source/tabpages/connect.cxx |2 +- cui/source/tabpages/grfpage.cxx | 14 +++--- cui/source/tabpages/labdlg.cxx |6 +++--- cui/source/tabpages/paragrph.cxx |4 ++-- cui/source/tabpages/textanim.cxx |2 +- cui/source/tabpages/tpline.cxx |2 +- cui/source/tabpages/tplnedef.cxx |2 +- cui/source/tabpages/tpshadow.cxx |2 +- cui/source/tabpages/transfrm.cxx | 10 +- 11 files changed, 28 insertions(+), 25 deletions(-) New commits: commit 19e1e6185bafc665b3f1ebe0775153a4c71ae84c Author: Caolán McNamara AuthorDate: Sat May 4 15:06:27 2024 +0100 Commit: Caolán McNamara CommitDate: Sat May 4 20:29:40 2024 +0200 WaE: C6011 Dereferencing NULL pointer warnings Change-Id: I95bc5dae73f6e9a0ae54b1570df51d6d37062695 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167129 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx index f8080f537775..9364680f62b2 100644 --- a/cui/source/dialogs/srchxtra.cxx +++ b/cui/source/dialogs/srchxtra.cxx @@ -167,8 +167,11 @@ SvxSearchAttributeDialog::~SvxSearchAttributeDialog() IMPL_LINK_NOARG(SvxSearchAttributeDialog, OKHdl, weld::Button&, void) { -DBG_ASSERT( SfxObjectShell::Current(), "No DocShell" ); -SfxItemPool& rPool(SfxObjectShell::Current()->GetPool()); +SfxObjectShell* pObjSh = SfxObjectShell::Current(); +DBG_ASSERT( pObjSh, "No DocShell" ); +if (!pObjSh) +return; +SfxItemPool& rPool(pObjSh->GetPool()); for (int i = 0, nCount = m_xAttrLB->n_children(); i < nCount; ++i) { diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index cd6965375003..ea6ee2ca382b 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -503,7 +503,7 @@ void SvxCharNamePage::EnableFeatureButton(const weld::Widget& rNameBox) void SvxCharNamePage::FillStyleBox_Impl(const weld::Widget& rNameBox) { const FontList* pFontList = GetFontList(); -DBG_ASSERT( pFontList, "no fontlist" ); +assert(pFontList && "no fontlist"); FontStyleBox* pStyleBox = nullptr; OUString sFontName; diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx index b3d036d991f9..54979804a5bb 100644 --- a/cui/source/tabpages/connect.cxx +++ b/cui/source/tabpages/connect.cxx @@ -78,7 +78,7 @@ SvxConnectionPage::SvxConnectionPage(weld::Container* pPage, weld::DialogControl , m_xCtlPreview(new weld::CustomWeld(*m_xBuilder, "CTL_PREVIEW", m_aCtlPreview)) { SfxItemPool* pPool = rOutAttrs.GetPool(); -DBG_ASSERT( pPool, "Where is the pool" ); +assert(pPool && "Where is the pool"); eUnit = pPool->GetMetric( SDRATTR_EDGENODE1HORZDIST ); FillTypeLB(); diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index 9e96fdbb603c..6ed4d261c1c1 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -361,7 +361,7 @@ DeactivateRC SvxGrfCropPage::DeactivatePage(SfxItemSet *_pSet) IMPL_LINK( SvxGrfCropPage, ZoomHdl, weld::MetricSpinButton&, rField, void ) { SfxItemPool* pPool = GetItemSet().GetPool(); -DBG_ASSERT( pPool, "Where is the pool?" ); +assert(pPool && "Where is the pool?"); FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhichIDFromSlotID( SID_ATTR_GRAF_CROP ) ) ); @@ -390,7 +390,7 @@ IMPL_LINK( SvxGrfCropPage, ZoomHdl, weld::MetricSpinButton&, rField, void ) IMPL_LINK( SvxGrfCropPage, SizeHdl, weld::MetricSpinButton&, rField, void ) { SfxItemPool* pPool = GetItemSet().GetPool(); -DBG_ASSERT( pPool, "Where is the pool?" ); +assert(pPool && "Where is the pool?"); FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhichIDFromSlotID( SID_ATTR_GRAF_CROP ) ) ); @@ -426,7 +426,7 @@ IMPL_LINK( SvxGrfCropPage, SizeHdl, weld::MetricSpinButton&, rField, void ) IMPL_LINK( SvxGrfCropPage, CropModifyHdl, weld::MetricSpinButton&, rField, void ) { SfxItemPool* pPool = GetItemSet().GetPool(); -DBG_ASSERT( pPool, "Where is the pool?" ); +assert(pPool && "Where is the pool?"); FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhichIDFromSlotID( SID_ATTR_GRAF_CROP ) ) ); @@ -511,7 +511,7 @@ IMPL_LINK( SvxGrfCropPage, CropModifyHdl, weld::MetricSpinButton&, rField, void IMPL_LINK_NOARG(SvxGrfCropPage, OrigSizeHdl, weld::Button&, void) { SfxItemPool* pPool = GetItemSet().GetPool(); -DBG_ASSERT( pPool, "Where is the pool?" ); +assert(pPool && "Where is the pool?"); FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhichIDFromSlotID(
core.git: cui/source sw/source
cui/source/inc/swpossizetabpage.hxx |1 + cui/source/tabpages/swpossizetabpage.cxx | 27 +-- sw/source/uibase/shells/drwbassh.cxx | 10 ++ 3 files changed, 32 insertions(+), 6 deletions(-) New commits: commit 0f410680461d7ba5f70dd65b2a8263dec15ac357 Author: Miklos Vajna AuthorDate: Fri May 3 08:08:29 2024 +0200 Commit: Miklos Vajna CommitDate: Fri May 3 13:51:08 2024 +0200 tdf#160833 sw DoNotMirrorRtlDrawObjs: add UI in cui/ The UI code at lcl_ChangeResIdToVerticalOrRTL() was aware that SwAnchoredObjectPosition::CalcRelPosX() mirrors the position when the anchor paragraph is RTL, so swapped the "from left" label to a "from right" label. Don't do this when the compat option is enabled, so not only we render correctly but the UI now correctly explains why we came up with the correct position. Change-Id: I479ed1f085b249d10be47b66d7a656dc1bd4f936 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167031 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/cui/source/inc/swpossizetabpage.hxx b/cui/source/inc/swpossizetabpage.hxx index 2e5a15fbebbb..037cede29326 100644 --- a/cui/source/inc/swpossizetabpage.hxx +++ b/cui/source/inc/swpossizetabpage.hxx @@ -53,6 +53,7 @@ class SvxSwPosSizeTabPage : public SfxTabPage boolm_bPositioningDisabled; boolm_bIsMultiSelection; boolm_bIsInRightToLeft; +bool m_bDoNotMirrorRtlDrawObjs = false; TriStatem_nProtectSizeState; SwFrameExample m_aExampleWN; diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index 1a0d14759eac..752af91a1a62 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -37,6 +37,7 @@ #include #include #include +#include #include @@ -433,14 +434,16 @@ static std::size_t lcl_GetFrmMapCount(const FrmMap* pMap) } static SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL( -SvxSwFramePosString::StringId eStringId, bool bVertical, bool bRTL) +SvxSwFramePosString::StringId eStringId, bool bVertical, bool bRTL, bool bDontMirrorRTL) { //special handling of STR_FROMLEFT if(SvxSwFramePosString::FROMLEFT == eStringId) { +bool bMirrorRtlDrawObjs = !bDontMirrorRTL; +bool bSwapLR = bRTL && bMirrorRtlDrawObjs; eStringId = bVertical ? bRTL ? SvxSwFramePosString::FROMBOTTOM : SvxSwFramePosString::FROMTOP : -bRTL ? SvxSwFramePosString::FROMRIGHT : SvxSwFramePosString::FROMLEFT; +bSwapLR ? SvxSwFramePosString::FROMRIGHT : SvxSwFramePosString::FROMLEFT; return eStringId; } if(bVertical) @@ -749,7 +752,8 @@ WhichRangesContainer SvxSwPosSizeTabPage::GetRanges() SID_ATTR_TRANSFORM_AUTOWIDTH, SID_ATTR_TRANSFORM_VERT_ORIENT, SID_HTML_MODE, SID_HTML_MODE, SID_SW_FOLLOW_TEXT_FLOW, SID_SW_FOLLOW_TEXT_FLOW, -SID_ATTR_TRANSFORM_HORI_POSITION, SID_ATTR_TRANSFORM_VERT_POSITION +SID_ATTR_TRANSFORM_HORI_POSITION, SID_ATTR_TRANSFORM_VERT_POSITION, +SID_ATTR_CHAR_GRABBAG, SID_ATTR_CHAR_GRABBAG >); return ranges; } @@ -988,6 +992,17 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet* rSet) } m_xFollowCB->save_state(); +const SfxGrabBagItem* pGrabBag = GetItem(*rSet, SID_ATTR_CHAR_GRABBAG); +if (pGrabBag) +{ +const std::map& rMap = pGrabBag->GetGrabBag(); +auto it = rMap.find("DoNotMirrorRtlDrawObjs"); +if (it != rMap.end()) +{ +it->second >>= m_bDoNotMirrorRtlDrawObjs; +} +} + if(m_bHtmlMode) { m_xHoriMirrorCB->hide(); @@ -1677,7 +1692,7 @@ void SvxSwPosSizeTabPage::FillRelLB(FrmMap const *pMap, sal_uInt16 nMapPos, sal_ { SvxSwFramePosString::StringId sStrId1 = aAsCharRelationMap[nRelPos].eStrId; -sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, m_bIsVerticalFrame, m_bIsInRightToLeft); +sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, m_bIsVerticalFrame, m_bIsInRightToLeft, m_bDoNotMirrorRtlDrawObjs); OUString sEntry = SvxSwFramePosString::GetString(sStrId1); rLB.append(weld::toId([nRelPos]), sEntry); if (pMap[_nMapPos].nAlign == nAlign) @@ -1732,7 +1747,7 @@ void SvxSwPosSizeTabPage::FillRelLB(FrmMap const *pMap, sal_uInt16 nMapPos, sal_ if (aRelationMap[nRelPos].nLBRelation == static_cast(nBit)) { SvxSwFramePosString::StringId sStrId1 = m_xHoriMirrorCB->get_active() ? aRelationMap[nRelPos].eMirrorStrId : aRelationMap[nRelPos].eStrId; -sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1,
core.git: cui/source sw/qa
cui/source/tabpages/paragrph.cxx | 10 ++ sw/qa/uitest/writer_tests2/formatParagraph.py |2 +- 2 files changed, 3 insertions(+), 9 deletions(-) New commits: commit 83236587bfca52513515b0b7a7dbfa18eed11503 Author: Julien Nabet AuthorDate: Sat Apr 27 10:52:29 2024 +0200 Commit: Julien Nabet CommitDate: Sun Apr 28 13:38:02 2024 +0200 tdf#159625: fix "allow to split paragraph" 2 pbs here: 1) bug described in the bugtracker, the uncheck isn't kept => just remove all the buggy GetOldItem stuff 2) after unchecked the option then saving the file and reloading the file, the option is still checked => change the buggy rOutSet->Put( SvxFormatSplitItem( eState == TRISTATE_FALSE, _nWhich ) ); to rOutSet->Put( SvxFormatSplitItem( eState == TRISTATE_TRUE, _nWhich ) ); In fact, I just mimicked the code used for "keep paragraphs" which works well. Also change the QA test since "allow to split paragraph" is checked by default so if the QA simulates a click on it, we expect the value to be false when dialog is opened again Change-Id: I947feb02e0c282304621a252ad5e4c168c1d295a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166774 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 11fefa11ed07..98ee3558f0dd 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -1799,14 +1799,8 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) if (m_xAllowSplitBox->get_state_changed_from_saved()) { -pOld = GetOldItem( *rOutSet, SID_ATTR_PARA_SPLIT ); - -if ( !pOld || static_cast(pOld)->GetValue() != - ( eState == TRISTATE_FALSE ) ) -{ -rOutSet->Put( SvxFormatSplitItem( eState == TRISTATE_FALSE, _nWhich ) ); -bModified = true; -} +rOutSet->Put( SvxFormatSplitItem( eState == TRISTATE_TRUE, _nWhich ) ); +bModified = true; } // keep paragraphs diff --git a/sw/qa/uitest/writer_tests2/formatParagraph.py b/sw/qa/uitest/writer_tests2/formatParagraph.py index e90d0fd7f980..bfa6eff48dc9 100644 --- a/sw/qa/uitest/writer_tests2/formatParagraph.py +++ b/sw/qa/uitest/writer_tests2/formatParagraph.py @@ -177,7 +177,7 @@ class formatParagraph(UITestCase): self.assertEqual(get_state_as_dict(xspinWidow)["Text"], "2") self.assertEqual(get_state_as_dict(xcheckWidow)["Selected"], "false") self.assertEqual(get_state_as_dict(xcheckOrphan)["Selected"], "false") - self.assertEqual(get_state_as_dict(xcheckSplitPara)["Selected"], "true") + self.assertEqual(get_state_as_dict(xcheckSplitPara)["Selected"], "false") self.assertEqual(get_state_as_dict(xcheckKeepPara)["Selected"], "true")
core.git: cui/source
cui/source/options/optlanguagetool.cxx | 35 - 1 file changed, 22 insertions(+), 13 deletions(-) New commits: commit 155a6af93a8ac90cab15968f5dd499ab77ad9f72 Author: Leonid Ryzhov AuthorDate: Wed Mar 20 23:21:18 2024 +0300 Commit: Mike Kaganski CommitDate: Wed Apr 17 06:00:47 2024 +0200 tdf#159395-LanguageTool use correct default URL when username/APIkey set Change-Id: I31e1c2f1dfd96d87f60b6be1e5abce4837827a76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165079 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/cui/source/options/optlanguagetool.cxx b/cui/source/options/optlanguagetool.cxx index 8c56a40e728f..3979b42c0521 100644 --- a/cui/source/options/optlanguagetool.cxx +++ b/cui/source/options/optlanguagetool.cxx @@ -25,6 +25,7 @@ using LanguageToolCfg = officecfg::Office::Linguistic::GrammarChecking::LanguageTool; constexpr OUString LANGUAGETOOL_DEFAULT_URL = u"https://api.languagetool.org/v2"_ustr; +constexpr OUString LANGUAGETOOLPLUS_DEFAULT_URL = u"https://api.languagetoolplus.com/v2"_ustr; OptLanguageToolTabPage::OptLanguageToolTabPage(weld::Container* pPage, weld::DialogController* pController, @@ -81,20 +82,21 @@ IMPL_LINK_NOARG(OptLanguageToolTabPage, CheckHdl, weld::Toggleable&, void) void OptLanguageToolTabPage::Reset(const SfxItemSet*) { // tdf#150494 If no URL has been set, use the default URL -OUString aBaseURL = LanguageToolCfg::BaseURL::get().value_or(""); -if (aBaseURL.isEmpty()) -m_xBaseURLED->set_text(LANGUAGETOOL_DEFAULT_URL); -else -m_xBaseURLED->set_text(aBaseURL); +OUString aUsername = LanguageToolCfg::Username::get().value_or(""); +OUString aApiKey = LanguageToolCfg::ApiKey::get().value_or(""); +OUString aBaseURL = LanguageToolCfg::BaseURL::get().value_or( +(aUsername.isEmpty() && aApiKey.isEmpty()) ? LANGUAGETOOL_DEFAULT_URL + : LANGUAGETOOLPLUS_DEFAULT_URL); +m_xBaseURLED->set_text(aBaseURL); m_xBaseURLED->set_sensitive(!LanguageToolCfg::BaseURL::isReadOnly()); m_xBaseURLImg->set_visible(LanguageToolCfg::BaseURL::isReadOnly()); -m_xUsernameED->set_text(LanguageToolCfg::Username::get().value_or("")); +m_xUsernameED->set_text(aUsername); m_xUsernameED->set_sensitive(!LanguageToolCfg::Username::isReadOnly()); m_xUsernameImg->set_visible(LanguageToolCfg::Username::isReadOnly()); -m_xApiKeyED->set_text(LanguageToolCfg::ApiKey::get().value_or("")); +m_xApiKeyED->set_text(aApiKey); m_xApiKeyED->set_sensitive(!LanguageToolCfg::ApiKey::isReadOnly()); m_xApiKeyImg->set_visible(LanguageToolCfg::ApiKey::isReadOnly()); @@ -139,14 +141,21 @@ bool OptLanguageToolTabPage::FillItemSet(SfxItemSet*) auto batch(comphelper::ConfigurationChanges::create()); // tdf#150494 If no URL has been set, then save the default URL +// tdf#159395 If Username and ApiKey are set, then save the default URL for paid service OUString aBaseURL = m_xBaseURLED->get_text(); -if (aBaseURL.isEmpty()) -LanguageToolCfg::BaseURL::set(LANGUAGETOOL_DEFAULT_URL, batch); -else -LanguageToolCfg::BaseURL::set(aBaseURL, batch); +OUString aUsername = m_xUsernameED->get_text(); +OUString aApiKey = m_xApiKeyED->get_text(); -LanguageToolCfg::Username::set(m_xUsernameED->get_text(), batch); -LanguageToolCfg::ApiKey::set(m_xApiKeyED->get_text(), batch); +if (aBaseURL.isEmpty() +|| (aUsername.isEmpty() && aApiKey.isEmpty() && aBaseURL == LANGUAGETOOLPLUS_DEFAULT_URL)) +aBaseURL = LANGUAGETOOL_DEFAULT_URL; + +if (!aUsername.isEmpty() && !aApiKey.isEmpty() && aBaseURL == LANGUAGETOOL_DEFAULT_URL) +aBaseURL = LANGUAGETOOLPLUS_DEFAULT_URL; + +LanguageToolCfg::BaseURL::set(aBaseURL, batch); +LanguageToolCfg::Username::set(aUsername, batch); +LanguageToolCfg::ApiKey::set(aApiKey, batch); LanguageToolCfg::RestProtocol::set(m_xRestProtocol->get_text(), batch); LanguageToolCfg::SSLCertVerify::set(!m_xSSLDisableVerificationBox->get_active(), batch); batch->commit();
core.git: cui/source filter/source include/basegfx include/svx include/tools include/vcl sc/source sd/source sfx2/source slideshow/source svx/source sw/source tools/CppunitTest_tools_test.mk tools/qa
cui/source/dialogs/cuigrfflt.cxx |8 - filter/source/svg/svgwriter.cxx | 22 ++--- include/basegfx/numeric/ftools.hxx | 34 ++-- include/svx/svdtrans.hxx | 12 +- include/tools/helpers.hxx|8 - include/vcl/bitmap.hxx |5 - sc/source/core/data/drwlayer.cxx |8 - sd/source/ui/app/optsitem.cxx|4 sd/source/ui/dlg/vectdlg.cxx |6 - sd/source/ui/func/fuoaprms.cxx |3 sd/source/ui/view/drviews8.cxx |4 sfx2/source/doc/objcont.cxx |4 slideshow/source/engine/shapes/drawinglayeranimation.cxx |6 - svx/source/customshapes/EnhancedCustomShape2d.cxx|4 svx/source/dialog/_contdlg.cxx |4 svx/source/gallery2/galobj.cxx |4 svx/source/svdraw/gradtrns.cxx | 24 ++--- svx/source/svdraw/sdrpagewindow.cxx |7 + svx/source/svdraw/svdedtv1.cxx |4 svx/source/svdraw/svdfmtf.cxx|7 - svx/source/svdraw/svdhdl.cxx | 12 +- svx/source/svdraw/svdoashp.cxx | 18 ++-- svx/source/svdraw/svdobj.cxx |6 - svx/source/svdraw/svdocapt.cxx |6 - svx/source/svdraw/svdocirc.cxx | 11 +- svx/source/svdraw/svdoedge.cxx |4 svx/source/svdraw/svdograf.cxx |2 svx/source/svdraw/svdomeas.cxx | 16 +-- svx/source/svdraw/svdopath.cxx | 37 +--- svx/source/svdraw/svdorect.cxx |2 svx/source/svdraw/svdotext.cxx | 10 +- svx/source/svdraw/svdotextdecomposition.cxx | 12 +- svx/source/svdraw/svdpdf.cxx | 12 +- svx/source/svdraw/svdpoev.cxx|9 +- svx/source/svdraw/svdtrans.cxx | 24 ++--- svx/source/xoutdev/_xpoly.cxx|7 - sw/source/core/graphic/ndgrf.cxx |3 sw/source/core/layout/fly.cxx|2 tools/CppunitTest_tools_test.mk |1 tools/qa/cppunit/test_fround.cxx | 62 --- tools/source/generic/color.cxx |7 - tools/source/generic/line.cxx|7 + tools/source/generic/poly.cxx| 37 +--- vcl/osx/salframeview.mm |3 vcl/skia/salbmp.cxx |3 vcl/source/animate/AnimationRenderer.cxx |8 - vcl/source/bitmap/BitmapEmbossGreyFilter.cxx |4 vcl/source/bitmap/BitmapFastScaleFilter.cxx |4 vcl/source/bitmap/BitmapInterpolateScaleFilter.cxx |4 vcl/source/bitmap/BitmapScaleConvolutionFilter.cxx |8 - vcl/source/bitmap/BitmapScaleSuperFilter.cxx |4 vcl/source/bitmap/BitmapTools.cxx|8 - vcl/source/bitmap/Vectorizer.cxx |6 - vcl/source/bitmap/bitmap.cxx | 16 +-- vcl/source/filter/eps/eps.cxx|4 vcl/source/filter/wmf/emfwr.cxx |6 - vcl/source/filter/wmf/wmfwr.cxx |4 vcl/source/gdi/gdimtf.cxx| 28 +++--- vcl/source/gdi/metaact.cxx | 30 +++ vcl/source/gdi/pdfwriter_impl.cxx|8 - vcl/source/gdi/pdfwriter_impl2.cxx |8 - vcl/source/gdi/print.cxx | 10 +- vcl/source/gdi/regband.cxx |7 + vcl/source/graphic/GraphicObject.cxx | 16 +-- vcl/source/helper/canvastools.cxx|4 vcl/source/outdev/hatch.cxx | 19 ++-- vcl/source/outdev/rect.cxx | 16 +-- vcl/source/outdev/textline.cxx |4 vcl/source/outdev/transparent.cxx|2 vcl/source/window/window2.cxx|6 - vcl/unx/gtk3/gtkinst.cxx |3 xmloff/source/draw/shapeexport.cxx | 17 ++-- 72 files changed, 356 insertions(+), 389 deletions(-) New commits: commit ea9904c89608d561f6bde3379408208bbb24fe35
core.git: cui/source cui/uiconfig editeng/source include/editeng include/sfx2 include/unotools include/xmloff offapi/com schema/libreoffice svx/sdi sw/inc sw/qa sw/source writerfilter/source xmloff/in
cui/source/inc/paragrph.hxx| 13 cui/source/tabpages/paragrph.cxx | 102 +++- cui/uiconfig/ui/textflowpage.ui| 105 +++- editeng/source/items/paraitem.cxx | 82 +-- editeng/source/rtf/rtfitem.cxx |2 include/editeng/editrids.hrc |8 include/editeng/hyphenzoneitem.hxx | 12 include/editeng/memberids.h|3 include/sfx2/msg.hxx |1 include/unotools/linguprops.hxx|4 include/xmloff/xmltoken.hxx|2 include/xmloff/xmltypes.hxx|1 offapi/com/sun/star/style/ParagraphProperties.idl | 15 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng| 16 svx/sdi/svxitems.sdi |3 sw/inc/inspectorproperties.hrc |1 sw/inc/unoprnms.hxx|1 sw/qa/extras/odfexport/data/tdf132599_column.fodt | 198 +++ sw/qa/extras/odfexport/data/tdf132599_page_in_last_column.fodt | 196 +++ sw/qa/extras/odfexport/data/tdf132599_page_in_not_last_column.fodt | 198 +++ sw/qa/extras/odfexport/data/tdf132599_spread-left-page.fodt| 252 ++ sw/qa/extras/odfexport/data/tdf132599_spread.fodt | 241 + sw/qa/extras/odfexport/odfexport2.cxx | 65 ++ sw/qa/uitest/styleInspector/styleInspector.py | 20 sw/qa/uitest/styleInspector/tdf137513.py |2 sw/source/core/text/inftxt.cxx | 26 - sw/source/core/text/widorp.cxx | 32 + sw/source/core/unocore/unomapproperties.hxx|6 sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx |1 writerfilter/source/dmapper/PropertyIds.cxx|1 writerfilter/source/dmapper/PropertyIds.hxx|1 writerfilter/source/dmapper/SettingsTable.cxx |3 xmloff/inc/xmlprop.hxx |1 xmloff/source/core/xmltoken.cxx|2 xmloff/source/text/txtprhdl.cxx| 13 xmloff/source/text/txtprmap.cxx|1 xmloff/source/token/tokens.txt |2 37 files changed, 1515 insertions(+), 117 deletions(-) New commits: commit 6e8819f29b6051a0e551d77512830539913ec277 Author: László Németh AuthorDate: Wed Apr 10 12:27:38 2024 +0200 Commit: László Németh CommitDate: Thu Apr 11 10:20:41 2024 +0200 tdf#132599 cui offapi sw xmloff: add hyphenation-keep-type Support XSL attribute "column" and CSS 4 attribute "spread", stored in loext:hyphenation-keep-type, to give better control over hyphenation-keep. E.g. spread: both parts of a hyphenated word shall lie within a single spread, i.e. when the next page is not visible at the same time (e.g. the next page is not a right page of a book). – css::style::ParaHyphenationKeep is a boolean property now, importing hyphenation-keep = "page" as true. – type of ParaHyphenationKeep, including the new non-ODF types is stored in the new ParagraphProperties::ParaHyphenationKeepType. – default value of ParaHyphenationKeepType is COLUMN for interoperability. – Add checkboxes to Text Flow -> Hyphenation Across in paragraph dialog: * Column (previously: Hyphenate across column and page) * Page * Spread – enabling/disabling them follows XSL/CSS 4/loext, i.e. possible combinations: * No Hyphenation across (hyphenation-keep = "page" and loext:hyphenation-keep-type = "column") * Hyphenation across [x] Column (hyphenation-keep = "page" and loext:hyphenation-keep-type = "page") * Hyphenation across [x] Column [x] Page (hyphenation-keep = "page" and loext:hyphenation-keep-type = "spread") * Hyphenation across [x] Column [x] Page [x] Spread (hyphenation-keep = "auto") – Add ODF import/export – Update DOCX import – Add ODF unit tests Note: recent implementation depends on widow settings: disabling widow handling allows hyphenation across columns and pages not only in table cells. Note: RTF import-only, but not used bPageEnd has been renamed to bKeep.
core.git: cui/source framework/source officecfg/registry svx/source
cui/source/dialogs/tipofthedaydlg.cxx | 17 +++-- framework/source/uielement/menubarmanager.cxx |5 +++ officecfg/registry/schema/org/openoffice/Office/Common.xcs |6 svx/source/dialog/crashreportdlg.cxx |8 +- 4 files changed, 33 insertions(+), 3 deletions(-) New commits: commit fe66cf8c8048bfd8a4386c0c711bd6912af9ec63 Author: Stephan Bergmann AuthorDate: Wed Apr 10 13:30:59 2024 +0200 Commit: Stephan Bergmann CommitDate: Wed Apr 10 14:54:41 2024 +0200 New Expert Configuration setting to not offer Safe Mode in the UI /org.openoffice.Office/Common/Misc/OfferSafeMode (default: true), controlling: * "Help - Restart in Safe Mode..." menu entry * "Restart LibreOffice to enter safe mode" checkbox in the "Crash Report" dialog * "To start temporarily with a fresh user profile,..." tip of the day (It does not control the --safe-mode command line argument, though.) Change-Id: I66084448a1ba9427aaafef630187b4bf25219a2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165926 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/cui/source/dialogs/tipofthedaydlg.cxx b/cui/source/dialogs/tipofthedaydlg.cxx index bbb26a054be9..40bb606130f2 100644 --- a/cui/source/dialogs/tipofthedaydlg.cxx +++ b/cui/source/dialogs/tipofthedaydlg.cxx @@ -121,8 +121,21 @@ void TipOfTheDayDialog::UpdateTip() { constexpr sal_Int32 nNumberOfTips = std::size(TIPOFTHEDAY_STRINGARRAY); -if ((m_nCurrentTip >= nNumberOfTips) || (m_nCurrentTip < 0)) -m_nCurrentTip = 0; +for (;;) +{ +if ((m_nCurrentTip >= nNumberOfTips) || (m_nCurrentTip < 0)) +m_nCurrentTip = 0; +if (std::get<1>(TIPOFTHEDAY_STRINGARRAY[m_nCurrentTip]) +== "svx/ui/safemodedialog/SafeModeDialog" +&& !officecfg::Office::Common::Misc::OfferSafeMode::get()) +{ +++m_nCurrentTip; +} +else +{ +break; +} +} //title m_xDialog->set_title(CuiResId(STR_TITLE) diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 8194cfc8e25f..95e17053d3fb 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -1343,6 +1343,11 @@ void MenuBarManager::FillMenu( { continue; } +if (aCommandURL == ".uno:SafeMode" +&& !officecfg::Office::Common::Misc::OfferSafeMode::get()) +{ +continue; +} if ( nType == css::ui::ItemType::DEFAULT ) { diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index e43a6ac23765..15b3a481195c 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -5583,6 +5583,12 @@ true + + + Offer Safe Mode to the user. + +true + diff --git a/svx/source/dialog/crashreportdlg.cxx b/svx/source/dialog/crashreportdlg.cxx index aad28436eea3..82ecf8beda5a 100644 --- a/svx/source/dialog/crashreportdlg.cxx +++ b/svx/source/dialog/crashreportdlg.cxx @@ -40,8 +40,14 @@ CrashReportDialog::CrashReportDialog(weld::Window* pParent) { maLinkTemplate = mxLinkButton->get_uri(); +auto const offerSafeMode = officecfg::Office::Common::Misc::OfferSafeMode::get(); +mxCBSafeMode->set_visible(offerSafeMode); + auto nWidth = mxEditPreUpload->get_preferred_size().Width(); -nWidth = std::max(nWidth, mxCBSafeMode->get_size_request().Width()); +if (offerSafeMode) +{ +nWidth = std::max(nWidth, mxCBSafeMode->get_size_request().Width()); +} mxEditPreUpload->set_size_request(nWidth, -1); mxCBSafeMode->set_size_request(nWidth, -1);
core.git: cui/source
cui/source/options/treeopt.cxx | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) New commits: commit 3b50600e8f817409f5a21249871d9f82728e4987 Author: Gabor Kelemen AuthorDate: Fri Mar 29 22:20:08 2024 +0100 Commit: Thorsten Behrens CommitDate: Tue Apr 9 07:45:39 2024 +0200 Use some nicer assert string Change-Id: I49b5950a63b7c1decb07f3093e8962fc3eada0bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165569 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 5fe43e57f6ab..6ab767bb8044 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1841,7 +1841,7 @@ void OfaTreeOptionsDialog::writerOptions(const std::vector& vPageId) sal_uInt16 nPageId = 0; OUString aFactory = getCurrentFactory_Impl( m_xFrame ); -DBG_ASSERT( GetModuleIdentifier( m_xFrame ) == aFactory, "S H I T!!!" ); +DBG_ASSERT( GetModuleIdentifier( m_xFrame ) == aFactory, "This should not happen" ); SvtModuleOptions aModuleOpt; if ( aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::WRITER ) ) @@ -1901,7 +1901,7 @@ void OfaTreeOptionsDialog::writerWebOptions(const std::vector& vPage sal_uInt16 nPageId = 0; OUString aFactory = getCurrentFactory_Impl( m_xFrame ); -DBG_ASSERT( GetModuleIdentifier( m_xFrame ) == aFactory, "S H I T!!!" ); +DBG_ASSERT( GetModuleIdentifier( m_xFrame ) == aFactory, "This should not happen" ); SvtModuleOptions aModuleOpt; if ( aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::WRITER ) ) @@ -1955,7 +1955,7 @@ void OfaTreeOptionsDialog::calcOptions(const std::vector& vPageId) sal_uInt16 nPageId = 0; OUString aFactory = getCurrentFactory_Impl( m_xFrame ); -DBG_ASSERT( GetModuleIdentifier( m_xFrame ) == aFactory, "S H I T!!!" ); +DBG_ASSERT( GetModuleIdentifier( m_xFrame ) == aFactory, "This should not happen" ); SvtModuleOptions aModuleOpt; // Calc options @@ -1995,7 +1995,7 @@ void OfaTreeOptionsDialog::impressOptions(const std::vector& vPageId sal_uInt16 nPageId = 0; OUString aFactory = getCurrentFactory_Impl( m_xFrame ); -DBG_ASSERT( GetModuleIdentifier( m_xFrame ) == aFactory, "S H I T!!!" ); +DBG_ASSERT( GetModuleIdentifier( m_xFrame ) == aFactory, "This should not happen" ); SvtModuleOptions aModuleOpt; // Impress options @@ -2035,7 +2035,7 @@ void OfaTreeOptionsDialog::drawOptions(const std::vector& vPageId) sal_uInt16 nPageId = 0; OUString aFactory = getCurrentFactory_Impl( m_xFrame ); -DBG_ASSERT( GetModuleIdentifier( m_xFrame ) == aFactory, "S H I T!!!" ); +DBG_ASSERT( GetModuleIdentifier( m_xFrame ) == aFactory, "This should not happen" ); SvtModuleOptions aModuleOpt; // Draw options @@ -2076,7 +2076,7 @@ void OfaTreeOptionsDialog::mathOptions(const std::vector& vPageId) sal_uInt16 nPageId = 0; OUString aFactory = getCurrentFactory_Impl( m_xFrame ); -DBG_ASSERT( GetModuleIdentifier( m_xFrame ) == aFactory, "S H I T!!!" ); +DBG_ASSERT( GetModuleIdentifier( m_xFrame ) == aFactory, "This should not happen" ); SvtModuleOptions aModuleOpt; // Math options
core.git: cui/source
cui/source/customize/SvxNotebookbarConfigPage.cxx |2 -- cui/source/dialogs/SignSignatureLineDialog.cxx|2 -- cui/source/dialogs/cuifmsearch.cxx|2 -- cui/source/dialogs/hldocntp.cxx |1 - cui/source/dialogs/hltpbase.cxx |2 -- cui/source/dialogs/insdlg.cxx |1 - cui/source/dialogs/multipat.cxx |1 - cui/source/options/dbregister.cxx |2 -- cui/source/options/dbregisterednamesconfig.cxx|1 - cui/source/options/optjava.cxx|2 -- cui/source/options/optjsearch.cxx |2 -- cui/source/options/optpath.cxx|1 - cui/source/options/optsave.cxx|1 - cui/source/options/personalization.cxx|1 - cui/source/options/treeopt.cxx|1 - cui/source/tabpages/autocdlg.cxx |1 - cui/source/tabpages/numpages.cxx |1 - 17 files changed, 24 deletions(-) New commits: commit aa11db227da2830accac7c523c534b2b86a86bb2 Author: Gabor Kelemen AuthorDate: Fri Mar 29 21:52:52 2024 +0100 Commit: Gabor Kelemen CommitDate: Fri Apr 5 13:45:28 2024 +0200 tdf#146619 Drop unused 'using namespace' in: cui/ Change-Id: I311423b045a504b268cffdf740db1fe82aea2810 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165568 Tested-by: Jenkins Reviewed-by: Gabor Kelemen diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx b/cui/source/customize/SvxNotebookbarConfigPage.cxx index d41ecf389e59..7389d05b91d2 100644 --- a/cui/source/customize/SvxNotebookbarConfigPage.cxx +++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx @@ -45,10 +45,8 @@ namespace uno = com::sun::star::uno; namespace frame = com::sun::star::frame; -namespace lang = com::sun::star::lang; namespace container = com::sun::star::container; namespace beans = com::sun::star::beans; -namespace graphic = com::sun::star::graphic; static bool isCategoryAvailable(std::u16string_view sClassId, std::u16string_view sUIItemId, std::u16string_view sActiveCategory, bool& isCategory) diff --git a/cui/source/dialogs/SignSignatureLineDialog.cxx b/cui/source/dialogs/SignSignatureLineDialog.cxx index 4088b40e1765..d3e0bfb5b65e 100644 --- a/cui/source/dialogs/SignSignatureLineDialog.cxx +++ b/cui/source/dialogs/SignSignatureLineDialog.cxx @@ -41,8 +41,6 @@ using namespace css; using namespace css::uno; using namespace css::beans; using namespace css::frame; -using namespace css::io; -using namespace css::lang; using namespace css::frame; using namespace css::text; using namespace css::graphic; diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index bb3bfaf5cac5..eff48a747fe7 100644 --- a/cui/source/dialogs/cuifmsearch.cxx +++ b/cui/source/dialogs/cuifmsearch.cxx @@ -34,10 +34,8 @@ #include using namespace css::uno; -using namespace css::i18n; using namespace ::svxform; using namespace css::sdbc; -using namespace css::util; #define MAX_HISTORY_ENTRIES 50 diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index 3b3352315dd1..d58077a431f4 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -43,7 +43,6 @@ #include #include -using namespace ::com::sun::star::lang; using namespace ::com::sun::star::ui::dialogs; using namespace ::com::sun::star::uno; diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index 24621538caec..7f2230e1d87a 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -39,8 +39,6 @@ #include #include -using namespace ::ucbhelper; - namespace { OUString CreateUiNameFromURL( const OUString& aStrURL ) diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx index 3cb50c2a6066..e4c1c6687768 100644 --- a/cui/source/dialogs/insdlg.cxx +++ b/cui/source/dialogs/insdlg.cxx @@ -58,7 +58,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::container; using namespace ::com::sun::star::ui::dialogs; bool InsertObjectDialog_Impl::IsCreateNew() const diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx index 085d21f995de..e385a6ccface 100644 --- a/cui/source/dialogs/multipat.cxx +++ b/cui/source/dialogs/multipat.cxx @@ -36,7 +36,6 @@ #include #include -using namespace ::com::sun::star::lang; using namespace ::com::sun::star::ui::dialogs; using namespace ::com::sun::star::uno; diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index 8386cc546595..6aa9213efd92 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -45,9 +45,7 @@ namespace svx { -using namespace
core.git: cui/source
cui/source/tabpages/numpages.cxx |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) New commits: commit 03c9875b873d24d72587ab7d9f3190c7c0cf0e5e Author: RMZeroFour AuthorDate: Sun Mar 31 19:42:57 2024 +0530 Commit: Michael Weghorn CommitDate: Tue Apr 2 21:14:12 2024 +0200 tdf#145538 Use range based for loops As part of the efforts in tdf#145538 to replace regular for loops with range-based for loops in the codebase where suitable, this commit does so in SvxNumOptionsTabPage::PageCreated. PS-2: Renamed a variable. Change-Id: I7ec813a3c6fead3246137a2841c9f3e80f5adc63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165594 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index cbdf7fc5a23d..447638836add 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -3044,9 +3044,8 @@ void SvxNumOptionsTabPage::PageCreated(const SfxAllItemSet& aSet) if (pListItem) { const std::vector = pListItem->GetList(); -sal_uInt32 nCount = aList.size(); -for(sal_uInt32 i = 0; i < nCount; i++) -m_xCharFmtLB->append_text(aList[i]); +for (const auto& rItem : aList) +m_xCharFmtLB->append_text(rItem); } if (pMetricItem) SetMetric(static_cast(pMetricItem->GetValue()));
core.git: cui/source cui/uiconfig
cui/source/tabpages/paragrph.cxx |4 cui/uiconfig/ui/paraindentspacing.ui |1 + 2 files changed, 1 insertion(+), 4 deletions(-) New commits: commit 9d28e7964bf0730dc03d40adfbab95dd9b5d087c Author: Glen Campbell AuthorDate: Wed Mar 27 12:15:40 2024 -0400 Commit: Adolfo Jayme Barrientos CommitDate: Sat Mar 30 15:59:26 2024 +0100 tdf#145081 Line spacing style type "Fixed" is not on the style sheet dialog Change-Id: I0dd668a2bedb16fe39793c5350c1d5a251949a65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165400 Reviewed-by: Vernon, Stuart Foote Reviewed-by: Adolfo Jayme Barrientos Tested-by: Adolfo Jayme Barrientos diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index d0c38140653a..6972b2d14e83 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -1188,7 +1188,6 @@ void SvxStdParagraphTabPage::PageCreated(const SfxAllItemSet& aSet) */ const SfxUInt16Item* pPageWidthItem = aSet.GetItem(SID_SVXSTDPARAGRAPHTABPAGE_PAGEWIDTH, false); const SfxUInt32Item* pFlagSetItem = aSet.GetItem(SID_SVXSTDPARAGRAPHTABPAGE_FLAGSET, false); -const SfxUInt32Item* pLineDistItem = aSet.GetItem(SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST, false); if (pPageWidthItem) nWidth = pPageWidthItem->GetValue(); @@ -1205,9 +1204,6 @@ void SvxStdParagraphTabPage::PageCreated(const SfxAllItemSet& aSet) EnableAutoFirstLine(); } -if(pLineDistItem) -EnableAbsLineDist(pLineDistItem->GetValue()); - if (pFlagSetItem) { if (( 0x0008 & pFlagSetItem->GetValue()) == 0x0008 ) diff --git a/cui/uiconfig/ui/paraindentspacing.ui b/cui/uiconfig/ui/paraindentspacing.ui index a11482a8b58a..333ca695c5a4 100644 --- a/cui/uiconfig/ui/paraindentspacing.ui +++ b/cui/uiconfig/ui/paraindentspacing.ui @@ -387,6 +387,7 @@ Proportional At least Leading + Fixed
core.git: cui/source include/svx svx/source
cui/source/dialogs/srchxtra.cxx | 25 +++ include/svx/srchdlg.hxx | 13 -- svx/source/dialog/srchdlg.cxx | 51 +--- 3 files changed, 33 insertions(+), 56 deletions(-) New commits: commit 2984dd49fb9fb2f8d3d56fba0db34a7b95666ce1 Author: Armin Le Grand (allotropia) AuthorDate: Fri Mar 22 15:31:14 2024 +0100 Commit: Armin Le Grand CommitDate: Tue Mar 26 14:48:17 2024 +0100 ITEM: Use SfxPoolItemHolder in SvxSearchDialog I replaced that SfxPoolItem* in SearchAttrInfo with a much safer SfxPoolItemHolder and adapted and simplified used code - it does not need to take care of Item lifetime/Cloning itself. That works well. I did not find out why that 'invalid' state is used in the SrchAttrInfoList, but seems to be needed. Thus I keep this for now as it is (it can be all expressed/used using SfxPoolItemHolder, too). Change-Id: I4b769f43128cb2e25153919f7652b2f032393123 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165167 Tested-by: Jenkins Reviewed-by: Armin Le Grand diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx index 4c672b9839f2..f8080f537775 100644 --- a/cui/source/dialogs/srchxtra.cxx +++ b/cui/source/dialogs/srchxtra.cxx @@ -135,7 +135,7 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog(weld::Window* pParent, if ( nSlot == rList[i].nSlot ) { bFound = true; -if ( IsInvalidItem( rList[i].pItemPtr ) ) +if ( IsInvalidItem( rList[i].aItemPtr.getItem() ) ) bChecked = true; } } @@ -167,13 +167,13 @@ SvxSearchAttributeDialog::~SvxSearchAttributeDialog() IMPL_LINK_NOARG(SvxSearchAttributeDialog, OKHdl, weld::Button&, void) { -SearchAttrInfo aInvalidItem; -aInvalidItem.pItemPtr = INVALID_POOL_ITEM; +DBG_ASSERT( SfxObjectShell::Current(), "No DocShell" ); +SfxItemPool& rPool(SfxObjectShell::Current()->GetPool()); for (int i = 0, nCount = m_xAttrLB->n_children(); i < nCount; ++i) { -sal_uInt16 nSlot = m_xAttrLB->get_id(i).toUInt32(); -bool bChecked = m_xAttrLB->get_toggle(i) == TRISTATE_TRUE; +const sal_uInt16 nSlot(m_xAttrLB->get_id(i).toUInt32()); +const bool bChecked(TRISTATE_TRUE == m_xAttrLB->get_toggle(i)); sal_uInt16 j; for ( j = rList.Count(); j; ) @@ -182,13 +182,9 @@ IMPL_LINK_NOARG(SvxSearchAttributeDialog, OKHdl, weld::Button&, void) if( rItem.nSlot == nSlot ) { if( bChecked ) -{ -if( !IsInvalidItem( rItem.pItemPtr ) ) -delete rItem.pItemPtr; -rItem.pItemPtr = INVALID_POOL_ITEM; -} -else if( IsInvalidItem( rItem.pItemPtr ) ) -rItem.pItemPtr = nullptr; +rItem.aItemPtr = SfxPoolItemHolder(rPool, INVALID_POOL_ITEM); +else if( IsInvalidItem( rItem.aItemPtr.getItem() ) ) +rItem.aItemPtr = SfxPoolItemHolder(); j = 1; break; } @@ -196,14 +192,13 @@ IMPL_LINK_NOARG(SvxSearchAttributeDialog, OKHdl, weld::Button&, void) if ( !j && bChecked ) { -aInvalidItem.nSlot = nSlot; -rList.Insert( aInvalidItem ); +rList.Insert( { nSlot, SfxPoolItemHolder(rPool, INVALID_POOL_ITEM) }); } } // remove invalid items (pItem == NULL) for ( sal_uInt16 n = rList.Count(); n; ) -if ( !rList[ --n ].pItemPtr ) +if ( !rList[ --n ].aItemPtr.getItem() ) rList.Remove( n ); m_xDialog->response(RET_OK); diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx index 7223a51cd324..1b9a0f067f93 100644 --- a/include/svx/srchdlg.hxx +++ b/include/svx/srchdlg.hxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -40,8 +41,16 @@ enum class TransliterationFlags; struct SearchAttrInfo { +SearchAttrInfo() +: nSlot(0) +, aItemPtr() {} + +SearchAttrInfo(sal_uInt16 Slot, const SfxPoolItemHolder& ItemPtr) +: nSlot(Slot) +, aItemPtr(ItemPtr) {} + sal_uInt16 nSlot; -const SfxPoolItem* pItemPtr; +SfxPoolItemHolder aItemPtr; }; typedef std::vector SrchAttrInfoList; @@ -51,7 +60,7 @@ class SVX_DLLPUBLIC SearchAttrItemList : private SrchAttrInfoList public: SearchAttrItemList() {} SearchAttrItemList( const SearchAttrItemList& rList ); -SearchAttrItemList( SearchAttrItemList&& rList ); +SearchAttrItemList( SearchAttrItemList&& rList ) noexcept; ~SearchAttrItemList(); voidPut( const SfxItemSet& rSet ); diff --git a/svx/source/dialog/srchdlg.cxx
core.git: cui/source
cui/source/tabpages/numpages.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit e08b69e25c27adffcde3466b5ff90be4da603347 Author: Darshan11 AuthorDate: Fri Mar 8 20:54:43 2024 +0530 Commit: Caolán McNamara CommitDate: Tue Mar 26 10:24:33 2024 +0100 Hide "Add and resize" button from numbering and bullets dialog for ONLINE - Image tab had "Add and resize" option for numbering and bullets dialog - which is not need in online - so we will just hide that browseBtn for online Change-Id: Ib87f1e7ae7e6df5256ab77122b477695a45cf441 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164587 Reviewed-by: Szymon Kłos Tested-by: Jenkins CollaboraOffice (cherry picked from commit 08a5c1352f4d65c180995cdfca5c981f88035901) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164818 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165215 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 8bba652c594e..cbdf7fc5a23d 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -731,6 +731,9 @@ SvxBitmapPickTabPage::SvxBitmapPickTabPage(weld::Container* pPage, weld::DialogC m_xExamplesVS->SetDoubleClickHdl(LINK(this, SvxBitmapPickTabPage, DoubleClickHdl_Impl)); m_xBtBrowseFile->connect_clicked(LINK(this, SvxBitmapPickTabPage, ClickAddBrowseHdl_Impl)); +if(comphelper::LibreOfficeKit::isActive()) +m_xBtBrowseFile->hide(); + eCoreUnit = rSet.GetPool()->GetMetric(rSet.GetPool()->GetWhichIDFromSlotID(SID_ATTR_NUMBERING_RULE)); // determine graphic name
core.git: cui/source cui/uiconfig editeng/source include/editeng include/linguistic include/unotools include/xmloff lingucomponent/source linguistic/source offapi/com schema/libreoffice svx/sdi sw/inc
cui/source/inc/paragrph.hxx |2 cui/source/tabpages/paragrph.cxx| 12 cui/uiconfig/ui/textflowpage.ui | 50 ++- editeng/source/items/paraitem.cxx | 13 include/editeng/editrids.hrc|1 include/editeng/hyphenzoneitem.hxx |4 include/editeng/memberids.h |1 include/linguistic/lngprophelp.hxx |4 include/unotools/linguprops.hxx |2 include/xmloff/xmltoken.hxx |1 lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx |6 linguistic/source/lngprophelp.cxx | 15 offapi/com/sun/star/style/ParagraphProperties.idl |7 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |9 svx/sdi/svxitems.sdi|1 sw/inc/inspectorproperties.hrc |5 sw/inc/unoprnms.hxx |2 sw/qa/extras/layout/data/tdf158885_compound-remain.fodt | 195 sw/qa/extras/layout/data/tdf158885_not_compound-remain.fodt | 195 sw/qa/extras/layout/layout2.cxx | 48 ++ sw/qa/extras/odfexport/data/tdf158885_compound-remain.fodt | 195 sw/qa/extras/odfexport/odfexport2.cxx |8 sw/qa/uitest/styleInspector/styleInspector.py | 20 - sw/qa/uitest/styleInspector/tdf137513.py|2 sw/source/core/text/inftxt.cxx | 17 - sw/source/core/unocore/unomapproperties.hxx |2 sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx |2 xmloff/inc/xmlprop.hxx |2 xmloff/source/core/xmltoken.cxx |3 xmloff/source/text/txtprmap.cxx |1 xmloff/source/token/tokens.txt |1 31 files changed, 799 insertions(+), 27 deletions(-) New commits: commit 3a332d9f1cacb3c6f81fcf6c08afa51d091ddff4 Author: László Németh AuthorDate: Mon Mar 18 21:55:23 2024 +0100 Commit: László Németh CommitDate: Wed Mar 20 13:04:09 2024 +0100 tdf#158885 cui offapi sw xmloff: fix hyphenation at stem boundary Add new hyphenation option "Compound characters at line end", equivalent of libhyphen's COMPOUNDLEFTHYPHENMIN, to limit bad pattern based hyphenation of compound words using morphological analysis of Hunspell. * Add checkbox to Text Flow in paragraph formatting dialog window * Store property in paragraph model: css::style::ParagraphProperties::ParaHyphenationCompoundMinLeadingChars * Add ODF import/export (loext:hyphenation-compound-remain-char-count) * Add ODF unit tests Note: slower Hunspell based hyphenation is used only if ParaHyphenationCompoundMinLeadingChars >= 3 (we assume that libhyphen hyphenation patterns cover the smaller distances correctly). Hunpell based hyphenation doesn't introduce new hyphenation breaks, only detects the stem boundaries from the libhyphen based hyphenation breaks. Follow-up to commit c899d3608d30f3ab4c2bc193c1fcd765221614a4 "tdf#158885 sw: don't hyphenate right after a stem boundary", replacing hyphenation zone dependence with the new "Compound characters at line end". Note: preset COMPOUNDLEFTHYPHENMIN values aren't loaded yet from hyphenation dictionaries. Note: the suffix of the last stem of the compound is always hyphenated, i.e. the distance limits only hyphenation inside the stem, not inside its suffix or at the end of the stem before the suffix. Change-Id: I46a0288929a66f7453e3ff97fbc5a0c6a01f038f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164983 Tested-by: László Németh Reviewed-by: László Németh diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx index 0972203be73f..dde2eda5fac4 100644 --- a/cui/source/inc/paragrph.hxx +++ b/cui/source/inc/paragrph.hxx @@ -237,6 +237,8 @@ private: std::unique_ptr m_xExtHyphenBeforeBox; std::unique_ptr m_xAfterText; std::unique_ptr m_xExtHyphenAfterBox; +std::unique_ptr m_xCompoundBeforeText; +std::unique_ptr m_xExtCompoundHyphenBeforeBox; std::unique_ptr m_xMaxHyphenLabel; std::unique_ptr m_xMaxHyphenEdit; std::unique_ptr m_xMinWordLabel; diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index a1403b30ea74..abe2a1adc315 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -1625,6 +1625,7 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
core.git: cui/source cui/uiconfig editeng/source include/editeng include/unotools include/xmloff offapi/com offapi/UnoApi_offapi.mk svx/sdi sw/CppunitTest_sw_odfexport2.mk sw/inc sw/qa sw/source xmlof
cui/source/inc/paragrph.hxx |5 cui/source/tabpages/paragrph.cxx | 37 - cui/uiconfig/ui/textflowpage.ui | 100 -- editeng/source/items/paraitem.cxx | 32 include/editeng/editrids.hrc |5 include/editeng/hyphenzoneitem.hxx|4 include/editeng/memberids.h |1 include/unotools/linguprops.hxx |2 include/xmloff/xmltypes.hxx |1 offapi/UnoApi_offapi.mk |1 offapi/com/sun/star/style/ParagraphProperties.idl |8 + offapi/com/sun/star/text/ParagraphHyphenationKeepType.idl | 63 svx/sdi/svxitems.sdi |1 sw/CppunitTest_sw_odfexport2.mk |1 sw/inc/inspectorproperties.hrc|1 sw/inc/unoprnms.hxx |1 sw/qa/extras/odfexport/data/tdf132599_auto.fodt | 49 ++ sw/qa/extras/odfexport/data/tdf132599_page.fodt | 49 ++ sw/qa/extras/odfexport/odfexport2.cxx | 27 +++ sw/qa/uitest/styleInspector/styleInspector.py | 20 +- sw/qa/uitest/styleInspector/tdf137513.py |2 sw/source/core/text/inftxt.cxx| 16 +- sw/source/core/text/itrform2.cxx |1 sw/source/core/text/porlay.hxx|3 sw/source/core/text/widorp.cxx| 42 + sw/source/core/unocore/unomapproperties.hxx |2 sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx |1 xmloff/inc/xmlprop.hxx|1 xmloff/source/text/txtprhdl.cxx | 13 + xmloff/source/text/txtprmap.cxx |1 30 files changed, 423 insertions(+), 67 deletions(-) New commits: commit 9574a62add8e4901405e12117e75c86c2d2c2f21 Author: László Németh AuthorDate: Thu Feb 29 14:07:34 2024 +0100 Commit: László Németh CommitDate: Mon Mar 4 23:39:51 2024 +0100 tdf#132599 cui offapi sw xmloff: implement hyphenate-keep Both parts of a hyphenated word shall lie within a single page with ODF paragraph setting fo:hyphenation-keep="page". The implementation follows the default page layout of MSO 2016 and newer by shifting the bottom hyphenated line to the next page (and to the next column, see last note). Note: this is a MSO DOCX interoperability feature, used also in DTP software, XSL and CSS. * Add checkbox/combobox to Text Flow in paragraph dialog * Store property in paragraph model (com::sun::star::style::ParagraphProperties::ParaHyphenationKeep) * Add ODF import/export * Add ODF unit tests New constants of com::sun::star::text::ParagraphHyphenationKeepType, containing ODF AUTO and PAGE (borrowed from XSL), and for the planned extension ParaHyphenationKeepType of ParagraphProperties: – COLUMN (standard XSL value, defined in https://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#hyphenation-keep) – SPREAD and ALWAYS (CSS 4 values of hyphenate-limit-last, equivalent of hyphenation-keep, defined in https://www.w3.org/TR/css-text-4/#hyphenate-line-limits). Note: the implementation truncates only a single hyphenated line, like MSO does: the pages can end in hyphenated lines (i.e. in the case of consecutive hyphenated lines), but less often, than before. Clean-up hyphenation dialog by collecting "Don't hyphenate" options at the end of the hyphenation settings, and negating them (similar to MSO and DTP), adding also the new option "Hyphenate across column and page": [x] Hyphenate words in CAPS [x] Hyphenate last word [x] Hyphenate across column and page Note: ODF fo:hyphenation-keep has got only "auto" and "page" attributes, while XSL defines also "column". Because of the interoperability with MSO and DTP, fo:hyphenation-keep="page" is interpreted as XSL "column", avoiding hyphenation at the end of column, not only at the end of page. Change-Id: I5c6b7adc0671a5a790568e7bf1d33256e607f85f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164158 Tested-by: László Németh Reviewed-by: László Németh diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx index 9e78c8311015..0972203be73f 100644 --- a/cui/source/inc/paragrph.hxx +++ b/cui/source/inc/paragrph.hxx @@ -223,6 +223,7 @@ private: weld::TriStateEnabled aKeepParaState; weld::TriStateEnabled aOrphanState; weld::TriStateEnabled aWidowState; +weld::TriStateEnabled aKeepState;
core.git: cui/source include/svx officecfg/registry svx/source sw/qa
cui/source/tabpages/numpages.cxx | 23 +- include/svx/strings.hrc|9 -- officecfg/registry/schema/org/openoffice/Office/Common.xcs | 35 + svx/source/dialog/svxbmpnumvalueset.cxx| 48 - svx/source/sidebar/nbdtmg.cxx | 26 ++- sw/qa/uitest/writer_tests2/formatBulletsNumbering.py |3 6 files changed, 66 insertions(+), 78 deletions(-) New commits: commit f944648e0f5d52605a267ed50bba4bfc035aecc6 Author: Samuel Mehrbrodt AuthorDate: Thu Feb 22 11:55:30 2024 +0100 Commit: Samuel Mehrbrodt CommitDate: Mon Feb 26 13:26:20 2024 +0100 tdf#108697 Allow modifying default bullet selection Allow to change bullets in configuration. Change-Id: Iab26118dd597417997d6f0a7355f516a4da97ee4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163735 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 36868e3579ab..8bba652c594e 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -55,6 +55,7 @@ #include #include #include +#include #include #include @@ -122,19 +123,6 @@ static SvxNumSettings_Impl* lcl_CreateNumSettingsPtr(const SequenceGetSelectedItemId() - 1]; -const vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); +sal_uInt16 nIndex = m_xExamplesVS->GetSelectedItemId() - 1; +sal_Unicode cChar = officecfg::Office::Common::BulletsNumbering::DefaultBullets::get()[nIndex].toChar(); +vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); +rActBulletFont.SetFamilyName( + officecfg::Office::Common::BulletsNumbering::DefaultBulletsFonts::get()[nIndex]); sal_uInt16 nMask = 1; for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc index eb8e06f0c4c7..3813f9dfceca 100644 --- a/include/svx/strings.hrc +++ b/include/svx/strings.hrc @@ -1367,15 +1367,6 @@ #define RID_SVXSTR_ERR_OLD_PASSWD NC_("RID_SVXSTR_ERR_OLD_PASSWD", "Invalid password") #define RID_SVXSTR_ERR_REPEAT_PASSWD NC_("RID_SVXSTR_ERR_REPEAT_PASSWD", "Passwords do not match") -#define RID_SVXSTR_BULLET_DESCRIPTION_0 NC_("RID_SVXSTR_BULLET_DESCRIPTION_0", "Solid small circular bullets") -#define RID_SVXSTR_BULLET_DESCRIPTION_1 NC_("RID_SVXSTR_BULLET_DESCRIPTION_1", "Solid large circular bullets") -#define RID_SVXSTR_BULLET_DESCRIPTION_2 NC_("RID_SVXSTR_BULLET_DESCRIPTION_2", "Solid diamond bullets") -#define RID_SVXSTR_BULLET_DESCRIPTION_3 NC_("RID_SVXSTR_BULLET_DESCRIPTION_3", "Solid large square bullets") -#define RID_SVXSTR_BULLET_DESCRIPTION_4 NC_("RID_SVXSTR_BULLET_DESCRIPTION_4", "Right pointing arrow bullets filled out") -#define RID_SVXSTR_BULLET_DESCRIPTION_5 NC_("RID_SVXSTR_BULLET_DESCRIPTION_5", "Right pointing arrow bullets") -#define RID_SVXSTR_BULLET_DESCRIPTION_6 NC_("RID_SVXSTR_BULLET_DESCRIPTION_6", "Cross mark bullets") -#define RID_SVXSTR_BULLET_DESCRIPTION_7 NC_("RID_SVXSTR_BULLET_DESCRIPTION_7", "Check mark bullets") - // do not translate this; instead describe the nth numbering style (LC_NumberingLevel) defined by your locale #define RID_SVXSTR_SINGLENUM_DESCRIPTION_0 NC_("RID_SVXSTR_SINGLENUM_DESCRIPTION_0", "Number 1) 2) 3)") #define RID_SVXSTR_SINGLENUM_DESCRIPTION_1 NC_("RID_SVXSTR_SINGLENUM_DESCRIPTION_1", "Number 1. 2. 3.") diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index adfa422f01b0..e43a6ac23765 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -3327,6 +3327,41 @@ + + +Contains Favorite characters + + + + List of default bullets + + + • + ● + + + ➔ + ➢ + ✗ + ✔ + + + + + List of default bullet fonts. Matching font for `DefaultBullets`. + + + OpenSymbol + OpenSymbol + OpenSymbol + OpenSymbol + OpenSymbol + OpenSymbol + OpenSymbol + OpenSymbol + + + Contains settings that specify the common help settings. diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx index 29dc2ddcc3df..11ac2c6a2755 100644 --- a/svx/source/dialog/svxbmpnumvalueset.cxx +++ b/svx/source/dialog/svxbmpnumvalueset.cxx @@ -25,6 +25,7
core.git: cui/source editeng/source forms/source include/sfx2 include/svl sc/source sd/source sfx2/source svl/source svx/source sw/source
cui/source/tabpages/backgrnd.cxx |8 ++-- cui/source/tabpages/border.cxx| 18 - cui/source/tabpages/grfpage.cxx | 26 ++--- cui/source/tabpages/numpages.cxx | 18 - cui/source/tabpages/paragrph.cxx |8 ++-- cui/source/tabpages/tpline.cxx| 18 - editeng/source/editeng/editdoc.cxx|2 - editeng/source/editeng/edtspell.cxx |2 - editeng/source/items/textitem.cxx |6 +-- editeng/source/rtf/svxrtf.cxx |4 +- forms/source/richtext/parametrizedattributedispatcher.cxx |2 - forms/source/richtext/richtextcontrol.cxx |2 - forms/source/richtext/richtextimplcontrol.cxx |2 - forms/source/richtext/rtattributehandler.cxx |2 - include/sfx2/tabdlg.hxx |2 - include/svl/itempool.hxx | 28 -- sc/source/ui/app/scmod.cxx|2 - sc/source/ui/dbgui/PivotLayoutDialog.cxx |2 - sc/source/ui/dbgui/consdlg.cxx|4 +- sc/source/ui/dbgui/filtdlg.cxx|2 - sc/source/ui/dbgui/pfiltdlg.cxx |2 - sc/source/ui/dbgui/sfiltdlg.cxx |2 - sc/source/ui/dbgui/tpsort.cxx |4 +- sc/source/ui/dbgui/tpsubt.cxx |4 +- sc/source/ui/docshell/docsh4.cxx | 18 - sc/source/ui/drawfunc/drawsh.cxx |2 - sc/source/ui/drawfunc/drtxtob.cxx |6 +-- sc/source/ui/pagedlg/hfedtdlg.cxx |2 - sc/source/ui/view/cellsh1.cxx |2 - sc/source/ui/view/editsh.cxx |8 ++-- sc/source/ui/view/formatsh.cxx| 14 +++ sc/source/ui/view/viewutil.cxx|2 - sd/source/ui/dlg/BulletAndPositionDlg.cxx |5 +- sd/source/ui/dlg/dlgolbul.cxx |2 - sd/source/ui/func/bulmaper.cxx| 20 +- sd/source/ui/func/fuolbull.cxx|2 - sd/source/ui/func/fupage.cxx | 16 sd/source/ui/view/drtxtob1.cxx|4 +- sd/source/ui/view/drviews3.cxx|2 - sd/source/ui/view/viewshel.cxx|2 - sfx2/source/appl/appuno.cxx | 16 sfx2/source/control/ctrlitem.cxx |2 - sfx2/source/control/dispatch.cxx |4 +- sfx2/source/control/msg.cxx |2 - sfx2/source/control/request.cxx |2 - sfx2/source/control/unoctitm.cxx |2 - sfx2/source/dialog/tabdlg.cxx | 10 ++--- svl/source/items/itempool.cxx |8 ++-- svl/source/items/itemset.cxx |2 - svx/source/dialog/cuicharmap.cxx |2 - svx/source/dialog/fntctrl.cxx |2 - svx/source/dialog/srchdlg.cxx |8 ++-- svx/source/form/fmtextcontrolshell.cxx|6 +-- svx/source/sidebar/nbdtmg.cxx |4 +- svx/source/sidebar/text/TextCharacterSpacingControl.cxx |2 - svx/source/styles/CommonStylePreviewRenderer.cxx |2 - svx/source/tbxctrls/linewidthctrl.cxx |2 - svx/source/tbxctrls/tbcontrl.cxx |2 - svx/source/unodraw/unopool.cxx| 10 ++--- sw/source/core/doc/docfmt.cxx |2 - sw/source/core/draw/drawdoc.cxx |2 - sw/source/core/edit/acorrect.cxx |2 - sw/source/filter/html/svxcss1.cxx |2 - sw/source/filter/ww8/writerhelper.cxx |2 - sw/source/filter/ww8/wrtw8esh.cxx |4 +- sw/source/filter/ww8/ww8graf.cxx |4 +- sw/source/ui/misc/pgfnote.cxx | 10 ++--- sw/source/ui/misc/pggrid.cxx |4 +- sw/source/uibase/app/docst.cxx|2 - sw/source/uibase/app/docstyle.cxx |2 - sw/source/uibase/docvw/PageBreakWin.cxx |4 +- sw/source/uibase/frmdlg/colex.cxx
core.git: cui/source
cui/source/options/treeopt.cxx |7 --- 1 file changed, 7 deletions(-) New commits: commit 263e431f76447c6933343a4a07c9ed6d193af867 Author: Rafael Lima AuthorDate: Thu Feb 1 13:04:20 2024 +0100 Commit: Julien Nabet CommitDate: Mon Feb 5 18:50:58 2024 +0100 tdf#159476 Remove experimental status from Basic IDE entry in Options dialog Change-Id: Icbc9d131d90e639490f6dfd896565c994a17b172 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162829 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 7d0ae590b49b..2c8abb9cfa5e 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1757,13 +1757,6 @@ void OfaTreeOptionsDialog::generalOptions(const std::vector& vPageId continue; } -// Disable Basic IDE options, if experimental features are not enabled -if( RID_SVXPAGE_BASICIDE_OPTIONS == nPageId ) -{ -if( ! officecfg::Office::Common::Misc::ExperimentalMode::get() ) -continue; -} - if (!vPageId.empty()) { if (std::find(vPageId.begin(), vPageId.end(), nPageId) != vPageId.end())
core.git: cui/source sw/source
cui/source/inc/treeopt.hxx |2 ++ cui/source/options/treeopt.cxx |8 +++- sw/source/ui/fldui/fldedt.cxx |7 ++- sw/source/uibase/inc/fldedt.hxx |3 +++ 4 files changed, 18 insertions(+), 2 deletions(-) New commits: commit 3c033146b1ef61676de8379c56ea538b1cbdf826 Author: Caolán McNamara AuthorDate: Sat Feb 3 07:38:34 2024 + Commit: Caolán McNamara CommitDate: Sun Feb 4 08:50:56 2024 +0100 cid#1455212 Uncaught exception and cid#1401342 Uncaught exception Change-Id: I77c2303ceb25301d85bfc9f8f6dc9eb8f4c4494a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162945 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx index 307c70f9edd5..6d07d0981d5a 100644 --- a/cui/source/inc/treeopt.hxx +++ b/cui/source/inc/treeopt.hxx @@ -210,6 +210,8 @@ private: int applySearchFilter(const OUString& rSearchTerm); +void ImplDestroy(); + // Common initialization OfaTreeOptionsDialog(weld::Window* pParent, bool fromExtensionManager); diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 8bfbde910e10..7d0ae590b49b 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -86,6 +86,7 @@ #include #include #include +#include #include #include #include @@ -526,7 +527,7 @@ OfaTreeOptionsDialog::OfaTreeOptionsDialog(weld::Window* pParent, std::u16string ActivateLastSelection(); } -OfaTreeOptionsDialog::~OfaTreeOptionsDialog() +void OfaTreeOptionsDialog::ImplDestroy() { xCurrentPageEntry.reset(); @@ -582,6 +583,11 @@ OfaTreeOptionsDialog::~OfaTreeOptionsDialog() deleteGroupNames(); } +OfaTreeOptionsDialog::~OfaTreeOptionsDialog() +{ +suppress_fun_call_w_exception(ImplDestroy()); +} + OptionsPageInfo* OfaTreeOptionsDialog::AddTabPage( sal_uInt16 nId, const OUString& rPageName, sal_uInt16 nGroup ) { diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index cfa614b712ab..94273c93dcae 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -222,12 +222,17 @@ SfxTabPage* SwFieldEditDlg::CreatePage(sal_uInt16 nGroup) return GetTabPage(); } -SwFieldEditDlg::~SwFieldEditDlg() +void SwFieldEditDlg::ImplDestroy() { SwViewShell::SetCareDialog(nullptr); m_pSh->EnterStdMode(); } +SwFieldEditDlg::~SwFieldEditDlg() +{ +suppress_fun_call_w_exception(ImplDestroy()); +} + void SwFieldEditDlg::EnableInsert(bool bEnable) { if( bEnable && m_pSh->IsReadOnlyAvailable() && m_pSh->HasReadonlySel() ) diff --git a/sw/source/uibase/inc/fldedt.hxx b/sw/source/uibase/inc/fldedt.hxx index 635065580985..2c465aefad0a 100644 --- a/sw/source/uibase/inc/fldedt.hxx +++ b/sw/source/uibase/inc/fldedt.hxx @@ -41,6 +41,9 @@ class SwFieldEditDlg final : public SfxSingleTabDialogController SfxTabPage* CreatePage(sal_uInt16 nGroup); void EnsureSelection(SwField *pCurField, SwFieldMgr ); + +void ImplDestroy(); + public: SwFieldEditDlg(SwView const & rVw);
core.git: cui/source
cui/source/dialogs/tipofthedaydlg.cxx | 28 ++-- cui/source/inc/tipofthedaydlg.hxx |2 +- 2 files changed, 11 insertions(+), 19 deletions(-) New commits: commit b01a9f8c9da419969575d0dc20e7346306ae96d3 Author: Caolán McNamara AuthorDate: Tue Jan 30 11:40:01 2024 + Commit: Caolán McNamara CommitDate: Tue Jan 30 20:51:15 2024 +0100 tdf#151352 keep a reference to the parent and use that in the dtor instead of a pointer. FWIW the XWindow isn't actually a vcl::Window in the Gtk case, so VCLUnoHelper::GetWindow doesn't do anything there. But using an XWindow gives a safe view wrt life cycle. Change-Id: I4d0fd707ea931a76d6f87f434f7ece8df066785c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162744 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/dialogs/tipofthedaydlg.cxx b/cui/source/dialogs/tipofthedaydlg.cxx index f1cb7afc2c1f..bbb26a054be9 100644 --- a/cui/source/dialogs/tipofthedaydlg.cxx +++ b/cui/source/dialogs/tipofthedaydlg.cxx @@ -50,7 +50,7 @@ const Size ThumbSize(150, 150); TipOfTheDayDialog::TipOfTheDayDialog(weld::Window* pParent) : GenericDialogController(pParent, "cui/ui/tipofthedaydialog.ui", "TipOfTheDayDialog") -, m_pParent(pParent) +, m_xParent(pParent ? pParent->GetXWindow() : nullptr) , m_pText(m_xBuilder->weld_label("lbText")) , m_pShowTip(m_xBuilder->weld_check_button("cbShowTip")) , m_pNext(m_xBuilder->weld_button("btnNext")) @@ -62,15 +62,11 @@ TipOfTheDayDialog::TipOfTheDayDialog(weld::Window* pParent) m_nCurrentTip = officecfg::Office::Common::Misc::LastTipOfTheDayID::get(); m_pPreview->set_size_request(ThumbSize.Width(), ThumbSize.Height()); -if (pParent != nullptr) +if (m_xParent.is()) { -css::uno::Reference xWindow = pParent->GetXWindow(); -if (xWindow.is()) -{ -VclPtr xVclWin(VCLUnoHelper::GetWindow(xWindow)); -if (xVclWin != nullptr) -xVclWin->AddEventListener(LINK(this, TipOfTheDayDialog, Terminated)); -} +VclPtr xVclWin(VCLUnoHelper::GetWindow(m_xParent)); +if (xVclWin != nullptr) +xVclWin->AddEventListener(LINK(this, TipOfTheDayDialog, Terminated)); } const auto t0 = std::chrono::system_clock::now().time_since_epoch(); @@ -94,7 +90,7 @@ IMPL_LINK(TipOfTheDayDialog, Terminated, VclWindowEvent&, rEvent, void) { if (rEvent.GetId() == VclEventId::ObjectDying) { -m_pParent = nullptr; +m_xParent.clear(); TipOfTheDayDialog::response(RET_OK); } } @@ -107,15 +103,11 @@ TipOfTheDayDialog::~TipOfTheDayDialog() officecfg::Office::Common::Misc::ShowTipOfTheDay::set(m_pShowTip->get_active(), xChanges); xChanges->commit(); -if (m_pParent != nullptr) +if (m_xParent.is()) { -css::uno::Reference xWindow = m_pParent->GetXWindow(); -if (xWindow.is()) -{ -VclPtr xVclWin(VCLUnoHelper::GetWindow(xWindow)); -if (xVclWin != nullptr) -xVclWin->RemoveEventListener(LINK(this, TipOfTheDayDialog, Terminated)); -} +VclPtr xVclWin(VCLUnoHelper::GetWindow(m_xParent)); +if (xVclWin != nullptr) +xVclWin->RemoveEventListener(LINK(this, TipOfTheDayDialog, Terminated)); } } diff --git a/cui/source/inc/tipofthedaydlg.hxx b/cui/source/inc/tipofthedaydlg.hxx index 69af1996e454..1f86d1bf238c 100644 --- a/cui/source/inc/tipofthedaydlg.hxx +++ b/cui/source/inc/tipofthedaydlg.hxx @@ -27,7 +27,7 @@ class TipOfTheDayDialog : public weld::GenericDialogController { private: CuiGraphicPreviewWindow m_aPreview; -weld::Window* m_pParent; +css::uno::Reference m_xParent; std::unique_ptr m_pText; std::unique_ptr m_pShowTip;
core.git: cui/source cui/uiconfig include/unotools officecfg/registry sw/qa unotools/source xmloff/source
cui/source/inc/securityoptions.hxx |3 cui/source/options/securityoptions.cxx |6 + cui/uiconfig/ui/securityoptionsdialog.ui | 48 ++--- include/unotools/securityoptions.hxx |1 officecfg/registry/schema/org/openoffice/Office/Common.xcs |8 ++ sw/qa/extras/odfexport/odfexport2.cxx | 18 unotools/source/config/securityoptions.cxx |9 ++ xmloff/source/core/SettingsExportHelper.cxx| 10 ++ 8 files changed, 93 insertions(+), 10 deletions(-) New commits: commit ba8911931c18e6a4cc737ffc9f0f415f1ba794d7 Author: Samuel Mehrbrodt AuthorDate: Thu Jan 25 13:01:24 2024 +0100 Commit: Samuel Mehrbrodt CommitDate: Fri Jan 26 07:08:19 2024 +0100 Don't export printer name & config in privacy mode Don't export printer name & printer config when RemovePersonalInfoOnSaving is enabled, as it might contain sensitive data such as printer location. Add an option to export printer settings even when RemovePersonalInfoOnSaving is enabled. Change-Id: I3d2ca91ad2032050c919d382c11c9ceabf331770 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162577 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/cui/source/inc/securityoptions.hxx b/cui/source/inc/securityoptions.hxx index 981c9ac29bf8..a86b4f0c605a 100644 --- a/cui/source/inc/securityoptions.hxx +++ b/cui/source/inc/securityoptions.hxx @@ -53,6 +53,8 @@ namespace svx std::unique_ptr m_xNoteAuthorImg; std::unique_ptr m_xDocumentVersionCB; std::unique_ptr m_xDocumentVersionImg; +std::unique_ptr m_xPrinterSettingsCB; +std::unique_ptr m_xPrinterSettingsImg; public: SecurityOptionsDialog(weld::Window* pParent); @@ -68,6 +70,7 @@ namespace svx bool IsRemoveDocUserInfoChecked() const { return m_xDocPropertiesCB->get_active(); } bool IsRemoveNoteAuthorInfoChecked() const { return m_xNoteAuthorCB->get_active(); } bool IsRemoveDocVersionInfoChecked() const { return m_xDocumentVersionCB->get_active(); } +bool IsKeepPrinterSettingsChecked() const { return m_xPrinterSettingsCB->get_active(); } bool IsRecommPasswdChecked() const { return m_xRecommPasswdCB->get_active(); } bool IsCtrlHyperlinkChecked() const { return m_xCtrlHyperlinkCB->get_active(); } bool IsBlockUntrustedRefererLinksChecked() const { return m_xBlockUntrustedRefererLinksCB->get_active(); } diff --git a/cui/source/options/securityoptions.cxx b/cui/source/options/securityoptions.cxx index f42b0c35dd4b..d99ad64e545e 100644 --- a/cui/source/options/securityoptions.cxx +++ b/cui/source/options/securityoptions.cxx @@ -73,6 +73,8 @@ SecurityOptionsDialog::SecurityOptionsDialog(weld::Window* pParent) , m_xNoteAuthorImg(m_xBuilder->weld_widget("locknoteauthor")) , m_xDocumentVersionCB(m_xBuilder->weld_check_button("documentversion")) , m_xDocumentVersionImg(m_xBuilder->weld_widget("lockdocumentversion")) +, m_xPrinterSettingsCB(m_xBuilder->weld_check_button("printersettings")) +, m_xPrinterSettingsImg(m_xBuilder->weld_widget("lockprintersettings")) { m_xRemovePersInfoCB->connect_toggled(LINK(this, SecurityOptionsDialog, ShowPersonalInfosToggle)); init(); @@ -103,6 +105,8 @@ void SecurityOptionsDialog::init() *m_xNoteAuthorImg); enableAndSet(SvtSecurityOptions::EOption::DocWarnKeepDocVersionInfo, *m_xDocumentVersionCB, *m_xDocumentVersionImg); +enableAndSet(SvtSecurityOptions::EOption::DocKeepPrinterSettings, *m_xPrinterSettingsCB, +*m_xPrinterSettingsImg); enableAndSet(SvtSecurityOptions::EOption::DocWarnRecommendPassword, *m_xRecommPasswdCB, *m_xRecommPasswdImg); enableAndSet(SvtSecurityOptions::EOption::CtrlClickHyperlink, *m_xCtrlHyperlinkCB, @@ -128,6 +132,7 @@ bool SecurityOptionsDialog::SetSecurityOptions() CheckAndSave(SvtSecurityOptions::EOption::DocWarnKeepDocUserInfo, IsRemoveDocUserInfoChecked(), bModified); CheckAndSave(SvtSecurityOptions::EOption::DocWarnKeepNoteAuthorDateInfo, IsRemoveNoteAuthorInfoChecked(), bModified); CheckAndSave(SvtSecurityOptions::EOption::DocWarnKeepDocVersionInfo, IsRemoveDocVersionInfoChecked(), bModified); +CheckAndSave(SvtSecurityOptions::EOption::DocKeepPrinterSettings, IsKeepPrinterSettingsChecked(), bModified); CheckAndSave(SvtSecurityOptions::EOption::DocWarnRecommendPassword, IsRecommPasswdChecked(), bModified); CheckAndSave(SvtSecurityOptions::EOption::CtrlClickHyperlink, IsCtrlHyperlinkChecked(), bModified); CheckAndSave(SvtSecurityOptions::EOption::BlockUntrustedRefererLinks, IsBlockUntrustedRefererLinksChecked(), bModified); @@ -143,6 +148,7 @@ void SecurityOptionsDialog::changeKeepSecurityInfosEnabled() m_xDocPropertiesCB->set_sensitive(bEnable);
core.git: cui/source sd/source sw/source
cui/source/dialogs/insrc.cxx | 19 +- cui/source/factory/dlgfact.cxx|2 - cui/source/inc/insrc.hxx | 17 - sd/source/ui/table/tableobjectbar.cxx | 62 +++--- sw/source/uibase/shells/tabsh.cxx | 33 +++--- 5 files changed, 90 insertions(+), 43 deletions(-) New commits: commit e5d6133283bacb6bced8cdbedaeae6b3bd2f179e Author: Noel Grandin AuthorDate: Thu Jan 25 10:19:00 2024 +0200 Commit: Noel Grandin CommitDate: Thu Jan 25 10:33:21 2024 +0100 make insert row dialog async Change-Id: Icb6c2fafe2b47989ff2692956890c87780b117e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162552 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/cui/source/dialogs/insrc.cxx b/cui/source/dialogs/insrc.cxx index 1ff1a14411cb..6c09c8ce4560 100644 --- a/cui/source/dialogs/insrc.cxx +++ b/cui/source/dialogs/insrc.cxx @@ -51,9 +51,24 @@ SvxInsRowColDlg::SvxInsRowColDlg(weld::Window* pParent, bool bColumn, const OUSt m_xDialog->set_help_id(rHelpId); } -short SvxInsRowColDlg::Execute() +short SvxAbstractInsRowColDlg_Impl::Execute() { -return run(); +return m_xDlg->run(); +} + +bool SvxAbstractInsRowColDlg_Impl::StartExecuteAsync(AsyncContext ) +{ +return weld::GenericDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn); +} + +bool SvxAbstractInsRowColDlg_Impl::isInsertBefore() const +{ +return m_xDlg->isInsertBefore(); +} + +sal_uInt16 SvxAbstractInsRowColDlg_Impl::getInsertCount() const +{ +return m_xDlg->getInsertCount(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 6979167de569..2392fa46edc6 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -1475,7 +1475,7 @@ VclPtr AbstractDialogFactory_Impl::CreateOptionsDialog(weld:: VclPtr AbstractDialogFactory_Impl::CreateSvxInsRowColDlg(weld::Window* pParent, bool bCol, const OUString& rHelpId) { -return VclPtr::Create(pParent, bCol, rHelpId); +return VclPtr::Create(std::make_shared(pParent, bCol, rHelpId)); } VclPtr AbstractDialogFactory_Impl::CreatePasswordToOpenModifyDialog( diff --git a/cui/source/inc/insrc.hxx b/cui/source/inc/insrc.hxx index 597ef172c3e9..9ab7f0fed466 100644 --- a/cui/source/inc/insrc.hxx +++ b/cui/source/inc/insrc.hxx @@ -22,7 +22,7 @@ #include #include -class SvxInsRowColDlg : public SvxAbstractInsRowColDlg, public weld::GenericDialogController +class SvxInsRowColDlg : public weld::GenericDialogController { private: std::unique_ptr m_xCountEdit; @@ -32,8 +32,21 @@ private: public: SvxInsRowColDlg(weld::Window* pParent, bool bCol, const OUString& rHelpId); -virtual short Execute() override; +bool isInsertBefore() const; +sal_uInt16 getInsertCount() const; +}; + +class SvxAbstractInsRowColDlg_Impl final : public SvxAbstractInsRowColDlg +{ +std::shared_ptr m_xDlg; +public: +explicit SvxAbstractInsRowColDlg_Impl(std::shared_ptr p) +: m_xDlg(std::move(p)) +{ +} +virtual short Execute() override; +virtual bool StartExecuteAsync(AsyncContext& rCtx) override; virtual bool isInsertBefore() const override; virtual sal_uInt16 getInsertCount() const override; }; diff --git a/sd/source/ui/table/tableobjectbar.cxx b/sd/source/ui/table/tableobjectbar.cxx index 6dfd86928530..bd19915692e8 100644 --- a/sd/source/ui/table/tableobjectbar.cxx +++ b/sd/source/ui/table/tableobjectbar.cxx @@ -122,40 +122,50 @@ void TableObjectBar::Execute( SfxRequest& rReq ) switch( nSlotId ) { case SID_TABLE_INSERT_ROW_DLG: +case SID_TABLE_INSERT_COL_DLG: +{ +auto xRequest = std::make_shared(rReq); +rReq.Ignore(); // the 'old' request is not relevant any more +SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); +vcl::Window* pWin = mpView->GetViewShell()->GetParentWindow(); +VclPtr pDlg( pFact->CreateSvxInsRowColDlg(pWin ? pWin->GetFrameWeld() : nullptr, + nSlotId == SID_TABLE_INSERT_COL_DLG, + SD_MOD()->GetSlotPool()->GetSlot(nSlotId)->GetCommand()) ); +pDlg->StartExecuteAsync( +[pDlg, xRequest, nSlotId, xController, pBindings] (sal_Int32 nResult) mutable ->void +{ +if (nResult == RET_OK) +{ +sal_uInt16 nCount = pDlg->getInsertCount(); +bool bInsertAfter = !pDlg->isInsertBefore(); + +if (nSlotId == SID_TABLE_INSERT_ROW_DLG) +nSlotId = SID_TABLE_INSERT_ROW; +else +nSlotId = SID_TABLE_INSERT_COL; + +
core.git: cui/source cui/uiconfig editeng/source include/editeng sw/qa sw/source
cui/source/inc/chardlg.hxx|1 cui/source/tabpages/chardlg.cxx | 25 cui/uiconfig/ui/positionpage.ui | 49 editeng/source/items/textitem.cxx | 14 +++- include/editeng/editrids.hrc |1 include/editeng/nhypitem.hxx |4 + sw/qa/uitest/writer_tests2/formatCharacter.py |5 + sw/qa/uitest/writer_tests8/tdf106733.py | 78 ++ sw/source/core/access/AccessibilityCheck.cxx |6 ++ sw/source/core/bastyp/init.cxx|2 sw/source/core/layout/wsfrm.cxx |1 sw/source/core/unocore/unomap.cxx |2 sw/source/core/unocore/unomapproperties.hxx |2 13 files changed, 182 insertions(+), 8 deletions(-) New commits: commit 03c5a31a0f374a90fbc821718c14dc5f8a385adf Author: László Németh AuthorDate: Wed Jan 24 13:25:21 2024 +0100 Commit: László Németh CommitDate: Wed Jan 24 20:57:37 2024 +0100 tdf#106733 sw cui: add CharNoHyphenation checkbox On Position tab of Character formatting dialog window as a new checkbox "Exclude from hyphenation" (UX design by Heiko Tietze). With this, it's possible to disable hyphenation with direct character formatting (e.g. combined with Find All), or using character styles, and setting "Exclude from hyphenation" in them. This feature is conformant to the OpenDocument standard, and unlike the previous locale=None workaround, it keeps spell checking and locale dependent text layout. Note: Clear direct formatting (Ctrl-M) is an alternative way to remove the enabled CharNoHyphenation (e.g. in version 24.2, where this commit won't be back-ported). Follow-up to commit b5e275f47a54bd7fee39dad516a433fde5be872d "tdf#106733 sw: implement CharNoHyphenation". Change-Id: I26823e6ec2a3ca39dcf0f7c051d96e638921c589 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162514 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx index 6d6bf958c2e2..b484c7419b83 100644 --- a/cui/source/inc/chardlg.hxx +++ b/cui/source/inc/chardlg.hxx @@ -269,6 +269,7 @@ private: std::unique_ptr m_xKerningMF; std::unique_ptr m_xPairKerningBtn; +std::unique_ptr m_xNoHyphenationBtn; voidInitialize(); voidUpdatePreview_Impl( sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc ); diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index e851816c1787..86b183fe4160 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -2429,6 +2430,7 @@ SvxCharPositionPage::SvxCharPositionPage(weld::Container* pPage, weld::DialogCon , m_xScaleWidthMF(m_xBuilder->weld_metric_spin_button("scalewidthsb", FieldUnit::PERCENT)) , m_xKerningMF(m_xBuilder->weld_metric_spin_button("kerningsb", FieldUnit::POINT)) , m_xPairKerningBtn(m_xBuilder->weld_check_button("pairkerning")) +, m_xNoHyphenationBtn(m_xBuilder->weld_check_button("nohyphenation")) { m_xPreviewWin.reset(new weld::CustomWeld(*m_xBuilder, "preview", m_aPreviewWin)); #ifdef IOS @@ -2794,6 +2796,16 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet ) else m_xPairKerningBtn->set_active(false); +// No hyphenation +nWhich = GetWhich( sal_uInt16(19) ); // number borrowed from RES_CHRATR_NOHYPHEN +if ( rSet->GetItemState( nWhich ) >= SfxItemState::DEFAULT ) +{ +const SvxNoHyphenItem& rItem = static_cast(rSet->Get( nWhich )); +m_xNoHyphenationBtn->set_active(rItem.GetValue()); +} +else +m_xNoHyphenationBtn->set_active(false); + // Scale Width nWhich = GetWhich( SID_ATTR_CHAR_SCALEWIDTH ); if ( rSet->GetItemState( nWhich ) >= SfxItemState::DEFAULT ) @@ -2874,6 +2886,7 @@ void SvxCharPositionPage::ChangesApplied() m_xScaleWidthMF->save_value(); m_xKerningMF->save_value(); m_xPairKerningBtn->save_state(); +m_xNoHyphenationBtn->save_state(); } bool SvxCharPositionPage::FillItemSet( SfxItemSet* rSet ) @@ -2963,6 +2976,18 @@ bool SvxCharPositionPage::FillItemSet( SfxItemSet* rSet ) else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rSet->InvalidateItem(nWhich); +// No hyphenation + +nWhich = GetWhich( sal_uInt16(19) ); // number borrowed from RES_CHRATR_NOHYPHEN + +if (m_xNoHyphenationBtn->get_state_changed_from_saved()) +{ +rSet->Put( SvxNoHyphenItem( m_xNoHyphenationBtn->get_active(), nWhich ) ); +bModified = true; +} +else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) +rSet->InvalidateItem(nWhich); + // Scale Width nWhich = GetWhich(
core.git: cui/source include/sfx2 include/svx include/vcl sfx2/sdi sfx2/source solenv/clang-format
cui/source/factory/dlgfact.cxx | 11 + cui/source/factory/dlgfact.hxx |8 ++ cui/source/inc/securityoptions.hxx |1 cui/source/options/optinet2.cxx| 39 ++--- cui/source/options/securityoptions.cxx | 31 +- include/sfx2/sfxdlg.hxx|2 + include/sfx2/sfxsids.hrc |1 include/svx/svxdlg.hxx |2 + include/vcl/abstdlg.hxx|8 ++ sfx2/sdi/appslots.sdi |4 +++ sfx2/sdi/sfx.sdi | 17 ++ sfx2/source/appl/appserv.cxx | 14 +++ sfx2/source/view/viewfrm.cxx |3 -- solenv/clang-format/excludelist|2 - 14 files changed, 103 insertions(+), 40 deletions(-) New commits: commit 2c16ea16b305dc546164e28cf6b212ebccc44ec4 Author: Balazs Varga AuthorDate: Mon Jan 22 13:19:26 2024 +0100 Commit: Balazs Varga CommitDate: Wed Jan 24 09:06:39 2024 +0100 tdf#159128 UI: Open Security settings option directly Open Security Option Setting page directly from Security pop up warning infobar. Follow up of 1f440348eb0892fd2c9597806d87b5fe9d60d49a (tdf#157482 UI: Turn Security Warnings popup windows into infobars) Change-Id: Iac116677801bdb13a9680bcfdf532ec3d874ce0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162393 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index b5e852cbb292..6979167de569 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -116,6 +116,7 @@ IMPL_ABSTDLG_CLASS(AbstractScreenshotAnnotationDlg) IMPL_ABSTDLG_CLASS_ASYNC(AbstractSignatureLineDialog, SignatureLineDialog) IMPL_ABSTDLG_CLASS_ASYNC(AbstractSignSignatureLineDialog, SignSignatureLineDialog) IMPL_ABSTDLG_CLASS_ASYNC(AbstractSvxCharacterMapDialog, SvxCharacterMap) +IMPL_ABSTDLG_CLASS(AbstractSecurityOptionsDialog) IMPL_ABSTDLG_CLASS(AbstractSvxHpLinkDlg) IMPL_ABSTDLG_CLASS(AbstractSvxJSearchOptionsDialog) IMPL_ABSTDLG_CLASS(AbstractSvxMultiPathDialog) @@ -874,6 +875,16 @@ VclPtr AbstractDialogFactory_Impl::CreateFrameDialog(weld::Wi return nullptr; } +VclPtr AbstractDialogFactory_Impl::CreateSvxSecurityOptionsDialog(weld::Window* pParent) +{ +return VclPtr::Create(std::make_unique(pParent)); +} + +bool AbstractSecurityOptionsDialog_Impl::SetSecurityOptions() +{ +return m_xDlg->SetSecurityOptions(); +} + // TabDialog outside the drawing layer VclPtr AbstractDialogFactory_Impl::CreateAutoCorrTabDialog(weld::Window* pParent, const SfxItemSet* pAttrSet) { diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index 0125c975ae79..3c8601140164 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -402,6 +403,11 @@ DECL_ABSTDLG_CLASS_SHARED_ASYNC(AbstractSvxCharacterMapDialog,SfxAbstractDialog, DECL_ABSTDLG_CLASS(AbstractScreenshotAnnotationDlg,ScreenshotAnnotationDlg) }; +// AbstractSecurityOptionsDialog_Impl +DECL_ABSTDLG_CLASS(AbstractSecurityOptionsDialog, svx::SecurityOptionsDialog) +virtual bool SetSecurityOptions() override; +}; + // AbstractSignatureLineDialog_Impl DECL_ABSTDLG_CLASS_ASYNC(AbstractSignatureLineDialog,SignatureLineDialog) virtual void Apply() override { m_xDlg->Apply(); } @@ -594,6 +600,8 @@ public: virtual VclPtr CreateScreenshotAnnotationDlg(weld::Dialog& rParentDialog) override; +virtual VclPtr CreateSvxSecurityOptionsDialog(weld::Window* pParent) override; + virtual VclPtr CreateSignatureLineDialog(weld::Window* pParent, const css::uno::Reference xModel, bool bEditExisting) override; diff --git a/cui/source/options/securityoptions.hxx b/cui/source/inc/securityoptions.hxx similarity index 99% rename from cui/source/options/securityoptions.hxx rename to cui/source/inc/securityoptions.hxx index 10534d4426a7..981c9ac29bf8 100644 --- a/cui/source/options/securityoptions.hxx +++ b/cui/source/inc/securityoptions.hxx @@ -75,6 +75,7 @@ namespace svx DECL_LINK(ShowPersonalInfosToggle, weld::Toggleable&, void); +bool SetSecurityOptions(); void changeKeepSecurityInfosEnabled(); }; } diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index de34b031e8ce..eaf0e8616bfd 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include #include @@ -52,7 +51,7 @@ #include #include #include -#include "securityoptions.hxx" +#include #include "webconninfo.hxx" #include "certpath.hxx" #include "tsaurls.hxx" @@ -834,25 +833,6 @@ DeactivateRC SvxSecurityTabPage::DeactivatePage( SfxItemSet*
core.git: cui/source sc/source
cui/source/factory/dlgfact.cxx |7 --- sc/source/ui/view/tabvwshf.cxx | 13 - 2 files changed, 12 insertions(+), 8 deletions(-) New commits: commit 0e161e5dcbfb1be0d9aa347de42c72b3578d1e00 Author: Noel Grandin AuthorDate: Tue Jan 23 16:01:03 2024 +0200 Commit: Noel Grandin CommitDate: Tue Jan 23 18:16:18 2024 +0100 make the macro assign dialog async Change-Id: I6a23f648784f61e72e6095b249719d9c8630252f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162444 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index a856d84c6901..b5e852cbb292 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -1236,17 +1236,18 @@ public: :m_aItems( SfxGetpApp()->GetPool(), svl::Items ) { m_aItems.Put( SfxBoolItem( SID_ATTR_MACROITEM, _bUnoDialogMode ) ); -m_xDlg.reset(new SvxMacroAssignDlg(_pParent, _rxDocumentFrame, m_aItems, _rxEvents, _nInitiallySelectedEvent)); +m_xDlg = std::make_shared(_pParent, _rxDocumentFrame, m_aItems, _rxEvents, _nInitiallySelectedEvent); } virtual short Execute() override; +virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext ) override; private: SfxItemSet m_aItems; -std::unique_ptr m_xDlg; +std::shared_ptr m_xDlg; }; -IMPL_ABSTDLG_CLASS(SvxMacroAssignDialog) +IMPL_ABSTDLG_CLASS_ASYNC(SvxMacroAssignDialog, SvxMacroAssignDlg) } diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index e3ca4fb5418d..a41840d5d97e 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -1038,12 +1038,15 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) uno::Reference xEvents( new ScSheetEventsObj( pDocSh, nCurrentTab ) ); uno::Reference xFrame = GetViewFrame().GetFrame().GetFrameInterface(); SvxAbstractDialogFactory* pDlgFactory = SvxAbstractDialogFactory::Create(); -ScopedVclPtr pDialog( pDlgFactory->CreateSvxMacroAssignDlg( +VclPtr pDialog( pDlgFactory->CreateSvxMacroAssignDlg( GetFrameWeld(), xFrame, false, xEvents, 0 ) ); -if ( pDialog->Execute() == RET_OK ) -{ -// the dialog modifies the settings directly -} +// the dialog modifies the settings directly +pDialog->StartExecuteAsync( +[pDialog] (sal_Int32 /*nResult*/)->void +{ +pDialog->disposeOnce(); +} +); } break; case FID_TOGGLEHIDDENCOLROW:
core.git: cui/source include/vcl sc/source sw/inc sw/source
cui/source/dialogs/SignatureLineDialogBase.cxx |6 ++ cui/source/factory/dlgfact.cxx |2 +- cui/source/factory/dlgfact.hxx |4 +++- cui/source/inc/SignSignatureLineDialog.hxx |3 ++- cui/source/inc/SignatureLineDialog.hxx |4 ++-- cui/source/inc/SignatureLineDialogBase.hxx |1 - include/vcl/abstdlg.hxx|4 sc/source/ui/view/tabvwshb.cxx | 18 +++--- sw/inc/view.hxx|2 +- sw/source/uibase/uiview/viewdlg2.cxx | 20 10 files changed, 46 insertions(+), 18 deletions(-) New commits: commit ea88508c9f23e1594a77c287d5a6c86e6b92d870 Author: Noel Grandin AuthorDate: Mon Jan 22 14:58:54 2024 +0200 Commit: Noel Grandin CommitDate: Tue Jan 23 14:53:46 2024 +0100 make signature line dialog async Change-Id: I64cb2ae5b3748e8034fb0624b56c3d3dfdc31654 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162420 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/cui/source/dialogs/SignatureLineDialogBase.cxx b/cui/source/dialogs/SignatureLineDialogBase.cxx index e0ae28fe5040..fb154c34319d 100644 --- a/cui/source/dialogs/SignatureLineDialogBase.cxx +++ b/cui/source/dialogs/SignatureLineDialogBase.cxx @@ -26,10 +26,8 @@ SignatureLineDialogBase::SignatureLineDialogBase(weld::Widget* pParent, Referenc short SignatureLineDialogBase::run() { -short nRet = GenericDialogController::run(); -if (nRet == RET_OK) -Apply(); -return nRet; +assert(false && "these dialogs are async now"); +return -1; } OUString SignatureLineDialogBase::getCDataString(std::u16string_view rString) diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 3e680e54ba91..a856d84c6901 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -113,7 +113,7 @@ IMPL_ABSTDLG_CLASS(AbstractHangulHanjaConversionDialog) IMPL_ABSTDLG_CLASS(AbstractInsertObjectDialog) IMPL_ABSTDLG_CLASS_ASYNC(AbstractLinksDialog, SvBaseLinksDlg) IMPL_ABSTDLG_CLASS(AbstractScreenshotAnnotationDlg) -IMPL_ABSTDLG_CLASS(AbstractSignatureLineDialog) +IMPL_ABSTDLG_CLASS_ASYNC(AbstractSignatureLineDialog, SignatureLineDialog) IMPL_ABSTDLG_CLASS_ASYNC(AbstractSignSignatureLineDialog, SignSignatureLineDialog) IMPL_ABSTDLG_CLASS_ASYNC(AbstractSvxCharacterMapDialog, SvxCharacterMap) IMPL_ABSTDLG_CLASS(AbstractSvxHpLinkDlg) diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index eccd43980bf0..0125c975ae79 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -403,7 +403,8 @@ DECL_ABSTDLG_CLASS(AbstractScreenshotAnnotationDlg,ScreenshotAnnotationDlg) }; // AbstractSignatureLineDialog_Impl -DECL_ABSTDLG_CLASS(AbstractSignatureLineDialog,SignatureLineDialog) +DECL_ABSTDLG_CLASS_ASYNC(AbstractSignatureLineDialog,SignatureLineDialog) +virtual void Apply() override { m_xDlg->Apply(); } }; // AbstractQrCodeGenDialog_Impl @@ -412,6 +413,7 @@ DECL_ABSTDLG_CLASS_ASYNC(AbstractQrCodeGenDialog,QrCodeGenDialog) // AbstractSignSignatureLineDialog_Impl DECL_ABSTDLG_CLASS_ASYNC(AbstractSignSignatureLineDialog,SignSignatureLineDialog) +virtual void Apply() override { m_xDlg->Apply(); } }; // AbstractAdditionsDialog_Impl diff --git a/cui/source/inc/SignSignatureLineDialog.hxx b/cui/source/inc/SignSignatureLineDialog.hxx index 5abe1969e32c..7c894a16a0b3 100644 --- a/cui/source/inc/SignSignatureLineDialog.hxx +++ b/cui/source/inc/SignSignatureLineDialog.hxx @@ -20,6 +20,8 @@ class SignSignatureLineDialog : public SignatureLineDialogBase public: SignSignatureLineDialog(weld::Widget* pParent, css::uno::Reference xModel); +void Apply(); + private: std::unique_ptr m_xEditName; std::unique_ptr m_xEditComment; @@ -42,7 +44,6 @@ private: void ValidateFields(); css::uno::Reference getSignedGraphic(bool bValid); -virtual void Apply() override; DECL_LINK(clearImage, weld::Button&, void); DECL_LINK(loadImage, weld::Button&, void); diff --git a/cui/source/inc/SignatureLineDialog.hxx b/cui/source/inc/SignatureLineDialog.hxx index 73b093f601a5..e686cb4a4123 100644 --- a/cui/source/inc/SignatureLineDialog.hxx +++ b/cui/source/inc/SignatureLineDialog.hxx @@ -19,6 +19,8 @@ public: SignatureLineDialog(weld::Widget* pParent, css::uno::Reference xModel, bool bEditExisting); +void Apply(); + private: std::unique_ptr m_xEditName; std::unique_ptr m_xEditTitle; @@ -29,8 +31,6 @@ private: css::uno::Reference m_xExistingShapeProperties; OUString m_aSignatureLineId; - -virtual void Apply() override; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/cui/source/inc/SignatureLineDialogBase.hxx b/cui/source/inc/SignatureLineDialogBase.hxx index
core.git: cui/source sc/source svx/source sw/source
cui/source/factory/dlgfact.cxx|2 - cui/source/factory/dlgfact.hxx|2 - sc/source/ui/drawfunc/drawsh.cxx | 51 +- svx/source/dialog/imapwnd.cxx | 22 ++-- sw/source/ui/chrdlg/chardlg.cxx | 19 +++--- sw/source/ui/dialog/macassgn.cxx | 37 +-- sw/source/ui/misc/glossary.cxx| 28 +--- sw/source/uibase/inc/macassgn.hxx |4 +- 8 files changed, 99 insertions(+), 66 deletions(-) New commits: commit f690e8218a74a0f7792407a1d46198883d2528ff Author: Noel Grandin AuthorDate: Tue Jan 23 13:24:29 2024 +0200 Commit: Noel Grandin CommitDate: Tue Jan 23 14:32:25 2024 +0100 make event config dialog async Change-Id: Ibbfbc5024fb2be4906d0c312577310f28dde212d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162434 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 21eb97db09a5..3e680e54ba91 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -141,7 +141,7 @@ IMPL_ABSTDLG_CLASS_ASYNC(AbstractThesaurusDialog,SfxDialogController) IMPL_ABSTDLG_CLASS_ASYNC(CuiAbstractControllerAsync,weld::DialogController) IMPL_ABSTDLG_CLASS_ASYNC(CuiAbstractTabController,SfxTabDialogController) IMPL_ABSTDLG_CLASS(CuiAbstractController) -IMPL_ABSTDLG_CLASS(CuiAbstractSingleTabController) +IMPL_ABSTDLG_CLASS_ASYNC(CuiAbstractSingleTabController, SfxSingleTabDialogController) IMPL_ABSTDLG_CLASS_ASYNC(CuiAbstractWidgetTestControllerAsync,weld::GenericDialogController) short AbstractHyphenWordDialog_Impl::Execute() diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index ebb5f85a6b4e..eccd43980bf0 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -114,7 +114,7 @@ DECL_ABSTDLG_CLASS_SHARED_ASYNC(CuiAbstractWidgetTestControllerAsync, VclAbstrac }; // CuiAbstractSingleTabController_Impl -DECL_ABSTDLG_CLASS_UNIQUE(CuiAbstractSingleTabController, SfxAbstractDialog, SfxSingleTabDialogController) +DECL_ABSTDLG_CLASS_SHARED_ASYNC(CuiAbstractSingleTabController, SfxAbstractDialog, SfxSingleTabDialogController) virtual const SfxItemSet* GetOutputItemSet() const override; //From class Window. virtual void SetText( const OUString& rStr ) override; diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx index 21e6cb736b7a..43ef902ddd6b 100644 --- a/sc/source/ui/drawfunc/drawsh.cxx +++ b/sc/source/ui/drawfunc/drawsh.cxx @@ -441,32 +441,39 @@ void ScDrawShell::ExecuteMacroAssign(SdrObject* pObj, weld::Window* pWin) xFrame = GetViewShell()->GetViewFrame().GetFrame().GetFrameInterface(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); -ScopedVclPtr pMacroDlg(pFact->CreateEventConfigDialog( pWin, aItemSet, xFrame )); -if ( pMacroDlg->Execute() != RET_OK ) -return; +VclPtr pMacroDlg(pFact->CreateEventConfigDialog( pWin, aItemSet, xFrame )); +pMacroDlg->StartExecuteAsync( +[this, pMacroDlg, pObj, pInfo] (sal_Int32 nResult) mutable -> void +{ +ScopedVclPtr pDlgDisposer(std::move(pMacroDlg)); +if (nResult != RET_OK) +return; -const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet(); -const SvxMacroItem* pItem = pOutSet->GetItemIfSet( SID_ATTR_MACROITEM, false ); -if( !pItem ) -return; +const SfxItemSet* pOutSet = pDlgDisposer->GetOutputItemSet(); +const SvxMacroItem* pItem = pOutSet->GetItemIfSet( SID_ATTR_MACROITEM, false ); +if( !pItem ) +return; -OUString sMacro; -const SvxMacro* pMacro = pItem->GetMacroTable().Get( SvMacroItemId::OnClick ); -if ( pMacro ) -sMacro = pMacro->GetMacName(); +OUString sMacro; +const SvxMacro* pMacro = pItem->GetMacroTable().Get( SvMacroItemId::OnClick ); +if ( pMacro ) +sMacro = pMacro->GetMacName(); -if ( pObj->IsGroupObject() ) -{ -SdrObjList* pOL = pObj->GetSubList(); -for (const rtl::Reference& pChildObj : *pOL) -{ -pInfo = ScDrawLayer::GetMacroInfo( pChildObj.get(), true ); -pInfo->SetMacro( sMacro ); +if ( pObj->IsGroupObject() ) +{ +SdrObjList* pOL = pObj->GetSubList(); +for (const rtl::Reference& pChildObj : *pOL) +{ +pInfo = ScDrawLayer::GetMacroInfo( pChildObj.get(), true ); +pInfo->SetMacro( sMacro ); +} +} +else +pInfo->SetMacro( sMacro ); +setModified(); } -} -else -pInfo->SetMacro( sMacro ); -setModified(); +); + } void ScDrawShell::ExecuteLineDlg( const SfxRequest& rReq )
core.git: cui/source include/svx sc/source sd/source svx/source sw/source
cui/source/factory/dlgfact.cxx |2 cui/source/factory/dlgfact.hxx |2 include/svx/grfflt.hxx |8 sc/source/ui/drawfunc/graphsh.cxx | 31 +- sd/source/ui/view/GraphicObjectBar.cxx | 36 +-- svx/source/dialog/grfflt.cxx | 383 + sw/source/uibase/shells/grfsh.cxx | 11 7 files changed, 242 insertions(+), 231 deletions(-) New commits: commit 07b26af18d45ad7ecacc30c2c4cb2c23033e9f2d Author: Noel Grandin AuthorDate: Mon Jan 22 16:01:03 2024 +0200 Commit: Noel Grandin CommitDate: Tue Jan 23 13:38:40 2024 +0100 make the graphic filter dialogs async Change-Id: I49a1ff800c6b5fcee69e160158a089659d288bdc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162422 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index f30ba3115851..21eb97db09a5 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -108,7 +108,7 @@ IMPL_ABSTDLG_CLASS(AbstractFmInputRecordNoDialog) IMPL_ABSTDLG_CLASS(AbstractFmSearchDialog) IMPL_ABSTDLG_CLASS(AbstractFmShowColsDialog) IMPL_ABSTDLG_CLASS(AbstractGalleryIdDialog) -IMPL_ABSTDLG_CLASS(AbstractGraphicFilterDialog) +IMPL_ABSTDLG_CLASS_ASYNC(AbstractGraphicFilterDialog, GraphicFilterDialog) IMPL_ABSTDLG_CLASS(AbstractHangulHanjaConversionDialog) IMPL_ABSTDLG_CLASS(AbstractInsertObjectDialog) IMPL_ABSTDLG_CLASS_ASYNC(AbstractLinksDialog, SvBaseLinksDlg) diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index c2fc4ebf3a4f..ebb5f85a6b4e 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -329,7 +329,7 @@ DECL_ABSTDLG_CLASS(AbstractFmSearchDialog,FmSearchDialog) }; // AbstractGraphicFilterDialog_Impl -DECL_ABSTDLG_CLASS(AbstractGraphicFilterDialog,GraphicFilterDialog) +DECL_ABSTDLG_CLASS_ASYNC(AbstractGraphicFilterDialog,GraphicFilterDialog) virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) override; }; diff --git a/include/svx/grfflt.hxx b/include/svx/grfflt.hxx index 7c24bcd38c92..731ef94bcdcb 100644 --- a/include/svx/grfflt.hxx +++ b/include/svx/grfflt.hxx @@ -22,10 +22,6 @@ #include -enum class SvxGraphicFilterResult { -NONE, UnsupportedGraphicType, UnsupportedSlot -}; - class GraphicObject; class SfxRequest; class SfxItemSet; @@ -34,7 +30,9 @@ class SVX_DLLPUBLIC SvxGraphicFilter { public: -static SvxGraphicFilterResult ExecuteGrfFilterSlot( SfxRequest const & rReq, GraphicObject& rFilterObject ); +/// this will execute a dialog and then call function f with the output of the filtering operation +static void ExecuteGrfFilterSlot( SfxRequest const & rReq, const GraphicObject& rInputObject, +std::function f); static void DisableGraphicFilterSlots( SfxItemSet& rSet ); }; diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx index 9252dffa7695..c383d6e42620 100644 --- a/sc/source/ui/drawfunc/graphsh.cxx +++ b/sc/source/ui/drawfunc/graphsh.cxx @@ -111,27 +111,22 @@ void ScGraphicShell::ExecuteFilter( const SfxRequest& rReq ) if( auto pGraphicObj = dynamic_cast( pObj) ) if( pGraphicObj->GetGraphicType() == GraphicType::Bitmap ) { -GraphicObject aFilterObj( pGraphicObj->GetGraphicObject() ); - -if( SvxGraphicFilterResult::NONE == -SvxGraphicFilter::ExecuteGrfFilterSlot( rReq, aFilterObj ) ) -{ -SdrPageView* pPageView = pView->GetSdrPageView(); - -if( pPageView ) +SvxGraphicFilter::ExecuteGrfFilterSlot( rReq, pGraphicObj->GetGraphicObject(), +[this, pView, pGraphicObj, pObj] (GraphicObject aFilterObj) -> void { -rtl::Reference pFilteredObj = SdrObject::Clone(*pGraphicObj, pGraphicObj->getSdrModelFromSdrObject()); -OUStringaStr = pView->GetDescriptionOfMarkedObjects() + " " + ScResId(SCSTR_UNDO_GRAFFILTER); -pView->BegUndo( aStr ); -pFilteredObj->SetGraphicObject( aFilterObj ); -pView->ReplaceObjectAtView( pObj, *pPageView, pFilteredObj.get() ); -pView->EndUndo(); -} -} +if( SdrPageView* pPageView = pView->GetSdrPageView() ) +{ +rtl::Reference pFilteredObj = SdrObject::Clone(*pGraphicObj, pGraphicObj->getSdrModelFromSdrObject()); +OUString aStr = pView->GetDescriptionOfMarkedObjects() + " " + ScResId(SCSTR_UNDO_GRAFFILTER); +pView->BegUndo( aStr ); +pFilteredObj->SetGraphicObject( aFilterObj );
core.git: cui/source sc/source sd/source sw/source
cui/source/factory/dlgfact.cxx |2 +- cui/source/factory/dlgfact.hxx |2 +- sc/source/ui/view/tabvwshb.cxx | 18 -- sd/source/ui/func/fulink.cxx| 12 +--- sw/source/uibase/shells/textfld.cxx |9 +++-- sw/source/uibase/uiview/view2.cxx |9 +++-- 6 files changed, 37 insertions(+), 15 deletions(-) New commits: commit 6cece4bf4147fb1cedd7011b3487fd64ff6dbeba Author: Noel Grandin AuthorDate: Mon Jan 22 15:06:54 2024 +0200 Commit: Noel Grandin CommitDate: Tue Jan 23 12:58:42 2024 +0100 make links dialog async Change-Id: I067d682ade01671d7aa347a492929ae4f92064b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162421 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 42c9d35e8a47..f30ba3115851 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -111,7 +111,7 @@ IMPL_ABSTDLG_CLASS(AbstractGalleryIdDialog) IMPL_ABSTDLG_CLASS(AbstractGraphicFilterDialog) IMPL_ABSTDLG_CLASS(AbstractHangulHanjaConversionDialog) IMPL_ABSTDLG_CLASS(AbstractInsertObjectDialog) -IMPL_ABSTDLG_CLASS(AbstractLinksDialog) +IMPL_ABSTDLG_CLASS_ASYNC(AbstractLinksDialog, SvBaseLinksDlg) IMPL_ABSTDLG_CLASS(AbstractScreenshotAnnotationDlg) IMPL_ABSTDLG_CLASS(AbstractSignatureLineDialog) IMPL_ABSTDLG_CLASS_ASYNC(AbstractSignSignatureLineDialog, SignSignatureLineDialog) diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index be1af746c182..c2fc4ebf3a4f 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -360,7 +360,7 @@ DECL_ABSTDLG_CLASS_SHARED_ASYNC(AbstractPasteDialog,SfxAbstractPasteDialog,SvPas }; // AbstractLinksDialog_Impl -DECL_ABSTDLG_CLASS_UNIQUE(AbstractLinksDialog,SfxAbstractLinksDialog,SvBaseLinksDlg) +DECL_ABSTDLG_CLASS_SHARED_ASYNC(AbstractLinksDialog,SfxAbstractLinksDialog,SvBaseLinksDlg) }; // AbstractSvxPostItDialog_Impl diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index 683ca26afca2..1db954039a36 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -365,7 +365,6 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq) MakeDrawLayer(); -SfxBindings& rBindings = GetViewFrame().GetBindings(); ScTabView* pTabView = GetViewData().GetView(); vcl::Window* pWin = pTabView->GetActiveWin(); ScDrawView* pView = pTabView->GetScDrawView(); @@ -505,11 +504,18 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq) break; } -ScopedVclPtr pDlg(pFact->CreateLinksDialog(pWin->GetFrameWeld(), rDoc.GetLinkManager())); -pDlg->Execute(); -rBindings.Invalidate( nSlot ); -SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) ); // Navigator -rReq.Done(); +VclPtr pDlg(pFact->CreateLinksDialog(pWin->GetFrameWeld(), rDoc.GetLinkManager())); +auto xRequest = std::make_shared(rReq); +rReq.Ignore(); // the 'old' request is not relevant any more +pDlg->StartExecuteAsync( +[this, pDlg, xRequest] (sal_Int32 /*nResult*/)->void +{ +GetViewFrame().GetBindings().Invalidate( SID_LINKS ); +SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) ); // Navigator +pDlg->disposeOnce(); +xRequest->Done(); +} +); } break; diff --git a/sd/source/ui/func/fulink.cxx b/sd/source/ui/func/fulink.cxx index 32b3b70ad880..4ad4d2feaaf5 100644 --- a/sd/source/ui/func/fulink.cxx +++ b/sd/source/ui/func/fulink.cxx @@ -68,9 +68,15 @@ void FuLink::DoExecute( SfxRequest& ) sfx2::LinkManager* pLinkManager = mpDoc->GetLinkManager(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); -ScopedVclPtr pDlg(pFact->CreateLinksDialog(mpViewShell->GetFrameWeld(), pLinkManager)); -pDlg->Execute(); -mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_MANAGE_LINKS ); +VclPtr pDlg(pFact->CreateLinksDialog(mpViewShell->GetFrameWeld(), pLinkManager)); +auto pViewShell = mpViewShell; +pDlg->StartExecuteAsync( +[pDlg, pViewShell] (sal_Int32 /*nResult*/)->void +{ +pViewShell->GetViewFrame()->GetBindings().Invalidate( SID_MANAGE_LINKS ); +pDlg->disposeOnce(); +} +); } } // end of namespace sd diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx index 68561d8b8ded..ac28d14bd079 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -151,8 +151,13 @@ void SwTextShell::ExecField(SfxRequest )
core.git: cui/source cui/uiconfig include/svtools officecfg/registry sc/source svtools/source
cui/source/options/optcolor.cxx|1 cui/uiconfig/ui/colorconfigwin.ui | 97 +++-- include/svtools/colorcfg.hxx |1 officecfg/registry/data/org/openoffice/Office/UI.xcu |5 officecfg/registry/schema/org/openoffice/Office/UI.xcs | 10 + sc/source/ui/view/gridwin.cxx |6 - sc/source/ui/view/hdrcont.cxx |6 - sc/source/ui/view/tabvwsh4.cxx | 44 +-- svtools/source/config/colorcfg.cxx |6 + 9 files changed, 131 insertions(+), 45 deletions(-) New commits: commit 4377341dd287b863573bb40ed77e2e2caa92b358 Author: Sahil AuthorDate: Mon Jan 15 08:02:38 2024 +0530 Commit: Heiko Tietze CommitDate: Tue Jan 23 11:27:43 2024 +0100 tdf#158891 Make cell cursor more accessible for color blind * Add an option to configure the accent color, which is blue by default might not be visible to color blind people. Change-Id: I72cbb0f57e864407a7c9315b5c46645a891d4764 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162055 Tested-by: Heiko Tietze Reviewed-by: Heiko Tietze Tested-by: Jenkins diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index 7bb8b2f44ea5..d2c94669fa9f 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -132,6 +132,7 @@ const vEntryInfo[] = { Group_Html,IDS(unknown), std::u16string_view(u"/HTMLUnknown") }, { Group_Calc,IDS(calcgrid), std::u16string_view(u"/CalcGrid") }, +{ Group_Calc,IDS(calccellfocus), std::u16string_view(u"/CalcCellFocus") }, { Group_Calc,IDS(brk), std::u16string_view(u"/CalcPageBreak") }, { Group_Calc,IDS(brkmanual), std::u16string_view(u"/CalcPageBreakManual") }, { Group_Calc,IDS(brkauto), std::u16string_view(u"/CalcPageBreakAutomatic") }, diff --git a/cui/uiconfig/ui/colorconfigwin.ui b/cui/uiconfig/ui/colorconfigwin.ui index bc5603ef6651..d81a14520b66 100644 --- a/cui/uiconfig/ui/colorconfigwin.ui +++ b/cui/uiconfig/ui/colorconfigwin.ui @@ -847,7 +847,7 @@ 0 none - + True False @@ -901,7 +901,7 @@ 0 -1 +2 @@ -919,7 +919,7 @@ 1 -1 +2 @@ -934,7 +934,7 @@ 0 -2 +3 @@ -952,7 +952,7 @@ 1 -2 +3 @@ -967,7 +967,7 @@ 0 -3 +4 @@ -985,7 +985,7 @@ 1 -3 +4 @@ -1000,7 +1000,7 @@ 0 -7 +8 @@ -1018,7 +1018,7 @@ 1 -7 +8 @@ -1036,7 +1036,7 @@ 1 -8 +9 @@ -1051,7 +1051,7 @@ 0 -8 +9 @@ -1069,7 +1069,7 @@ 1 -9 +10 @@ -1084,7 +1084,7 @@ 0 -9 +10 @@ -1102,7 +1102,7 @@ 1 -10 +11 @@ -1117,7 +1117,7 @@ 0 -10 +11 @@ -1135,7 +1135,7 @@ 1 -11 +12 @@ -1150,7 +1150,7 @@ 0 -11 +12 @@ -1168,7 +1168,7 @@ 1 -12 +13 @@ -1183,7 +1183,7 @@
core.git: cui/source sc/source sw/source
cui/source/factory/dlgfact.cxx |2 +- cui/source/factory/dlgfact.hxx |2 +- sc/source/ui/view/tabvwshb.cxx |9 +++-- sw/source/uibase/uiview/viewdlg2.cxx |9 +++-- 4 files changed, 16 insertions(+), 6 deletions(-) New commits: commit eb6634fdda76f6bc2909b01770f4ebe28873e7af Author: Noel Grandin AuthorDate: Mon Jan 22 14:55:46 2024 +0200 Commit: Noel Grandin CommitDate: Tue Jan 23 07:17:59 2024 +0100 make sign signatures dialog async Change-Id: I7c088b1450050720a28fbc7ccf139b8c69f1cf19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162419 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 30bdef345ff7..42c9d35e8a47 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -114,7 +114,7 @@ IMPL_ABSTDLG_CLASS(AbstractInsertObjectDialog) IMPL_ABSTDLG_CLASS(AbstractLinksDialog) IMPL_ABSTDLG_CLASS(AbstractScreenshotAnnotationDlg) IMPL_ABSTDLG_CLASS(AbstractSignatureLineDialog) -IMPL_ABSTDLG_CLASS(AbstractSignSignatureLineDialog) +IMPL_ABSTDLG_CLASS_ASYNC(AbstractSignSignatureLineDialog, SignSignatureLineDialog) IMPL_ABSTDLG_CLASS_ASYNC(AbstractSvxCharacterMapDialog, SvxCharacterMap) IMPL_ABSTDLG_CLASS(AbstractSvxHpLinkDlg) IMPL_ABSTDLG_CLASS(AbstractSvxJSearchOptionsDialog) diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index 29b28ed8cab1..be1af746c182 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -411,7 +411,7 @@ DECL_ABSTDLG_CLASS_ASYNC(AbstractQrCodeGenDialog,QrCodeGenDialog) }; // AbstractSignSignatureLineDialog_Impl -DECL_ABSTDLG_CLASS(AbstractSignSignatureLineDialog,SignSignatureLineDialog) +DECL_ABSTDLG_CLASS_ASYNC(AbstractSignSignatureLineDialog,SignSignatureLineDialog) }; // AbstractAdditionsDialog_Impl diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index b727afae9c1c..683ca26afca2 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -415,9 +415,14 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq) GetViewData().GetDocShell()->GetBaseModel()); VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create(); -ScopedVclPtr pDialog( +VclPtr pDialog( pFact->CreateSignSignatureLineDialog(GetFrameWeld(), xModel)); -pDialog->Execute(); +pDialog->StartExecuteAsync( +[pDialog] (sal_Int32 /*nResult*/)->void +{ +pDialog->disposeOnce(); +} +); break; } diff --git a/sw/source/uibase/uiview/viewdlg2.cxx b/sw/source/uibase/uiview/viewdlg2.cxx index a79b224ddbfd..38cdb7ecac54 100644 --- a/sw/source/uibase/uiview/viewdlg2.cxx +++ b/sw/source/uibase/uiview/viewdlg2.cxx @@ -105,9 +105,14 @@ void SwView::ExecDlgExt(SfxRequest const& rReq) { VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create(); const uno::Reference xModel(GetCurrentDocument()); -ScopedVclPtr pDialog( +VclPtr pDialog( pFact->CreateSignSignatureLineDialog(GetFrameWeld(), xModel)); -pDialog->Execute(); +pDialog->StartExecuteAsync( +[pDialog] (sal_Int32 /*nResult*/)->void +{ +pDialog->disposeOnce(); +} +); break; } case FN_EDIT_FOOTNOTE:
core.git: cui/source include/unotools unotools/source
cui/source/options/optsave.cxx| 32 include/unotools/optionsdlg.hxx |3 --- unotools/source/config/optionsdlg.cxx | 22 ++ 3 files changed, 2 insertions(+), 55 deletions(-) New commits: commit 09f6ad451156cdc5c2d0f398237a72b99598f32f Author: Gabor Kelemen AuthorDate: Wed Jan 17 17:31:47 2024 +0100 Commit: Thorsten Behrens CommitDate: Mon Jan 22 08:30:54 2024 +0100 Remove DetectHiddenControls method of locking down UI It is used only on the Load/Save - General page, and it's redundant with using officecfg methods and setting UI elements representing locked down keys as insensitive + showing a lock icon Change-Id: I689e7925198f8aac60b5711bf1c349c45a5ab62a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162267 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx index 4c292a75ac3a..3a05d369beea 100644 --- a/cui/source/options/optsave.cxx +++ b/cui/source/options/optsave.cxx @@ -40,7 +40,6 @@ #include #include #include -#include #include #include #include @@ -55,8 +54,6 @@ using namespace com::sun::star::beans; using namespace com::sun::star::container; using namespace comphelper; -#define CFG_PAGE_AND_GROUP u"General", u"LoadSave" - struct SvxSaveTabPage_Impl { @@ -210,8 +207,6 @@ SvxSaveTabPage::SvxSaveTabPage(weld::Container* pPage, weld::DialogController* p aLink = LINK( this, SvxSaveTabPage, FilterHdl_Impl ); m_xDocTypeLB->connect_changed( aLink ); m_xSaveAsLB->connect_changed( aLink ); - -DetectHiddenControls(); } SvxSaveTabPage::~SvxSaveTabPage() @@ -224,33 +219,6 @@ std::unique_ptr SvxSaveTabPage::Create(weld::Container* pPage, weld: return std::make_unique(pPage, pController, *rAttrSet); } -void SvxSaveTabPage::DetectHiddenControls() -{ -SvtOptionsDialogOptions aOptionsDlgOpt; - -if ( aOptionsDlgOpt.IsOptionHidden( u"Backup", CFG_PAGE_AND_GROUP ) ) -{ -// hide controls of "Backup" -m_xBackupCB->hide(); -m_xBackupIntoDocumentFolderCB->hide(); -} - -if ( aOptionsDlgOpt.IsOptionHidden( u"AutoSave", CFG_PAGE_AND_GROUP ) ) -{ -// hide controls of "AutoSave" -m_xAutoSaveCB->hide(); -m_xAutoSaveEdit->hide(); -m_xMinuteFT->hide(); -} - -if ( aOptionsDlgOpt.IsOptionHidden( u"UserAutoSave", CFG_PAGE_AND_GROUP ) ) -{ -// hide controls of "UserAutoSave" -m_xUserAutoSaveCB->hide(); -} - -} - OUString SvxSaveTabPage::GetAllStrings() { OUString sAllStrings; diff --git a/include/unotools/optionsdlg.hxx b/include/unotools/optionsdlg.hxx index 4e0d78245b65..0be3fa149522 100644 --- a/include/unotools/optionsdlg.hxx +++ b/include/unotools/optionsdlg.hxx @@ -36,9 +36,6 @@ public: boolIsGroupHidden ( std::u16string_view _rGroup ) const; boolIsPageHidden( std::u16string_view _rPage, std::u16string_view _rGroup ) const; -boolIsOptionHidden ( std::u16string_view _rOption, -std::u16string_view _rPage, -std::u16string_view _rGroup ) const; private: bool IsHidden( const OUString& _rPath ) const; diff --git a/unotools/source/config/optionsdlg.cxx b/unotools/source/config/optionsdlg.cxx index c88bd095106c..35e964afbf08 100644 --- a/unotools/source/config/optionsdlg.cxx +++ b/unotools/source/config/optionsdlg.cxx @@ -30,10 +30,9 @@ using namespace com::sun::star::uno; constexpr OUString ROOT_NODE = u"OptionsDialogGroups"_ustr; constexpr OUString PAGES_NODE = u"Pages"_ustr; -constexpr OUString OPTIONS_NODE = u"Options"_ustr; namespace { -enum NodeType{ NT_Group, NT_Page, NT_Option }; +enum NodeType{ NT_Group, NT_Option }; } constexpr OUString g_sPathDelimiter = u"/"_ustr; static void ReadNode( @@ -72,13 +71,6 @@ static void ReadNode( break; } -case NT_Page : -{ -sSet = OPTIONS_NODE; -nLen = 2; -break; -} - case NT_Option : { nLen = 1; @@ -106,7 +98,7 @@ static void ReadNode( for ( const auto& rNode : aNodes ) { OUString sSubNodeName( sNodes + g_sPathDelimiter + rNode ); -ReadNode( xHierarchyAccess, aOptionNodeList, sSubNodeName, _eType == NT_Group ? NT_Page : NT_Option ); +ReadNode( xHierarchyAccess, aOptionNodeList, sSubNodeName, NT_Option ); } } } @@ -119,10 +111,6 @@ static OUString getPagePath( std::u16string_view _rPage ) { return OUString( OUString::Concat(PAGES_NODE) + "/" + _rPage + "/" ); } -static OUString getOptionPath( std::u16string_view _rOption ) -{ -return OUString( OUString::Concat(OPTIONS_NODE) + "/" + _rOption + "/" ); -} bool
core.git: cui/source include/svl svl/source vcl/source
cui/source/tabpages/tabarea.cxx | 64 ++-- include/svl/itempool.hxx| 25 +-- svl/source/items/itempool.cxx | 41 - vcl/source/app/svapp.cxx|4 -- 4 files changed, 26 insertions(+), 108 deletions(-) New commits: commit 5dd814f13d795b471b2c9b01998ced75b2845a05 Author: Armin Le Grand (allotropia) AuthorDate: Sat Jan 20 19:24:07 2024 +0100 Commit: Armin Le Grand CommitDate: Sun Jan 21 20:34:08 2024 +0100 ITEM: Remove Direct(Put|Remove)Item(In|From)Pool After some experiments I now can remove DirectPutItemInPool and DirectRemoveItemFromPool. With the changes done before it is now possible to get rid of this 'compromize'. Now there are no more Items held at the 'Pool' which now can be developed in the direction of ssth like 'SfxItemSupport' - what it really is. Some of the last usages of DirectPutItemInPool were in SvxAreaTabDialog::SavePalettes(), so I tried to trigger those cases with using LO and calling that Dialog in all situations I could possibly think about, but it was never used. Then I added asserts and run a UnitTests in the apps, also no luck. Thus I would guess these are not used. These put changed stuff from the Dialog 'directly' to the Pool (what is not really supported and is a hint for a 'compromize' that some functionality did not find/want to use the right spot in the model to save and hold that data). Thus it *would* be accessible using the SurrogateMechanism at the Pool (which is also a 'compromize', see some of my other commits), but I also found no hints at places where that is done. Thus I decided to create this change and let's see if that asserts ever get triggered in the builds or tests. Indeed did not trigger. I checked what other places do which use SfxObjectShell::Current() when they get no DocShell: Most avoid doing something, but none puts stuff to the Pool, so I go one step further and do what other places do: warn and return. Also simplified SvxAreaTabDialog::SavePalettes() as then feasible. Change-Id: I1c351eac4ada26288a56a69d57008a09f2d19121 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162340 Tested-by: Jenkins Reviewed-by: Armin Le Grand diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx index b4ef7edb6791..a568eb08223b 100644 --- a/cui/source/tabpages/tabarea.cxx +++ b/cui/source/tabpages/tabarea.cxx @@ -75,55 +75,46 @@ SvxAreaTabDialog::SvxAreaTabDialog void SvxAreaTabDialog::SavePalettes() { -SfxObjectShell* pShell = SfxObjectShell::Current(); +SfxObjectShell* pShell(SfxObjectShell::Current()); +if (!pShell) +{ +SAL_WARN("cui.dialogs", "SvxAreaTabDialog: No SfxObjectShell!"); +return; +} + if( mpNewColorList != mpDrawModel->GetColorList() ) { mpDrawModel->SetPropertyList( static_cast(mpNewColorList.get()) ); SvxColorListItem aColorListItem( mpNewColorList, SID_COLOR_TABLE ); -if ( pShell ) -pShell->PutItem( aColorListItem ); -else -mpDrawModel->GetItemPool().DirectPutItemInPool(aColorListItem); +pShell->PutItem( aColorListItem ); mpColorList = mpDrawModel->GetColorList(); } if( mpNewGradientList != mpDrawModel->GetGradientList() ) { mpDrawModel->SetPropertyList( static_cast(mpNewGradientList.get()) ); SvxGradientListItem aItem( mpNewGradientList, SID_GRADIENT_LIST ); -if ( pShell ) -pShell->PutItem( aItem ); -else -mpDrawModel->GetItemPool().DirectPutItemInPool(aItem); +pShell->PutItem( aItem ); mpGradientList = mpDrawModel->GetGradientList(); } if( mpNewHatchingList != mpDrawModel->GetHatchList() ) { mpDrawModel->SetPropertyList( static_cast(mpNewHatchingList.get()) ); SvxHatchListItem aItem( mpNewHatchingList, SID_HATCH_LIST ); -if ( pShell ) -pShell->PutItem( aItem ); -else -mpDrawModel->GetItemPool().DirectPutItemInPool(aItem); +pShell->PutItem( aItem ); mpHatchingList = mpDrawModel->GetHatchList(); } if( mpNewBitmapList != mpDrawModel->GetBitmapList() ) { mpDrawModel->SetPropertyList( static_cast(mpNewBitmapList.get()) ); SvxBitmapListItem aItem( mpNewBitmapList, SID_BITMAP_LIST ); -if ( pShell ) -pShell->PutItem( aItem ); -else -mpDrawModel->GetItemPool().DirectPutItemInPool(aItem); +pShell->PutItem( aItem ); mpBitmapList = mpDrawModel->GetBitmapList(); } if( mpNewPatternList != mpDrawModel->GetPatternList() ) { mpDrawModel->SetPropertyList( static_cast(mpNewPatternList.get()) ); SvxPatternListItem aItem(
core.git: cui/source
cui/source/dialogs/QrCodeGenDialog.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit ec10bd238991a8eda71aec7d261eafa7e47ced0d Author: Stephan Bergmann AuthorDate: Thu Jan 18 13:16:10 2024 +0100 Commit: Stephan Bergmann CommitDate: Thu Jan 18 18:00:02 2024 +0100 -Werror,-Wunused-parameter (Emscripten) Change-Id: Ia2e9ab91def1454bd06044b0e38f2d0720b44033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162246 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx b/cui/source/dialogs/QrCodeGenDialog.cxx index c727f4cdbd02..d99290404629 100644 --- a/cui/source/dialogs/QrCodeGenDialog.cxx +++ b/cui/source/dialogs/QrCodeGenDialog.cxx @@ -272,6 +272,9 @@ bool QrCodeGenDialog::runAsync(const std::shared_ptr& rControll rFunc(nResult); }); +#else +(void)rController; +(void)rFunc; #endif return true; }
core.git: cui/source include/sfx2 include/svl sc/source sd/source sfx2/source svl/source sw/source vbahelper/source
cui/source/options/treeopt.cxx|6 include/sfx2/frame.hxx|1 include/svl/itempool.hxx |2 include/svl/itemset.hxx | 30 ++-- include/svl/poolitem.hxx |2 sc/source/core/data/patattr.cxx | 24 +-- sc/source/ui/drawfunc/drtxtob.cxx | 10 - sc/source/ui/vba/vbarange.cxx |2 sc/source/ui/view/formatsh.cxx| 10 - sc/source/ui/view/output2.cxx |6 sc/source/ui/view/spelleng.cxx|2 sd/source/ui/view/drviewsf.cxx| 10 - sd/source/ui/view/outlnvsh.cxx|4 sfx2/source/control/dispatch.cxx | 11 - sfx2/source/control/request.cxx |4 sfx2/source/doc/objserv.cxx |2 sfx2/source/view/frame.cxx| 10 - svl/source/items/itemset.cxx | 157 +- sw/source/core/attr/swatrset.cxx |8 - sw/source/core/doc/DocumentRedlineManager.cxx |2 sw/source/filter/ww8/wrtw8nds.cxx |6 vbahelper/source/vbahelper/vbahelper.cxx | 12 - 22 files changed, 183 insertions(+), 138 deletions(-) New commits: commit b8e393686c4ab6a69b091240065f440eadfff230 Author: Armin Le Grand (allotropia) AuthorDate: Mon Jan 15 18:45:03 2024 +0100 Commit: Armin Le Grand CommitDate: Wed Jan 17 01:56:01 2024 +0100 ITEM: Remove suspicious extra-Which in ::Put The ::Put methods at SfxItemSet had an extra WhichID parameter that was not really documented, but I would guess often asked why it exists: An extra WhichID, just called 'nWhich' (which makes things NOT clearer). That is 'strange' since the Item given to be put already internally has a WhichID, so why a 2nd one? If you were really interested and read all that code (no, no comments on that anywhere) you might know that this a kind of 'Target-WhichID' under which the Item shall be put to the ItemSet. Since this is unclear for most people it is even dangerous and explains why so many code places just hand over the WhichID requsted from the Item that already gets handed over. To make it short: I removed that. For the 19 places where this was really needed I added a new method besides ::Put called ::PutAsTargetWhich that takes that extra WhichID (now called TargetWhich) and takes the needed actions. These are quite some because that may be combined with the bPassingOwnership flag, see new SfxItemSet::PutImplAsTargetWhich method. This makes usage of ItemSets/Items less dangerous. It also simplifies and thus makes safer the central helpers implCreateItemEntry/implCleanupItemEntry which have some less cases to handle. Debugged the failing UnitTests showed that there is an incarnate Item != SfxVoidItem that causes problems. I checked for errors in the change, but no luck. Afterr some time I found out that a ::Clone implementation caused the problem: These need to also copy the WichID of the original, but the SfxFrameItem failed to do so. This did not cause problems in the former version because implCreateItemEntry was designed to set a missing/ different WhichID. I corrected that in SfxFrameItem, also removed not needed costructor that caused that. Also added a SAL_WARN and a correction in implCreateItemEntry. I could have added an assert (did so for running local UnitTests), but should be enough. NOTE: When hunting for Items except SfxVoidItem that get crerated using a WhichID '0' i learned that this indeed happens: There are some (5) calls to SfxRequest::SetReturnValue that incarnate an SfxBoolItem with WhichID '0' (ZERO). This is not good and I think about how to change that... Change-Id: I9854a14cdc42d1cc19c7b9df65ce74147d680825 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162124 Tested-by: Jenkins Reviewed-by: Armin Le Grand diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index ef7eaa7dda0f..8bfbde910e10 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1480,15 +1480,15 @@ std::optional OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId ) SfxItemState aState(pDispatch->QueryState(SID_ATTR_LANGUAGE, aResult)); if(SfxItemState::DEFAULT <= aState) -pRet->Put(*aResult.getItem(), SID_ATTR_LANGUAGE); +pRet->Put(*aResult.getItem()); aState = pDispatch->QueryState(SID_ATTR_CHAR_CJK_LANGUAGE, aResult); if(SfxItemState::DEFAULT <= aState) -pRet->Put(*aResult.getItem(), SID_ATTR_CHAR_CJK_LANGUAGE); +
core.git: cui/source
cui/source/options/optaboutconfig.cxx | 28 cui/source/options/optaboutconfig.hxx |5 +++-- 2 files changed, 19 insertions(+), 14 deletions(-) New commits: commit 71296fd27dd9e3e5609b4fd41f3842673231a3ad Author: Samuel Mehrbrodt AuthorDate: Mon Jan 15 08:15:46 2024 +0100 Commit: Samuel Mehrbrodt CommitDate: Mon Jan 15 12:46:18 2024 +0100 tdf#159186 Use changed value when editing string-list a second time Change-Id: I0e26a053b3b5fb04abf87894bcfebccea8bdd26f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162074 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index 78dc234ffbe6..de64f45b4260 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -70,15 +70,18 @@ struct UserData bool bIsReadOnly; bool bWasModified; OUString sPropertyPath; +Any aPropertyValue; OUString sTooltip; int aLineage; Reference aXNameAccess; -explicit UserData(OUString aPropertyPath, OUString aTooltip, bool isReadOnly, bool wasModified) +explicit UserData(OUString aPropertyPath, Any aPropValue, OUString aTooltip, bool isReadOnly, + bool wasModified) : bIsPropertyPath(true) , bIsReadOnly(isReadOnly) , bWasModified(wasModified) , sPropertyPath(std::move(aPropertyPath)) +, aPropertyValue(aPropValue) , sTooltip(std::move(aTooltip)) , aLineage(0) { @@ -186,9 +189,10 @@ IMPL_STATIC_LINK_NOARG(CuiAboutConfigTabPage, ValidNameHdl, SvxNameDialog&, bool CuiAboutConfigTabPage::~CuiAboutConfigTabPage() {} -void CuiAboutConfigTabPage::InsertEntry(const OUString& rPropertyPath, const OUString& rProp, -const OUString& rStatus, const OUString& rType, -const OUString& rValue, const OUString& rTooltip, +void CuiAboutConfigTabPage::InsertEntry(const OUString& rPropertyPath, Any aPropertyValue, +const OUString& rProp, const OUString& rStatus, +const OUString& rType, const OUString& rValue, +const OUString& rTooltip, const weld::TreeIter* pParentEntry, bool bInsertToPrefBox, bool bIsReadOnly, bool bWasModified) { @@ -196,8 +200,8 @@ void CuiAboutConfigTabPage::InsertEntry(const OUString& rPropertyPath, const OUS if (bOnlyModified && !bWasModified) return; -m_vectorUserData.push_back( -std::make_unique(rPropertyPath, rTooltip, bIsReadOnly, bWasModified)); +m_vectorUserData.push_back(std::make_unique(rPropertyPath, aPropertyValue, rTooltip, + bIsReadOnly, bWasModified)); if (bInsertToPrefBox) { OUString sId(weld::toId(m_vectorUserData.back().get())); @@ -688,8 +692,9 @@ void CuiAboutConfigTabPage::FillItems(const Reference& xNameAccess, for (int j = 1; j < lineage; ++j) index = sPath.indexOf("/", index + 1); -InsertEntry(sPath, sPath.copy(index + 1), item, sType, sValue.makeStringAndClear(), -sTooltip, pParentEntry, !bLoadAll, bReadOnly, bWasModified); +InsertEntry(sPath, aNode, sPath.copy(index + 1), item, sType, +sValue.makeStringAndClear(), sTooltip, pParentEntry, !bLoadAll, bReadOnly, +bWasModified); } } } @@ -939,10 +944,8 @@ IMPL_LINK_NOARG(CuiAboutConfigTabPage, StandardHdl_Impl, weld::Button&, void) else if (sPropertyType == "string-list") { SvxListDialog aListDialog(m_xDialog.get()); -Reference xConfigAccess -= getConfigAccess(pUserData->sPropertyPath, false); -Any aNode = xConfigAccess->getByName(sPropertyName); -uno::Sequence aList = aNode.get>(); +uno::Sequence aList += pUserData->aPropertyValue.get>(); aListDialog.SetEntries( comphelper::sequenceToContainer>(aList)); aListDialog.SetMode(ListMode::String); @@ -961,6 +964,7 @@ IMPL_LINK_NOARG(CuiAboutConfigTabPage, StandardHdl_Impl, weld::Button&, void) if (bSaveChanges) { AddToModifiedVector(pProperty); +pUserData->aPropertyValue = pProperty->Value; //update listbox value. m_xPrefBox->set_text(*m_xScratchIter, sPropertyType, 2); diff --git a/cui/source/options/optaboutconfig.hxx b/cui/source/options/optaboutconfig.hxx index d808e3ed04d5..2b9402369a26 100644 --- a/cui/source/options/optaboutconfig.hxx +++
core.git: cui/source
cui/source/options/optupdt.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 261f758b650cf1c5c16acdad8f4a2dc86616f9e2 Author: Thorsten Behrens AuthorDate: Mon Jan 15 00:29:20 2024 +0100 Commit: Stephan Bergmann CommitDate: Mon Jan 15 07:57:24 2024 +0100 Make MAR-based LibreOffice updater non-experimental Change-Id: I7623e983e14ab7de3948921ca1223488fa2049a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162067 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx index e3b855b15d1d..2686f8dfb277 100644 --- a/cui/source/options/optupdt.cxx +++ b/cui/source/options/optupdt.cxx @@ -507,7 +507,7 @@ bool SvxOnlineUpdateTabPage::isTraditionalOnlineUpdateAvailable() { bool SvxOnlineUpdateTabPage::isMarOnlineUpdateAvailable() { #if HAVE_FEATURE_UPDATE_MAR -return officecfg::Office::Common::Misc::ExperimentalMode::get(); +return true; #else return false; #endif
core.git: cui/source
cui/source/dialogs/hltpbase.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 3635a2d6d5ba348dfbce05705917fe086e328ada Author: Xisco Fauli AuthorDate: Fri Jan 12 13:07:10 2024 +0100 Commit: Julien Nabet CommitDate: Fri Jan 12 17:42:06 2024 +0100 cui: fix typo Change-Id: I587d60c8da53df937ed8992a846993078710659f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161971 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index f0aa7c368c04..24621538caec 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -465,13 +465,13 @@ void SvxHyperlinkTabPageBase::Reset( const SfxItemSet& rItemSet) SotExchange::GetFormatDataFlavor(SotClipboardFormatId::STRING, aFlavor); if (xTransferable->isDataFlavorSupported(aFlavor)) { -OUString aClipBoardConentent; +OUString aClipBoardContent; try { -if (xTransferable->getTransferData(aFlavor) >>= aClipBoardConentent) +if (xTransferable->getTransferData(aFlavor) >>= aClipBoardContent) { INetURLObject aURL; -aURL.SetSmartURL(aClipBoardConentent); +aURL.SetSmartURL(aClipBoardContent); if (!aURL.HasError()) aStrURL = aURL.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous);
core.git: cui/source drawinglayer/source filter/source oox/source sfx2/source svtools/source svx/source sw/source vcl/source xmlscript/source
cui/source/options/optlingu.cxx|4 ++-- drawinglayer/source/processor3d/defaultprocessor3d.cxx |4 ++-- filter/source/msfilter/msdffimp.cxx|4 ++-- oox/source/shape/WpgContext.cxx| 15 --- sfx2/source/appl/fileobj.cxx |2 +- svtools/source/control/ruler.cxx |2 +- svx/source/smarttags/SmartTagMgr.cxx |4 +--- svx/source/unodraw/unoshape.cxx|4 ++-- sw/source/core/crsr/swcrsr.cxx |2 +- sw/source/core/doc/doctxm.cxx |2 +- sw/source/core/unocore/unoobj.cxx |2 +- sw/source/filter/ww8/wrtww8.cxx|4 ++-- vcl/source/gdi/pdfwriter_impl.cxx |4 ++-- xmlscript/source/xmldlg_imexp/xmldlg_import.cxx|6 +++--- 14 files changed, 29 insertions(+), 30 deletions(-) New commits: commit 212bbbe5cafab06b408ddde930bf9c8d37b7c3aa Author: Caolán McNamara AuthorDate: Wed Jan 10 09:13:00 2024 + Commit: Caolán McNamara CommitDate: Wed Jan 10 13:44:58 2024 +0100 cid#1546141 COPY_INSTEAD_OF_MOVE and cid#1546004 COPY_INSTEAD_OF_MOVE cid#1545934 COPY_INSTEAD_OF_MOVE cid#1545563 COPY_INSTEAD_OF_MOVE cid#1545533 COPY_INSTEAD_OF_MOVE cid#1545529 COPY_INSTEAD_OF_MOVE cid#1545502 COPY_INSTEAD_OF_MOVE cid#1545499 COPY_INSTEAD_OF_MOVE cid#1545479 COPY_INSTEAD_OF_MOVE cid#1545344 COPY_INSTEAD_OF_MOVE cid#1545324 COPY_INSTEAD_OF_MOVE cid#1545313 COPY_INSTEAD_OF_MOVE cid#1545252 COPY_INSTEAD_OF_MOVE cid#1545186 COPY_INSTEAD_OF_MOVE Change-Id: I44a783876699f88c769f239ae84eb5cae44d5f07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161879 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index de908b943995..f95015c03025 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -1385,10 +1385,10 @@ IMPL_LINK(SvxLinguTabPage, ClickHdl_Impl, weld::Button&, rBtn, void) if (!pLinguData) pLinguData.reset( new SvxLinguData_Impl ); -SvxLinguData_Impl aOldLinguData( *pLinguData ); +SvxLinguData_Impl aOldLinguData(*pLinguData); SvxEditModulesDlg aDlg(GetFrameWeld(), *pLinguData); if (aDlg.run() != RET_OK) -*pLinguData = aOldLinguData; +*pLinguData = std::move(aOldLinguData); // evaluate new status of 'bConfigured' flag sal_uInt32 nLen = pLinguData->GetDisplayServiceCount(); diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx b/drawinglayer/source/processor3d/defaultprocessor3d.cxx index fda4e267b6be..498cc93d86cc 100644 --- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx +++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx @@ -190,7 +190,7 @@ namespace drawinglayer::processor3d // rescue values const bool bOldModulate(getModulate()); mbModulate = rPrimitive.getModulate(); const bool bOldFilter(getFilter()); mbFilter = rPrimitive.getFilter(); -std::shared_ptr< texture::GeoTexSvx > pOldTex = mpGeoTexSvx; +std::shared_ptr xOldTex(mpGeoTexSvx); // calculate logic pixel size in object coordinates. Create transformation view // to object by inverting ObjectToView @@ -218,7 +218,7 @@ namespace drawinglayer::processor3d // restore values mbModulate = bOldModulate; mbFilter = bOldFilter; -mpGeoTexSvx = pOldTex; +mpGeoTexSvx = std::move(xOldTex); } void DefaultProcessor3D::impRenderBitmapTexturePrimitive3D(const primitive3d::BitmapTexturePrimitive3D& rPrimitive) diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index b1bbea6efaed..ccd0f53f4313 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -1092,7 +1092,7 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eSh basegfx::B2DPolyPolygon aPolyPoly(GetLineArrow( nLineWidth, eLineEnd, eWidth, eLength, nArrowWidth, bArrowCenter, aArrowName, bScaleArrows )); rSet.Put( XLineStartWidthItem( nArrowWidth ) ); -rSet.Put( XLineStartItem( std::move(aArrowName), std::move(aPolyPoly)) ); +rSet.Put( XLineStartItem( std::move(aArrowName), std::move(aPolyPoly) ) ); rSet.Put( XLineStartCenterItem( bArrowCenter ) ); } @@ -1110,7 +1110,7 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eSh basegfx::B2DPolyPolygon aPolyPoly(GetLineArrow( nLineWidth, eLineEnd, eWidth, eLength, nArrowWidth, bArrowCenter,
core.git: cui/source cui/uiconfig include/unotools unotools/source
cui/source/options/optinet2.cxx|1 cui/source/options/securityoptions.cxx |4 +++ cui/source/options/securityoptions.hxx |3 ++ cui/uiconfig/ui/securityoptionsdialog.ui | 34 - include/unotools/securityoptions.hxx |3 +- unotools/source/config/securityoptions.cxx | 12 ++ 6 files changed, 55 insertions(+), 2 deletions(-) New commits: commit a2ccc25ccb2e94f5990d6d413541dbcdd3a72338 Author: Sarper Akdemir AuthorDate: Tue Jan 9 02:29:42 2024 +0300 Commit: Thorsten Behrens CommitDate: Tue Jan 9 02:21:02 2024 +0100 tdf#158375: add UI option to disable active content Adds a checkbox to disable active contents and OLE Automation at Options - LibreOffice - Security - Security Options and Warnings Change-Id: Idfac86e31c97f186eb6b6b2a7a7236b84aedbe83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161808 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 083c3e40f784..de34b031e8ce 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -906,6 +906,7 @@ bool SvxSecurityTabPage::FillItemSet( SfxItemSet* ) CheckAndSave( SvtSecurityOptions::EOption::DocWarnRecommendPassword, m_xSecOptDlg->IsRecommPasswdChecked(), bModified ); CheckAndSave( SvtSecurityOptions::EOption::CtrlClickHyperlink, m_xSecOptDlg->IsCtrlHyperlinkChecked(), bModified ); CheckAndSave( SvtSecurityOptions::EOption::BlockUntrustedRefererLinks, m_xSecOptDlg->IsBlockUntrustedRefererLinksChecked(), bModified ); +CheckAndSave( SvtSecurityOptions::EOption::DisableActiveContent, m_xSecOptDlg->IsDisableActiveContentChecked(), bModified ); } std::shared_ptr pBatch( diff --git a/cui/source/options/securityoptions.cxx b/cui/source/options/securityoptions.cxx index d583f626183e..8f970331d9a3 100644 --- a/cui/source/options/securityoptions.cxx +++ b/cui/source/options/securityoptions.cxx @@ -54,6 +54,8 @@ SecurityOptionsDialog::SecurityOptionsDialog(weld::Window* pParent) , m_xCtrlHyperlinkImg(m_xBuilder->weld_widget("lockctrlclick")) , m_xBlockUntrustedRefererLinksCB(m_xBuilder->weld_check_button("blockuntrusted")) , m_xBlockUntrustedRefererLinksImg(m_xBuilder->weld_widget("lockblockuntrusted")) +, m_xDisableActiveContentCB(m_xBuilder->weld_check_button("disableactivecontent")) +, m_xDisableActiveContentImg(m_xBuilder->weld_widget("lockdisableactivecontent")) , m_xRedlineinfoCB(m_xBuilder->weld_check_button("redlineinfo")) , m_xRedlineinfoImg(m_xBuilder->weld_widget("lockredlineinfo")) , m_xDocPropertiesCB(m_xBuilder->weld_check_button("docproperties")) @@ -98,6 +100,8 @@ void SecurityOptionsDialog::init() *m_xCtrlHyperlinkImg); enableAndSet(SvtSecurityOptions::EOption::BlockUntrustedRefererLinks, *m_xBlockUntrustedRefererLinksCB, *m_xBlockUntrustedRefererLinksImg); +enableAndSet(SvtSecurityOptions::EOption::DisableActiveContent, + *m_xDisableActiveContentCB, *m_xDisableActiveContentImg); if (!SvtSecurityOptions::IsReadOnly(SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo)) changeKeepSecurityInfosEnabled(); diff --git a/cui/source/options/securityoptions.hxx b/cui/source/options/securityoptions.hxx index 7884ccfbd30e..10534d4426a7 100644 --- a/cui/source/options/securityoptions.hxx +++ b/cui/source/options/securityoptions.hxx @@ -42,6 +42,8 @@ namespace svx std::unique_ptr m_xCtrlHyperlinkImg; std::unique_ptr m_xBlockUntrustedRefererLinksCB; std::unique_ptr m_xBlockUntrustedRefererLinksImg; +std::unique_ptr m_xDisableActiveContentCB; +std::unique_ptr m_xDisableActiveContentImg; std::unique_ptr m_xRedlineinfoCB; std::unique_ptr m_xRedlineinfoImg; @@ -69,6 +71,7 @@ namespace svx bool IsRecommPasswdChecked() const { return m_xRecommPasswdCB->get_active(); } bool IsCtrlHyperlinkChecked() const { return m_xCtrlHyperlinkCB->get_active(); } bool IsBlockUntrustedRefererLinksChecked() const { return m_xBlockUntrustedRefererLinksCB->get_active(); } +bool IsDisableActiveContentChecked() const { return m_xDisableActiveContentCB->get_active(); } DECL_LINK(ShowPersonalInfosToggle, weld::Toggleable&, void); diff --git a/cui/uiconfig/ui/securityoptionsdialog.ui b/cui/uiconfig/ui/securityoptionsdialog.ui index 17f253fd2365..309b964915e8 100644 --- a/cui/uiconfig/ui/securityoptionsdialog.ui +++ b/cui/uiconfig/ui/securityoptionsdialog.ui @@ -275,7 +275,7 @@ 0 none - + True False @@ -532,6 +532,38 @@ 4 + +
core.git: cui/source desktop/source include/unotools sc/inc solenv/clang-format sw/CppunitTest_sw_ooxmlexport14.mk sw/CppunitTest_sw_ooxmlexport16.mk sw/inc sw/qa sw/source unotools/Library_utl.mk uno
cui/source/options/optfltr.cxx | 246 -- desktop/source/lib/init.cxx|2 include/unotools/fltrcfg.hxx | 106 sc/inc/pch/precompiled_scfilt.hxx |1 solenv/clang-format/excludelist|1 sw/CppunitTest_sw_ooxmlexport14.mk |4 sw/CppunitTest_sw_ooxmlexport16.mk |4 sw/inc/pch/precompiled_msword.hxx |1 sw/qa/extras/globalfilter/globalfilter.cxx | 22 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx | 16 sw/qa/extras/ooxmlexport/ooxmlexport16.cxx | 16 sw/source/core/txtnode/thints.cxx |5 sw/source/filter/ww8/wrtww8.cxx| 13 sw/source/filter/ww8/ww8atr.cxx|4 sw/source/filter/ww8/ww8par.cxx| 14 sw/source/filter/ww8/ww8par3.cxx | 11 sw/source/filter/ww8/ww8par5.cxx |5 sw/source/uibase/app/docsh.cxx | 10 unotools/Library_utl.mk|1 unotools/source/config/fltrcfg.cxx | 670 - 20 files changed, 167 insertions(+), 985 deletions(-) New commits: commit 3637c22b8217f2c059c32996bb5549e96eaf66e5 Author: Mike Kaganski AuthorDate: Sun Jan 7 12:40:48 2024 +0600 Commit: Mike Kaganski CommitDate: Sun Jan 7 18:23:09 2024 +0100 Drop SvtFilterOptions and use officecfg instead Change-Id: I6aa9a21d1422b8b3b6fe5dde9869dffa88be5535 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161744 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx index b582b065bc65..0c1c2b54306a 100644 --- a/cui/source/options/optfltr.cxx +++ b/cui/source/options/optfltr.cxx @@ -18,7 +18,6 @@ */ #include -#include #include #include #include @@ -109,67 +108,67 @@ OUString OfaMSFilterTabPage::GetAllStrings() bool OfaMSFilterTabPage::FillItemSet( SfxItemSet* ) { -SvtFilterOptions& rOpt = SvtFilterOptions::Get(); +auto batch = comphelper::ConfigurationChanges::create(); if( m_xWBasicCodeCB->get_state_changed_from_saved() ) -rOpt.SetLoadWordBasicCode( m_xWBasicCodeCB->get_active() ); + officecfg::Office::Writer::Filter::Import::VBA::Load::set(m_xWBasicCodeCB->get_active(), batch); if( m_xWBasicWbctblCB->get_state_changed_from_saved() ) -rOpt.SetLoadWordBasicExecutable( m_xWBasicWbctblCB->get_active() ); + officecfg::Office::Writer::Filter::Import::VBA::Executable::set(m_xWBasicWbctblCB->get_active(), batch); if( m_xWBasicStgCB->get_state_changed_from_saved() ) -rOpt.SetLoadWordBasicStorage( m_xWBasicStgCB->get_active() ); + officecfg::Office::Writer::Filter::Import::VBA::Save::set(m_xWBasicStgCB->get_active(), batch); if( m_xEBasicCodeCB->get_state_changed_from_saved()) -rOpt.SetLoadExcelBasicCode( m_xEBasicCodeCB->get_active() ); + officecfg::Office::Calc::Filter::Import::VBA::Load::set(m_xEBasicCodeCB->get_active(), batch); if( m_xEBasicExectblCB->get_state_changed_from_saved()) -rOpt.SetLoadExcelBasicExecutable( m_xEBasicExectblCB->get_active() ); + officecfg::Office::Calc::Filter::Import::VBA::Executable::set(m_xEBasicExectblCB->get_active(), batch); if( m_xEBasicStgCB->get_state_changed_from_saved()) -rOpt.SetLoadExcelBasicStorage( m_xEBasicStgCB->get_active() ); + officecfg::Office::Calc::Filter::Import::VBA::Save::set(m_xEBasicStgCB->get_active(), batch); if( m_xPBasicCodeCB->get_state_changed_from_saved()) -rOpt.SetLoadPPointBasicCode( m_xPBasicCodeCB->get_active() ); + officecfg::Office::Impress::Filter::Import::VBA::Load::set(m_xPBasicCodeCB->get_active(), batch); if( m_xPBasicStgCB->get_state_changed_from_saved()) -rOpt.SetLoadPPointBasicStorage( m_xPBasicStgCB->get_active() ); + officecfg::Office::Impress::Filter::Import::VBA::Save::set(m_xPBasicStgCB->get_active(), batch); + +batch->commit(); return false; } void OfaMSFilterTabPage::Reset( const SfxItemSet* ) { -const SvtFilterOptions& rOpt = SvtFilterOptions::Get(); - -m_xWBasicCodeCB->set_active( rOpt.IsLoadWordBasicCode() ); + m_xWBasicCodeCB->set_active(officecfg::Office::Writer::Filter::Import::VBA::Load::get()); m_xWBasicCodeCB->set_sensitive(!officecfg::Office::Writer::Filter::Import::VBA::Load::isReadOnly()); m_xWBasicCodeImg->set_visible(officecfg::Office::Writer::Filter::Import::VBA::Load::isReadOnly()); m_xWBasicCodeCB->save_state(); -m_xWBasicWbctblCB->set_active( rOpt.IsLoadWordBasicExecutable() ); + m_xWBasicWbctblCB->set_active(officecfg::Office::Writer::Filter::Import::VBA::Executable::get()); m_xWBasicWbctblCB->set_sensitive(!officecfg::Office::Writer::Filter::Import::VBA::Executable::isReadOnly()); m_xWBasicWbctblImg->set_visible(officecfg::Office::Writer::Filter::Import::VBA::Executable::isReadOnly());
core.git: cui/source
cui/source/options/treeopt.cxx | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) New commits: commit 553ca63f5cc2bb1d4545bea50783bffa3e69955e Author: Julien Nabet AuthorDate: Sun Dec 31 12:22:54 2023 +0100 Commit: Julien Nabet CommitDate: Sun Dec 31 15:07:56 2023 +0100 Replace "size() != 0 with !empty()" (cui) Change-Id: I7640be31591bbf4e4f319f35eae0924e7503c282 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161472 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 048173193c48..ef7eaa7dda0f 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1758,7 +1758,7 @@ void OfaTreeOptionsDialog::generalOptions(const std::vector& vPageId continue; } -if (vPageId.size() != 0) +if (!vPageId.empty()) { if (std::find(vPageId.begin(), vPageId.end(), nPageId) != vPageId.end()) AddTabPage(nPageId, sNewTitle, nGroup); @@ -1784,7 +1784,7 @@ void OfaTreeOptionsDialog::loadAndSaveOptions(const std::vector& vPa nPageId = static_cast(SID_FILTER_DLG_RES[i].second); if ( !lcl_isOptionHidden( nPageId, aOptionsDlgOpt ) ) { -if (vPageId.size() != 0) +if (!vPageId.empty()) { if (std::find(vPageId.begin(), vPageId.end(), nPageId) != vPageId.end()) AddTabPage(nPageId, CuiResId(SID_FILTER_DLG_RES[i].first), nGroup); @@ -1824,7 +1824,7 @@ void OfaTreeOptionsDialog::languageOptions(const std::vector& vPageI ( RID_SVXPAGE_ASIAN_LAYOUT != nPageId|| SvtCJKOptions::IsAsianTypographyEnabled() ) && ( RID_SVXPAGE_OPTIONS_CTL != nPageId || SvtCTLOptions::IsCTLFontEnabled() ) ) { -if (vPageId.size() != 0) +if (!vPageId.empty()) { if (std::find(vPageId.begin(), vPageId.end(), nPageId) != vPageId.end()) AddTabPage(nPageId, CuiResId(SID_LANGUAGE_OPTIONS_RES[i].first), nGroup); @@ -1871,7 +1871,7 @@ void OfaTreeOptionsDialog::writerOptions(const std::vector& vPageId) ( RID_SW_TP_STD_FONT_CTL != nPageId || SvtCTLOptions::IsCTLFontEnabled() ) && ( RID_SW_TP_MAILCONFIG != nPageId || MailMergeCfgIsEmailSupported() ) ) { -if (vPageId.size() != 0) +if (!vPageId.empty()) { if (std::find(vPageId.begin(), vPageId.end(), nPageId) != vPageId.end()) AddTabPage(nPageId, CuiResId(SID_SW_EDITOPTIONS_RES[i].first), @@ -1882,7 +1882,7 @@ void OfaTreeOptionsDialog::writerOptions(const std::vector& vPageId) } } #ifdef DBG_UTIL -if (vPageId.size() != 0) +if (!vPageId.empty()) { if (std::find(vPageId.begin(), vPageId.end(), RID_SW_TP_OPTTEST_PAGE) != vPageId.end()) @@ -1924,7 +1924,7 @@ void OfaTreeOptionsDialog::writerWebOptions(const std::vector& vPage nPageId = static_cast(SID_SW_ONLINEOPTIONS_RES[i].second); if ( !lcl_isOptionHidden( nPageId, aOptionsDlgOpt ) ) { -if (vPageId.size() != 0) +if (!vPageId.empty()) { if (std::find(vPageId.begin(), vPageId.end(), nPageId) != vPageId.end()) AddTabPage(nPageId, CuiResId(SID_SW_ONLINEOPTIONS_RES[i].first), @@ -1936,7 +1936,7 @@ void OfaTreeOptionsDialog::writerWebOptions(const std::vector& vPage } } #ifdef DBG_UTIL -if (vPageId.size() != 0) +if (!vPageId.empty()) { if (std::find(vPageId.begin(), vPageId.end(), RID_SW_TP_OPTTEST_PAGE) != vPageId.end()) @@ -1977,7 +1977,7 @@ void OfaTreeOptionsDialog::calcOptions(const std::vector& vPageId) if ( lcl_isOptionHidden( nPageId, aOptionsDlgOpt ) ) continue; -if (vPageId.size() != 0) +if (!vPageId.empty()) { if (std::find(vPageId.begin(), vPageId.end(), nPageId) != vPageId.end()) AddTabPage(nPageId, CuiResId(SID_SC_EDITOPTIONS_RES[i].first), nGroup); @@ -2017,7 +2017,7 @@ void OfaTreeOptionsDialog::impressOptions(const std::vector& vPageId if ( lcl_isOptionHidden( nPageId, aOptionsDlgOpt ) ) continue; -
core.git: cui/source
cui/source/dialogs/hyphen.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit a89a42e55f2b154c8b276fe08fcf02c4b9fc0945 Author: Noel Grandin AuthorDate: Sun Dec 24 19:14:03 2023 +0200 Commit: Noel Grandin CommitDate: Sun Dec 24 20:46:20 2023 +0100 tdf#158837 hyphenation crash in: int rtl::str::indexOfStr_WithLength the code was already dodgy, passing in an invalid nPos, which triggers an assert. However, it appears that previously that dodginess was ignored, until commit 5ebccaa07589383653dbd65e58204a82dd3cde09 author Noel GrandinSat Apr 10 17:27:08 2021 +0200 use std lib for O[U]String indexOfStr which turned it into a crash. Add a check to avoid the crash, no idea what the right fix would look like. Change-Id: I826b9af0b2d9c7c297214ce2d54c664fb573edd2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161271 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx index 259ec5d03395..10ad1d9bba5b 100644 --- a/cui/source/dialogs/hyphen.cxx +++ b/cui/source/dialogs/hyphen.cxx @@ -171,6 +171,8 @@ OUString SvxHyphenWordDialog::EraseUnusableHyphens_Impl() aLeft = aLeft.replaceFirst( aTmp, "", ); if (nPos != -1) ++m_nHyphenationPositionsOffset; +if (nPos >= aLeft.getLength()) // tdf#158837 +break; } aTxt = aTxt.replaceAt( 0, nPos2, aLeft ); }
core.git: cui/source
cui/source/dialogs/QrCodeGenDialog.cxx |9 - 1 file changed, 4 insertions(+), 5 deletions(-) New commits: commit 14c4c077182f0338a21ae7dedf8620e339d2 Author: Thorsten Behrens AuthorDate: Fri Dec 22 15:22:19 2023 +0100 Commit: Thorsten Behrens CommitDate: Sat Dec 23 09:52:54 2023 +0100 ZXing: no need for deprecated utf-8 conversions anymore With ZXing 2.0, the library directly supports utf8 std::string parameters: https://github.com/zxing-cpp/zxing-cpp/releases/tag/v2.0.0 Fixes the warning: cui/source/dialogs/QrCodeGenDialog.cxx:161:72: warning: 'FromUtf8' is deprecated [-Wdeprecated-declarations] 161 | ZXing::BitMatrix bitmatrix = writer.encode(ZXing::TextUtfEncoding::FromUtf8(QRText), 0, 0); | ^ /usr/include/ZXing/TextUtfEncoding.h:17:3: note: 'FromUtf8' has been explicitly marked deprecated here 17 | [[deprecated]] std::wstring FromUtf8(std::string_view utf8); | ^ Change-Id: Ic0a65d4455dabea1a7a4e23f558e4158a0c3f39f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161182 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx b/cui/source/dialogs/QrCodeGenDialog.cxx index 8a25e3b364e7..c727f4cdbd02 100644 --- a/cui/source/dialogs/QrCodeGenDialog.cxx +++ b/cui/source/dialogs/QrCodeGenDialog.cxx @@ -19,6 +19,7 @@ #include #if ENABLE_ZXING +#include #include #ifdef __GNUC__ @@ -38,9 +39,7 @@ #include #endif -#if __has_include() -#include -#else +#if ZXING_VERSION_MAJOR < 2 #include #endif @@ -153,8 +152,8 @@ OString GenerateQRCode(std::u16string_view aQRText, tools::Long aQRECC, int aQRB ZXing::BarcodeFormat format = ZXing::BarcodeFormatFromString(GetBarCodeType(aQRType)); auto writer = ZXing::MultiFormatWriter(format).setMargin(aQRBorder).setEccLevel(bqrEcc); writer.setEncoding(ZXing::CharacterSet::UTF8); -#if __has_include() -ZXing::BitMatrix bitmatrix = writer.encode(ZXing::FromUtf8(QRText), 0, 0); +#if ZXING_VERSION_MAJOR >= 2 +ZXing::BitMatrix bitmatrix = writer.encode(QRText, 0, 0); #else ZXing::BitMatrix bitmatrix = writer.encode(ZXing::TextUtfEncoding::FromUtf8(QRText), 0, 0); #endif
core.git: cui/source include/svx svx/source
cui/source/dialogs/colorpicker.cxx |7 --- include/svx/PaletteManager.hxx |2 +- svx/source/tbxctrls/PaletteManager.cxx | 11 ++- 3 files changed, 11 insertions(+), 9 deletions(-) New commits: commit 78ccae0d42d168f845ddbd7cb694d80dfb04f84d Author: Noel Grandin AuthorDate: Wed Dec 20 11:21:27 2023 +0200 Commit: Noel Grandin CommitDate: Fri Dec 22 12:20:27 2023 +0100 tdf#156820 Fix crash in custom color picker which requires (*) keeping ColorPicker alive during the runAsync in ColorPicker::startExecuteModal (*) keeping the PaletteManager alive during the ExecuteAsync in PaletteManager::PopupCOlorPicker Noting that MattK debugged the cause of this. Change-Id: I07efe8e6514f8882b1347c79c6150578c234bb9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161054 Tested-by: Noel Grandin Reviewed-by: Noel Grandin diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index 87f50b534c26..71b0d0970fc3 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -1345,12 +1345,13 @@ void SAL_CALL ColorPicker::setDialogTitle( const OUString& ) void SAL_CALL ColorPicker::startExecuteModal( const css::uno::Reference< css::ui::dialogs::XDialogClosedListener >& xListener ) { std::shared_ptr xDlg = std::make_shared(Application::GetFrameWeld(mxParent), mnColor, mnMode); -weld::DialogController::runAsync(xDlg, [this, xDlg, xListener] (sal_Int32 nResult) { +rtl::Reference xThis(this); +weld::DialogController::runAsync(xDlg, [xThis, xDlg, xListener] (sal_Int32 nResult) { if (nResult) -mnColor = xDlg->GetColor(); +xThis->mnColor = xDlg->GetColor(); sal_Int16 nRet = static_cast(nResult); -css::ui::dialogs::DialogClosedEvent aEvent( *this, nRet ); +css::ui::dialogs::DialogClosedEvent aEvent( *xThis, nRet ); xListener->dialogClosed( aEvent ); }); } diff --git a/include/svx/PaletteManager.hxx b/include/svx/PaletteManager.hxx index f2711b2e022a..81f30ea7de76 100644 --- a/include/svx/PaletteManager.hxx +++ b/include/svx/PaletteManager.hxx @@ -33,7 +33,7 @@ namespace svx { class ToolboxButtonColorUpdaterBase; } namespace weld { class Window; } namespace model { class ColorSet; } -class SVXCORE_DLLPUBLIC PaletteManager +class SVXCORE_DLLPUBLIC PaletteManager : public std::enable_shared_from_this { const sal_uInt16mnMaxRecentColors; diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx index 234002006a5e..a98149ff30bb 100644 --- a/svx/source/tbxctrls/PaletteManager.cxx +++ b/svx/source/tbxctrls/PaletteManager.cxx @@ -405,15 +405,16 @@ void PaletteManager::PopupColorPicker(weld::Window* pParent, const OUString& aCo m_pColorDlg = std::make_unique(); m_pColorDlg->SetColor(rInitialColor); m_pColorDlg->SetMode(svtools::ColorPickerMode::Modify); -m_pColorDlg->ExecuteAsync(pParent, [this, aCommandCopy] (sal_Int32 nResult) { +std::shared_ptr xSelf(shared_from_this()); +m_pColorDlg->ExecuteAsync(pParent, [xSelf, aCommandCopy] (sal_Int32 nResult) { if (nResult == RET_OK) { -Color aLastColor = m_pColorDlg->GetColor(); +Color aLastColor = xSelf->m_pColorDlg->GetColor(); OUString sColorName = "#" + aLastColor.AsRGBHexString().toAsciiUpperCase(); NamedColor aNamedColor(aLastColor, sColorName); -SetSplitButtonColor(aNamedColor); -AddRecentColor(aLastColor, sColorName); -maColorSelectFunction(aCommandCopy, aNamedColor); +xSelf->SetSplitButtonColor(aNamedColor); +xSelf->AddRecentColor(aLastColor, sColorName); +xSelf->maColorSelectFunction(aCommandCopy, aNamedColor); } }); }
core.git: cui/source cui/uiconfig
cui/source/options/optcolor.cxx | 205 +++ cui/source/options/optcolor.hxx |2 cui/uiconfig/ui/optappearancepage.ui | 62 +++--- 3 files changed, 183 insertions(+), 86 deletions(-) New commits: commit 0cd74b5be297f638d455b9b267462192f2e6620c Author: Balazs Varga AuthorDate: Tue Dec 19 20:54:39 2023 +0100 Commit: Balazs Varga CommitDate: Thu Dec 21 00:22:27 2023 +0100 tdf#158759 - UI: Part 56 - Unify lockdown behavior of Options dialog for General - Application Colors Page. Change-Id: I2fb6c73cef82c12c3c8f3c49fb0e4b62703a1de3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161030 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index c8841205f3b4..f1e1b8a26b18 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -21,6 +21,8 @@ #include +#include +#include #include #include #include @@ -36,6 +38,8 @@ #include #include #include +#include +#include using namespace ::com::sun::star; using namespace ::svtools; @@ -87,6 +91,8 @@ struct OUString pColor; // has checkbox? bool bCheckBox; +//prop name +std::u16string_view sPropName; } const vEntryInfo[] = { @@ -98,67 +104,67 @@ const vEntryInfo[] = // The list of these entries (enum ColorConfigEntry) are in colorcfg.hxx. -{ Group_General, IDS(doccolor) }, -{ Group_General, IDS_CB(docboundaries) }, -{ Group_General, IDS(appback) }, -{ Group_General, IDS_CB(objboundaries) }, -{ Group_General, IDS_CB(tblboundaries) }, -{ Group_General, IDS(font) }, -{ Group_General, IDS_CB(unvisitedlinks) }, -{ Group_General, IDS_CB(visitedlinks) }, -{ Group_General, IDS(autospellcheck) }, -{ Group_General, IDS(grammarcheck) }, -{ Group_General, IDS(smarttags) }, -{ Group_General, IDS_CB(shadows) }, - -{ Group_Writer, IDS(writergrid) }, -{ Group_Writer, IDS_CB(field) }, -{ Group_Writer, IDS_CB(index) }, -{ Group_Writer, IDS(direct) }, -{ Group_Writer, IDS(script) }, -{ Group_Writer, IDS_CB(section) }, -{ Group_Writer, IDS(hdft) }, -{ Group_Writer, IDS(pagebreak) }, - -{ Group_Html,IDS(sgml) }, -{ Group_Html,IDS(htmlcomment) }, -{ Group_Html,IDS(htmlkeyword) }, -{ Group_Html,IDS(unknown) }, - -{ Group_Calc,IDS(calcgrid) }, -{ Group_Calc,IDS(brk) }, -{ Group_Calc,IDS(brkmanual) }, -{ Group_Calc,IDS(brkauto) }, -{ Group_Calc,IDS_CB(hiddencolrow) }, -{ Group_Calc,IDS_CB(textoverflow) }, -{ Group_Calc,IDS(comments) }, -{ Group_Calc,IDS(det) }, -{ Group_Calc,IDS(deterror) }, -{ Group_Calc,IDS(ref) }, -{ Group_Calc,IDS(notes) }, -{ Group_Calc,IDS(values) }, -{ Group_Calc,IDS(formulas) }, -{ Group_Calc,IDS(text) }, -{ Group_Calc,IDS(protectedcells) }, - -{ Group_Draw,IDS(drawgrid) }, - -{ Group_Basic, IDS(basiceditor) }, -{ Group_Basic, IDS(basicid) }, -{ Group_Basic, IDS(basiccomment) }, -{ Group_Basic, IDS(basicnumber) }, -{ Group_Basic, IDS(basicstring) }, -{ Group_Basic, IDS(basicop) }, -{ Group_Basic, IDS(basickeyword) }, -{ Group_Basic, IDS(error) }, - -{ Group_Sql, IDS(sqlid) }, -{ Group_Sql, IDS(sqlnumber) }, -{ Group_Sql, IDS(sqlstring) }, -{ Group_Sql, IDS(sqlop) }, -{ Group_Sql, IDS(sqlkeyword) }, -{ Group_Sql, IDS(sqlparam) }, -{ Group_Sql, IDS(sqlcomment) } +{ Group_General, IDS(doccolor), std::u16string_view(u"/DocColor") }, +{ Group_General, IDS_CB(docboundaries), std::u16string_view(u"/DocBoundaries") }, +{ Group_General, IDS(appback), std::u16string_view(u"/AppBackground") }, +{ Group_General, IDS_CB(objboundaries), std::u16string_view(u"/ObjectBoundaries") }, +{ Group_General, IDS_CB(tblboundaries), std::u16string_view(u"/TableBoundaries") }, +{ Group_General, IDS(font), std::u16string_view(u"/FontColor") }, +{ Group_General, IDS_CB(unvisitedlinks), std::u16string_view(u"/Links") }, +{ Group_General, IDS_CB(visitedlinks), std::u16string_view(u"/LinksVisited") }, +{ Group_General, IDS(autospellcheck), std::u16string_view(u"/Spell") }, +{ Group_General, IDS(grammarcheck), std::u16string_view(u"/Grammar") }, +{ Group_General, IDS(smarttags), std::u16string_view(u"/SmartTags") }, +{ Group_General, IDS_CB(shadows), std::u16string_view(u"/Shadow") }, + +{ Group_Writer, IDS(writergrid), std::u16string_view(u"/WriterTextGrid") }, +{ Group_Writer, IDS_CB(field), std::u16string_view(u"/WriterFieldShadings") }, +{ Group_Writer, IDS_CB(index), std::u16string_view(u"/WriterIdxShadings") }, +{ Group_Writer, IDS(direct), std::u16string_view(u"/WriterDirectCursor") }, +{ Group_Writer,
core.git: cui/source
cui/source/options/optupdt.cxx | 37 ++--- cui/source/options/optupdt.hxx |4 +++- cui/source/options/treeopt.cxx |7 +++ 3 files changed, 28 insertions(+), 20 deletions(-) New commits: commit 30ab6dd73a15781abce9153105ec43ee887aace1 Author: Stephan Bergmann AuthorDate: Tue Dec 19 10:47:57 2023 +0100 Commit: Stephan Bergmann CommitDate: Tue Dec 19 14:13:25 2023 +0100 Hide --enable-online-updaet-mar GUI behind ExperimentalMode for now (and rename SvxOnlineUpdateTabPage's is...OnlineUpdateEnabled predicates to is...OnlineUpdaetAvailable, to avoid the overloaded term "enabled" here) Change-Id: I639ac72a17b98c883ff3082747b8576099299867 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160975 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx index e8f4ee21c214..e3b855b15d1d 100644 --- a/cui/source/options/optupdt.cxx +++ b/cui/source/options/optupdt.cxx @@ -52,7 +52,8 @@ using namespace ::css; SvxOnlineUpdateTabPage::SvxOnlineUpdateTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) : SfxTabPage(pPage, pController, "cui/ui/optonlineupdatepage.ui", "OptOnlineUpdatePage", ) -, m_showTraditionalOnlineUpdate(isTraditionalOnlineUpdateEnabled()) +, m_showTraditionalOnlineUpdate(isTraditionalOnlineUpdateAvailable()) +, m_showMarOnlineUpdate(isMarOnlineUpdateAvailable()) , m_xNeverChecked(m_xBuilder->weld_label("neverchecked")) , m_xAutoCheckCheckBox(m_xBuilder->weld_check_button("autocheck")) , m_xAutoCheckImg(m_xBuilder->weld_widget("lockautocheck")) @@ -121,12 +122,12 @@ SvxOnlineUpdateTabPage::SvxOnlineUpdateTabPage(weld::Container* pPage, weld::Dia m_xPrivacyPolicyButton->hide(); } -#if HAVE_FEATURE_UPDATE_MAR -m_xMar->show(); - m_xEnableMar->set_sensitive(!officecfg::Office::Update::Update::Enabled::isReadOnly()); -#else -m_xMar->hide(); -#endif +if (m_showMarOnlineUpdate) { +m_xMar->show(); + m_xEnableMar->set_sensitive(!officecfg::Office::Update::Update::Enabled::isReadOnly()); +} else { +m_xMar->hide(); +} } SvxOnlineUpdateTabPage::~SvxOnlineUpdateTabPage() @@ -325,14 +326,12 @@ bool SvxOnlineUpdateTabPage::FillItemSet( SfxItemSet* ) xChangesBatch->commitChanges(); } -#if HAVE_FEATURE_UPDATE_MAR -if (m_xEnableMar->get_state_changed_from_saved()) { +if (m_showMarOnlineUpdate && m_xEnableMar->get_state_changed_from_saved()) { auto batch(comphelper::ConfigurationChanges::create()); officecfg::Office::Update::Update::Enabled::set(m_xEnableMar->get_active(), batch); batch->commit(); bModified = true; } -#endif return bModified; } @@ -400,10 +399,10 @@ void SvxOnlineUpdateTabPage::Reset( const SfxItemSet* ) m_xAutoDownloadCheckBox->save_state(); } -#if HAVE_FEATURE_UPDATE_MAR - m_xEnableMar->set_active(officecfg::Office::Update::Update::Enabled::get()); -m_xEnableMar->save_state(); -#endif +if (m_showMarOnlineUpdate) { + m_xEnableMar->set_active(officecfg::Office::Update::Update::Enabled::get()); +m_xEnableMar->save_state(); +} } void SvxOnlineUpdateTabPage::FillUserData() @@ -493,7 +492,7 @@ IMPL_LINK_NOARG(SvxOnlineUpdateTabPage, CheckNowHdl_Impl, weld::Button&, void) } } -bool SvxOnlineUpdateTabPage::isTraditionalOnlineUpdateEnabled() { +bool SvxOnlineUpdateTabPage::isTraditionalOnlineUpdateAvailable() { try { css::uno::Reference < css::uno::XInterface > xService( setup::UpdateCheck::create( ::comphelper::getProcessComponentContext() ) ); @@ -506,4 +505,12 @@ bool SvxOnlineUpdateTabPage::isTraditionalOnlineUpdateEnabled() { return false; } +bool SvxOnlineUpdateTabPage::isMarOnlineUpdateAvailable() { +#if HAVE_FEATURE_UPDATE_MAR +return officecfg::Office::Common::Misc::ExperimentalMode::get(); +#else +return false; +#endif +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/options/optupdt.hxx b/cui/source/options/optupdt.hxx index b6e7e4c448f4..48113c8079d6 100644 --- a/cui/source/options/optupdt.hxx +++ b/cui/source/options/optupdt.hxx @@ -29,6 +29,7 @@ class SvxOnlineUpdateTabPage : public SfxTabPage { private: bool m_showTraditionalOnlineUpdate; +bool m_showMarOnlineUpdate; OUString m_aNeverChecked; OUString m_aLastCheckedTemplate; @@ -79,7 +80,8 @@ public: virtual voidReset( const SfxItemSet* rSet ) override; virtual voidFillUserData() override; -static bool isTraditionalOnlineUpdateEnabled(); +static bool isTraditionalOnlineUpdateAvailable(); +static bool isMarOnlineUpdateAvailable(); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/options/treeopt.cxx
core.git: cui/source
cui/source/options/optaboutconfig.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 3174749bb826fd653c923cadc98c7045a70bfd2f Author: Samuel Mehrbrodt AuthorDate: Mon Dec 18 15:28:27 2023 +0100 Commit: Samuel Mehrbrodt CommitDate: Mon Dec 18 17:31:44 2023 +0100 tdf#158720 Fix crash when searching expert config with gen vcl plugin Change-Id: Ida2f17c8dfb638bb6791dba32ae3b190b06254de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160920 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index dc4e8ffeb67c..78dc234ffbe6 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -1072,7 +1072,6 @@ void CuiAboutConfigTabPage::InsertEntry(const prefBoxEntry& rEntry) m_xPrefBox->set_text(*xParentEntry, "", 1); m_xPrefBox->set_text(*xParentEntry, "", 2); m_xPrefBox->set_text(*xParentEntry, "", 3); -m_xPrefBox->set_text_emphasis(*m_xScratchIter, rEntry.pUserData->bWasModified, -1); m_xPrefBox->set_sensitive(*xParentEntry, true); }
core.git: cui/source include/svtools svtools/source sw/source
cui/source/tabpages/page.cxx | 16 ++--- include/svtools/optionsdrawinglayer.hxx |8 -- svtools/source/config/optionsdrawinglayer.cxx | 31 -- sw/source/uibase/sidebar/PageFormatPanel.cxx |6 ++--- 4 files changed, 11 insertions(+), 50 deletions(-) New commits: commit c498e2acd64688df9aa32bbcc820d8513a5373ea Author: Gabor Kelemen AuthorDate: Mon Nov 13 01:02:08 2023 +0100 Commit: Thorsten Behrens CommitDate: Sat Dec 16 01:30:20 2023 +0100 Drop some wrapper methods from SvtOptionsDrawinglayer just use the wrapped officecfg methods instead of: GetMaximumPaperWidth GetMaximumPaperHeight GetMaximumPaperLeftMargin GetMaximumPaperRightMargin GetMaximumPaperTopMargin GetMaximumPaperBottomMargin Change-Id: Id11782a306ca9118cc65607265be516ba9f0abda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160653 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index d810a9471dce..0fec60690e9a 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -49,13 +49,13 @@ #include #include #include -#include #include #include #include #include #include #include +#include // static @@ -276,16 +276,16 @@ SvxPageDescPage::SvxPageDescPage(weld::Container* pPage, weld::DialogController* // #i4219# take Maximum now from configuration (1/100th cm) // was: 11900 -> 119 cm ;new value 3 meters -> 300 cm -> 3 - m_xPaperWidthEdit->set_max(m_xPaperWidthEdit->normalize(SvtOptionsDrawinglayer::GetMaximumPaperWidth()), FieldUnit::CM); - m_xPaperHeightEdit->set_max(m_xPaperHeightEdit->normalize(SvtOptionsDrawinglayer::GetMaximumPaperHeight()), FieldUnit::CM); + m_xPaperWidthEdit->set_max(m_xPaperWidthEdit->normalize(officecfg::Office::Common::Drawinglayer::MaximumPaperWidth::get()), FieldUnit::CM); + m_xPaperHeightEdit->set_max(m_xPaperHeightEdit->normalize(officecfg::Office::Common::Drawinglayer::MaximumPaperHeight::get()), FieldUnit::CM); // #i4219# also for margins (1/100th cm). Was: , keeping. - m_xLeftMarginEdit->set_max(m_xLeftMarginEdit->normalize(SvtOptionsDrawinglayer::GetMaximumPaperLeftMargin()), FieldUnit::MM); - m_xRightMarginEdit->set_max(m_xRightMarginEdit->normalize(SvtOptionsDrawinglayer::GetMaximumPaperRightMargin()), FieldUnit::MM); - m_xTopMarginEdit->set_max(m_xTopMarginEdit->normalize(SvtOptionsDrawinglayer::GetMaximumPaperTopMargin()), FieldUnit::MM); - m_xBottomMarginEdit->set_max(m_xBottomMarginEdit->normalize(SvtOptionsDrawinglayer::GetMaximumPaperBottomMargin()), FieldUnit::MM); + m_xLeftMarginEdit->set_max(m_xLeftMarginEdit->normalize(officecfg::Office::Common::Drawinglayer::MaximumPaperLeftMargin::get()), FieldUnit::MM); + m_xRightMarginEdit->set_max(m_xRightMarginEdit->normalize(officecfg::Office::Common::Drawinglayer::MaximumPaperRightMargin::get()), FieldUnit::MM); + m_xTopMarginEdit->set_max(m_xTopMarginEdit->normalize(officecfg::Office::Common::Drawinglayer::MaximumPaperTopMargin::get()), FieldUnit::MM); + m_xBottomMarginEdit->set_max(m_xBottomMarginEdit->normalize(officecfg::Office::Common::Drawinglayer::MaximumPaperBottomMargin::get()), FieldUnit::MM); m_xGutterMarginEdit->set_max( - m_xGutterMarginEdit->normalize(SvtOptionsDrawinglayer::GetMaximumPaperLeftMargin()), + m_xGutterMarginEdit->normalize(officecfg::Office::Common::Drawinglayer::MaximumPaperLeftMargin::get()), FieldUnit::MM); // Get the i18n framework numberings and add them to the listbox. diff --git a/include/svtools/optionsdrawinglayer.hxx b/include/svtools/optionsdrawinglayer.hxx index ef7b96bbba58..a29d2899fef4 100644 --- a/include/svtools/optionsdrawinglayer.hxx +++ b/include/svtools/optionsdrawinglayer.hxx @@ -42,14 +42,6 @@ namespace SvtOptionsDrawinglayer SVT_DLLPUBLIC Color GetStripeColorA(); SVT_DLLPUBLIC Color GetStripeColorB(); -// #i4219# -SVT_DLLPUBLIC sal_uInt32 GetMaximumPaperWidth(); -SVT_DLLPUBLIC sal_uInt32 GetMaximumPaperHeight(); -SVT_DLLPUBLIC sal_uInt32 GetMaximumPaperLeftMargin(); -SVT_DLLPUBLIC sal_uInt32 GetMaximumPaperRightMargin(); -SVT_DLLPUBLIC sal_uInt32 GetMaximumPaperTopMargin(); -SVT_DLLPUBLIC sal_uInt32 GetMaximumPaperBottomMargin(); - // #i95644# helper to check if AA is allowed on this system. Currently, for WIN it's disabled // and OutDevSupportType::TransparentRect is checked (this hits XRenderExtension, e.g. // currently for SunRay as long as not supported there) diff --git a/svtools/source/config/optionsdrawinglayer.cxx b/svtools/source/config/optionsdrawinglayer.cxx index f6beb66fa330..edb91e41fc34 100644 --- a/svtools/source/config/optionsdrawinglayer.cxx +++ b/svtools/source/config/optionsdrawinglayer.cxx @@ -43,37 +43,6 @@
core.git: cui/source include/svtools svtools/source svx/source
cui/source/tabpages/grfpage.cxx |3 ++- include/svtools/optionsdrawinglayer.hxx |4 svtools/source/config/optionsdrawinglayer.cxx |5 - svx/source/svdraw/sdrpaintwindow.cxx |3 ++- svx/source/svdraw/svddrgmt.cxx|5 +++-- 5 files changed, 7 insertions(+), 13 deletions(-) New commits: commit 9a71ac689a7d5929f66df23f9fcc707bdb146e3f Author: Gabor Kelemen AuthorDate: Thu Nov 2 11:47:07 2023 +0100 Commit: Thorsten Behrens CommitDate: Sat Dec 16 01:22:24 2023 +0100 Drop some wrapper methods from SvtOptionsDrawinglayer just use the wrapped officecfg methods instead of: GetStripeLength Change-Id: Id29c0b1ecbc513b5d778140b6e59139a507035d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160652 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index fac0bfb6ab05..a12ffb0ea544 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -40,6 +40,7 @@ #include #include #include +#include constexpr auto CM_1_TO_TWIP = o3tl::convert(1, o3tl::Length::cm, o3tl::Length::twip); // 567 @@ -774,7 +775,7 @@ void SvxCropExample::Paint(vcl::RenderContext& rRenderContext, const ::tools::Re // the former used XOR paint. const Color aColA(SvtOptionsDrawinglayer::GetStripeColorA().getBColor()); const Color aColB(SvtOptionsDrawinglayer::GetStripeColorB().getBColor()); -const double fStripeLength(SvtOptionsDrawinglayer::GetStripeLength()); +const double fStripeLength(officecfg::Office::Common::Drawinglayer::StripeLength::get()); const basegfx::B2DVector aDashVector(rRenderContext.GetInverseViewTransformation() * basegfx::B2DVector(fStripeLength, 0.0)); const double fLogicDashLength(aDashVector.getX()); diff --git a/include/svtools/optionsdrawinglayer.hxx b/include/svtools/optionsdrawinglayer.hxx index 8a0948d9da1b..ef7b96bbba58 100644 --- a/include/svtools/optionsdrawinglayer.hxx +++ b/include/svtools/optionsdrawinglayer.hxx @@ -36,15 +36,11 @@ namespace SvtOptionsDrawinglayer GetStripeColorB() SetStripeColorB() => Set second of two colors which overlay uses to draw stripes -GetStripeLength() -SetStripeLength() => Set length of a single stripe in pixels - @seealsoconfiguration package "org.openoffice.Office.Common/Drawinglayer" *//*-*/ SVT_DLLPUBLIC Color GetStripeColorA(); SVT_DLLPUBLIC Color GetStripeColorB(); -SVT_DLLPUBLIC sal_uInt16 GetStripeLength(); // #i4219# SVT_DLLPUBLIC sal_uInt32 GetMaximumPaperWidth(); diff --git a/svtools/source/config/optionsdrawinglayer.cxx b/svtools/source/config/optionsdrawinglayer.cxx index c041d281cf91..f6beb66fa330 100644 --- a/svtools/source/config/optionsdrawinglayer.cxx +++ b/svtools/source/config/optionsdrawinglayer.cxx @@ -43,11 +43,6 @@ Color GetStripeColorB() return Color(ColorTransparency, officecfg::Office::Common::Drawinglayer::StripeColorB::get()); } -sal_uInt16 GetStripeLength() -{ -return officecfg::Office::Common::Drawinglayer::StripeLength::get(); -} - // #i4219# sal_uInt32 GetMaximumPaperWidth() { diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx index ebed55326a57..bf66375f41e6 100644 --- a/svx/source/svdraw/sdrpaintwindow.cxx +++ b/svx/source/svdraw/sdrpaintwindow.cxx @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -187,7 +188,7 @@ void SdrPaintView::InitOverlayManager(rtl::ReferencesetStripeColorA(aColA); xOverlayManager->setStripeColorB(aColB); - xOverlayManager->setStripeLengthPixel(SvtOptionsDrawinglayer::GetStripeLength()); + xOverlayManager->setStripeLengthPixel(officecfg::Office::Common::Drawinglayer::StripeLength::get()); } rtl::Reference SdrPaintView::CreateOverlayManager(OutputDevice& rOutputDevice) const diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index 1d6d379fce85..b80014718257 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -67,6 +67,7 @@ #include #include #include +#include #include #include #include @@ -102,7 +103,7 @@ drawinglayer::primitive2d::Primitive2DContainer SdrDragEntryPolyPolygon::createP rDragMethod.applyCurrentTransformationToPolyPolygon(aCopy); basegfx::BColor aColA(SvtOptionsDrawinglayer::GetStripeColorA().getBColor()); basegfx::BColor aColB(SvtOptionsDrawinglayer::GetStripeColorB().getBColor()); -const double fStripeLength(SvtOptionsDrawinglayer::GetStripeLength()); +const double fStripeLength(officecfg::Office::Common::Drawinglayer::StripeLength::get());
core.git: cui/source cui/uiconfig
cui/source/options/optupdt.cxx |2 ++ cui/uiconfig/ui/optonlineupdatepage.ui |8 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) New commits: commit 92b7f110a9a4b61c01a921bfa65b3951a8386b62 Author: Michael Weghorn AuthorDate: Fri Dec 15 14:31:12 2023 +0100 Commit: Stephan Bergmann CommitDate: Fri Dec 15 16:08:45 2023 +0100 Fix placement for --enable-online-update-mar UI * Resave with glade 3.40, which did all the changes to the .ui file * to be safe, explicitly hide the UI in the C++ code when building without `--enable-online-update-mar` (UI wasn't shown in a quick test with qt6 even without that, but better be safe) Addresses this issue mentioned in [1]: > - Online Update". (For non-GTK VCL backends, there's still a bug that > the "Automatic Update" section on that options page is mixed into the > traditional --enable-online-update options at the top of the page, > instead of down at the bottom; fixing of > cui/uiconfig/ui/optonlineupdatepage.ui welcome...) [1] https://lists.freedesktop.org/archives/libreoffice/2023-December/091309.html Change-Id: I2fadbb3b93206834b8c2c17cb540fb0b0687742b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160830 Reviewed-by: Stephan Bergmann Tested-by: Jenkins diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx index 8ce74bb1fa52..e8f4ee21c214 100644 --- a/cui/source/options/optupdt.cxx +++ b/cui/source/options/optupdt.cxx @@ -124,6 +124,8 @@ SvxOnlineUpdateTabPage::SvxOnlineUpdateTabPage(weld::Container* pPage, weld::Dia #if HAVE_FEATURE_UPDATE_MAR m_xMar->show(); m_xEnableMar->set_sensitive(!officecfg::Office::Update::Update::Enabled::isReadOnly()); +#else +m_xMar->hide(); #endif } diff --git a/cui/uiconfig/ui/optonlineupdatepage.ui b/cui/uiconfig/ui/optonlineupdatepage.ui index 74a76e8a7510..e49181627560 100644 --- a/cui/uiconfig/ui/optonlineupdatepage.ui +++ b/cui/uiconfig/ui/optonlineupdatepage.ui @@ -1,5 +1,5 @@ - + @@ -520,7 +520,6 @@ -False False 0 none @@ -551,6 +550,11 @@ + +False +True +4 +
core.git: cui/source cui/uiconfig
cui/source/options/optupdt.cxx | 315 +++-- cui/source/options/optupdt.hxx |9 cui/source/options/treeopt.cxx | 17 - cui/uiconfig/ui/optonlineupdatepage.ui | 38 +++ 4 files changed, 237 insertions(+), 142 deletions(-) New commits: commit 5d2c5b09c9e7940b2285180b42e6e574063b693e Author: Stephan Bergmann AuthorDate: Thu Dec 7 15:22:02 2023 +0100 Commit: Stephan Bergmann CommitDate: Thu Dec 7 16:26:46 2023 +0100 GUI to en-/disable the --enable-online-update-mar feature at runtime ...sharing the existing option tab page for the traditional --enable-online-update feature Change-Id: Ic7b04bf15bf841a46a96d62cf5a857deaa399428 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160430 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx index 1c396b1fc217..8ce74bb1fa52 100644 --- a/cui/source/options/optupdt.cxx +++ b/cui/source/options/optupdt.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include #include #include #include @@ -34,12 +35,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -49,6 +52,7 @@ using namespace ::css; SvxOnlineUpdateTabPage::SvxOnlineUpdateTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) : SfxTabPage(pPage, pController, "cui/ui/optonlineupdatepage.ui", "OptOnlineUpdatePage", ) +, m_showTraditionalOnlineUpdate(isTraditionalOnlineUpdateEnabled()) , m_xNeverChecked(m_xBuilder->weld_label("neverchecked")) , m_xAutoCheckCheckBox(m_xBuilder->weld_check_button("autocheck")) , m_xAutoCheckImg(m_xBuilder->weld_widget("lockautocheck")) @@ -67,36 +71,60 @@ SvxOnlineUpdateTabPage::SvxOnlineUpdateTabPage(weld::Container* pPage, weld::Dia , m_xExtrasImg(m_xBuilder->weld_widget("lockextrabits")) , m_xUserAgentLabel(m_xBuilder->weld_label("useragent")) , m_xPrivacyPolicyButton(m_xBuilder->weld_link_button("btnPrivacyPolicy")) +, m_xBox2(m_xBuilder->weld_box("box2")) +, m_xFrameDest(m_xBuilder->weld_frame("frameDest")) +, m_xFrameAgent(m_xBuilder->weld_frame("frameAgent")) +, m_xMar(m_xBuilder->weld_frame("frameMar")) +, m_xEnableMar(m_xBuilder->weld_check_button("enableMar")) { -m_aNeverChecked = m_xNeverChecked->get_label(); +if (m_showTraditionalOnlineUpdate) { +m_aNeverChecked = m_xNeverChecked->get_label(); -m_xAutoCheckCheckBox->connect_toggled( LINK( this, SvxOnlineUpdateTabPage, AutoCheckHdl_Impl ) ); -m_xExtrasCheckBox->connect_toggled( LINK( this, SvxOnlineUpdateTabPage, ExtrasCheckHdl_Impl ) ); -m_xCheckNowButton->connect_clicked( LINK( this, SvxOnlineUpdateTabPage, CheckNowHdl_Impl ) ); -m_xChangePathButton->connect_clicked( LINK( this, SvxOnlineUpdateTabPage, FileDialogHdl_Impl ) ); -m_xPrivacyPolicyButton->set_uri( -officecfg::Office::Common::Menus::PrivacyPolicyURL::get() -+ "?type=updatecheck=" + utl::ConfigManager::getProductVersion() -+ "=" + LanguageTag(utl::ConfigManager::getUILocale()).getBcp47()); +m_xAutoCheckCheckBox->connect_toggled( LINK( this, SvxOnlineUpdateTabPage, AutoCheckHdl_Impl ) ); +m_xExtrasCheckBox->connect_toggled( LINK( this, SvxOnlineUpdateTabPage, ExtrasCheckHdl_Impl ) ); +m_xCheckNowButton->connect_clicked( LINK( this, SvxOnlineUpdateTabPage, CheckNowHdl_Impl ) ); +m_xChangePathButton->connect_clicked( LINK( this, SvxOnlineUpdateTabPage, FileDialogHdl_Impl ) ); +m_xPrivacyPolicyButton->set_uri( +officecfg::Office::Common::Menus::PrivacyPolicyURL::get() ++ "?type=updatecheck=" + utl::ConfigManager::getProductVersion() ++ "=" + LanguageTag(utl::ConfigManager::getUILocale()).getBcp47()); -uno::Reference < uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); +uno::Reference < uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); -m_xUpdateAccess = setup::UpdateCheckConfig::create( xContext ); -m_xReadWriteAccess = css::configuration::ReadWriteAccess::create(xContext, "*"); +m_xUpdateAccess = setup::UpdateCheckConfig::create( xContext ); +m_xReadWriteAccess = css::configuration::ReadWriteAccess::create(xContext, "*"); -bool bDownloadSupported = false; -m_xUpdateAccess->getByName( "DownloadSupported" ) >>= bDownloadSupported; +bool bDownloadSupported = false; +m_xUpdateAccess->getByName( "DownloadSupported" ) >>= bDownloadSupported; -m_xAutoDownloadCheckBox->set_visible(bDownloadSupported); -m_xDestPathLabel->set_visible(bDownloadSupported); -m_xDestPath->set_visible(bDownloadSupported); -
[Libreoffice-commits] core.git: cui/source editeng/source oox/source reportdesign/source sc/source soltools/mkdepend sw/source vcl/source
cui/source/dialogs/SpellDialog.cxx |5 - editeng/source/misc/svxacorr.cxx | 10 -- oox/source/drawingml/texteffectscontext.cxx |5 +++-- reportdesign/source/filter/xml/xmlExport.cxx |1 + sc/source/core/data/SolverSettings.cxx |4 +++- sc/source/ui/namedlg/namedefdlg.cxx |8 ++-- soltools/mkdepend/collectdircontent.cxx |1 + sw/source/core/layout/paintfrm.cxx |2 +- vcl/source/cnttype/mcnttype.cxx |4 +++- 9 files changed, 30 insertions(+), 10 deletions(-) New commits: commit bc95ece0618b9886890d9c758b9d0ebc0fc41c69 Author: Julien Nabet AuthorDate: Mon Dec 4 18:03:27 2023 +0100 Commit: Julien Nabet CommitDate: Mon Dec 4 19:21:31 2023 +0100 cid#1546021 Using invalid iterator and : cid#1545983 Using invalid iterator cid#1545969 Using invalid iterator cid#1545949 Using invalid iterator cid#1545929 Using invalid iterator cid#1545911 Using invalid iterator cid#1545910 Using invalid iterator cid#1545886 Using invalid iterator cid#1545870 Using invalid iterator cid#1545813 Using invalid iterator Change-Id: I2ad10c2a9affd348050a4abe0917a90927a52547 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160317 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 3ad9c2b196b0..dfdad984ec41 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -1247,7 +1247,10 @@ namespace void ExtractErrorDescription(const EECharAttrib& rEECharAttrib, SpellErrorDescription& rSpellErrorDescription) { css::uno::Sequence aSequence; -static_cast(rEECharAttrib.pAttr)->GetGrabBag().find("SpellErrorDescription")->second >>= aSequence; +const auto pGrabBag = static_cast(rEECharAttrib.pAttr)->GetGrabBag(); +const auto iter = pGrabBag.find("SpellErrorDescription"); +assert(iter != pGrabBag.end()); +iter->second >>= aSequence; rSpellErrorDescription.fromSequence(aSequence); } } diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 8a28ccf42ada..6fdcbcca1ccf 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -1750,7 +1750,11 @@ bool SvxAutoCorrect::AddWordStartException( const OUString& rNew, if (iter != m_aLangTable.end()) pLists = >second; else if(CreateLanguageFile(aLangTagUndetermined)) -pLists = _aLangTable.find(aLangTagUndetermined)->second; +{ +iter = m_aLangTable.find(aLangTagUndetermined); +assert(iter != m_aLangTable.end()); +pLists = >second; +} } OSL_ENSURE(pLists, "No auto correction file!"); return pLists && pLists->AddToWordStartExceptList(rNew); @@ -2030,7 +2034,9 @@ const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList( CreateLanguageFile(aLanguageTag, false)) { //the language is available - so bring it on -SvxAutoCorrectLanguageLists& rList = m_aLangTable.find(aLanguageTag)->second; +const auto iter = m_aLangTable.find(aLanguageTag); +assert(iter != m_aLangTable.end()); +SvxAutoCorrectLanguageLists& rList = iter->second; pRet = lcl_SearchWordsInList( , rTxt, rStt, nEndPos ); if( pRet ) { diff --git a/oox/source/drawingml/texteffectscontext.cxx b/oox/source/drawingml/texteffectscontext.cxx index 0e33a4c3c13b..347971f4616b 100644 --- a/oox/source/drawingml/texteffectscontext.cxx +++ b/oox/source/drawingml/texteffectscontext.cxx @@ -91,8 +91,9 @@ OUString const & lclGetGrabBagName(sal_uInt32 aId) { OOX_TOKEN(w14, stylisticSets), "CharStylisticSetsTextEffect" }, { OOX_TOKEN(w14, cntxtAlts), "CharCntxtAltsTextEffect" }, }; - -return aGrabBagNameMap.find(aId)->second; +const auto iter = aGrabBagNameMap.find(aId); +assert(iter != aGrabBagNameMap.end()); +return iter->second; } } diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx index 6e7104724704..c1b2c24232d9 100644 --- a/reportdesign/source/filter/xml/xmlExport.cxx +++ b/reportdesign/source/filter/xml/xmlExport.cxx @@ -755,6 +755,7 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection) TGrid::const_iterator aRowEnd = aFind->second.end(); TGridStyleMap::const_iterator aRowFind = m_aRowStyleNames.find(_xSection); +assert(aRowFind != m_aRowStyleNames.end()); auto aHeightIter = aRowFind->second.cbegin(); OSL_ENSURE(aRowFind->second.size() == aFind->second.size(),"Different count for rows"); diff --git a/sc/source/core/data/SolverSettings.cxx b/sc/source/core/data/SolverSettings.cxx index ac2d2aa24aeb..60eb747f55f5 100644 --- a/sc/source/core/data/SolverSettings.cxx +++
[Libreoffice-commits] core.git: cui/source
cui/source/options/optaboutconfig.cxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit 1597968f5cd2534fb6e0be40fafecc305a004f4e Author: Samuel Mehrbrodt AuthorDate: Mon Dec 4 16:00:21 2023 +0100 Commit: Samuel Mehrbrodt CommitDate: Mon Dec 4 17:43:34 2023 +0100 tdf#155676 Properly support editing string lists Change-Id: I721e30aca03ddadd3a08e092e75accbd279bbec5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160315 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index b5d218ecadad..ea63035471ca 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -866,7 +866,12 @@ IMPL_LINK_NOARG(CuiAboutConfigTabPage, StandardHdl_Impl, weld::Button&, void) else if (sPropertyType == "string-list") { SvxListDialog aListDialog(m_xDialog.get()); -aListDialog.SetEntries(commaStringToSequence(sDialogValue)); +Reference xConfigAccess += getConfigAccess(pUserData->sPropertyPath, false); +Any aNode = xConfigAccess->getByName(sPropertyName); +uno::Sequence aList = aNode.get>(); +aListDialog.SetEntries( + comphelper::sequenceToContainer>(aList)); aListDialog.SetMode(ListMode::String); if (aListDialog.run() == RET_OK) {
[Libreoffice-commits] core.git: cui/source
cui/source/options/optaboutconfig.cxx | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) New commits: commit a5418fbe09860f770e8aa2f478023c0843bb05d8 Author: Samuel Mehrbrodt AuthorDate: Thu Nov 30 16:53:01 2023 +0100 Commit: Samuel Mehrbrodt CommitDate: Mon Dec 4 14:40:41 2023 +0100 tdf#158457 Use proper parent Change-Id: Ic7bd3a2ae4dd0e21186df30bf221cf14c3511ac4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160161 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index a3ccf7fe0206..b5d218ecadad 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -751,8 +751,8 @@ IMPL_LINK_NOARG(CuiAboutConfigTabPage, StandardHdl_Impl, weld::Button&, void) sal_Int64 nMax = sPropertyType == "short" ? SAL_MAX_INT16 : sPropertyType == "int" ? SAL_MAX_INT32 : SAL_MAX_INT64; -SvxNumberDialog aNumberDialog(m_pParent, sPropertyName, sDialogValue.toInt64(), - nMin, nMax); +SvxNumberDialog aNumberDialog(m_xDialog.get(), sPropertyName, + sDialogValue.toInt64(), nMin, nMax); if (aNumberDialog.run() == RET_OK) { sal_Int64 nNewValue = aNumberDialog.GetNumber(); @@ -774,7 +774,7 @@ IMPL_LINK_NOARG(CuiAboutConfigTabPage, StandardHdl_Impl, weld::Button&, void) } else if (sPropertyType == "double") { -SvxDecimalNumberDialog aNumberDialog(m_pParent, sPropertyName, +SvxDecimalNumberDialog aNumberDialog(m_xDialog.get(), sPropertyName, sDialogValue.toDouble()); if (aNumberDialog.run() == RET_OK) { @@ -786,7 +786,7 @@ IMPL_LINK_NOARG(CuiAboutConfigTabPage, StandardHdl_Impl, weld::Button&, void) } else if (sPropertyType == "string") { -SvxNameDialog aNameDialog(m_pParent, sDialogValue, sPropertyName); +SvxNameDialog aNameDialog(m_xDialog.get(), sDialogValue, sPropertyName); aNameDialog.SetCheckNameHdl(LINK(this, CuiAboutConfigTabPage, ValidNameHdl)); if (aNameDialog.run() == RET_OK) { @@ -797,7 +797,7 @@ IMPL_LINK_NOARG(CuiAboutConfigTabPage, StandardHdl_Impl, weld::Button&, void) } else if (sPropertyType == "short-list") { -SvxListDialog aListDialog(m_pParent); +SvxListDialog aListDialog(m_xDialog.get()); aListDialog.SetEntries(commaStringToSequence(sDialogValue)); aListDialog.SetMode(ListMode::Int16); if (aListDialog.run() == RET_OK) @@ -814,7 +814,7 @@ IMPL_LINK_NOARG(CuiAboutConfigTabPage, StandardHdl_Impl, weld::Button&, void) } else if (sPropertyType == "int-list") { -SvxListDialog aListDialog(m_pParent); +SvxListDialog aListDialog(m_xDialog.get()); aListDialog.SetEntries(commaStringToSequence(sDialogValue)); aListDialog.SetMode(ListMode::Int32); if (aListDialog.run() == RET_OK) @@ -831,7 +831,7 @@ IMPL_LINK_NOARG(CuiAboutConfigTabPage, StandardHdl_Impl, weld::Button&, void) } else if (sPropertyType == "long-list") { -SvxListDialog aListDialog(m_pParent); +SvxListDialog aListDialog(m_xDialog.get()); aListDialog.SetEntries(commaStringToSequence(sDialogValue)); aListDialog.SetMode(ListMode::Int64); if (aListDialog.run() == RET_OK) @@ -848,7 +848,7 @@ IMPL_LINK_NOARG(CuiAboutConfigTabPage, StandardHdl_Impl, weld::Button&, void) } else if (sPropertyType == "double-list") { -SvxListDialog aListDialog(m_pParent); +SvxListDialog aListDialog(m_xDialog.get()); aListDialog.SetEntries(commaStringToSequence(sDialogValue)); aListDialog.SetMode(ListMode::Double); if (aListDialog.run() == RET_OK) @@ -865,7 +865,7 @@ IMPL_LINK_NOARG(CuiAboutConfigTabPage, StandardHdl_Impl, weld::Button&, void) } else if (sPropertyType == "string-list") { -SvxListDialog aListDialog(m_pParent); +SvxListDialog aListDialog(m_xDialog.get()); aListDialog.SetEntries(commaStringToSequence(sDialogValue)); aListDialog.SetMode(ListMode::String); if (aListDialog.run() == RET_OK)
[Libreoffice-commits] core.git: cui/source
cui/source/options/optaboutconfig.cxx | 140 -- 1 file changed, 83 insertions(+), 57 deletions(-) New commits: commit 7976f67600670f789f36232e390f838cf3e00830 Author: Samuel Mehrbrodt AuthorDate: Mon Dec 4 10:54:28 2023 +0100 Commit: Samuel Mehrbrodt CommitDate: Mon Dec 4 12:29:58 2023 +0100 Expert config: Allow editing settings without default value Fix fallout from 700ac29771ccec2d66934f66b45a33a48a5ac3f1 Change-Id: I194912d59e65c3b1245e5f9d107e4d2e8324e731 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160294 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index 885ea189a8c5..a3ccf7fe0206 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -400,7 +400,7 @@ void CuiAboutConfigTabPage::FillItems(const Reference& xNameAccess, OUStringBuffer sValue; // Fall back to dynamic type when this is empty -if (aType == cppu::UnoType::get()) +if (aType == cppu::UnoType::get() && sDynamicType != "void") { if (sDynamicType == "boolean") aType = cppu::UnoType::get(); @@ -436,151 +436,177 @@ void CuiAboutConfigTabPage::FillItems(const Reference& xNameAccess, sValue = it->sValue; else { -if (aNode.getValueType().getTypeClass() == css::uno::TypeClass_VOID) +bool bHasValue = sDynamicType != "void"; +if (aType == cppu::UnoType::get()) { -// Skip, no value set -} -else if (aType == cppu::UnoType::get()) -{ -sValue = OUString::boolean(aNode.get()); +if (bHasValue) +sValue = OUString::boolean(aNode.get()); sType = "boolean"; } else if (aType == cppu::UnoType::get()) { -sValue = OUString::number(aNode.get()); +if (bHasValue) +sValue = OUString::number(aNode.get()); sType = "short"; } else if (aType == cppu::UnoType::get()) { -sValue = OUString::number(aNode.get()); +if (bHasValue) +sValue = OUString::number(aNode.get()); sType = "int"; } else if (aType == cppu::UnoType::get()) { -sValue = OUString::number(aNode.get()); +if (bHasValue) +sValue = OUString::number(aNode.get()); sType = "long"; } else if (aType == cppu::UnoType::get()) { -sValue = OUString::number(aNode.get()); +if (bHasValue) +sValue = OUString::number(aNode.get()); sType = "double"; } else if (aType == cppu::UnoType::get()) { -sValue = aNode.get(); +if (bHasValue) +sValue = aNode.get(); sType = "string"; } else if (aType == cppu::UnoType>::get()) { -const uno::Sequence seq = aNode.get>(); -for (sal_Int8 j : seq) +if (bHasValue) { -OUString s = OUString::number(static_cast(j), 16); -if (s.getLength() == 1) +const uno::Sequence seq = aNode.get>(); +for (sal_Int8 j : seq) { -sValue.append("0"); +OUString s = OUString::number(static_cast(j), 16); +if (s.getLength() == 1) +{ +sValue.append("0"); +} +sValue.append(s.toAsciiUpperCase()); } -sValue.append(s.toAsciiUpperCase()); } sType = "hexBinary"; } else if (aType == cppu::UnoType>::get()) { -uno::Sequence seq = aNode.get>(); -for (sal_Int32 j = 0; j != seq.getLength(); ++j) +if (bHasValue) { -if (j != 0) +uno::Sequence seq = aNode.get>(); +for (sal_Int32 j = 0; j != seq.getLength(); ++j) { -
[Libreoffice-commits] core.git: cui/source include/cui
cui/source/dialogs/dlgname.cxx| 40 +- cui/source/options/optaboutconfig.cxx | 126 +++--- cui/source/options/optaboutconfig.hxx |1 include/cui/dlgname.hxx | 14 +++ 4 files changed, 136 insertions(+), 45 deletions(-) New commits: commit 45217ca5ba0d4e78b462a10072a4334342cc402c Author: Samuel Mehrbrodt AuthorDate: Thu Nov 23 16:49:43 2023 +0100 Commit: Samuel Mehrbrodt CommitDate: Mon Nov 27 10:39:58 2023 +0100 tdf#157438 Make int/double lists editable in expert config Change-Id: I4334917e8ac6ae4deb5b15de326b083a4a1c1a0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159863 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx index a06833bb6ce6..8164bf1c2b40 100644 --- a/cui/source/dialogs/dlgname.cxx +++ b/cui/source/dialogs/dlgname.cxx @@ -148,6 +148,7 @@ IMPL_LINK_NOARG(SvxObjectTitleDescDialog, DecorativeHdl, weld::Toggleable&, void SvxListDialog::SvxListDialog(weld::Window* pParent) : GenericDialogController(pParent, "cui/ui/listdialog.ui", "ListDialog") +, m_aMode(ListMode::String) , m_xList(m_xBuilder->weld_tree_view("assignlist")) , m_xAddBtn(m_xBuilder->weld_button("addbtn")) , m_xRemoveBtn(m_xBuilder->weld_button("removebtn")) @@ -168,7 +169,7 @@ SvxListDialog::~SvxListDialog() {} IMPL_LINK_NOARG(SvxListDialog, AddHdl_Impl, weld::Button&, void) { -SvxNameDialog aNameDlg(m_xDialog.get(), "", "blabla"); +SvxNameDialog aNameDlg(m_xDialog.get(), "", ""); if (!aNameDlg.run()) return; @@ -213,7 +214,7 @@ void SvxListDialog::SelectionChanged() m_xEditBtn->set_sensitive(bEnable); } -std::vector SvxListDialog::GetEntries() const +std::vector SvxListDialog::GetEntries() { int nCount = m_xList->n_children(); std::vector aList; @@ -240,11 +241,36 @@ void SvxListDialog::EditEntry() return; OUString sOldText(m_xList->get_selected_text()); -SvxNameDialog aNameDlg(m_xDialog.get(), sOldText, "blabla"); +OUString sNewText; + +if (m_aMode == ListMode::String) +{ +SvxNameDialog aNameDlg(m_xDialog.get(), sOldText, ""); +if (!aNameDlg.run()) +return; +sNewText = comphelper::string::strip(aNameDlg.GetName(), ' '); +} +else if (m_aMode == ListMode::Int16 || m_aMode == ListMode::Int32 || m_aMode == ListMode::Int64) +{ +sal_Int64 nMin = m_aMode == ListMode::Int16 + ? SAL_MIN_INT16 + : m_aMode == ListMode::Int32 ? SAL_MIN_INT32 : SAL_MIN_INT64; +sal_Int64 nMax = m_aMode == ListMode::Int16 + ? SAL_MAX_INT16 + : m_aMode == ListMode::Int32 ? SAL_MAX_INT32 : SAL_MAX_INT64; +SvxNumberDialog aNumberDlg(m_xDialog.get(), "", sOldText.toInt64(), nMin, nMax); +if (!aNumberDlg.run()) +return; +sNewText = OUString::number(aNumberDlg.GetNumber()); +} +else if (m_aMode == ListMode::Double) +{ +SvxDecimalNumberDialog aNumberDlg(m_xDialog.get(), "", sOldText.toDouble()); +if (!aNumberDlg.run()) +return; +sNewText = OUString::number(aNumberDlg.GetNumber()); +} -if (!aNameDlg.run()) -return; -OUString sNewText = comphelper::string::strip(aNameDlg.GetName(), ' '); if (!sNewText.isEmpty() && sNewText != sOldText) { m_xList->remove(nPos); @@ -253,4 +279,6 @@ void SvxListDialog::EditEntry() } } +void SvxListDialog::SetMode(ListMode aMode) { m_aMode = aMode; }; + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index 68fa56ccd5ac..f191a59bd2ee 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -259,6 +259,54 @@ OUString lcl_StringListToString(const uno::Sequence& seq) } return sBuffer.makeStringAndClear(); } + +OUString lcl_IntListToString(const uno::Sequence& seq) +{ +OUStringBuffer sBuffer; +for (sal_Int32 i = 0; i != seq.getLength(); ++i) +{ +if (i != 0) +sBuffer.append(","); +sBuffer.append(OUString::number(seq[i])); +} +return sBuffer.makeStringAndClear(); +} + +OUString lcl_IntListToString(const uno::Sequence& seq) +{ +OUStringBuffer sBuffer; +for (sal_Int32 i = 0; i != seq.getLength(); ++i) +{ +if (i != 0) +sBuffer.append(","); +sBuffer.append(OUString::number(seq[i])); +} +return sBuffer.makeStringAndClear(); +} + +OUString lcl_IntListToString(const uno::Sequence& seq) +{ +OUStringBuffer sBuffer; +for (sal_Int32 i = 0; i != seq.getLength(); ++i) +{ +if (i != 0) +sBuffer.append(","); +sBuffer.append(OUString::number(seq[i])); +} +return
[Libreoffice-commits] core.git: cui/source cui/uiconfig
cui/source/dialogs/hlinettp.cxx | 27 cui/source/inc/hlinettp.hxx |1 cui/uiconfig/ui/hyperlinkinternetpage.ui | 52 --- 3 files changed, 2 insertions(+), 78 deletions(-) New commits: commit 8b50a615cbf6c09ed9cf6af6336e388cd32db28e Author: Julien Nabet AuthorDate: Sat Nov 25 09:58:49 2023 +0100 Commit: Julien Nabet CommitDate: Sat Nov 25 12:08:24 2023 +0100 tdf#158357: UI simplify Hyperlink dialog by removing Hyperlink type radiobutton + rename "Hyperlink Type" into "Hyperlink Settings" + remove "Protocol" since ther's only 1 now Change-Id: I9435606c6ac6eca87afc4c259fb1121f65638c0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159947 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index 21cf34b3c7b6..c74d6ae10699 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -36,7 +36,6 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp(weld::Container* pParent, : SvxHyperlinkTabPageBase(pParent, pDlg, "cui/ui/hyperlinkinternetpage.ui", "HyperlinkInternetPage", pItemSet) , m_bMarkWndOpen(false) -, m_xRbtLinktypInternet(xBuilder->weld_radio_button("linktyp_internet")) , m_xCbbTarget(new SvxHyperURLBox(xBuilder->weld_combo_box("target"))) , m_xFtTarget(xBuilder->weld_label("target_label")) { @@ -56,12 +55,7 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp(weld::Container* pParent, SetExchangeSupport (); -// set defaults -m_xRbtLinktypInternet->set_active(true); - // set handlers -Link aLink( LINK ( this, SvxHyperlinkInternetTp, Click_SmartProtocol_Impl ) ); -m_xRbtLinktypInternet->connect_toggled( aLink ); m_xCbbTarget->connect_focus_out( LINK ( this, SvxHyperlinkInternetTp, LostFocusTargetHdl_Impl ) ); m_xCbbTarget->connect_changed( LINK ( this, SvxHyperlinkInternetTp, ModifiedTargetHdl_Impl ) ); maTimer.SetInvokeHandler ( LINK ( this, SvxHyperlinkInternetTp, TimeoutHdl_Impl ) ); @@ -167,12 +161,6 @@ IMPL_LINK_NOARG(SvxHyperlinkInternetTp, TimeoutHdl_Impl, Timer *, void) void SvxHyperlinkInternetTp::SetScheme(std::u16string_view rScheme) { -//if rScheme is empty or unknown the default behaviour is like it where HTTP -bool bInternet = true; - -//update protocol button selection: -m_xRbtLinktypInternet->set_active(bInternet); - //update target: RemoveImproperProtocol(rScheme); m_xCbbTarget->SetSmartProtocol( GetSmartProtocolFromButtons() ); @@ -221,19 +209,6 @@ INetProtocol SvxHyperlinkInternetTp::GetSmartProtocolFromButtons() return INetProtocol::Http; } -/* -|* -|* Click on Radiobutton : WWW or ... -|* -|/ -IMPL_LINK(SvxHyperlinkInternetTp, Click_SmartProtocol_Impl, weld::Toggleable&, rButton, void) -{ -if (!rButton.get_active()) -return; -OUString aScheme = GetSchemeFromButtons(); -SetScheme(aScheme); -} - /* |* |* Combobox Target lost the focus @@ -246,7 +221,7 @@ IMPL_LINK_NOARG(SvxHyperlinkInternetTp, LostFocusTargetHdl_Impl, weld::Widget&, void SvxHyperlinkInternetTp::RefreshMarkWindow() { -if (m_xRbtLinktypInternet->get_active() && IsMarkWndVisible()) +if (IsMarkWndVisible()) { weld::WaitObject aWait(mpDialog->getDialog()); OUString aStrURL( CreateAbsoluteURL() ); diff --git a/cui/source/inc/hlinettp.hxx b/cui/source/inc/hlinettp.hxx index bb86dff9ca5e..ad308a401f45 100644 --- a/cui/source/inc/hlinettp.hxx +++ b/cui/source/inc/hlinettp.hxx @@ -36,7 +36,6 @@ class SvxHyperlinkInternetTp : public SvxHyperlinkTabPageBase private: boolm_bMarkWndOpen; -std::unique_ptr m_xRbtLinktypInternet; std::unique_ptr m_xCbbTarget; std::unique_ptr m_xFtTarget; diff --git a/cui/uiconfig/ui/hyperlinkinternetpage.ui b/cui/uiconfig/ui/hyperlinkinternetpage.ui index 6a6a191a6b91..0031207e8f51 100644 --- a/cui/uiconfig/ui/hyperlinkinternetpage.ui +++ b/cui/uiconfig/ui/hyperlinkinternetpage.ui @@ -25,40 +25,6 @@ 12 12 6 - - - -True -False -True -6 -12 - - -_Web -True -True -False -True -True -True - - -Creates an "http://; hyperlink. - - - - -
[Libreoffice-commits] core.git: cui/source
cui/source/dialogs/hltpbase.cxx | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) New commits: commit 516f800f84b533db0082b1f39c19d1af40ab29c8 Author: Julien Nabet AuthorDate: Fri Nov 24 20:25:47 2023 +0100 Commit: Julien Nabet CommitDate: Fri Nov 24 21:31:43 2023 +0100 tdf#158345: Opening Hyperlink dialog leads to crash terminate called after throwing an instance of 'com::sun::star::datatransfer::UnsupportedFlavorException' relevant part of bt from this exception: 0 0x7f34fd6b0231 in __cxa_throw () at /lib/x86_64-linux-gnu/libstdc++.so.6 1 0x7f34e9d8207d in x11::X11Transferable::getTransferData(com::sun::star::datatransfer::DataFlavor const&) (this=0x562594fc9af0, rFlavor=...) at /home/julien/lo/libreoffice/vcl/unx/generic/dtrans/X11_transferable.cxx:58 2 0x7f34e9d825ec in non-virtual thunk to x11::X11Transferable::getTransferData(com::sun::star::datatransfer::DataFlavor const&) () at /home/julien/lo/libreoffice/instdir/program/libvclplug_genlo.so 3 0x7f34e15589f2 in SvxHyperlinkTabPageBase::Reset(SfxItemSet const&) (this=0x5625958378f0, rItemSet=SfxItemSet of pool 0x562591482920 with parent 0x0 and Which ranges: [(10361, 10362)] = {...}) at /home/julien/lo/libreoffice/cui/source/dialogs/hltpbase.cxx:468 See full bt here: https://bugs.documentfoundation.org/attachment.cgi?id=191029 Regression from: 89d3735e05b98223a49a387421386fd736fc3de6^! tdf#146576 - Propose clipboard content when inserting a hyperlink Change-Id: Ic111b8348f2288c4e9e6760fe6f7f48faadec582 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159939 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index f2448460ee66..f0aa7c368c04 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -37,6 +37,7 @@ #include #include #include +#include using namespace ::ucbhelper; @@ -465,13 +466,21 @@ void SvxHyperlinkTabPageBase::Reset( const SfxItemSet& rItemSet) if (xTransferable->isDataFlavorSupported(aFlavor)) { OUString aClipBoardConentent; -if (xTransferable->getTransferData(aFlavor) >>= aClipBoardConentent) +try +{ +if (xTransferable->getTransferData(aFlavor) >>= aClipBoardConentent) +{ +INetURLObject aURL; +aURL.SetSmartURL(aClipBoardConentent); +if (!aURL.HasError()) +aStrURL += aURL.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous); +} +} +// tdf#158345: Opening Hyperlink dialog leads to crash +// MimeType = "text/plain;charset=utf-16" +catch(const css::datatransfer::UnsupportedFlavorException&) { -INetURLObject aURL; -aURL.SetSmartURL(aClipBoardConentent); -if (!aURL.HasError()) -aStrURL -= aURL.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous); } } }
[Libreoffice-commits] core.git: cui/source cui/uiconfig cui/UIConfig_cui.mk include/cui
cui/UIConfig_cui.mk |1 cui/source/dialogs/dlgname.cxx| 109 cui/source/options/optaboutconfig.cxx | 37 +++-- cui/uiconfig/ui/listdialog.ui | 231 ++ include/cui/dlgname.hxx | 26 +++ 5 files changed, 389 insertions(+), 15 deletions(-) New commits: commit 847db3fa1244c2707e1966d3e6579258bb6d8924 Author: Samuel Mehrbrodt AuthorDate: Thu Nov 16 21:33:25 2023 +0100 Commit: Samuel Mehrbrodt CommitDate: Mon Nov 20 08:24:51 2023 +0100 tdf#157438 Make string lists editable in expert config Change-Id: Ia8b8553d547e760c18624c5c599951523b74ac82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159523 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 97a4a56f3ecc..10acd83c8c39 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -113,6 +113,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/linetabpage \ cui/uiconfig/ui/lineendstabpage \ cui/uiconfig/ui/linestyletabpage \ + cui/uiconfig/ui/listdialog \ cui/uiconfig/ui/macroassigndialog \ cui/uiconfig/ui/macroassignpage \ cui/uiconfig/ui/macroselectordialog \ diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx index a96b59290bbd..a06833bb6ce6 100644 --- a/cui/source/dialogs/dlgname.cxx +++ b/cui/source/dialogs/dlgname.cxx @@ -19,6 +19,8 @@ #include +#include + /* |* |* Dialog for editing a name @@ -144,4 +146,111 @@ IMPL_LINK_NOARG(SvxObjectTitleDescDialog, DecorativeHdl, weld::Toggleable&, void m_xDescriptionFT->set_sensitive(bEnable); } +SvxListDialog::SvxListDialog(weld::Window* pParent) +: GenericDialogController(pParent, "cui/ui/listdialog.ui", "ListDialog") +, m_xList(m_xBuilder->weld_tree_view("assignlist")) +, m_xAddBtn(m_xBuilder->weld_button("addbtn")) +, m_xRemoveBtn(m_xBuilder->weld_button("removebtn")) +, m_xEditBtn(m_xBuilder->weld_button("editbtn")) +{ +m_xList->set_size_request(m_xList->get_approximate_digit_width() * 54, + m_xList->get_height_rows(6)); +m_xAddBtn->connect_clicked(LINK(this, SvxListDialog, AddHdl_Impl)); +m_xRemoveBtn->connect_clicked(LINK(this, SvxListDialog, RemoveHdl_Impl)); +m_xEditBtn->connect_clicked(LINK(this, SvxListDialog, EditHdl_Impl)); +m_xList->connect_changed(LINK(this, SvxListDialog, SelectHdl_Impl)); +m_xList->connect_row_activated(LINK(this, SvxListDialog, DblClickHdl_Impl)); + +SelectionChanged(); +} + +SvxListDialog::~SvxListDialog() {} + +IMPL_LINK_NOARG(SvxListDialog, AddHdl_Impl, weld::Button&, void) +{ +SvxNameDialog aNameDlg(m_xDialog.get(), "", "blabla"); + +if (!aNameDlg.run()) +return; +OUString sNewText = comphelper::string::strip(aNameDlg.GetName(), ' '); +if (!sNewText.isEmpty()) +{ +m_xList->insert_text(-1, sNewText); +m_xList->select(-1); +} +} + +IMPL_LINK_NOARG(SvxListDialog, EditHdl_Impl, weld::Button&, void) { EditEntry(); } + +IMPL_LINK_NOARG(SvxListDialog, SelectHdl_Impl, weld::TreeView&, void) { SelectionChanged(); } + +IMPL_LINK_NOARG(SvxListDialog, DblClickHdl_Impl, weld::TreeView&, bool) +{ +EditEntry(); +return true; +} + +IMPL_LINK_NOARG(SvxListDialog, RemoveHdl_Impl, weld::Button&, void) +{ +int nPos = m_xList->get_selected_index(); +if (nPos == -1) +return; +m_xList->remove(nPos); +int nCount = m_xList->n_children(); +if (nCount) +{ +if (nPos >= nCount) +nPos = nCount - 1; +m_xList->select(nPos); +} +SelectionChanged(); +} + +void SvxListDialog::SelectionChanged() +{ +bool bEnable = m_xList->get_selected_index() != -1; +m_xRemoveBtn->set_sensitive(bEnable); +m_xEditBtn->set_sensitive(bEnable); +} + +std::vector SvxListDialog::GetEntries() const +{ +int nCount = m_xList->n_children(); +std::vector aList; +aList.reserve(nCount); +for (int i = 0; i < nCount; ++i) +aList.push_back(m_xList->get_text(i)); +return aList; +} + +void SvxListDialog::SetEntries(std::vector const& rEntries) +{ +m_xList->clear(); +for (auto const& sEntry : rEntries) +{ +m_xList->append_text(sEntry); +} +SelectionChanged(); +} + +void SvxListDialog::EditEntry() +{ +int nPos = m_xList->get_selected_index(); +if (nPos == -1) +return; + +OUString sOldText(m_xList->get_selected_text()); +SvxNameDialog aNameDlg(m_xDialog.get(), sOldText, "blabla"); + +if (!aNameDlg.run()) +return; +OUString sNewText = comphelper::string::strip(aNameDlg.GetName(), ' '); +if (!sNewText.isEmpty() && sNewText != sOldText) +{ +m_xList->remove(nPos); +m_xList->insert_text(nPos, sNewText); +m_xList->select(nPos);
[Libreoffice-commits] core.git: cui/source sw/qa
cui/source/tabpages/paragrph.cxx|6 sw/qa/uitest/writer_tests5/tdf154543.py | 39 2 files changed, 44 insertions(+), 1 deletion(-) New commits: commit 5af2041c551e97903d2ba7994c5e893836891832 Author: Andreas Heinisch AuthorDate: Fri Nov 17 12:09:18 2023 +0100 Commit: Andreas Heinisch CommitDate: Fri Nov 17 14:13:14 2023 +0100 tdf#154543 - Paragraph dialog: reset snap to grid to parent setting Added the SID_ATTR_PARA_SNAPTOGRID to the alignment ranges in order to reset the snap to grid option to the corresponding parent setting. Without this parameter, the main dialog does not have any knowledge about this option. Change-Id: Ib090fae0919be54dd41674d129f5355c3566a90c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159565 Tested-by: Jenkins Reviewed-by: Andreas Heinisch diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 7c8f2dc225a7..132b125f0293 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -66,7 +66,11 @@ const WhichRangesContainer SvxStdParagraphTabPage::pStdRanges( >); const WhichRangesContainer SvxParaAlignTabPage::pAlignRanges( -svl::Items); // 10027 +svl::Items< +SID_ATTR_PARA_ADJUST, SID_ATTR_PARA_ADJUST, // 10027 +// tdf#154543 - reset snap to grid to parent +SID_ATTR_PARA_SNAPTOGRID, SID_ATTR_PARA_SNAPTOGRID // 10945 +>); const WhichRangesContainer SvxParaAlignTabPage::pSdrAlignRanges( svl::Items< diff --git a/sw/qa/uitest/writer_tests5/tdf154543.py b/sw/qa/uitest/writer_tests5/tdf154543.py new file mode 100755 index ..ab6ab0a06e19 --- /dev/null +++ b/sw/qa/uitest/writer_tests5/tdf154543.py @@ -0,0 +1,39 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +from uitest.framework import UITestCase +from uitest.uihelper.common import select_pos +from uitest.uihelper.common import get_state_as_dict + +class tdf154543(UITestCase): + + def test_tdf154543_reset_snap_to_grid_parent(self): + +with self.ui_test.create_doc_in_start_center("writer"): + +# Open the paragraph style dialog and unselect the snap to grid checkbox +with self.ui_test.execute_dialog_through_command(".uno:EditStyle") as xDialog: +xTabs = xDialog.getChild("tabcontrol") +select_pos(xTabs, "2") +xSnapCheckbox = xTabs.getChild("checkCB_SNAP") +xSnapCheckbox.executeAction("CLICK", tuple()) +self.assertEqual(get_state_as_dict(xSnapCheckbox)["Selected"], "false") + +# Open the paragraph style dialog and reset dialog to parent settings +with self.ui_test.execute_dialog_through_command(".uno:EditStyle") as xDialog: +xTabs = xDialog.getChild("tabcontrol") +select_pos(xTabs, "2") +xSnapCheckbox = xTabs.getChild("checkCB_SNAP") +xStandardButton = xDialog.getChild("standard") +xStandardButton.executeAction("CLICK", tuple()) +# Without the fix in place, this test would have failed with +# AssertionError: 'false' != 'true' +self.assertEqual(get_state_as_dict(xSnapCheckbox)["Selected"], "true") + +# vim: set shiftwidth=4 softtabstop=4 expandtab:
[Libreoffice-commits] core.git: cui/source include/sfx2 officecfg/registry sfx2/source shell/source stoc/source sysui/desktop ucbhelper/source vcl/unx
cui/source/options/treeopt.cxx |2 include/sfx2/sfxsids.hrc |2 officecfg/registry/data/org/openoffice/Inet.xcu| 10 -- officecfg/registry/schema/org/openoffice/Inet.xcs |2 sfx2/source/appl/appcfg.cxx| 12 -- shell/source/backends/desktopbe/desktopbackend.cxx |2 shell/source/backends/kf5be/kf5access.cxx | 54 shell/source/backends/kf5be/kf5backend.cxx | 12 +- shell/source/backends/macbe/macbackend.mm | 41 - shell/source/backends/wininetbe/wininetbackend.cxx | 27 -- stoc/source/javavm/javavm.cxx | 89 - sysui/desktop/menus/base.desktop |2 sysui/desktop/menus/calc.desktop |2 sysui/desktop/menus/draw.desktop |2 sysui/desktop/menus/impress.desktop|2 sysui/desktop/menus/math.desktop |2 sysui/desktop/menus/startcenter.desktop|2 sysui/desktop/menus/writer.desktop |2 sysui/desktop/menus/xsltfilter.desktop |2 ucbhelper/source/client/proxydecider.cxx | 34 vcl/unx/gtk3_kde5/kde5_filepicker.cxx |5 - vcl/unx/kf5/KFFilePicker.cxx |5 - 22 files changed, 25 insertions(+), 288 deletions(-) New commits: commit d343a2b6393aec2eba0d25d7f4f390f12d1515f6 Author: Michael Stahl AuthorDate: Thu Nov 16 12:55:48 2023 +0100 Commit: Michael Stahl CommitDate: Thu Nov 16 19:15:26 2023 +0100 tdf#146386 deprecate, remove usage of Inet::Settings::ooInetFTPProxyName * officecfg: deprecate Inet::Settings::ooInetFTPProxyName/Port * ucbhelper: stop handling these settings * sfx2: remove SID_INET_FTP_PROXY_NAME and SID_INET_FTP_PROXY_PORT and usage from SfxApplication::GetOptions() * shell: remove proxy config code from backends * stoc: the JavaVM would have its "ftp.proxyHost" properties set based on officecfg values; remove that * sysui,vcl: remove protocol from KDE desktop files and file picker Change-Id: Iba02676cf6e519e2fa60ba925209436d38e75f49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159500 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 0735ce8dcebb..882d59431169 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1509,7 +1509,7 @@ std::optional OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId ) svl::Items< //SID_OPTIONS_START - ..END SID_SAVEREL_INET, SID_SAVEREL_FSYS, -SID_INET_NOPROXY, SID_INET_FTP_PROXY_PORT, +SID_INET_NOPROXY, SID_INET_HTTP_PROXY_PORT, SID_SECURE_URL, SID_SECURE_URL> ); SfxApplication::GetOptions(*pRet); break; diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc index 55327feb0034..3e1775788dc2 100644 --- a/include/sfx2/sfxsids.hrc +++ b/include/sfx2/sfxsids.hrc @@ -562,8 +562,6 @@ class SvxZoomItem; #define SID_INET_HTTP_PROXY_NAME TypedWhichId(SID_OPTIONS_START + 38) #define SID_INET_HTTP_PROXY_PORT TypedWhichId(SID_OPTIONS_START + 39) -#define SID_INET_FTP_PROXY_NAME TypedWhichId(SID_OPTIONS_START + 40) -#define SID_INET_FTP_PROXY_PORT TypedWhichId(SID_OPTIONS_START + 41) // Automatic update of Styles - manage TabPage #define SID_ATTR_AUTO_STYLE_UPDATE TypedWhichId(SID_OPTIONS_START + 65) diff --git a/officecfg/registry/data/org/openoffice/Inet.xcu b/officecfg/registry/data/org/openoffice/Inet.xcu index 6ebb776a..dbe2fe4166c1 100644 --- a/officecfg/registry/data/org/openoffice/Inet.xcu +++ b/officecfg/registry/data/org/openoffice/Inet.xcu @@ -30,16 +30,6 @@ - - - - - - - - - - diff --git a/officecfg/registry/schema/org/openoffice/Inet.xcs b/officecfg/registry/schema/org/openoffice/Inet.xcs index a236e0f92697..c88b846da76b 100644 --- a/officecfg/registry/schema/org/openoffice/Inet.xcs +++ b/officecfg/registry/schema/org/openoffice/Inet.xcs @@ -61,6 +61,7 @@ Specifies the name of the FTP proxy server. + Not used anymore @@ -69,6 +70,7 @@ Specifies the port of the FTP proxy server. + Not used anymore diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index 679eb2cd3da9..ee45f9da2661 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -211,14 +211,6 @@ void SfxApplication::GetOptions( SfxItemSet& rSet )
[Libreoffice-commits] core.git: cui/source solenv/clang-format
cui/source/options/optaboutconfig.cxx | 364 +- cui/source/options/optaboutconfig.hxx | 34 +-- solenv/clang-format/excludelist |2 3 files changed, 202 insertions(+), 198 deletions(-) New commits: commit f271ec5cd98ae32fd643df33174136d0a91a1941 Author: Samuel Mehrbrodt AuthorDate: Mon Nov 13 14:22:09 2023 +0100 Commit: Samuel Mehrbrodt CommitDate: Thu Nov 16 08:04:31 2023 +0100 Format optaboutconfig with clang-format Change-Id: Ia696e096f972fe722920238c3710d20a3f03b221 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159374 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index 11806faa8477..362af44cfd7d 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -7,37 +7,37 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "optaboutconfig.hxx" #include #include -#include "optaboutconfig.hxx" -#include -#include -#include -#include #include #include #include #include #include #include +#include +#include #include #include -#include +#include #include #include #include -#include -#include #include +#include +#include +#include +#include +#include #include #include #include +#include #include #include #include -#include -#include #include #include @@ -52,15 +52,16 @@ using namespace com::sun::star::container; struct Prop_Impl { -OUStringName; -OUStringProperty; -Any Value; - -Prop_Impl( OUString sName, OUString sProperty, Any aValue ) -: Name(std::move( sName )) -, Property(std::move( sProperty )) -, Value(std::move( aValue )) -{} +OUString Name; +OUString Property; +Any Value; + +Prop_Impl(OUString sName, OUString sProperty, Any aValue) +: Name(std::move(sName)) +, Property(std::move(sProperty)) +, Value(std::move(aValue)) +{ +} }; struct UserData @@ -72,20 +73,22 @@ struct UserData int aLineage; Reference aXNameAccess; -explicit UserData( OUString aPropertyPath, OUString aTooltip, bool isReadOnly ) -: bIsPropertyPath( true ) -, bIsReadOnly( isReadOnly ) +explicit UserData(OUString aPropertyPath, OUString aTooltip, bool isReadOnly) +: bIsPropertyPath(true) +, bIsReadOnly(isReadOnly) , sPropertyPath(std::move(aPropertyPath)) , sTooltip(std::move(aTooltip)) , aLineage(0) -{} +{ +} -explicit UserData( Reference const & rXNameAccess, int rIndex ) -: bIsPropertyPath( false ) -, bIsReadOnly( false ) +explicit UserData(Reference const& rXNameAccess, int rIndex) +: bIsPropertyPath(false) +, bIsReadOnly(false) , aLineage(rIndex) -, aXNameAccess( rXNameAccess ) -{} +, aXNameAccess(rXNameAccess) +{ +} }; CuiAboutConfigTabPage::CuiAboutConfigTabPage(weld::Window* pParent) @@ -103,24 +106,20 @@ CuiAboutConfigTabPage::CuiAboutConfigTabPage(weld::Window* pParent) m_xPrefBox->get_height_rows(23)); m_xPrefBox->connect_column_clicked(LINK(this, CuiAboutConfigTabPage, HeaderBarClick)); -m_xEditBtn->connect_clicked(LINK( this, CuiAboutConfigTabPage, StandardHdl_Impl)); -m_xResetBtn->connect_clicked(LINK( this, CuiAboutConfigTabPage, ResetBtnHdl_Impl)); +m_xEditBtn->connect_clicked(LINK(this, CuiAboutConfigTabPage, StandardHdl_Impl)); +m_xResetBtn->connect_clicked(LINK(this, CuiAboutConfigTabPage, ResetBtnHdl_Impl)); m_xPrefBox->connect_row_activated(LINK(this, CuiAboutConfigTabPage, DoubleClickHdl_Impl)); m_xPrefBox->connect_expanding(LINK(this, CuiAboutConfigTabPage, ExpandingHdl_Impl)); m_xSearchBtn->connect_clicked(LINK(this, CuiAboutConfigTabPage, SearchHdl_Impl)); m_options.AlgorithmType2 = util::SearchAlgorithms2::ABSOLUTE; m_options.transliterateFlags |= TransliterationFlags::IGNORE_CASE; -m_options.searchFlag |= (util::SearchFlags::REG_NOT_BEGINOFLINE | -util::SearchFlags::REG_NOT_ENDOFLINE); +m_options.searchFlag +|= (util::SearchFlags::REG_NOT_BEGINOFLINE | util::SearchFlags::REG_NOT_ENDOFLINE); float fWidth = m_xPrefBox->get_approximate_digit_width(); -std::vector aWidths -{ -o3tl::narrowing(fWidth * 65), -o3tl::narrowing(fWidth * 20), -o3tl::narrowing(fWidth * 8) -}; +std::vector aWidths{ o3tl::narrowing(fWidth * 65), o3tl::narrowing(fWidth * 20), + o3tl::narrowing(fWidth * 8) }; m_xPrefBox->set_column_fixed_widths(aWidths); m_xPrefBox->connect_query_tooltip(LINK(this, CuiAboutConfigTabPage, QueryTooltip)); @@ -128,7 +127,7 @@
[Libreoffice-commits] core.git: cui/source cui/uiconfig cui/UIConfig_cui.mk include/cui static/CustomTarget_emscripten_fs_image.mk
cui/UIConfig_cui.mk|1 cui/source/dialogs/dlgname.cxx | 22 cui/source/options/optaboutconfig.cxx | 144 ++--- cui/uiconfig/ui/numberdialog.ui| 128 + include/cui/dlgname.hxx| 28 + static/CustomTarget_emscripten_fs_image.mk |1 6 files changed, 273 insertions(+), 51 deletions(-) New commits: commit 1f874d384228867ee450d3e1d53c821519b51722 Author: Samuel Mehrbrodt AuthorDate: Thu Nov 9 16:18:35 2023 +0100 Commit: Samuel Mehrbrodt CommitDate: Thu Nov 16 08:03:32 2023 +0100 expert config: Proper editing support for numbers Change-Id: Ib97e027cedfdf2c5bb3c956aeee75af25198e498 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159355 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index e36cfc7f11b6..97a4a56f3ecc 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -124,6 +124,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/newlibdialog \ cui/uiconfig/ui/newtabledialog \ cui/uiconfig/ui/newtoolbardialog \ + cui/uiconfig/ui/numberdialog \ cui/uiconfig/ui/numberingformatpage \ cui/uiconfig/ui/numberingoptionspage \ cui/uiconfig/ui/numberingpositionpage \ diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx index a1f6283d92b5..a96b59290bbd 100644 --- a/cui/source/dialogs/dlgname.cxx +++ b/cui/source/dialogs/dlgname.cxx @@ -60,6 +60,28 @@ IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl, weld::Entry&, void) m_xEdtName->set_tooltip_text(rTip); } +SvxNumberDialog::SvxNumberDialog(weld::Window* pParent, const OUString& rDesc, sal_Int64 nValue, + sal_Int64 nMin, sal_Int64 nMax) +: GenericDialogController(pParent, "cui/ui/numberdialog.ui", "NumberDialog") +, m_xEdtNumber(m_xBuilder->weld_spin_button("number_spinbtn")) +, m_xFtDescription(m_xBuilder->weld_label("description_label")) +{ +m_xFtDescription->set_label(rDesc); +m_xEdtNumber->set_min(nMin); +m_xEdtNumber->set_max(nMax); +m_xEdtNumber->set_value(nValue); +} + +SvxDecimalNumberDialog::SvxDecimalNumberDialog(weld::Window* pParent, const OUString& rDesc, + double fValue) +: GenericDialogController(pParent, "cui/ui/numberdialog.ui", "NumberDialog") +, m_xEdtNumber(m_xBuilder->weld_formatted_spin_button("number_spinbtn")) +, m_xFtDescription(m_xBuilder->weld_label("description_label")) +{ +m_xFtDescription->set_label(rDesc); +m_xEdtNumber->GetFormatter().SetValue(fValue); +} + // #i68101# // Dialog for editing Object Name // plus uniqueness-callback-linkHandler diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index bdc51afdea51..11806faa8477 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -654,96 +654,138 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, StandardHdl_Impl, weld::Button&, void ) { if( bOpenDialog ) { -SvxNameDialog aNameDialog(m_pParent, sDialogValue, sPropertyName); -aNameDialog.SetCheckNameHdl( LINK( this, CuiAboutConfigTabPage, ValidNameHdl ) ); -if (aNameDialog.run() == RET_OK ) +if (sPropertyType == "short" || sPropertyType == "int" || sPropertyType == "long") { -OUString sNewValue = aNameDialog.GetName(); -bSaveChanges = true; -if ( sPropertyType == "short") +sal_Int64 nMin = sPropertyType == "short" + ? SAL_MIN_INT16 + : sPropertyType == "int" ? SAL_MIN_INT32 : SAL_MIN_INT64; +sal_Int64 nMax = sPropertyType == "short" + ? SAL_MAX_INT16 + : sPropertyType == "int" ? SAL_MAX_INT32 : SAL_MAX_INT64; +SvxNumberDialog aNumberDialog(m_pParent, sPropertyName, sDialogValue.toInt64(), + nMin, nMax); +if (aNumberDialog.run() == RET_OK) { -sal_Int16 nShort; -sal_Int32 nNumb = sNewValue.toInt32(); - -//if the value is 0 and length is not 1, there is something wrong -if( ( nNumb==0 && sNewValue.getLength()!=1 ) || nNumb > SAL_MAX_INT16 || nNumb < SAL_MIN_INT16) -throw uno::Exception("out of range short", nullptr); -nShort = static_cast(nNumb); -pProperty->Value <<= nShort; -} -else if( sPropertyType == "int" ) -{ -sal_Int32 nLong = sNewValue.toInt32(); -if( nLong==0 &&
[Libreoffice-commits] core.git: cui/source
cui/source/dialogs/SpellDialog.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 7a4a5de2d932b6edfc53b6742029e266c52fa127 Author: Oliver Specht AuthorDate: Wed Nov 15 16:49:58 2023 +0100 Commit: Caolán McNamara CommitDate: Wed Nov 15 22:19:59 2023 +0100 tdf#157992 update error position after modifying input a manual fix in the text changes the start/end position of the error that needs to be updateed to find the correct error text when applying the change Change-Id: I91b0801d5a08ee9e2508493cce03b8112c48a542 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159449 Tested-by: Jenkins Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 80e1301dcaf8..3ad9c2b196b0 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -1571,6 +1571,8 @@ bool SentenceEditWindow_Impl::KeyInput(const KeyEvent& rKeyEvt) //start position if (!IsUndoEditMode() && bIsErrorActive) { +aAttribList.clear(); +m_xEditEngine->GetCharAttribs(0, aAttribList); const EECharAttrib* pFontColor = FindCharAttrib(nCursor, EE_CHAR_COLOR, aAttribList); const EECharAttrib* pErrorAttrib = FindCharAttrib(m_nErrorStart, EE_CHAR_GRABBAG, aAttribList); if (pFontColor && pErrorAttrib) @@ -2035,7 +2037,6 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions() const aPortion1.eLanguage = eLang; aPortion1.sText = m_xEditEngine->GetText(ESelection(0, nStart, 0, aStart->nPosition)); - bool bIsIgnoreError = m_aIgnoreErrorsAt.find( nStart ) != m_aIgnoreErrorsAt.end(); if( bIsIgnoreError ) {
[Libreoffice-commits] core.git: cui/source
cui/source/options/optgdlg.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 0d30e2a8cd312dfcf5fc2ac0c67e09a1c74d2f46 Author: Balazs Varga AuthorDate: Mon Nov 13 10:17:51 2023 +0100 Commit: Balazs Varga CommitDate: Mon Nov 13 14:35:07 2023 +0100 Related: tdf#157837 - UI: Part 3 - Unify lockdown behavior of Options dialog for View Page. Change-Id: I78239ce7ad7b133eaaa3d42a0f424ed0250cb47e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159359 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 9e32e2fc9ea6..941164e5044f 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -1116,7 +1116,6 @@ void OfaViewTabPage::UpdateHardwareAccelStatus() } #if HAVE_FEATURE_SKIA m_xUseHardwareAccell->set_sensitive(!m_xUseSkia->get_active()); -m_xUseHardwareAccellImg->set_visible(m_xUseSkia->get_active()); #endif }
[Libreoffice-commits] core.git: cui/source include/cui include/svx sd/source
cui/source/factory/dlgfact.cxx |6 +++--- cui/source/factory/dlgfact.hxx |2 +- cui/source/options/optaboutconfig.cxx |2 +- include/cui/dlgname.hxx| 13 ++--- include/svx/svxdlg.hxx |2 +- sd/source/ui/slidesorter/controller/SlsSlotManager.cxx |2 +- sd/source/ui/view/drviews2.cxx |2 +- 7 files changed, 10 insertions(+), 19 deletions(-) New commits: commit b047c9b21b75f58429c5f55d2838f154c0ea6293 Author: Samuel Mehrbrodt AuthorDate: Thu Nov 9 14:01:11 2023 +0100 Commit: Samuel Mehrbrodt CommitDate: Mon Nov 13 10:39:29 2023 +0100 Fix old TODO: Remove the parameter bCheckImmediately from SvxNameDialog Change-Id: I47a6e82bab3306e8fddb8002740339dbb1965a64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159213 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 63bfdbddbe39..42a2b19fbaee 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -552,13 +552,13 @@ void AbstractSvxNameDialog_Impl::GetName(OUString& rName) rName = m_xDlg->GetName(); } -void AbstractSvxNameDialog_Impl::SetCheckNameHdl( const Link& rLink, bool bCheckImmediately ) +void AbstractSvxNameDialog_Impl::SetCheckNameHdl( const Link& rLink ) { aCheckNameHdl = rLink; if( rLink.IsSet() ) -m_xDlg->SetCheckNameHdl( LINK(this, AbstractSvxNameDialog_Impl, CheckNameHdl), bCheckImmediately ); +m_xDlg->SetCheckNameHdl( LINK(this, AbstractSvxNameDialog_Impl, CheckNameHdl) ); else -m_xDlg->SetCheckNameHdl( Link(), bCheckImmediately ); +m_xDlg->SetCheckNameHdl( Link() ); } void AbstractSvxNameDialog_Impl::SetCheckNameTooltipHdl( const Link& rLink) diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index b57fe2995718..137a5a033294 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -266,7 +266,7 @@ DECL_ABSTDLG_CLASS(AbstractSvxNewDictionaryDialog,SvxNewDictionaryDialog) // AbstractSvxNameDialog_Impl DECL_ABSTDLG_CLASS(AbstractSvxNameDialog,SvxNameDialog) virtual voidGetName( OUString& rName ) override ; -virtual voidSetCheckNameHdl( const Link& rLink, bool bCheckImmediately = false ) override ; +virtual voidSetCheckNameHdl( const Link& rLink ) override ; virtual voidSetCheckNameTooltipHdl( const Link& rLink ) override ; virtual voidSetEditHelpId(const OUString&) override ; //from class Window diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index a5d6ac9757a5..bdc51afdea51 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -655,7 +655,7 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, StandardHdl_Impl, weld::Button&, void ) if( bOpenDialog ) { SvxNameDialog aNameDialog(m_pParent, sDialogValue, sPropertyName); -aNameDialog.SetCheckNameHdl( LINK( this, CuiAboutConfigTabPage, ValidNameHdl ), true ); +aNameDialog.SetCheckNameHdl( LINK( this, CuiAboutConfigTabPage, ValidNameHdl ) ); if (aNameDialog.run() == RET_OK ) { OUString sNewValue = aNameDialog.GetName(); diff --git a/include/cui/dlgname.hxx b/include/cui/dlgname.hxx index 9eb388caa078..7d207d281812 100644 --- a/include/cui/dlgname.hxx +++ b/include/cui/dlgname.hxx @@ -47,20 +47,11 @@ public: @param rLink a Callback declared with DECL_DLLPRIVATE_LINK and implemented with IMPL_LINK, that is executed on modification. - -@param bCheckImmediately If true, the Link is called directly after - setting it. It is recommended to set this flag to true to avoid - an inconsistent state if the initial String (given in the CTOR) - does not satisfy the check condition. - -@todo Remove the parameter bCheckImmediately and incorporate the 'true' - behaviour as default. */ -void SetCheckNameHdl(const Link& rLink, bool bCheckImmediately) +void SetCheckNameHdl(const Link& rLink) { m_aCheckNameHdl = rLink; -if (bCheckImmediately) -ModifyHdl(*m_xEdtName); +ModifyHdl(*m_xEdtName); } void SetCheckNameTooltipHdl(const Link& rLink) diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx index 436bfd430368..41158ef2a415 100644 --- a/include/svx/svxdlg.hxx +++ b/include/svx/svxdlg.hxx @@ -163,7 +163,7 @@ protected: virtual ~AbstractSvxNameDialog() override = default; public: virtual voidGetName( OUString& rName ) = 0; -virtual voidSetCheckNameHdl( const Link& rLink, bool bCheckImmediately = false ) = 0; +virtual voidSetCheckNameHdl( const
[Libreoffice-commits] core.git: cui/source
cui/source/inc/hlinettp.hxx |3 --- 1 file changed, 3 deletions(-) New commits: commit 42de667705ed90eb6bb3b9e3308d666e507eddd8 Author: Stephan Bergmann AuthorDate: Sun Nov 12 23:13:56 2023 +0100 Commit: Stephan Bergmann CommitDate: Mon Nov 13 07:20:36 2023 +0100 -Werror,-Wunused-private-field Change-Id: I6bc93f212c687c908e68b2fbbced03f19f40844e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159351 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/cui/source/inc/hlinettp.hxx b/cui/source/inc/hlinettp.hxx index a164063150de..bb86dff9ca5e 100644 --- a/cui/source/inc/hlinettp.hxx +++ b/cui/source/inc/hlinettp.hxx @@ -34,9 +34,6 @@ class SvxHyperlinkInternetTp : public SvxHyperlinkTabPageBase { private: -OUStringmaStrOldUser; -OUStringmaStrOldPassword; - boolm_bMarkWndOpen; std::unique_ptr m_xRbtLinktypInternet;
[Libreoffice-commits] core.git: cui/source editeng/source include/editeng include/svx sc/source sd/source starmath/source sw/source
cui/source/dialogs/SpellDialog.cxx|7 --- editeng/source/editeng/editeng.cxx|4 ++-- editeng/source/editeng/impedit.hxx|8 editeng/source/outliner/outliner.cxx |4 ++-- include/editeng/editeng.hxx |5 +++-- include/editeng/outliner.hxx |5 +++-- include/svx/svdedxv.hxx |2 +- sc/source/ui/drawfunc/drtxtob.cxx |1 + sc/source/ui/drawfunc/futext.cxx |1 + sc/source/ui/view/editsh.cxx |1 + sd/source/ui/annotations/annotationwindow.cxx |1 + sd/source/ui/func/fubullet.cxx|5 +++-- sd/source/ui/func/fuinsfil.cxx|1 + sd/source/ui/view/drtxtob.cxx |1 + sd/source/ui/view/outlnvsh.cxx|1 + sd/source/ui/view/viewshel.cxx|1 + starmath/source/document.cxx |1 + starmath/source/view.cxx |1 + sw/source/uibase/docvw/AnnotationWin.cxx |1 + sw/source/uibase/docvw/AnnotationWin2.cxx |1 + sw/source/uibase/shells/annotsh.cxx |1 + sw/source/uibase/shells/drwtxtsh.cxx |1 + 22 files changed, 36 insertions(+), 18 deletions(-) New commits: commit 9bba3a604d12566bfb5e8ab8d2788fe8d3690a96 Author: Noel Grandin AuthorDate: Wed Nov 8 18:24:07 2023 +0200 Commit: Noel Grandin CommitDate: Sat Nov 11 11:03:58 2023 +0100 use more concrete type in ImpEditEngine::SetUndoManager instead of dynamic_cast'ing to the type we want, and __ignoring__ the parameter if it is not, just adjust the type that we want, which luckily everything is already sending Change-Id: If083e11c9818cdcae199afc1261efbdb652e1c76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159295 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 67de5235d1ad..80e1301dcaf8 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -2078,7 +2079,7 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions() const void SentenceEditWindow_Impl::Undo() { -SfxUndoManager& rUndoMgr = m_xEditEngine->GetUndoManager(); +EditUndoManager& rUndoMgr = m_xEditEngine->GetUndoManager(); DBG_ASSERT(GetUndoActionCount(), "no undo actions available" ); if(!GetUndoActionCount()) return; @@ -2097,13 +2098,13 @@ void SentenceEditWindow_Impl::Undo() void SentenceEditWindow_Impl::ResetUndo() { -SfxUndoManager& rUndo = m_xEditEngine->GetUndoManager(); +EditUndoManager& rUndo = m_xEditEngine->GetUndoManager(); rUndo.Clear(); } void SentenceEditWindow_Impl::AddUndoAction( std::unique_ptr pAction ) { -SfxUndoManager& rUndoMgr = m_xEditEngine->GetUndoManager(); +EditUndoManager& rUndoMgr = m_xEditEngine->GetUndoManager(); rUndoMgr.AddUndoAction(std::move(pAction)); GetSpellDialog()->m_xUndoPB->set_sensitive(true); } diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 728609cd94e2..d27a38665950 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -112,12 +112,12 @@ bool EditEngine::IsInUndo() const return pImpEditEngine->IsInUndo(); } -SfxUndoManager& EditEngine::GetUndoManager() +EditUndoManager& EditEngine::GetUndoManager() { return pImpEditEngine->GetUndoManager(); } -SfxUndoManager* EditEngine::SetUndoManager(SfxUndoManager* pNew) +EditUndoManager* EditEngine::SetUndoManager(EditUndoManager* pNew) { return pImpEditEngine->SetUndoManager(pNew); } diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 6fcb58dc..d20ed8a1caae 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -838,7 +838,7 @@ public: ImpEditEngine& operator=(const ImpEditEngine&) = delete; inline EditUndoManager& GetUndoManager(); -inline SfxUndoManager* SetUndoManager(SfxUndoManager* pNew); +inline EditUndoManager* SetUndoManager(EditUndoManager* pNew); // @return the previous bUpdateLayout state boolSetUpdateLayout( bool bUpdate, EditView* pCurView = nullptr, bool bForceUpdate = false ); @@ -1295,16 +1295,16 @@ inline EditUndoManager& ImpEditEngine::GetUndoManager() return *pUndoManager; } -inline SfxUndoManager* ImpEditEngine::SetUndoManager(SfxUndoManager* pNew) +inline EditUndoManager* ImpEditEngine::SetUndoManager(EditUndoManager* pNew) { -SfxUndoManager* pRetval = pUndoManager; +EditUndoManager* pRetval = pUndoManager; if(pUndoManager) { pUndoManager->SetEditEngine(nullptr); } -pUndoManager = dynamic_cast<
[Libreoffice-commits] core.git: cui/source
cui/source/inc/newtabledlg.hxx | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) New commits: commit 867c4b75dd4a2cf9470c2859d51432f207eb4166 Author: Noel Grandin AuthorDate: Wed Nov 8 18:33:16 2023 +0200 Commit: Noel Grandin CommitDate: Fri Nov 10 19:55:00 2023 +0100 loplugin:fieldcast in SvxNewTableDialogWrapper Change-Id: Ia3efee04b725162e4812f1e419cc9d8e11b6d8f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159301 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/cui/source/inc/newtabledlg.hxx b/cui/source/inc/newtabledlg.hxx index b62e1199e44d..4a34cb37712c 100644 --- a/cui/source/inc/newtabledlg.hxx +++ b/cui/source/inc/newtabledlg.hxx @@ -37,7 +37,7 @@ public: class SvxNewTableDialogWrapper : public SvxAbstractNewTableDialog { private: -std::shared_ptr m_xDlg; +std::shared_ptr m_xDlg; public: SvxNewTableDialogWrapper(weld::Window* pParent) @@ -52,18 +52,16 @@ public: virtual sal_Int32 getRows() const override { -SvxNewTableDialog* pDlg = dynamic_cast(m_xDlg.get()); -if (pDlg) -return pDlg->getRows(); +if (m_xDlg) +return m_xDlg->getRows(); return 0; } virtual sal_Int32 getColumns() const override { -SvxNewTableDialog* pDlg = dynamic_cast(m_xDlg.get()); -if (pDlg) -return pDlg->getColumns(); +if (m_xDlg) +return m_xDlg->getColumns(); return 0; }
[Libreoffice-commits] core.git: cui/source
cui/source/inc/optlingu.hxx |3 + cui/source/options/optlingu.cxx | 61 2 files changed, 64 insertions(+) New commits: commit 985b404f208559b4a91f31eb31dafa9d0384fdaf Author: Balazs Varga AuthorDate: Wed Nov 8 21:34:41 2023 +0100 Commit: Balazs Varga CommitDate: Fri Nov 10 11:15:17 2023 +0100 tdf#158003 - UI: Part 22 - Unify lockdown behavior of Options dialog for Language - Writing Aids Page. Change-Id: I25723fb616544cd6ee7d894c3ca1aa6742748a73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159186 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx index dce8f2ccd11f..6c5657acf7bd 100644 --- a/cui/source/inc/optlingu.hxx +++ b/cui/source/inc/optlingu.hxx @@ -22,6 +22,7 @@ #include #include #include +#include namespace com::sun::star{ namespace beans{ @@ -60,6 +61,8 @@ class SvxEditModulesDlg : public weld::GenericDialogController std::unique_ptr m_xClosePB; std::unique_ptr m_xLanguageLB; +css::uno::Reference< css::configuration::XReadWriteAccess> m_xReadWriteAccess; + DECL_LINK( SelectHdl_Impl, weld::TreeView&, void ); DECL_LINK( UpDownHdl_Impl, weld::Button&, void ); DECL_LINK( ClickHdl_Impl, weld::Button&, void ); diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index b7ac60f5f186..de908b943995 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -46,6 +47,8 @@ #include #include #include +#include +#include #include #include #include @@ -1196,6 +1199,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet ) m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : TRISTATE_FALSE); m_xLinguOptionsCLB->set_text(nEntry, sSpellAuto, 0); m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData)); +m_xLinguOptionsCLB->set_sensitive(nEntry, !aLngCfg.IsReadOnly(UPN_IS_SPELL_AUTO)); m_xLinguOptionsCLB->append(); ++nEntry; @@ -1205,6 +1209,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet ) m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : TRISTATE_FALSE); m_xLinguOptionsCLB->set_text(nEntry, sGrammarAuto, 0); m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData)); +m_xLinguOptionsCLB->set_sensitive(nEntry, !aLngCfg.IsReadOnly(UPN_IS_GRAMMAR_AUTO)); m_xLinguOptionsCLB->append(); ++nEntry; @@ -1214,6 +1219,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet ) m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : TRISTATE_FALSE); m_xLinguOptionsCLB->set_text(nEntry, sCapitalWords, 0); m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData)); +m_xLinguOptionsCLB->set_sensitive(nEntry, !aLngCfg.IsReadOnly(UPN_IS_SPELL_UPPER_CASE)); m_xLinguOptionsCLB->append(); ++nEntry; @@ -1223,6 +1229,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet ) m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : TRISTATE_FALSE); m_xLinguOptionsCLB->set_text(nEntry, sWordsWithDigits, 0); m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData)); +m_xLinguOptionsCLB->set_sensitive(nEntry, !aLngCfg.IsReadOnly(UPN_IS_SPELL_WITH_DIGITS)); m_xLinguOptionsCLB->append(); ++nEntry; @@ -1232,6 +1239,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet ) m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : TRISTATE_FALSE); m_xLinguOptionsCLB->set_text(nEntry, sSpellClosedCompound, 0); m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData)); +m_xLinguOptionsCLB->set_sensitive(nEntry, !aLngCfg.IsReadOnly(UPN_IS_SPELL_CLOSED_COMPOUND)); m_xLinguOptionsCLB->append(); ++nEntry; @@ -1241,6 +1249,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet ) m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : TRISTATE_FALSE); m_xLinguOptionsCLB->set_text(nEntry, sSpellHyphenatedCompound, 0); m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData)); +m_xLinguOptionsCLB->set_sensitive(nEntry, !aLngCfg.IsReadOnly(UPN_IS_SPELL_HYPHENATED_COMPOUND)); m_xLinguOptionsCLB->append(); ++nEntry; @@ -1250,6 +1259,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet ) m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : TRISTATE_FALSE); m_xLinguOptionsCLB->set_text(nEntry, sSpellSpecial, 0); m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData)); +m_xLinguOptionsCLB->set_sensitive(nEntry, !aLngCfg.IsReadOnly(UPN_IS_SPELL_SPECIAL)); m_xLinguOptionsCLB->append(); ++nEntry; @@ -1258,6 +1268,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet ) nUserData = OptionsUserData( EID_NUM_MIN_WORDLEN, true, static_cast(nVal),
[Libreoffice-commits] core.git: cui/source cui/uiconfig
cui/source/options/optinet2.cxx | 62 -- cui/source/options/optinet2.hxx |7 --- cui/uiconfig/ui/optproxypage.ui | 93 3 files changed, 2 insertions(+), 160 deletions(-) New commits: commit 7e5630b7b09f605aaba6ea8f54ff4c3761fe63db Author: Michael Stahl AuthorDate: Tue Nov 7 12:46:37 2023 +0100 Commit: Michael Stahl CommitDate: Thu Nov 9 16:53:15 2023 +0100 tdf#146386 cui: remove FTP UI, SvxProxyTabPage Change-Id: I0831b1d99052c1fa8f0be38bee08eb712a168445 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159072 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 979d920bc38f..083c3e40f784 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -98,8 +98,6 @@ constexpr OUString g_aHttpProxyPN = u"ooInetHTTPProxyName"_ustr; constexpr OUString g_aHttpPortPN = u"ooInetHTTPProxyPort"_ustr; constexpr OUString g_aHttpsProxyPN = u"ooInetHTTPSProxyName"_ustr; constexpr OUString g_aHttpsPortPN = u"ooInetHTTPSProxyPort"_ustr; -constexpr OUString g_aFtpProxyPN = u"ooInetFTPProxyName"_ustr; -constexpr OUString g_aFtpPortPN = u"ooInetFTPProxyPort"_ustr; constexpr OUString g_aNoProxyDescPN = u"ooInetNoProxy"_ustr; IMPL_STATIC_LINK(SvxProxyTabPage, NumberOnlyTextFilterHdl, OUString&, rTest, bool) @@ -142,12 +140,6 @@ SvxProxyTabPage::SvxProxyTabPage(weld::Container* pPage, weld::DialogController* , m_xHttpsPortFT(m_xBuilder->weld_label("httpsportft")) , m_xHttpsPortED(m_xBuilder->weld_entry("httpsport")) , m_xHttpsPortImg(m_xBuilder->weld_widget("lockhttpsport")) -, m_xFtpProxyFT(m_xBuilder->weld_label("ftpft")) -, m_xFtpProxyED(m_xBuilder->weld_entry("ftp")) -, m_xFtpProxyImg(m_xBuilder->weld_widget("lockftp")) -, m_xFtpPortFT(m_xBuilder->weld_label("ftpportft")) -, m_xFtpPortED(m_xBuilder->weld_entry("ftpport")) -, m_xFtpPortImg(m_xBuilder->weld_widget("lockftpport")) , m_xNoProxyForFT(m_xBuilder->weld_label("noproxyft")) , m_xNoProxyForED(m_xBuilder->weld_entry("noproxy")) , m_xNoProxyForImg(m_xBuilder->weld_widget("locknoproxy")) @@ -159,14 +151,10 @@ SvxProxyTabPage::SvxProxyTabPage(weld::Container* pPage, weld::DialogController* m_xHttpsProxyED->connect_insert_text(LINK(this, SvxProxyTabPage, NoSpaceTextFilterHdl)); m_xHttpsPortED->connect_insert_text(LINK(this, SvxProxyTabPage, NumberOnlyTextFilterHdl)); m_xHttpsPortED->connect_changed(LINK(this, SvxProxyTabPage, PortChangedHdl)); -m_xFtpProxyED->connect_insert_text(LINK(this, SvxProxyTabPage, NoSpaceTextFilterHdl)); -m_xFtpPortED->connect_insert_text(LINK(this, SvxProxyTabPage, NumberOnlyTextFilterHdl)); -m_xFtpPortED->connect_changed(LINK(this, SvxProxyTabPage, PortChangedHdl)); Link aLink = LINK( this, SvxProxyTabPage, LoseFocusHdl_Impl ); m_xHttpPortED->connect_focus_out( aLink ); m_xHttpsPortED->connect_focus_out( aLink ); -m_xFtpPortED->connect_focus_out( aLink ); m_xProxyModeLB->connect_changed(LINK( this, SvxProxyTabPage, ProxyHdl_Impl )); @@ -226,16 +214,6 @@ void SvxProxyTabPage::ReadConfigData_Impl() else m_xHttpsPortED->set_text( "" ); -m_xFtpProxyED->set_text( officecfg::Inet::Settings::ooInetFTPProxyName::get() ); -x = officecfg::Inet::Settings::ooInetFTPProxyPort::get(); -if (x) -{ -nIntValue = *x; -m_xFtpPortED->set_text( OUString::number( nIntValue )); -} -else -m_xFtpPortED->set_text( "" ); - m_xNoProxyForED->set_text( officecfg::Inet::Settings::ooInetNoProxy::get() ); } @@ -268,16 +246,6 @@ void SvxProxyTabPage::ReadConfigDefaults_Impl() m_xHttpsPortED->set_text( OUString::number( nIntValue )); } -if( xPropertyState->getPropertyDefault(g_aFtpProxyPN) >>= aStringValue ) -{ -m_xFtpProxyED->set_text( aStringValue ); -} - -if( xPropertyState->getPropertyDefault(g_aFtpPortPN) >>= nIntValue ) -{ -m_xFtpPortED->set_text( OUString::number( nIntValue )); -} - if( xPropertyState->getPropertyDefault(g_aNoProxyDescPN) >>= aStringValue ) { m_xNoProxyForED->set_text( aStringValue ); @@ -308,8 +276,6 @@ void SvxProxyTabPage::RestoreConfigDefaults_Impl() xPropertyState->setPropertyToDefault(g_aHttpPortPN); xPropertyState->setPropertyToDefault(g_aHttpsProxyPN); xPropertyState->setPropertyToDefault(g_aHttpsPortPN); -xPropertyState->setPropertyToDefault(g_aFtpProxyPN); -xPropertyState->setPropertyToDefault(g_aFtpPortPN); xPropertyState->setPropertyToDefault(g_aNoProxyDescPN); Reference< util::XChangesBatch > xChangesBatch(m_xConfigurationUpdateAccess, UNO_QUERY_THROW); @@ -338,8 +304,6 @@ void SvxProxyTabPage::Reset(const SfxItemSet*)
[Libreoffice-commits] core.git: cui/source cui/uiconfig
cui/source/dialogs/hlinettp.cxx | 117 +-- cui/source/inc/hlinettp.hxx | 20 + cui/uiconfig/ui/hyperlinkinternetpage.ui | 109 3 files changed, 10 insertions(+), 236 deletions(-) New commits: commit 46673b5c3215d05877043a81470b2a059c2eef75 Author: Michael Stahl AuthorDate: Tue Nov 7 12:24:10 2023 +0100 Commit: Michael Stahl CommitDate: Thu Nov 9 16:51:56 2023 +0100 tdf#146386 cui: remove FTP UI, SvxHyperlinkInternetTp Change-Id: Ib55d6609e0bea4033533e3211c04888e52b86bb8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159071 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index 8ffdb2053f5b..21cf34b3c7b6 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -24,7 +24,6 @@ #include #include -constexpr OUString sAnonymous = u"anonymous"_ustr; /* |* @@ -38,14 +37,8 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp(weld::Container* pParent, pItemSet) , m_bMarkWndOpen(false) , m_xRbtLinktypInternet(xBuilder->weld_radio_button("linktyp_internet")) -, m_xRbtLinktypFTP(xBuilder->weld_radio_button("linktyp_ftp")) , m_xCbbTarget(new SvxHyperURLBox(xBuilder->weld_combo_box("target"))) , m_xFtTarget(xBuilder->weld_label("target_label")) -, m_xFtLogin(xBuilder->weld_label("login_label")) -, m_xEdLogin(xBuilder->weld_entry("login")) -, m_xFtPassword(xBuilder->weld_label("password_label")) -, m_xEdPassword(xBuilder->weld_entry("password")) -, m_xCbAnonymous(xBuilder->weld_check_button("anonymous")) { // gtk_size_group_set_ignore_hidden, "Measuring the size of hidden widgets // ... they will report a size of 0 nowadays, and thus, their size will @@ -69,9 +62,6 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp(weld::Container* pParent, // set handlers Link aLink( LINK ( this, SvxHyperlinkInternetTp, Click_SmartProtocol_Impl ) ); m_xRbtLinktypInternet->connect_toggled( aLink ); -m_xRbtLinktypFTP->connect_toggled( aLink ); -m_xCbAnonymous->connect_toggled( LINK ( this, SvxHyperlinkInternetTp, ClickAnonymousHdl_Impl ) ); -m_xEdLogin->connect_changed( LINK ( this, SvxHyperlinkInternetTp, ModifiedLoginHdl_Impl ) ); m_xCbbTarget->connect_focus_out( LINK ( this, SvxHyperlinkInternetTp, LostFocusTargetHdl_Impl ) ); m_xCbbTarget->connect_changed( LINK ( this, SvxHyperlinkInternetTp, ModifiedTargetHdl_Impl ) ); maTimer.SetInvokeHandler ( LINK ( this, SvxHyperlinkInternetTp, TimeoutHdl_Impl ) ); @@ -91,19 +81,6 @@ void SvxHyperlinkInternetTp::FillDlgFields(const OUString& rStrURL) INetURLObject aURL(rStrURL); OUString aStrScheme(GetSchemeFromURL(rStrURL)); -// set additional controls for FTP: Username / Password -if (aStrScheme.startsWith(INET_FTP_SCHEME)) -{ -if ( aURL.GetUser().toAsciiLowerCase().startsWith( sAnonymous ) ) -setAnonymousFTPUser(); -else -setFTPUser(aURL.GetUser(), aURL.GetPass()); - -//do not show password and user in url -if(!aURL.GetUser().isEmpty() || !aURL.GetPass().isEmpty() ) -aURL.SetUserAndPass(u"", u""); -} - // set URL-field // Show the scheme, #72740 if ( aURL.GetProtocol() != INetProtocol::NotValid ) @@ -114,31 +91,6 @@ void SvxHyperlinkInternetTp::FillDlgFields(const OUString& rStrURL) SetScheme(aStrScheme); } -void SvxHyperlinkInternetTp::setAnonymousFTPUser() -{ -m_xEdLogin->set_text(sAnonymous); -SvAddressParser aAddress(SvtUserOptions().GetEmail()); -m_xEdPassword->set_text(aAddress.Count() ? aAddress.GetEmailAddress(0) : OUString()); - -m_xFtLogin->set_sensitive(false); -m_xFtPassword->set_sensitive(false); -m_xEdLogin->set_sensitive(false); -m_xEdPassword->set_sensitive(false); -m_xCbAnonymous->set_active(true); -} - -void SvxHyperlinkInternetTp::setFTPUser(const OUString& rUser, const OUString& rPassword) -{ -m_xEdLogin->set_text(rUser); -m_xEdPassword->set_text(rPassword); - -m_xFtLogin->set_sensitive(true); -m_xFtPassword->set_sensitive(true); -m_xEdLogin->set_sensitive(true); -m_xEdPassword->set_sensitive(true); -m_xCbAnonymous->set_active(false); -} - /* |* |* retrieve and prepare data from dialog-fields @@ -160,10 +112,6 @@ OUString SvxHyperlinkInternetTp::CreateAbsoluteURL() const INetURLObject aURL(aStrURL, GetSmartProtocolFromButtons()); -// username and password for ftp-url -if( aURL.GetProtocol() == INetProtocol::Ftp && !m_xEdLogin->get_text().isEmpty() ) -aURL.SetUserAndPass ( m_xEdLogin->get_text(), m_xEdPassword->get_text() ); - if (
[Libreoffice-commits] core.git: cui/source
cui/source/options/doclinkdialog.cxx | 45 +++ cui/source/options/doclinkdialog.hxx |3 ++ 2 files changed, 48 insertions(+) New commits: commit e0dd56acca39524b63b708590f03a3cd6dcbe3ca Author: Balazs Varga AuthorDate: Tue Nov 7 15:17:16 2023 +0100 Commit: Balazs Varga CommitDate: Wed Nov 8 10:37:50 2023 +0100 Related: tdf#158004 - UI: Part 20 - Unify lockdown behavior of Options dialog for Databases Page. Change-Id: I573479df8048a9ff4d4aedc9780cbe0395900526 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159074 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/cui/source/options/doclinkdialog.cxx b/cui/source/options/doclinkdialog.cxx index fac99002401c..f938399140ab 100644 --- a/cui/source/options/doclinkdialog.cxx +++ b/cui/source/options/doclinkdialog.cxx @@ -20,7 +20,11 @@ #include "doclinkdialog.hxx" #include +#include +#include +#include #include +#include #include #include #include @@ -53,6 +57,9 @@ namespace svx m_xURL->DisableHistory(); m_xURL->SetFilter(u"*.odb"); +css::uno::Reference < css::uno::XComponentContext > xContext(::comphelper::getProcessComponentContext()); +m_xReadWriteAccess = css::configuration::ReadWriteAccess::create(xContext, "*"); + m_xName->connect_changed( LINK(this, ODocumentLinkDialog, OnEntryModified) ); m_xURL->connect_changed( LINK(this, ODocumentLinkDialog, OnComboBoxModified) ); m_xBrowseFile->connect_clicked( LINK(this, ODocumentLinkDialog, OnBrowseFile) ); @@ -81,6 +88,44 @@ namespace svx void ODocumentLinkDialog::validate( ) { m_xOK->set_sensitive((!m_xName->get_text().isEmpty()) && (!m_xURL->get_active_text().isEmpty())); + +if (m_xOK->get_sensitive()) +{ +Reference xItemList = officecfg::Office::DataAccess::RegisteredNames::get(); +Sequence< OUString > lNodeNames = xItemList->getElementNames(); + +for (const OUString& sNodeName : lNodeNames) +{ +Reference xSet; +xItemList->getByName(sNodeName) >>= xSet; + +OUString aDatabaseName; +if (xSet->getPropertySetInfo()->hasPropertyByName("Name")) +xSet->getPropertyValue("Name") >>= aDatabaseName; + +if (!aDatabaseName.isEmpty() && m_xName->get_text() == aDatabaseName) +{ +const OUString aConfigPath = officecfg::Office::DataAccess::RegisteredNames::path() + "/" + sNodeName; +if (m_xReadWriteAccess->hasPropertyByHierarchicalName(aConfigPath + "/Name")) +{ +css::beans::Property aProperty = m_xReadWriteAccess->getPropertyByHierarchicalName(aConfigPath + "/Name"); +bool bReadOnly = (aProperty.Attributes & css::beans::PropertyAttribute::READONLY) != 0; + +m_xURL->set_sensitive(!bReadOnly); +m_xBrowseFile->set_sensitive(!bReadOnly); +} + +if (m_xReadWriteAccess->hasPropertyByHierarchicalName(aConfigPath + "/Location")) +{ +css::beans::Property aProperty = m_xReadWriteAccess->getPropertyByHierarchicalName(aConfigPath + "/Location"); +bool bReadOnly = (aProperty.Attributes & css::beans::PropertyAttribute::READONLY) != 0; + +m_xName->set_sensitive(!bReadOnly); +} +break; +} +} +} } IMPL_LINK_NOARG(ODocumentLinkDialog, OnOk, weld::Button&, void) diff --git a/cui/source/options/doclinkdialog.hxx b/cui/source/options/doclinkdialog.hxx index 371dc6504fe9..3ea0d5027d0f 100644 --- a/cui/source/options/doclinkdialog.hxx +++ b/cui/source/options/doclinkdialog.hxx @@ -21,6 +21,7 @@ #include #include +#include namespace svx { @@ -30,6 +31,8 @@ namespace svx { Link m_aNameValidator; +css::uno::Reference< css::configuration::XReadWriteAccess> m_xReadWriteAccess; + std::unique_ptr m_xBrowseFile; std::unique_ptr m_xName; std::unique_ptr m_xOK;
[Libreoffice-commits] core.git: cui/source cui/uiconfig
cui/source/options/connpooloptions.cxx | 30 +++- cui/source/options/connpooloptions.hxx |6 cui/uiconfig/ui/connpooloptions.ui | 244 + 3 files changed, 191 insertions(+), 89 deletions(-) New commits: commit ebb51d094d9d58568ad6adf5730b04b5f24c7f25 Author: Balazs Varga AuthorDate: Mon Nov 6 11:25:44 2023 +0100 Commit: Balazs Varga CommitDate: Tue Nov 7 21:40:50 2023 +0100 tdf#158004 - UI: Part 20 - Unify lockdown behavior of Options dialog for Connections Page. Change-Id: I76510a893bb35e03e6401aeeb03971969cc42ad2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158989 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx index 00101bed4fb6..f6321f2252b1 100644 --- a/cui/source/options/connpooloptions.cxx +++ b/cui/source/options/connpooloptions.cxx @@ -25,6 +25,8 @@ #include #include #include +#include +#include namespace offapp { @@ -49,13 +51,16 @@ namespace offapp , m_sYes(CuiResId(RID_CUISTR_YES)) , m_sNo(CuiResId(RID_CUISTR_NO)) , m_xEnablePooling(m_xBuilder->weld_check_button("connectionpooling")) +, m_xEnablePoolingImg(m_xBuilder->weld_widget("lockconnectionpooling")) , m_xDriversLabel(m_xBuilder->weld_label("driverslabel")) , m_xDriverList(m_xBuilder->weld_tree_view("driverlist")) , m_xDriverLabel(m_xBuilder->weld_label("driverlabel")) , m_xDriver(m_xBuilder->weld_label("driver")) , m_xDriverPoolingEnabled(m_xBuilder->weld_check_button("enablepooling")) +, m_xDriverPoolingEnabledImg(m_xBuilder->weld_widget("lockenablepooling")) , m_xTimeoutLabel(m_xBuilder->weld_label("timeoutlabel")) , m_xTimeout(m_xBuilder->weld_spin_button("timeout")) +, m_xTimeoutImg(m_xBuilder->weld_widget("locktimeout")) { m_xDriverList->set_size_request(m_xDriverList->get_approximate_digit_width() * 60, m_xDriverList->get_height_rows(15)); @@ -68,6 +73,9 @@ namespace offapp }; m_xDriverList->set_column_fixed_widths(aWidths); +css::uno::Reference < css::uno::XComponentContext > xContext(::comphelper::getProcessComponentContext()); +m_xReadWriteAccess = css::configuration::ReadWriteAccess::create(xContext, "*"); + m_xEnablePooling->connect_toggled( LINK(this, ConnectionPoolOptionsPage, OnEnabledDisabled) ); m_xDriverPoolingEnabled->connect_toggled( LINK(this, ConnectionPoolOptionsPage, OnEnabledDisabled) ); @@ -136,6 +144,8 @@ namespace offapp const SfxBoolItem* pEnabled = _rSet.GetItem(SID_SB_POOLING_ENABLED); OSL_ENSURE(pEnabled, "ConnectionPoolOptionsPage::implInitControls: missing the Enabled item!"); m_xEnablePooling->set_active(pEnabled == nullptr || pEnabled->GetValue()); + m_xEnablePooling->set_sensitive(!officecfg::Office::DataAccess::ConnectionPool::EnablePooling::isReadOnly()); + m_xEnablePoolingImg->set_visible(officecfg::Office::DataAccess::ConnectionPool::EnablePooling::isReadOnly()); m_xEnablePooling->save_state(); @@ -233,6 +243,20 @@ namespace offapp m_xDriverPoolingEnabled->set_active(currentSetting.bEnabled); m_xTimeout->set_value(currentSetting.nTimeoutSeconds); +OUString aConfigPath = officecfg::Office::DataAccess::ConnectionPool::DriverSettings::path() + "/" + currentSetting.sName; +css::beans::Property aProperty = m_xReadWriteAccess->getPropertyByHierarchicalName(aConfigPath + "/Enable"); +bool bReadOnly = (aProperty.Attributes & css::beans::PropertyAttribute::READONLY) != 0; + +m_xDriverPoolingEnabled->set_sensitive(!bReadOnly); +m_xDriverPoolingEnabledImg->set_visible(bReadOnly); + +aProperty = m_xReadWriteAccess->getPropertyByHierarchicalName(aConfigPath + "/Timeout"); +bReadOnly = (aProperty.Attributes & css::beans::PropertyAttribute::READONLY) != 0; + +m_xTimeout->set_sensitive(!bReadOnly); +m_xTimeoutLabel->set_sensitive(!bReadOnly); +m_xTimeoutImg->set_visible(bReadOnly); + OnEnabledDisabled(*m_xDriverPoolingEnabled); } } @@ -259,13 +283,13 @@ namespace offapp m_xDriverList->select(-1); m_xDriverLabel->set_sensitive(bGloballyEnabled); m_xDriver->set_sensitive(bGloballyEnabled); -m_xDriverPoolingEnabled->set_sensitive(bGloballyEnabled); +m_xDriverPoolingEnabled->set_sensitive(bGloballyEnabled && !m_xDriverPoolingEnabledImg->get_visible()); } else OSL_ENSURE(bLocalDriverChanged, "ConnectionPoolOptionsPage::OnEnabledDisabled: where did this come from?"); -m_xTimeoutLabel->set_sensitive(bGloballyEnabled &&
[Libreoffice-commits] core.git: cui/source
cui/source/dialogs/hlmarkwn.cxx | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) New commits: commit bf927cb4513f8ef2a5205e98fbcf1ff02c344b4a Author: Andreas Heinisch AuthorDate: Fri Nov 3 14:07:34 2023 +0100 Commit: Andreas Heinisch CommitDate: Mon Nov 6 22:39:33 2023 +0100 tdf#149935 - Hyperlink Target Dialog: remember last used position and size Change-Id: I87fdf78b6ec4963eb4450d937dd86209e03865a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158879 Tested-by: Jenkins Reviewed-by: Andreas Heinisch diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx index 7eb2ced02489..cf90450450ad 100644 --- a/cui/source/dialogs/hlmarkwn.cxx +++ b/cui/source/dialogs/hlmarkwn.cxx @@ -79,11 +79,19 @@ SvxHlinkDlgMarkWnd::SvxHlinkDlgMarkWnd(weld::Window* pParentDialog, SvxHyperlink mxBtApply->connect_clicked( LINK ( this, SvxHlinkDlgMarkWnd, ClickApplyHdl_Impl ) ); mxBtClose->connect_clicked( LINK ( this, SvxHlinkDlgMarkWnd, ClickCloseHdl_Impl ) ); mxLbTree->connect_row_activated( LINK ( this, SvxHlinkDlgMarkWnd, DoubleClickApplyHdl_Impl ) ); + +// tdf#149935 - remember last used position and size +SvtViewOptions aDlgOpt(EViewType::Dialog, m_xDialog->get_help_id()); +if (aDlgOpt.Exists()) +m_xDialog->set_window_state(aDlgOpt.GetWindowState()); } SvxHlinkDlgMarkWnd::~SvxHlinkDlgMarkWnd() { ClearTree(); +// tdf#149935 - remember last used position and size +SvtViewOptions aDlgOpt(EViewType::Dialog, m_xDialog->get_help_id()); + aDlgOpt.SetWindowState(m_xDialog->get_window_state(vcl::WindowDataMask::PosSize)); } void SvxHlinkDlgMarkWnd::ErrorChanged() @@ -126,7 +134,12 @@ sal_uInt16 SvxHlinkDlgMarkWnd::SetError( sal_uInt16 nError) // Move window void SvxHlinkDlgMarkWnd::MoveTo(const Point& rNewPos) { -m_xDialog->window_move(rNewPos.X(), rNewPos.Y()); +// tdf#149935 - remember last used position and size +SvtViewOptions aDlgOpt(EViewType::Dialog, m_xDialog->get_help_id()); +if (aDlgOpt.Exists()) +m_xDialog->set_window_state(aDlgOpt.GetWindowState()); +else +m_xDialog->window_move(rNewPos.X(), rNewPos.Y()); } namespace
[Libreoffice-commits] core.git: cui/source cui/uiconfig
cui/source/options/optlanguagetool.cxx | 24 ++ cui/source/options/optlanguagetool.hxx |6 + cui/uiconfig/ui/langtoolconfigpage.ui | 130 - 3 files changed, 143 insertions(+), 17 deletions(-) New commits: commit 16737129e072a766ba58afddae4a992ad61cec6f Author: Balazs Varga AuthorDate: Sat Nov 4 12:05:15 2023 +0100 Commit: Balazs Varga CommitDate: Mon Nov 6 10:17:28 2023 +0100 tdf#158002 - UI: Part 19 - Unify lockdown behavior of Options dialog for LanguageTool Page. Change-Id: Ib1255dd7a67eae7e9c1f2cf6da984ba614f3453a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158931 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/cui/source/options/optlanguagetool.cxx b/cui/source/options/optlanguagetool.cxx index fab94987a32d..8c56a40e728f 100644 --- a/cui/source/options/optlanguagetool.cxx +++ b/cui/source/options/optlanguagetool.cxx @@ -31,11 +31,17 @@ OptLanguageToolTabPage::OptLanguageToolTabPage(weld::Container* pPage, const SfxItemSet& rSet) : SfxTabPage(pPage, pController, "cui/ui/langtoolconfigpage.ui", "OptLangToolPage", ) , m_xBaseURLED(m_xBuilder->weld_entry("baseurl")) +, m_xBaseURLImg(m_xBuilder->weld_widget("lockbaseurl")) , m_xUsernameED(m_xBuilder->weld_entry("username")) +, m_xUsernameImg(m_xBuilder->weld_widget("lockusername")) , m_xApiKeyED(m_xBuilder->weld_entry("apikey")) +, m_xApiKeyImg(m_xBuilder->weld_widget("lockapikey")) , m_xRestProtocol(m_xBuilder->weld_entry("restprotocol")) +, m_xRestProtocolImg(m_xBuilder->weld_widget("lockrestprotocol")) , m_xActivateBox(m_xBuilder->weld_check_button("activate")) +, m_xActivateBoxImg(m_xBuilder->weld_widget("lockactivate")) , m_xSSLDisableVerificationBox(m_xBuilder->weld_check_button("verifyssl")) +, m_xSSLDisableVerificationBoxImg(m_xBuilder->weld_widget("lockverifyssl")) , m_xApiSettingsFrame(m_xBuilder->weld_frame("apisettings")) { m_xActivateBox->connect_toggled(LINK(this, OptLanguageToolTabPage, CheckHdl)); @@ -60,7 +66,11 @@ void OptLanguageToolTabPage::EnableControls(bool bEnable) } m_xApiSettingsFrame->set_visible(bEnable); m_xActivateBox->set_active(bEnable); +m_xActivateBox->set_sensitive(!LanguageToolCfg::IsEnabled::isReadOnly()); +m_xActivateBoxImg->set_visible(LanguageToolCfg::IsEnabled::isReadOnly()); m_xSSLDisableVerificationBox->set_active(!LanguageToolCfg::SSLCertVerify::get()); + m_xSSLDisableVerificationBox->set_sensitive(!LanguageToolCfg::SSLCertVerify::isReadOnly()); + m_xSSLDisableVerificationBoxImg->set_visible(LanguageToolCfg::SSLCertVerify::isReadOnly()); } IMPL_LINK_NOARG(OptLanguageToolTabPage, CheckHdl, weld::Toggleable&, void) @@ -77,10 +87,24 @@ void OptLanguageToolTabPage::Reset(const SfxItemSet*) else m_xBaseURLED->set_text(aBaseURL); +m_xBaseURLED->set_sensitive(!LanguageToolCfg::BaseURL::isReadOnly()); +m_xBaseURLImg->set_visible(LanguageToolCfg::BaseURL::isReadOnly()); + m_xUsernameED->set_text(LanguageToolCfg::Username::get().value_or("")); +m_xUsernameED->set_sensitive(!LanguageToolCfg::Username::isReadOnly()); +m_xUsernameImg->set_visible(LanguageToolCfg::Username::isReadOnly()); + m_xApiKeyED->set_text(LanguageToolCfg::ApiKey::get().value_or("")); +m_xApiKeyED->set_sensitive(!LanguageToolCfg::ApiKey::isReadOnly()); +m_xApiKeyImg->set_visible(LanguageToolCfg::ApiKey::isReadOnly()); + m_xRestProtocol->set_text(LanguageToolCfg::RestProtocol::get().value_or("")); + m_xRestProtocol->set_sensitive(!LanguageToolCfg::RestProtocol::isReadOnly()); + m_xRestProtocolImg->set_visible(LanguageToolCfg::RestProtocol::isReadOnly()); + m_xSSLDisableVerificationBox->set_active(!LanguageToolCfg::SSLCertVerify::get()); + m_xSSLDisableVerificationBox->set_sensitive(!LanguageToolCfg::SSLCertVerify::isReadOnly()); + m_xSSLDisableVerificationBoxImg->set_visible(LanguageToolCfg::SSLCertVerify::isReadOnly()); } OUString OptLanguageToolTabPage::GetAllStrings() diff --git a/cui/source/options/optlanguagetool.hxx b/cui/source/options/optlanguagetool.hxx index 25781c612913..3e3c3e8da0c7 100644 --- a/cui/source/options/optlanguagetool.hxx +++ b/cui/source/options/optlanguagetool.hxx @@ -36,11 +36,17 @@ public: private: std::unique_ptr m_xBaseURLED; +std::unique_ptr m_xBaseURLImg; std::unique_ptr m_xUsernameED; +std::unique_ptr m_xUsernameImg; std::unique_ptr m_xApiKeyED; +std::unique_ptr m_xApiKeyImg; std::unique_ptr m_xRestProtocol; +std::unique_ptr m_xRestProtocolImg; std::unique_ptr m_xActivateBox; +std::unique_ptr m_xActivateBoxImg; std::unique_ptr m_xSSLDisableVerificationBox; +std::unique_ptr m_xSSLDisableVerificationBoxImg; std::unique_ptr m_xApiSettingsFrame; void EnableControls(bool bEnable); diff --git
[Libreoffice-commits] core.git: cui/source cui/uiconfig include/unotools unotools/source
cui/source/options/optgdlg.cxx | 22 cui/source/options/optgdlg.hxx | 10 + cui/uiconfig/ui/optlanguagespage.ui | 141 include/unotools/syslocaleoptions.hxx |4 unotools/source/config/syslocaleoptions.cxx | 10 + 5 files changed, 169 insertions(+), 18 deletions(-) New commits: commit 07590ff83e03077cf0d755f698b5b6bb36bb54d2 Author: Balazs Varga AuthorDate: Fri Nov 3 14:20:15 2023 +0100 Commit: Balazs Varga CommitDate: Sat Nov 4 10:58:42 2023 +0100 tdf#158001 - UI: Part 18 - Unify lockdown behavior of Options dialog for Languages Page. Change-Id: I3f4cf27980dd6d06da13f554feaca192ebd0b671 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158882 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index ee727e074e51..9e32e2fc9ea6 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -1170,19 +1170,28 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(weld::Container* pPage, weld::DialogCon , m_xUserInterfaceLB(m_xBuilder->weld_combo_box("userinterface")) , m_xLocaleSettingFT(m_xBuilder->weld_label("localesettingFT")) , m_xLocaleSettingLB(new SvxLanguageBox(m_xBuilder->weld_combo_box("localesetting"))) +, m_xLocaleSettingImg(m_xBuilder->weld_widget("locklocalesetting")) +, m_xDecimalSeparatorFT(m_xBuilder->weld_label("label6")) , m_xDecimalSeparatorCB(m_xBuilder->weld_check_button("decimalseparator")) +, m_xDecimalSeparatorImg(m_xBuilder->weld_widget("lockdecimalseparator")) , m_xCurrencyFT(m_xBuilder->weld_label("defaultcurrency")) , m_xCurrencyLB(m_xBuilder->weld_combo_box("currencylb")) +, m_xCurrencyImg(m_xBuilder->weld_widget("lockcurrencylb")) , m_xDatePatternsFT(m_xBuilder->weld_label("dataaccpatterns")) , m_xDatePatternsED(m_xBuilder->weld_entry("datepatterns")) +, m_xDatePatternsImg(m_xBuilder->weld_widget("lockdatepatterns")) , m_xWesternLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box("westernlanguage"))) , m_xWesternLanguageFT(m_xBuilder->weld_label("western")) +, m_xWesternLanguageImg(m_xBuilder->weld_widget("lockwesternlanguage")) , m_xAsianLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box("asianlanguage"))) , m_xComplexLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box("complexlanguage"))) , m_xCurrentDocCB(m_xBuilder->weld_check_button("currentdoc")) , m_xAsianSupportCB(m_xBuilder->weld_check_button("asiansupport")) +, m_xAsianSupportImg(m_xBuilder->weld_widget("lockasiansupport")) , m_xCTLSupportCB(m_xBuilder->weld_check_button("ctlsupport")) +, m_xCTLSupportImg(m_xBuilder->weld_widget("lockctlsupport")) , m_xIgnoreLanguageChangeCB(m_xBuilder->weld_check_button("ignorelanguagechange")) +, m_xIgnoreLanguageChangeImg(m_xBuilder->weld_widget("lockignorelanguagechange")) { // tdf#125483 save original default label m_sDecimalSeparatorLabel = m_xDecimalSeparatorCB->get_label(); @@ -1321,6 +1330,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(weld::Container* pPage, weld::DialogCon m_xAsianSupportCB->save_state(); bool bReadonly = SvtCJKOptions::IsAnyReadOnly(); m_xAsianSupportCB->set_sensitive(!bReadonly); +m_xAsianSupportImg->set_visible(bReadonly); SupportHdl(*m_xAsianSupportCB); m_bOldCtl = SvtCTLOptions::IsCTLFontEnabled(); @@ -1328,6 +1338,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(weld::Container* pPage, weld::DialogCon m_xCTLSupportCB->save_state(); bReadonly = pLangConfig->aCTLLanguageOptions.IsReadOnly(SvtCTLOptions::E_CTLFONT); m_xCTLSupportCB->set_sensitive(!bReadonly); +m_xCTLSupportImg->set_visible(bReadonly); SupportHdl(*m_xCTLSupportCB); m_xIgnoreLanguageChangeCB->set_active( pLangConfig->aSysLocaleOptions.IsIgnoreLanguageChange() ); @@ -1633,12 +1644,20 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet* rSet ) bool bReadonly = pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::EOption::Locale); m_xLocaleSettingLB->set_sensitive(!bReadonly); m_xLocaleSettingFT->set_sensitive(!bReadonly); +m_xLocaleSettingImg->set_visible(bReadonly); m_xDecimalSeparatorCB->set_active( pLangConfig->aSysLocaleOptions.IsDecimalSeparatorAsLocale()); +bReadonly = pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::EOption::DecimalSeparator); +m_xDecimalSeparatorCB->set_sensitive(!bReadonly); +m_xDecimalSeparatorFT->set_sensitive(!bReadonly); +m_xDecimalSeparatorImg->set_visible(bReadonly); m_xDecimalSeparatorCB->save_state(); m_xIgnoreLanguageChangeCB->set_active( pLangConfig->aSysLocaleOptions.IsIgnoreLanguageChange()); +bReadonly = pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::EOption::IgnoreLanguageChange); +
[Libreoffice-commits] core.git: cui/source
cui/source/options/optchart.cxx |9 + 1 file changed, 9 insertions(+) New commits: commit 08ac4318176074f046ed3422d9dd7ace4591023e Author: Balazs Varga AuthorDate: Thu Nov 2 21:46:11 2023 +0100 Commit: Balazs Varga CommitDate: Fri Nov 3 10:51:47 2023 +0100 tdf#158000 - UI: Part 17 - Unify lockdown behavior of Options dialog for Chart Page. Change-Id: I374a0dc8ff43be490e64a7173963e04005aec7e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158852 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx index 66ab40df6e22..eef87d2cd324 100644 --- a/cui/source/options/optchart.cxx +++ b/cui/source/options/optchart.cxx @@ -26,6 +26,7 @@ #include #include #include +#include void SvxDefaultColorOptPage::InsertColorEntry(const XColorEntry& rEntry, sal_Int32 nPos) { @@ -100,6 +101,14 @@ SvxDefaultColorOptPage::SvxDefaultColorOptPage(weld::Container* pPage, weld::Dia { m_xLbChartColors->set_size_request(-1, m_xLbChartColors->get_height_rows(16)); +if (officecfg::Office::Chart::DefaultColor::Series::isReadOnly()) +{ +m_xPBDefault->set_sensitive(false); +m_xPBAdd->set_sensitive(false); +m_xPBRemove->set_sensitive(false); +m_xValSetColorBoxWin->set_sensitive(false); +} + m_xPBDefault->connect_clicked( LINK( this, SvxDefaultColorOptPage, ResetToDefaults ) ); m_xPBAdd->connect_clicked( LINK( this, SvxDefaultColorOptPage, AddChartColor ) ); m_xPBRemove->connect_clicked( LINK( this, SvxDefaultColorOptPage, RemoveChartColor ) );
[Libreoffice-commits] core.git: cui/source cui/uiconfig
cui/source/options/opthtml.cxx | 94 - cui/source/options/opthtml.hxx | 14 ++ cui/uiconfig/ui/opthtmlpage.ui | 226 + 3 files changed, 311 insertions(+), 23 deletions(-) New commits: commit d7d89a47e9e50254469d957b86f0e16bec22fe62 Author: Balazs Varga AuthorDate: Thu Nov 2 18:49:41 2023 +0100 Commit: Balazs Varga CommitDate: Fri Nov 3 10:51:09 2023 +0100 tdf#157862 - UI: Part 16 - Unify lockdown behavior of Options dialog for Load/Save - HTML Page. Change-Id: I8e9599c25eba62f7b82d8e3f56de031a1c6366fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158849 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx index 7cd8788dd1d2..6880ec4b2e33 100644 --- a/cui/source/options/opthtml.cxx +++ b/cui/source/options/opthtml.cxx @@ -26,19 +26,33 @@ OfaHtmlTabPage::OfaHtmlTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) : SfxTabPage(pPage, pController, "cui/ui/opthtmlpage.ui", "OptHtmlPage", ) , m_xSize1NF(m_xBuilder->weld_spin_button("size1")) +, m_xSize1Img(m_xBuilder->weld_widget("locksize1")) , m_xSize2NF(m_xBuilder->weld_spin_button("size2")) +, m_xSize2Img(m_xBuilder->weld_widget("locksize2")) , m_xSize3NF(m_xBuilder->weld_spin_button("size3")) +, m_xSize3Img(m_xBuilder->weld_widget("locksize3")) , m_xSize4NF(m_xBuilder->weld_spin_button("size4")) +, m_xSize4Img(m_xBuilder->weld_widget("locksize4")) , m_xSize5NF(m_xBuilder->weld_spin_button("size5")) +, m_xSize5Img(m_xBuilder->weld_widget("locksize5")) , m_xSize6NF(m_xBuilder->weld_spin_button("size6")) +, m_xSize6Img(m_xBuilder->weld_widget("locksize6")) , m_xSize7NF(m_xBuilder->weld_spin_button("size7")) +, m_xSize7Img(m_xBuilder->weld_widget("locksize7")) , m_xNumbersEnglishUSCB(m_xBuilder->weld_check_button("numbersenglishus")) +, m_xNumbersEnglishUSImg(m_xBuilder->weld_widget("locknumbersenglishus")) , m_xUnknownTagCB(m_xBuilder->weld_check_button("unknowntag")) +, m_xUnknownTagImg(m_xBuilder->weld_widget("lockunknowntag")) , m_xIgnoreFontNamesCB(m_xBuilder->weld_check_button("ignorefontnames")) +, m_xIgnoreFontNamesImg(m_xBuilder->weld_widget("lockignorefontnames")) , m_xStarBasicCB(m_xBuilder->weld_check_button("starbasic")) +, m_xStarBasicImg(m_xBuilder->weld_widget("lockstarbasic")) , m_xStarBasicWarningCB(m_xBuilder->weld_check_button("starbasicwarning")) +, m_xStarBasicWarningImg(m_xBuilder->weld_widget("lockstarbasicwarning")) , m_xPrintExtensionCB(m_xBuilder->weld_check_button("printextension")) +, m_xPrintExtensionImg(m_xBuilder->weld_widget("lockprintextension")) , m_xSaveGrfLocalCB(m_xBuilder->weld_check_button("savegrflocal")) +, m_xSaveGrfLocalImg(m_xBuilder->weld_widget("locksavegrflocal")) { // replace placeholder with UI string from language list OUString aText(m_xNumbersEnglishUSCB->get_label()); @@ -151,21 +165,99 @@ bool OfaHtmlTabPage::FillItemSet( SfxItemSet* ) void OfaHtmlTabPage::Reset( const SfxItemSet* ) { m_xSize1NF->set_value(officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_1::get()); +if (officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_1::isReadOnly()) +{ +m_xSize1NF->set_sensitive(false); +m_xSize1Img->set_visible(true); +} + m_xSize2NF->set_value(officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_2::get()); +if (officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_2::isReadOnly()) +{ +m_xSize2NF->set_sensitive(false); +m_xSize2Img->set_visible(true); +} + m_xSize3NF->set_value(officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_3::get()); +if (officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_3::isReadOnly()) +{ +m_xSize3NF->set_sensitive(false); +m_xSize3Img->set_visible(true); +} + m_xSize4NF->set_value(officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_4::get()); +if (officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_4::isReadOnly()) +{ +m_xSize4NF->set_sensitive(false); +m_xSize4Img->set_visible(true); +} + m_xSize5NF->set_value(officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_5::get()); +if (officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_5::isReadOnly()) +{ +m_xSize5NF->set_sensitive(false); +m_xSize5Img->set_visible(true); +} + m_xSize6NF->set_value(officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_6::get()); +if (officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_6::isReadOnly()) +{ +m_xSize6NF->set_sensitive(false); +m_xSize6Img->set_visible(true); +} +
[Libreoffice-commits] core.git: cui/source cui/uiconfig
cui/source/options/optfltr.cxx | 50 +++ cui/source/options/optfltr.hxx |3 cui/uiconfig/ui/optfltrembedpage.ui | 154 +++- 3 files changed, 154 insertions(+), 53 deletions(-) New commits: commit 6f12739b6201948b8ccf8f162c999e42714539ba Author: Balazs Varga AuthorDate: Thu Nov 2 16:28:29 2023 +0100 Commit: Balazs Varga CommitDate: Fri Nov 3 10:50:28 2023 +0100 tdf#157861 - UI: Part 15 - Unify lockdown behavior of Options dialog for Load/Save - MS Office Page. Change-Id: Ifd576e5030e49bef3c73f55f4d3f23eea34a45f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158837 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx index 7c04c20b27d0..b582b065bc65 100644 --- a/cui/source/options/optfltr.cxx +++ b/cui/source/options/optfltr.cxx @@ -185,9 +185,12 @@ OfaMSFilterTabPage2::OfaMSFilterTabPage2(weld::Container* pPage, weld::DialogCon , sChgToFromVisio(CuiResId(RID_CUISTR_CHG_VISIO)) , sChgToFromPDF(CuiResId(RID_CUISTR_CHG_PDF)) , m_xCheckLB(m_xBuilder->weld_tree_view("checklbcontainer")) +, m_xHighlightingFT(m_xBuilder->weld_label("label5")) , m_xHighlightingRB(m_xBuilder->weld_radio_button("highlighting")) , m_xShadingRB(m_xBuilder->weld_radio_button("shading")) +, m_xShadingImg(m_xBuilder->weld_widget("lockbuttonbox1")) , m_xMSOLockFileCB(m_xBuilder->weld_check_button("mso_lockfile")) +, m_xMSOLockFileImg(m_xBuilder->weld_widget("lockmso_lockfile")) { std::vector aWidths { @@ -351,6 +354,7 @@ void OfaMSFilterTabPage2::Reset( const SfxItemSet* ) }; bool bFirstCol = true; +bool bReadOnly = false; for( const ChkCBoxEntries & rArr : aChkArr ) { // we loop through the list, alternating reading the first/second column, @@ -365,13 +369,50 @@ void OfaMSFilterTabPage2::Reset( const SfxItemSet* ) if (rArr.eType != MSFltrPg2_CheckBoxEntries::PDF) { bCheck = (rOpt.*rArr.FnIs)(); +switch (rArr.eType) +{ +case MSFltrPg2_CheckBoxEntries::Math: +if (nCol == 0) +bReadOnly = officecfg::Office::Common::Filter::Microsoft::Import::MathTypeToMath::isReadOnly(); +else +bReadOnly = officecfg::Office::Common::Filter::Microsoft::Export::MathToMathType::isReadOnly(); +break; +case MSFltrPg2_CheckBoxEntries::Writer: +if (nCol == 0) +bReadOnly = officecfg::Office::Common::Filter::Microsoft::Import::WinWordToWriter::isReadOnly(); +else +bReadOnly = officecfg::Office::Common::Filter::Microsoft::Export::WriterToWinWord::isReadOnly(); +break; +case MSFltrPg2_CheckBoxEntries::Calc: +if (nCol == 0) +bReadOnly = officecfg::Office::Common::Filter::Microsoft::Import::ExcelToCalc::isReadOnly(); +else +bReadOnly = officecfg::Office::Common::Filter::Microsoft::Export::CalcToExcel::isReadOnly(); +break; +case MSFltrPg2_CheckBoxEntries::Impress: +if (nCol == 0) +bReadOnly = officecfg::Office::Common::Filter::Microsoft::Import::PowerPointToImpress::isReadOnly(); +else +bReadOnly = officecfg::Office::Common::Filter::Microsoft::Export::ImpressToPowerPoint::isReadOnly(); +break; +case MSFltrPg2_CheckBoxEntries::SmartArt: +bReadOnly = officecfg::Office::Common::Filter::Microsoft::Import::SmartArtToShapes::isReadOnly(); +break; +case MSFltrPg2_CheckBoxEntries::Visio: +bReadOnly = officecfg::Office::Common::Filter::Microsoft::Import::VisioToDraw::isReadOnly(); +break; +default: +break; +} } else { bCheck = officecfg::Office::Common::Filter::Adobe::Import::PDFToDraw::get(); +bReadOnly = officecfg::Office::Common::Filter::Adobe::Import::PDFToDraw::isReadOnly(); nCol = 0; } m_xCheckLB->set_toggle(nEntry, bCheck ? TRISTATE_TRUE : TRISTATE_FALSE, nCol); +m_xCheckLB->set_sensitive(nEntry, !bReadOnly, nCol); } if (rArr.eType == MSFltrPg2_CheckBoxEntries::SmartArt) { @@ -385,11 +426,20 @@ void OfaMSFilterTabPage2::Reset( const SfxItemSet* ) else m_xShadingRB->set_active(true); +if (officecfg::Office::Common::Filter::Microsoft::Export::CharBackgroundToHighlighting::isReadOnly()) +{ +
[Libreoffice-commits] core.git: cui/source sw/source
cui/source/inc/backgrnd.hxx | 17 +- cui/source/inc/cuitabarea.hxx |1 cui/source/tabpages/backgrnd.cxx| 212 +--- sw/source/uibase/shells/textsh1.cxx |1 4 files changed, 116 insertions(+), 115 deletions(-) New commits: commit 167fb166e4097c4a855c08a70cdf70c19d4d87ac Author: Jim Raykowski AuthorDate: Tue Oct 17 17:21:33 2023 -0800 Commit: Jim Raykowski CommitDate: Fri Nov 3 03:18:38 2023 +0100 tdf#157801 Fix direct formatting is applied after pressing OK in the Character properties dialog when the Highlighting tab Color page is open and the color has not been changed This is noticeable when character highlighting direct formatting is already at paragraph level. The expected result of opening the properties dialog, and immediately pressing OK without changing anything (or alternatively, after changing something there and then pressing Reset then OK), is no changes in applied properties at all. Inspiration for rework of the background tab page. With this patch XATTR_FILL items need not be included in the InAttrs set, for example, as part of this patch, the XATTR_FILLSTYLE, XATTR_FILLCOLOR range is removed from the sw_CharDialog core set. Change-Id: Ic2de53a29579c33820fc381d354a4afebe048a5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158100 Tested-by: Jenkins Reviewed-by: Jim Raykowski diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx index 450fbdaaa27f..3d50d69e95f4 100644 --- a/cui/source/inc/backgrnd.hxx +++ b/cui/source/inc/backgrnd.hxx @@ -37,23 +37,28 @@ class SvxBrushItem; class SvxBkgTabPage : public SvxAreaTabPage { -static const WhichRangesContainer pPageRanges; +static const WhichRangesContainer pBkgRanges; std::unique_ptr m_xTblLBox; -boolbHighlighting : 1; -boolbCharBackColor : 1; -SfxItemSet maSet; -std::unique_ptr m_pResetSet; +bool m_bHighlighting = false; +bool m_bCharBackColor = false; + +// m_aAttrSet is used to convert between SvxBrushItem and XFILL item attributes and also to +// allow for cell, row, and table backgrounds to be set in one Table dialog opening. +SfxItemSet m_aAttrSet; sal_Int32 m_nActPos = -1; DECL_LINK(TblDestinationHdl_Impl, weld::ComboBox&, void); + +void SetActiveTableDestinationBrushItem(); + public: SvxBkgTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs); virtual ~SvxBkgTabPage() override; // returns the area of the which-values -static WhichRangesContainer GetRanges() { return pPageRanges; } +static WhichRangesContainer GetRanges() { return pBkgRanges; } static std::unique_ptr Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* ); virtual bool FillItemSet( SfxItemSet* ) override; diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index 2fbfcd1435ac..0917fcb91dc8 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -253,7 +253,6 @@ protected: void SetOptimalSize(weld::DialogController* pController); void SelectFillType( weld::Toggleable& rButton, const SfxItemSet* _pSet = nullptr ); -SfxTabPage* GetFillTabPage() { return m_xFillTabPage.get(); } bool IsBtnClicked() const { return m_bBtnClicked; } diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 5706f98c310a..56bccfacdffe 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -36,7 +36,7 @@ using namespace css; #define TBL_DEST_ROW1 #define TBL_DEST_TBL2 -const WhichRangesContainer SvxBkgTabPage::pPageRanges(svl::Items< +const WhichRangesContainer SvxBkgTabPage::pBkgRanges(svl::Items< SID_ATTR_BRUSH, SID_ATTR_BRUSH, SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR >); @@ -63,32 +63,13 @@ static sal_uInt16 lcl_GetTableDestSlot(sal_Int32 nTblDest) SvxBkgTabPage::SvxBkgTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs) : SvxAreaTabPage(pPage, pController, rInAttrs), -bHighlighting(false), -bCharBackColor(false), -maSet(rInAttrs) +m_aAttrSet(*rInAttrs.GetPool(), + rInAttrs.GetRanges().MergeRange(XATTR_FILL_FIRST, XATTR_FILL_LAST)) { m_xBtnGradient->hide(); m_xBtnHatch->hide(); m_xBtnBitmap->hide(); m_xBtnPattern->hide(); - -SfxObjectShell* pDocSh = SfxObjectShell::Current(); - -XColorListRef pColorTable; -if ( pDocSh ) -if (auto pItem = pDocSh->GetItem( SID_COLOR_TABLE )) -pColorTable = pItem->GetColorList(); - -if ( !pColorTable.is() ) -pColorTable = XColorList::CreateStdColorList(); - -XBitmapListRef pBitmapList; -if ( pDocSh ) -if (auto pItem = pDocSh->GetItem(
[Libreoffice-commits] core.git: cui/source cui/uiconfig
cui/source/options/optfltr.cxx | 33 ++- cui/source/options/optfltr.hxx |8 ++ cui/uiconfig/ui/optfltrpage.ui | 120 ++--- 3 files changed, 151 insertions(+), 10 deletions(-) New commits: commit 30877bdc01d3a9cda1878f66ca7a84760f5f8c67 Author: Balazs Varga AuthorDate: Wed Nov 1 23:03:19 2023 +0100 Commit: Balazs Varga CommitDate: Thu Nov 2 13:50:51 2023 +0100 tdf#157860 - UI: Part 14 - Unify lockdown behavior of Options dialog for Load/Save VBA Properties Page. Change-Id: I9526c2a5aa25fbdea1edbc0051d9b6a29c643d8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158781 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx index 0f1df6ef6755..7c04c20b27d0 100644 --- a/cui/source/options/optfltr.cxx +++ b/cui/source/options/optfltr.cxx @@ -20,6 +20,9 @@ #include #include #include +#include +#include +#include #include "optfltr.hxx" #include #include @@ -39,13 +42,21 @@ enum class MSFltrPg2_CheckBoxEntries { OfaMSFilterTabPage::OfaMSFilterTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) : SfxTabPage(pPage, pController, "cui/ui/optfltrpage.ui", "OptFltrPage", ) , m_xWBasicCodeCB(m_xBuilder->weld_check_button("wo_basic")) +, m_xWBasicCodeImg(m_xBuilder->weld_widget("lockwo_basic")) , m_xWBasicWbctblCB(m_xBuilder->weld_check_button("wo_exec")) +, m_xWBasicWbctblImg(m_xBuilder->weld_widget("lockwo_exec")) , m_xWBasicStgCB(m_xBuilder->weld_check_button("wo_saveorig")) +, m_xWBasicStgImg(m_xBuilder->weld_widget("lockwo_saveorig")) , m_xEBasicCodeCB(m_xBuilder->weld_check_button("ex_basic")) +, m_xEBasicCodeImg(m_xBuilder->weld_widget("lockex_basic")) , m_xEBasicExectblCB(m_xBuilder->weld_check_button("ex_exec")) +, m_xEBasicExectblImg(m_xBuilder->weld_widget("lockex_exec")) , m_xEBasicStgCB(m_xBuilder->weld_check_button("ex_saveorig")) +, m_xEBasicStgImg(m_xBuilder->weld_widget("lockex_saveorig")) , m_xPBasicCodeCB(m_xBuilder->weld_check_button("pp_basic")) +, m_xPBasicCodeImg(m_xBuilder->weld_widget("lockpp_basic")) , m_xPBasicStgCB(m_xBuilder->weld_check_button("pp_saveorig")) +, m_xPBasicStgImg(m_xBuilder->weld_widget("lockpp_saveorig")) { m_xWBasicCodeCB->connect_toggled( LINK( this, OfaMSFilterTabPage, LoadWordBasicCheckHdl_Impl ) ); m_xEBasicCodeCB->connect_toggled( LINK( this, OfaMSFilterTabPage, LoadExcelBasicCheckHdl_Impl ) ); @@ -57,12 +68,14 @@ OfaMSFilterTabPage::~OfaMSFilterTabPage() IMPL_LINK_NOARG(OfaMSFilterTabPage, LoadWordBasicCheckHdl_Impl, weld::Toggleable&, void) { -m_xWBasicWbctblCB->set_sensitive(m_xWBasicCodeCB->get_active()); +m_xWBasicWbctblCB->set_sensitive(m_xWBasicCodeCB->get_active() && !officecfg::Office::Writer::Filter::Import::VBA::Executable::isReadOnly()); + m_xWBasicWbctblImg->set_visible(officecfg::Office::Writer::Filter::Import::VBA::Executable::isReadOnly()); } IMPL_LINK_NOARG(OfaMSFilterTabPage, LoadExcelBasicCheckHdl_Impl, weld::Toggleable&, void) { -m_xEBasicExectblCB->set_sensitive(m_xEBasicCodeCB->get_active()); +m_xEBasicExectblCB->set_sensitive(m_xEBasicCodeCB->get_active() && !officecfg::Office::Calc::Filter::Import::VBA::Executable::isReadOnly()); + m_xEBasicExectblImg->set_visible(officecfg::Office::Calc::Filter::Import::VBA::Executable::isReadOnly()); } std::unique_ptr OfaMSFilterTabPage::Create( weld::Container* pPage, weld::DialogController* pController, @@ -125,24 +138,40 @@ void OfaMSFilterTabPage::Reset( const SfxItemSet* ) const SvtFilterOptions& rOpt = SvtFilterOptions::Get(); m_xWBasicCodeCB->set_active( rOpt.IsLoadWordBasicCode() ); + m_xWBasicCodeCB->set_sensitive(!officecfg::Office::Writer::Filter::Import::VBA::Load::isReadOnly()); + m_xWBasicCodeImg->set_visible(officecfg::Office::Writer::Filter::Import::VBA::Load::isReadOnly()); m_xWBasicCodeCB->save_state(); m_xWBasicWbctblCB->set_active( rOpt.IsLoadWordBasicExecutable() ); + m_xWBasicWbctblCB->set_sensitive(!officecfg::Office::Writer::Filter::Import::VBA::Executable::isReadOnly()); + m_xWBasicWbctblImg->set_visible(officecfg::Office::Writer::Filter::Import::VBA::Executable::isReadOnly()); m_xWBasicWbctblCB->save_state(); m_xWBasicStgCB->set_active( rOpt.IsLoadWordBasicStorage() ); + m_xWBasicStgCB->set_sensitive(!officecfg::Office::Writer::Filter::Import::VBA::Save::isReadOnly()); + m_xWBasicStgImg->set_visible(officecfg::Office::Writer::Filter::Import::VBA::Save::isReadOnly()); m_xWBasicStgCB->save_state(); LoadWordBasicCheckHdl_Impl( *m_xWBasicCodeCB ); m_xEBasicCodeCB->set_active( rOpt.IsLoadExcelBasicCode() ); + m_xEBasicCodeCB->set_sensitive(!officecfg::Office::Calc::Filter::Import::VBA::Load::isReadOnly()); +
[Libreoffice-commits] core.git: cui/source include/svtools svtools/source sw/source
cui/source/options/opthtml.cxx|3 +-- include/svtools/htmlcfg.hxx |2 -- svtools/source/config/htmlcfg.cxx |5 - sw/source/filter/html/wrthtml.cxx |2 +- sw/source/ui/chrdlg/pardlg.cxx|4 ++-- sw/source/ui/fmtui/tmpdlg.cxx |4 ++-- sw/source/ui/table/tabledlg.cxx |4 ++-- sw/source/uibase/app/docst.cxx|4 ++-- 8 files changed, 10 insertions(+), 18 deletions(-) New commits: commit 08d74d8980d19c7f524c8f60de5c033d026d1c94 Author: Gabor Kelemen AuthorDate: Wed Nov 1 22:25:14 2023 +0100 Commit: Noel Grandin CommitDate: Thu Nov 2 09:37:08 2023 +0100 Drop SvxHtmlOptions::IsPrintLayoutExtension as it is just now a simple wrapper over officecfg Change-Id: If41c7c9db191af7ebede9072fd995d015056bf1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158779 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx index 379ccf253c1d..7cd8788dd1d2 100644 --- a/cui/source/options/opthtml.cxx +++ b/cui/source/options/opthtml.cxx @@ -18,7 +18,6 @@ */ #include -#include #include #include #include "opthtml.hxx" @@ -166,7 +165,7 @@ void OfaHtmlTabPage::Reset( const SfxItemSet* ) m_xStarBasicWarningCB->set_active(officecfg::Office::Common::Filter::HTML::Export::Warning::get()); m_xStarBasicWarningCB->set_sensitive(!m_xStarBasicCB->get_active()); m_xSaveGrfLocalCB->set_active(officecfg::Office::Common::Filter::HTML::Export::LocalGraphic::get()); -m_xPrintExtensionCB->set_active(SvxHtmlOptions::IsPrintLayoutExtension()); + m_xPrintExtensionCB->set_active(officecfg::Office::Common::Filter::HTML::Export::PrintLayout::get()); m_xPrintExtensionCB->save_state(); m_xStarBasicCB->save_state(); diff --git a/include/svtools/htmlcfg.hxx b/include/svtools/htmlcfg.hxx index 5e474cad33a9..259c7e965887 100644 --- a/include/svtools/htmlcfg.hxx +++ b/include/svtools/htmlcfg.hxx @@ -35,8 +35,6 @@ namespace SvxHtmlOptions SVT_DLLPUBLIC sal_uInt16 GetFontSize(sal_uInt16 nPos); SVT_DLLPUBLIC sal_uInt16 GetExportMode(); - -SVT_DLLPUBLIC bool IsPrintLayoutExtension(); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/config/htmlcfg.cxx b/svtools/source/config/htmlcfg.cxx index 473efc9d45dd..f2a91bf367ef 100644 --- a/svtools/source/config/htmlcfg.cxx +++ b/svtools/source/config/htmlcfg.cxx @@ -67,11 +67,6 @@ sal_uInt16 GetExportMode() return nExpMode; } -bool IsPrintLayoutExtension() -{ -return officecfg::Office::Common::Filter::HTML::Export::PrintLayout::get(); -} - } // namespace SvxHtmlOptions /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index e4980b311f5e..738d47c8978a 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -439,7 +439,7 @@ ErrCode SwHTMLWriter::WriteStream() m_bCfgFormFeed = !IsHTMLMode(HTMLMODE_PRINT_EXT); m_bCfgCpyLinkedGrfs = officecfg::Office::Common::Filter::HTML::Export::LocalGraphic::get(); -m_bCfgPrintLayout = SvxHtmlOptions::IsPrintLayoutExtension(); +m_bCfgPrintLayout = officecfg::Office::Common::Filter::HTML::Export::PrintLayout::get(); // get HTML template bool bOldHTMLMode = false; diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx index f28acc46bc87..379ee335cad8 100644 --- a/sw/source/ui/chrdlg/pardlg.cxx +++ b/sw/source/ui/chrdlg/pardlg.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -38,6 +37,7 @@ #include #include #include +#include SwParaDlg::SwParaDlg(weld::Window *pParent, SwView& rVw, @@ -73,7 +73,7 @@ SwParaDlg::SwParaDlg(weld::Window *pParent, AddTabPage("labelTP_PARA_ALIGN", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_ALIGN_PARAGRAPH), pFact->GetTabPageRangesFunc(RID_SVXPAGE_ALIGN_PARAGRAPH)); -if (!m_bDrawParaDlg && (!bHtmlMode || SvxHtmlOptions::IsPrintLayoutExtension())) +if (!m_bDrawParaDlg && (!bHtmlMode || officecfg::Office::Common::Filter::HTML::Export::PrintLayout::get())) { OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH), "GetTabPageCreatorFunc fail!"); OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH), "GetTabPageRangesFunc fail!"); diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index 497a8d40e10a..0a5d6686dadd 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -58,6 +57,7 @@ #include #include #include +#include // the dialog's carrier SwTemplateDlgController::SwTemplateDlgController(weld::Window* pParent, @@ -146,7 +146,7 @@
[Libreoffice-commits] core.git: cui/source cui/uiconfig
cui/source/options/optsave.cxx | 40 +++ cui/source/options/optsave.hxx | 15 + cui/uiconfig/ui/optsavepage.ui | 469 +++-- 3 files changed, 369 insertions(+), 155 deletions(-) New commits: commit c26cbb68c1f0d22c67899821c955ee2df78c7ca7 Author: Balazs Varga AuthorDate: Fri Oct 27 13:56:01 2023 +0200 Commit: Balazs Varga CommitDate: Mon Oct 30 09:00:22 2023 +0100 tdf#157859 - UI: Part 13 - Unify lockdown behavior of Options dialog for Load/Save General Page. Change-Id: I8e02b1b1188f42903ee164ee9f7ddd9113c602bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158565 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx index c3c5ead06fe0..434a9823cffd 100644 --- a/cui/source/options/optsave.cxx +++ b/cui/source/options/optsave.cxx @@ -81,22 +81,37 @@ SvxSaveTabPage::SvxSaveTabPage(weld::Container* pPage, weld::DialogController* p : SfxTabPage( pPage, pController, "cui/ui/optsavepage.ui", "OptSavePage", ) , pImpl(new SvxSaveTabPage_Impl) , m_xLoadViewPosAnyUserCB(m_xBuilder->weld_check_button("load_anyuser")) +, m_xLoadViewPosAnyUserImg(m_xBuilder->weld_widget("lockload_anyuser")) , m_xLoadUserSettingsCB(m_xBuilder->weld_check_button("load_settings")) +, m_xLoadUserSettingsImg(m_xBuilder->weld_widget("lockload_settings")) , m_xLoadDocPrinterCB(m_xBuilder->weld_check_button("load_docprinter")) +, m_xLoadDocPrinterImg(m_xBuilder->weld_widget("lockload_docprinter")) , m_xDocInfoCB(m_xBuilder->weld_check_button("docinfo")) +, m_xDocInfoImg(m_xBuilder->weld_widget("lockdocinfo")) , m_xBackupCB(m_xBuilder->weld_check_button("backup")) +, m_xBackupImg(m_xBuilder->weld_widget("lockbackup")) , m_xBackupIntoDocumentFolderCB(m_xBuilder->weld_check_button("backupintodocumentfolder")) +, m_xBackupIntoDocumentFolderImg(m_xBuilder->weld_widget("lockbackupintodoc")) , m_xAutoSaveCB(m_xBuilder->weld_check_button("autosave")) +, m_xAutoSaveImg(m_xBuilder->weld_widget("lockautosave")) , m_xAutoSaveEdit(m_xBuilder->weld_spin_button("autosave_spin")) , m_xMinuteFT(m_xBuilder->weld_label("autosave_mins")) , m_xUserAutoSaveCB(m_xBuilder->weld_check_button("userautosave")) +, m_xUserAutoSaveImg(m_xBuilder->weld_widget("lockuserautosave")) , m_xRelativeFsysCB(m_xBuilder->weld_check_button("relative_fsys")) +, m_xRelativeFsysImg(m_xBuilder->weld_widget("lockrelative_fsys")) , m_xRelativeInetCB(m_xBuilder->weld_check_button("relative_inet")) +, m_xRelativeInetImg(m_xBuilder->weld_widget("lockrelative_inet")) , m_xODFVersionLB(m_xBuilder->weld_combo_box("odfversion")) +, m_xODFVersionFT(m_xBuilder->weld_label("label5")) +, m_xODFVersionImg(m_xBuilder->weld_widget("lockodfversion")) , m_xWarnAlienFormatCB(m_xBuilder->weld_check_button("warnalienformat")) +, m_xWarnAlienFormatImg(m_xBuilder->weld_widget("lockwarnalienformat")) , m_xDocTypeLB(m_xBuilder->weld_combo_box("doctype")) +, m_xDocTypeImg(m_xBuilder->weld_widget("lockdoctype")) , m_xSaveAsFT(m_xBuilder->weld_label("saveas_label")) , m_xSaveAsLB(m_xBuilder->weld_combo_box("saveas")) +, m_xSaveAsImg(m_xBuilder->weld_widget("locksaveas")) , m_xODFWarningFI(m_xBuilder->weld_widget("odfwarning_image")) , m_xODFWarningFT(m_xBuilder->weld_label("odfwarning_label")) { @@ -418,12 +433,17 @@ void SvxSaveTabPage::Reset( const SfxItemSet* ) m_xLoadViewPosAnyUserCB->set_active(officecfg::Office::Common::Load::ViewPositionForAnyUser::get()); m_xLoadViewPosAnyUserCB->save_state(); m_xLoadViewPosAnyUserCB->set_sensitive(!officecfg::Office::Common::Load::ViewPositionForAnyUser::isReadOnly()); + m_xLoadViewPosAnyUserImg->set_visible(officecfg::Office::Common::Load::ViewPositionForAnyUser::isReadOnly()); + m_xLoadUserSettingsCB->set_active(officecfg::Office::Common::Load::UserDefinedSettings::get()); m_xLoadUserSettingsCB->save_state(); m_xLoadUserSettingsCB->set_sensitive(!officecfg::Office::Common::Load::UserDefinedSettings::isReadOnly()); + m_xLoadUserSettingsImg->set_visible(officecfg::Office::Common::Load::UserDefinedSettings::isReadOnly()); + m_xLoadDocPrinterCB->set_active( officecfg::Office::Common::Save::Document::LoadPrinter::get() ); m_xLoadDocPrinterCB->save_state(); m_xLoadDocPrinterCB->set_sensitive(!officecfg::Office::Common::Save::Document::LoadPrinter::isReadOnly()); + m_xLoadDocPrinterImg->set_visible(officecfg::Office::Common::Save::Document::LoadPrinter::isReadOnly()); if ( !pImpl->bInitialized ) { @@ -502,24 +522,31 @@ void SvxSaveTabPage::Reset( const SfxItemSet* ) m_xDocInfoCB->set_active(officecfg::Office::Common::Save::Document::EditProperty::get()); m_xDocInfoCB->set_sensitive(!officecfg::Office::Common::Save::Document::EditProperty::isReadOnly()); +
[Libreoffice-commits] core.git: cui/source cui/uiconfig
cui/source/options/optinet2.cxx | 39 - cui/source/options/optinet2.hxx |9 + cui/uiconfig/ui/optproxypage.ui | 298 +++- 3 files changed, 244 insertions(+), 102 deletions(-) New commits: commit 5946ffe7139189eff2c1e90ddb3edb146eb60e17 Author: Balazs Varga AuthorDate: Thu Oct 26 13:17:51 2023 +0200 Commit: Balazs Varga CommitDate: Fri Oct 27 08:52:21 2023 +0200 tdf#157854 - UI: Part 12 - Unify lockdown behavior of Options dialog for Internet Proxy Page. Change-Id: I2332d272905e12a235d7729c0565922ad98960f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158499 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 90801955edaa..979d920bc38f 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -127,21 +127,30 @@ IMPL_STATIC_LINK(SvxProxyTabPage, NoSpaceTextFilterHdl, OUString&, rTest, bool) // SvxProxyTabPage::SvxProxyTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) : SfxTabPage(pPage, pController, "cui/ui/optproxypage.ui", "OptProxyPage", ) +, m_xProxyModeFT(m_xBuilder->weld_label("label2")) , m_xProxyModeLB(m_xBuilder->weld_combo_box("proxymode")) +, m_xProxyModeImg(m_xBuilder->weld_widget("lockproxymode")) , m_xHttpProxyFT(m_xBuilder->weld_label("httpft")) , m_xHttpProxyED(m_xBuilder->weld_entry("http")) +, m_xHttpProxyImg(m_xBuilder->weld_widget("lockhttp")) , m_xHttpPortFT(m_xBuilder->weld_label("httpportft")) , m_xHttpPortED(m_xBuilder->weld_entry("httpport")) +, m_xHttpPortImg(m_xBuilder->weld_widget("lockhttpport")) , m_xHttpsProxyFT(m_xBuilder->weld_label("httpsft")) , m_xHttpsProxyED(m_xBuilder->weld_entry("https")) +, m_xHttpsProxyImg(m_xBuilder->weld_widget("lockhttps")) , m_xHttpsPortFT(m_xBuilder->weld_label("httpsportft")) , m_xHttpsPortED(m_xBuilder->weld_entry("httpsport")) +, m_xHttpsPortImg(m_xBuilder->weld_widget("lockhttpsport")) , m_xFtpProxyFT(m_xBuilder->weld_label("ftpft")) , m_xFtpProxyED(m_xBuilder->weld_entry("ftp")) +, m_xFtpProxyImg(m_xBuilder->weld_widget("lockftp")) , m_xFtpPortFT(m_xBuilder->weld_label("ftpportft")) , m_xFtpPortED(m_xBuilder->weld_entry("ftpport")) +, m_xFtpPortImg(m_xBuilder->weld_widget("lockftpport")) , m_xNoProxyForFT(m_xBuilder->weld_label("noproxyft")) , m_xNoProxyForED(m_xBuilder->weld_entry("noproxy")) +, m_xNoProxyForImg(m_xBuilder->weld_widget("locknoproxy")) , m_xNoProxyDescFT(m_xBuilder->weld_label("noproxydesc")) { m_xHttpProxyED->connect_insert_text(LINK(this, SvxProxyTabPage, NoSpaceTextFilterHdl)); @@ -437,34 +446,48 @@ bool SvxProxyTabPage::FillItemSet(SfxItemSet* ) void SvxProxyTabPage::EnableControls_Impl() { - m_xProxyModeLB->set_sensitive(!officecfg::Inet::Settings::ooInetNoProxy::isReadOnly()); +bool bEnable = !officecfg::Inet::Settings::ooInetNoProxy::isReadOnly(); +m_xProxyModeFT->set_sensitive(bEnable); +m_xProxyModeLB->set_sensitive(bEnable); +m_xProxyModeImg->set_visible(!bEnable); const bool bManualConfig = m_xProxyModeLB->get_active() == 2; -const bool bHTTPProxyNameEnabled = bManualConfig && !officecfg::Inet::Settings::ooInetHTTPProxyName::isReadOnly(); -const bool bHTTPProxyPortEnabled = bManualConfig && !officecfg::Inet::Settings::ooInetHTTPProxyPort::isReadOnly(); +bEnable = !officecfg::Inet::Settings::ooInetHTTPProxyName::isReadOnly(); +const bool bHTTPProxyNameEnabled = bManualConfig && bEnable; +const bool bHTTPProxyPortEnabled = bManualConfig && bEnable; m_xHttpProxyFT->set_sensitive(bHTTPProxyNameEnabled); m_xHttpProxyED->set_sensitive(bHTTPProxyNameEnabled); +m_xHttpProxyImg->set_visible(!bEnable); m_xHttpPortFT->set_sensitive(bHTTPProxyPortEnabled); m_xHttpPortED->set_sensitive(bHTTPProxyPortEnabled); +m_xHttpPortImg->set_visible(!bEnable); -const bool bHTTPSProxyNameEnabled = bManualConfig && !officecfg::Inet::Settings::ooInetHTTPSProxyName::isReadOnly(); -const bool bHTTPSProxyPortEnabled = bManualConfig && !officecfg::Inet::Settings::ooInetHTTPSProxyPort::isReadOnly(); +bEnable = !officecfg::Inet::Settings::ooInetHTTPSProxyName::isReadOnly(); +const bool bHTTPSProxyNameEnabled = bManualConfig && bEnable; +const bool bHTTPSProxyPortEnabled = bManualConfig && bEnable; m_xHttpsProxyFT->set_sensitive(bHTTPSProxyNameEnabled); m_xHttpsProxyED->set_sensitive(bHTTPSProxyNameEnabled); +m_xHttpsProxyImg->set_visible(!bEnable); m_xHttpsPortFT->set_sensitive(bHTTPSProxyPortEnabled); m_xHttpsPortED->set_sensitive(bHTTPSProxyPortEnabled); +m_xHttpsPortImg->set_visible(!bEnable); -const bool bFTPProxyNameEnabled = bManualConfig &&
[Libreoffice-commits] core.git: cui/source
cui/source/tabpages/chardlg.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 7ac066438f6d029fd0be2f0c72207805b0ca8153 Author: Justin Luth AuthorDate: Thu Oct 26 15:48:30 2023 -0400 Commit: Justin Luth CommitDate: Fri Oct 27 02:38:36 2023 +0200 tdf#156988 chardlg: default to AUTO escapement As of 24.2, the default value for a superscript or subscript is automatic placement since d384ccdb04ebeb8b094e6d9a2ddf4e5aea5327c8. Therefore, it makes sense for the character properties dialog to also default to automatic. Normally this happens - since normally there is some kind of context, and in that case m_xNormalPosBtn was set with AUTO (m_xHighLowRB). However, in the case of finding a formating, there is no context for the very first run. That is what this patch intended to fix, since in that case too we want m_xHighLowRB to be set to true. For any other similar situation where there is no context, assuming DFLT_ESC_AUTO_SUPER or DFLT_ESC_AUTO_SUB should be appropriate. Change-Id: I1ee78c72bbb1c3d23fa39da29322436632f12b14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158514 Tested-by: Jenkins Reviewed-by: Justin Luth diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 3075f3fc4258..d8ea76e9a9d4 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -2748,6 +2748,8 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet ) m_xHighPosBtn->set_active(false); m_xNormalPosBtn->set_active(false); m_xLowPosBtn->set_active(false); + +m_xHighLowRB->set_active(true); } // set BspFont
[Libreoffice-commits] core.git: cui/source cui/uiconfig
cui/source/options/optaccessibility.cxx | 38 +- cui/source/options/optaccessibility.hxx |7 + cui/uiconfig/ui/optaccessibilitypage.ui | 180 3 files changed, 174 insertions(+), 51 deletions(-) New commits: commit 916ea4b0aadc61c2fdb89ac18e3e8327406bcd37 Author: Balazs Varga AuthorDate: Wed Oct 25 16:03:14 2023 +0200 Commit: Balazs Varga CommitDate: Thu Oct 26 09:23:06 2023 +0200 tdf#157846 - UI: Part 9 - Unify lockdown behavior of Options dialog for Accessibility Page. Change-Id: I4705904200715c1e41849a47a3dd684ddfa219c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158425 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/cui/source/options/optaccessibility.cxx b/cui/source/options/optaccessibility.cxx index f81c893673ca..008a4a273502 100644 --- a/cui/source/options/optaccessibility.cxx +++ b/cui/source/options/optaccessibility.cxx @@ -27,11 +27,18 @@ SvxAccessibilityOptionsTabPage::SvxAccessibilityOptionsTabPage(weld::Container* : SfxTabPage(pPage, pController, "cui/ui/optaccessibilitypage.ui", "OptAccessibilityPage", ) , m_xAccessibilityTool(m_xBuilder->weld_check_button("acctool")) , m_xTextSelectionInReadonly(m_xBuilder->weld_check_button("textselinreadonly")) +, m_xTextSelectionInReadonlyImg(m_xBuilder->weld_widget("locktextselinreadonly")) , m_xAnimatedGraphics(m_xBuilder->weld_check_button("animatedgraphics")) +, m_xAnimatedGraphicsImg(m_xBuilder->weld_widget("lockanimatedgraphics")) , m_xAnimatedTexts(m_xBuilder->weld_check_button("animatedtext")) +, m_xAnimatedTextsImg(m_xBuilder->weld_widget("lockanimatedtext")) , m_xHighContrast(m_xBuilder->weld_combo_box("highcontrast")) +, m_xHighContrastImg(m_xBuilder->weld_widget("lockhighcontrast")) +, m_xHighContrastLabel(m_xBuilder->weld_label("label13")) , m_xAutomaticFontColor(m_xBuilder->weld_check_button("autofontcolor")) +, m_xAutomaticFontColorImg(m_xBuilder->weld_widget("lockautofontcolor")) , m_xPagePreviews(m_xBuilder->weld_check_button("systempagepreviewcolor")) +, m_xPagePreviewsImg(m_xBuilder->weld_widget("locksystempagepreviewcolor")) { #ifdef UNX // UNIX: read the gconf2 setting instead to use the checkbox @@ -103,28 +110,47 @@ bool SvxAccessibilityOptionsTabPage::FillItemSet( SfxItemSet* ) void SvxAccessibilityOptionsTabPage::Reset( const SfxItemSet* ) { m_xPagePreviews->set_active( officecfg::Office::Common::Accessibility::IsForPagePreviews::get() ); -if( officecfg::Office::Common::Accessibility::IsForPagePreviews::isReadOnly() ) +if (officecfg::Office::Common::Accessibility::IsForPagePreviews::isReadOnly()) +{ m_xPagePreviews->set_sensitive(false); +m_xPagePreviewsImg->set_visible(true); +} m_xAnimatedGraphics->set_active( officecfg::Office::Common::Accessibility::IsAllowAnimatedGraphics::get() ); -if( officecfg::Office::Common::Accessibility::IsAllowAnimatedGraphics::isReadOnly() ) +if (officecfg::Office::Common::Accessibility::IsAllowAnimatedGraphics::isReadOnly()) +{ m_xAnimatedGraphics->set_sensitive(false); +m_xAnimatedGraphicsImg->set_visible(true); +} m_xAnimatedTexts->set_active( officecfg::Office::Common::Accessibility::IsAllowAnimatedText::get() ); -if( officecfg::Office::Common::Accessibility::IsAllowAnimatedText::isReadOnly() ) +if (officecfg::Office::Common::Accessibility::IsAllowAnimatedText::isReadOnly()) +{ m_xAnimatedTexts->set_sensitive(false); +m_xAnimatedTextsImg->set_visible(true); +} m_xAutomaticFontColor->set_active( officecfg::Office::Common::Accessibility::IsAutomaticFontColor::get() ); -if( officecfg::Office::Common::Accessibility::IsAutomaticFontColor::isReadOnly() ) +if (officecfg::Office::Common::Accessibility::IsAutomaticFontColor::isReadOnly()) +{ m_xAutomaticFontColor->set_sensitive(false); +m_xAutomaticFontColorImg->set_visible(true); +} m_xTextSelectionInReadonly->set_active( officecfg::Office::Common::Accessibility::IsSelectionInReadonly::get() ); -if( officecfg::Office::Common::Accessibility::IsSelectionInReadonly::isReadOnly() ) +if (officecfg::Office::Common::Accessibility::IsSelectionInReadonly::isReadOnly()) +{ m_xTextSelectionInReadonly->set_sensitive(false); +m_xTextSelectionInReadonlyImg->set_visible(true); +} m_xHighContrast->set_active( officecfg::Office::Common::Accessibility::HighContrast::get() ); -if( officecfg::Office::Common::Accessibility::HighContrast::isReadOnly() ) +if (officecfg::Office::Common::Accessibility::HighContrast::isReadOnly()) +{ m_xHighContrast->set_sensitive(false); +m_xHighContrastLabel->set_sensitive(false); +m_xHighContrastImg->set_visible(true); +} AllSettings aAllSettings = Application::GetSettings(); const
[Libreoffice-commits] core.git: cui/source cui/uiconfig
cui/source/options/optinet2.cxx| 37 cui/source/options/optinet2.hxx|8 cui/uiconfig/ui/optsecuritypage.ui | 299 ++--- 3 files changed, 262 insertions(+), 82 deletions(-) New commits: commit 6a8cae6995d22666c0a6fd2b42c171ef27ae30ac Author: Balazs Varga AuthorDate: Tue Oct 24 18:30:31 2023 +0200 Commit: Balazs Varga CommitDate: Thu Oct 26 09:21:27 2023 +0200 tdf#157840 - UI: Part 6 - Unify lockdown behavior of Options dialog for Security Page. Change-Id: I9b5282326ea8edeb00d45d9d034a18041f89a281 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158393 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 29fe7d758d8d..90801955edaa 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -497,19 +497,27 @@ SvxSecurityTabPage::SvxSecurityTabPage(weld::Container* pPage, weld::DialogContr : SfxTabPage(pPage, pController, "cui/ui/optsecuritypage.ui", "OptSecurityPage", ) , m_xSecurityOptionsPB(m_xBuilder->weld_button("options")) , m_xSavePasswordsCB(m_xBuilder->weld_check_button("savepassword")) +, m_xSavePasswordsImg(m_xBuilder->weld_widget("locksavepassword")) , m_xShowConnectionsPB(m_xBuilder->weld_button("connections")) , m_xMasterPasswordCB(m_xBuilder->weld_check_button("usemasterpassword")) +, m_xMasterPasswordImg(m_xBuilder->weld_widget("lockusemasterpassword")) , m_xMasterPasswordFT(m_xBuilder->weld_label("masterpasswordtext")) , m_xMasterPasswordPB(m_xBuilder->weld_button("masterpassword")) , m_xMacroSecFrame(m_xBuilder->weld_container("macrosecurity")) , m_xMacroSecPB(m_xBuilder->weld_button("macro")) , m_xCertFrame(m_xBuilder->weld_container("certificatepath")) , m_xCertPathPB(m_xBuilder->weld_button("cert")) +, m_xCertPathImg(m_xBuilder->weld_widget("lockcertipath")) +, m_xCertPathLabel(m_xBuilder->weld_label("label7")) , m_xTSAURLsFrame(m_xBuilder->weld_container("tsaurls")) , m_xTSAURLsPB(m_xBuilder->weld_button("tsas")) +, m_xTSAURLsImg(m_xBuilder->weld_widget("locktsas")) +, m_xTSAURLsLabel(m_xBuilder->weld_label("label9")) , m_xNoPasswordSaveFT(m_xBuilder->weld_label("nopasswordsave")) , m_xCertMgrPathLB(m_xBuilder->weld_button("browse")) , m_xParameterEdit(m_xBuilder->weld_entry("parameterfield")) +, m_xCertMgrPathImg(m_xBuilder->weld_widget("lockcertimanager")) +, m_xCertMgrPathLabel(m_xBuilder->weld_label("label11")) { //fdo#65595, we need height-for-width support here, but for now we can //bodge it @@ -798,6 +806,16 @@ void SvxSecurityTabPage::InitControls() m_xMasterPasswordFT->set_sensitive(true); } } + +if (officecfg::Office::Common::Passwords::UseStorage::isReadOnly()) +{ +m_xSavePasswordsCB->set_sensitive(false); +m_xShowConnectionsPB->set_sensitive(false); +m_xSavePasswordsImg->set_visible(true); +m_xMasterPasswordCB->set_sensitive(false); +m_xMasterPasswordPB->set_sensitive(false); +m_xMasterPasswordImg->set_visible(true); +} } catch (const Exception&) { @@ -810,6 +828,25 @@ void SvxSecurityTabPage::InitControls() if (!sCurCertMgr.isEmpty()) m_xParameterEdit->set_text(sCurCertMgr); + +bool bEnable = !officecfg::Office::Common::Security::Scripting::CertMgrPath::isReadOnly(); +m_xCertMgrPathLB->set_sensitive(bEnable); +m_xParameterEdit->set_sensitive(bEnable); +m_xCertMgrPathLabel->set_sensitive(bEnable); +m_xCertMgrPathImg->set_visible(!bEnable); + +bEnable = !officecfg::Office::Common::Security::Scripting::TSAURLs::isReadOnly(); +m_xTSAURLsPB->set_sensitive(bEnable); +m_xTSAURLsLabel->set_sensitive(bEnable); +m_xTSAURLsImg->set_visible(!bEnable); + +#ifndef UNX +bEnable = !officecfg::Office::Common::Security::Scripting::CertDir::isReadOnly() || + !officecfg::Office::Common::Security::Scripting::ManualCertDir::isReadOnly(); +m_xCertPathPB->set_sensitive(bEnable); +m_xCertPathLabel->set_sensitive(bEnable); +m_xCertPathImg->set_visible(!bEnable); +#endif } catch (const uno::Exception&) { diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx index f99c30b0b12b..1ad30723f758 100644 --- a/cui/source/options/optinet2.hxx +++ b/cui/source/options/optinet2.hxx @@ -90,9 +90,11 @@ private: std::unique_ptr m_xSecurityOptionsPB; std::unique_ptr m_xSavePasswordsCB; +std::unique_ptr m_xSavePasswordsImg; std::unique_ptr m_xShowConnectionsPB; std::unique_ptr m_xMasterPasswordCB; +std::unique_ptr m_xMasterPasswordImg; std::unique_ptr m_xMasterPasswordFT; std::unique_ptr m_xMasterPasswordPB; @@ -101,14
[Libreoffice-commits] core.git: cui/source cui/uiconfig
cui/source/options/fontsubs.cxx | 24 +++ cui/source/options/fontsubs.hxx |6 cui/uiconfig/ui/optfontspage.ui | 284 3 files changed, 202 insertions(+), 112 deletions(-) New commits: commit 9e8c90d92a6658ecc732554cb220d14eaee4692b Author: Balazs Varga AuthorDate: Tue Oct 24 12:47:52 2023 +0200 Commit: Balazs Varga CommitDate: Thu Oct 26 09:20:49 2023 +0200 tdf#157839 - UI: Part 5 - Unify lockdown behavior of Options dialog for Font Page. Change-Id: Idd7bdf5d79269dcb5b6e3276b91f17221c3b02e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158384 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx index eaf00e2364dd..4d61a873e264 100644 --- a/cui/source/options/fontsubs.cxx +++ b/cui/source/options/fontsubs.cxx @@ -35,14 +35,20 @@ SvxFontSubstTabPage::SvxFontSubstTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) : SfxTabPage(pPage, pController, "cui/ui/optfontspage.ui", "OptFontsPage", ) , m_xUseTableCB(m_xBuilder->weld_check_button("usetable")) +, m_xUseTableImg(m_xBuilder->weld_widget("lockusetable")) , m_xFont1CB(m_xBuilder->weld_combo_box("font1")) , m_xFont2CB(m_xBuilder->weld_combo_box("font2")) , m_xApply(m_xBuilder->weld_button("apply")) , m_xDelete(m_xBuilder->weld_button("delete")) , m_xCheckLB(m_xBuilder->weld_tree_view("checklb")) , m_xFontNameLB(m_xBuilder->weld_combo_box("fontname")) +, m_xFontNameLabel(m_xBuilder->weld_label("label8")) +, m_xFontNameImg(m_xBuilder->weld_widget("lockfontname")) , m_xNonPropFontsOnlyCB(m_xBuilder->weld_check_button("nonpropfontonly")) +, m_xNonPropFontsOnlyImg(m_xBuilder->weld_widget("locknonpropfontonly")) , m_xFontHeightLB(m_xBuilder->weld_combo_box("fontheight")) +, m_xFontHeightLabel(m_xBuilder->weld_label("label9")) +, m_xFontHeightImg(m_xBuilder->weld_widget("lockfontheight")) { m_xFont1CB->make_sorted(); m_xFont1CB->set_size_request(1, -1); @@ -222,7 +228,10 @@ void SvxFontSubstTabPage::Reset( const SfxItemSet* ) m_xFont2CB->thaw(); m_xFont1CB->thaw(); +bool bEnable = !officecfg::Office::Common::Font::Substitution::Replacement::isReadOnly(); m_xUseTableCB->set_active(svtools::IsFontSubstitutionsEnabled()); +m_xUseTableCB->set_sensitive(bEnable); +m_xUseTableImg->set_visible(!bEnable); std::vector aFontSubs = svtools::GetFontSubstitutions(); std::unique_ptr xIter(m_xCheckLB->make_iterator()); @@ -259,6 +268,19 @@ void SvxFontSubstTabPage::Reset( const SfxItemSet* ) OUString::number( officecfg::Office::Common::Font::SourceViewFont::FontHeight:: get())); + +bEnable = !officecfg::Office::Common::Font::SourceViewFont::FontName::isReadOnly(); +m_xFontNameLB->set_sensitive(bEnable); +m_xFontNameLabel->set_sensitive(bEnable); +m_xFontNameImg->set_visible(!bEnable); + +m_xNonPropFontsOnlyCB->set_sensitive(bEnable); +m_xNonPropFontsOnlyImg->set_visible(!bEnable); + +m_xFontHeightLB->set_sensitive(bEnable); +m_xFontHeightLabel->set_sensitive(bEnable); +m_xFontHeightImg->set_visible(!bEnable); + m_xNonPropFontsOnlyCB->save_state(); m_xFontHeightLB->save_value(); } @@ -395,7 +417,7 @@ IMPL_LINK(SvxFontSubstTabPage, NonPropFontsHdl, weld::Toggleable&, rBox, void) void SvxFontSubstTabPage::CheckEnable() { -bool bEnableAll = m_xUseTableCB->get_active(); +bool bEnableAll = m_xUseTableCB->get_active() && !officecfg::Office::Common::Font::SourceViewFont::FontName::isReadOnly(); m_xCheckLB->set_sensitive(bEnableAll); m_xFont1CB->set_sensitive(bEnableAll); m_xFont2CB->set_sensitive(bEnableAll); diff --git a/cui/source/options/fontsubs.hxx b/cui/source/options/fontsubs.hxx index d86ed04f73cc..e91a9818e56c 100644 --- a/cui/source/options/fontsubs.hxx +++ b/cui/source/options/fontsubs.hxx @@ -28,14 +28,20 @@ class SvxFontSubstTabPage : public SfxTabPage OUStringm_sAutomatic; std::unique_ptr m_xUseTableCB; +std::unique_ptr m_xUseTableImg; std::unique_ptr m_xFont1CB; std::unique_ptr m_xFont2CB; std::unique_ptr m_xApply; std::unique_ptr m_xDelete; std::unique_ptr m_xCheckLB; std::unique_ptr m_xFontNameLB; +std::unique_ptr m_xFontNameLabel; +std::unique_ptr m_xFontNameImg; std::unique_ptr m_xNonPropFontsOnlyCB; +std::unique_ptr m_xNonPropFontsOnlyImg; std::unique_ptr m_xFontHeightLB; +std::unique_ptr m_xFontHeightLabel; +std::unique_ptr m_xFontHeightImg; DECL_LINK(SelectComboBoxHdl, weld::ComboBox&, void); DECL_LINK(ToggleHdl, weld::Toggleable&, void); diff --git a/cui/uiconfig/ui/optfontspage.ui b/cui/uiconfig/ui/optfontspage.ui index 30bb49d92d4e..878377a2af36 100644 --- a/cui/uiconfig/ui/optfontspage.ui +++
[Libreoffice-commits] core.git: cui/source cui/uiconfig
cui/source/options/optgdlg.cxx | 70 +++- cui/source/options/optgdlg.hxx | 19 +++ cui/uiconfig/ui/optviewpage.ui | 236 +++-- 3 files changed, 294 insertions(+), 31 deletions(-) New commits: commit bf7b0febbf3081a3693bf09bc4e779f7c6c30dc0 Author: Balazs Varga AuthorDate: Fri Oct 20 13:37:07 2023 +0200 Commit: Balazs Varga CommitDate: Tue Oct 24 08:38:27 2023 +0200 tdf#157837 - UI: Part 3 - Unify lockdown behavior of Options dialog for View Page. Change-Id: Iac27aa516e4e4a4c1469b0ff465477c44c3a5660 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158250 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index f0e2cf26e2e2..ee727e074e51 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -586,24 +586,43 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p , nNotebookbarSizeLB_InitialSelection(0) , nStyleLB_InitialSelection(0) , pCanvasSettings(new CanvasSettings) +, m_xIconSizeLabel(m_xBuilder->weld_label("label14")) , m_xIconSizeLB(m_xBuilder->weld_combo_box("iconsize")) +, m_xIconSizeImg(m_xBuilder->weld_widget("lockiconsize")) +, m_xSidebarIconSizeLabel(m_xBuilder->weld_label("label9")) , m_xSidebarIconSizeLB(m_xBuilder->weld_combo_box("sidebariconsize")) +, m_xSidebarIconSizeImg(m_xBuilder->weld_widget("locksidebariconsize")) +, m_xNotebookbarIconSizeLabel(m_xBuilder->weld_label("label8")) , m_xNotebookbarIconSizeLB(m_xBuilder->weld_combo_box("notebookbariconsize")) +, m_xNotebookbarIconSizeImg(m_xBuilder->weld_widget("locknotebookbariconsize")) , m_xDarkModeFrame(m_xBuilder->weld_widget("darkmode")) +, m_xAppearanceStyleLabel(m_xBuilder->weld_label("label7")) , m_xAppearanceStyleLB(m_xBuilder->weld_combo_box("appearance")) +, m_xAppearanceStyleImg(m_xBuilder->weld_widget("lockappearance")) +, m_xIconStyleLabel(m_xBuilder->weld_label("label6")) , m_xIconStyleLB(m_xBuilder->weld_combo_box("iconstyle")) +, m_xIconStyleImg(m_xBuilder->weld_widget("lockiconstyle")) , m_xFontAntiAliasing(m_xBuilder->weld_check_button("aafont")) +, m_xFontAntiAliasingImg(m_xBuilder->weld_widget("lockaafont")) , m_xAAPointLimitLabel(m_xBuilder->weld_label("aafrom")) +, m_xAAPointLimitLabelImg(m_xBuilder->weld_widget("lockaafrom")) , m_xAAPointLimit(m_xBuilder->weld_metric_spin_button("aanf", FieldUnit::PIXEL)) , m_xFontShowCB(m_xBuilder->weld_check_button("showfontpreview")) +, m_xFontShowImg(m_xBuilder->weld_widget("lockshowfontpreview")) , m_xUseHardwareAccell(m_xBuilder->weld_check_button("useaccel")) +, m_xUseHardwareAccellImg(m_xBuilder->weld_widget("lockuseaccel")) , m_xUseAntiAliase(m_xBuilder->weld_check_button("useaa")) +, m_xUseAntiAliaseImg(m_xBuilder->weld_widget("lockuseaa")) , m_xUseSkia(m_xBuilder->weld_check_button("useskia")) +, m_xUseSkiaImg(m_xBuilder->weld_widget("lockuseskia")) , m_xForceSkiaRaster(m_xBuilder->weld_check_button("forceskiaraster")) +, m_xForceSkiaRasterImg(m_xBuilder->weld_widget("lockforceskiaraster")) , m_xSkiaStatusEnabled(m_xBuilder->weld_label("skiaenabled")) , m_xSkiaStatusDisabled(m_xBuilder->weld_label("skiadisabled")) , m_xSkiaLog(m_xBuilder->weld_button("btnSkialog")) +, m_xMouseMiddleLabel(m_xBuilder->weld_label("label12")) , m_xMouseMiddleLB(m_xBuilder->weld_combo_box("mousemiddle")) +, m_xMouseMiddleImg(m_xBuilder->weld_widget("lockmousemiddle")) , m_xMoreIcons(m_xBuilder->weld_button("btnMoreIcons")) , m_xRunGPTests(m_xBuilder->weld_button("btn_rungptest")) , m_sAutoStr(m_xIconStyleLB->get_text(0)) @@ -667,7 +686,7 @@ IMPL_STATIC_LINK_NOARG(OfaViewTabPage, OnMoreIconsClick, weld::Button&, void) IMPL_LINK_NOARG( OfaViewTabPage, OnAntialiasingToggled, weld::Toggleable&, void ) { -bool bAAEnabled = m_xFontAntiAliasing->get_active(); +bool bAAEnabled = m_xFontAntiAliasing->get_active() && !officecfg::Office::Common::View::FontAntiAliasing::MinPixelHeight::isReadOnly(); m_xAAPointLimitLabel->set_sensitive(bAAEnabled); m_xAAPointLimit->set_sensitive(bAAEnabled); @@ -725,9 +744,10 @@ void OfaViewTabPage::UpdateSkiaStatus() m_xSkiaStatusEnabled->set_visible(bEnabled); m_xSkiaStatusDisabled->set_visible(!bEnabled); -// FIXME: should really add code to show a 'lock' icon here. m_xUseSkia->set_sensitive(!officecfg::Office::Common::VCL::UseSkia::isReadOnly()); + m_xUseSkiaImg->set_visible(officecfg::Office::Common::VCL::UseSkia::isReadOnly()); m_xForceSkiaRaster->set_sensitive(m_xUseSkia->get_active() && !officecfg::Office::Common::VCL::ForceSkiaRaster::isReadOnly()); + m_xForceSkiaRasterImg->set_visible(officecfg::Office::Common::VCL::ForceSkiaRaster::isReadOnly());
[Libreoffice-commits] core.git: cui/source cui/uiconfig
cui/source/options/optgdlg.cxx| 52 +-- cui/source/options/optgdlg.hxx|9 + cui/uiconfig/ui/optgeneralpage.ui | 172 -- 3 files changed, 199 insertions(+), 34 deletions(-) New commits: commit d8b96939806bbeacc91bb2c42d44bb6de21010d0 Author: Balazs Varga AuthorDate: Thu Oct 19 18:08:38 2023 +0200 Commit: Balazs Varga CommitDate: Tue Oct 24 08:37:42 2023 +0200 tdf#157702 - UI: Part 2 - Unify lockdown behavior of Options dialog for General Page. Change-Id: Ide7c387d1b9f8ebba7f7801cdd69b1e1a93f90e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158196 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index c8a569a9845e..f0e2cf26e2e2 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -160,35 +160,36 @@ bool lcl_HasSystemFilePicker() OfaMiscTabPage::OfaMiscTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet) : SfxTabPage(pPage, pController, "cui/ui/optgeneralpage.ui", "OptGeneralPage", ) , m_xExtHelpCB(m_xBuilder->weld_check_button("exthelp")) +, m_xExtHelpImg(m_xBuilder->weld_widget("lockexthelp")) , m_xPopUpNoHelpCB(m_xBuilder->weld_check_button("popupnohelp")) +, m_xPopUpNoHelpImg(m_xBuilder->weld_widget("lockpopupnohelp")) , m_xShowTipOfTheDay(m_xBuilder->weld_check_button("cbShowTipOfTheDay")) +, m_xShowTipOfTheDayImg(m_xBuilder->weld_widget("lockcbShowTipOfTheDay")) , m_xFileDlgFrame(m_xBuilder->weld_widget("filedlgframe")) , m_xFileDlgROImage(m_xBuilder->weld_widget("lockimage")) , m_xFileDlgCB(m_xBuilder->weld_check_button("filedlg")) , m_xDocStatusCB(m_xBuilder->weld_check_button("docstatus")) +, m_xDocStatusImg(m_xBuilder->weld_widget("lockdocstatus")) , m_xYearFrame(m_xBuilder->weld_widget("yearframe")) +, m_xYearLabel(m_xBuilder->weld_label("yearslabel")) , m_xYearValueField(m_xBuilder->weld_spin_button("year")) , m_xToYearFT(m_xBuilder->weld_label("toyear")) +, m_xYearFrameImg(m_xBuilder->weld_widget("lockyears")) #if HAVE_FEATURE_BREAKPAD , m_xPrivacyFrame(m_xBuilder->weld_widget("privacyframe")) , m_xCrashReport(m_xBuilder->weld_check_button("crashreport")) +, m_xCrashReportImg(m_xBuilder->weld_widget("lockcrashreport")) #endif #if defined(_WIN32) , m_xQuickStarterFrame(m_xBuilder->weld_widget("quickstarter")) , m_xQuickLaunchCB(m_xBuilder->weld_check_button("quicklaunch")) +, m_xQuickLaunchImg(m_xBuilder->weld_widget("lockquicklaunch")) , m_xFileAssocFrame(m_xBuilder->weld_widget("fileassoc")) , m_xFileAssocBtn(m_xBuilder->weld_button("assocfiles")) , m_xPerformFileExtCheck(m_xBuilder->weld_check_button("cbPerformFileExtCheck")) +, m_xPerformFileExtImg(m_xBuilder->weld_widget("lockcbPerformFileExtCheck")) #endif { -if (!lcl_HasSystemFilePicker()) -m_xFileDlgFrame->hide(); -else if (officecfg::Office::Common::Misc::UseSystemFileDialog::isReadOnly()) -{ -m_xFileDlgROImage->show(); -m_xFileDlgCB->set_sensitive(false); -} - #if HAVE_FEATURE_BREAKPAD m_xPrivacyFrame->show(); #endif @@ -221,7 +222,7 @@ std::unique_ptr OfaMiscTabPage::Create( weld::Container* pPage, weld OUString OfaMiscTabPage::GetAllStrings() { OUString sAllStrings; -OUString labels[] = { "label1", "label2", "label4", "label5", "label6", +OUString labels[] = { "label1", "label2", "label4", "label5", "yearslabel", "toyear", "label7", "label8", "label9" }; for (const auto& label : labels) @@ -313,19 +314,48 @@ bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet ) void OfaMiscTabPage::Reset( const SfxItemSet* rSet ) { +bool bEnable = !officecfg::Office::Common::Help::ExtendedTip::isReadOnly(); m_xExtHelpCB->set_active( officecfg::Office::Common::Help::Tip::get() && officecfg::Office::Common::Help::ExtendedTip::get() ); +m_xExtHelpCB->set_sensitive(bEnable); +m_xExtHelpImg->set_visible(!bEnable); m_xExtHelpCB->save_state(); + +bEnable = !officecfg::Office::Common::Help::BuiltInHelpNotInstalledPopUp::isReadOnly(); m_xPopUpNoHelpCB->set_active( officecfg::Office::Common::Help::BuiltInHelpNotInstalledPopUp::get() ); +m_xPopUpNoHelpCB->set_sensitive(bEnable); +m_xPopUpNoHelpImg->set_visible(!bEnable); m_xPopUpNoHelpCB->save_state(); + +bEnable = !officecfg::Office::Common::Misc::ShowTipOfTheDay::isReadOnly(); m_xShowTipOfTheDay->set_active( officecfg::Office::Common::Misc::ShowTipOfTheDay::get() ); +m_xShowTipOfTheDay->set_sensitive(bEnable); +m_xShowTipOfTheDayImg->set_visible(!bEnable); m_xShowTipOfTheDay->save_state(); -m_xFileDlgCB->set_active( !officecfg::Office::Common::Misc::UseSystemFileDialog::get() ); + +if (!lcl_HasSystemFilePicker()) +
[Libreoffice-commits] core.git: cui/source cui/uiconfig
cui/source/inc/cuioptgenrl.hxx |6 cui/source/options/optgenrl.cxx | 61 ++-- cui/uiconfig/ui/optuserpage.ui | 274 +++- 3 files changed, 293 insertions(+), 48 deletions(-) New commits: commit 89fb894825b894080049abc500315f8b985c32c2 Author: Balazs Varga AuthorDate: Wed Oct 18 18:41:38 2023 +0200 Commit: Balazs Varga CommitDate: Tue Oct 24 08:32:56 2023 +0200 tdf#157700 - UI: Part 1 - Unify lockdown behavior of Options dialog for page User Data. Change-Id: I912fe2786ad5e7fc110137dfbcff73ee25fb0fbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158126 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/cui/source/inc/cuioptgenrl.hxx b/cui/source/inc/cuioptgenrl.hxx index ac903a389df4..0ee8cacb6c50 100644 --- a/cui/source/inc/cuioptgenrl.hxx +++ b/cui/source/inc/cuioptgenrl.hxx @@ -32,10 +32,16 @@ class SvxGeneralTabPage : public SfxTabPage private: // the "Use data for document properties" checkbox std::unique_ptr m_xUseDataCB; +std::unique_ptr m_xUseDataImg; std::unique_ptr m_xCryptoFrame; std::unique_ptr m_xSigningKeyLB; +std::unique_ptr m_xSigningKeyFT; +std::unique_ptr m_xSigningKeyImg; std::unique_ptr m_xEncryptionKeyLB; +std::unique_ptr m_xEncryptionKeyFT; +std::unique_ptr m_xEncryptionKeyImg; std::unique_ptr m_xEncryptToSelfCB; +std::unique_ptr m_xEncryptToSelfImg; // rows struct Row; std::vector > vRows; diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx index f22eb6467f11..d2cf40244d85 100644 --- a/cui/source/options/optgenrl.cxx +++ b/cui/source/options/optgenrl.cxx @@ -79,6 +79,8 @@ namespace Lang struct { +// id of the lockimage +OUString pLockId; // id of the text OUString pTextId; // language flags (see Lang above): @@ -87,18 +89,18 @@ struct } const vRowInfo[] = { -{ "companyft", Lang::All }, -{ "nameft", Lang::All & ~Lang::Russian & ~Lang::Eastern }, -{ "rusnameft", Lang::Russian }, -{ "eastnameft", Lang::Eastern }, -{ "streetft",Lang::All & ~Lang::Russian }, -{ "russtreetft", Lang::Russian }, -{ "icityft", Lang::All & ~Lang::US }, -{ "cityft", Lang::US }, -{ "countryft", Lang::All }, -{ "titleft", Lang::All }, -{ "phoneft", Lang::All }, -{ "faxft", Lang::All }, +{ "lockcompanyft", "companyft", Lang::All }, +{ "locknameft", "nameft", Lang::All & ~Lang::Russian & ~Lang::Eastern }, +{ "lockrusnameft", "rusnameft", Lang::Russian }, +{ "lockeastnameft", "eastnameft", Lang::Eastern }, +{ "lockstreetft", "streetft",Lang::All & ~Lang::Russian }, +{ "lockrusstreetft","russtreetft", Lang::Russian }, +{ "lockicityft","icityft", Lang::All & ~Lang::US }, +{ "lockcityft", "cityft", Lang::US }, +{ "lockcountryft", "countryft", Lang::All }, +{ "locktitleft","titleft", Lang::All }, +{ "lockphoneft","phoneft", Lang::All }, +{ "lockfaxft", "faxft", Lang::All }, }; @@ -166,14 +168,17 @@ const vFieldInfo[] = struct SvxGeneralTabPage::Row { +// row lockdown icon +std::unique_ptr xLockImg; // row label std::unique_ptr xLabel; // first and last field in the row (last is exclusive) unsigned nFirstField, nLastField; public: -explicit Row (std::unique_ptr xLabel_) -: xLabel(std::move(xLabel_)) +explicit Row (std::unique_ptr xLockImg_, std::unique_ptr xLabel_) +: xLockImg(std::move(xLockImg_)) +, xLabel(std::move(xLabel_)) , nFirstField(0) , nLastField(0) { @@ -210,10 +215,16 @@ public: SvxGeneralTabPage::SvxGeneralTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreSet) : SfxTabPage(pPage, pController, "cui/ui/optuserpage.ui", "OptUserPage", ) , m_xUseDataCB(m_xBuilder->weld_check_button("usefordocprop")) +, m_xUseDataImg(m_xBuilder->weld_widget("lockusefordocprop")) , m_xCryptoFrame(m_xBuilder->weld_widget( "cryptography")) , m_xSigningKeyLB(m_xBuilder->weld_combo_box("signingkey")) +, m_xSigningKeyFT(m_xBuilder->weld_label("signingkeylabel")) +, m_xSigningKeyImg(m_xBuilder->weld_widget("locksigningkey")) , m_xEncryptionKeyLB(m_xBuilder->weld_combo_box("encryptionkey")) +, m_xEncryptionKeyFT(m_xBuilder->weld_label("encryptionkeylabel")) +, m_xEncryptionKeyImg(m_xBuilder->weld_widget("lockencryptionkey")) , m_xEncryptToSelfCB(m_xBuilder->weld_check_button("encrypttoself")) +, m_xEncryptToSelfImg(m_xBuilder->weld_widget("lockencrypttoself")) { InitControls(); #if HAVE_FEATURE_GPGME @@ -258,7 +269,7 @@ void SvxGeneralTabPage::InitControls () if (!(vRowInfo[iRow].nLangFlags & LangBit)) continue; // creating row -vRows.push_back(std::make_shared( +
[Libreoffice-commits] core.git: cui/source
cui/source/customize/acccfg.cxx|4 ++-- cui/source/customize/cfgutil.cxx |6 +++--- cui/source/customize/macropg.cxx |2 +- cui/source/dialogs/colorpicker.cxx |2 +- cui/source/dialogs/cuigaldlg.cxx |2 +- cui/source/dialogs/hlinettp.cxx|2 +- cui/source/dialogs/hlmarkwn.cxx|6 +++--- cui/source/dialogs/showcols.cxx|2 +- cui/source/options/optasian.cxx|4 ++-- cui/source/options/optgdlg.cxx | 14 +++--- cui/source/options/optinet2.cxx| 16 cui/source/options/optlanguagetool.cxx |2 +- cui/source/options/optlingu.cxx|8 cui/source/options/optpath.cxx |4 ++-- cui/source/options/treeopt.cxx |2 +- cui/source/tabpages/chardlg.cxx|2 +- 16 files changed, 39 insertions(+), 39 deletions(-) New commits: commit fa869ef61c790b6407ef6eae3eefc094d13c1361 Author: Stephan Bergmann AuthorDate: Thu Oct 19 10:30:09 2023 +0200 Commit: Stephan Bergmann CommitDate: Thu Oct 19 19:31:54 2023 +0200 Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: cui Change-Id: I4c06aabb88e15975ae6e1e6b783aa0a9237c1617 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158186 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 54b7eb73c81a..027ac72968e8 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -69,9 +69,9 @@ using namespace css; -constexpr OUStringLiteral FOLDERNAME_UICONFIG = u"Configurations2"; +constexpr OUString FOLDERNAME_UICONFIG = u"Configurations2"_ustr; -constexpr OUStringLiteral MEDIATYPE_PROPNAME = u"MediaType"; +constexpr OUString MEDIATYPE_PROPNAME = u"MediaType"_ustr; const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1, KEY_F2, diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index 3039486a2f30..3a2cdbc1b05e 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -79,9 +79,9 @@ const char CMDURL_STYLEPROT_ONLY[] = ".uno:StyleApply?"; const char CMDURL_SPART_ONLY[] = "Style:string="; const char CMDURL_FPART_ONLY[] = "FamilyName:string="; -constexpr OUStringLiteral STYLEPROP_UINAME = u"DisplayName"; -constexpr OUStringLiteral MACRO_SELECTOR_CONFIGNAME = u"MacroSelectorDialog"; -constexpr OUStringLiteral LAST_RUN_MACRO_INFO = u"LastRunMacro"; +constexpr OUString STYLEPROP_UINAME = u"DisplayName"_ustr; +constexpr OUString MACRO_SELECTOR_CONFIGNAME = u"MacroSelectorDialog"_ustr; +constexpr OUString LAST_RUN_MACRO_INFO = u"LastRunMacro"_ustr; OUString SfxStylesInfo_Impl::generateCommand( std::u16string_view sFamily, std::u16string_view sStyle) diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index 6a22ee2c3d99..b1a1094733ea 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -38,7 +38,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -constexpr OUStringLiteral aVndSunStarUNO = u"vnd.sun.star.UNO:"; +constexpr OUString aVndSunStarUNO = u"vnd.sun.star.UNO:"_ustr; SvxMacroTabPage_Impl::SvxMacroTabPage_Impl( const SfxItemSet& rAttrSet ) : bReadOnly(false) diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index 24dda1936a2a..87f50b534c26 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -1266,7 +1266,7 @@ com_sun_star_cui_ColorPicker_get_implementation( } -constexpr OUStringLiteral gsColorKey( u"Color" ); +constexpr OUString gsColorKey( u"Color"_ustr ); constexpr OUStringLiteral gsModeKey( u"Mode" ); ColorPicker::ColorPicker() diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index 530ef109c216..9a1a2e26a4ed 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -707,7 +707,7 @@ void TPGalleryThemeProperties::FillFilterList() #if HAVE_FEATURE_AVMEDIA // media filters -static constexpr OUStringLiteral aWildcard = u"*."; +static constexpr OUString aWildcard = u"*."_ustr; ::avmedia::FilterNameVector aFilters= ::avmedia::MediaWindow::getMediaFilters(); for(const std::pair & aFilter : aFilters) diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index a01673550851..8ffdb2053f5b 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -24,7 +24,7 @@ #include #include -constexpr OUStringLiteral sAnonymous = u"anonymous"; +constexpr OUString sAnonymous = u"anonymous"_ustr; /* |* diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx index 96b61a7e2806..7eb2ced02489 100644 ---