framework/source/helper/persistentwindowstate.cxx | 5 +++++ framework/source/loadenv/loadenv.cxx | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-)
New commits: commit 574482123b0fcd7deed9345fd524e9fc1d8bfb5e Author: Tor Lillqvist <[email protected]> Date: Tue Feb 9 14:14:22 2016 +0200 tdf#97435: Avoid persistent window state crack when used from LibreOfficeKit Change-Id: Icab7dea3cf63f3932b7759acec339b498a8ac9c5 Reviewed-on: https://gerrit.libreoffice.org/22233 Reviewed-by: Tor Lillqvist <[email protected]> Tested-by: Tor Lillqvist <[email protected]> diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx index 12bf95d..3cdf500 100644 --- a/framework/source/helper/persistentwindowstate.cxx +++ b/framework/source/helper/persistentwindowstate.cxx @@ -24,6 +24,7 @@ #include <com/sun/star/lang/IllegalArgumentException.hpp> #include <com/sun/star/frame/ModuleManager.hpp> +#include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/configurationhelper.hxx> #include <vcl/window.hxx> @@ -77,6 +78,10 @@ void SAL_CALL PersistentWindowState::initialize(const css::uno::Sequence< css::u void SAL_CALL PersistentWindowState::frameAction(const css::frame::FrameActionEvent& aEvent) throw(css::uno::RuntimeException, std::exception) { + // We don't want to do this stuff when being used through LibreOfficeKit + if( comphelper::LibreOfficeKit::isActive() ) + return; + css::uno::Reference< css::uno::XComponentContext > xContext; css::uno::Reference< css::frame::XFrame > xFrame; bool bRestoreWindowState; diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 323926a..0ebf000 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -27,6 +27,7 @@ #include <protocols.h> #include <services.h> #include <comphelper/interaction.hxx> +#include <comphelper/lok.hxx> #include <framework/interaction.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/configuration.hxx> @@ -1724,7 +1725,11 @@ void LoadEnv::impl_applyPersistentWindowState(const css::uno::Reference< css::aw // and apply it on the window. // Do nothing, if no configuration entry exists! OUString sWindowState; - ::comphelper::ConfigurationHelper::readRelativeKey(xModuleCfg, sModule, OFFICEFACTORY_PROPNAME_ASCII_WINDOWATTRIBUTES) >>= sWindowState; + + // Don't look for persistent window attributes when used through LibreOfficeKit + if( !comphelper::LibreOfficeKit::isActive() ) + comphelper::ConfigurationHelper::readRelativeKey(xModuleCfg, sModule, OFFICEFACTORY_PROPNAME_ASCII_WINDOWATTRIBUTES) >>= sWindowState; + if (!sWindowState.isEmpty()) { // SOLAR SAFE -> _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
