summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-10-18 07:37:17 +0200
committerStephan Bergmann <sbergman@redhat.com>2023-10-18 11:26:44 +0200
commitb946842a744c2b869e5c01adf90335edf07f09ad (patch)
tree8a6b21fb1040a0e825856e06f20bd1250fbeaf27 /include
parent35ea75e9c2be75a70298a3f4e7d703c1d0f9497e (diff)
Clean up the remaining uses of OUStringConstExpr, and drop it
Change-Id: I30b2ac77b58e2ae1d1e997a0c830c513542b973d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158101 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/rtl/ustring.hxx38
-rw-r--r--include/xmloff/maptype.hxx2
2 files changed, 1 insertions, 39 deletions
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index a88c2a303194..cd23f121e2ac 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -142,39 +142,6 @@ template<std::size_t N> struct ExceptCharArrayDetector<OUStringLiteral<N>> {};
}
#endif
-/**
- This is intended to be used when declaring compile-time-constant structs or arrays
- that can be initialised from named OUStringLiteral e.g.
-
- constexpr OUStringLiteral AAA = u"aaa";
- constexpr OUStringLiteral BBB = u"bbb";
- constexpr OUStringConstExpr FOO[] { AAA, BBB };
-*/
-class OUString;
-class OUStringConstExpr
-{
-public:
- template<std::size_t N> constexpr OUStringConstExpr(OUStringLiteral<N> const & literal):
- pData(const_cast<rtl_uString *>(&literal.str)) {}
-
- // prevent mis-use
- template<std::size_t N> constexpr OUStringConstExpr(OUStringLiteral<N> && literal)
- = delete;
-
- // no destructor necessary because we know we are pointing at a compile-time
- // constant OUStringLiteral, which bypasses ref-counting.
-
- /**
- make it easier to pass to OUStringBuffer and similar without casting/converting
- */
- constexpr std::u16string_view asView() const { return std::u16string_view(pData->buffer, pData->length); }
-
- inline operator const OUString&() const;
-
-private:
- rtl_uString* pData;
-};
-
/// @endcond
#endif
@@ -3408,11 +3375,6 @@ private:
};
#if defined LIBO_INTERNAL_ONLY
-// Can only define this after we define OUString
-inline OUStringConstExpr::operator const OUString &() const { return OUString::unacquired(&pData); }
-#endif
-
-#if defined LIBO_INTERNAL_ONLY
// Prevent the operator ==/!= overloads with 'sal_Unicode const *' parameter from
// being selected for nonsensical code like
//
diff --git a/include/xmloff/maptype.hxx b/include/xmloff/maptype.hxx
index 5102b899b11e..9271027cb6c8 100644
--- a/include/xmloff/maptype.hxx
+++ b/include/xmloff/maptype.hxx
@@ -31,7 +31,7 @@
*/
struct XMLPropertyMapEntry
{
- rtl::OUStringConstExpr msApiName; /// Property-Name
+ OUString msApiName; /// Property-Name
enum ::xmloff::token::XMLTokenEnum meXMLName; /// XML-Name
sal_uInt16 mnNameSpace; /** declares the Namespace in which this
property exists */