summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/rtl/ustrbuf.hxx32
-rw-r--r--include/rtl/ustring.hxx234
-rw-r--r--include/svl/itemprop.hxx5
-rw-r--r--include/vcl/IconThemeInfo.hxx2
-rw-r--r--include/xmloff/txtparae.hxx40
-rw-r--r--include/xmloff/xmlimp.hxx4
6 files changed, 212 insertions, 105 deletions
diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx
index 9800ba8d3020..56968def8d71 100644
--- a/include/rtl/ustrbuf.hxx
+++ b/include/rtl/ustrbuf.hxx
@@ -174,10 +174,10 @@ public:
}
/** @overload @since LibreOffice 5.4 */
- OUStringBuffer(OUStringLiteral const & literal):
- pData(nullptr), nCapacity(literal.size + 16) //TODO: check for overflow
+ template<std::size_t N> OUStringBuffer(OUStringLiteral<N> const & literal):
+ pData(nullptr), nCapacity(literal.getLength() + 16) //TODO: check for overflow
{
- rtl_uStringbuffer_newFromStr_WithLength(&pData, literal.data, literal.size);
+ rtl_uStringbuffer_newFromStr_WithLength(&pData, literal.getStr(), literal.getLength());
}
#endif
@@ -315,13 +315,13 @@ public:
}
/** @overload @since LibreOffice 5.4 */
- OUStringBuffer & operator =(OUStringLiteral const & literal) {
- sal_Int32 const n = literal.size;
+ template<std::size_t N> OUStringBuffer & operator =(OUStringLiteral<N> const & literal) {
+ sal_Int32 const n = literal.getLength();
if (n >= nCapacity) {
ensureCapacity(n + 16); //TODO: check for overflow
}
std::memcpy(
- pData->buffer, literal.data,
+ pData->buffer, literal.getStr(),
(n + 1) * sizeof (sal_Unicode)); //TODO: check for overflow
pData->length = n;
return *this;
@@ -659,8 +659,8 @@ public:
}
/** @overload @since LibreOffice 5.4 */
- OUStringBuffer & append(OUStringLiteral const & literal) {
- return append(literal.data, literal.size);
+ template<std::size_t N> OUStringBuffer & append(OUStringLiteral<N> const & literal) {
+ return append(literal.getStr(), literal.getLength());
}
#endif
@@ -1037,8 +1037,9 @@ public:
}
/** @overload @since LibreOffice 5.4 */
- OUStringBuffer & insert(sal_Int32 offset, OUStringLiteral const & literal) {
- return insert(offset, literal.data, literal.size);
+ template<std::size_t N>
+ OUStringBuffer & insert(sal_Int32 offset, OUStringLiteral<N> const & literal) {
+ return insert(offset, literal.getStr(), literal.getLength());
}
#endif
@@ -1446,12 +1447,13 @@ public:
}
/** @overload @since LibreOffice 5.4 */
- sal_Int32 indexOf(OUStringLiteral const & literal, sal_Int32 fromIndex = 0)
+ template<std::size_t N>
+ sal_Int32 indexOf(OUStringLiteral<N> const & literal, sal_Int32 fromIndex = 0)
const
{
sal_Int32 n = rtl_ustr_indexOfStr_WithLength(
- pData->buffer + fromIndex, pData->length - fromIndex, literal.data,
- literal.size);
+ pData->buffer + fromIndex, pData->length - fromIndex, literal.getStr(),
+ literal.getLength());
return n < 0 ? n : n + fromIndex;
}
#endif
@@ -1534,9 +1536,9 @@ public:
}
/** @overload @since LibreOffice 5.4 */
- sal_Int32 lastIndexOf(OUStringLiteral const & literal) const {
+ template<std::size_t N> sal_Int32 lastIndexOf(OUStringLiteral<N> const & literal) const {
return rtl_ustr_lastIndexOfStr_WithLength(
- pData->buffer, pData->length, literal.data, literal.size);
+ pData->buffer, pData->length, literal.getStr(), literal.getLength());
}
#endif
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index eebdc261e4f1..45272b325cc0 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -39,6 +39,7 @@
#include "rtl/textenc.h"
#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
+#include "config_global.h"
#include "rtl/stringconcat.hxx"
#endif
@@ -68,35 +69,49 @@ class OUStringBuffer;
/// @cond INTERNAL
/**
-A simple wrapper around string literal.
+A wrapper dressing a string literal as a static-refcount rtl_uString.
This class is not part of public API and is meant to be used only in LibreOffice code.
@since LibreOffice 4.0
*/
-struct SAL_WARN_UNUSED OUStringLiteral
-{
- template<typename T> constexpr OUStringLiteral(
- T & literal,
- typename libreoffice_internal::ConstCharArrayDetector<
- T, libreoffice_internal::Dummy>::TypeUtf16
- = libreoffice_internal::Dummy()):
- size(libreoffice_internal::ConstCharArrayDetector<T>::length),
- data(
- libreoffice_internal::ConstCharArrayDetector<T>::toPointer(literal))
- {
- assert(
- libreoffice_internal::ConstCharArrayDetector<T>::isValid(literal));
+template<std::size_t N> class SAL_WARN_UNUSED OUStringLiteral {
+ static_assert(N != 0);
+ static_assert(N - 1 <= std::numeric_limits<sal_Int32>::max(), "literal too long");
+
+public:
+#if HAVE_CPP_CONSTEVAL
+ consteval
+#else
+ constexpr
+#endif
+ OUStringLiteral(char16_t const (&literal)[N]) {
+ assert(literal[N - 1] == '\0');
+ //TODO: Use C++20 constexpr std::copy_n (P0202R3):
+ for (std::size_t i = 0; i != N; ++i) {
+ buffer[i] = literal[i];
+ }
}
- constexpr operator std::u16string_view() const { return {data, unsigned(size)}; }
+ constexpr sal_Int32 getLength() const { return length; }
+
+ constexpr sal_Unicode const * getStr() const SAL_RETURNS_NONNULL { return buffer; }
- int size;
- const sal_Unicode* data;
+ constexpr operator std::u16string_view() const { return {buffer, sal_uInt32(length)}; }
- // So we can use this struct in some places interchangeably with OUString
- constexpr sal_Int32 getLength() const { return size; }
+private:
+ // Same layout as rtl_uString (include/rtl/ustring.h):
+ oslInterlockedCount refCount = 0x40000000; // SAL_STRING_STATIC_FLAG (sal/rtl/strimp.hxx)
+ sal_Int32 length = N - 1;
+ sal_Unicode buffer[N] = {}; //TODO: drop initialization for C++20 (P1331R2)
};
+#if defined RTL_STRING_UNITTEST
+namespace libreoffice_internal {
+template<std::size_t N> struct ExceptConstCharArrayDetector<OUStringLiteral<N>> {};
+template<std::size_t N> struct ExceptCharArrayDetector<OUStringLiteral<N>> {};
+}
+#endif
+
/// @endcond
#endif
@@ -347,20 +362,11 @@ public:
/**
New string from a string literal.
- This constructor is similar to the "direct template" one, but can be
- useful in cases where the latter does not work, like in
-
- OUString(flag ? "a" : "bb")
-
- written as
-
- OUString(flag ? OUStringLiteral(u"a") : OUStringLiteral(u"bb"))
-
@since LibreOffice 5.0
*/
- OUString(OUStringLiteral literal): pData(NULL) {
- rtl_uString_newFromStr_WithLength(&pData, literal.data, literal.size);
- }
+ template<std::size_t N> OUString(OUStringLiteral<N> const & literal):
+ pData(const_cast<rtl_uString *>(reinterpret_cast<rtl_uString const *>(&literal))) {}
+ template<std::size_t N> OUString(OUStringLiteral<N> &&) = delete;
/// @endcond
#endif
@@ -552,11 +558,11 @@ public:
}
/** @overload @since LibreOffice 5.4 */
- OUString & operator =(OUStringLiteral const & literal) {
- if (literal.size == 0) {
+ template<std::size_t N> OUString & operator =(OUStringLiteral<N> const & literal) {
+ if (literal.getLength() == 0) {
rtl_uString_new(&pData);
} else {
- rtl_uString_newFromStr_WithLength(&pData, literal.data, literal.size);
+ rtl_uString_newFromStr_WithLength(&pData, literal.getStr(), literal.getLength());
}
return *this;
}
@@ -653,11 +659,11 @@ public:
operator +=(T &) && = delete;
/** @overload @since LibreOffice 5.4 */
- OUString & operator +=(OUStringLiteral const & literal) & {
- rtl_uString_newConcatUtf16L(&pData, pData, literal.data, literal.size);
+ template<std::size_t N> OUString & operator +=(OUStringLiteral<N> const & literal) & {
+ rtl_uString_newConcatUtf16L(&pData, pData, literal.getStr(), literal.getLength());
return *this;
}
- void operator +=(OUStringLiteral const &) && = delete;
+ template<std::size_t N> void operator +=(OUStringLiteral<N> const &) && = delete;
OUString & operator +=(std::u16string_view sv) & {
if (sv.size() > sal_uInt32(std::numeric_limits<sal_Int32>::max())) {
@@ -1812,93 +1818,191 @@ public:
@since LibreOffice 5.0
*/
- friend bool operator ==(OUString const & lhs, OUStringLiteral const & rhs) {
+ template<std::size_t N>
+ friend bool operator ==(OUString const & lhs, OUStringLiteral<N> const & rhs) {
return
rtl_ustr_reverseCompare_WithLength(
- lhs.pData->buffer, lhs.pData->length, rhs.data, rhs.size)
+ lhs.pData->buffer, lhs.pData->length, rhs.getStr(), rhs.getLength())
== 0;
}
- friend bool operator !=(OUString const & lhs, OUStringLiteral const & rhs) {
+ template<std::size_t N>
+ friend bool operator !=(OUString const & lhs, OUStringLiteral<N> const & rhs) {
return
rtl_ustr_reverseCompare_WithLength(
- lhs.pData->buffer, lhs.pData->length, rhs.data, rhs.size)
+ lhs.pData->buffer, lhs.pData->length, rhs.getStr(), rhs.getLength())
!= 0;
}
- friend bool operator <(OUString const & lhs, OUStringLiteral const & rhs) {
+ template<std::size_t N>
+ friend bool operator <(OUString const & lhs, OUStringLiteral<N> const & rhs) {
return
(rtl_ustr_compare_WithLength(
- lhs.pData->buffer, lhs.pData->length, rhs.data, rhs.size))
+ lhs.pData->buffer, lhs.pData->length, rhs.getStr(), rhs.getLength()))
< 0;
}
- friend bool operator <=(OUString const & lhs, OUStringLiteral const & rhs) {
+ template<std::size_t N>
+ friend bool operator <=(OUString const & lhs, OUStringLiteral<N> const & rhs) {
return
(rtl_ustr_compare_WithLength(
- lhs.pData->buffer, lhs.pData->length, rhs.data, rhs.size))
+ lhs.pData->buffer, lhs.pData->length, rhs.getStr(), rhs.getLength()))
<= 0;
}
- friend bool operator >(OUString const & lhs, OUStringLiteral const & rhs) {
+ template<std::size_t N>
+ friend bool operator >(OUString const & lhs, OUStringLiteral<N> const & rhs) {
return
(rtl_ustr_compare_WithLength(
- lhs.pData->buffer, lhs.pData->length, rhs.data, rhs.size))
+ lhs.pData->buffer, lhs.pData->length, rhs.getStr(), rhs.getLength()))
> 0;
}
- friend bool operator >=(OUString const & lhs, OUStringLiteral const & rhs) {
+ template<std::size_t N>
+ friend bool operator >=(OUString const & lhs, OUStringLiteral<N> const & rhs) {
return
(rtl_ustr_compare_WithLength(
- lhs.pData->buffer, lhs.pData->length, rhs.data, rhs.size))
+ lhs.pData->buffer, lhs.pData->length, rhs.getStr(), rhs.getLength()))
>= 0;
}
- friend bool operator ==(OUStringLiteral const & lhs, OUString const & rhs) {
+ template<std::size_t N>
+ friend bool operator ==(OUStringLiteral<N> const & lhs, OUString const & rhs) {
return
rtl_ustr_reverseCompare_WithLength(
- lhs.data, lhs.size, rhs.pData->buffer, rhs.pData->length)
+ lhs.getStr(), lhs.getLength(), rhs.pData->buffer, rhs.pData->length)
== 0;
}
- friend bool operator !=(OUStringLiteral const & lhs, OUString const & rhs) {
+ template<std::size_t N>
+ friend bool operator !=(OUStringLiteral<N> const & lhs, OUString const & rhs) {
return
rtl_ustr_reverseCompare_WithLength(
- lhs.data, lhs.size, rhs.pData->buffer, rhs.pData->length)
+ lhs.getStr(), lhs.getLength(), rhs.pData->buffer, rhs.pData->length)
!= 0;
}
- friend bool operator <(OUStringLiteral const & lhs, OUString const & rhs) {
+ template<std::size_t N>
+ friend bool operator <(OUStringLiteral<N> const & lhs, OUString const & rhs) {
return
(rtl_ustr_compare_WithLength(
- lhs.data, lhs.size, rhs.pData->buffer, rhs.pData->length))
+ lhs.getStr(), lhs.getLength(), rhs.pData->buffer, rhs.pData->length))
< 0;
}
- friend bool operator <=(OUStringLiteral const & lhs, OUString const & rhs) {
+ template<std::size_t N>
+ friend bool operator <=(OUStringLiteral<N> const & lhs, OUString const & rhs) {
return
(rtl_ustr_compare_WithLength(
- lhs.data, lhs.size, rhs.pData->buffer, rhs.pData->length))
+ lhs.getStr(), lhs.getLength(), rhs.pData->buffer, rhs.pData->length))
<= 0;
}
- friend bool operator >(OUStringLiteral const & lhs, OUString const & rhs) {
+ template<std::size_t N>
+ friend bool operator >(OUStringLiteral<N> const & lhs, OUString const & rhs) {
return
(rtl_ustr_compare_WithLength(
- lhs.data, lhs.size, rhs.pData->buffer, rhs.pData->length))
+ lhs.getStr(), lhs.getLength(), rhs.pData->buffer, rhs.pData->length))
> 0;
}
- friend bool operator >=(OUStringLiteral const & lhs, OUString const & rhs) {
+ template<std::size_t N>
+ friend bool operator >=(OUStringLiteral<N> const & lhs, OUString const & rhs) {
return
(rtl_ustr_compare_WithLength(
- lhs.data, lhs.size, rhs.pData->buffer, rhs.pData->length))
+ lhs.getStr(), lhs.getLength(), rhs.pData->buffer, rhs.pData->length))
>= 0;
}
/// @endcond
#endif
+#if defined LIBO_INTERNAL_ONLY
+ friend bool operator ==(OUString const & lhs, std::u16string_view rhs) {
+ return
+ rtl_ustr_reverseCompare_WithLength(
+ lhs.pData->buffer, lhs.pData->length, rhs.data(), rhs.size())
+ == 0;
+ }
+
+ friend bool operator !=(OUString const & lhs, std::u16string_view rhs) {
+ return
+ rtl_ustr_reverseCompare_WithLength(
+ lhs.pData->buffer, lhs.pData->length, rhs.data(), rhs.size())
+ != 0;
+ }
+
+ friend bool operator <(OUString const & lhs, std::u16string_view rhs) {
+ return
+ (rtl_ustr_compare_WithLength(
+ lhs.pData->buffer, lhs.pData->length, rhs.data(), rhs.size()))
+ < 0;
+ }
+
+ friend bool operator <=(OUString const & lhs, std::u16string_view rhs) {
+ return
+ (rtl_ustr_compare_WithLength(
+ lhs.pData->buffer, lhs.pData->length, rhs.data(), rhs.size()))
+ <= 0;
+ }
+
+ friend bool operator >(OUString const & lhs, std::u16string_view rhs) {
+ return
+ (rtl_ustr_compare_WithLength(
+ lhs.pData->buffer, lhs.pData->length, rhs.data(), rhs.size()))
+ > 0;
+ }
+
+ friend bool operator >=(OUString const & lhs, std::u16string_view rhs) {
+ return
+ (rtl_ustr_compare_WithLength(
+ lhs.pData->buffer, lhs.pData->length, rhs.data(), rhs.size()))
+ >= 0;
+ }
+
+ friend bool operator ==(std::u16string_view lhs, OUString const & rhs) {
+ return
+ rtl_ustr_reverseCompare_WithLength(
+ lhs.data(), lhs.size(), rhs.pData->buffer, rhs.pData->length)
+ == 0;
+ }
+
+ friend bool operator !=(std::u16string_view lhs, OUString const & rhs) {
+ return
+ rtl_ustr_reverseCompare_WithLength(
+ lhs.data(), lhs.size(), rhs.pData->buffer, rhs.pData->length)
+ != 0;
+ }
+
+ friend bool operator <(std::u16string_view lhs, OUString const & rhs) {
+ return
+ (rtl_ustr_compare_WithLength(
+ lhs.data(), lhs.size(), rhs.pData->buffer, rhs.pData->length))
+ < 0;
+ }
+
+ friend bool operator <=(std::u16string_view lhs, OUString const & rhs) {
+ return
+ (rtl_ustr_compare_WithLength(
+ lhs.data(), lhs.size(), rhs.pData->buffer, rhs.pData->length))
+ <= 0;
+ }
+
+ friend bool operator >(std::u16string_view lhs, OUString const & rhs) {
+ return
+ (rtl_ustr_compare_WithLength(
+ lhs.data(), lhs.size(), rhs.pData->buffer, rhs.pData->length))
+ > 0;
+ }
+
+ friend bool operator >=(std::u16string_view lhs, OUString const & rhs) {
+ return
+ (rtl_ustr_compare_WithLength(
+ lhs.data(), lhs.size(), rhs.pData->buffer, rhs.pData->length))
+ >= 0;
+ }
+#endif
+
/**
Returns a hashcode for this string.
@@ -3295,11 +3399,11 @@ struct ToStringHelper< OUString >
/**
@internal
*/
-template<>
-struct ToStringHelper< OUStringLiteral >
+template<std::size_t N>
+struct ToStringHelper< OUStringLiteral<N> >
{
- static std::size_t length( const OUStringLiteral& str ) { return str.size; }
- static sal_Unicode* addData( sal_Unicode* buffer, const OUStringLiteral& str ) { return addDataHelper( buffer, str.data, str.size ); }
+ static std::size_t length( const OUStringLiteral<N>& str ) { return str.getLength(); }
+ static sal_Unicode* addData( sal_Unicode* buffer, const OUStringLiteral<N>& str ) { return addDataHelper( buffer, str.getStr(), str.getLength() ); }
static const bool allowOStringConcat = false;
static const bool allowOUStringConcat = true;
};
diff --git a/include/svl/itemprop.hxx b/include/svl/itemprop.hxx
index b845e08bb39d..e985977f265a 100644
--- a/include/svl/itemprop.hxx
+++ b/include/svl/itemprop.hxx
@@ -27,6 +27,7 @@
#include <svl/svldllapi.h>
#include <vector>
#include <memory>
+#include <string_view>
// values from com/sun/star/beans/PropertyAttribute
#define PROPERTY_NONE 0
@@ -34,7 +35,7 @@
/// map a property between beans::XPropertySet and SfxPoolItem
struct SfxItemPropertyMapEntry
{
- OUStringLiteral aName; ///< name of property
+ std::u16string_view aName; ///< name of property
css::uno::Type aType; ///< UNO type of property
sal_uInt16 nWID; ///< WhichId of SfxPoolItem
/// flag bitmap, @see css::beans::PropertyAttribute
@@ -44,7 +45,7 @@ struct SfxItemPropertyMapEntry
sal_uInt8 nMemberId;
PropertyMoreFlags nMoreFlags;
- SfxItemPropertyMapEntry(OUStringLiteral _aName, sal_uInt16 _nWID, css::uno::Type const & _rType,
+ SfxItemPropertyMapEntry(std::u16string_view _aName, sal_uInt16 _nWID, css::uno::Type const & _rType,
sal_Int16 _nFlags, sal_uInt8 const _nMemberId, PropertyMoreFlags _nMoreFlags = PropertyMoreFlags::NONE)
: aName( _aName )
, aType( _rType )
diff --git a/include/vcl/IconThemeInfo.hxx b/include/vcl/IconThemeInfo.hxx
index 825a0e14cafa..92892283c8fc 100644
--- a/include/vcl/IconThemeInfo.hxx
+++ b/include/vcl/IconThemeInfo.hxx
@@ -30,7 +30,7 @@ class VCL_DLLPUBLIC IconThemeInfo {
public:
/** The name of the icon theme to use for high contrast mode */
- static const OUStringLiteral HIGH_CONTRAST_ID;
+ static constexpr OUStringLiteral HIGH_CONTRAST_ID = u"sifr";
/** Construct an IconThemeInfo from the URL to a file.
* This method will throw a std::runtime_error if the URL cannot be properly parsed.
diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx
index 50e65990362b..2495f0f504d0 100644
--- a/include/xmloff/txtparae.hxx
+++ b/include/xmloff/txtparae.hxx
@@ -130,28 +130,28 @@ public:
private:
// Implement Title/Description Elements UI (#i73249#)
- static const OUStringLiteral gsAnchorCharStyleName;
- static const OUStringLiteral gsBeginNotice;
- static const OUStringLiteral gsCategory;
- static const OUStringLiteral gsCharStyleName;
- static const OUStringLiteral gsCharStyleNames;
- static const OUStringLiteral gsEndNotice;
- static const OUStringLiteral gsFootnote;
- static const OUStringLiteral gsFootnoteCounting;
- static const OUStringLiteral gsNumberingType;
- static const OUStringLiteral gsPageDescName;
- static const OUStringLiteral gsPageStyleName;
- static const OUStringLiteral gsParaStyleName;
- static const OUStringLiteral gsPositionEndOfDoc;
- static const OUStringLiteral gsPrefix;
- static const OUStringLiteral gsReferenceId;
- static const OUStringLiteral gsStartAt;
- static const OUStringLiteral gsSuffix;
- static const OUStringLiteral gsTextEndnoteService;
- static const OUStringLiteral gsTextSection;
+ static constexpr OUStringLiteral gsAnchorCharStyleName = u"AnchorCharStyleName";
+ static constexpr OUStringLiteral gsBeginNotice = u"BeginNotice";
+ static constexpr OUStringLiteral gsCategory = u"Category";
+ static constexpr OUStringLiteral gsCharStyleName = u"CharStyleName";
+ static constexpr OUStringLiteral gsCharStyleNames = u"CharStyleNames";
+ static constexpr OUStringLiteral gsEndNotice = u"EndNotice";
+ static constexpr OUStringLiteral gsFootnote = u"Footnote";
+ static constexpr OUStringLiteral gsFootnoteCounting = u"FootnoteCounting";
+ static constexpr OUStringLiteral gsNumberingType = u"NumberingType";
+ static constexpr OUStringLiteral gsPageDescName = u"PageDescName";
+ static constexpr OUStringLiteral gsPageStyleName = u"PageStyleName";
+ static constexpr OUStringLiteral gsParaStyleName = u"ParaStyleName";
+ static constexpr OUStringLiteral gsPositionEndOfDoc = u"PositionEndOfDoc";
+ static constexpr OUStringLiteral gsPrefix = u"Prefix";
+ static constexpr OUStringLiteral gsReferenceId = u"ReferenceId";
+ static constexpr OUStringLiteral gsStartAt = u"StartAt";
+ static constexpr OUStringLiteral gsSuffix = u"Suffix";
+ static constexpr OUStringLiteral gsTextEndnoteService = u"com.sun.star.text.Endnote";
+ static constexpr OUStringLiteral gsTextSection = u"TextSection";
protected:
- static const OUStringLiteral gsFrameStyleName;
+ static constexpr OUStringLiteral gsFrameStyleName = u"FrameStyleName";
SinglePropertySetInfoCache aCharStyleNamesPropInfoCache;
SvXMLAutoStylePoolP& GetAutoStylePool() { return rAutoStylePool; }
diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx
index 0f40ef548ceb..b73f565f5837 100644
--- a/include/xmloff/xmlimp.hxx
+++ b/include/xmloff/xmlimp.hxx
@@ -535,8 +535,8 @@ public:
**/
bool getBuildIds( sal_Int32& rUPD, sal_Int32& rBuild ) const;
- static const OUStringLiteral aDefaultNamespace;
- static const OUStringLiteral aNamespaceSeparator;
+ static constexpr OUStringLiteral aDefaultNamespace = u"";
+ static constexpr OUStringLiteral aNamespaceSeparator = u":";
static const sal_uInt16 OOo_1x = 10;
static const sal_uInt16 OOo_2x = 20;