diff options
29 files changed, 92 insertions, 129 deletions
diff --git a/chart2/source/model/filter/XMLFilter.cxx b/chart2/source/model/filter/XMLFilter.cxx index 0f061c66121b..a31f1d9f68b5 100644 --- a/chart2/source/model/filter/XMLFilter.cxx +++ b/chart2/source/model/filter/XMLFilter.cxx @@ -308,7 +308,7 @@ ErrCode XMLFilter::impl_Import( // create XPropertySet with extra information for the filter /** property map for import info set */ - comphelper::PropertyMapEntry const aImportInfoMap[] = + static comphelper::PropertyMapEntry const aImportInfoMap[] = { // necessary properties for XML progress bar at load time { OUString("ProgressRange"), 0, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, @@ -319,7 +319,6 @@ ErrCode XMLFilter::impl_Import( { OUString("StreamRelPath"), 0, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString("StreamName"), 0, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString("BuildId"), 0, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; uno::Reference< beans::XPropertySet > xImportInfo( comphelper::GenericPropertySet_CreateInstance( @@ -569,14 +568,13 @@ ErrCode XMLFilter::impl_Export( xGraphicStorageHandler.set(document::GraphicStorageHandler::createWithStorage(m_xContext, xStorage)); // property map for export info set - comphelper::PropertyMapEntry const aExportInfoMap[] = + static comphelper::PropertyMapEntry const aExportInfoMap[] = { { OUString("UsePrettyPrinting"), 0, cppu::UnoType<bool>::get(), beans::PropertyAttribute::MAYBEVOID, 0}, { OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString("StreamRelPath"), 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString("StreamName"), 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString("ExportTableNumberList"), 0, cppu::UnoType<bool>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; uno::Reference< beans::XPropertySet > xInfoSet = diff --git a/comphelper/source/property/propertysetinfo.cxx b/comphelper/source/property/propertysetinfo.cxx index 919198772932..6385965c0d56 100644 --- a/comphelper/source/property/propertysetinfo.cxx +++ b/comphelper/source/property/propertysetinfo.cxx @@ -28,63 +28,65 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::lang; -void PropertySetInfo::addImpl(PropertyMapEntry const * pMap) noexcept -{ - while (!pMap->maName.isEmpty()) - { - // check for duplicates - assert(maPropertyMap.find(pMap->maName) == maPropertyMap.end()); - - maPropertyMap[pMap->maName] = pMap; - - maProperties.realloc(0); - - ++pMap; - } -} - PropertySetInfo::PropertySetInfo() noexcept { } -PropertySetInfo::PropertySetInfo( PropertyMapEntry const * pMap ) noexcept +PropertySetInfo::PropertySetInfo( o3tl::span<const PropertyMapEntry> pMap ) noexcept { - while (!pMap->maName.isEmpty()) + maPropertyMap.reserve(pMap.size()); + for (const auto & rEntry : pMap) { // check for duplicates - assert(maPropertyMap.find(pMap->maName) == maPropertyMap.end()); - - maPropertyMap[pMap->maName] = pMap; + assert(maPropertyMap.find(rEntry.maName) == maPropertyMap.end()); + // Make sure there are no accidental empty entries left at the end of the array from + // when this method used to take a empty-terminated array. + assert(!rEntry.maName.isEmpty()); - ++pMap; + maPropertyMap.emplace(rEntry.maName, &rEntry); } } PropertySetInfo::PropertySetInfo(uno::Sequence<beans::Property> const& rProps) noexcept { - PropertyMapEntry * pEntries(new PropertyMapEntry[rProps.getLength() + 1]); + PropertyMapEntry * pEntries(new PropertyMapEntry[rProps.getLength()]); PropertyMapEntry * pEntry(&pEntries[0]); for (auto const& it : rProps) { + // check for duplicates + assert(maPropertyMap.find(it.Name) == maPropertyMap.end()); + pEntry->maName = it.Name; pEntry->mnHandle = it.Handle; pEntry->maType = it.Type; pEntry->mnAttributes = it.Attributes; pEntry->mnMemberId = 0; + + maPropertyMap.emplace(it.Name, pEntry); ++pEntry; } - pEntry->maName = OUString(); - - addImpl(pEntries); } PropertySetInfo::~PropertySetInfo() noexcept { } -void PropertySetInfo::add( PropertyMapEntry const * pMap ) noexcept +void PropertySetInfo::add( o3tl::span<PropertyMapEntry const> pMap ) noexcept { - addImpl( pMap ); + maPropertyMap.reserve(maPropertyMap.size() + pMap.size()); + for (const auto & rEntry : pMap) + { + // check for duplicates + assert(maPropertyMap.find(rEntry.maName) == maPropertyMap.end()); + // Make sure there are no accidental empty entries left at the end of the array from + // when this method used to take a empty-terminated array. + assert(!rEntry.maName.isEmpty()); + + maPropertyMap.emplace(rEntry.maName, &rEntry); + } + + // clear cache + maProperties.realloc(0); } void PropertySetInfo::remove( const OUString& aName ) noexcept diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index eabed85802c6..419d02d2d821 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -434,9 +434,8 @@ namespace { OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString("StreamName"), 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString("UsePrettyPrinting"), 0, ::cppu::UnoType<sal_Bool>::get(), beans::PropertyAttribute::MAYBEVOID, 0}, - {OUString("TargetStorage"), 0, cppu::UnoType<embed::XStorage>::get(), beans::PropertyAttribute::MAYBEVOID, 0}, - {OUString("StreamRelPath"), 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0}, - { OUString(), 0, css::uno::Type(), 0, 0 } + { OUString("TargetStorage"), 0, cppu::UnoType<embed::XStorage>::get(), beans::PropertyAttribute::MAYBEVOID, 0}, + { OUString("StreamRelPath"), 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0}, }; } @@ -1912,7 +1911,6 @@ comphelper::PropertyMapEntry const aEmbeddedImportInfoMap[] = {OUString("StreamRelPath"), 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0}, {OUString("StreamName"), 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0}, {OUString("SourceStorage"), 0, cppu::UnoType<embed::XStorage>::get(), beans::PropertyAttribute::MAYBEVOID, 0}, - {OUString(), 0, css::uno::Type(), 0, 0} }; } diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx index f31907519890..93c6c892f589 100644 --- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx +++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx @@ -80,13 +80,12 @@ bool XmlFilterAdaptor::importImpl( const Sequence< css::beans::PropertyValue >& } // create an XProperty set to configure the exporter for pretty printing - PropertyMapEntry aImportInfoMap[] = + static const PropertyMapEntry aImportInfoMap[] = { { OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get(), PropertyAttribute::MAYBEVOID, 0}, { OUString("BuildId"), 0, ::cppu::UnoType<OUString>::get(), PropertyAttribute::MAYBEVOID, 0 }, { OUString("DefaultDocumentSettings"), 0, ::cppu::UnoType<Sequence<PropertyValue>>::get(), PropertyAttribute::MAYBEVOID, 0 }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; Reference< XPropertySet > xInfoSet( @@ -280,12 +279,11 @@ bool XmlFilterAdaptor::exportImpl( const Sequence< css::beans::PropertyValue >& } // create an XProperty set to configure the exporter for pretty printing - PropertyMapEntry aImportInfoMap[] = + static const PropertyMapEntry aImportInfoMap[] = { { OUString("UsePrettyPrinting"), 0, cppu::UnoType<sal_Bool>::get(), PropertyAttribute::MAYBEVOID, 0}, { OUString("ExportTextNumberElement"), 0, cppu::UnoType<sal_Bool>::get(), PropertyAttribute::MAYBEVOID, 0}, { OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get(), PropertyAttribute::MAYBEVOID, 0}, - { OUString(), 0, css::uno::Type(), 0, 0 } }; Reference< XPropertySet > xInfoSet( diff --git a/include/comphelper/propertysetinfo.hxx b/include/comphelper/propertysetinfo.hxx index a1df9c657476..82bbb81cd6c4 100644 --- a/include/comphelper/propertysetinfo.hxx +++ b/include/comphelper/propertysetinfo.hxx @@ -25,8 +25,9 @@ #include <com/sun/star/beans/XPropertySetInfo.hpp> #include <cppuhelper/implbase.hxx> #include <comphelper/comphelperdllapi.h> +#include <o3tl/span.hxx> #include <o3tl/typed_flags_set.hxx> -#include <map> +#include <unordered_map> #include <vector> enum class PropertyMoreFlags : sal_uInt8 { @@ -74,7 +75,7 @@ struct PropertyMapEntry PropertyMapEntry() = default; }; -typedef std::map<OUString, PropertyMapEntry const *> PropertyMap; +typedef std::unordered_map<OUString, PropertyMapEntry const *> PropertyMap; // don't export to avoid duplicate WeakImplHelper definitions with MSVC class SAL_DLLPUBLIC_TEMPLATE PropertySetInfo_BASE @@ -89,7 +90,7 @@ class COMPHELPER_DLLPUBLIC PropertySetInfo final { public: PropertySetInfo() noexcept; - PropertySetInfo( PropertyMapEntry const * pMap ) noexcept; + PropertySetInfo( o3tl::span<const PropertyMapEntry> pMap ) noexcept; PropertySetInfo(css::uno::Sequence<css::beans::Property> const &) noexcept; virtual ~PropertySetInfo() noexcept override; @@ -101,7 +102,7 @@ public: /** adds an array of PropertyMapEntry to this instance.<p> The end is marked with a PropertyMapEntry where mpName equals NULL</p> */ - void add( PropertyMapEntry const * pMap ) noexcept; + void add( o3tl::span<PropertyMapEntry const> pMap ) noexcept; /** removes an already added PropertyMapEntry which string in mpName equals to aName */ void remove( const OUString& aName ) noexcept; @@ -111,8 +112,6 @@ public: virtual sal_Bool SAL_CALL hasPropertyByName( const OUString& Name ) override; private: - void addImpl(PropertyMapEntry const * pMap) noexcept; - PropertyMap maPropertyMap; /// Cache the value we return in getProperties because it is expensive to construct css::uno::Sequence< css::beans::Property > maProperties; diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index e9f5393a5e7c..d6d5e8179d66 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -1309,13 +1309,12 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS } /** property map for export info set */ - comphelper::PropertyMapEntry const aExportInfoMap[] = + static comphelper::PropertyMapEntry const aExportInfoMap[] = { { OUString("UsePrettyPrinting") , 0, cppu::UnoType<sal_Bool>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString("StreamName") , 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString("StreamRelPath") , 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString("BaseURI") , 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; uno::Reference< beans::XPropertySet > xInfoSet( comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aExportInfoMap ) ) ); diff --git a/reportdesign/source/filter/xml/xmlColumn.cxx b/reportdesign/source/filter/xml/xmlColumn.cxx index f57c8085f7c5..43464a2766a1 100644 --- a/reportdesign/source/filter/xml/xmlColumn.cxx +++ b/reportdesign/source/filter/xml/xmlColumn.cxx @@ -120,7 +120,6 @@ void OXMLRowColumn::fillStyle(const OUString& _sStyleName) {OUString(PROPERTY_WIDTH), PROPERTY_ID_WIDTH, ::cppu::UnoType<sal_Int32>::get() ,PropertyAttribute::BOUND,0}, {OUString(PROPERTY_HEIGHT), PROPERTY_ID_HEIGHT, ::cppu::UnoType<sal_Int32>::get() ,PropertyAttribute::BOUND,0 }, {OUString(PROPERTY_MINHEIGHT), PROPERTY_ID_MINHEIGHT, ::cppu::UnoType<sal_Int32>::get() ,PropertyAttribute::BOUND,0 }, - {OUString(), 0, css::uno::Type(), 0, 0 } }; pInfo->add(pMap); Reference<XPropertySet> xProp = GenericPropertySet_CreateInstance(pInfo.get()); diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx b/reportdesign/source/filter/xml/xmlHelper.cxx index 0f439d7dcb08..491f3e650c39 100644 --- a/reportdesign/source/filter/xml/xmlHelper.cxx +++ b/reportdesign/source/filter/xml/xmlHelper.cxx @@ -271,7 +271,6 @@ void OXMLHelper::copyStyleElements(const bool _bOld,const OUString& _sStyleName, {OUString(PROPERTY_FONTKERNING), PROPERTY_ID_FONTKERNING, cppu::UnoType<decltype(aFont.Kerning)>::get() ,PropertyAttribute::BOUND,0}, {OUString(PROPERTY_CHARWORDMODE), PROPERTY_ID_FONTWORDLINEMODE, cppu::UnoType<decltype(aFont.WordLineMode)>::get() ,PropertyAttribute::BOUND,0}, {OUString(PROPERTY_FONTTYPE), PROPERTY_ID_FONTTYPE, cppu::UnoType<decltype(aFont.Type)>::get() ,PropertyAttribute::BOUND,0}, - { OUString(), 0, css::uno::Type(), 0, 0 } }; try { @@ -321,7 +320,6 @@ uno::Reference<beans::XPropertySet> OXMLHelper::createBorderPropertySet() {OUString(PROPERTY_BORDERRIGHT), 1, cppu::UnoType<table::BorderLine2>::get(),PropertyAttribute::BOUND,0}, {OUString(PROPERTY_BORDERTOP), 2, cppu::UnoType<table::BorderLine2>::get(),PropertyAttribute::BOUND,0}, {OUString(PROPERTY_BORDERBOTTOM), 3, cppu::UnoType<table::BorderLine2>::get(),PropertyAttribute::BOUND,0}, - { OUString(), 0, css::uno::Type(), 0, 0 } }; return comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(pMap)); } diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx index 371f0647a1ae..166c8c435caf 100644 --- a/reportdesign/source/filter/xml/xmlfilter.cxx +++ b/reportdesign/source/filter/xml/xmlfilter.cxx @@ -423,7 +423,6 @@ bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) { OUString("PrivateData"),0, cppu::UnoType<XInterface>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString("BaseURI"), 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString("StreamRelPath"), 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; utl::MediaDescriptor aDescriptor(rDescriptor); uno::Reference<beans::XPropertySet> xProp = comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(pMap)); diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index 3c1e690f3de6..cdf2a53f7b83 100644 --- a/sc/source/filter/xml/xmlwrap.cxx +++ b/sc/source/filter/xml/xmlwrap.cxx @@ -297,7 +297,7 @@ bool ScXMLImportWrapper::Import( ImportFlags nMode, ErrCode& rError ) uno::Reference<frame::XModel> xModel = mrDocShell.GetModel(); /** property map for export info set */ - comphelper::PropertyMapEntry const aImportInfoMap[] = + static comphelper::PropertyMapEntry const aImportInfoMap[] = { { OUString("ProgressRange"), 0, ::cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, { OUString("ProgressMax"), 0, ::cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, @@ -314,7 +314,6 @@ bool ScXMLImportWrapper::Import( ImportFlags nMode, ErrCode& rError ) { OUString("SourceStorage"), 0, cppu::UnoType<embed::XStorage>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString(SC_UNO_ODS_LOCK_SOLAR_MUTEX), 0, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString(SC_UNO_ODS_IMPORT_STYLES), 0, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; uno::Reference< beans::XPropertySet > xInfoSet( comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aImportInfoMap ) ) ); @@ -749,7 +748,7 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly) })); /** property map for export info set */ - comphelper::PropertyMapEntry const aExportInfoMap[] = + static comphelper::PropertyMapEntry const aExportInfoMap[] = { { OUString("ProgressRange"), 0, ::cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, { OUString("ProgressMax"), 0, ::cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, @@ -762,7 +761,6 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly) { OUString("StyleNames"), 0, cppu::UnoType<uno::Sequence<OUString>>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString("StyleFamilies"), 0, cppu::UnoType<uno::Sequence<sal_Int32>>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString("TargetStorage"), 0, cppu::UnoType<embed::XStorage>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; uno::Reference< beans::XPropertySet > xInfoSet( comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aExportInfoMap ) ) ); diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index 0d1b14c825b4..90ef68e3552e 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -458,7 +458,7 @@ bool SdXMLFilter::Import( ErrCode& nError ) mxModel->lockControllers(); /** property map for import info set */ - PropertyMapEntry const aImportInfoMap[] = + static PropertyMapEntry const aImportInfoMap[] = { // necessary properties for XML progress bar at load time { OUString("ProgressRange"), 0, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, @@ -473,7 +473,6 @@ bool SdXMLFilter::Import( ErrCode& nError ) { OUString("BuildId"), 0, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString("OrganizerMode"), 0, cppu::UnoType<bool>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString("SourceStorage"), 0, cppu::UnoType<embed::XStorage>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; uno::Reference< beans::XPropertySet > xInfoSet( GenericPropertySet_CreateInstance( new PropertySetInfo( aImportInfoMap ) ) ); @@ -767,7 +766,7 @@ bool SdXMLFilter::Export() uno::Reference< xml::sax::XWriter > xWriter = xml::sax::Writer::create( xContext ); /** property map for export info set */ - PropertyMapEntry const aExportInfoMap[] = + static PropertyMapEntry const aExportInfoMap[] = { { OUString("ProgressRange"), 0, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, { OUString("ProgressMax"), 0, cppu::UnoType<sal_Int32>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, @@ -780,7 +779,6 @@ bool SdXMLFilter::Export() { OUString("StyleNames"), 0, cppu::UnoType<Sequence<OUString>>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString("StyleFamilies"), 0, cppu::UnoType<Sequence<sal_Int32>>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString("TargetStorage"), 0, cppu::UnoType<embed::XStorage>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; uno::Reference< beans::XPropertySet > xInfoSet( GenericPropertySet_CreateInstance( new PropertySetInfo( aExportInfoMap ) ) ); diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index e05cfaf3b5eb..331f90b53a50 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx @@ -166,7 +166,6 @@ enum SdDocumentSettingsPropertyHandles { OUString("IsPrintOutline"), HANDLE_PRINTOUTLINE, cppu::UnoType<bool>::get(), 0, MID_PRINTER }, { OUString("SlidesPerHandout"), HANDLE_SLIDESPERHANDOUT, ::cppu::UnoType<sal_Int16>::get(), 0, MID_PRINTER }, { OUString("HandoutsHorizontal"), HANDLE_HANDOUTHORIZONTAL, cppu::UnoType<bool>::get(), 0, MID_PRINTER }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; static PropertyMapEntry const aDrawSettingsInfoMap[] = @@ -174,7 +173,6 @@ enum SdDocumentSettingsPropertyHandles { OUString("MeasureUnit"), HANDLE_MEASUREUNIT, ::cppu::UnoType<sal_Int16>::get(), 0, 0 }, { OUString("ScaleNumerator"), HANDLE_SCALE_NUM, ::cppu::UnoType<sal_Int32>::get(), 0, 0 }, { OUString("ScaleDenominator"), HANDLE_SCALE_DOM, ::cppu::UnoType<sal_Int32>::get(), 0, 0 }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; static PropertyMapEntry const aCommonSettingsInfoMap[] = @@ -221,11 +219,13 @@ enum SdDocumentSettingsPropertyHandles { OUString("EmbedAsianScriptFonts"), HANDLE_EMBED_ASIAN_SCRIPT_FONTS, cppu::UnoType<bool>::get(), 0, 0 }, { OUString("EmbedComplexScriptFonts"), HANDLE_EMBED_COMPLEX_SCRIPT_FONTS, cppu::UnoType<bool>::get(), 0, 0 }, { OUString("ImagePreferredDPI"), HANDLE_IMAGE_PREFERRED_DPI, cppu::UnoType<sal_Int32>::get(), 0, 0 }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; rtl::Reference<PropertySetInfo> xInfo = new PropertySetInfo( aCommonSettingsInfoMap ); - xInfo->add( bIsDraw ? aDrawSettingsInfoMap : aImpressSettingsInfoMap ); + if (bIsDraw) + xInfo->add( aDrawSettingsInfoMap ); + else + xInfo->add( aImpressSettingsInfoMap ); return xInfo; } diff --git a/starmath/source/mathml/export.cxx b/starmath/source/mathml/export.cxx index ab737c125491..1c88d3f5664d 100644 --- a/starmath/source/mathml/export.cxx +++ b/starmath/source/mathml/export.cxx @@ -127,16 +127,16 @@ bool SmMLExportWrapper::Export(SfxMedium& rMedium) } // create XPropertySet with three properties for status indicator - comphelper::PropertyMapEntry aInfoMap[] - = { { OUString("UsePrettyPrinting"), 0, cppu::UnoType<bool>::get(), - beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get(), - beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString("StreamRelPath"), 0, ::cppu::UnoType<OUString>::get(), - beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString("StreamName"), 0, ::cppu::UnoType<OUString>::get(), - beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; + static const comphelper::PropertyMapEntry aInfoMap[]{ + { OUString("UsePrettyPrinting"), 0, cppu::UnoType<bool>::get(), + beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get(), + beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString("StreamRelPath"), 0, ::cppu::UnoType<OUString>::get(), + beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString("StreamName"), 0, ::cppu::UnoType<OUString>::get(), + beans::PropertyAttribute::MAYBEVOID, 0 } + }; uno::Reference<beans::XPropertySet> xInfoSet( comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(aInfoMap))); @@ -262,16 +262,16 @@ OUString SmMLExportWrapper::Export(SmMlElement* pElementTree) } // create XPropertySet with three properties for status indicator - comphelper::PropertyMapEntry aInfoMap[] - = { { OUString("UsePrettyPrinting"), 0, cppu::UnoType<bool>::get(), - beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get(), - beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString("StreamRelPath"), 0, ::cppu::UnoType<OUString>::get(), - beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString("StreamName"), 0, ::cppu::UnoType<OUString>::get(), - beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; + static const comphelper::PropertyMapEntry aInfoMap[]{ + { OUString("UsePrettyPrinting"), 0, cppu::UnoType<bool>::get(), + beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get(), + beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString("StreamRelPath"), 0, ::cppu::UnoType<OUString>::get(), + beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString("StreamName"), 0, ::cppu::UnoType<OUString>::get(), + beans::PropertyAttribute::MAYBEVOID, 0 } + }; uno::Reference<beans::XPropertySet> xInfoSet( comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(aInfoMap))); diff --git a/starmath/source/mathml/import.cxx b/starmath/source/mathml/import.cxx index 950bbff4dfe3..52d47028e657 100644 --- a/starmath/source/mathml/import.cxx +++ b/starmath/source/mathml/import.cxx @@ -140,7 +140,7 @@ ErrCode SmMLImportWrapper::Import(SfxMedium& rMedium) } // Create property list - comphelper::PropertyMapEntry aInfoMap[] + static const comphelper::PropertyMapEntry aInfoMap[] = { { u"PrivateData", 0, cppu::UnoType<XInterface>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, { u"BaseURI", 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, @@ -148,8 +148,7 @@ ErrCode SmMLImportWrapper::Import(SfxMedium& rMedium) { u"StreamRelPath", 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, { u"StreamName", 0, ::cppu::UnoType<OUString>::get(), - beans::PropertyAttribute::MAYBEVOID, 0 }, - { u"", 0, css::uno::Type(), 0, 0 } }; + beans::PropertyAttribute::MAYBEVOID, 0 } }; uno::Reference<beans::XPropertySet> xInfoSet( comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(aInfoMap))); @@ -342,7 +341,7 @@ ErrCode SmMLImportWrapper::Import(std::u16string_view aSource) } // Create property list - comphelper::PropertyMapEntry aInfoMap[] + static const comphelper::PropertyMapEntry aInfoMap[] = { { u"PrivateData", 0, cppu::UnoType<XInterface>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, { u"BaseURI", 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, @@ -350,8 +349,7 @@ ErrCode SmMLImportWrapper::Import(std::u16string_view aSource) { u"StreamRelPath", 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, { u"StreamName", 0, ::cppu::UnoType<OUString>::get(), - beans::PropertyAttribute::MAYBEVOID, 0 }, - { u"", 0, css::uno::Type(), 0, 0 } }; + beans::PropertyAttribute::MAYBEVOID, 0 } }; uno::Reference<beans::XPropertySet> xInfoSet( comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(aInfoMap))); diff --git a/starmath/source/mathml/mathmlexport.cxx b/starmath/source/mathml/mathmlexport.cxx index 619082bd3758..187dd195382d 100644 --- a/starmath/source/mathml/mathmlexport.cxx +++ b/starmath/source/mathml/mathmlexport.cxx @@ -134,16 +134,14 @@ bool SmXMLExportWrapper::Export(SfxMedium& rMedium) static constexpr OUStringLiteral sStreamName(u"StreamName"); // create XPropertySet with three properties for status indicator - comphelper::PropertyMapEntry aInfoMap[] - = { { sUsePrettyPrinting, 0, cppu::UnoType<bool>::get(), - beans::PropertyAttribute::MAYBEVOID, 0 }, - { sBaseURI, 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, - 0 }, - { sStreamRelPath, 0, ::cppu::UnoType<OUString>::get(), - beans::PropertyAttribute::MAYBEVOID, 0 }, - { sStreamName, 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, - 0 }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; + static const comphelper::PropertyMapEntry aInfoMap[] = { + { sUsePrettyPrinting, 0, cppu::UnoType<bool>::get(), beans::PropertyAttribute::MAYBEVOID, + 0 }, + { sBaseURI, 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, + { sStreamRelPath, 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, + 0 }, + { sStreamName, 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 } + }; uno::Reference<beans::XPropertySet> xInfoSet( comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(aInfoMap))); diff --git a/starmath/source/mathml/mathmlimport.cxx b/starmath/source/mathml/mathmlimport.cxx index 6020b5ffb044..44d8cc1e3058 100644 --- a/starmath/source/mathml/mathmlimport.cxx +++ b/starmath/source/mathml/mathmlimport.cxx @@ -126,7 +126,7 @@ ErrCode SmXMLImportWrapper::Import(SfxMedium& rMedium) bEmbedded = true; } - comphelper::PropertyMapEntry aInfoMap[] + static const comphelper::PropertyMapEntry aInfoMap[] = { { OUString("PrivateData"), 0, cppu::UnoType<XInterface>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get(), @@ -134,8 +134,7 @@ ErrCode SmXMLImportWrapper::Import(SfxMedium& rMedium) { OUString("StreamRelPath"), 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString("StreamName"), 0, ::cppu::UnoType<OUString>::get(), - beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; + beans::PropertyAttribute::MAYBEVOID, 0 } }; uno::Reference<beans::XPropertySet> xInfoSet( comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(aInfoMap))); diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index b61fae230441..42f377f27ce9 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -230,7 +230,7 @@ enum SmModelPropertyHandles static const rtl::Reference<PropertySetInfo> & lcl_createModelPropertyInfo () { - static PropertyMapEntry aModelPropertyInfoMap[] = + static const PropertyMapEntry aModelPropertyInfoMap[] = { { OUString("Alignment") , HANDLE_ALIGNMENT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 }, { OUString("BaseFontHeight") , HANDLE_BASE_FONT_HEIGHT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 }, @@ -302,7 +302,6 @@ static const rtl::Reference<PropertySetInfo> & lcl_createModelPropertyInfo () { OUString("BaseLine") , HANDLE_BASELINE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 }, { OUString("InteropGrabBag") , HANDLE_INTEROP_GRAB_BAG , cppu::UnoType<uno::Sequence< beans::PropertyValue >>::get(), PROPERTY_NONE, 0 }, { OUString("SyntaxVersion") , HANDLE_STARMATH_VERSION , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; static const rtl::Reference<PropertySetInfo> PROPS_INFO = new PropertySetInfo ( aModelPropertyInfoMap ); return PROPS_INFO; diff --git a/svtools/source/graphic/renderer.cxx b/svtools/source/graphic/renderer.cxx index 315e3764524c..bbd151c6b40b 100644 --- a/svtools/source/graphic/renderer.cxx +++ b/svtools/source/graphic/renderer.cxx @@ -178,7 +178,6 @@ rtl::Reference<::comphelper::PropertySetInfo> GraphicRendererVCL::createProperty { OUString("Device"), UNOGRAPHIC_DEVICE, cppu::UnoType<uno::Any>::get(), 0, 0 }, { OUString("DestinationRect"), UNOGRAPHIC_DESTINATIONRECT, cppu::UnoType<awt::Rectangle>::get(), 0, 0 }, { OUString("RenderData"), UNOGRAPHIC_RENDERDATA, cppu::UnoType<uno::Any>::get(), 0, 0 }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; return rtl::Reference<::comphelper::PropertySetInfo>( new ::comphelper::PropertySetInfo(aEntries) ); diff --git a/svtools/source/uno/unoimap.cxx b/svtools/source/uno/unoimap.cxx index d7e6f7be8bbf..4d64cc8b405e 100644 --- a/svtools/source/uno/unoimap.cxx +++ b/svtools/source/uno/unoimap.cxx @@ -141,7 +141,6 @@ rtl::Reference<PropertySetInfo> SvUnoImageMapObject::createPropertySetInfo( IMap { OUString("Name"), HANDLE_NAME, cppu::UnoType<OUString>::get(), 0, 0 }, { OUString("IsActive"), HANDLE_ISACTIVE, cppu::UnoType<bool>::get(), 0, 0 }, { OUString("Polygon"), HANDLE_POLYGON, cppu::UnoType<PointSequence>::get(), 0, 0 }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; return rtl::Reference<PropertySetInfo>(new PropertySetInfo( aPolygonObj_Impl )); @@ -158,7 +157,6 @@ rtl::Reference<PropertySetInfo> SvUnoImageMapObject::createPropertySetInfo( IMap { OUString("IsActive"), HANDLE_ISACTIVE, cppu::UnoType<bool>::get(), 0, 0 }, { OUString("Center"), HANDLE_CENTER, cppu::UnoType<awt::Point>::get(), 0, 0 }, { OUString("Radius"), HANDLE_RADIUS, cppu::UnoType<sal_Int32>::get(), 0, 0 }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; return rtl::Reference<PropertySetInfo>(new PropertySetInfo( aCircleObj_Impl )); @@ -175,7 +173,6 @@ rtl::Reference<PropertySetInfo> SvUnoImageMapObject::createPropertySetInfo( IMap { OUString("Name"), HANDLE_NAME, cppu::UnoType<OUString>::get(), 0, 0 }, { OUString("IsActive"), HANDLE_ISACTIVE, cppu::UnoType<bool>::get(), 0, 0 }, { OUString("Boundary"), HANDLE_BOUNDARY, cppu::UnoType<awt::Rectangle>::get(), 0, 0 }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; return rtl::Reference<PropertySetInfo>(new PropertySetInfo( aRectangleObj_Impl )); diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index 6bfb0432515b..68bdde6a511a 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -775,7 +775,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxTableShapePropertyMap() return aTableShapePropertyMap_Impl; } -static comphelper::PropertyMapEntry const * ImplGetSvxDrawingDefaultsPropertyMap() +static o3tl::span<comphelper::PropertyMapEntry const> ImplGetSvxDrawingDefaultsPropertyMap() { static comphelper::PropertyMapEntry const aSvxDrawingDefaultsPropertyMap_Impl[] = { @@ -791,18 +791,16 @@ static comphelper::PropertyMapEntry const * ImplGetSvxDrawingDefaultsPropertyMap SPECIAL_DIMENSIONING_PROPERTIES_DEFAULTS MISC_3D_OBJ_PROPERTIES SPECIAL_3DBACKSCALE_PROPERTIES - { OUString(), 0, css::uno::Type(), 0, 0 } }; return aSvxDrawingDefaultsPropertyMap_Impl; } -static comphelper::PropertyMapEntry const * ImplGetAdditionalWriterDrawingDefaultsPropertyMap() +static o3tl::span<comphelper::PropertyMapEntry const> ImplGetAdditionalWriterDrawingDefaultsPropertyMap() { static comphelper::PropertyMapEntry const aSvxAdditionalDefaultsPropertyMap_Impl[] = { { "IsFollowingTextFlow", SID_SW_FOLLOW_TEXT_FLOW, cppu::UnoType<bool>::get(), 0, 0}, - { OUString(), 0, css::uno::Type(), 0, 0 } }; return aSvxAdditionalDefaultsPropertyMap_Impl; diff --git a/svx/source/unogallery/unogalitem.cxx b/svx/source/unogallery/unogalitem.cxx index 0a40fb05d19b..5addd32269bb 100644 --- a/svx/source/unogallery/unogalitem.cxx +++ b/svx/source/unogallery/unogalitem.cxx @@ -193,8 +193,6 @@ rtl::Reference<::comphelper::PropertySetInfo> GalleryItem::createPropertySetInfo { OUString("Drawing"), UNOGALLERY_DRAWING, cppu::UnoType<lang::XComponent>::get(), beans::PropertyAttribute::READONLY, 0 }, - - { OUString(), 0, css::uno::Type(), 0, 0 } }; return rtl::Reference<::comphelper::PropertySetInfo>( new ::comphelper::PropertySetInfo( aEntries ) ); diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx index 806b5f8be55a..5d628d680540 100644 --- a/sw/source/core/unocore/unoflatpara.cxx +++ b/sw/source/core/unocore/unoflatpara.cxx @@ -79,10 +79,9 @@ SwXFlatParagraph::~SwXFlatParagraph() uno::Reference< beans::XPropertySetInfo > SAL_CALL SwXFlatParagraph::getPropertySetInfo() { - static comphelper::PropertyMapEntry s_Entries[] = { + static const comphelper::PropertyMapEntry s_Entries[] = { { OUString("FieldPositions"), -1, ::cppu::UnoType<uno::Sequence<sal_Int32>>::get(), beans::PropertyAttribute::READONLY, 0 }, { OUString("FootnotePositions"), -1, ::cppu::UnoType<uno::Sequence<sal_Int32>>::get(), beans::PropertyAttribute::READONLY, 0 }, - { OUString(), -1, css::uno::Type(), 0, 0 } }; return new comphelper::PropertySetInfo(s_Entries); } diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index fb6fe1f1d733..7e8731086078 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -518,7 +518,7 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con // the user. // create XPropertySet with three properties for status indicator - comphelper::PropertyMapEntry const aInfoMap[] = + static comphelper::PropertyMapEntry const aInfoMap[] = { { OUString("ProgressRange"), 0, ::cppu::UnoType<sal_Int32>::get(), @@ -592,7 +592,6 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString("SourceStorage"), 0, cppu::UnoType<embed::XStorage>::get(), css::beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; uno::Reference< beans::XPropertySet > xInfoSet( comphelper::GenericPropertySet_CreateInstance( diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx index 6c553a6fc567..1ff2b3520282 100644 --- a/sw/source/filter/xml/wrtxml.cxx +++ b/sw/source/filter/xml/wrtxml.cxx @@ -129,7 +129,7 @@ ErrCode SwXMLWriter::Write_(const SfxItemSet* pMediumItemSet) // the user. // create XPropertySet with three properties for status indicator - comphelper::PropertyMapEntry const aInfoMap[] = + static comphelper::PropertyMapEntry const aInfoMap[] = { { OUString("ProgressRange"), 0, ::cppu::UnoType<sal_Int32>::get(), @@ -180,7 +180,6 @@ ErrCode SwXMLWriter::Write_(const SfxItemSet* pMediumItemSet) { OUString("NoEmbDataSet"), 0, cppu::UnoType<bool>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; uno::Reference< beans::XPropertySet > xInfoSet( comphelper::GenericPropertySet_CreateInstance( diff --git a/vcl/source/graphic/UnoGraphicDescriptor.cxx b/vcl/source/graphic/UnoGraphicDescriptor.cxx index a4d21c4420e6..74a99eb0a610 100644 --- a/vcl/source/graphic/UnoGraphicDescriptor.cxx +++ b/vcl/source/graphic/UnoGraphicDescriptor.cxx @@ -244,8 +244,6 @@ rtl::Reference<::comphelper::PropertySetInfo> GraphicDescriptor::createPropertyS { OUString( "Animated" ), static_cast< sal_Int32 >( UnoGraphicProperty::Animated ), cppu::UnoType< sal_Bool >::get(), beans::PropertyAttribute::READONLY, 0 }, { OUString("Linked"), sal_Int32(UnoGraphicProperty::Linked), cppu::UnoType<sal_Bool>::get(), beans::PropertyAttribute::READONLY, 0 }, { OUString("OriginURL"), sal_Int32(UnoGraphicProperty::OriginURL), cppu::UnoType<OUString>::get(), beans::PropertyAttribute::READONLY, 0 }, - - { OUString(), 0, css::uno::Type(), 0, 0 } }; return rtl::Reference<::comphelper::PropertySetInfo>( new ::comphelper::PropertySetInfo(aEntries) ); diff --git a/writerperfect/source/writer/EPUBExportFilter.cxx b/writerperfect/source/writer/EPUBExportFilter.cxx index cdd7d1d2cb82..8ac55af19f59 100644 --- a/writerperfect/source/writer/EPUBExportFilter.cxx +++ b/writerperfect/source/writer/EPUBExportFilter.cxx @@ -105,10 +105,9 @@ sal_Bool EPUBExportFilter::filter(const uno::Sequence<beans::PropertyValue>& rDe uno::UNO_QUERY); // A subset of parameters are passed in as a property set. - comphelper::PropertyMapEntry const aInfoMap[] + static comphelper::PropertyMapEntry const aInfoMap[] = { { OUString("BaseURI"), 0, cppu::UnoType<OUString>::get(), - beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString(), 0, uno::Type(), 0, 0 } }; + beans::PropertyAttribute::MAYBEVOID, 0 } }; uno::Reference<beans::XPropertySet> xInfoSet( comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(aInfoMap))); xInfoSet->setPropertyValue("BaseURI", uno::Any(aSourceURL)); diff --git a/xmloff/qa/unit/uxmloff.cxx b/xmloff/qa/unit/uxmloff.cxx index 867fcd329823..9cad246f976e 100644 --- a/xmloff/qa/unit/uxmloff.cxx +++ b/xmloff/qa/unit/uxmloff.cxx @@ -98,7 +98,6 @@ void Test::testMetaGenerator() { comphelper::PropertyMapEntry const aInfoMap[] = { { OUString("BuildId"), 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString(), 0, css::uno::Type(), 0, 0 } }; uno::Reference<beans::XPropertySet> const xInfoSet( comphelper::GenericPropertySet_CreateInstance( diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 5235226ac81f..55e9b1956560 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -1254,7 +1254,6 @@ ErrCode SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass ) { OUString("Class"), 0, ::cppu::UnoType<OUString>::get(), PropertyAttribute::MAYBEVOID, 0}, - { OUString(), 0, css::uno::Type(), 0, 0 } }; Reference< XPropertySet > xConvPropSet( ::comphelper::GenericPropertySet_CreateInstance( diff --git a/xmloff/source/meta/MetaExportComponent.cxx b/xmloff/source/meta/MetaExportComponent.cxx index 251cb5217646..b5ad3177e84b 100644 --- a/xmloff/source/meta/MetaExportComponent.cxx +++ b/xmloff/source/meta/MetaExportComponent.cxx @@ -78,12 +78,11 @@ ErrCode XMLMetaExportComponent::exportDoc( enum XMLTokenEnum ) uno::Reference< uno::XComponentContext > xContext = getComponentContext(); try { - ::comphelper::PropertyMapEntry const aInfoMap[] = + static const ::comphelper::PropertyMapEntry aInfoMap[] = { { OUString("Class"), 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0}, - { OUString(), 0, css::uno::Type(), 0, 0 } }; uno::Reference< beans::XPropertySet > xConvPropSet( ::comphelper::GenericPropertySet_CreateInstance( |