diff options
Diffstat (limited to 'unotools/source/config/dynamicmenuoptions.cxx')
-rw-r--r-- | unotools/source/config/dynamicmenuoptions.cxx | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/unotools/source/config/dynamicmenuoptions.cxx b/unotools/source/config/dynamicmenuoptions.cxx index c0cbe066b365..74a3a48b9db2 100644 --- a/unotools/source/config/dynamicmenuoptions.cxx +++ b/unotools/source/config/dynamicmenuoptions.cxx @@ -224,7 +224,7 @@ class SvtDynamicMenuOptions_Impl : public ConfigItem SvtDynamicMenuOptions_Impl(); ~SvtDynamicMenuOptions_Impl(); - /*-****************************************************************************************************//** + /*-**************************************************************************************************** @short called for notify of configmanager @descr These method is called from the ConfigManager before application ends or from the PropertyChangeListener if the sub tree broadcasts changes. You must update your @@ -240,7 +240,7 @@ class SvtDynamicMenuOptions_Impl : public ConfigItem virtual void Notify( const Sequence< OUString >& lPropertyNames ); - /*-****************************************************************************************************//** + /*-**************************************************************************************************** @short write changes to configuration @descr These method writes the changed values into the sub tree and should always called in our destructor to guarantee consistency of config data. @@ -255,7 +255,7 @@ class SvtDynamicMenuOptions_Impl : public ConfigItem virtual void Commit(); - /*-****************************************************************************************************//** + /*-**************************************************************************************************** @short base implementation of public interface for "SvtDynamicMenuOptions"! @descr These class is used as static member of "SvtDynamicMenuOptions" ... => The code exist only for one time and isn't duplicated for every instance! @@ -272,7 +272,7 @@ class SvtDynamicMenuOptions_Impl : public ConfigItem private: - /*-****************************************************************************************************//** + /*-**************************************************************************************************** @short return list of key names of our configuration management which represent oue module tree @descr These methods return the current list of key names! We need it to get needed values from our configuration management and support dynamical menu item lists! @@ -288,7 +288,7 @@ class SvtDynamicMenuOptions_Impl : public ConfigItem Sequence< OUString > impl_GetPropertyNames( sal_uInt32& nNewCount, sal_uInt32& nWizardCount, sal_uInt32& nHelpBookmarksCount ); - /*-****************************************************************************************************//** + /*-**************************************************************************************************** @short sort given source list and expand it for all well known properties to destination @descr We must support sets of entries with count inside the name .. but some of them could be missing! e.g. s1-s2-s3-s0-u1-s6-u5-u7 @@ -342,9 +342,9 @@ class SvtDynamicMenuOptions_Impl : public ConfigItem SvtDynMenu m_aHelpBookmarksMenu ; }; -//***************************************************************************************************************** + // constructor -//***************************************************************************************************************** + SvtDynamicMenuOptions_Impl::SvtDynamicMenuOptions_Impl() // Init baseclasses first : ConfigItem( ROOTNODE_MENUS ) @@ -367,25 +367,25 @@ SvtDynamicMenuOptions_Impl::SvtDynamicMenuOptions_Impl() // Copy values from list in right order to ouer internal member. // Attention: List for names and values have an internal construction pattern! - // + // first "New" menu ... // Name Value // /New/1/URL "private:factory/swriter" // /New/1/Title "Neues Writer Dokument" // /New/1/ImageIdentifier "icon_writer" // /New/1/TargetName "_blank" - // + // /New/2/URL "private:factory/scalc" // /New/2/Title "Neues Calc Dokument" // /New/2/ImageIdentifier "icon_calc" // /New/2/TargetName "_blank" - // + // second "Wizard" menu ... // /Wizard/1/URL "file://b" // /Wizard/1/Title "MalWas" // /Wizard/1/ImageIdentifier "icon_?" // /Wizard/1/TargetName "_self" - // + // ... and so on ... sal_uInt32 nItem = 0 ; @@ -450,9 +450,9 @@ SvtDynamicMenuOptions_Impl::SvtDynamicMenuOptions_Impl() */ } -//***************************************************************************************************************** + // destructor -//***************************************************************************************************************** + SvtDynamicMenuOptions_Impl::~SvtDynamicMenuOptions_Impl() { // We must save our current values .. if user forget it! @@ -462,17 +462,17 @@ SvtDynamicMenuOptions_Impl::~SvtDynamicMenuOptions_Impl() } } -//***************************************************************************************************************** + // public method -//***************************************************************************************************************** + void SvtDynamicMenuOptions_Impl::Notify( const Sequence< OUString >& ) { DBG_ASSERT( false, "SvtDynamicMenuOptions_Impl::Notify()\nNot implemented yet! I don't know how I can handle a dynamical list of unknown properties ...\n" ); } -//***************************************************************************************************************** + // public method -//***************************************************************************************************************** + void SvtDynamicMenuOptions_Impl::Commit() { OSL_FAIL( "SvtDynamicMenuOptions_Impl::Commit()\nNot implemented yet!\n" ); @@ -559,9 +559,9 @@ void SvtDynamicMenuOptions_Impl::Commit() */ } -//***************************************************************************************************************** + // public method -//***************************************************************************************************************** + Sequence< Sequence< PropertyValue > > SvtDynamicMenuOptions_Impl::GetMenu( EDynamicMenuType eMenu ) const { Sequence< Sequence< PropertyValue > > lReturn; @@ -585,9 +585,9 @@ Sequence< Sequence< PropertyValue > > SvtDynamicMenuOptions_Impl::GetMenu( EDyna return lReturn; } -//***************************************************************************************************************** + // private method -//***************************************************************************************************************** + Sequence< OUString > SvtDynamicMenuOptions_Impl::impl_GetPropertyNames( sal_uInt32& nNewCount, sal_uInt32& nWizardCount, sal_uInt32& nHelpBookmarksCount ) { // First get ALL names of current existing list items in configuration! @@ -610,9 +610,9 @@ Sequence< OUString > SvtDynamicMenuOptions_Impl::impl_GetPropertyNames( sal_uInt return lProperties; } -//***************************************************************************************************************** + // private helper -//***************************************************************************************************************** + class CountWithPrefixSort { public: @@ -640,9 +640,9 @@ class SelectByPrefix } }; -//***************************************************************************************************************** + // private method -//***************************************************************************************************************** + void SvtDynamicMenuOptions_Impl::impl_SortAndExpandPropertyNames( const Sequence< OUString >& lSource , Sequence< OUString >& lDestination , const OUString& sSetNode ) @@ -689,17 +689,17 @@ void SvtDynamicMenuOptions_Impl::impl_SortAndExpandPropertyNames( const Sequence } } -//***************************************************************************************************************** + // initialize static member // DON'T DO IT IN YOUR HEADER! // see definition for further information -//***************************************************************************************************************** + SvtDynamicMenuOptions_Impl* SvtDynamicMenuOptions::m_pDataContainer = NULL ; sal_Int32 SvtDynamicMenuOptions::m_nRefCount = 0 ; -//***************************************************************************************************************** + // constructor -//***************************************************************************************************************** + SvtDynamicMenuOptions::SvtDynamicMenuOptions() { // Global access, must be guarded (multithreading!). @@ -714,9 +714,9 @@ SvtDynamicMenuOptions::SvtDynamicMenuOptions() } } -//***************************************************************************************************************** + // destructor -//***************************************************************************************************************** + SvtDynamicMenuOptions::~SvtDynamicMenuOptions() { // Global access, must be guarded (multithreading!) @@ -732,9 +732,9 @@ SvtDynamicMenuOptions::~SvtDynamicMenuOptions() } } -//***************************************************************************************************************** + // public method -//***************************************************************************************************************** + Sequence< Sequence< PropertyValue > > SvtDynamicMenuOptions::GetMenu( EDynamicMenuType eMenu ) const { MutexGuard aGuard( GetOwnStaticMutex() ); @@ -746,9 +746,9 @@ namespace class theDynamicMenuOptionsMutex : public rtl::Static<osl::Mutex, theDynamicMenuOptionsMutex>{}; } -//***************************************************************************************************************** + // private method -//***************************************************************************************************************** + Mutex& SvtDynamicMenuOptions::GetOwnStaticMutex() { return theDynamicMenuOptionsMutex::get(); |