diff options
-rw-r--r-- | comphelper/inc/comphelper/string.hxx | 3 | ||||
-rw-r--r-- | comphelper/source/misc/string.cxx | 12 | ||||
-rw-r--r-- | sc/source/core/data/dputil.cxx | 2 |
3 files changed, 1 insertions, 16 deletions
diff --git a/comphelper/inc/comphelper/string.hxx b/comphelper/inc/comphelper/string.hxx index 499e8504dd09..8a763e85e2f8 100644 --- a/comphelper/inc/comphelper/string.hxx +++ b/comphelper/inc/comphelper/string.hxx @@ -318,9 +318,6 @@ COMPHELPER_DLLPUBLIC inline rtl::OUStringBuffer& padToLength( return detail::padToLength(rBuffer, nLength, cFill); } -COMPHELPER_DLLPUBLIC rtl::OUString removeTrailingChars( - const rtl::OUString& rStr, sal_Unicode cChar); - /** Convert a sequence of strings to a single comma separated string. Note that no escaping of commas or anything fancy is done. diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx index 08aa392dcd82..84a5c9c86c19 100644 --- a/comphelper/source/misc/string.cxx +++ b/comphelper/source/misc/string.cxx @@ -246,18 +246,6 @@ sal_uInt32 decimalStringToNumber( return result; } -rtl::OUString removeTrailingChars(const rtl::OUString& rStr, sal_Unicode cChar) -{ - sal_Int32 n = rStr.getLength(); - const sal_Unicode* p = &rStr.getStr()[n-1]; // last char - while (n > 0 && *p == cChar) - { - --p; - --n; - } - return rStr.copy(0, n); -} - using namespace ::com::sun::star; // convert between sequence of string and comma separated string diff --git a/sc/source/core/data/dputil.cxx b/sc/source/core/data/dputil.cxx index 0e1803d64bc2..269148b20061 100644 --- a/sc/source/core/data/dputil.cxx +++ b/sc/source/core/data/dputil.cxx @@ -85,7 +85,7 @@ bool ScDPUtil::isDuplicateDimension(const rtl::OUString& rName) rtl::OUString ScDPUtil::getSourceDimensionName(const rtl::OUString& rName) { - return comphelper::string::removeTrailingChars(rName, sal_Unicode('*')); + return comphelper::string::stripEnd(rName, '*'); } rtl::OUString ScDPUtil::createDuplicateDimensionName(const rtl::OUString& rOriginal, size_t nDupCount) |