summaryrefslogtreecommitdiff
path: root/framework/source
diff options
context:
space:
mode:
Diffstat (limited to 'framework/source')
-rw-r--r--framework/source/inc/loadenv/loaddispatchlistener.hxx165
-rw-r--r--framework/source/inc/loadenv/loadenv.hxx11
-rw-r--r--framework/source/inc/loadenv/loadenvexception.hxx8
-rw-r--r--framework/source/interaction/preventduplicateinteraction.cxx73
-rw-r--r--framework/source/jobs/jobdata.cxx8
-rw-r--r--framework/source/jobs/jobresult.cxx4
-rw-r--r--framework/source/loadenv/loaddispatchlistener.cxx141
-rw-r--r--framework/source/loadenv/loadenv.cxx70
-rw-r--r--framework/source/loadenv/makefile.mk1
-rw-r--r--framework/source/services/autorecovery.cxx416
-rw-r--r--framework/source/services/backingwindow.cxx244
-rw-r--r--framework/source/services/backingwindow.hxx11
-rw-r--r--framework/source/services/frame.cxx16
-rw-r--r--framework/source/services/fwk_services.src56
14 files changed, 598 insertions, 626 deletions
diff --git a/framework/source/inc/loadenv/loaddispatchlistener.hxx b/framework/source/inc/loadenv/loaddispatchlistener.hxx
deleted file mode 100644
index 6d1bf8d165a2..000000000000
--- a/framework/source/inc/loadenv/loaddispatchlistener.hxx
+++ /dev/null
@@ -1,165 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef __FRAMEWORK_LOADENV_LOADDISPATCHLISTENER_HXX_
-#define __FRAMEWORK_LOADENV_LOADDISPATCHLISTENER_HXX_
-
-//_______________________________________________
-// includes of own project
-
-#include <threadhelp/threadhelpbase.hxx>
-#include <threadhelp/gate.hxx>
-#include <macros/xinterface.hxx>
-
-//_______________________________________________
-// includes of uno interface
-#include <com/sun/star/frame/XDispatchResultListener.hpp>
-
-/*
-#include <com/sun/star/frame/DispatchResultEvent.hpp>
-*/
-
-//_______________________________________________
-// includes of an other project
-
-#ifndef _OSL_CONDITN_HXX_
-#include <osl/condition.hxx>
-#endif
-#include <cppuhelper/weak.hxx>
-
-//_______________________________________________
-// namespace
-
-namespace framework{
-
-namespace css = ::com::sun::star;
-
-//_______________________________________________
-// definitions
-
-/** @short listen for finished dispatches, where document will be loaded.
-
- @descr This listener can be bound to an URL - so its well known
- for which load request this event was triggered.
- Thats needed - but not supported by the XDispatchResultListener
- notification.
- Further a condition can be used to synchronize any outside code
- against the occurence of this event.
-
- @author as96863
- */
-class LoadDispatchListener : public css::frame::XDispatchResultListener // => css.lang.XEventListener
- , private ThreadHelpBase
- , public ::cppu::OWeakObject
-{
- //___________________________________________
- // member
-
- private:
-
- /** @short the URL which is bound to this callback. */
- ::rtl::OUString m_sURL;
-
- /** @short the original event, which was notified to this object. */
- css::frame::DispatchResultEvent m_aResult;
-
- /** @short used to let the user of this instance wait, till an
- event occures.
- */
- ::osl::Condition m_aUserWait;
-
- //___________________________________________
- // native interface
-
- public:
-
- //_______________________________________
- /** @short initialize a new instance of this class. */
- LoadDispatchListener();
-
- //_______________________________________
- /** @short deinitialize an instance of this class. */
- virtual ~LoadDispatchListener();
-
- //_______________________________________
- /** @short bind this listenerr to a new URL.
-
- @param sURL
- the new URL bound to this instance.
- */
- void setURL(const ::rtl::OUString & sURL);
-
- //_______________________________________
- /** @short let the user of this instance wait.
-
- @descr If the call timed out - false is returned.
- Otherwise it returns true.
- Then the method getResult() has to be called,
- to get the origianl event.
-
- @param nWait_ms
- the time for wait in [ms].
- If its set to 0 this call is blocked till
- an event occures!
-
- @return TRUE if an event occured in time - FALSE otherwhise.
- */
- sal_Bool wait(sal_Int32 nWait_ms);
-
- //_______________________________________
- /** @short returns the result of this listener operation.
-
- @descr If wait() (which must be called before!) returns FALSE
- the return of getResult() is undefined!
-
- @return The result of the got listener notification.
- */
- css::frame::DispatchResultEvent getResult() const;
-
- //___________________________________________
- // uno interface
-
- public:
-
- //_______________________________________
- // css.uno.XInterface
- FWK_DECLARE_XINTERFACE
-
- //_______________________________________
- // css.frame.XDispatchResultListener
- virtual void SAL_CALL dispatchFinished(const css::frame::DispatchResultEvent& aEvent)
- throw(css::uno::RuntimeException);
-
- //_______________________________________
- // css.lang.XEventListener
- virtual void SAL_CALL disposing(const css::lang::EventObject& aEvent)
- throw(css::uno::RuntimeException);
-};
-
-} // namespace framework
-
-#endif // __FRAMEWORK_LOADENV_LOADDISPATCHLISTENER_HXX_
diff --git a/framework/source/inc/loadenv/loadenv.hxx b/framework/source/inc/loadenv/loadenv.hxx
index f78117d7021b..982f390f8469 100644
--- a/framework/source/inc/loadenv/loadenv.hxx
+++ b/framework/source/inc/loadenv/loadenv.hxx
@@ -417,6 +417,7 @@ class LoadEnv : private ThreadHelpBase
virtual void SAL_CALL disposing(const css::lang::EventObject& aEvent)
throw(css::uno::RuntimeException);
*/
+
//___________________________________________
// static interface
@@ -455,6 +456,14 @@ class LoadEnv : private ThreadHelpBase
const css::uno::Sequence< css::beans::PropertyValue >& lMediaDescriptor);
/** TODO document me ... */
+ static void initializeUIDefaults(
+ const css::uno::Reference< css::lang::XMultiServiceFactory >& i_rSMGR,
+ ::comphelper::MediaDescriptor& io_lMediaDescriptor,
+ const bool _bUIMode,
+ QuietInteraction** o_ppQuiteInteraction
+ );
+
+ /** TODO document me ... */
void impl_setResult(sal_Bool bResult);
/** TODO document me ... */
@@ -484,7 +493,7 @@ class LoadEnv : private ThreadHelpBase
/** @short tries to detect the type and the filter of the specified content.
- @descr This method actualize the available media descriptor of this instance,
+ @descr This method update the available media descriptor of this instance,
so it contains the right type, a corresponding filter, may a
valid frame loader etc. In case detection failed, this descriptor
is corrected first, before a suitable exception will be thrown.
diff --git a/framework/source/inc/loadenv/loadenvexception.hxx b/framework/source/inc/loadenv/loadenvexception.hxx
index 45282fb252bc..bb26e98f4695 100644
--- a/framework/source/inc/loadenv/loadenvexception.hxx
+++ b/framework/source/inc/loadenv/loadenvexception.hxx
@@ -172,11 +172,11 @@ class LoadEnvException
@param exUno
the original catched uno exception.
*/
- LoadEnvException( sal_Int32 nID ,
- const css::uno::Exception& exUno)
+ LoadEnvException( sal_Int32 nID ,
+ const css::uno::Any& exUno)
{
- m_nID = nID ;
- m_exOriginal <<= exUno;
+ m_nID = nID ;
+ m_exOriginal = exUno;
}
//_______________________________________
diff --git a/framework/source/interaction/preventduplicateinteraction.cxx b/framework/source/interaction/preventduplicateinteraction.cxx
index 5bfd05bbb4b8..6d0185a48080 100644
--- a/framework/source/interaction/preventduplicateinteraction.cxx
+++ b/framework/source/interaction/preventduplicateinteraction.cxx
@@ -109,6 +109,20 @@ void PreventDuplicateInteraction::useDefaultUUIHandler()
}
//_________________________________________________________________________________________________________________
+css::uno::Any SAL_CALL PreventDuplicateInteraction::queryInterface( const css::uno::Type& aType )
+ throw (css::uno::RuntimeException)
+{
+ if ( aType.equals( XInteractionHandler2::static_type() ) )
+ {
+ ::osl::ResettableMutexGuard aLock(m_aLock);
+ css::uno::Reference< css::task::XInteractionHandler2 > xHandler( m_xHandler, css::uno::UNO_QUERY );
+ if ( !xHandler.is() )
+ return css::uno::Any();
+ }
+ return ::cppu::WeakImplHelper1< css::task::XInteractionHandler2 >::queryInterface( aType );
+}
+
+//_________________________________________________________________________________________________________________
void SAL_CALL PreventDuplicateInteraction::handle(const css::uno::Reference< css::task::XInteractionRequest >& xRequest)
throw(css::uno::RuntimeException)
@@ -166,6 +180,65 @@ void SAL_CALL PreventDuplicateInteraction::handle(const css::uno::Reference< css
//_________________________________________________________________________________________________________________
+::sal_Bool SAL_CALL PreventDuplicateInteraction::handleInteractionRequest( const css::uno::Reference< css::task::XInteractionRequest >& xRequest )
+ throw (css::uno::RuntimeException)
+{
+ css::uno::Any aRequest = xRequest->getRequest();
+ sal_Bool bHandleIt = sal_True;
+
+ // SAFE ->
+ ::osl::ResettableMutexGuard aLock(m_aLock);
+
+ InteractionList::iterator pIt;
+ for ( pIt = m_lInteractionRules.begin();
+ pIt != m_lInteractionRules.end() ;
+ ++pIt )
+ {
+ InteractionInfo& rInfo = *pIt;
+
+ if (aRequest.isExtractableTo(rInfo.m_aInteraction))
+ {
+ ++rInfo.m_nCallCount;
+ rInfo.m_xRequest = xRequest;
+ bHandleIt = (rInfo.m_nCallCount <= rInfo.m_nMaxCount);
+ break;
+ }
+ }
+
+ css::uno::Reference< css::task::XInteractionHandler2 > xHandler( m_xHandler, css::uno::UNO_QUERY );
+ OSL_ENSURE( xHandler.is() || !m_xHandler.is(),
+ "PreventDuplicateInteraction::handleInteractionRequest: inconsistency!" );
+
+ aLock.clear();
+ // <- SAFE
+
+ if (
+ (bHandleIt ) &&
+ (xHandler.is())
+ )
+ {
+ return xHandler->handleInteractionRequest(xRequest);
+ }
+ else
+ {
+ const css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > lContinuations = xRequest->getContinuations();
+ sal_Int32 c = lContinuations.getLength();
+ sal_Int32 i = 0;
+ for (i=0; i<c; ++i)
+ {
+ css::uno::Reference< css::task::XInteractionAbort > xAbort(lContinuations[i], css::uno::UNO_QUERY);
+ if (xAbort.is())
+ {
+ xAbort->select();
+ break;
+ }
+ }
+ }
+ return false;
+}
+
+//_________________________________________________________________________________________________________________
+
void PreventDuplicateInteraction::addInteractionRule(const PreventDuplicateInteraction::InteractionInfo& aInteractionInfo)
{
// SAFE ->
diff --git a/framework/source/jobs/jobdata.cxx b/framework/source/jobs/jobdata.cxx
index 0d2da921b9f0..4acbce44f831 100644
--- a/framework/source/jobs/jobdata.cxx
+++ b/framework/source/jobs/jobdata.cxx
@@ -302,10 +302,10 @@ void JobData::setJobConfig( const css::uno::Sequence< css::beans::NamedValue >&
/* SAFE { */
WriteGuard aWriteLock(m_aLock);
- // actualize member
+ // update member
m_lArguments = lArguments;
- // actualize the configuration ... if possible!
+ // update the configuration ... if possible!
if (m_eMode==E_ALIAS)
{
// It doesn't matter if this config object was already opened before.
@@ -363,7 +363,7 @@ void JobData::setResult( const JobResult& aResult )
// overwrite the last saved result
m_aLastExecutionResult = aResult;
- // Don't use his informations to actualize
+ // Don't use his informations to update
// e.g. the arguments of this job. It must be done
// from outside! Here we save this information only.
@@ -533,7 +533,7 @@ void JobData::disableJob()
if (m_eMode!=E_EVENT)
return;
- // actualize the configuration
+ // update the configuration
// It doesn't matter if this config object was already opened before.
// It doesn nothing here then ... or it change the mode automaticly, if
// it was opened using another one before.
diff --git a/framework/source/jobs/jobresult.cxx b/framework/source/jobs/jobresult.cxx
index b5d9ee440fe8..375a3e5fc4d6 100644
--- a/framework/source/jobs/jobresult.cxx
+++ b/framework/source/jobs/jobresult.cxx
@@ -81,7 +81,7 @@ JobResult::JobResult()
/**
@short special ctor
@descr It initialize this new instance with a pure job execution result
- and analyze it. Doing so, we actualize our other members.
+ and analyze it. Doing so, we update our other members.
<p>
It's a list of named values, packed inside this any.
@@ -133,7 +133,7 @@ JobResult::JobResult( /*IN*/ const css::uno::Any& aResult )
// That can be usefull if something will fail here ...
m_eParts = E_NOPART;
- // analyze the result and actualize our other members
+ // analyze the result and update our other members
::comphelper::SequenceAsHashMap aProtocol(aResult);
if ( aProtocol.empty() )
return;
diff --git a/framework/source/loadenv/loaddispatchlistener.cxx b/framework/source/loadenv/loaddispatchlistener.cxx
deleted file mode 100644
index e0cce20c8758..000000000000
--- a/framework/source/loadenv/loaddispatchlistener.cxx
+++ /dev/null
@@ -1,141 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_framework.hxx"
-
-//_______________________________________________
-// includes of own project
-#include <loadenv/loaddispatchlistener.hxx>
-#include <threadhelp/writeguard.hxx>
-#include <threadhelp/readguard.hxx>
-
-//_______________________________________________
-// includes of uno interface
-#include <com/sun/star/frame/DispatchResultState.hpp>
-
-//_______________________________________________
-// includes of an other project
-#include <vcl/svapp.hxx>
-
-//_______________________________________________
-// namespace
-
-namespace framework{
-
-// may there exist already a define .-(
-#ifndef css
-namespace css = ::com::sun::star;
-#endif
-
-//_______________________________________________
-// declarations
-
-//-----------------------------------------------
-DEFINE_XINTERFACE_2(LoadDispatchListener ,
- OWeakObject ,
- DIRECT_INTERFACE (css::frame::XDispatchResultListener ),
- DERIVED_INTERFACE(css::lang::XEventListener, css::frame::XDispatchResultListener))
-
-//-----------------------------------------------
-LoadDispatchListener::LoadDispatchListener()
- : ThreadHelpBase(&Application::GetSolarMutex())
-{
- // reset the condition object - so our user can wait there.
- m_aUserWait.reset();
- // set defined state for our result value
- m_aResult.State = css::frame::DispatchResultState::DONTKNOW;
- m_aResult.Result.clear();
-}
-
-//-----------------------------------------------
-LoadDispatchListener::~LoadDispatchListener()
-{
-}
-
-//-----------------------------------------------
-void SAL_CALL LoadDispatchListener::dispatchFinished(const css::frame::DispatchResultEvent& aEvent)
- throw(css::uno::RuntimeException)
-{
- // SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
- m_aResult = aEvent;
- aWriteLock.unlock();
- // <- SAFE ----------------------------------
-
- // inform user about this arrived event
- m_aUserWait.set();
-}
-
-//-----------------------------------------------
-void SAL_CALL LoadDispatchListener::disposing(const css::lang::EventObject&)
- throw(css::uno::RuntimeException)
-{
- // SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
- m_aResult.State = css::frame::DispatchResultState::DONTKNOW;
- m_aResult.Result.clear();
- aWriteLock.unlock();
- // <- SAFE ----------------------------------
-
- // inform user about this arrived event
- m_aUserWait.set();
-}
-
-//-----------------------------------------------
-void LoadDispatchListener::setURL(const ::rtl::OUString & sURL)
-{
- // SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
- m_sURL = sURL;
- aWriteLock.unlock();
- // <- SAFE ----------------------------------
-}
-
-//-----------------------------------------------
-sal_Bool LoadDispatchListener::wait(sal_Int32 /*nWait_ms*/)
-{
- // Wait till an event occures
- m_aUserWait.wait(0);
- // reset the condition, so this method can be called again.
- // Of course a new action has to be started outside too!
- m_aUserWait.reset();
-
- // TODO implement real timeout :-)
- return sal_True;
-}
-
-//-----------------------------------------------
-css::frame::DispatchResultEvent LoadDispatchListener::getResult() const
-{
- // SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
- return m_aResult;
- // <- SAFE ----------------------------------
-}
-
-} // namespace framework
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index c1d76d6f8985..b9f1d2c8a09a 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -321,22 +321,41 @@ void LoadEnv::initializeLoading(const ::rtl::OUString&
/*TODO progress is bound to a frame ... How can we set it here? */
+ // UI mode
+ const bool bUIMode =
+ ( ( m_eFeature & E_WORK_WITH_UI ) == E_WORK_WITH_UI ) &&
+ ( m_lMediaDescriptor.getUnpackedValueOrDefault( ::comphelper::MediaDescriptor::PROP_HIDDEN() , sal_False ) == sal_False ) &&
+ ( m_lMediaDescriptor.getUnpackedValueOrDefault( ::comphelper::MediaDescriptor::PROP_PREVIEW(), sal_False ) == sal_False );
+
+ initializeUIDefaults(
+ m_xSMGR,
+ m_lMediaDescriptor,
+ bUIMode,
+ &m_pQuietInteraction
+ );
+
+ aWriteLock.unlock();
+ // <- SAFE ----------------------------------
+}
+
+/*-----------------------------------------------
+ 22.01.2010
+-----------------------------------------------*/
+void LoadEnv::initializeUIDefaults( const css::uno::Reference< css::lang::XMultiServiceFactory >& i_rSMGR,
+ ::comphelper::MediaDescriptor& io_lMediaDescriptor, const bool i_bUIMode,
+ QuietInteraction** o_ppQuietInteraction )
+{
css::uno::Reference< css::task::XInteractionHandler > xInteractionHandler;
sal_Int16 nMacroMode ;
sal_Int16 nUpdateMode ;
- // UI mode
- if (
- ((m_eFeature & E_WORK_WITH_UI) == E_WORK_WITH_UI) &&
- (m_lMediaDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_HIDDEN() , sal_False) == sal_False ) &&
- (m_lMediaDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_PREVIEW(), sal_False) == sal_False )
- )
+ if ( i_bUIMode )
{
nMacroMode = css::document::MacroExecMode::USE_CONFIG;
nUpdateMode = css::document::UpdateDocMode::ACCORDING_TO_CONFIG;
try
{
- xInteractionHandler = css::uno::Reference< css::task::XInteractionHandler >(m_xSMGR->createInstance(IMPLEMENTATIONNAME_UIINTERACTIONHANDLER), css::uno::UNO_QUERY);
+ xInteractionHandler = css::uno::Reference< css::task::XInteractionHandler >(i_rSMGR->createInstance(IMPLEMENTATIONNAME_UIINTERACTIONHANDLER), css::uno::UNO_QUERY);
}
catch(const css::uno::RuntimeException&) {throw;}
catch(const css::uno::Exception& ) { }
@@ -346,27 +365,28 @@ void LoadEnv::initializeLoading(const ::rtl::OUString&
{
nMacroMode = css::document::MacroExecMode::NEVER_EXECUTE;
nUpdateMode = css::document::UpdateDocMode::NO_UPDATE;
- m_pQuietInteraction = new QuietInteraction();
- m_pQuietInteraction->acquire();
- xInteractionHandler = css::uno::Reference< css::task::XInteractionHandler >(static_cast< css::task::XInteractionHandler* >(m_pQuietInteraction), css::uno::UNO_QUERY);
+ QuietInteraction* pQuietInteraction = new QuietInteraction();
+ xInteractionHandler = css::uno::Reference< css::task::XInteractionHandler >(static_cast< css::task::XInteractionHandler* >(pQuietInteraction), css::uno::UNO_QUERY);
+ if ( o_ppQuietInteraction != NULL )
+ {
+ *o_ppQuietInteraction = pQuietInteraction;
+ (*o_ppQuietInteraction)->acquire();
+ }
}
if (
- (xInteractionHandler.is() ) &&
- (m_lMediaDescriptor.find(::comphelper::MediaDescriptor::PROP_INTERACTIONHANDLER()) == m_lMediaDescriptor.end())
+ (xInteractionHandler.is() ) &&
+ (io_lMediaDescriptor.find(::comphelper::MediaDescriptor::PROP_INTERACTIONHANDLER()) == io_lMediaDescriptor.end())
)
{
- m_lMediaDescriptor[::comphelper::MediaDescriptor::PROP_INTERACTIONHANDLER()] <<= xInteractionHandler;
+ io_lMediaDescriptor[::comphelper::MediaDescriptor::PROP_INTERACTIONHANDLER()] <<= xInteractionHandler;
}
- if (m_lMediaDescriptor.find(::comphelper::MediaDescriptor::PROP_MACROEXECUTIONMODE()) == m_lMediaDescriptor.end())
- m_lMediaDescriptor[::comphelper::MediaDescriptor::PROP_MACROEXECUTIONMODE()] <<= nMacroMode;
-
- if (m_lMediaDescriptor.find(::comphelper::MediaDescriptor::PROP_UPDATEDOCMODE()) == m_lMediaDescriptor.end())
- m_lMediaDescriptor[::comphelper::MediaDescriptor::PROP_UPDATEDOCMODE()] <<= nUpdateMode;
+ if (io_lMediaDescriptor.find(::comphelper::MediaDescriptor::PROP_MACROEXECUTIONMODE()) == io_lMediaDescriptor.end())
+ io_lMediaDescriptor[::comphelper::MediaDescriptor::PROP_MACROEXECUTIONMODE()] <<= nMacroMode;
- aWriteLock.unlock();
- // <- SAFE ----------------------------------
+ if (io_lMediaDescriptor.find(::comphelper::MediaDescriptor::PROP_UPDATEDOCMODE()) == io_lMediaDescriptor.end())
+ io_lMediaDescriptor[::comphelper::MediaDescriptor::PROP_UPDATEDOCMODE()] <<= nUpdateMode;
}
/*-----------------------------------------------
@@ -818,7 +838,7 @@ void LoadEnv::impl_detectTypeAndFilter()
// Attention: Because our stl media descriptor is a copy of an uno sequence
// we cant use as an in/out parameter here. Copy it before and dont forget to
- // actualize structure afterwards again!
+ // update structure afterwards again!
css::uno::Sequence< css::beans::PropertyValue > lDescriptor = m_lMediaDescriptor.getAsConstPropertyValueList();
css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR;
@@ -1626,7 +1646,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)
@@ -1638,7 +1657,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!
@@ -1723,9 +1742,8 @@ void LoadEnv::impl_reactForLoadingState()
if (bThrow)
{
- css::uno::Exception aEx;
- if ( aRequest >>= aEx )
- throw LoadEnvException( LoadEnvException::ID_GENERAL_ERROR, aEx );
+ if ( aRequest.isExtractableTo( ::cppu::UnoType< css::uno::Exception >::get() ) )
+ throw LoadEnvException( LoadEnvException::ID_GENERAL_ERROR, aRequest );
}
// <- SAFE ----------------------------------
diff --git a/framework/source/loadenv/makefile.mk b/framework/source/loadenv/makefile.mk
index fead332b0678..c68ad8d304cb 100644
--- a/framework/source/loadenv/makefile.mk
+++ b/framework/source/loadenv/makefile.mk
@@ -38,7 +38,6 @@ ENABLE_EXCEPTIONS= TRUE
SLOFILES= \
$(SLO)$/loadenv.obj \
- $(SLO)$/loaddispatchlistener.obj \
$(SLO)$/targethelper.obj
# --- Targets ------------------------------------------------------
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 57429468461f..c4cc7149ab6d 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -28,10 +28,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_framework.hxx"
#include "services/autorecovery.hxx"
+#include <loadenv/loadenv.hxx>
//_______________________________________________
// own includes
-#include <loadenv/loaddispatchlistener.hxx>
#include <loadenv/targethelper.hxx>
#include <pattern/frame.hxx>
#include <threadhelp/readguard.hxx>
@@ -47,6 +47,8 @@
// interface includes
#include <com/sun/star/ucb/NameClash.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/frame/XLoadable.hpp>
+#include <com/sun/star/frame/XModel2.hpp>
#include <com/sun/star/frame/XModuleManager.hpp>
#include <com/sun/star/frame/XTitle.hpp>
#include <com/sun/star/frame/XFrame.hpp>
@@ -67,6 +69,7 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/container/XContainerQuery.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <com/sun/star/document/XDocumentRecovery.hpp>
#include <com/sun/star/util/XCloseable.hpp>
#include <com/sun/star/awt/XWindow2.hpp>
#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
@@ -75,10 +78,12 @@
// other includes
#include <comphelper/configurationhelper.hxx>
#include <comphelper/mediadescriptor.hxx>
+#include <comphelper/namedvaluecollection.hxx>
#include <vcl/svapp.hxx>
#include <unotools/pathoptions.hxx>
#include <tools/link.hxx>
#include <tools/string.hxx>
+#include <tools/diagnose_ex.h>
#include <unotools/tempfile.hxx>
#include <ucbhelper/content.hxx>
@@ -88,6 +93,7 @@
#include <unotools/bootstrap.hxx>
#include <unotools/configmgr.hxx>
#include <svl/documentlockfile.hxx>
+#include <cppuhelper/exc_hlp.hxx>
#include <tools/urlobj.hxx>
@@ -98,6 +104,23 @@
namespace css = ::com::sun::star;
#endif
+using ::com::sun::star::uno::Sequence;
+using ::com::sun::star::uno::UNO_QUERY;
+using ::com::sun::star::uno::UNO_QUERY_THROW;
+using ::com::sun::star::uno::UNO_SET_THROW;
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Any;
+using ::com::sun::star::beans::PropertyValue;
+using ::com::sun::star::container::XEnumeration;
+using ::com::sun::star::document::XDocumentRecovery;
+using ::com::sun::star::frame::XModel2;
+using ::com::sun::star::frame::XModel;
+using ::com::sun::star::frame::XFrame;
+using ::com::sun::star::frame::XController2;
+using ::com::sun::star::frame::XLoadable;
+using ::com::sun::star::frame::XStorable;
+using ::com::sun::star::lang::XComponent;
+
namespace fpf = ::framework::pattern::frame;
namespace framework
@@ -131,6 +154,7 @@ static const ::rtl::OUString CFG_ENTRY_PROP_DOCUMENTSTATE = ::rtl::OUString:
static const ::rtl::OUString CFG_ENTRY_PROP_FILTER = ::rtl::OUString::createFromAscii("Filter" );
static const ::rtl::OUString CFG_ENTRY_PROP_TITLE = ::rtl::OUString::createFromAscii("Title" );
static const ::rtl::OUString CFG_ENTRY_PROP_ID = ::rtl::OUString::createFromAscii("ID" );
+static const ::rtl::OUString CFG_ENTRY_PROP_VIEWNAMES = ::rtl::OUString::createFromAscii("ViewNames" );
static const ::rtl::OUString FILTER_PROP_TYPE = ::rtl::OUString::createFromAscii("Type" );
static const ::rtl::OUString FILTER_PROP_NAME = ::rtl::OUString::createFromAscii("Name" );
@@ -140,6 +164,7 @@ static const ::rtl::OUString DOCINFO_PROP_TEMPLATE = ::rtl::OUString::
// setup.xcu
static const ::rtl::OUString CFG_ENTRY_PROP_EMPTYDOCUMENTURL = ::rtl::OUString::createFromAscii("ooSetupFactoryEmptyDocumentURL");
static const ::rtl::OUString CFG_ENTRY_PROP_DEFAULTFILTER = ::rtl::OUString::createFromAscii("ooSetupFactoryDefaultFilter" );
+static const ::rtl::OUString CFG_ENTRY_PROP_FACTORYSERVICE = ::rtl::OUString::createFromAscii("ooSetupFactoryDocumentService" );
static const ::rtl::OUString EVENT_ON_NEW = ::rtl::OUString::createFromAscii("OnNew" );
static const ::rtl::OUString EVENT_ON_LOAD = ::rtl::OUString::createFromAscii("OnLoad" );
@@ -619,7 +644,7 @@ void SAL_CALL AutoRecovery::dispatch(const css::util::URL&
// dont enable AutoSave hardly !
// reload configuration to know the current state.
implts_readAutoSaveConfig();
- implts_actualizeTimer();
+ implts_updateTimer();
// can it happen that might be the listener was stopped ? .-)
// make sure it runs always ... even if AutoSave itself was disabled temporarly.
implts_startListening();
@@ -775,7 +800,7 @@ void AutoRecovery::implts_dispatch(const DispatchParams& aParams)
// <- SAFE ----------------------------------
// depends on bAllowAutoSaveReactivation implicitly by looking on m_eJob=E_AUTO_SAVE! see before ...
- implts_actualizeTimer();
+ implts_updateTimer();
if (bAllowAutoSaveReactivation)
implts_startListening();
@@ -791,7 +816,7 @@ void SAL_CALL AutoRecovery::addStatusListener(const css::uno::Reference< css::fr
// container is threadsafe by using a shared mutex!
m_lListener.addInterface(aURL.Complete, xListener);
- // REINTRANT !? -> --------------------------------
+ // REENTRANT !? -> --------------------------------
CacheLockGuard aCacheLock(this, m_aLock, m_nDocCacheLock, LOCK_FOR_CACHE_USE);
// THREAD SAFE -> ----------------------------------
@@ -845,7 +870,7 @@ void SAL_CALL AutoRecovery::notifyEvent(const css::document::EventObject& aEvent
else
if (aEvent.EventName.equals(EVENT_ON_MODIFYCHANGED))
{
- implts_actualizeModifiedState(xDocument);
+ implts_updateModifiedState(xDocument);
}
/* at least one document starts saving process =>
Our application code isnt ready for multiple save requests
@@ -954,7 +979,7 @@ void SAL_CALL AutoRecovery::changesOccurred(const css::util::ChangesEvent& aEven
// Note: This call stops the timer and starts it again.
// But it checks the different timer states internaly and
// may be supress the restart!
- implts_actualizeTimer();
+ implts_updateTimer();
}
//-----------------------------------------------
@@ -1096,7 +1121,7 @@ void AutoRecovery::implts_readConfig()
css::uno::Reference< css::container::XHierarchicalNameAccess > xCommonRegistry(implts_openConfig(), css::uno::UNO_QUERY);
- // REINTRANT -> --------------------------------
+ // REENTRANT -> --------------------------------
CacheLockGuard aCacheLock(this, m_aLock, m_nDocCacheLock, LOCK_FOR_CACHE_ADD_REMOVE);
// THREADSAFE -> -------------------------------
@@ -1108,7 +1133,7 @@ void AutoRecovery::implts_readConfig()
// <- THREADSAFE -------------------------------
aCacheLock.unlock();
- // <- REINTRANT --------------------------------
+ // <- REENTRANT --------------------------------
css::uno::Any aValue;
@@ -1123,7 +1148,7 @@ void AutoRecovery::implts_readConfig()
sal_Int32 c = lItems.getLength();
sal_Int32 i = 0;
- // REINTRANT -> --------------------------
+ // REENTRANT -> --------------------------
aCacheLock.lock(LOCK_FOR_CACHE_ADD_REMOVE);
for (i=0; i<c; ++i)
@@ -1143,7 +1168,8 @@ void AutoRecovery::implts_readConfig()
xItem->getPropertyValue(CFG_ENTRY_PROP_DOCUMENTSTATE) >>= aInfo.DocumentState;
xItem->getPropertyValue(CFG_ENTRY_PROP_MODULE ) >>= aInfo.AppModule ;
xItem->getPropertyValue(CFG_ENTRY_PROP_TITLE ) >>= aInfo.Title ;
- implts_specifyAppModuleAndFactoryURL(aInfo);
+ xItem->getPropertyValue(CFG_ENTRY_PROP_VIEWNAMES ) >>= aInfo.ViewNames ;
+ implts_specifyAppModuleAndFactory(aInfo);
implts_specifyDefaultFilterAndExtension(aInfo);
if (pItems[i].indexOf(RECOVERY_ITEM_BASE_IDENTIFIER)==0)
@@ -1173,10 +1199,10 @@ void AutoRecovery::implts_readConfig()
}
aCacheLock.unlock();
- // <- REINTRANT --------------------------
+ // <- REENTRANT --------------------------
}
- implts_actualizeTimer();
+ implts_updateTimer();
}
//-----------------------------------------------
@@ -1241,17 +1267,12 @@ void AutoRecovery::implts_specifyDefaultFilterAndExtension(AutoRecovery::TDocume
}
//-----------------------------------------------
-void AutoRecovery::implts_specifyAppModuleAndFactoryURL(AutoRecovery::TDocumentInfo& rInfo)
+void AutoRecovery::implts_specifyAppModuleAndFactory(AutoRecovery::TDocumentInfo& rInfo)
{
- if (
- (!rInfo.AppModule.getLength()) &&
- (!rInfo.Document.is() )
- )
- {
- throw css::uno::RuntimeException(
- ::rtl::OUString::createFromAscii("Cant find out the application module nor its factory URL, if no application module (or a suitable) document is known!"),
- static_cast< css::frame::XDispatch* >(this));
- }
+ ENSURE_OR_THROW2(
+ rInfo.AppModule.getLength() || rInfo.Document.is(),
+ "Cant find out the application module nor its factory URL, if no application module (or a suitable) document is known!",
+ *this );
// SAFE -> ----------------------------------
ReadGuard aReadLock(m_aLock);
@@ -1267,6 +1288,65 @@ void AutoRecovery::implts_specifyAppModuleAndFactoryURL(AutoRecovery::TDocumentI
::comphelper::SequenceAsHashMap lModuleDescription(xModuleConfig->getByName(rInfo.AppModule));
lModuleDescription[CFG_ENTRY_PROP_EMPTYDOCUMENTURL] >>= rInfo.FactoryURL;
+ lModuleDescription[CFG_ENTRY_PROP_FACTORYSERVICE] >>= rInfo.FactoryService;
+}
+
+//-----------------------------------------------
+void AutoRecovery::implts_collectActiveViewNames( AutoRecovery::TDocumentInfo& i_rInfo )
+{
+ ENSURE_OR_THROW2( i_rInfo.Document.is(), "need at document, at the very least", *this );
+
+ i_rInfo.ViewNames.realloc(0);
+
+ // obtain list of controllers of this document
+ ::std::vector< ::rtl::OUString > aViewNames;
+ const Reference< XModel2 > xModel( i_rInfo.Document, UNO_QUERY );
+ if ( xModel.is() )
+ {
+ const Reference< XEnumeration > xEnumControllers( xModel->getControllers() );
+ while ( xEnumControllers->hasMoreElements() )
+ {
+ const Reference< XController2 > xController( xEnumControllers->nextElement(), UNO_QUERY );
+ ::rtl::OUString sViewName;
+ if ( xController.is() )
+ sViewName = xController->getViewControllerName();
+ OSL_ENSURE( sViewName.getLength(), "AutoRecovery::implts_collectActiveViewNames: (no XController2 ->) no view name -> no recovery of this view!" );
+
+ if ( sViewName.getLength() )
+ aViewNames.push_back( sViewName );
+ }
+ }
+ else
+ {
+ const Reference< XController2 > xController( xModel->getCurrentController(), UNO_QUERY );
+ ::rtl::OUString sViewName;
+ if ( xController.is() )
+ sViewName = xController->getViewControllerName();
+ OSL_ENSURE( sViewName.getLength(), "AutoRecovery::implts_collectActiveViewNames: (no XController2 ->) no view name -> no recovery of this view!" );
+
+ if ( sViewName.getLength() )
+ aViewNames.push_back( sViewName );
+ }
+
+ i_rInfo.ViewNames.realloc( aViewNames.size() );
+ ::std::copy( aViewNames.begin(), aViewNames.end(), i_rInfo.ViewNames.getArray() );
+}
+
+//-----------------------------------------------
+void AutoRecovery::implts_persistAllActiveViewNames()
+{
+ // SAFE -> ----------------------------------
+ WriteGuard aWriteLock(m_aLock);
+
+ // This list will be filled with every document
+ AutoRecovery::TDocumentList::iterator pIt;
+ for ( pIt = m_lDocCache.begin();
+ pIt != m_lDocCache.end() ;
+ ++pIt )
+ {
+ implts_collectActiveViewNames( *pIt );
+ implts_flushConfigItem( *pIt );
+ }
}
//-----------------------------------------------
@@ -1319,6 +1399,7 @@ void AutoRecovery::implts_flushConfigItem(const AutoRecovery::TDocumentInfo& rIn
xSet->setPropertyValue(CFG_ENTRY_PROP_DOCUMENTSTATE, css::uno::makeAny(rInfo.DocumentState));
xSet->setPropertyValue(CFG_ENTRY_PROP_MODULE , css::uno::makeAny(rInfo.AppModule ));
xSet->setPropertyValue(CFG_ENTRY_PROP_TITLE , css::uno::makeAny(rInfo.Title ));
+ xSet->setPropertyValue(CFG_ENTRY_PROP_VIEWNAMES , css::uno::makeAny(rInfo.ViewNames ));
if (bNew)
xModify->insertByName(sID, css::uno::makeAny(xSet));
@@ -1478,7 +1559,7 @@ void AutoRecovery::implts_stopModifyListeningOnDoc(AutoRecovery::TDocumentInfo&
}
//-----------------------------------------------
-void AutoRecovery::implts_actualizeTimer()
+void AutoRecovery::implts_updateTimer()
{
implts_stopTimer();
@@ -1569,7 +1650,7 @@ IMPL_LINK(AutoRecovery, implts_timerExpired, void*, EMPTYARG)
m_eTimerType = AutoRecovery::E_POLL_TILL_AUTOSAVE_IS_ALLOWED;
aWriteLock.unlock();
// <- SAFE ------------------------------
- implts_actualizeTimer();
+ implts_updateTimer();
return 0;
}
@@ -1584,7 +1665,7 @@ IMPL_LINK(AutoRecovery, implts_timerExpired, void*, EMPTYARG)
sal_Bool bUserIdle = (Application::GetLastInputInterval()>MIN_TIME_FOR_USER_IDLE);
if (!bUserIdle)
{
- implts_actualizeTimer();
+ implts_updateTimer();
return 0;
}
}
@@ -1625,7 +1706,7 @@ IMPL_LINK(AutoRecovery, implts_timerExpired, void*, EMPTYARG)
aWriteLock.unlock();
// <- SAFE ----------------------------------
- implts_actualizeTimer();
+ implts_updateTimer();
}
catch(const css::uno::Exception&)
{
@@ -1662,7 +1743,7 @@ void AutoRecovery::implts_registerDocument(const css::uno::Reference< css::frame
// notification for already existing document !
// Can happen if events came in asynchronous on recovery time.
// Then our cache was filled from the configuration ... but now we get some
- // asynchronous events from the global event broadcaster. We must be shure that
+ // asynchronous events from the global event broadcaster. We must be sure that
// we dont add the same document more then once.
AutoRecovery::TDocumentList::iterator pIt = AutoRecovery::impl_searchDocument(m_lDocCache, xDocument);
if (pIt != m_lDocCache.end())
@@ -1670,7 +1751,7 @@ void AutoRecovery::implts_registerDocument(const css::uno::Reference< css::frame
// Normaly nothing must be done for this "late" notification.
// But may be the modified state was changed inbetween.
// Check it ...
- implts_actualizeModifiedState(xDocument);
+ implts_updateModifiedState(xDocument);
return;
}
@@ -1695,6 +1776,11 @@ void AutoRecovery::implts_registerDocument(const css::uno::Reference< css::frame
if (!xDesktop.is())
return;
+ // if the document doesn't support the XDocumentRecovery interface, we're not interested in it.
+ Reference< XDocumentRecovery > xDocRecovery( xDocument, UNO_QUERY );
+ if ( !xDocRecovery.is() )
+ return;
+
// get all needed informations of this document
// We need it to update our cache or to locate already existing elements there!
AutoRecovery::TDocumentInfo aNew;
@@ -1714,7 +1800,7 @@ void AutoRecovery::implts_registerDocument(const css::uno::Reference< css::frame
// <- SAFE ----------------------------------
// classify the used application module, which is used by this document.
- implts_specifyAppModuleAndFactoryURL(aNew);
+ implts_specifyAppModuleAndFactory(aNew);
// Hack! Check for "illegal office documents" ... as e.g. the Basic IDE
// Its not realy a full featured office document. It doesnt provide an URL, any filter, a factory URL etcpp.
@@ -1723,7 +1809,12 @@ void AutoRecovery::implts_registerDocument(const css::uno::Reference< css::frame
(!aNew.OrgURL.getLength() ) &&
(!aNew.FactoryURL.getLength())
)
- return;
+ {
+ OSL_ENSURE( false, "AutoRecovery::implts_registerDocument: this should not happen anymore!" );
+ // nowadays, the Basic IDE should already die on the "supports XDocumentRecovery" check. And no other known
+ // document type fits in here ...
+ return;
+ }
// By the way - get some information about the default format for saving!
// and save an information about the real used filter by this document.
@@ -1744,7 +1835,6 @@ void AutoRecovery::implts_registerDocument(const css::uno::Reference< css::frame
if (xModifyCheck->isModified())
{
aNew.DocumentState |= AutoRecovery::E_MODIFIED;
- aNew.DocumentState |= AutoRecovery::E_MODIFIED_SINCE_LAST_AUTOSAVE;
}
aCacheLock.lock(LOCK_FOR_CACHE_ADD_REMOVE);
@@ -1752,7 +1842,7 @@ void AutoRecovery::implts_registerDocument(const css::uno::Reference< css::frame
// SAFE -> ----------------------------------
WriteGuard aWriteLock(m_aLock);
- // create a new cache entry ... this document isnt well known.
+ // create a new cache entry ... this document isn't known.
++m_nIdPool;
aNew.ID = m_nIdPool;
LOG_ASSERT(m_nIdPool>=0, "AutoRecovery::implts_registerDocument()\nOverflow of ID pool detected.")
@@ -1831,7 +1921,6 @@ void AutoRecovery::implts_markDocumentModifiedAgainstLastBackup(const css::uno::
if (pIt != m_lDocCache.end())
{
AutoRecovery::TDocumentInfo& rInfo = *pIt;
- rInfo.DocumentState |= AutoRecovery::E_MODIFIED_SINCE_LAST_AUTOSAVE;
/* Now we know, that this document was modified again and must be saved next time.
But we dont need this information for every e.g. key input of the user.
@@ -1846,7 +1935,7 @@ void AutoRecovery::implts_markDocumentModifiedAgainstLastBackup(const css::uno::
}
//-----------------------------------------------
-void AutoRecovery::implts_actualizeModifiedState(const css::uno::Reference< css::frame::XModel >& xDocument)
+void AutoRecovery::implts_updateModifiedState(const css::uno::Reference< css::frame::XModel >& xDocument)
{
CacheLockGuard aCacheLock(this, m_aLock, m_nDocCacheLock, LOCK_FOR_CACHE_USE);
@@ -1866,12 +1955,10 @@ void AutoRecovery::implts_actualizeModifiedState(const css::uno::Reference< css:
if (bModified)
{
rInfo.DocumentState |= AutoRecovery::E_MODIFIED;
- rInfo.DocumentState |= AutoRecovery::E_MODIFIED_SINCE_LAST_AUTOSAVE;
}
else
{
rInfo.DocumentState &= ~AutoRecovery::E_MODIFIED;
- rInfo.DocumentState &= ~AutoRecovery::E_MODIFIED_SINCE_LAST_AUTOSAVE;
}
}
@@ -1964,6 +2051,33 @@ AutoRecovery::TDocumentList::iterator AutoRecovery::impl_searchDocument( Au
}
//-----------------------------------------------
+namespace
+{
+ void lcl_changeVisibility( const css::uno::Reference< css::frame::XFramesSupplier >& i_rFrames, sal_Bool i_bVisible )
+ {
+ css::uno::Reference< css::container::XIndexAccess > xFramesContainer( i_rFrames->getFrames(), css::uno::UNO_QUERY );
+ const sal_Int32 count = xFramesContainer->getCount();
+
+ Any aElement;
+ for ( sal_Int32 i=0; i < count; ++i )
+ {
+ aElement = xFramesContainer->getByIndex(i);
+ // check for sub frames
+ css::uno::Reference< css::frame::XFramesSupplier > xFramesSupp( aElement, css::uno::UNO_QUERY );
+ if ( xFramesSupp.is() )
+ lcl_changeVisibility( xFramesSupp, i_bVisible );
+
+ css::uno::Reference< css::frame::XFrame > xFrame( aElement, css::uno::UNO_QUERY );
+ if ( !xFrame.is() )
+ continue;
+
+ css::uno::Reference< css::awt::XWindow > xWindow( xFrame->getContainerWindow(), UNO_SET_THROW );
+ xWindow->setVisible( i_bVisible );
+ }
+ }
+}
+
+//-----------------------------------------------
void AutoRecovery::implts_changeAllDocVisibility(sal_Bool bVisible)
{
// SAFE -> ----------------------------------
@@ -1972,22 +2086,8 @@ void AutoRecovery::implts_changeAllDocVisibility(sal_Bool bVisible)
aReadLock.unlock();
// <- SAFE ----------------------------------
- css::uno::Reference< css::frame::XFramesSupplier > xDesktop (xSMGR->createInstance(SERVICENAME_DESKTOP), css::uno::UNO_QUERY);
- css::uno::Reference< css::container::XIndexAccess > xContainer(xDesktop->getFrames() , css::uno::UNO_QUERY);
- sal_Int32 c = xContainer->getCount();
- sal_Int32 i = 0;
-
- for (i=0; i<c; ++i)
- {
- css::uno::Reference< css::frame::XFrame > xTask;
-
- xContainer->getByIndex(i) >>= xTask;
- if (!xTask.is())
- continue;
-
- css::uno::Reference< css::awt::XWindow > xWindow = xTask->getContainerWindow();
- xWindow->setVisible(bVisible);
- }
+ css::uno::Reference< css::frame::XFramesSupplier > xDesktop(xSMGR->createInstance(SERVICENAME_DESKTOP), css::uno::UNO_QUERY);
+ lcl_changeVisibility( xDesktop, bVisible );
aReadLock.unlock();
// <- SAFE ----------------------------------
@@ -2180,15 +2280,15 @@ AutoRecovery::ETimerType AutoRecovery::implts_saveDocs( sal_Bool bAl
continue;
// already auto saved during this session :-)
- // This state must be reseted for all documents
+ // This state must be reset for all documents
// if timer is started with normnal AutoSaveTimerIntervall!
if ((aInfo.DocumentState & AutoRecovery::E_HANDLED) == AutoRecovery::E_HANDLED)
continue;
// Not modified documents are not saved.
// We safe an information about the URL only!
- sal_Bool bModified = ((aInfo.DocumentState & AutoRecovery::E_MODIFIED_SINCE_LAST_AUTOSAVE ) == AutoRecovery::E_MODIFIED_SINCE_LAST_AUTOSAVE);
- if (! bModified)
+ Reference< XDocumentRecovery > xDocRecover( aInfo.Document, UNO_QUERY_THROW );
+ if ( !xDocRecover->wasModifiedSinceLastSave() )
{
aInfo.DocumentState |= AutoRecovery::E_HANDLED;
continue;
@@ -2333,7 +2433,7 @@ void AutoRecovery::implts_saveOneDoc(const ::rtl::OUString&
// try to save this document as a new temp file everytimes.
// Mark AutoSave state as "INCOMPLETE" if it failed.
// Because the last temp file is to old and does not include all changes.
- css::uno::Reference< css::frame::XStorable > xStore(rInfo.Document, css::uno::UNO_QUERY_THROW);
+ Reference< XDocumentRecovery > xDocRecover(rInfo.Document, css::uno::UNO_QUERY_THROW);
// safe the state about "trying to save"
// ... we need it for recovery if e.g. a crash occures inside next line!
@@ -2346,7 +2446,7 @@ void AutoRecovery::implts_saveOneDoc(const ::rtl::OUString&
{
try
{
- xStore->storeToURL(rInfo.NewTempURL, lNewArgs.getAsConstPropertyValueList());
+ xDocRecover->storeToRecoveryFile( rInfo.NewTempURL, lNewArgs.getAsConstPropertyValueList() );
#ifdef TRIGGER_FULL_DISC_CHECK
throw css::uno::Exception();
@@ -2390,7 +2490,6 @@ void AutoRecovery::implts_saveOneDoc(const ::rtl::OUString&
rInfo.DocumentState &= ~AutoRecovery::E_TRY_SAVE;
rInfo.DocumentState |= AutoRecovery::E_HANDLED;
rInfo.DocumentState |= AutoRecovery::E_SUCCEDED;
- rInfo.DocumentState &= ~AutoRecovery::E_MODIFIED_SINCE_LAST_AUTOSAVE;
}
else
{
@@ -2466,6 +2565,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;
@@ -2531,6 +2633,8 @@ AutoRecovery::ETimerType AutoRecovery::implts_openDocs(const DispatchParams& aPa
else
continue; // TODO ERROR!
+ LoadEnv::initializeUIDefaults( m_xSMGR, lDescriptor, true, NULL );
+
// <- SAFE ------------------------------
aWriteLock.unlock();
@@ -2571,12 +2675,18 @@ AutoRecovery::ETimerType AutoRecovery::implts_openDocs(const DispatchParams& aPa
{
::comphelper::MediaDescriptor lPatchDescriptor(rInfo.Document->getArgs());
lPatchDescriptor[::comphelper::MediaDescriptor::PROP_FILTERNAME()] <<= rInfo.RealFilter;
- rInfo.Document->attachResource(sURL, lPatchDescriptor.getAsConstPropertyValueList());
+ rInfo.Document->attachResource(rInfo.Document->getURL(), lPatchDescriptor.getAsConstPropertyValueList());
+ // do *not* use sURL here. In case this points to the recovery file, it has already been passed
+ // to recoverFromFile. Also, passing it here is logically wrong, as attachResource is intended
+ // to take the logical file URL.
}
css::uno::Reference< css::util::XModifiable > xModify(rInfo.Document, css::uno::UNO_QUERY);
- sal_Bool bModified = ((rInfo.DocumentState & AutoRecovery::E_MODIFIED) == AutoRecovery::E_MODIFIED);
- xModify->setModified(bModified);
+ if ( xModify.is() )
+ {
+ sal_Bool bModified = ((rInfo.DocumentState & AutoRecovery::E_MODIFIED) == AutoRecovery::E_MODIFIED);
+ xModify->setModified(bModified);
+ }
rInfo.DocumentState &= ~AutoRecovery::E_TRY_LOAD_BACKUP;
rInfo.DocumentState &= ~AutoRecovery::E_TRY_LOAD_ORIGINAL;
@@ -2589,8 +2699,8 @@ AutoRecovery::ETimerType AutoRecovery::implts_openDocs(const DispatchParams& aPa
/* Normaly we listen as XModifyListener on a document to know if a document was changed
since our last AutoSave. And we deregister us in case we know this state.
- But directly after one documentw as recovered ... we must start listening.
- Otherwhise the first "modify" dont reach us. Because weself called setModified()
+ But directly after one document as recovered ... we must start listening.
+ Otherwhise the first "modify" doesnt reach us. Because we ourself called setModified()
on the document via API. And currently we dont listen for any events (not at the GlobalEventBroadcaster
nor at any document!).
*/
@@ -2618,60 +2728,113 @@ void AutoRecovery::implts_openOneDoc(const ::rtl::OUString& sURL
aReadLock.unlock();
// <- SAFE ----------------------------------
- css::uno::Reference< css::util::XURLTransformer > xParser(xSMGR->createInstance(SERVICENAME_URLTRANSFORMER), css::uno::UNO_QUERY_THROW);
- css::util::URL aURL;
- aURL.Complete = sURL;
- xParser->parseStrict(aURL);
-
- LoadDispatchListener* pLoadListener = new LoadDispatchListener();
- css::uno::Reference< css::frame::XDispatchResultListener > xLoadListener (static_cast< css::frame::XDispatchResultListener* >(pLoadListener), css::uno::UNO_QUERY_THROW);
-
- css::uno::Reference< css::frame::XFrame > xDesktop (xSMGR->createInstance(SERVICENAME_DESKTOP), css::uno::UNO_QUERY_THROW);
- css::uno::Reference< css::frame::XFrame > xNewTarget = xDesktop->findFrame(SPECIALTARGET_BLANK, 0);
- css::uno::Reference< css::frame::XDispatchProvider > xProvider (xNewTarget, css::uno::UNO_QUERY_THROW);
- css::uno::Reference< css::frame::XNotifyingDispatch > xDispatcher(
- xProvider->queryDispatch(aURL, SPECIALTARGET_SELF, 0),
- css::uno::UNO_QUERY_THROW);
-
- // load the document and listen for the state of this operation.
- pLoadListener->setURL(aURL.Complete);
-
- // make sure the right progress is used always.
- impl_establishProgress(rInfo, lDescriptor, xNewTarget);
+ css::uno::Reference< css::frame::XFrame > xDesktop( xSMGR->createInstance(SERVICENAME_DESKTOP), css::uno::UNO_QUERY_THROW );
+ ::std::vector< Reference< XComponent > > aCleanup;
try
{
- xDispatcher->dispatchWithNotification(
- aURL,
- lDescriptor.getAsConstPropertyValueList(),
- xLoadListener);
+ // create a new document of the desired type
+ Reference< XModel2 > xModel( xSMGR->createInstance( rInfo.FactoryService ), UNO_QUERY_THROW );
+ aCleanup.push_back( xModel.get() );
- pLoadListener->wait(0); // wait for ever!
+ // put the filter name into the descriptor - we're not going to involve any type detection, so
+ // the document might be lost without the FilterName property
+ lDescriptor[ ::comphelper::MediaDescriptor::PROP_FILTERNAME() ] <<= rInfo.RealFilter;
- css::frame::DispatchResultEvent aResult = pLoadListener->getResult();
- if (aResult.State != css::frame::DispatchResultState::SUCCESS)
+ if ( sURL == rInfo.FactoryURL )
{
- ::rtl::OUStringBuffer sMsg(256);
- sMsg.appendAscii("Recovery of \"");
- sMsg.append (aURL.Complete );
- sMsg.appendAscii("\" failed." );
- throw css::uno::Exception(sMsg.makeStringAndClear(), static_cast< css::frame::XDispatch* >(this));
+ // if the document was a new, unmodified document, then there's nothing to recover, just to init
+ ENSURE_OR_THROW( ( rInfo.DocumentState & AutoRecovery::E_MODIFIED ) == 0,
+ "unexpected document state" );
+ Reference< XLoadable > xModelLoad( xModel, UNO_QUERY_THROW );
+ xModelLoad->initNew();
+
+ // TODO: remove load-process specific arguments from the descriptor, e.g. the status indicator
+ xModel->attachResource( sURL, lDescriptor.getAsConstPropertyValueList() );
}
+ else
+ {
+ // let it recover itself
+ Reference< XDocumentRecovery > xDocRecover( xModel, UNO_QUERY_THROW );
+ xDocRecover->recoverFromFile(
+ sURL,
+ lDescriptor.getUnpackedValueOrDefault( ::comphelper::MediaDescriptor::PROP_SALVAGEDFILE(), ::rtl::OUString() ),
+ lDescriptor.getAsConstPropertyValueList()
+ );
+
+ // No attachResource needed here. By definition (of XDocumentRecovery), the implementation is responsible
+ // for completely initializing the model, which includes attachResource (or equivalent), if required.
+ }
+
+ // re-create all the views
+ ::std::vector< ::rtl::OUString > aViewsToRestore( rInfo.ViewNames.getLength() );
+ if ( rInfo.ViewNames.getLength() )
+ ::std::copy( rInfo.ViewNames.getConstArray(), rInfo.ViewNames.getConstArray() + rInfo.ViewNames.getLength(), aViewsToRestore.begin() );
+ // if we don't have views for whatever reason, then create a default-view, at least
+ if ( aViewsToRestore.empty() )
+ aViewsToRestore.push_back( ::rtl::OUString() );
+
+ for ( ::std::vector< ::rtl::OUString >::const_iterator viewName = aViewsToRestore.begin();
+ viewName != aViewsToRestore.end();
+ ++viewName
+ )
+ {
+ // create a frame
+ Reference< XFrame > xTargetFrame = xDesktop->findFrame( SPECIALTARGET_BLANK, 0 );
+ aCleanup.push_back( xTargetFrame.get() );
- rInfo.Document = fpf::extractFrameModel(xNewTarget);
+ // create a view to the document
+ Reference< XController2 > xController;
+ if ( viewName->getLength() )
+ {
+ xController.set( xModel->createViewController( *viewName, Sequence< PropertyValue >(), xTargetFrame ), UNO_SET_THROW );
+ }
+ else
+ {
+ xController.set( xModel->createDefaultViewController( xTargetFrame ), UNO_SET_THROW );
+ }
+
+ // introduce model/view/controller to each other
+ xController->attachModel( xModel.get() );
+ xModel->connectController( xController.get() );
+ xTargetFrame->setComponent( xController->getComponentWindow(), xController.get() );
+ xController->attachFrame( xTargetFrame );
+ xModel->setCurrentController( xController.get() );
+ }
+
+ rInfo.Document = xModel.get();
}
catch(const css::uno::RuntimeException&)
{ throw; }
catch(const css::uno::Exception&)
{
- css::uno::Reference< css::util::XCloseable > xClose(xNewTarget, css::uno::UNO_QUERY);
- xClose->close(sal_True);
- xNewTarget.clear();
- throw;
- }
+ Any aCaughtException( ::cppu::getCaughtException() );
+
+ // clean up
+ for ( ::std::vector< Reference< XComponent > >::const_iterator component = aCleanup.begin();
+ component != aCleanup.end();
+ ++component
+ )
+ {
+ css::uno::Reference< css::util::XCloseable > xClose( *component, css::uno::UNO_QUERY );
+ if ( xClose.is() )
+ xClose->close( sal_True );
+ else
+ (*component)->dispose();
+ }
+
+ // re-throw
+ ::rtl::OUStringBuffer sMsg(256);
+ sMsg.appendAscii("Recovery of \"");
+ sMsg.append (sURL );
+ sMsg.appendAscii("\" failed." );
- // of course we must forget all references to this temp(!) progress
- impl_forgetProgress(rInfo, lDescriptor, xNewTarget);
+ throw css::lang::WrappedTargetException(
+ sMsg.makeStringAndClear(),
+ static_cast< css::frame::XDispatch* >(this),
+ aCaughtException
+ );
+ }
}
//-----------------------------------------------
@@ -2783,7 +2946,7 @@ void AutoRecovery::implts_informListener( sal_Int32 eJ
if ((eJob & AutoRecovery::E_AUTO_SAVE) == AutoRecovery::E_AUTO_SAVE)
sFeature.append(CMD_DO_AUTO_SAVE);
#ifdef ENABLE_WARNINGS
- else
+ else if ( eJob != AutoRecovery::E_NO_JOB )
LOG_WARNING("AutoRecovery::implst_getJobDescription()", "Invalid job identifier detected.")
#endif
@@ -2842,35 +3005,18 @@ css::frame::FeatureStateEvent AutoRecovery::implst_createFeatureStateEvent(
if (sEventType.equals(OPERATION_UPDATE) && pInfo)
{
// pack rInfo for transport via UNO
- css::uno::Sequence< css::beans::NamedValue > lInfo(8);
- lInfo[0].Name = CFG_ENTRY_PROP_ID;
- lInfo[0].Value <<= pInfo->ID;
-
- lInfo[1].Name = CFG_ENTRY_PROP_ORIGINALURL;
- lInfo[1].Value <<= pInfo->OrgURL;
-
- lInfo[2].Name = CFG_ENTRY_PROP_FACTORYURL;
- lInfo[2].Value <<= pInfo->FactoryURL;
-
- lInfo[3].Name = CFG_ENTRY_PROP_TEMPLATEURL;
- lInfo[3].Value <<= pInfo->TemplateURL;
-
- lInfo[4].Name = CFG_ENTRY_PROP_TEMPURL;
- if (pInfo->OldTempURL.getLength())
- lInfo[4].Value <<= pInfo->OldTempURL;
- else
- lInfo[4].Value <<= pInfo->NewTempURL;
-
- lInfo[5].Name = CFG_ENTRY_PROP_MODULE;
- lInfo[5].Value <<= pInfo->AppModule;
-
- lInfo[6].Name = CFG_ENTRY_PROP_TITLE;
- lInfo[6].Value <<= pInfo->Title;
+ ::comphelper::NamedValueCollection aInfo;
+ aInfo.put( CFG_ENTRY_PROP_ID, pInfo->ID );
+ aInfo.put( CFG_ENTRY_PROP_ORIGINALURL, pInfo->OrgURL );
+ aInfo.put( CFG_ENTRY_PROP_FACTORYURL, pInfo->FactoryURL );
+ aInfo.put( CFG_ENTRY_PROP_TEMPLATEURL, pInfo->TemplateURL );
+ aInfo.put( CFG_ENTRY_PROP_TEMPURL, pInfo->OldTempURL.getLength() ? pInfo->OldTempURL : pInfo->NewTempURL );
+ aInfo.put( CFG_ENTRY_PROP_MODULE, pInfo->AppModule );
+ aInfo.put( CFG_ENTRY_PROP_TITLE, pInfo->Title );
+ aInfo.put( CFG_ENTRY_PROP_VIEWNAMES, pInfo->ViewNames );
+ aInfo.put( CFG_ENTRY_PROP_DOCUMENTSTATE, pInfo->DocumentState );
- lInfo[7].Name = CFG_ENTRY_PROP_DOCUMENTSTATE;
- lInfo[7].Value <<= pInfo->DocumentState;
-
- aEvent.State <<= lInfo;
+ aEvent.State <<= aInfo.getPropertyValues();
}
return aEvent;
@@ -2928,6 +3074,9 @@ void AutoRecovery::implts_doEmergencySave(const DispatchParams& aParams)
css::uno::makeAny(sal_True),
::comphelper::ConfigurationHelper::E_STANDARD);
+ // for all docs, store their current view/names in the configurtion
+ implts_persistAllActiveViewNames();
+
// The called method for saving documents runs
// during normal AutoSave more then once. Because
// it postpone active documents and save it later.
@@ -2995,6 +3144,9 @@ void AutoRecovery::implts_doSessionSave(const DispatchParams& aParams)
// Be sure to know all open documents realy .-)
implts_verifyCacheAgainstDesktopDocumentList();
+ // for all docs, store their current view/names in the configurtion
+ implts_persistAllActiveViewNames();
+
// The called method for saving documents runs
// during normal AutoSave more then once. Because
// it postpone active documents and save it later.
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index 4e1e094b0c72..bbbefdbdbda1 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -110,39 +110,66 @@ Size DecoToolBox::getMinSize()
return maMinSize;
}
+#define STC_BUTTON_STYLE (WB_LEFT | WB_VCENTER | WB_FLATBUTTON | WB_BEVELBUTTON)
BackingWindow::BackingWindow( Window* i_pParent ) :
Window( i_pParent, FwkResId( DLG_BACKING ) ),
maWelcome( this, WB_LEFT ),
maProduct( this, WB_LEFT ),
- maCreateText( this, WB_LEFT ),
maWriterText( this, WB_WORDBREAK | WB_VCENTER ),
- maWriterButton( this, WB_CENTER | WB_BEVELBUTTON ),
+ maWriterButton( this, STC_BUTTON_STYLE ),
maCalcText( this, WB_WORDBREAK | WB_VCENTER ),
- maCalcButton( this, WB_CENTER | WB_BEVELBUTTON ),
+ maCalcButton( this, STC_BUTTON_STYLE ),
maImpressText( this, WB_WORDBREAK | WB_VCENTER ),
- maImpressButton( this, WB_CENTER | WB_BEVELBUTTON ),
+ maImpressButton( this, STC_BUTTON_STYLE ),
+ maOpenText( this, WB_WORDBREAK | WB_VCENTER ),
+ maOpenButton( this, STC_BUTTON_STYLE ),
maDrawText( this, WB_WORDBREAK | WB_VCENTER ),
- maDrawButton( this, WB_CENTER | WB_BEVELBUTTON ),
+ maDrawButton( this, STC_BUTTON_STYLE ),
maDBText( this, WB_WORDBREAK | WB_VCENTER ),
- maDBButton( this, WB_CENTER | WB_BEVELBUTTON ),
+ maDBButton( this, STC_BUTTON_STYLE ),
maMathText( this, WB_WORDBREAK | WB_VCENTER ),
- maMathButton( this, WB_CENTER | WB_BEVELBUTTON ),
+ maMathButton( this, STC_BUTTON_STYLE ),
maTemplateText( this, WB_WORDBREAK | WB_VCENTER ),
- maTemplateButton( this, WB_CENTER | WB_BEVELBUTTON ),
- maOpenText( this, WB_WORDBREAK | WB_VCENTER ),
- maOpenButton( this, WB_CENTER | WB_BEVELBUTTON ),
+ maTemplateButton( this, STC_BUTTON_STYLE ),
maToolbox( this, WB_DIALOGCONTROL ),
maWelcomeString( FwkResId( STR_BACKING_WELCOME ) ),
maProductString( FwkResId( STR_BACKING_WELCOMEPRODUCT ) ),
- maCreateString( FwkResId( STR_BACKING_CREATE ) ),
maOpenString( FwkResId( STR_BACKING_FILE ) ),
maTemplateString( FwkResId( STR_BACKING_TEMPLATE ) ),
maButtonImageSize( 10, 10 ),
mbInitControls( false ),
- mpAccExec( NULL )
+ mnLayoutStyle( 0 ),
+ mpAccExec( NULL ),
+ mnBtnPos( 120 )
{
mnColumnWidth[0] = mnColumnWidth[1] = 0;
+ mnTextColumnWidth[0] = mnTextColumnWidth[1] = 0;
+
+ try
+ {
+ Reference<lang::XMultiServiceFactory> xConfig( comphelper::getProcessServiceFactory()->createInstance(SERVICENAME_CFGPROVIDER),UNO_QUERY);
+ if( xConfig.is() )
+ {
+ Sequence<Any> args(1);
+ PropertyValue val(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("nodepath") ),
+ 0,
+ Any(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.Common/Help/StartCenter"))),
+ PropertyState_DIRECT_VALUE);
+ args.getArray()[0] <<= val;
+ Reference<container::XNameAccess> xNameAccess(xConfig->createInstanceWithArguments(SERVICENAME_CFGREADACCESS,args), UNO_QUERY);
+ if( xNameAccess.is() )
+ {
+ //throws css::container::NoSuchElementException, css::lang::WrappedTargetException
+ Any value( xNameAccess->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StartCenterLayoutStyle"))) );
+ mnLayoutStyle = value.get<sal_Int32>();
+ }
+ }
+ }
+ catch (Exception& )
+ {
+ }
// get icon images from vcl resource and set them on the appropriate buttons
loadImage( FwkResId( BMP_BACKING_WRITER ), maWriterButton );
@@ -151,16 +178,12 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
loadImage( FwkResId( BMP_BACKING_DRAW ), maDrawButton );
loadImage( FwkResId( BMP_BACKING_DATABASE ), maDBButton );
loadImage( FwkResId( BMP_BACKING_FORMULA ), maMathButton );
- loadImage( FwkResId( BMP_BACKING_OPENFILE ), maOpenButton );
- loadImage( FwkResId( BMP_BACKING_OPENTEMPLATE ), maTemplateButton );
+ loadImage( FwkResId( BMP_BACKING_FOLDER ), maOpenButton );
+ loadImage( FwkResId( BMP_BACKING_FOLDER ), maTemplateButton );
- BitmapEx aExtImage( FwkResId( BMP_BACKING_EXT ) );
String aExtHelpText( FwkResId( STR_BACKING_EXTHELP ) );
- BitmapEx aRegImage( FwkResId( BMP_BACKING_REG ) );
String aRegHelpText( FwkResId( STR_BACKING_REGHELP ) );
- BitmapEx aInfoImage( FwkResId( BMP_BACKING_INFO ) );
String aInfoHelpText( FwkResId( STR_BACKING_INFOHELP ) );
- BitmapEx aTplRepImage( FwkResId( BMP_BACKING_TPLREP ) );
String aTplRepHelpText( FwkResId( STR_BACKING_TPLREP ) );
// clean up resource stack
@@ -180,25 +203,25 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
maToolbox.SetStyle( maToolbox.GetStyle() | WB_FORCETABCYCLE );
// insert toolbox items
- maToolbox.InsertItem( nItemId_TplRep, Image( aTplRepImage ) );
+ maToolbox.InsertItem( nItemId_TplRep, Image() );
maToolbox.SetItemText( nItemId_TplRep, aTplRepHelpText );
maToolbox.SetQuickHelpText( nItemId_TplRep, aTplRepHelpText );
maToolbox.SetItemCommand( nItemId_TplRep, String( RTL_CONSTASCII_USTRINGPARAM( ".HelpId:StartCenter:TemplateRepository" ) ) );
maToolbox.ShowItem( nItemId_TplRep );
- maToolbox.InsertItem( nItemId_Extensions, Image( aExtImage ) );
+ maToolbox.InsertItem( nItemId_Extensions, Image() );
maToolbox.SetQuickHelpText( nItemId_Extensions, aExtHelpText );
maToolbox.SetItemText( nItemId_Extensions, aExtHelpText );
maToolbox.SetItemCommand( nItemId_Extensions, String( RTL_CONSTASCII_USTRINGPARAM( ".HelpId:StartCenter:Extensions" ) ) );
maToolbox.ShowItem( nItemId_Extensions );
- maToolbox.InsertItem( nItemId_Reg, Image( aRegImage ) );
+ maToolbox.InsertItem( nItemId_Reg, Image() );
maToolbox.SetQuickHelpText( nItemId_Reg, aRegHelpText );
maToolbox.SetItemText( nItemId_Reg, aRegHelpText );
maToolbox.SetItemCommand( nItemId_Reg, String( RTL_CONSTASCII_USTRINGPARAM( ".HelpId:StartCenter:Register" ) ) );
maToolbox.ShowItem( nItemId_Reg );
- maToolbox.InsertItem( nItemId_Info, Image( aInfoImage ) );
+ maToolbox.InsertItem( nItemId_Info, Image() );
maToolbox.SetItemText( nItemId_Info, aInfoHelpText );
maToolbox.SetQuickHelpText( nItemId_Info, aInfoHelpText );
maToolbox.SetItemCommand( nItemId_Info, String( RTL_CONSTASCII_USTRINGPARAM( ".HelpId:StartCenter:Info" ) ) );
@@ -259,7 +282,13 @@ void BackingWindow::initBackground()
SetBackground( GetSettings().GetStyleSettings().GetWorkspaceGradient() );
bool bDark = GetSettings().GetStyleSettings().GetHighContrastMode();
- maWelcomeTextColor = maLabelTextColor = bDark ? Color( COL_WHITE ) : Color( 0x26, 0x35, 0x42 );
+ if( bDark )
+ maWelcomeTextColor = maLabelTextColor = Color( COL_WHITE );
+ else if( mnLayoutStyle == 1 )
+ maWelcomeTextColor = maLabelTextColor = Color( COL_BLACK );
+ else
+ maWelcomeTextColor = maLabelTextColor = Color( 0x26, 0x35, 0x42 );
+
Color aTextBGColor( bDark ? COL_BLACK : COL_WHITE );
// select image set
@@ -286,13 +315,15 @@ void BackingWindow::initBackground()
maBackgroundLeft = BitmapEx( FwkResId( BMP_BACKING_BACKGROUND_LEFT ) );
maBackgroundRight = BitmapEx( FwkResId( BMP_BACKING_BACKGROUND_RIGHT ) );
}
+ maToolbox.SetItemImage( nItemId_Extensions, BitmapEx( FwkResId( BMP_BACKING_EXT ) ) );
+ maToolbox.SetItemImage( nItemId_Reg, BitmapEx( FwkResId( BMP_BACKING_REG ) ) );
+ maToolbox.SetItemImage( nItemId_Info, BitmapEx( FwkResId( BMP_BACKING_INFO ) ) );
+ maToolbox.SetItemImage( nItemId_TplRep, BitmapEx( FwkResId( BMP_BACKING_TPLREP ) ) );
maWelcome.SetControlForeground( maWelcomeTextColor );
maWelcome.SetBackground();
maProduct.SetControlForeground( maWelcomeTextColor );
maProduct.SetBackground();
- maCreateText.SetControlForeground( maLabelTextColor );
- maCreateText.SetControlBackground( aTextBGColor );
maWriterText.SetControlForeground( maLabelTextColor );
maWriterText.SetControlBackground( aTextBGColor );
maCalcText.SetControlForeground( maLabelTextColor );
@@ -309,6 +340,14 @@ void BackingWindow::initBackground()
maTemplateText.SetControlBackground( aTextBGColor );
maOpenText.SetControlForeground( maLabelTextColor );
maOpenText.SetControlBackground( aTextBGColor );
+
+ if( mnLayoutStyle == 1 )
+ {
+ if( Application::GetSettings().GetLayoutRTL() )
+ mnBtnPos = maBackgroundRight.GetSizePixel().Width() + 40;
+ else
+ mnBtnPos = maBackgroundLeft.GetSizePixel().Width() + 40;
+ }
}
void BackingWindow::initControls()
@@ -344,10 +383,8 @@ void BackingWindow::initControls()
nYPos += (maWelcomeSize.Height()*3)/2;
- if( maControlRect.GetWidth() < nBtnPos + maWelcomeSize.Width() + 20 )
- maControlRect.Right() = maControlRect.Left() + maWelcomeSize.Width() + nBtnPos + 20;
-
- maWelcome.Show();
+ if( maControlRect.GetWidth() < mnBtnPos + maWelcomeSize.Width() + 20 )
+ maControlRect.Right() = maControlRect.Left() + maWelcomeSize.Width() + mnBtnPos + 20;
nYPos += maWelcomeSize.Height();
@@ -365,10 +402,14 @@ void BackingWindow::initControls()
maProductSize = Size( maProduct.GetTextWidth( maProductString ), maProduct.GetTextHeight() );
maProductSize.Width() = (maProductSize.Width() * 20)/19;
- if( maControlRect.GetWidth() < maProductSize.Width() + nBtnPos + 10 )
- maControlRect.Right() = maControlRect.Left() + maProductSize.Width() + nBtnPos + 10;
+ if( maControlRect.GetWidth() < maProductSize.Width() + mnBtnPos + 10 )
+ maControlRect.Right() = maControlRect.Left() + maProductSize.Width() + mnBtnPos + 10;
- maProduct.Show();
+ if( mnLayoutStyle == 1 )
+ {
+ maWelcome.Show();
+ maProduct.Show();
+ }
nYPos += (maProductSize.Height()*3)/2;
@@ -376,14 +417,6 @@ void BackingWindow::initControls()
maTextFont.SetSize( Size( 0, 11 ) );
maTextFont.SetWeight( WEIGHT_NORMAL );
- maCreateText.SetText( maCreateString );
- maCreateText.SetFont( maTextFont );
- maCreateText.SetControlFont( maTextFont );
- maCreateSize = Size( maCreateText.GetTextWidth( maCreateString ), maCreateText.GetTextHeight() );
- maCreateText.Show();
-
- nYPos += (maCreateSize.Height()*3)/2;
-
// collect the URLs of the entries in the File/New menu
SvtModuleOptions aModuleOptions;
std::set< rtl::OUString > aFileNewAppsAvailable;
@@ -426,41 +459,62 @@ void BackingWindow::initControls()
layoutButtonAndText( WRITER_URL, 0, aFileNewAppsAvailable,
aModuleOptions, SvtModuleOptions::E_SWRITER,
maWriterButton, maWriterText, aMnemns );
- layoutButtonAndText( CALC_URL, 1, aFileNewAppsAvailable,
- aModuleOptions, SvtModuleOptions::E_SCALC,
- maCalcButton, maCalcText, aMnemns );
- nYPos += maButtonImageSize.Height() + 10;
- layoutButtonAndText( IMPRESS_WIZARD_URL, 0, aFileNewAppsAvailable,
- aModuleOptions, SvtModuleOptions::E_SIMPRESS,
- maImpressButton, maImpressText, aMnemns );
layoutButtonAndText( DRAW_URL, 1, aFileNewAppsAvailable,
aModuleOptions, SvtModuleOptions::E_SDRAW,
maDrawButton, maDrawText, aMnemns );
nYPos += maButtonImageSize.Height() + 10;
- layoutButtonAndText( BASE_URL, 0, aFileNewAppsAvailable,
+ layoutButtonAndText( CALC_URL, 0, aFileNewAppsAvailable,
+ aModuleOptions, SvtModuleOptions::E_SCALC,
+ maCalcButton, maCalcText, aMnemns );
+ layoutButtonAndText( BASE_URL, 1, aFileNewAppsAvailable,
aModuleOptions, SvtModuleOptions::E_SDATABASE,
maDBButton, maDBText, aMnemns );
+ nYPos += maButtonImageSize.Height() + 10;
+ layoutButtonAndText( IMPRESS_WIZARD_URL, 0, aFileNewAppsAvailable,
+ aModuleOptions, SvtModuleOptions::E_SIMPRESS,
+ maImpressButton, maImpressText, aMnemns );
layoutButtonAndText( MATH_URL, 1, aFileNewAppsAvailable,
aModuleOptions, SvtModuleOptions::E_SMATH,
maMathButton, maMathText, aMnemns );
nYPos += 3*maButtonImageSize.Height() / 2;
- layoutButtonAndText( NULL, -1, aFileNewAppsAvailable,
- aModuleOptions, SvtModuleOptions::E_SWRITER,
- maTemplateButton, maTemplateText, aMnemns, maTemplateString );
- nYPos += 10;
- layoutButtonAndText( NULL, -1, aFileNewAppsAvailable,
+ layoutButtonAndText( NULL, 0, aFileNewAppsAvailable,
aModuleOptions, SvtModuleOptions::E_SWRITER,
maOpenButton, maOpenText, aMnemns, maOpenString );
+ layoutButtonAndText( NULL, 1, aFileNewAppsAvailable,
+ aModuleOptions, SvtModuleOptions::E_SWRITER,
+ maTemplateButton, maTemplateText, aMnemns, maTemplateString );
nYPos += 10;
DBG_ASSERT( nYPos < maControlRect.GetHeight(), "misformatting !" );
- if( mnColumnWidth[0] + mnColumnWidth[1] + nBtnPos + 20 > maControlRect.GetWidth() )
- maControlRect.Right() = maControlRect.Left() + mnColumnWidth[0] + mnColumnWidth[1] + nBtnPos + 20;
+ if( mnColumnWidth[0] + mnColumnWidth[1] + mnBtnPos + 20 > maControlRect.GetWidth() )
+ maControlRect.Right() = maControlRect.Left() + mnColumnWidth[0] + mnColumnWidth[1] + mnBtnPos + 20;
+
+ mnTextColumnWidth[0] = mnColumnWidth[0];
+ mnTextColumnWidth[1] = mnColumnWidth[1];
+
+ if( mnTextColumnWidth[1] > mnTextColumnWidth[0] )
+ {
+ mnColumnWidth[0] = mnColumnWidth[1];
+ mnTextColumnWidth[0] = mnTextColumnWidth[1];
+ }
+ else
+ {
+ mnColumnWidth[1] = mnColumnWidth[0];
+ mnTextColumnWidth[1] = mnTextColumnWidth[0];
+ }
+ if( maControlRect.GetWidth() < maControlRect.GetHeight() * 3 / 2 )
+ {
+ maControlRect.Right() = maControlRect.Left() + maControlRect.GetHeight() * 3 / 2;
+ long nDelta = (maControlRect.GetWidth() - mnBtnPos - mnColumnWidth[1] - mnColumnWidth[0] - 20);
+ mnColumnWidth[0] += nDelta/2;
+ mnColumnWidth[1] += nDelta/2;
+ }
maToolbox.SetSelectHdl( LINK( this, BackingWindow, ToolboxHdl ) );
- maToolbox.Show();
+ if( mnLayoutStyle == 0 )
+ maToolbox.Show();
// scale middle map to formatted width
Size aMiddleSegmentSize( maControlRect.GetSize().Width() + nShadowLeft + nShadowRight,
@@ -510,37 +564,34 @@ void BackingWindow::layoutButtonAndText(
}
// setup text
- i_rText.SetFont( maTextFont );
- i_rText.SetControlFont( maTextFont );
+ i_rBtn.SetFont( maTextFont );
+ i_rBtn.SetControlFont( maTextFont );
String aText( i_rStr.Len() ? i_rStr : SvFileInformationManager::GetDescription( INetURLObject( aURL ) ) );
i_rMnemns.CreateMnemonic( aText );
- i_rText.SetText( aText );
+ i_rBtn.SetText( aText );
- long nTextWidth = i_rText.GetTextWidth( i_rText.GetText() );
- i_rText.SetPaintTransparent( TRUE );
+ long nTextWidth = i_rBtn.GetTextWidth( i_rBtn.GetText() );
- nTextWidth += maButtonImageSize.Width() + 30;
+ nTextWidth += maButtonImageSize.Width();
if( nColumn >= 0 && nColumn < static_cast<int>(sizeof(mnColumnWidth)/sizeof(mnColumnWidth[0])) )
{
if( nTextWidth > mnColumnWidth[nColumn] )
mnColumnWidth[nColumn] = nTextWidth;
}
+ i_rBtn.SetImageAlign( IMAGEALIGN_LEFT );
// show the controls
i_rBtn.Show();
- i_rText.Show();
+ i_rText.Show( FALSE );
+
+
+ // FIXME: the only reason the FixedTexts are left are not to trigger
+ // a translation change due to changed src files. For the next minor
+ // the FixedTexts should be removed completely
}
void BackingWindow::Paint( const Rectangle& )
{
- bool bDark = GetSettings().GetStyleSettings().GetHighContrastMode();
-
- Color aBackColor( bDark ? COL_BLACK : COL_WHITE );
-
- // fill control rect
- SetLineColor();
- SetFillColor( aBackColor );
- DrawRect( maControlRect );
// draw bitmap
if( GetSettings().GetLayoutRTL() )
@@ -607,8 +658,10 @@ void BackingWindow::Resize()
maToolbox.calcMinSize();
Size aTBSize( maToolbox.getMinSize() );
- Point aTBPos( maControlRect.Right() - aTBSize.Width() - 10,
+ Point aTBPos( maControlRect.Left() + mnBtnPos,
maControlRect.Bottom() - aTBSize.Height() - 10 );
+ if( Application::GetSettings().GetLayoutRTL() )
+ aTBPos.X() = maControlRect.Right() - aTBSize.Width() - mnBtnPos;
maToolbox.SetPosSizePixel( aTBPos, aTBSize );
// #i93631# squeeze controls so they fit into the box
@@ -617,7 +670,6 @@ void BackingWindow::Resize()
const long nWDelta = maWelcomeSize.Height();
const long nW2Delta = (maWelcomeSize.Height()*3)/2;
const long nPDelta = (maProductSize.Height()*3)/2;
- const long nCDelta = (maCreateSize.Height()*3)/2;
const long nBDelta = maButtonImageSize.Height() + 10;
const long nB2Delta = 3*maButtonImageSize.Height()/2;
const long nLastDelta = maButtonImageSize.Height();
@@ -626,7 +678,6 @@ void BackingWindow::Resize()
(nWDelta - nDiff) +
(nW2Delta- nDiff) +
(nPDelta - nDiff) +
- (nCDelta - nDiff) +
3 * (nBDelta - nDiff) +
(nB2Delta- nDiff) +
nLastDelta
@@ -637,47 +688,26 @@ void BackingWindow::Resize()
long nYPos = maControlRect.Top();
nYPos += nW2Delta - nDiff;
- maWelcome.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos, nYPos ),
- Size( maControlRect.GetWidth() - nBtnPos - 5, (maWelcomeSize.Height()*20)/19 ) );
+ maWelcome.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos, nYPos ),
+ Size( maControlRect.GetWidth() - mnBtnPos - 5, (maWelcomeSize.Height()*20)/19 ) );
nYPos += nWDelta - nDiff;
- maProduct.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos, nYPos ), Size( maControlRect.GetWidth() - nBtnPos - 5, (maProductSize.Height()*20)/19 ) );
+ maProduct.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos, nYPos ), Size( maControlRect.GetWidth() - mnBtnPos - 5, (maProductSize.Height()*20)/19 ) );
nYPos += nPDelta - nDiff;
- maCreateText.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos, nYPos ),
- Size( maControlRect.GetWidth() - nBtnPos - 5, maCreateSize.Height() ) );
+ nYPos += nWDelta/2 - nDiff;
- nYPos += nCDelta - nDiff;
-
- maWriterButton.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos, nYPos ), maButtonImageSize );
- maWriterText.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos + maButtonImageSize.Width() + 10, nYPos ),
- Size( mnColumnWidth[0] - maButtonImageSize.Width() - 10, maButtonImageSize.Height() ) );
- maCalcButton.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos + mnColumnWidth[0], nYPos ), maButtonImageSize );
- maCalcText.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos + maButtonImageSize.Width() + 10 + mnColumnWidth[0], nYPos ),
- Size( mnColumnWidth[1] - maButtonImageSize.Width() - 10, maButtonImageSize.Height() ) );
+ maWriterButton.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos, nYPos ), Size( mnTextColumnWidth[0], maButtonImageSize.Height() ) );
+ maDrawButton.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos + mnColumnWidth[0], nYPos ), Size( mnTextColumnWidth[1], maButtonImageSize.Height() ) );
nYPos += nBDelta - nDiff;
- maImpressButton.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos, nYPos ), maButtonImageSize );
- maImpressText.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos + maButtonImageSize.Width() + 10, nYPos ),
- Size( mnColumnWidth[0] - maButtonImageSize.Width() - 10, maButtonImageSize.Height() ) );
- maDrawButton.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos + mnColumnWidth[0], nYPos ), maButtonImageSize );
- maDrawText.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos + maButtonImageSize.Width() + 10 + mnColumnWidth[0], nYPos ),
- Size( mnColumnWidth[1] - maButtonImageSize.Width() - 10, maButtonImageSize.Height() ) );
+ maCalcButton.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos, nYPos ), Size( mnTextColumnWidth[0], maButtonImageSize.Height() ) );
+ maDBButton.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos + mnColumnWidth[0], nYPos ), Size( mnTextColumnWidth[1], maButtonImageSize.Height() ) );
nYPos += nBDelta - nDiff;
- maDBButton.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos, nYPos ), maButtonImageSize );
- maDBText.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos + maButtonImageSize.Width() + 10, nYPos ),
- Size( mnColumnWidth[0] - maButtonImageSize.Width() - 10, maButtonImageSize.Height() ) );
- maMathButton.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos + mnColumnWidth[0], nYPos ), maButtonImageSize );
- maMathText.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos + maButtonImageSize.Width() + 10 + mnColumnWidth[0], nYPos ),
- Size( mnColumnWidth[1] - maButtonImageSize.Width() - 10, maButtonImageSize.Height() ) );
+ maImpressButton.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos, nYPos ), Size( mnTextColumnWidth[0], maButtonImageSize.Height() ) );
+ maMathButton.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos + mnColumnWidth[0], nYPos ), Size( mnTextColumnWidth[1], maButtonImageSize.Height() ) );
nYPos += nB2Delta - nDiff;
- maTemplateButton.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos, nYPos ), maButtonImageSize );
- maTemplateText.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos + maButtonImageSize.Width() + 10, nYPos ),
- Size( mnColumnWidth[0]+mnColumnWidth[1] - maButtonImageSize.Width() - 10, maButtonImageSize.Height() ) );
- nYPos += nBDelta - nDiff;
- maOpenButton.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos, nYPos ), maButtonImageSize );
- maOpenText.SetPosSizePixel( Point( maControlRect.Left() + nBtnPos + maButtonImageSize.Width() + 10, nYPos ),
- Size( mnColumnWidth[0]+mnColumnWidth[1] - maButtonImageSize.Width() - 10, maButtonImageSize.Height() ) );
- nYPos += nBDelta - nDiff;
+ maOpenButton.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos, nYPos ), Size( mnTextColumnWidth[0], maButtonImageSize.Height() ) );
+ maTemplateButton.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos + mnColumnWidth[0], nYPos ), Size( mnTextColumnWidth[1], maButtonImageSize.Height() ) );
}
IMPL_LINK( BackingWindow, ToolboxHdl, void*, EMPTYARG )
diff --git a/framework/source/services/backingwindow.hxx b/framework/source/services/backingwindow.hxx
index de3797d3ab4f..7b7dfa34b110 100644
--- a/framework/source/services/backingwindow.hxx
+++ b/framework/source/services/backingwindow.hxx
@@ -86,14 +86,14 @@ namespace framework
Size maWelcomeSize;
FixedText maProduct;
Size maProductSize;
- FixedText maCreateText;
- Size maCreateSize;
FixedText maWriterText;
ImageButton maWriterButton;
FixedText maCalcText;
ImageButton maCalcButton;
FixedText maImpressText;
ImageButton maImpressButton;
+ FixedText maOpenText;
+ ImageButton maOpenButton;
FixedText maDrawText;
ImageButton maDrawButton;
FixedText maDBText;
@@ -102,8 +102,6 @@ namespace framework
ImageButton maMathButton;
FixedText maTemplateText;
ImageButton maTemplateButton;
- FixedText maOpenText;
- ImageButton maOpenButton;
DecoToolBox maToolbox;
@@ -121,16 +119,17 @@ namespace framework
Rectangle maControlRect;
long mnColumnWidth[2];
+ long mnTextColumnWidth[2];
Color maLabelTextColor;
Color maWelcomeTextColor;
Size maButtonImageSize;
bool mbInitControls;
+ sal_Int32 mnLayoutStyle;
svt::AcceleratorExecute* mpAccExec;
+ long mnBtnPos;
-
- static const long nBtnPos = 240;
static const int nItemId_Extensions = 1;
static const int nItemId_Reg = 2;
static const int nItemId_Info = 3;
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index 8a90adb7efa7..18d5a1c31bef 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -2701,21 +2701,7 @@ css::uno::Any SAL_CALL Frame::impl_getPropertyValue(const ::rtl::OUString& /*sPr
break;
case FRAME_PROPHANDLE_ISHIDDEN :
-// aValue <<= m_bIsHidden;
- {
- sal_Bool bLoadedHidden = m_bIsHidden;
- css::uno::Reference< css::frame::XModel > xModel;
- if (m_xController.is())
- xModel = m_xController->getModel();
- if (xModel.is())
- {
- ::comphelper::MediaDescriptor lDesc(xModel->getArgs());
- bLoadedHidden = lDesc.getUnpackedValueOrDefault(
- ::comphelper::MediaDescriptor::PROP_HIDDEN(),
- (sal_Bool)sal_False);
- }
- aValue <<= bLoadedHidden;
- }
+ aValue <<= m_bIsHidden;
break;
case FRAME_PROPHANDLE_LAYOUTMANAGER :
diff --git a/framework/source/services/fwk_services.src b/framework/source/services/fwk_services.src
index 62cc4a6055a9..7e2ee3253e71 100644
--- a/framework/source/services/fwk_services.src
+++ b/framework/source/services/fwk_services.src
@@ -77,42 +77,22 @@ Window DLG_BACKING
{
File = "odf_32.png";
};
- Bitmap BMP_BACKING_OPENFILE
+ Bitmap BMP_BACKING_FOLDER
{
- File = "open_32.png";
- };
- Bitmap BMP_BACKING_OPENTEMPLATE
- {
- File = "template_32.png";
- };
- Bitmap BMP_BACKING_EXT
- {
- File = "extension_plus_26.png";
+ File = "folder_32.png";
};
String STR_BACKING_EXTHELP
{
Text [ en-US ] = "Add new features to %PRODUCTNAME";
};
- Bitmap BMP_BACKING_REG
- {
- File = "register_32.png";
- };
String STR_BACKING_REGHELP
{
Text [ en-US ] = "Register your %PRODUCTNAME";
};
- Bitmap BMP_BACKING_INFO
- {
- File = "info_26.png";
- };
String STR_BACKING_INFOHELP
{
Text [ en-US ] = "Get more information about %PRODUCTNAME";
};
- Bitmap BMP_BACKING_TPLREP
- {
- File = "addtemplate_32.png";
- };
String STR_BACKING_TPLREP
{
Text [ en-US ] = "Get more templates for %PRODUCTNAME";
@@ -141,6 +121,22 @@ Resource RES_BACKING_IMAGES
{
File = "backing_rtl_right.png";
};
+ Bitmap BMP_BACKING_EXT
+ {
+ File = "extension.png";
+ };
+ Bitmap BMP_BACKING_REG
+ {
+ File = "register_32.png";
+ };
+ Bitmap BMP_BACKING_INFO
+ {
+ File = "info_26.png";
+ };
+ Bitmap BMP_BACKING_TPLREP
+ {
+ File = "addtemplate_32.png";
+ };
};
Resource RES_BACKING_IMAGES_HC
@@ -165,6 +161,22 @@ Resource RES_BACKING_IMAGES_HC
{
File = "backing_rtl_right_hc.png";
};
+ Bitmap BMP_BACKING_EXT
+ {
+ File = "extension_hc.png";
+ };
+ Bitmap BMP_BACKING_REG
+ {
+ File = "register_hc.png";
+ };
+ Bitmap BMP_BACKING_INFO
+ {
+ File = "info_hc.png";
+ };
+ Bitmap BMP_BACKING_TPLREP
+ {
+ File = "template_hc.png";
+ };
};
Window WIN_TABWINDOW