diff options
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/helper/propertymap.cxx | 4 | ||||
-rw-r--r-- | oox/source/token/propertynames.cxx | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx index afb6ef6ff6f6..83495dc879b1 100644 --- a/oox/source/helper/propertymap.cxx +++ b/oox/source/helper/propertymap.cxx @@ -180,7 +180,7 @@ sal_Bool SAL_CALL GenericPropertySet::hasPropertyByName( const OUString& rProper } // namespace PropertyMap::PropertyMap() : - mpPropNames( &StaticPropertyNameVector::get() ) // pointer instead reference to get compiler generated copy c'tor and operator= + mpPropNames( &GetPropertyNameVector() ) // pointer instead reference to get compiler generated copy c'tor and operator= { } @@ -221,7 +221,7 @@ void PropertyMap::assignUsed( const PropertyMap& rPropMap ) const OUString& PropertyMap::getPropertyName( sal_Int32 nPropId ) { OSL_ENSURE( (0 <= nPropId) && (nPropId < PROP_COUNT), "PropertyMap::getPropertyName - invalid property identifier" ); - return StaticPropertyNameVector::get()[ nPropId ]; + return GetPropertyNameVector()[ nPropId ]; } void PropertyMap::assignAll( const PropertyMap& rPropMap ) diff --git a/oox/source/token/propertynames.cxx b/oox/source/token/propertynames.cxx index b7c5e544143c..eadf0d5d4d7a 100644 --- a/oox/source/token/propertynames.cxx +++ b/oox/source/token/propertynames.cxx @@ -21,12 +21,13 @@ namespace oox { -PropertyNameVector::PropertyNameVector() - : ::std::vector<OUString>{ +const std::vector<OUString>& GetPropertyNameVector() +{ + static const std::vector<OUString> NAMES{ // include auto-generated C array with property names as C strings #include <propertynames.inc> - } -{ + }; + return NAMES; } } // namespace oox |