From bb30c0a24baa2bc671daae588b523386470984c7 Mon Sep 17 00:00:00 2001 From: Malte Timmermann Date: Fri, 25 Jun 2010 13:15:03 +0200 Subject: codecleanup02: #i112685# Removed ifdefs and code for WIN,W30,W31 --- framework/inc/macros/debug/memorymeasure.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'framework') diff --git a/framework/inc/macros/debug/memorymeasure.hxx b/framework/inc/macros/debug/memorymeasure.hxx index 06bd9305adeb..0c5be0d237c9 100644 --- a/framework/inc/macros/debug/memorymeasure.hxx +++ b/framework/inc/macros/debug/memorymeasure.hxx @@ -37,7 +37,7 @@ #ifdef ENABLE_MEMORYMEASURE - #if !defined( WIN ) && !defined( WNT ) + #if !defined( WNT ) #error "Macros to measure memory access not available under platforms different from windows!" #endif -- cgit From 7492878a15774e9741ea2fefbf183fbec557c1c1 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Tue, 27 Jul 2010 18:11:00 +0200 Subject: fwk151: Fixed problems that configuration changes notifications were not correctly sent/processed --- .../source/accelerators/acceleratorconfiguration.cxx | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'framework') diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index 15070eed7c98..e63c41173df6 100644 --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx @@ -1264,26 +1264,21 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::changesOccurred(const css::util: aChange.Accessor >>= sOrgPath; sPath = sOrgPath; - ::rtl::OUString sPrimarySecondary = ::utl::extractFirstFromConfigurationPath(sPath); - sPath = ::utl::dropPrefixFromConfigurationPath(sPath, sPrimarySecondary); - - ::rtl::OUString sGlobalModules = ::utl::extractFirstFromConfigurationPath(sPath); - sPath = ::utl::dropPrefixFromConfigurationPath(sPath, sGlobalModules); + ::rtl::OUString sPrimarySecondary = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); + ::rtl::OUString sGlobalModules = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); if ( sGlobalModules.equals(CFG_ENTRY_GLOBAL) ) { ::rtl::OUString sModule; - sKey = ::utl::extractFirstFromConfigurationPath(sPath); - if ( sKey.getLength() ) + sKey = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); + if (( sKey.getLength() > 0 ) && ( sPath.getLength() > 0 )) reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey); } else if ( sGlobalModules.equals(CFG_ENTRY_MODULES) ) { - ::rtl::OUString sModule = ::utl::extractFirstFromConfigurationPath(sPath); - ::rtl::OUString sDropModule = ::rtl::OUString::createFromAscii("Module['") + sModule + ::rtl::OUString::createFromAscii("']"); - sPath = ::utl::dropPrefixFromConfigurationPath(sPath, sDropModule); - sKey = ::utl::extractFirstFromConfigurationPath(sPath); - if ( sKey.getLength() ) + ::rtl::OUString sModule = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); + sKey = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); + if (( sKey.getLength() > 0 ) && ( sPath.getLength() > 0 )) reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey); } } -- cgit From b3a5ee2e9cc75c522abc81f7a6e0dd8e963b2a96 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Tue, 27 Jul 2010 18:11:00 +0200 Subject: fwk151: Fixed problems that configuration changes notifications were not correctly sent/processed --- .../source/accelerators/acceleratorconfiguration.cxx | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'framework') diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index 15070eed7c98..e63c41173df6 100644 --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx @@ -1264,26 +1264,21 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::changesOccurred(const css::util: aChange.Accessor >>= sOrgPath; sPath = sOrgPath; - ::rtl::OUString sPrimarySecondary = ::utl::extractFirstFromConfigurationPath(sPath); - sPath = ::utl::dropPrefixFromConfigurationPath(sPath, sPrimarySecondary); - - ::rtl::OUString sGlobalModules = ::utl::extractFirstFromConfigurationPath(sPath); - sPath = ::utl::dropPrefixFromConfigurationPath(sPath, sGlobalModules); + ::rtl::OUString sPrimarySecondary = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); + ::rtl::OUString sGlobalModules = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); if ( sGlobalModules.equals(CFG_ENTRY_GLOBAL) ) { ::rtl::OUString sModule; - sKey = ::utl::extractFirstFromConfigurationPath(sPath); - if ( sKey.getLength() ) + sKey = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); + if (( sKey.getLength() > 0 ) && ( sPath.getLength() > 0 )) reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey); } else if ( sGlobalModules.equals(CFG_ENTRY_MODULES) ) { - ::rtl::OUString sModule = ::utl::extractFirstFromConfigurationPath(sPath); - ::rtl::OUString sDropModule = ::rtl::OUString::createFromAscii("Module['") + sModule + ::rtl::OUString::createFromAscii("']"); - sPath = ::utl::dropPrefixFromConfigurationPath(sPath, sDropModule); - sKey = ::utl::extractFirstFromConfigurationPath(sPath); - if ( sKey.getLength() ) + ::rtl::OUString sModule = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); + sKey = ::utl::extractFirstFromConfigurationPath(sPath, &sPath); + if (( sKey.getLength() > 0 ) && ( sPath.getLength() > 0 )) reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey); } } -- cgit From 22e60c73ba7dd3b8a7dae727d5682578c6677217 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 4 Aug 2010 13:56:16 +0200 Subject: fwk151: #i110127# Better formatting --- framework/source/accelerators/acceleratorconfiguration.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'framework') diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index e63c41173df6..b81ef5aecf0e 100644 --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx @@ -96,6 +96,8 @@ #include +#include + //_______________________________________________ // const @@ -1248,7 +1250,6 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::changesOccurred(const css::util: const sal_Int32 c = aEvent.Changes.getLength(); sal_Int32 i = 0; - for (i=0; i 0 ) && ( sPath.getLength() > 0 )) + { reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey); + } } } } @@ -1380,8 +1384,8 @@ void XCUBasedAcceleratorConfiguration::impl_ts_load( sal_Bool bPreferred, const aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD1; else if (sToken[k].equalsAscii("MOD2")) aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD2; - else if (sToken[k].equalsAscii("MOD3")) - aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD3; + else if (sToken[k].equalsAscii("MOD3")) + aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD3; else { bValid = sal_False; -- cgit From 08e2fc04ba183a19609518c7f4fb1c210bfe826e Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Mon, 9 Aug 2010 10:47:38 +0200 Subject: fwk152: #i108004# check the URLs correctly --- framework/source/loadenv/loadenv.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'framework') diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 99dd3107f162..75bcc4c4587f 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -103,6 +103,7 @@ #include #include #include +#include #include #include #include @@ -1407,7 +1408,7 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchAlreadyLoaded() // don't check the complete URL here. // use its main part - ignore optional jumpmarks! const ::rtl::OUString sURL = xModel->getURL(); - if (!m_aURL.Main.equals(sURL)) + if (!::utl::UCBContentHelper::EqualURLs( m_aURL.Main, sURL )) { xTask.clear (); continue; -- cgit From d40c2239e14027cef7c281830616c3deacbc9174 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 18 Aug 2010 10:52:09 +0200 Subject: fwk153: #i110127# Provide one instance of module accelerator manager in module ui configuration manager implementation. --- .../moduleuiconfigurationmanager.hxx | 1 + .../accelerators/acceleratorconfiguration.cxx | 5 +- .../moduleuiconfigurationmanager.cxx | 72 ++++++++++++---------- 3 files changed, 44 insertions(+), 34 deletions(-) (limited to 'framework') 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/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index e63c41173df6..aae610f0e3dd 100644 --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx @@ -1246,12 +1246,13 @@ 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']/Key['']/Command[]" 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) -- cgit From 967756108a94191a992d38cc4866a5f2971f56f5 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 18 Aug 2010 16:43:38 +0200 Subject: fwk153: #i113674# replace backing component if there is one --- framework/inc/classes/framelistanalyzer.hxx | 25 +++++++++---------------- framework/prj/d.lst | 1 + framework/util/makefile.mk | 2 +- 3 files changed, 11 insertions(+), 17 deletions(-) (limited to 'framework') 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 @@ -28,13 +28,6 @@ #ifndef __FRAMEWORK_CLASSES_FRAMELISTANALYZER_HXX_ #define __FRAMEWORK_CLASSES_FRAMELISTANALYZER_HXX_ -//_______________________________________________ -// my own includes - -#include -#include -#include - //_______________________________________________ // interface includes #include @@ -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/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/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 --------------------------------------------------- -- cgit From 9551bf5a1ee5c9275a26f8ec4021e0b7f5665176 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 10 Sep 2010 13:10:07 +0200 Subject: sb129: #i113189# change UNO components to use passive registration --- framework/inc/macros/debug/registration.hxx | 21 --- framework/inc/macros/registration.hxx | 96 +------------- framework/prj/d.lst | 3 + .../source/register/register3rdcomponents.cxx | 10 -- framework/source/register/registerlogindialog.cxx | 7 - framework/source/register/registerservices.cxx | 64 ---------- framework/source/register/registertemp.cxx | 29 ----- framework/util/fwk.component | 142 +++++++++++++++++++++ framework/util/fwl.component | 100 +++++++++++++++ framework/util/fwm.component | 43 +++++++ framework/util/makefile.mk | 20 +++ 11 files changed, 311 insertions(+), 224 deletions(-) create mode 100644 framework/util/fwk.component create mode 100644 framework/util/fwl.component create mode 100644 framework/util/fwm.component (limited to 'framework') diff --git a/framework/inc/macros/debug/registration.hxx b/framework/inc/macros/debug/registration.hxx index e8ea5a0bafe6..afb359348349 100644 --- a/framework/inc/macros/debug/registration.hxx +++ b/framework/inc/macros/debug/registration.hxx @@ -53,26 +53,6 @@ "registration.log" #endif - /*_____________________________________________________________________________________________________________ - LOG_REGISTRATION_WRITEINFO( SINFOTEXT ) - - Write informations for component_writeInfo() in log file. - _____________________________________________________________________________________________________________*/ - - #define LOG_REGISTRATION_WRITEINFO( SINFOTEXT ) \ - { \ - ::rtl::OStringBuffer sOut( 1024 ); \ - sOut.append( "component_writeInfo():" ); \ - sOut.append( SINFOTEXT ); \ - WRITE_LOGFILE( LOGFILE_REGISTRATION, sOut.makeStringAndClear() ) \ - } - - /*_____________________________________________________________________________________________________________ - LOG_REGISTRATION_WRITEINFO( SINFOTEXT ) - - Write informations for component_getFactory() in log file. - _____________________________________________________________________________________________________________*/ - #define LOG_REGISTRATION_GETFACTORY( SINFOTEXT ) \ { \ ::rtl::OStringBuffer sOut( 1024 ); \ @@ -88,7 +68,6 @@ _____________________________________________________________________________________________________________*/ #undef LOGFILE_REGISTRATION - #define LOG_REGISTRATION_WRITEINFO( SINFOTEXT ) #define LOG_REGISTRATION_GETFACTORY( SINFOTEXT ) #endif // #ifdef ENABLE_REGISTRATIONDEBUG diff --git a/framework/inc/macros/registration.hxx b/framework/inc/macros/registration.hxx index 3db6761abc15..11f7c297c645 100644 --- a/framework/inc/macros/registration.hxx +++ b/framework/inc/macros/registration.hxx @@ -37,10 +37,8 @@ //_________________________________________________________________________________________________________________ // interface includes //_________________________________________________________________________________________________________________ -#include #include #include -#include //_________________________________________________________________________________________________________________ // other includes @@ -57,65 +55,12 @@ macros for registration of services Please use follow public macros only! - 1) COMPONENTINFO( CLASS ) => use it as parameter for COMPONENT_WRITEINFO( INFOS ) - 2) IFFACTORY( CLASS ) => use it as parameter for COMPONENT_GETFACTORY( IFFACTORIES ) - 3) COMPONENTGETIMPLEMENTATIONENVIRONMENT => use it to define exported function component_getImplementationEnvironment() - 4) COMPONENTWRITEINFO( INFOS ) => use it to define exported function component_writeInfo() - 5) COMPONENTGETFACTORY( IFFACTORIES ) => use it to define exported function component_getFactory() + IFFACTORY( CLASS ) => use it as parameter for COMPONENT_GETFACTORY( IFFACTORIES ) + COMPONENTGETIMPLEMENTATIONENVIRONMENT => use it to define exported function component_getImplementationEnvironment() + COMPONENTGETFACTORY( IFFACTORIES ) => use it to define exported function component_getFactory() _________________________________________________________________________________________________________________*/ -//***************************************************************************************************************** -// public -// use it as parameter for COMPONENT_WRITEINFO( INFOS ) -//***************************************************************************************************************** - -#define COMPONENTINFO( CLASS ) \ - try \ - { \ - /* Set default result of follow operations !!! */ \ - bReturn = sal_False; \ - /* Do the follow only, if given key is valid ! */ \ - if ( xKey.is() == sal_True ) \ - { \ - LOG_REGISTRATION_WRITEINFO( "\t\t\txKey is valid ...\n" ) \ - /* Build new keyname */ \ - sKeyName = DECLARE_ASCII( "/" ); \ - sKeyName += CLASS::impl_getStaticImplementationName(); \ - sKeyName += DECLARE_ASCII( "/UNO/SERVICES" ); \ - LOG_REGISTRATION_WRITEINFO( "\t\t\tcreate key \"" ) \ - LOG_REGISTRATION_WRITEINFO( U2B( sKeyName ) ) \ - LOG_REGISTRATION_WRITEINFO( "\" ...\n" ) \ - /* Create new key with new name. */ \ - xNewKey = xKey->createKey( sKeyName ); \ - /* If this new key valid ... */ \ - if ( xNewKey.is() == sal_True ) \ - { \ - LOG_REGISTRATION_WRITEINFO( "\t\t\t\ttsuccessful ...\n" ) \ - /* Get information about supported services. */ \ - seqServiceNames = CLASS::impl_getStaticSupportedServiceNames() ; \ - pArray = seqServiceNames.getArray() ; \ - nLength = seqServiceNames.getLength() ; \ - nCounter = 0 ; \ - /* Then set this information on this key. */ \ - for ( nCounter = 0; nCounter < nLength; ++nCounter ) \ - { \ - LOG_REGISTRATION_WRITEINFO( "\t\t\t\twrite key \"" ) \ - LOG_REGISTRATION_WRITEINFO( U2B( pArray[nCounter] ) ) \ - LOG_REGISTRATION_WRITEINFO( "\" to registry ...\n" ) \ - xNewKey->createKey( pArray[nCounter] ); \ - } \ - /* Result of this operations = OK. */ \ - bReturn = sal_True ; \ - } \ - } \ - } \ - catch( ::com::sun::star::registry::InvalidRegistryException& ) \ - { \ - LOG_REGISTRATION_WRITEINFO( "\n\nERROR:\nInvalidRegistryException detected\n\n" ) \ - bReturn = sal_False ; \ - } - //***************************************************************************************************************** // public // use it as parameter for COMPONENT_GETFACTORY( IFFACTORIES ) @@ -142,41 +87,6 @@ ________________________________________________________________________________ *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; \ } -//***************************************************************************************************************** -// public -// define registration of service -//***************************************************************************************************************** -#define COMPONENTWRITEINFO( INFOS ) \ - extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/ , \ - void* pRegistryKey ) \ - { \ - LOG_REGISTRATION_WRITEINFO( "\t[start]\n" ) \ - /* Set default return value for this operation - if it failed. */ \ - sal_Bool bReturn = sal_False ; \ - if ( pRegistryKey != NULL ) \ - { \ - LOG_REGISTRATION_WRITEINFO( "\t\tpRegistryKey is valid ...\n" ) \ - /* Define variables for following helper macros! */ \ - /* bReturn will set automaticly. */ \ - ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > xKey ; \ - ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > xNewKey ; \ - ::com::sun::star::uno::Sequence< ::rtl::OUString > seqServiceNames ; \ - const ::rtl::OUString* pArray ; \ - sal_Int32 nLength ; \ - sal_Int32 nCounter ; \ - ::rtl::OUString sKeyName ; \ - xKey = reinterpret_cast< ::com::sun::star::registry::XRegistryKey* >( pRegistryKey ); \ - /* This parameter will expand to */ \ - /* "COMPONENT_INFO(a) */ \ - /* ... */ \ - /* COMPONENT_INFO(z)" */ \ - INFOS \ - } \ - LOG_REGISTRATION_WRITEINFO( "\t[end]\n" ) \ - /* Return with result of this operation. */ \ - return bReturn ; \ - } - //***************************************************************************************************************** // public // define method to instanciate new services diff --git a/framework/prj/d.lst b/framework/prj/d.lst index 7f260f07cf65..f066b172458b 100644 --- a/framework/prj/d.lst +++ b/framework/prj/d.lst @@ -49,3 +49,6 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\statusbar ..\source\unotypes\fw?.xml %_DEST%\xml%_EXT%\*.xml +..\%__SRC%\misc\fwk.component %_DEST%\xml%_EXT%\fwk.component +..\%__SRC%\misc\fwl.component %_DEST%\xml%_EXT%\fwl.component +..\%__SRC%\misc\fwm.component %_DEST%\xml%_EXT%\fwm.component diff --git a/framework/source/register/register3rdcomponents.cxx b/framework/source/register/register3rdcomponents.cxx index 0d93c775ff7e..86ef8c16d1ea 100644 --- a/framework/source/register/register3rdcomponents.cxx +++ b/framework/source/register/register3rdcomponents.cxx @@ -47,10 +47,6 @@ COMPONENTGETIMPLEMENTATIONENVIRONMENT - COMPONENTWRITEINFO ( COMPONENTINFO( Service1 ) - COMPONENTINFO( Service2 ) - ) - COMPONENTGETFACTORY ( IFFACTORIE( Service1 ) else IFFACTORIE( Service2 ) @@ -63,12 +59,6 @@ COMPONENTGETIMPLEMENTATIONENVIRONMENT -COMPONENTWRITEINFO ( COMPONENTINFO( ::framework::HelpOnStartup ) - COMPONENTINFO( ::framework::TabWinFactory ) - COMPONENTINFO( ::framework::SystemExec ) - COMPONENTINFO( ::framework::ShellJob ) - ) - COMPONENTGETFACTORY ( IFFACTORY( ::framework::HelpOnStartup ) else IFFACTORY( ::framework::TabWinFactory ) else IFFACTORY( ::framework::SystemExec ) else diff --git a/framework/source/register/registerlogindialog.cxx b/framework/source/register/registerlogindialog.cxx index 55e13252570f..0a7e08c8c93a 100644 --- a/framework/source/register/registerlogindialog.cxx +++ b/framework/source/register/registerlogindialog.cxx @@ -48,10 +48,6 @@ COMPONENTGETIMPLEMENTATIONENVIRONMENT - COMPONENTWRITEINFO ( COMPONENTINFO( Service1 ) - COMPONENTINFO( Service2 ) - ) - COMPONENTGETFACTORY ( IFFACTORIE( Service1 ) else IFFACTORIE( Service2 ) @@ -64,8 +60,5 @@ COMPONENTGETIMPLEMENTATIONENVIRONMENT -COMPONENTWRITEINFO ( COMPONENTINFO( ::framework::LoginDialog ) - ) - COMPONENTGETFACTORY ( IFFACTORY( ::framework::LoginDialog ) ) diff --git a/framework/source/register/registerservices.cxx b/framework/source/register/registerservices.cxx index 6e3fa878bbb1..4f078d9ab50d 100644 --- a/framework/source/register/registerservices.cxx +++ b/framework/source/register/registerservices.cxx @@ -47,10 +47,6 @@ COMPONENTGETIMPLEMENTATIONENVIRONMENT - COMPONENTWRITEINFO ( COMPONENTINFO( Service1 ) - COMPONENTINFO( Service2 ) - ) - COMPONENTGETFACTORY ( IFFACTORIE( Service1 ) else IFFACTORIE( Service2 ) @@ -117,66 +113,6 @@ COMPONENTGETIMPLEMENTATIONENVIRONMENT -COMPONENTWRITEINFO ( COMPONENTINFO( ::framework::URLTransformer ) - COMPONENTINFO( ::framework::Desktop ) - COMPONENTINFO( ::framework::Frame ) - //COMPONENTINFO( ::framework::Oxt_Handler ) - COMPONENTINFO( ::framework::JobExecutor ) - //COMPONENTINFO( ::framework::DispatchRecorderSupplier ) - //COMPONENTINFO( ::framework::DispatchRecorder ) - //COMPONENTINFO( ::framework::MailToDispatcher ) - //COMPONENTINFO( ::framework::ServiceHandler ) - COMPONENTINFO( ::framework::JobDispatch ) - COMPONENTINFO( ::framework::BackingComp ) - //COMPONENTINFO( ::framework::DispatchHelper ) - COMPONENTINFO( ::framework::LayoutManager ) - //COMPONENTINFO( ::framework::License ) - COMPONENTINFO( ::framework::UIElementFactoryManager ) - COMPONENTINFO( ::framework::PopupMenuControllerFactory ) - //COMPONENTINFO( ::framework::FontMenuController ) - //COMPONENTINFO( ::framework::FontSizeMenuController ) - COMPONENTINFO( ::framework::ObjectMenuController ) - //COMPONENTINFO( ::framework::HeaderMenuController ) - //COMPONENTINFO( ::framework::FooterMenuController ) - COMPONENTINFO( ::framework::ControlMenuController ) - //COMPONENTINFO( ::framework::MacrosMenuController ) - COMPONENTINFO( ::framework::UICommandDescription ) - COMPONENTINFO( ::framework::ModuleManager ) - COMPONENTINFO( ::framework::UIConfigurationManager ) - COMPONENTINFO( ::framework::ModuleUIConfigurationManagerSupplier ) - COMPONENTINFO( ::framework::ModuleUIConfigurationManager ) - COMPONENTINFO( ::framework::MenuBarFactory ) - COMPONENTINFO( ::framework::GlobalAcceleratorConfiguration ) - COMPONENTINFO( ::framework::ModuleAcceleratorConfiguration ) - COMPONENTINFO( ::framework::DocumentAcceleratorConfiguration ) - COMPONENTINFO( ::framework::ToolBoxFactory ) - COMPONENTINFO( ::framework::AddonsToolBoxFactory ) - COMPONENTINFO( ::framework::WindowStateConfiguration ) - COMPONENTINFO( ::framework::ToolbarControllerFactory ) - //COMPONENTINFO( ::framework::ToolbarsMenuController ) - COMPONENTINFO( ::framework::AutoRecovery ) - COMPONENTINFO( ::framework::StatusIndicatorFactory ) - COMPONENTINFO( ::framework::RecentFilesMenuController ) - COMPONENTINFO( ::framework::StatusBarFactory ) - COMPONENTINFO( ::framework::UICategoryDescription ) - COMPONENTINFO( ::framework::StatusbarControllerFactory ) - COMPONENTINFO( ::framework::SessionListener ) - //COMPONENTINFO( ::framework::LogoImageStatusbarController ) - //COMPONENTINFO( ::framework::LogoTextStatusbarController ) - //COMPONENTINFO( ::framework::NewMenuController ) - COMPONENTINFO( ::framework::TaskCreatorService ) - //COMPONENTINFO( ::framework::SimpleTextStatusbarController ) - //COMPONENTINFO( ::framework::UriAbbreviation ) - //COMPONENTINFO( ::framework::PopupMenuDispatcher ) - COMPONENTINFO( ::framework::ImageManager ) - COMPONENTINFO( ::framework::LangSelectionStatusbarController ) - //COMPONENTINFO( ::framework::LanguageSelectionMenuController ) - //COMPONENTINFO( ::framework::TabWindowService ) - COMPONENTINFO( ::framework::WindowContentFactoryManager ) - COMPONENTINFO( ::framework::SubstitutePathVariables ) - COMPONENTINFO( ::framework::PathSettings ) - ) - COMPONENTGETFACTORY ( IFFACTORY( ::framework::URLTransformer ) else IFFACTORY( ::framework::Desktop ) else IFFACTORY( ::framework::Frame ) else diff --git a/framework/source/register/registertemp.cxx b/framework/source/register/registertemp.cxx index 7382380ef525..111b3550559d 100644 --- a/framework/source/register/registertemp.cxx +++ b/framework/source/register/registertemp.cxx @@ -47,10 +47,6 @@ COMPONENTGETIMPLEMENTATIONENVIRONMENT - COMPONENTWRITEINFO ( COMPONENTINFO( Service1 ) - COMPONENTINFO( Service2 ) - ) - COMPONENTGETFACTORY ( IFFACTORIE( Service1 ) else IFFACTORIE( Service2 ) @@ -82,31 +78,6 @@ COMPONENTGETIMPLEMENTATIONENVIRONMENT -COMPONENTWRITEINFO ( COMPONENTINFO( ::framework::MediaTypeDetectionHelper ) - COMPONENTINFO( ::framework::MailToDispatcher ) - COMPONENTINFO( ::framework::NewMenuController ) - COMPONENTINFO( ::framework::ToolbarsMenuController ) - COMPONENTINFO( ::framework::MacrosMenuController ) - COMPONENTINFO( ::framework::FontSizeMenuController ) - COMPONENTINFO( ::framework::HeaderMenuController ) - COMPONENTINFO( ::framework::FooterMenuController ) - COMPONENTINFO( ::framework::FontMenuController ) - COMPONENTINFO( ::framework::ServiceHandler ) - COMPONENTINFO( ::framework::LogoImageStatusbarController ) - COMPONENTINFO( ::framework::LogoTextStatusbarController ) - COMPONENTINFO( ::framework::SimpleTextStatusbarController ) - COMPONENTINFO( ::framework::UriAbbreviation ) - COMPONENTINFO( ::framework::LanguageSelectionMenuController ) - COMPONENTINFO( ::framework::PopupMenuDispatcher ) - COMPONENTINFO( ::framework::DispatchHelper ) - COMPONENTINFO( ::framework::TabWindowService ) - COMPONENTINFO( ::framework::DispatchRecorder ) - COMPONENTINFO( ::framework::DispatchRecorderSupplier ) - COMPONENTINFO( ::framework::Oxt_Handler ) - COMPONENTINFO( ::framework::License ) - COMPONENTINFO( ::framework::PopupMenuController ) - ) - COMPONENTGETFACTORY ( IFFACTORY( ::framework::MediaTypeDetectionHelper ) IFFACTORY( ::framework::MailToDispatcher ) else IFFACTORY( ::framework::ServiceHandler ) else diff --git a/framework/util/fwk.component b/framework/util/fwk.component new file mode 100644 index 000000000000..e6ceb91e8090 --- /dev/null +++ b/framework/util/fwk.component @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/util/fwl.component b/framework/util/fwl.component new file mode 100644 index 000000000000..aa124d1cdc4b --- /dev/null +++ b/framework/util/fwl.component @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/util/fwm.component b/framework/util/fwm.component new file mode 100644 index 000000000000..624249ff4382 --- /dev/null +++ b/framework/util/fwm.component @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + diff --git a/framework/util/makefile.mk b/framework/util/makefile.mk index 91532cda76e2..a66643994f64 100644 --- a/framework/util/makefile.mk +++ b/framework/util/makefile.mk @@ -423,3 +423,23 @@ $(MISC)$/$(SHL2TARGET).flt: makefile.mk @echo _TI2>>$@ @echo LIBMAIN>>$@ @echo LibMain>>$@ + +ALLTAR : $(MISC)/fwk.component $(MISC)/fwl.component $(MISC)/fwm.component + +$(MISC)/fwk.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + fwk.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL4TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt fwk.component + +$(MISC)/fwl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + fwl.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL3TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt fwl.component + +$(MISC)/fwm.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + fwm.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL5TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt fwm.component -- cgit