diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-08-27 11:40:59 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-08-28 08:07:09 +0200 |
commit | 33ecd0d5c4fff9511a8436513936a3f7044a775a (patch) | |
tree | c25809adda140ff89d9f2a2b6dfadba17e188fb0 /xmloff/source/text/txtparae.cxx | |
parent | 554834484a3323f73b5aeace246bcd9635368967 (diff) |
Change OUStringLiteral from char[] to char16_t[]
This is a prerequisite for making conversion from OUStringLiteral to OUString
more efficient at least for C++20 (by replacing its internals with a constexpr-
generated sal_uString-compatible layout with a SAL_STRING_STATIC_FLAG refCount,
conditionally for C++20 for now).
For a configure-wise bare-bones build on Linux, size reported by `du -bs
instdir` grew by 118792 bytes from 1155636636 to 1155755428.
In most places just a u"..." string literal prefix had to be added. In some
places
char const a[] = "...";
variables have been changed to char16_t, and a few places required even further
changes to code (which prompted the addition of include/o3tl/string_view.hxx
helper function o3tl::equalsIgnoreAsciiCase and the additional
OUString::createFromAscii overload).
For all uses of macros expanding to string literals, the relevant uses have been
rewritten as
u"" MACRO
instead of changing the macro definitions. It should be possible to change at
least some of those macro definitions (and drop the u"" from their call sites)
in follow-up commits.
Change-Id: Iec4ef1a057d412d22443312d40c6a8a290dc6144
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101483
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'xmloff/source/text/txtparae.cxx')
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 152 |
1 files changed, 76 insertions, 76 deletions
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index eead9e4f55e7..70d0d6ef11c1 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -126,82 +126,82 @@ using namespace ::xmloff; using namespace ::xmloff::token; // Implement Title/Description Elements UI (#i73249#) -const OUStringLiteral gsTitle("Title"); -const OUStringLiteral gsDescription("Description"); -const OUStringLiteral XMLTextParagraphExport::gsAnchorCharStyleName("AnchorCharStyleName"); -const OUStringLiteral gsAnchorPageNo("AnchorPageNo"); -const OUStringLiteral gsAnchorType("AnchorType"); -const OUStringLiteral XMLTextParagraphExport::gsBeginNotice("BeginNotice"); -const OUStringLiteral gsBookmark("Bookmark"); -const OUStringLiteral XMLTextParagraphExport::gsCategory("Category"); -const OUStringLiteral gsChainNextName("ChainNextName"); -const OUStringLiteral XMLTextParagraphExport::gsCharStyleName("CharStyleName"); -const OUStringLiteral XMLTextParagraphExport::gsCharStyleNames("CharStyleNames"); -const OUStringLiteral gsContourPolyPolygon("ContourPolyPolygon"); -const OUStringLiteral gsDocumentIndexMark("DocumentIndexMark"); -const OUStringLiteral XMLTextParagraphExport::gsEndNotice("EndNotice"); -const OUStringLiteral XMLTextParagraphExport::gsFootnote("Footnote"); -const OUStringLiteral XMLTextParagraphExport::gsFootnoteCounting("FootnoteCounting"); -const OUStringLiteral gsFrame("Frame"); -const OUStringLiteral gsGraphicFilter("GraphicFilter"); -const OUStringLiteral gsGraphicRotation("GraphicRotation"); -const OUStringLiteral gsHeight("Height"); -const OUStringLiteral gsHoriOrient("HoriOrient"); -const OUStringLiteral gsHoriOrientPosition("HoriOrientPosition"); -const OUStringLiteral gsHyperLinkName("HyperLinkName"); -const OUStringLiteral gsHyperLinkTarget("HyperLinkTarget"); -const OUStringLiteral gsHyperLinkURL("HyperLinkURL"); -const OUStringLiteral gsIsAutomaticContour("IsAutomaticContour"); -const OUStringLiteral gsIsCollapsed("IsCollapsed"); -const OUStringLiteral gsIsPixelContour("IsPixelContour"); -const OUStringLiteral gsIsStart("IsStart"); -const OUStringLiteral gsIsSyncHeightToWidth("IsSyncHeightToWidth"); -const OUStringLiteral gsIsSyncWidthToHeight("IsSyncWidthToHeight"); -const OUStringLiteral gsNumberingRules("NumberingRules"); -const OUStringLiteral XMLTextParagraphExport::gsNumberingType("NumberingType"); -const OUStringLiteral XMLTextParagraphExport::gsPageDescName("PageDescName"); -const OUStringLiteral XMLTextParagraphExport::gsPageStyleName("PageStyleName"); -const OUStringLiteral gsParaConditionalStyleName("ParaConditionalStyleName"); -const OUStringLiteral gsParagraphService("com.sun.star.text.Paragraph"); -const OUStringLiteral XMLTextParagraphExport::gsParaStyleName("ParaStyleName"); -const OUStringLiteral XMLTextParagraphExport::gsPositionEndOfDoc("PositionEndOfDoc"); -const OUStringLiteral XMLTextParagraphExport::gsPrefix("Prefix"); -const OUStringLiteral gsRedline("Redline"); -const OUStringLiteral XMLTextParagraphExport::gsReferenceId("ReferenceId"); -const OUStringLiteral gsReferenceMark("ReferenceMark"); -const OUStringLiteral gsRelativeHeight("RelativeHeight"); -const OUStringLiteral gsRelativeWidth("RelativeWidth"); -const OUStringLiteral gsRuby("Ruby"); -const OUStringLiteral gsRubyCharStyleName("RubyCharStyleName"); -const OUStringLiteral gsRubyText("RubyText"); -const OUStringLiteral gsServerMap("ServerMap"); -const OUStringLiteral gsShapeService("com.sun.star.drawing.Shape"); -const OUStringLiteral gsSizeType("SizeType"); -const OUStringLiteral gsSoftPageBreak( "SoftPageBreak" ); -const OUStringLiteral XMLTextParagraphExport::gsStartAt("StartAt"); -const OUStringLiteral XMLTextParagraphExport::gsSuffix("Suffix"); -const OUStringLiteral gsTableService("com.sun.star.text.TextTable"); -const OUStringLiteral gsText("Text"); -const OUStringLiteral gsTextContentService("com.sun.star.text.TextContent"); -const OUStringLiteral gsTextEmbeddedService("com.sun.star.text.TextEmbeddedObject"); -const OUStringLiteral XMLTextParagraphExport::gsTextEndnoteService("com.sun.star.text.Endnote"); -const OUStringLiteral gsTextField("TextField"); -const OUStringLiteral gsTextFieldService("com.sun.star.text.TextField"); -const OUStringLiteral gsTextFrameService("com.sun.star.text.TextFrame"); -const OUStringLiteral gsTextGraphicService("com.sun.star.text.TextGraphicObject"); -const OUStringLiteral gsTextPortionType("TextPortionType"); -const OUStringLiteral XMLTextParagraphExport::gsTextSection("TextSection"); -const OUStringLiteral gsUnvisitedCharStyleName("UnvisitedCharStyleName"); -const OUStringLiteral gsVertOrient("VertOrient"); -const OUStringLiteral gsVertOrientPosition("VertOrientPosition"); -const OUStringLiteral gsVisitedCharStyleName("VisitedCharStyleName"); -const OUStringLiteral gsWidth("Width"); -const OUStringLiteral gsWidthType( "WidthType" ); -const OUStringLiteral gsTextFieldStart( "TextFieldStart" ); -const OUStringLiteral gsTextFieldEnd( "TextFieldEnd" ); -const OUStringLiteral gsTextFieldStartEnd( "TextFieldStartEnd" ); - -const OUStringLiteral XMLTextParagraphExport::gsFrameStyleName("FrameStyleName"); +const OUStringLiteral gsTitle(u"Title"); +const OUStringLiteral gsDescription(u"Description"); +const OUStringLiteral XMLTextParagraphExport::gsAnchorCharStyleName(u"AnchorCharStyleName"); +const OUStringLiteral gsAnchorPageNo(u"AnchorPageNo"); +const OUStringLiteral gsAnchorType(u"AnchorType"); +const OUStringLiteral XMLTextParagraphExport::gsBeginNotice(u"BeginNotice"); +const OUStringLiteral gsBookmark(u"Bookmark"); +const OUStringLiteral XMLTextParagraphExport::gsCategory(u"Category"); +const OUStringLiteral gsChainNextName(u"ChainNextName"); +const OUStringLiteral XMLTextParagraphExport::gsCharStyleName(u"CharStyleName"); +const OUStringLiteral XMLTextParagraphExport::gsCharStyleNames(u"CharStyleNames"); +const OUStringLiteral gsContourPolyPolygon(u"ContourPolyPolygon"); +const OUStringLiteral gsDocumentIndexMark(u"DocumentIndexMark"); +const OUStringLiteral XMLTextParagraphExport::gsEndNotice(u"EndNotice"); +const OUStringLiteral XMLTextParagraphExport::gsFootnote(u"Footnote"); +const OUStringLiteral XMLTextParagraphExport::gsFootnoteCounting(u"FootnoteCounting"); +const OUStringLiteral gsFrame(u"Frame"); +const OUStringLiteral gsGraphicFilter(u"GraphicFilter"); +const OUStringLiteral gsGraphicRotation(u"GraphicRotation"); +const OUStringLiteral gsHeight(u"Height"); +const OUStringLiteral gsHoriOrient(u"HoriOrient"); +const OUStringLiteral gsHoriOrientPosition(u"HoriOrientPosition"); +const OUStringLiteral gsHyperLinkName(u"HyperLinkName"); +const OUStringLiteral gsHyperLinkTarget(u"HyperLinkTarget"); +const OUStringLiteral gsHyperLinkURL(u"HyperLinkURL"); +const OUStringLiteral gsIsAutomaticContour(u"IsAutomaticContour"); +const OUStringLiteral gsIsCollapsed(u"IsCollapsed"); +const OUStringLiteral gsIsPixelContour(u"IsPixelContour"); +const OUStringLiteral gsIsStart(u"IsStart"); +const OUStringLiteral gsIsSyncHeightToWidth(u"IsSyncHeightToWidth"); +const OUStringLiteral gsIsSyncWidthToHeight(u"IsSyncWidthToHeight"); +const OUStringLiteral gsNumberingRules(u"NumberingRules"); +const OUStringLiteral XMLTextParagraphExport::gsNumberingType(u"NumberingType"); +const OUStringLiteral XMLTextParagraphExport::gsPageDescName(u"PageDescName"); +const OUStringLiteral XMLTextParagraphExport::gsPageStyleName(u"PageStyleName"); +const OUStringLiteral gsParaConditionalStyleName(u"ParaConditionalStyleName"); +const OUStringLiteral gsParagraphService(u"com.sun.star.text.Paragraph"); +const OUStringLiteral XMLTextParagraphExport::gsParaStyleName(u"ParaStyleName"); +const OUStringLiteral XMLTextParagraphExport::gsPositionEndOfDoc(u"PositionEndOfDoc"); +const OUStringLiteral XMLTextParagraphExport::gsPrefix(u"Prefix"); +const OUStringLiteral gsRedline(u"Redline"); +const OUStringLiteral XMLTextParagraphExport::gsReferenceId(u"ReferenceId"); +const OUStringLiteral gsReferenceMark(u"ReferenceMark"); +const OUStringLiteral gsRelativeHeight(u"RelativeHeight"); +const OUStringLiteral gsRelativeWidth(u"RelativeWidth"); +const OUStringLiteral gsRuby(u"Ruby"); +const OUStringLiteral gsRubyCharStyleName(u"RubyCharStyleName"); +const OUStringLiteral gsRubyText(u"RubyText"); +const OUStringLiteral gsServerMap(u"ServerMap"); +const OUStringLiteral gsShapeService(u"com.sun.star.drawing.Shape"); +const OUStringLiteral gsSizeType(u"SizeType"); +const OUStringLiteral gsSoftPageBreak( u"SoftPageBreak" ); +const OUStringLiteral XMLTextParagraphExport::gsStartAt(u"StartAt"); +const OUStringLiteral XMLTextParagraphExport::gsSuffix(u"Suffix"); +const OUStringLiteral gsTableService(u"com.sun.star.text.TextTable"); +const OUStringLiteral gsText(u"Text"); +const OUStringLiteral gsTextContentService(u"com.sun.star.text.TextContent"); +const OUStringLiteral gsTextEmbeddedService(u"com.sun.star.text.TextEmbeddedObject"); +const OUStringLiteral XMLTextParagraphExport::gsTextEndnoteService(u"com.sun.star.text.Endnote"); +const OUStringLiteral gsTextField(u"TextField"); +const OUStringLiteral gsTextFieldService(u"com.sun.star.text.TextField"); +const OUStringLiteral gsTextFrameService(u"com.sun.star.text.TextFrame"); +const OUStringLiteral gsTextGraphicService(u"com.sun.star.text.TextGraphicObject"); +const OUStringLiteral gsTextPortionType(u"TextPortionType"); +const OUStringLiteral XMLTextParagraphExport::gsTextSection(u"TextSection"); +const OUStringLiteral gsUnvisitedCharStyleName(u"UnvisitedCharStyleName"); +const OUStringLiteral gsVertOrient(u"VertOrient"); +const OUStringLiteral gsVertOrientPosition(u"VertOrientPosition"); +const OUStringLiteral gsVisitedCharStyleName(u"VisitedCharStyleName"); +const OUStringLiteral gsWidth(u"Width"); +const OUStringLiteral gsWidthType( u"WidthType" ); +const OUStringLiteral gsTextFieldStart( u"TextFieldStart" ); +const OUStringLiteral gsTextFieldEnd( u"TextFieldEnd" ); +const OUStringLiteral gsTextFieldStartEnd( u"TextFieldStartEnd" ); + +const OUStringLiteral XMLTextParagraphExport::gsFrameStyleName(u"FrameStyleName"); namespace { |