diff options
Diffstat (limited to 'basic/source/inc/sbunoobj.hxx')
-rw-r--r-- | basic/source/inc/sbunoobj.hxx | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx index 1f3042951e51..4dee669219ef 100644 --- a/basic/source/inc/sbunoobj.hxx +++ b/basic/source/inc/sbunoobj.hxx @@ -31,9 +31,11 @@ #include <com/sun/star/reflection/XIdlClass.hpp> #include <com/sun/star/reflection/XServiceTypeDescription2.hpp> #include <rtl/ustring.hxx> +#include <o3tl/string_view.hxx> #include <string_view> #include <unordered_map> +#include <utility> #include <vector> #include <map> @@ -65,9 +67,9 @@ class SbUnoStructRefObject final : public SbxObject { struct caseLessComp { - bool operator() (const OUString& rProp, std::u16string_view rOtherProp ) const + bool operator() (std::u16string_view rProp, std::u16string_view rOtherProp ) const { - return rProp.compareToIgnoreAsciiCase( rOtherProp ) < 0; + return o3tl::compareToIgnoreAsciiCase( rProp, rOtherProp ) < 0; } }; typedef std::map< OUString, std::unique_ptr<StructRefInfo>, caseLessComp > StructFieldInfo; @@ -82,7 +84,7 @@ class SbUnoStructRefObject final : public SbxObject public: StructRefInfo getStructMember( const OUString& rMember ); const StructRefInfo& getStructInfo() const { return maMemberInfo; } - SbUnoStructRefObject( const OUString& aName_, const StructRefInfo& rMemberInfo ); + SbUnoStructRefObject( const OUString& aName_, StructRefInfo aMemberInfo ); virtual ~SbUnoStructRefObject() override; // override Find to support e. g. NameAccess @@ -192,7 +194,7 @@ class SbUnoProperty final : public SbxProperty public: SbUnoProperty( const OUString& aName_, SbxDataType eSbxType, SbxDataType eRealSbxType, - const css::beans::Property& aUnoProp_, sal_Int32 nId_, bool bInvocation, bool bUnoStruct ); + css::beans::Property aUnoProp_, sal_Int32 nId_, bool bInvocation, bool bUnoStruct ); bool isUnoStruct() const { return mbUnoStruct; } bool isInvocationBased() const @@ -217,9 +219,9 @@ public: SbUnoClass( const OUString& aName_ ) : SbxObject( aName_ ) {} - SbUnoClass( const OUString& aName_, const css::uno::Reference< css::reflection::XIdlClass >& xClass_ ) + SbUnoClass( const OUString& aName_, css::uno::Reference< css::reflection::XIdlClass > xClass_ ) : SbxObject( aName_ ) - , m_xClass( xClass_ ) + , m_xClass(std::move( xClass_ )) {} @@ -244,9 +246,9 @@ class SbUnoService final : public SbxObject public: SbUnoService( const OUString& aName_, - const css::uno::Reference< css::reflection::XServiceTypeDescription2 >& xServiceTypeDesc ) + css::uno::Reference< css::reflection::XServiceTypeDescription2 > xServiceTypeDesc ) : SbxObject( aName_ ) - , m_xServiceTypeDesc( xServiceTypeDesc ) + , m_xServiceTypeDesc(std::move( xServiceTypeDesc )) , m_bNeedsInit( true ) {} @@ -293,9 +295,9 @@ class SbUnoAnyObject final : public SbxObject css::uno::Any mVal; public: - SbUnoAnyObject( const css::uno::Any& rVal ) + SbUnoAnyObject( css::uno::Any rVal ) : SbxObject( OUString() ) - , mVal( rVal ) + , mVal(std::move( rVal )) {} const css::uno::Any& getValue() const @@ -350,7 +352,7 @@ class BasicCollection final : public SbxObject virtual ~BasicCollection() override; virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; sal_Int32 implGetIndex( SbxVariable const * pIndexVar ); - sal_Int32 implGetIndexForName(std::u16string_view rName); + sal_Int32 implGetIndexForName(const OUString& rName); void CollAdd( SbxArray* pPar_ ); void CollItem( SbxArray* pPar_ ); void CollRemove( SbxArray* pPar_ ); @@ -372,7 +374,7 @@ private: public: static VBAConstantHelper& instance(); SbxVariable* getVBAConstant( const OUString& rName ); - bool isVBAConstantType( const OUString& rName ); + bool isVBAConstantType( std::u16string_view rName ); }; SbxVariable* getDefaultProp( SbxVariable* pRef ); |