sw/Library_sw_writerfilter.mk | 1 + sw/source/writerfilter/dmapper/PropertyIds.cxx | 5 +++-- sw/source/writerfilter/dmapper/PropertyIds.hxx | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-)
New commits: commit 81694d9a0082b6c36f3896c6639352cb69266fd1 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Nov 4 14:45:52 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Nov 4 15:18:55 2024 +0100 reduce OUString ref-counting in writerfilter Change-Id: I4a757bf3fec10722524b656b07f189629100ea74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176009 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/Library_sw_writerfilter.mk b/sw/Library_sw_writerfilter.mk index f34bdfaad65c..a51650ce9bf2 100644 --- a/sw/Library_sw_writerfilter.mk +++ b/sw/Library_sw_writerfilter.mk @@ -46,6 +46,7 @@ $(eval $(call gb_Library_use_libraries,sw_writerfilter,\ sax \ sfx \ sot \ + svl \ svt \ svxcore \ sw \ diff --git a/sw/source/writerfilter/dmapper/PropertyIds.cxx b/sw/source/writerfilter/dmapper/PropertyIds.cxx index 75de7b841df8..d2676d56e77a 100644 --- a/sw/source/writerfilter/dmapper/PropertyIds.cxx +++ b/sw/source/writerfilter/dmapper/PropertyIds.cxx @@ -17,12 +17,13 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include <rtl/ustring.hxx> +#include <svl/sharedstring.hxx> #include "PropertyIds.hxx" #include <unordered_map> namespace writerfilter::dmapper{ -OUString getPropertyName( PropertyIds eId ) +const OUString & getPropertyName( PropertyIds eId ) { static const std::unordered_map<PropertyIds, OUString> constPropertyMap { { PROP_CHAR_WEIGHT, u"CharWeight"_ustr}, @@ -402,7 +403,7 @@ OUString getPropertyName( PropertyIds eId ) if (iterator != constPropertyMap.end()) return iterator->second; - return OUString(); + return svl::SharedString::EMPTY_STRING; } bool isCharacterProperty( const PropertyIds eId ) diff --git a/sw/source/writerfilter/dmapper/PropertyIds.hxx b/sw/source/writerfilter/dmapper/PropertyIds.hxx index ebc9cdaeede2..277d4139862b 100644 --- a/sw/source/writerfilter/dmapper/PropertyIds.hxx +++ b/sw/source/writerfilter/dmapper/PropertyIds.hxx @@ -402,7 +402,7 @@ enum PropertyIds }; //Returns the UNO string equivalent to eId. -OUString getPropertyName(PropertyIds eId); +const OUString & getPropertyName(PropertyIds eId); bool isCharacterProperty(const PropertyIds eId);