summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2010-08-31 15:43:02 +0200
committerKurt Zenker <kz@openoffice.org>2010-08-31 15:43:02 +0200
commit3121b3216b8f3a021cab937a11ec82552119f035 (patch)
tree5c1524fa94c0e699599c3b2611cf8746d7108b3c /framework
parent8386153c88ea9bf2d243b87bb19c0f8d5d12ceb8 (diff)
parent6d37acab0b4dd2bc64d531aef6393d1186a11c56 (diff)
CWS-TOOLING: integrate CWS fwk153
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/classes/framelistanalyzer.hxx25
-rw-r--r--framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx1
-rw-r--r--framework/prj/d.lst1
-rw-r--r--framework/source/accelerators/acceleratorconfiguration.cxx5
-rw-r--r--framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx72
-rw-r--r--framework/util/makefile.mk2
6 files changed, 55 insertions, 51 deletions
diff --git a/framework/inc/classes/framelistanalyzer.hxx b/framework/inc/classes/framelistanalyzer.hxx
index 518870b354f1..4ab3c4532cdc 100644
--- a/framework/inc/classes/framelistanalyzer.hxx
+++ b/framework/inc/classes/framelistanalyzer.hxx
@@ -29,13 +29,6 @@
#define __FRAMEWORK_CLASSES_FRAMELISTANALYZER_HXX_
//_______________________________________________
-// my own includes
-
-#include <threadhelp/threadhelpbase.hxx>
-#include <macros/debug.hxx>
-#include <general.h>
-
-//_______________________________________________
// interface includes
#include <com/sun/star/frame/XFrame.hpp>
@@ -88,10 +81,10 @@ class FrameListAnalyzer
public:
/** provides access to the frame container, which should be analyzed. */
- const css::uno::Reference< css::frame::XFramesSupplier >& m_xSupplier;
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFramesSupplier >& m_xSupplier;
/** hold the reference frame, which is used e.g. to detect other frames with the same model. */
- const css::uno::Reference< css::frame::XFrame >& m_xReferenceFrame;
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& m_xReferenceFrame;
/** enable/disable some special analyzing steps.
see impl_analyze() for further informations. */
@@ -100,19 +93,19 @@ class FrameListAnalyzer
/** contains all frames, which uses the same model like the reference frame.
Will be filled only if m_eDetectMode has set the flag E_MODEL.
The reference frame is never part of this list! */
- css::uno::Sequence< css::uno::Reference< css::frame::XFrame > > m_lModelFrames;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > > m_lModelFrames;
/** contains all frames, which does not contain the same model like the reference frame.
Filling of it can't be supressed by m_eDetectMode.
The reference frame is never part of this list!
All frames inside this list are visible ones. */
- css::uno::Sequence< css::uno::Reference< css::frame::XFrame > > m_lOtherVisibleFrames;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > > m_lOtherVisibleFrames;
/** contains all frames, which does not contain the same model like the reference frame.
Filling of it can't be supressed by m_eDetectMode.
The reference frame is never part of this list!
All frames inside this list are hidden ones. */
- css::uno::Sequence< css::uno::Reference< css::frame::XFrame > > m_lOtherHiddenFrames;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > > m_lOtherHiddenFrames;
/** points to the help frame.
Will be set only, if any other frame (means different from the reference frame)
@@ -137,7 +130,7 @@ class FrameListAnalyzer
Analyzing of the help frame ignores the visible state of any frame.
But note: a hidden help frame indicates a wrong state!
*/
- css::uno::Reference< css::frame::XFrame > m_xHelp;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xHelp;
/** points to the frame, which contains the backing component.
Will be set only, if any other frame (means different from the reference frame)
@@ -163,7 +156,7 @@ class FrameListAnalyzer
Analyzing of the help frame ignores the visible state of any frame.
But note: a hidden backing mode frame indicates a wrong state!
*/
- css::uno::Reference< css::frame::XFrame > m_xBackingComponent;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xBackingComponent;
/** is set to true only, if the reference frame is a hidden one.
This value is undefined if m_eDetectMode doesn't have set the flag E_HIDDEN! */
@@ -200,8 +193,8 @@ class FrameListAnalyzer
analyze steps. Note: Some member values will be undefined, if
an analyze step will be disabled.
*/
- FrameListAnalyzer( const css::uno::Reference< css::frame::XFramesSupplier >& xSupplier ,
- const css::uno::Reference< css::frame::XFrame >& xReferenceFrame ,
+ FrameListAnalyzer( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFramesSupplier >& xSupplier ,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xReferenceFrame ,
sal_uInt32 eDetectMode );
virtual ~FrameListAnalyzer();
diff --git a/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx b/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx
index 9c5f9c89afe6..856746139b68 100644
--- a/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx
+++ b/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx
@@ -219,6 +219,7 @@ namespace framework
com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener
com::sun::star::uno::Reference< com::sun::star::lang::XComponent > m_xModuleImageManager;
+ com::sun::star::uno::Reference< com::sun::star::uno::XInterface > m_xModuleAcceleratorManager;
};
}
diff --git a/framework/prj/d.lst b/framework/prj/d.lst
index 7f260f07cf65..fe6077f57bc8 100644
--- a/framework/prj/d.lst
+++ b/framework/prj/d.lst
@@ -42,6 +42,7 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\statusbar
..\inc\classes\menuextensionsupplier.hxx %_DEST%\inc%_EXT%\framework\menuextensionsupplier.hxx
..\inc\interaction\preventduplicateinteraction.hxx %_DEST%\inc%_EXT%\framework\preventduplicateinteraction.hxx
..\inc\helper\titlehelper.hxx %_DEST%\inc%_EXT%\framework\titlehelper.hxx
+..\inc\classes\framelistanalyzer.hxx %_DEST%\inc%_EXT%\framework\framelistanalyzer.hxx
..\uiconfig\startmodule\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\menubar\*.xml
..\uiconfig\startmodule\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\toolbar\*.xml
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index b81ef5aecf0e..43772f5c4273 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -1248,11 +1248,12 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::changesOccurred(const css::util:
if (! xHAccess.is ())
return;
- const sal_Int32 c = aEvent.Changes.getLength();
+ css::util::ChangesEvent aReceivedEvents( aEvent );
+ const sal_Int32 c = aReceivedEvents.Changes.getLength();
sal_Int32 i = 0;
for (i=0; i<c; ++i)
{
- const css::util::ElementChange& aChange = aEvent.Changes[i];
+ const css::util::ElementChange& aChange = aReceivedEvents.Changes[i];
// Only path of form "PrimaryKeys/Modules/Module['<module_name>']/Key['<command_url>']/Command[<locale>]" will
// be interesting for use. Sometimes short path values are given also by the broadcaster ... but they must be ignored :-)
diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
index 193bd63b5ad5..607efce4d4d6 100644
--- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
@@ -776,26 +776,29 @@ void SAL_CALL ModuleUIConfigurationManager::dispose() throw (::com::sun::star::u
css::lang::EventObject aEvent( xThis );
m_aListenerContainer.disposeAndClear( aEvent );
- {
- ResetableGuard aGuard( m_aLock );
- try
- {
- if ( m_xModuleImageManager.is() )
- m_xModuleImageManager->dispose();
- }
- catch ( Exception& )
- {
- }
+ /* SAFE AREA ----------------------------------------------------------------------------------------------- */
+ ResetableGuard aGuard( m_aLock );
+ Reference< XComponent > xModuleImageManager( m_xModuleImageManager );
+ m_xModuleImageManager.clear();
+ m_xModuleAcceleratorManager.clear();
+ m_aUIElements[LAYER_USERDEFINED].clear();
+ m_aUIElements[LAYER_DEFAULT].clear();
+ m_xDefaultConfigStorage.clear();
+ m_xUserConfigStorage.clear();
+ m_xUserRootCommit.clear();
+ m_bConfigRead = false;
+ m_bModified = false;
+ m_bDisposed = true;
+ aGuard.unlock();
+ /* SAFE AREA ----------------------------------------------------------------------------------------------- */
- m_xModuleImageManager.clear();
- m_aUIElements[LAYER_USERDEFINED].clear();
- m_aUIElements[LAYER_DEFAULT].clear();
- m_xDefaultConfigStorage.clear();
- m_xUserConfigStorage.clear();
- m_xUserRootCommit.clear();
- m_bConfigRead = false;
- m_bModified = false;
- m_bDisposed = true;
+ try
+ {
+ if ( xModuleImageManager.is() )
+ xModuleImageManager->dispose();
+ }
+ catch ( Exception& )
+ {
}
}
@@ -1370,30 +1373,35 @@ Reference< XInterface > SAL_CALL ModuleUIConfigurationManager::getImageManager()
}
return Reference< XInterface >( m_xModuleImageManager, UNO_QUERY );
-
-// return Reference< XInterface >();
}
Reference< XInterface > SAL_CALL ModuleUIConfigurationManager::getShortCutManager() throw (::com::sun::star::uno::RuntimeException)
{
ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ throw DisposedException();
+
Reference< XMultiServiceFactory > xSMGR = m_xServiceManager;
- ::rtl::OUString aModule = /*m_aModuleShortName*/m_aModuleIdentifier;
- aGuard.unlock();
+ ::rtl::OUString aModule = m_aModuleIdentifier;
- Reference< XInterface > xManager = xSMGR->createInstance(SERVICENAME_MODULEACCELERATORCONFIGURATION);
- Reference< XInitialization > xInit (xManager, UNO_QUERY_THROW);
+ if ( !m_xModuleAcceleratorManager.is() )
+ {
+ Reference< XInterface > xManager = xSMGR->createInstance(SERVICENAME_MODULEACCELERATORCONFIGURATION);
+ Reference< XInitialization > xInit (xManager, UNO_QUERY_THROW);
- PropertyValue aProp;
- aProp.Name = ::rtl::OUString::createFromAscii("ModuleIdentifier");
- aProp.Value <<= aModule;
+ PropertyValue aProp;
+ aProp.Name = ::rtl::OUString::createFromAscii("ModuleIdentifier");
+ aProp.Value <<= aModule;
- Sequence< Any > lArgs(1);
- lArgs[0] <<= aProp;
+ Sequence< Any > lArgs(1);
+ lArgs[0] <<= aProp;
- xInit->initialize(lArgs);
+ xInit->initialize(lArgs);
+ m_xModuleAcceleratorManager = Reference< XInterface >( xManager, UNO_QUERY );
+ }
- return xManager;
+ return m_xModuleAcceleratorManager;
}
Reference< XInterface > SAL_CALL ModuleUIConfigurationManager::getEventsManager() throw (::com::sun::star::uno::RuntimeException)
diff --git a/framework/util/makefile.mk b/framework/util/makefile.mk
index 91532cda76e2..edc5f67ce60a 100644
--- a/framework/util/makefile.mk
+++ b/framework/util/makefile.mk
@@ -50,7 +50,6 @@ LIB1OBJFILES= \
$(SLO)$/protocolhandlercache.obj \
$(SLO)$/networkdomain.obj \
$(SLO)$/configaccess.obj \
- $(SLO)$/framelistanalyzer.obj \
$(SLO)$/shareablemutex.obj \
$(SLO)$/itemcontainer.obj \
$(SLO)$/rootitemcontainer.obj \
@@ -99,6 +98,7 @@ LIB2OBJFILES= \
$(SLO)$/configimporter.obj \
$(SLO)$/menuextensionsupplier.obj \
$(SLO)$/preventduplicateinteraction.obj \
+ $(SLO)$/framelistanalyzer.obj \
$(SLO)$/titlehelper.obj
# --- import classes library ---------------------------------------------------