framework/inc/classes/actiontriggerpropertyset.hxx | 2 - framework/inc/classes/actiontriggerseparatorpropertyset.hxx | 2 - framework/inc/helper/uiconfigelementwrapperbase.hxx | 2 - framework/inc/helper/uielementwrapperbase.hxx | 2 - framework/inc/jobs/jobconst.hxx | 6 +-- framework/inc/tabwin/tabwindow.hxx | 2 - framework/inc/uielement/constitemcontainer.hxx | 2 - framework/inc/uielement/rootitemcontainer.hxx | 2 - framework/source/fwe/classes/actiontriggerpropertyset.cxx | 10 +---- framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx | 10 +---- framework/source/fwe/classes/addonsoptions.cxx | 12 +++---- framework/source/fwi/jobs/jobconst.cxx | 17 ++-------- framework/source/fwi/uielement/constitemcontainer.cxx | 9 +---- framework/source/fwi/uielement/rootitemcontainer.cxx | 9 +---- framework/source/helper/uiconfigelementwrapperbase.cxx | 10 +---- framework/source/helper/uielementwrapperbase.cxx | 9 +---- framework/source/jobs/jobresult.cxx | 6 +-- framework/source/jobs/shelljob.cxx | 2 - framework/source/services/autorecovery.cxx | 6 +-- framework/source/tabwin/tabwindow.cxx | 10 +---- include/framework/addonsoptions.hxx | 4 +- include/svtools/langtab.hxx | 2 - svtools/source/misc/langtab.cxx | 6 +-- 23 files changed, 48 insertions(+), 94 deletions(-)
New commits: commit d53144e9d185b7b0b41d887c689c13bf27cd9906 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sat Aug 24 09:23:13 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Aug 24 14:25:55 2019 +0200 loplugin:returnconstval in svtools Change-Id: I2d1d9e0ed8e109ed0be4d7fb78d93790ae41177f Reviewed-on: https://gerrit.libreoffice.org/78052 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/svtools/langtab.hxx b/include/svtools/langtab.hxx index a53e928c9998..9038fb24d421 100644 --- a/include/svtools/langtab.hxx +++ b/include/svtools/langtab.hxx @@ -42,7 +42,7 @@ public: // Add LRE or RLE embedding characters to the string based on the // String content (see #i78466#, #i32179#) -SVT_DLLPUBLIC const OUString ApplyLreOrRleEmbedding( const OUString &rText ); +SVT_DLLPUBLIC OUString ApplyLreOrRleEmbedding( const OUString &rText ); #endif diff --git a/svtools/source/misc/langtab.cxx b/svtools/source/misc/langtab.cxx index c10561f8f87c..1e04933cd377 100644 --- a/svtools/source/misc/langtab.cxx +++ b/svtools/source/misc/langtab.cxx @@ -47,7 +47,7 @@ public: SvtLanguageTableImpl(); bool HasType( const LanguageType eType ) const; - const OUString GetString( const LanguageType eType ) const; + OUString GetString( const LanguageType eType ) const; LanguageType GetType( const OUString& rStr ) const; sal_uInt32 GetEntryCount() const; LanguageType GetTypeAtIndex( sal_uInt32 nIndex ) const; @@ -76,7 +76,7 @@ namespace { struct theLanguageTable : public rtl::Static< SvtLanguageTableImpl, theLanguageTable > {}; } -const OUString ApplyLreOrRleEmbedding( const OUString &rText ) +OUString ApplyLreOrRleEmbedding( const OUString &rText ) { const sal_Int32 nLen = rText.getLength(); if (nLen == 0) @@ -207,7 +207,7 @@ bool SvtLanguageTable::HasLanguageType( const LanguageType eType ) return theLanguageTable::get().HasType( eType ); } -const OUString SvtLanguageTableImpl::GetString( const LanguageType eType ) const +OUString SvtLanguageTableImpl::GetString( const LanguageType eType ) const { LanguageType eLang = MsLangId::getReplacementForObsoleteLanguage( eType ); sal_uInt32 nPos = FindIndex(eLang); commit d4f9f4b2d57c4f51c026fd114934dd63f4ece13e Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sat Aug 24 09:22:40 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Aug 24 14:25:42 2019 +0200 loplugin:returnconstval in framework Change-Id: Id3daf68e2daac3ce11117686fdc00831ce1e3a69 Reviewed-on: https://gerrit.libreoffice.org/78051 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/framework/inc/classes/actiontriggerpropertyset.hxx b/framework/inc/classes/actiontriggerpropertyset.hxx index 15cacb23e7cc..19a2a5e0dfd3 100644 --- a/framework/inc/classes/actiontriggerpropertyset.hxx +++ b/framework/inc/classes/actiontriggerpropertyset.hxx @@ -80,7 +80,7 @@ class ActionTriggerPropertySet : private cppu::BaseMutex, virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override; - static const css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor(); + static css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor(); // helper diff --git a/framework/inc/classes/actiontriggerseparatorpropertyset.hxx b/framework/inc/classes/actiontriggerseparatorpropertyset.hxx index 6bd6e9168655..33bd3c76083c 100644 --- a/framework/inc/classes/actiontriggerseparatorpropertyset.hxx +++ b/framework/inc/classes/actiontriggerseparatorpropertyset.hxx @@ -78,7 +78,7 @@ class ActionTriggerSeparatorPropertySet : private cppu::BaseMutex, virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override; - static const css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor(); + static css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor(); // helper diff --git a/framework/inc/helper/uiconfigelementwrapperbase.hxx b/framework/inc/helper/uiconfigelementwrapperbase.hxx index 4ba468197986..67d971bfb687 100644 --- a/framework/inc/helper/uiconfigelementwrapperbase.hxx +++ b/framework/inc/helper/uiconfigelementwrapperbase.hxx @@ -119,7 +119,7 @@ class UIConfigElementWrapperBase : private cppu::BaseMutex, virtual void impl_fillNewData(); - static const css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor(); + static css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor(); sal_Int16 m_nType; bool m_bPersistent : 1, diff --git a/framework/inc/helper/uielementwrapperbase.hxx b/framework/inc/helper/uielementwrapperbase.hxx index 7119c08e1f46..11c30680f67e 100644 --- a/framework/inc/helper/uielementwrapperbase.hxx +++ b/framework/inc/helper/uielementwrapperbase.hxx @@ -97,7 +97,7 @@ class UIElementWrapperBase : private cppu::BaseMutex, virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override; virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override; - static const css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor(); + static css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor(); ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener OUString m_aResourceURL; diff --git a/framework/inc/jobs/jobconst.hxx b/framework/inc/jobs/jobconst.hxx index 1b80c416426d..e66e7e55919b 100644 --- a/framework/inc/jobs/jobconst.hxx +++ b/framework/inc/jobs/jobconst.hxx @@ -39,9 +39,9 @@ namespace framework{ class FWI_DLLPUBLIC JobConst { public: - static const OUString ANSWER_DEACTIVATE_JOB(); - static const OUString ANSWER_SAVE_ARGUMENTS(); - static const OUString ANSWER_SEND_DISPATCHRESULT(); + static const OUString ANSWER_DEACTIVATE_JOB; + static const OUString ANSWER_SAVE_ARGUMENTS; + static const OUString ANSWER_SEND_DISPATCHRESULT; }; } // namespace framework diff --git a/framework/inc/tabwin/tabwindow.hxx b/framework/inc/tabwin/tabwindow.hxx index 7d1fa6e8a8fa..fb370b2bcf19 100644 --- a/framework/inc/tabwin/tabwindow.hxx +++ b/framework/inc/tabwin/tabwindow.hxx @@ -124,7 +124,7 @@ class TabWindow final : public css::lang::XTypeProvider , virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override; virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override; - static const css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor(); + static css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor(); enum Notification { diff --git a/framework/inc/uielement/constitemcontainer.hxx b/framework/inc/uielement/constitemcontainer.hxx index 9ed27693829d..1778f71d1b81 100644 --- a/framework/inc/uielement/constitemcontainer.hxx +++ b/framework/inc/uielement/constitemcontainer.hxx @@ -87,7 +87,7 @@ class FWI_DLLPUBLIC ConstItemContainer : public ::cppu::WeakImplHelper< private: ::cppu::IPropertyArrayHelper& getInfoHelper(); - const css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor(); + css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor(); void copyItemContainer( const std::vector< css::uno::Sequence< css::beans::PropertyValue > >& rSourceVector ); css::uno::Reference< css::container::XIndexAccess > deepCopyContainer( const css::uno::Reference< css::container::XIndexAccess >& rSubContainer ); diff --git a/framework/inc/uielement/rootitemcontainer.hxx b/framework/inc/uielement/rootitemcontainer.hxx index b72591c2321c..ce0aa4a426ec 100644 --- a/framework/inc/uielement/rootitemcontainer.hxx +++ b/framework/inc/uielement/rootitemcontainer.hxx @@ -112,7 +112,7 @@ class RootItemContainer final : private cppu::BaseMutex, virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override; virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override; - static const css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor(); + static css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor(); RootItemContainer& operator=( const RootItemContainer& ) = delete; RootItemContainer( const RootItemContainer& ) = delete; diff --git a/framework/source/fwe/classes/actiontriggerpropertyset.cxx b/framework/source/fwe/classes/actiontriggerpropertyset.cxx index d0215c37e1f8..66cc5dd14bdc 100644 --- a/framework/source/fwe/classes/actiontriggerpropertyset.cxx +++ b/framework/source/fwe/classes/actiontriggerpropertyset.cxx @@ -249,9 +249,9 @@ Reference< XPropertySetInfo > SAL_CALL ActionTriggerPropertySet::getPropertySetI return xInfo; } -const Sequence< Property > ActionTriggerPropertySet::impl_getStaticPropertyDescriptor() +Sequence< Property > ActionTriggerPropertySet::impl_getStaticPropertyDescriptor() { - const Property pActionTriggerPropertys[] = + return { Property( "CommandURL" , HANDLE_COMMANDURL , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT ), Property( "HelpURL" , HANDLE_HELPURL , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT ), @@ -259,12 +259,6 @@ const Sequence< Property > ActionTriggerPropertySet::impl_getStaticPropertyDescr Property( "SubContainer" , HANDLE_SUBCONTAINER , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT ), Property( "Text" , HANDLE_TEXT , cppu::UnoType<XInterface>::get(), PropertyAttribute::TRANSIENT ) }; - - // Use it to initialize sequence! - const Sequence< Property > seqActionTriggerPropertyDescriptor( pActionTriggerPropertys, PROPERTYCOUNT ); - - // Return "PropertyDescriptor" - return seqActionTriggerPropertyDescriptor; } bool ActionTriggerPropertySet::impl_tryToChangeProperty( diff --git a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx index fd24370f6893..aa8397a657aa 100644 --- a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx +++ b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx @@ -195,18 +195,12 @@ Reference< XPropertySetInfo > SAL_CALL ActionTriggerSeparatorPropertySet::getPro return xInfo; } -const Sequence< Property > ActionTriggerSeparatorPropertySet::impl_getStaticPropertyDescriptor() +Sequence< Property > ActionTriggerSeparatorPropertySet::impl_getStaticPropertyDescriptor() { - const Property pActionTriggerPropertys[] = + return { Property( "SeparatorType", HANDLE_TYPE, cppu::UnoType<sal_Int16>::get(), PropertyAttribute::TRANSIENT ) }; - - // Use it to initialize sequence! - const Sequence< Property > seqActionTriggerPropertyDescriptor( pActionTriggerPropertys, PROPERTYCOUNT ); - - // Return "PropertyDescriptor" - return seqActionTriggerPropertyDescriptor; } bool ActionTriggerSeparatorPropertySet::impl_tryToChangeProperty( diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx index d0e5ece16c7f..4f33a0c8b76b 100644 --- a/framework/source/fwe/classes/addonsoptions.cxx +++ b/framework/source/fwe/classes/addonsoptions.cxx @@ -223,8 +223,8 @@ class AddonsOptions_Impl : public ConfigItem const Sequence< Sequence< PropertyValue > >& GetAddonsMenuBarPart () const { return m_aCachedMenuBarPartProperties;} const Sequence< Sequence< PropertyValue > >& GetAddonsToolBarPart ( sal_uInt32 nIndex ) const; const Sequence< Sequence< PropertyValue > >& GetAddonsNotebookBarPart ( sal_uInt32 nIndex ) const; - const OUString GetAddonsToolbarResourceName( sal_uInt32 nIndex ) const; - const OUString GetAddonsNotebookBarResourceName( sal_uInt32 nIndex ) const; + OUString GetAddonsToolbarResourceName( sal_uInt32 nIndex ) const; + OUString GetAddonsNotebookBarResourceName( sal_uInt32 nIndex ) const; const Sequence< Sequence< PropertyValue > >& GetAddonsHelpMenu () const { return m_aCachedHelpMenuProperties;} Image GetImageFromURL( const OUString& aURL, bool bBig, bool bNoScale ); const MergeMenuInstructionContainer& GetMergeMenuInstructions() const { return m_aCachedMergeMenuInsContainer;} @@ -524,7 +524,7 @@ const Sequence< Sequence< PropertyValue > >& AddonsOptions_Impl::GetAddonsNotebo // public method -const OUString AddonsOptions_Impl::GetAddonsToolbarResourceName( sal_uInt32 nIndex ) const +OUString AddonsOptions_Impl::GetAddonsToolbarResourceName( sal_uInt32 nIndex ) const { if ( nIndex < m_aCachedToolBarPartResourceNames.size() ) return m_aCachedToolBarPartResourceNames[nIndex]; @@ -534,7 +534,7 @@ const OUString AddonsOptions_Impl::GetAddonsToolbarResourceName( sal_uInt32 nInd // public method -const OUString AddonsOptions_Impl::GetAddonsNotebookBarResourceName( sal_uInt32 nIndex ) const +OUString AddonsOptions_Impl::GetAddonsNotebookBarResourceName( sal_uInt32 nIndex ) const { if ( nIndex < m_aCachedNotebookBarPartResourceNames.size() ) return m_aCachedNotebookBarPartResourceNames[nIndex]; @@ -1869,7 +1869,7 @@ const Sequence< Sequence< PropertyValue > >& AddonsOptions::GetAddonsNotebookBar // public method -const OUString AddonsOptions::GetAddonsToolbarResourceName( sal_uInt32 nIndex ) const +OUString AddonsOptions::GetAddonsToolbarResourceName( sal_uInt32 nIndex ) const { MutexGuard aGuard( GetOwnStaticMutex() ); return m_pImpl->GetAddonsToolbarResourceName( nIndex ); @@ -1877,7 +1877,7 @@ const OUString AddonsOptions::GetAddonsToolbarResourceName( sal_uInt32 nIndex ) // public method -const OUString AddonsOptions::GetAddonsNotebookBarResourceName( sal_uInt32 nIndex ) const +OUString AddonsOptions::GetAddonsNotebookBarResourceName( sal_uInt32 nIndex ) const { MutexGuard aGuard( GetOwnStaticMutex() ); return m_pImpl->GetAddonsNotebookBarResourceName( nIndex ); diff --git a/framework/source/fwi/jobs/jobconst.cxx b/framework/source/fwi/jobs/jobconst.cxx index 1d84ce134124..d19c6db66910 100644 --- a/framework/source/fwi/jobs/jobconst.cxx +++ b/framework/source/fwi/jobs/jobconst.cxx @@ -19,22 +19,13 @@ #include <jobs/jobconst.hxx> -namespace framework{ +namespace framework { -const OUString JobConst::ANSWER_DEACTIVATE_JOB() -{ - return "Deactivate"; -} +const OUString JobConst::ANSWER_DEACTIVATE_JOB = "Deactivate"; -const OUString JobConst::ANSWER_SAVE_ARGUMENTS() -{ - return "SaveArguments"; -} +const OUString JobConst::ANSWER_SAVE_ARGUMENTS = "SaveArguments"; -const OUString JobConst::ANSWER_SEND_DISPATCHRESULT() -{ - return "SendDispatchResult"; -} +const OUString JobConst::ANSWER_SEND_DISPATCHRESULT = "SendDispatchResult"; } // namespace framework diff --git a/framework/source/fwi/uielement/constitemcontainer.cxx b/framework/source/fwi/uielement/constitemcontainer.cxx index 75121b08ccb8..f33a4085a06e 100644 --- a/framework/source/fwi/uielement/constitemcontainer.cxx +++ b/framework/source/fwi/uielement/constitemcontainer.cxx @@ -37,7 +37,6 @@ using namespace com::sun::star::beans; using namespace com::sun::star::container; const int PROPHANDLE_UINAME = 1; -const int PROPCOUNT = 1; const char PROPNAME_UINAME[] = "UIName"; namespace framework @@ -266,7 +265,7 @@ Any SAL_CALL ConstItemContainer::getFastPropertyValue( sal_Int32 nHandle ) return ourInfoHelper; } -const css::uno::Sequence< css::beans::Property > ConstItemContainer::impl_getStaticPropertyDescriptor() +css::uno::Sequence< css::beans::Property > ConstItemContainer::impl_getStaticPropertyDescriptor() { // Create a property array to initialize sequence! // Table of all predefined properties of this class. It's used from OPropertySetHelper-class! @@ -275,16 +274,12 @@ const css::uno::Sequence< css::beans::Property > ConstItemContainer::impl_getSta // ATTENTION: // YOU MUST SORT FOLLOW TABLE BY NAME ALPHABETICAL !!! - const css::beans::Property pProperties[] = + return { css::beans::Property( PROPNAME_UINAME, PROPHANDLE_UINAME , cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ) }; - // Use it to initialize sequence! - const css::uno::Sequence< css::beans::Property > lPropertyDescriptor( pProperties, PROPCOUNT ); - // Return "PropertyDescriptor" - return lPropertyDescriptor; } } // namespace framework diff --git a/framework/source/fwi/uielement/rootitemcontainer.cxx b/framework/source/fwi/uielement/rootitemcontainer.cxx index c5110e9be327..4571b3b61603 100644 --- a/framework/source/fwi/uielement/rootitemcontainer.cxx +++ b/framework/source/fwi/uielement/rootitemcontainer.cxx @@ -39,7 +39,6 @@ using namespace com::sun::star::container; const char WRONG_TYPE_EXCEPTION[] = "Type must be css::uno::Sequence< css::beans::PropertyValue >"; const int PROPHANDLE_UINAME = 1; -const int PROPCOUNT = 1; const char PROPNAME_UINAME[] = "UIName"; namespace framework @@ -306,7 +305,7 @@ css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL RootItemContainer:: return xInfo; } -const css::uno::Sequence< css::beans::Property > RootItemContainer::impl_getStaticPropertyDescriptor() +css::uno::Sequence< css::beans::Property > RootItemContainer::impl_getStaticPropertyDescriptor() { // Create a property array to initialize sequence! // Table of all predefined properties of this class. It's used from OPropertySetHelper-class! @@ -315,16 +314,12 @@ const css::uno::Sequence< css::beans::Property > RootItemContainer::impl_getStat // ATTENTION: // YOU MUST SORT FOLLOW TABLE BY NAME ALPHABETICAL !!! - const css::beans::Property pProperties[] = + return { css::beans::Property( PROPNAME_UINAME, PROPHANDLE_UINAME , cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::TRANSIENT ) }; - // Use it to initialize sequence! - const css::uno::Sequence< css::beans::Property > lPropertyDescriptor( pProperties, PROPCOUNT ); - // Return "PropertyDescriptor" - return lPropertyDescriptor; } } // namespace framework diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx index c6215c863baf..f68d4228f828 100644 --- a/framework/source/helper/uiconfigelementwrapperbase.cxx +++ b/framework/source/helper/uiconfigelementwrapperbase.cxx @@ -39,7 +39,6 @@ const int UIELEMENT_PROPHANDLE_TYPE = 5; const int UIELEMENT_PROPHANDLE_XMENUBAR = 6; const int UIELEMENT_PROPHANDLE_CONFIGLISTENER = 7; const int UIELEMENT_PROPHANDLE_NOCLOSE = 8; -const int UIELEMENT_PROPCOUNT = 8; const char UIELEMENT_PROPNAME_CONFIGLISTENER[] = "ConfigListener"; const char UIELEMENT_PROPNAME_CONFIGSOURCE[] = "ConfigurationSource"; const char UIELEMENT_PROPNAME_FRAME[] = "Frame"; @@ -390,7 +389,7 @@ css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL UIConfigElementWrap return xInfo; } -const css::uno::Sequence< css::beans::Property > UIConfigElementWrapperBase::impl_getStaticPropertyDescriptor() +css::uno::Sequence< css::beans::Property > UIConfigElementWrapperBase::impl_getStaticPropertyDescriptor() { // Create property array to initialize sequence! // Table of all predefined properties of this class. It's used from OPropertySetHelper-class! @@ -399,7 +398,7 @@ const css::uno::Sequence< css::beans::Property > UIConfigElementWrapperBase::imp // ATTENTION: // YOU MUST SORT FOLLOW TABLE BY NAME ALPHABETICAL !!! - const css::beans::Property pProperties[] = + return { css::beans::Property( UIELEMENT_PROPNAME_CONFIGLISTENER, UIELEMENT_PROPHANDLE_CONFIGLISTENER , cppu::UnoType<sal_Bool>::get(), css::beans::PropertyAttribute::TRANSIENT ), css::beans::Property( UIELEMENT_PROPNAME_CONFIGSOURCE, UIELEMENT_PROPHANDLE_CONFIGSOURCE , cppu::UnoType<css::ui::XUIConfigurationManager>::get(), css::beans::PropertyAttribute::TRANSIENT ), @@ -410,11 +409,8 @@ const css::uno::Sequence< css::beans::Property > UIConfigElementWrapperBase::imp css::beans::Property( UIELEMENT_PROPNAME_TYPE, UIELEMENT_PROPHANDLE_TYPE , cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ), css::beans::Property( UIELEMENT_PROPNAME_XMENUBAR, UIELEMENT_PROPHANDLE_XMENUBAR , cppu::UnoType<css::awt::XMenuBar>::get(), css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ) }; - // Use it to initialize sequence! - const css::uno::Sequence< css::beans::Property > lPropertyDescriptor( pProperties, UIELEMENT_PROPCOUNT ); - // Return "PropertyDescriptor" - return lPropertyDescriptor; } + void SAL_CALL UIConfigElementWrapperBase::setSettings( const Reference< XIndexAccess >& xSettings ) { SolarMutexClearableGuard aLock; diff --git a/framework/source/helper/uielementwrapperbase.cxx b/framework/source/helper/uielementwrapperbase.cxx index f83b29cb943f..5eea7c8a6125 100644 --- a/framework/source/helper/uielementwrapperbase.cxx +++ b/framework/source/helper/uielementwrapperbase.cxx @@ -31,7 +31,6 @@ const int UIELEMENT_PROPHANDLE_RESOURCEURL = 1; const int UIELEMENT_PROPHANDLE_TYPE = 2; const int UIELEMENT_PROPHANDLE_FRAME = 3; -const int UIELEMENT_PROPCOUNT = 3; const char UIELEMENT_PROPNAME_RESOURCEURL[] = "ResourceURL"; const char UIELEMENT_PROPNAME_TYPE[] = "Type"; const char UIELEMENT_PROPNAME_FRAME[] = "Frame"; @@ -185,7 +184,7 @@ css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL UIElementWrapperBas return xInfo; } -const css::uno::Sequence< css::beans::Property > UIElementWrapperBase::impl_getStaticPropertyDescriptor() +css::uno::Sequence< css::beans::Property > UIElementWrapperBase::impl_getStaticPropertyDescriptor() { // Create a property array to initialize sequence! // Table of all predefined properties of this class. It's used from OPropertySetHelper-class! @@ -194,16 +193,12 @@ const css::uno::Sequence< css::beans::Property > UIElementWrapperBase::impl_getS // ATTENTION: // YOU MUST SORT FOLLOW TABLE BY NAME ALPHABETICAL !!! - const css::beans::Property pProperties[] = + return { css::beans::Property( UIELEMENT_PROPNAME_FRAME, UIELEMENT_PROPHANDLE_FRAME , cppu::UnoType<XFrame>::get(), css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ), css::beans::Property( UIELEMENT_PROPNAME_RESOURCEURL, UIELEMENT_PROPHANDLE_RESOURCEURL , cppu::UnoType<sal_Int16>::get(), css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ), css::beans::Property( UIELEMENT_PROPNAME_TYPE, UIELEMENT_PROPHANDLE_TYPE , cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ) }; - // Use it to initialize sequence! - const css::uno::Sequence< css::beans::Property > lPropertyDescriptor( pProperties, UIELEMENT_PROPCOUNT ); - // Return "PropertyDescriptor" - return lPropertyDescriptor; } } diff --git a/framework/source/jobs/jobresult.cxx b/framework/source/jobs/jobresult.cxx index dc3075472124..1c03a89ba645 100644 --- a/framework/source/jobs/jobresult.cxx +++ b/framework/source/jobs/jobresult.cxx @@ -84,7 +84,7 @@ JobResult::JobResult( /*IN*/ const css::uno::Any& aResult ) if ( aProtocol.empty() ) return; - ::comphelper::SequenceAsHashMap::const_iterator pIt = aProtocol.find(JobConst::ANSWER_DEACTIVATE_JOB()); + ::comphelper::SequenceAsHashMap::const_iterator pIt = aProtocol.find(JobConst::ANSWER_DEACTIVATE_JOB); if (pIt != aProtocol.end()) { /** @@ -98,7 +98,7 @@ JobResult::JobResult( /*IN*/ const css::uno::Any& aResult ) m_eParts |= E_DEACTIVATE; } - pIt = aProtocol.find(JobConst::ANSWER_SAVE_ARGUMENTS()); + pIt = aProtocol.find(JobConst::ANSWER_SAVE_ARGUMENTS); if (pIt != aProtocol.end()) { css::uno::Sequence<css::beans::NamedValue> aTmp; @@ -108,7 +108,7 @@ JobResult::JobResult( /*IN*/ const css::uno::Any& aResult ) m_eParts |= E_ARGUMENTS; } - pIt = aProtocol.find(JobConst::ANSWER_SEND_DISPATCHRESULT()); + pIt = aProtocol.find(JobConst::ANSWER_SEND_DISPATCHRESULT); if (pIt != aProtocol.end()) { if (pIt->second >>= m_aDispatchResult) diff --git a/framework/source/jobs/shelljob.cxx b/framework/source/jobs/shelljob.cxx index a83949437517..eb7b5882ae6f 100644 --- a/framework/source/jobs/shelljob.cxx +++ b/framework/source/jobs/shelljob.cxx @@ -100,7 +100,7 @@ css::uno::Any SAL_CALL ShellJob::execute(const css::uno::Sequence< css::beans::N css::uno::Any ShellJob::impl_generateAnswer4Deactivation() { - css::uno::Sequence< css::beans::NamedValue > aAnswer { { JobConst::ANSWER_DEACTIVATE_JOB(), css::uno::makeAny(true) } }; + css::uno::Sequence< css::beans::NamedValue > aAnswer { { JobConst::ANSWER_DEACTIVATE_JOB, css::uno::makeAny(true) } }; return css::uno::makeAny(aAnswer); } diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index 7eafb69df0be..7f2ad1f931ee 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -3898,16 +3898,14 @@ void SAL_CALL AutoRecovery::getFastPropertyValue(css::uno::Any& aValue , } } -const css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor() +css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor() { - const css::beans::Property pPropertys[] = + return { css::beans::Property( AUTORECOVERY_PROPNAME_CRASHED , AUTORECOVERY_PROPHANDLE_CRASHED , cppu::UnoType<bool>::get() , css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ), css::beans::Property( AUTORECOVERY_PROPNAME_EXISTS_RECOVERYDATA, AUTORECOVERY_PROPHANDLE_EXISTS_RECOVERYDATA, cppu::UnoType<bool>::get() , css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ), css::beans::Property( AUTORECOVERY_PROPNAME_EXISTS_SESSIONDATA , AUTORECOVERY_PROPHANDLE_EXISTS_SESSIONDATA , cppu::UnoType<bool>::get() , css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ), }; - const css::uno::Sequence< css::beans::Property > lPropertyDescriptor(pPropertys, AUTORECOVERY_PROPCOUNT); - return lPropertyDescriptor; } ::cppu::IPropertyArrayHelper& SAL_CALL AutoRecovery::getInfoHelper() diff --git a/framework/source/tabwin/tabwindow.cxx b/framework/source/tabwin/tabwindow.cxx index 79afbb74258b..525cc8896a9a 100644 --- a/framework/source/tabwin/tabwindow.cxx +++ b/framework/source/tabwin/tabwindow.cxx @@ -829,7 +829,7 @@ css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL TabWindow::getPrope return xInfo; } -const css::uno::Sequence< css::beans::Property > TabWindow::impl_getStaticPropertyDescriptor() +css::uno::Sequence< css::beans::Property > TabWindow::impl_getStaticPropertyDescriptor() { // Create property array to initialize sequence! // Table of all predefined properties of this class. It's used from OPropertySetHelper-class! @@ -838,7 +838,7 @@ const css::uno::Sequence< css::beans::Property > TabWindow::impl_getStaticProper // ATTENTION: // YOU MUST SORT FOLLOW TABLE BY NAME ALPHABETICAL !!! - const css::beans::Property pProperties[] = + return { css::beans::Property( TABWINDOW_PROPNAME_PARENTWINDOW, TABWINDOW_PROPHANDLE_PARENTWINDOW, @@ -848,11 +848,7 @@ const css::uno::Sequence< css::beans::Property > TabWindow::impl_getStaticProper TABWINDOW_PROPHANDLE_TOPWINDOW, cppu::UnoType<css::awt::XWindow>::get(), css::beans::PropertyAttribute::READONLY ) - }; // Use it to initialize sequence! - const css::uno::Sequence< css::beans::Property > lPropertyDescriptor( pProperties, TABWINDOW_PROPCOUNT ); - - // Return "PropertyDescriptor" - return lPropertyDescriptor; + }; } } diff --git a/include/framework/addonsoptions.hxx b/include/framework/addonsoptions.hxx index 5c4d9166eb07..1f4c728d1656 100644 --- a/include/framework/addonsoptions.hxx +++ b/include/framework/addonsoptions.hxx @@ -173,7 +173,7 @@ class FWE_DLLPUBLIC AddonsOptions @onerror We return sal_False *//*-*****************************************************************************************************/ - const OUString GetAddonsToolbarResourceName( sal_uInt32 nIndex ) const; + OUString GetAddonsToolbarResourceName( sal_uInt32 nIndex ) const; /*-**************************************************************************************************** @short Gets a NotebookBar part of a single addon @@ -191,7 +191,7 @@ class FWE_DLLPUBLIC AddonsOptions @onerror We return sal_False *//*-*****************************************************************************************************/ - const OUString GetAddonsNotebookBarResourceName( sal_uInt32 ) const; + OUString GetAddonsNotebookBarResourceName( sal_uInt32 ) const; /*-**************************************************************************************************** @short Retrieves all available merge instructions for the Office menu bar _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits