summaryrefslogtreecommitdiff
path: root/basic/source/inc/sbunoobj.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/inc/sbunoobj.hxx')
-rw-r--r--basic/source/inc/sbunoobj.hxx48
1 files changed, 25 insertions, 23 deletions
diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx
index 839f883ababb..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>
@@ -61,13 +63,13 @@ public:
void setValue( const css::uno::Any& );
};
-class SbUnoStructRefObject: public SbxObject
+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: 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
@@ -146,7 +148,7 @@ typedef tools::SvRef<SbUnoObject> SbUnoObjectRef;
void clearUnoMethods();
void clearUnoMethodsForBasic( StarBASIC const * pBasic );
-class SbUnoMethod : public SbxMethod
+class SbUnoMethod final : public SbxMethod
{
friend class SbUnoObject;
friend void clearUnoMethods();
@@ -175,7 +177,7 @@ public:
};
-class SbUnoProperty : public SbxProperty
+class SbUnoProperty final : public SbxProperty
{
friend class SbUnoObject;
friend class SbUnoStructRefObject;
@@ -192,7 +194,7 @@ class SbUnoProperty : 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
@@ -201,7 +203,7 @@ public:
};
// factory class to create uno-structs per DIM AS NEW
-class SbUnoFactory : public SbxFactory
+class SbUnoFactory final : public SbxFactory
{
public:
virtual SbxBaseRef Create( sal_uInt16 nSbxId, sal_uInt32 ) override;
@@ -209,7 +211,7 @@ public:
};
// wrapper for a uno-class
-class SbUnoClass : public SbxObject
+class SbUnoClass final : public SbxObject
{
const css::uno::Reference< css::reflection::XIdlClass > m_xClass;
@@ -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_ ))
{}
@@ -237,16 +239,16 @@ SbUnoClass* findUnoClass( const OUString& rName );
// Wrapper for UNO Service
-class SbUnoService : public SbxObject
+class SbUnoService final : public SbxObject
{
const css::uno::Reference< css::reflection::XServiceTypeDescription2 > m_xServiceTypeDesc;
bool m_bNeedsInit;
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 )
{}
@@ -258,7 +260,7 @@ public:
SbUnoService* findUnoService( const OUString& rName );
-class SbUnoServiceCtor : public SbxMethod
+class SbUnoServiceCtor final : public SbxMethod
{
friend class SbUnoService;
@@ -276,7 +278,7 @@ public:
// Wrapper for UNO Singleton
-class SbUnoSingleton : public SbxObject
+class SbUnoSingleton final : public SbxObject
{
public:
SbUnoSingleton( const OUString& aName_ );
@@ -288,14 +290,14 @@ SbUnoSingleton* findUnoSingleton( const OUString& rName );
// #105565 Special Object to wrap a strongly typed Uno Any
-class SbUnoAnyObject: public SbxObject
+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
@@ -307,7 +309,7 @@ public:
// #112509 Special SbxArray to transport named parameters for calls
// to OLEAutomation objects through the UNO OLE automation bridge
-class AutomationNamedArgsSbxArray : public SbxArray
+class AutomationNamedArgsSbxArray final : public SbxArray
{
css::uno::Sequence< OUString > maNameSeq;
public:
@@ -339,7 +341,7 @@ void clearNativeObjectWrapperVector();
// #118116 Collection object
-class BasicCollection : public SbxObject
+class BasicCollection final : public SbxObject
{
friend class SbiRuntime;
SbxArrayRef xItemArray;
@@ -350,7 +352,7 @@ class BasicCollection : 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 );