diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2009-12-18 12:32:21 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2009-12-18 12:32:21 +0100 |
commit | 73005868eed0fe2c59bdc115f7f5af89411a4dbe (patch) | |
tree | 95b88d69e3ebd3262b35112861d5d5d84c2d100f /framework | |
parent | c2c963816ed37546f48515b294fbe1c9233a483c (diff) |
autorecovery: explicitly specify 'Hidden' when recovering documents, and remove the hack of not showing a frame when there is a 'SalvagedFile' item in the load args
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/loadenv/loadenv.cxx | 19 | ||||
-rw-r--r-- | framework/source/services/autorecovery.cxx | 3 |
2 files changed, 12 insertions, 10 deletions
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index ee39e583e5e7..911a0430763f 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -1629,7 +1629,6 @@ void LoadEnv::impl_reactForLoadingState() // We dont hide already visible frames here ... css::uno::Reference< css::awt::XWindow > xWindow = m_xTargetFrame->getContainerWindow(); sal_Bool bHidden = m_lMediaDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_HIDDEN(), sal_False); - sal_Bool bRecovered = (m_lMediaDescriptor.find(::comphelper::MediaDescriptor::PROP_SALVAGEDFILE()) != m_lMediaDescriptor.end()); sal_Bool bMinimized = m_lMediaDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_MINIMIZED(), sal_False); if (bMinimized) @@ -1641,7 +1640,7 @@ void LoadEnv::impl_reactForLoadingState() ((WorkWindow*)pWindow)->Minimize(); } else - if (!bHidden && !bRecovered) + if (!bHidden) { // show frame ... if it's not still visible ... // But do nothing if it's already visible! @@ -1750,18 +1749,18 @@ void LoadEnv::impl_makeFrameWindowVisible(const css::uno::Reference< css::awt::X Window* pWindow = VCLUnoHelper::GetWindow(xWindow); if ( pWindow ) { - bool bForceFrontAndFocus(false);
- css::uno::Any a = ::comphelper::ConfigurationHelper::readDirectKey(
- xSMGR,
- ::rtl::OUString::createFromAscii("org.openoffice.Office.Common/View"),
- ::rtl::OUString::createFromAscii("NewDocumentHandling"),
- ::rtl::OUString::createFromAscii("ForceFocusAndToFront"),
- ::comphelper::ConfigurationHelper::E_READONLY);
+ bool bForceFrontAndFocus(false); + css::uno::Any a = ::comphelper::ConfigurationHelper::readDirectKey( + xSMGR, + ::rtl::OUString::createFromAscii("org.openoffice.Office.Common/View"), + ::rtl::OUString::createFromAscii("NewDocumentHandling"), + ::rtl::OUString::createFromAscii("ForceFocusAndToFront"), + ::comphelper::ConfigurationHelper::E_READONLY); a >>= bForceFrontAndFocus; pWindow->Show(sal_True, (bForceFrontAndFocus || bForceToFront) ? SHOW_FOREGROUNDTASK : 0 ); } -
+ /* #i19976# We tried to prevent a toFront() call in case the user putted the loading document into the background .. diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index 9328ed9d9a5c..74894ddc4718 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -2448,6 +2448,9 @@ AutoRecovery::ETimerType AutoRecovery::implts_openDocs(const DispatchParams& aPa lDescriptor[::comphelper::MediaDescriptor::PROP_REFERRER()] <<= REFERRER_USER; lDescriptor[::comphelper::MediaDescriptor::PROP_SALVAGEDFILE()] <<= ::rtl::OUString(); + // recovered documents are loaded hidden, and shown all at once, later + lDescriptor[::comphelper::MediaDescriptor::PROP_HIDDEN()] <<= true; + if (aParams.m_xProgress.is()) lDescriptor[::comphelper::MediaDescriptor::PROP_STATUSINDICATOR()] <<= aParams.m_xProgress; |