summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/rtl/string.hxx38
-rw-r--r--vcl/source/fontsubset/cff.cxx2
2 files changed, 1 insertions, 39 deletions
diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx
index 6cc26e7befe3..de468f127757 100644
--- a/include/rtl/string.hxx
+++ b/include/rtl/string.hxx
@@ -153,39 +153,6 @@ public:
};
};
-/**
- This is intended to be used when declaring compile-time-constant structs or arrays
- that can be initialised from named OStringLiteral e.g.
-
- constexpr OStringLiteral AAA = u"aaa";
- constexpr OStringLiteral BBB = u"bbb";
- constexpr OStringConstExpr FOO[] { AAA, BBB };
-*/
-class OString;
-class OStringConstExpr
-{
-public:
- template<std::size_t N> constexpr OStringConstExpr(OStringLiteral<N> const & literal):
- pData(const_cast<rtl_String *>(&literal.str)) {}
-
- // prevent mis-use
- template<std::size_t N> constexpr OStringConstExpr(OStringLiteral<N> && literal)
- = delete;
-
- // no destructor necessary because we know we are pointing at a compile-time
- // constant OStringLiteral, which bypasses ref-counting.
-
- /**
- make it easier to pass to OStringBuffer and similar without casting/converting
- */
- constexpr std::string_view asView() const { return std::string_view(pData->buffer, pData->length); }
-
- inline operator const OString&() const;
-
-private:
- rtl_String* pData;
-};
-
#if !(defined _MSC_VER && _MSC_VER <= 1929 && defined _MANAGED)
namespace detail {
@@ -2287,11 +2254,6 @@ public:
};
#if defined LIBO_INTERNAL_ONLY
-// Can only define this after we define OString
-inline OStringConstExpr::operator const OString &() const { return OString::unacquired(&pData); }
-#endif
-
-#if defined LIBO_INTERNAL_ONLY
inline bool operator ==(OString const & lhs, StringConcatenation<char> const & rhs)
{ return lhs == std::string_view(rhs); }
inline bool operator !=(OString const & lhs, StringConcatenation<char> const & rhs)
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 7284954397fd..365d5459ee0a 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -433,7 +433,7 @@ constexpr OStringLiteral tok_Regular = "Regular";
constexpr OStringLiteral tok_Roman = "Roman";
constexpr OStringLiteral tok_Semibold = "Semibold";
-constexpr rtl::OStringConstExpr pStringIds[] = {
+constexpr OString pStringIds[] = {
/*0*/ tok_notdef, tok_space, tok_exclam, tok_quotedbl,
tok_numbersign, tok_dollar, tok_percent, tok_ampersand,
tok_quoteright, tok_parenleft, tok_parenright, tok_asterisk,