core.git: Branch 'libreoffice-24-2' - cui/source
cui/source/inc/treeopt.hxx |4 ++-- cui/source/options/treeopt.cxx | 22 +++--- 2 files changed, 5 insertions(+), 21 deletions(-) New commits: commit 0aef29521b824e61b81bb6be1079b8ddd77e39a9 Author: Bayram Çiçek AuthorDate: Thu May 2 22:40:22 2024 +0300 Commit: Thorsten Behrens CommitDate: Wed May 8 11:44:21 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 (cherry picked from commit dd3953f705cc19aad4b0fcec7fd2961246b659e3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167222 Reviewed-by: Thorsten Behrens diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx index 307c70f9edd5..1522ded3d7c4 100644 --- a/cui/source/inc/treeopt.hxx +++ b/cui/source/inc/treeopt.hxx @@ -229,8 +229,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 d8fe793e10b7..029c5f773f8f 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -790,7 +790,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 @@ -801,7 +801,7 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, Timer*, void) m_xSearchEdit->freeze(); xTreeLB->hide(); -initializeFirstNDialog(); +initializeAllDialogs(); m_xSearchEdit->thaw(); xTreeLB->show(); @@ -847,10 +847,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); @@ -877,12 +876,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); } } @@ -1187,15 +1180,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: Branch 'libreoffice-24-2' - 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 e74f2f3f259125434f7fb9f8d7c338123a0137ed Author: Miklos Vajna AuthorDate: Fri May 3 08:08:29 2024 +0200 Commit: Xisco Fauli CommitDate: Wed May 8 09:33:44 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 (cherry picked from commit 0f410680461d7ba5f70dd65b2a8263dec15ac357) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167083 Reviewed-by: Xisco Fauli diff --git a/cui/source/inc/swpossizetabpage.hxx b/cui/source/inc/swpossizetabpage.hxx index eb73196986bf..ede7fd4231ae 100644 --- a/cui/source/inc/swpossizetabpage.hxx +++ b/cui/source/inc/swpossizetabpage.hxx @@ -52,6 +52,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 060f7b44ce9f..8de586a74df5 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -37,6 +37,7 @@ #include #include #include +#include using namespace ::com::sun::star::text; @@ -431,14 +432,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) @@ -728,7 +731,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; } @@ -967,6 +971,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(); @@ -1651,7 +1666,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) @@ -1706,7 +1721,7 @@ void SvxSwPosSizeTabPage::FillRelLB(FrmMap const *pMap, sal_uInt16 nMapPos, sal_ if (aRelationMap[nRelPos].nLBRelation == static_cast(nBit)) { SvxSwFramePosString::StringId sStrId1 =
core.git: Branch 'libreoffice-24-2' - 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 cf370be03dfc6eb2cd4643548f2f25ad3bfc6612 Author: Julien Nabet AuthorDate: Sat Apr 27 10:52:29 2024 +0200 Commit: Xisco Fauli CommitDate: Mon Apr 29 18:57:24 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 (cherry picked from commit 83236587bfca52513515b0b7a7dbfa18eed11503) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166725 Reviewed-by: Noel Grandin Reviewed-by: Xisco Fauli diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 132b125f0293..7675f1f7f0ec 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -1774,14 +1774,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: Branch 'libreoffice-24-2' - cui/source
cui/source/options/optlanguagetool.cxx | 35 - 1 file changed, 22 insertions(+), 13 deletions(-) New commits: commit e611b94a9afc0a9b7d60dbaca364615c1a5b2813 Author: Leonid Ryzhov AuthorDate: Wed Mar 20 23:21:18 2024 +0300 Commit: Adolfo Jayme Barrientos CommitDate: Sat Apr 20 22:34:37 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 (cherry picked from commit 155a6af93a8ac90cab15968f5dd499ab77ad9f72) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166097 Reviewed-by: Adolfo Jayme Barrientos 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: Branch 'libreoffice-24-2' - cui/source
cui/source/dialogs/SpellDialog.cxx | 13 + cui/source/inc/SpellDialog.hxx |3 +++ 2 files changed, 16 insertions(+) New commits: commit 667e2c452998006db1ce009da9fec7f609018145 Author: Caolán McNamara AuthorDate: Fri Mar 29 16:22:10 2024 + Commit: Adolfo Jayme Barrientos CommitDate: Sat Mar 30 14:56:25 2024 +0100 Resolves: tdf#160159 update spellchecking area colors when style changes so for the case of using "automatic" for the document background the spelling checking textbox background area updates to match Change-Id: I8723afb946176596b0a5fa43aa3bb3c036dee12c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165476 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index dfdad984ec41..9dd877f80cf9 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -1152,6 +1152,13 @@ void SentenceEditWindow_Impl::SetDrawingArea(weld::DrawingArea* pDrawingArea) m_xEditEngine->SetStatusEventHdl(LINK(this, SentenceEditWindow_Impl, EditStatusHdl)); +SetDocumentColor(pDrawingArea); +} + +void SentenceEditWindow_Impl::SetDocumentColor(weld::DrawingArea* pDrawingArea) +{ +if (!pDrawingArea || !m_xEditView || !m_xEditEngine) +return; // tdf#142631 use document background color in this widget Color aBgColor = svtools::ColorConfig().GetColorValue(svtools::DOCCOLOR).nColor; OutputDevice& rDevice = pDrawingArea->get_ref_device(); @@ -1160,6 +1167,12 @@ void SentenceEditWindow_Impl::SetDrawingArea(weld::DrawingArea* pDrawingArea) m_xEditEngine->SetBackgroundColor(aBgColor); } +void SentenceEditWindow_Impl::StyleUpdated() +{ +SetDocumentColor(GetDrawingArea()); +WeldEditView::StyleUpdated(); +} + IMPL_LINK_NOARG(SentenceEditWindow_Impl, EditStatusHdl, EditStatus&, void) { SetScrollBarRange(); diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx index fdf5e81bcdf3..81d68e214314 100644 --- a/cui/source/inc/SpellDialog.hxx +++ b/cui/source/inc/SpellDialog.hxx @@ -71,6 +71,7 @@ private: protected: virtual boolKeyInput( const KeyEvent& rKEvt ) override; +virtual voidStyleUpdated() override; public: SentenceEditWindow_Impl(std::unique_ptr xScrolledWindow); @@ -120,6 +121,8 @@ public: voidMoveErrorEnd(tools::Long nOffset); voidResetIgnoreErrorsAt() { m_aIgnoreErrorsAt.clear(); } + +voidSetDocumentColor(weld::DrawingArea* pDrawingArea); }; // class SvxSpellDialog -
core.git: Branch 'libreoffice-24-2' - cui/source
cui/source/dialogs/cuicharmap.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit e4ef509f3fea0c99708c111d731365b3225575d2 Author: Oliver Specht AuthorDate: Mon Feb 5 14:26:48 2024 +0100 Commit: Thorsten Behrens CommitDate: Fri Feb 9 01:37:57 2024 +0100 tdf#159572 select font according to recent settings selection of a recently inserted special character applies the stored font to make sure the character is not inserted wit a font that doesn't contain the symbol Change-Id: Id61bfac3a2ff22dbdae8a5b83f000d3f0c3e992b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163004 Tested-by: Jenkins Tested-by: Gabor Kelemen Reviewed-by: Gabor Kelemen Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163128 Reviewed-by: Thorsten Behrens diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index 03d1e8c90b53..0d0b809b0e7f 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -523,6 +523,7 @@ IMPL_LINK(SvxCharacterMap, CharClickHdl, SvxCharView*, rView, void) { rView->GrabFocus(); +SetCharFont(rView->GetFont()); m_aShowChar.SetText( rView->GetText() ); m_aShowChar.SetFont(rView->GetFont()); m_aShowChar.Invalidate();
core.git: Branch 'libreoffice-24-2' - 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| 38 ++--- cui/source/options/securityoptions.cxx | 30 +- 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, 102 insertions(+), 39 deletions(-) New commits: commit 3bbcae765e58bb02ca422edbb27d69388fdba4eb Author: Balazs Varga AuthorDate: Mon Jan 22 13:19:26 2024 +0100 Commit: Thorsten Behrens CommitDate: Thu Feb 1 10:43:36 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) cherry-pick from commit: 2c16ea16b305dc546164e28cf6b212ebccc44ec4 Change-Id: Iac116677801bdb13a9680bcfdf532ec3d874ce0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162393 Tested-by: Jenkins Reviewed-by: Balazs Varga Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162491 Reviewed-by: Thorsten Behrens diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index ffb5fd301069..c53e3432a2a4 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -116,6 +116,7 @@ IMPL_ABSTDLG_CLASS(AbstractScreenshotAnnotationDlg) IMPL_ABSTDLG_CLASS(AbstractSignatureLineDialog) IMPL_ABSTDLG_CLASS(AbstractSignSignatureLineDialog) IMPL_ABSTDLG_CLASS(AbstractSvxCharacterMapDialog) +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 1da0ec35ec38..02ba9a1b0f9d 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_UNIQUE(AbstractSvxCharacterMapDialog,SfxAbstractDialog,SvxCha DECL_ABSTDLG_CLASS(AbstractScreenshotAnnotationDlg,ScreenshotAnnotationDlg) }; +// AbstractSecurityOptionsDialog_Impl +DECL_ABSTDLG_CLASS(AbstractSecurityOptionsDialog, svx::SecurityOptionsDialog) +virtual bool SetSecurityOptions() override; +}; + // AbstractSignatureLineDialog_Impl DECL_ABSTDLG_CLASS(AbstractSignatureLineDialog,SignatureLineDialog) }; @@ -592,6 +598,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 7884ccfbd30e..6839e3931822 100644 --- a/cui/source/options/securityoptions.hxx +++ b/cui/source/inc/securityoptions.hxx @@ -72,6 +72,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 083c3e40f784..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
core.git: Branch 'libreoffice-24-2' - cui/source
cui/source/dialogs/tipofthedaydlg.cxx | 28 ++-- cui/source/inc/tipofthedaydlg.hxx |2 +- 2 files changed, 11 insertions(+), 19 deletions(-) New commits: commit 6c24cdd5098c5021da53ee96b07bd90bada0f049 Author: Caolán McNamara AuthorDate: Tue Jan 30 11:40:01 2024 + Commit: Michael Stahl CommitDate: Wed Jan 31 10:59:13 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/+/162720 Tested-by: Jenkins Reviewed-by: Michael Stahl 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: Branch 'libreoffice-24-2' - cui/source
cui/source/options/optaboutconfig.cxx | 28 cui/source/options/optaboutconfig.hxx |5 +++-- 2 files changed, 19 insertions(+), 14 deletions(-) New commits: commit 395c8cfb770e7424fd99b884f568a32fcc7a728f Author: Samuel Mehrbrodt AuthorDate: Mon Jan 15 08:15:46 2024 +0100 Commit: Gabor Kelemen CommitDate: Tue Jan 16 15:42:11 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 (cherry picked from commit 76ce6466b814bb9ff119f4f83795a2aeefc28793) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162097 Tested-by: Gabor Kelemen Reviewed-by: Gabor Kelemen diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index 1b02642e6d00..f927363f8650 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) { @@ -187,9 +190,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) { @@ -197,8 +201,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())); @@ -689,8 +693,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); } } } @@ -940,10 +945,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); @@ -962,6 +965,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
core.git: Branch 'libreoffice-24-2' - cui/source
cui/source/factory/dlgfact.cxx |2 +- cui/source/factory/dlgfact.hxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit fcf940f5c480160cf837ff1a84a988605b882bf2 Author: Caolán McNamara AuthorDate: Thu Jan 4 16:05:52 2024 + Commit: Xisco Fauli CommitDate: Fri Jan 5 11:11:19 2024 +0100 Resolves: tdf#158965 Find Record: Similarities dialog doesn't appear and assert in DBG_UTIL mode regression since: commit 36343165c251e30c700360cc5c4266f576d4ac00 Date: Wed Jan 25 11:07:28 2023 + cui: Make SimilaritySearch dialog async and enable use for jsdialog Change-Id: Iee2071874836ccf8a1ab10fbc6d6b3c491fd04ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161631 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index fbdea49672ef..ffb5fd301069 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -125,7 +125,7 @@ IMPL_ABSTDLG_CLASS(AbstractSvxObjectNameDialog) IMPL_ABSTDLG_CLASS(AbstractSvxObjectTitleDescDialog) IMPL_ABSTDLG_CLASS(AbstractSvxPathSelectDialog) IMPL_ABSTDLG_CLASS(AbstractSvxPostItDialog) -IMPL_ABSTDLG_CLASS(AbstractSvxSearchSimilarityDialog) +IMPL_ABSTDLG_CLASS_ASYNC(AbstractSvxSearchSimilarityDialog,SvxSearchSimilarityDialog) IMPL_ABSTDLG_CLASS(AbstractSvxZoomDialog) IMPL_ABSTDLG_CLASS(AbstractTitleDialog) IMPL_ABSTDLG_CLASS(AbstractURLDlg) diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index b6120dcfb2ef..1da0ec35ec38 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -220,7 +220,7 @@ DECL_ABSTDLG_CLASS(AbstractURLDlg, URLDlg) }; // AbstractSvxSearchSimilarityDialog_Impl -DECL_ABSTDLG_CLASS(AbstractSvxSearchSimilarityDialog,SvxSearchSimilarityDialog) +DECL_ABSTDLG_CLASS_ASYNC(AbstractSvxSearchSimilarityDialog,SvxSearchSimilarityDialog) virtual sal_uInt16 GetOther() override; virtual sal_uInt16 GetShorter() override; virtual sal_uInt16 GetLonger() override;
core.git: Branch 'libreoffice-24-2' - cui/source
cui/source/dialogs/hyphen.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 7af18a423634595dd5ea13d35283e906e46a1662 Author: Noel Grandin AuthorDate: Sun Dec 24 19:14:03 2023 +0200 Commit: Noel Grandin CommitDate: Tue Dec 26 17:41:51 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 (cherry picked from commit a89a42e55f2b154c8b276fe08fcf02c4b9fc0945) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161310 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: Branch 'libreoffice-24-2' - 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 2d02bb6c792350b7bc07b029f835bd0223402079 Author: Noel Grandin AuthorDate: Wed Dec 20 11:21:27 2023 +0200 Commit: Xisco Fauli CommitDate: Fri Dec 22 13:14:26 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 (cherry picked from commit 78ccae0d42d168f845ddbd7cb694d80dfb04f84d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161161 Tested-by: Jenkins Reviewed-by: Xisco Fauli 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: Branch 'libreoffice-24-2' - 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 9800a7106223bd7759aa851574ef720d15a146cd Author: Stephan Bergmann AuthorDate: Tue Dec 19 10:47:57 2023 +0100 Commit: Stephan Bergmann CommitDate: Tue Dec 19 18:58: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 (cherry picked from commit 7efdb261bdb11e669e80d62834985d04cb90bde9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160947 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
core.git: Branch 'libreoffice-24-2' - cui/source
cui/source/options/optaboutconfig.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 89fe91ec83c8c5d690d753bc4011e2e3f9e3da89 Author: Samuel Mehrbrodt AuthorDate: Mon Dec 18 15:28:27 2023 +0100 Commit: Samuel Mehrbrodt CommitDate: Mon Dec 18 22:26:16 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 (cherry picked from commit 9e02641932992cad3f8d4e363414b2756f0f8e52) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160931 diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index 6e3bdd9b2747..1b02642e6d00 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -1073,7 +1073,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: Branch 'libreoffice-24-2' - 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 5397aa0a268c747c204517c6fc59fba9b45bf388 Author: Michael Weghorn AuthorDate: Fri Dec 15 14:31:12 2023 +0100 Commit: Michael Weghorn CommitDate: Fri Dec 15 17:36:47 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 (cherry picked from commit 42637c62c314aaed7587fb1ece2841f644bb7149) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160851 Reviewed-by: Michael Weghorn 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 +