summaryrefslogtreecommitdiffstats
path: root/framework/source/helper/persistentwindowstate.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'framework/source/helper/persistentwindowstate.cxx')
-rw-r--r--framework/source/helper/persistentwindowstate.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx
index 8121ad025a1c..995812dd4693 100644
--- a/framework/source/helper/persistentwindowstate.cxx
+++ b/framework/source/helper/persistentwindowstate.cxx
@@ -25,6 +25,7 @@
#include <comphelper/lok.hxx>
#include <comphelper/configurationhelper.hxx>
+#include <utility>
#include <vcl/window.hxx>
#include <vcl/syswin.hxx>
@@ -34,8 +35,8 @@
namespace framework{
-PersistentWindowState::PersistentWindowState(const css::uno::Reference< css::uno::XComponentContext >& xContext)
- : m_xContext (xContext )
+PersistentWindowState::PersistentWindowState(css::uno::Reference< css::uno::XComponentContext > xContext)
+ : m_xContext (std::move(xContext ))
, m_bWindowStateAlreadySet(false )
{
}
@@ -192,7 +193,7 @@ void PersistentWindowState::implst_setWindowStateOnConfig(
"org.openoffice.Setup/",
OUString::Concat("Office/Factories/*[\"") + sModuleName + "\"]",
"ooSetupFactoryWindowAttributes",
- css::uno::makeAny(sWindowState),
+ css::uno::Any(sWindowState),
::comphelper::EConfigurationModes::Standard);
}
catch(const css::uno::RuntimeException&)
@@ -214,10 +215,8 @@ OUString PersistentWindowState::implst_getWindowStateFromWindow(const css::uno::
// check for system window is necessary to guarantee correct pointer cast!
if ( pWindow && pWindow->IsSystemWindow() )
{
- WindowStateMask const nMask = WindowStateMask::All & ~WindowStateMask::Minimized;
- sWindowState = OStringToOUString(
- static_cast<SystemWindow*>(pWindow.get())->GetWindowState(nMask),
- RTL_TEXTENCODING_UTF8);
+ vcl::WindowDataMask const nMask = vcl::WindowDataMask::All & ~vcl::WindowDataMask::Minimized;
+ sWindowState = static_cast<SystemWindow*>(pWindow.get())->GetWindowState(nMask);
}
// <- SOLAR SAFE ------------------------
}
@@ -255,9 +254,9 @@ void PersistentWindowState::implst_setWindowStateOnWindow(const css::uno::Refere
if (pWorkWindow->IsMinimized())
return;
- OUString sOldWindowState = OStringToOUString( pSystemWindow->GetWindowState(), RTL_TEXTENCODING_ASCII_US );
+ OUString sOldWindowState = pSystemWindow->GetWindowState();
if ( sOldWindowState != sWindowState )
- pSystemWindow->SetWindowState(OUStringToOString(sWindowState,RTL_TEXTENCODING_UTF8));
+ pSystemWindow->SetWindowState(sWindowState);
// <- SOLAR SAFE ------------------------
}