desktop/source/lib/init.cxx | 4 ---- sc/source/ui/unoobj/docuno.cxx | 16 ---------------- sd/source/ui/unoidl/unomodel.cxx | 16 ---------------- sw/source/uibase/uno/unotxdoc.cxx | 15 --------------- 4 files changed, 51 deletions(-)
New commits: commit 21d2121b632f5a0dfcf54b5819367140d7977543 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Fri Apr 19 16:47:43 2024 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Mon Apr 22 09:40:19 2024 +0200 Revert early theme setting backports Revert "add getViewRenderState to LibreOfficeKitDocument" This reverts commit 46ab144819ea7ee93dcf5441c57977a973cff389. Change-Id: I46bad0f3a29edbc0f9acfdda2d014773a93a1baf Revert "support possibility to set Theme early during initializeForTiledRendering" This reverts commit a0a4309c718143a60ac8702fa6f15c1b7c6c2788. Revert "lok: add property descriptor "Theme"" This reverts commit 1d7ee6942f1f1ccdb8aeb253c1cf8ce0c5f63421. Change-Id: I998d2756bfcdf69fe25b56394328f0c06c93cafe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166306 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index ea3159ae80f6..50f8bb24a378 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -6367,10 +6367,6 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo { return getRulerState(pThis); } - else if (aCommand == ".uno:ViewRenderState") - { - return convertOString(pDoc->getViewRenderState()); - } else if (o3tl::starts_with(aCommand, aViewRowColumnHeaders)) { tools::Rectangle aRectangle; diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 8e67eab09413..1520b183beb9 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -21,8 +21,6 @@ #include <scitems.hxx> -#include <comphelper/dispatchcommand.hxx> -#include <comphelper/propertysequence.hxx> #include <comphelper/propertyvalue.hxx> #include <comphelper/sequence.hxx> #include <editeng/brushitem.hxx> @@ -1313,8 +1311,6 @@ void ScModelObj::initializeForTiledRendering(const css::uno::Sequence<css::beans aAppOptions.SetAutoComplete(true); SC_MOD()->SetAppOptions(aAppOptions); - OUString sThemeName; - for (const beans::PropertyValue& rValue : rArguments) { if (rValue.Name == ".uno:SpellOnline" && rValue.Value.has<bool>()) @@ -1323,8 +1319,6 @@ void ScModelObj::initializeForTiledRendering(const css::uno::Sequence<css::beans options.SetAutoSpell(rValue.Value.get<bool>()); GetDocument()->SetDocOptions(options); } - else if (rValue.Name == ".uno:ChangeTheme" && rValue.Value.has<OUString>()) - sThemeName = rValue.Value.get<OUString>(); } // show us the text exactly @@ -1341,16 +1335,6 @@ void ScModelObj::initializeForTiledRendering(const css::uno::Sequence<css::beans auto xChanges = comphelper::ConfigurationChanges::create(); officecfg::Office::Common::Save::Document::WarnAlienFormat::set(false, xChanges); xChanges->commit(); - - // if we know what theme the user wants, then we can dispatch that now early - if (!sThemeName.isEmpty()) - { - css::uno::Sequence<css::beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence( - { - { "NewTheme", uno::Any(sThemeName) } - })); - comphelper::dispatchCommand(".uno:ChangeTheme", aPropertyValues); - } } uno::Any SAL_CALL ScModelObj::queryInterface( const uno::Type& rType ) diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 5d535707eed3..c9b69575ff49 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -33,10 +33,8 @@ #include <com/sun/star/embed/Aspects.hpp> #include <officecfg/Office/Common.hxx> -#include <comphelper/dispatchcommand.hxx> #include <comphelper/indexedpropertyvalues.hxx> #include <comphelper/lok.hxx> -#include <comphelper/propertysequence.hxx> #include <comphelper/propertyvalue.hxx> #include <comphelper/sequence.hxx> #include <comphelper/servicehelper.hxx> @@ -2580,8 +2578,6 @@ void SdXImpressDocument::initializeForTiledRendering(const css::uno::Sequence<cs { SolarMutexGuard aGuard; - OUString sThemeName; - if (DrawViewShell* pViewShell = GetViewShell()) { DrawView* pDrawView = pViewShell->GetDrawView(); @@ -2593,8 +2589,6 @@ void SdXImpressDocument::initializeForTiledRendering(const css::uno::Sequence<cs pDrawView->SetAuthor(rValue.Value.get<OUString>()); else if (rValue.Name == ".uno:SpellOnline" && rValue.Value.has<bool>()) mpDoc->SetOnlineSpell(rValue.Value.get<bool>()); - else if (rValue.Name == ".uno:ChangeTheme" && rValue.Value.has<OUString>()) - sThemeName = rValue.Value.get<OUString>(); } // Disable comments if requested @@ -2636,16 +2630,6 @@ void SdXImpressDocument::initializeForTiledRendering(const css::uno::Sequence<cs if (!getenv("LO_TESTNAME")) SvtSlideSorterBarOptions().SetVisibleImpressView(true); - - // if we know what theme the user wants, then we can dispatch that now early - if (!sThemeName.isEmpty()) - { - css::uno::Sequence<css::beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence( - { - { "NewTheme", uno::Any(sThemeName) } - })); - comphelper::dispatchCommand(".uno:ChangeTheme", aPropertyValues); - } } void SdXImpressDocument::postKeyEvent(int nType, int nCharCode, int nKeyCode) diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 99c26e6f39dc..9ed0f762a782 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -19,8 +19,6 @@ #include <sal/config.h> #include <officecfg/Office/Common.hxx> -#include <comphelper/dispatchcommand.hxx> -#include <comphelper/propertysequence.hxx> #include <comphelper/string.hxx> #include <AnnotationWin.hxx> #include <o3tl/any.hxx> @@ -3643,7 +3641,6 @@ void SwXTextDocument::initializeForTiledRendering(const css::uno::Sequence<css:: // the case of clicking in the header area of a document with no headers aViewOption.SetUseHeaderFooterMenu(false); - OUString sThemeName; OUString sOrigAuthor = SW_MOD()->GetRedlineAuthor(SW_MOD()->GetRedlineAuthor()); OUString sAuthor; @@ -3665,8 +3662,6 @@ void SwXTextDocument::initializeForTiledRendering(const css::uno::Sequence<css:: } else if (rValue.Name == ".uno:SpellOnline" && rValue.Value.has<bool>()) aViewOption.SetOnlineSpell(rValue.Value.get<bool>()); - else if (rValue.Name == ".uno:ChangeTheme" && rValue.Value.has<OUString>()) - sThemeName = rValue.Value.get<OUString>(); } if (!sAuthor.isEmpty() && sAuthor != sOrigAuthor) @@ -3715,16 +3710,6 @@ void SwXTextDocument::initializeForTiledRendering(const css::uno::Sequence<css:: // don't change the whitespace at the beginning of paragraphs, this is // annoying when taking minutes without further formatting SwEditShell::GetAutoFormatFlags()->bAFormatByInpDelSpacesAtSttEnd = false; - - // if we know what theme the user wants, then we can dispatch that now early - if (!sThemeName.isEmpty()) - { - css::uno::Sequence<css::beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence( - { - { "NewTheme", uno::Any(sThemeName) } - })); - comphelper::dispatchCommand(".uno:ChangeTheme", aPropertyValues); - } } void SwXTextDocument::postKeyEvent(int nType, int nCharCode, int nKeyCode)