summaryrefslogtreecommitdiff
path: root/xmloff/source
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source')
-rw-r--r--xmloff/source/core/XMLEmbeddedObjectImportContext.cxx22
-rw-r--r--xmloff/source/core/xmlimp.cxx2
-rw-r--r--xmloff/source/draw/animimp.cxx8
-rw-r--r--xmloff/source/draw/shapeimport.cxx9
-rw-r--r--xmloff/source/forms/elementexport.cxx3
-rw-r--r--xmloff/source/text/txtfldi.cxx4
-rw-r--r--xmloff/source/text/txtparae.cxx21
-rw-r--r--xmloff/source/text/txtvfldi.cxx2
8 files changed, 29 insertions, 42 deletions
diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
index 2293e726399d..3255e2e6fdbf 100644
--- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
+++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <com/sun/star/document/XImporter.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/util/XModifiable2.hpp>
@@ -169,7 +173,7 @@ XMLEmbeddedObjectImportContext::XMLEmbeddedObjectImportContext(
}
OUString sClass;
- static OUStringLiteral const prefixes[] = {
+ static std::u16string_view const prefixes[] = {
u"application/vnd.oasis.openoffice.",
u"application/x-vnd.oasis.openoffice.",
u"application/vnd.oasis.opendocument.",
@@ -184,15 +188,15 @@ XMLEmbeddedObjectImportContext::XMLEmbeddedObjectImportContext(
if( !sClass.isEmpty() )
{
- static struct { XMLTokenEnum eClass; OUStringLiteral sFilterService;
+ static struct { XMLTokenEnum eClass; std::u16string_view sFilterService;
} const aServiceMap[] = {
- { XML_TEXT, OUStringLiteral(u"" XML_IMPORT_FILTER_WRITER) },
- { XML_ONLINE_TEXT, OUStringLiteral(u"" XML_IMPORT_FILTER_WRITER) },
- { XML_SPREADSHEET, OUStringLiteral(u"" XML_IMPORT_FILTER_CALC) },
- { XML_DRAWING, OUStringLiteral(u"" XML_IMPORT_FILTER_DRAW) },
- { XML_GRAPHICS, OUStringLiteral(u"" XML_IMPORT_FILTER_DRAW) },
- { XML_PRESENTATION, OUStringLiteral(u"" XML_IMPORT_FILTER_IMPRESS) },
- { XML_CHART, OUStringLiteral(u"" XML_IMPORT_FILTER_CHART) }};
+ { XML_TEXT, std::u16string_view(u"" XML_IMPORT_FILTER_WRITER) },
+ { XML_ONLINE_TEXT, std::u16string_view(u"" XML_IMPORT_FILTER_WRITER) },
+ { XML_SPREADSHEET, std::u16string_view(u"" XML_IMPORT_FILTER_CALC) },
+ { XML_DRAWING, std::u16string_view(u"" XML_IMPORT_FILTER_DRAW) },
+ { XML_GRAPHICS, std::u16string_view(u"" XML_IMPORT_FILTER_DRAW) },
+ { XML_PRESENTATION, std::u16string_view(u"" XML_IMPORT_FILTER_IMPRESS) },
+ { XML_CHART, std::u16string_view(u"" XML_IMPORT_FILTER_CHART) }};
for (auto const & entry: aServiceMap)
{
if( IsXMLToken( sClass, entry.eClass ) )
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 0a289c6e9fc5..2aeda90fc229 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -85,8 +85,6 @@ using namespace ::xmloff::token;
rtl::Reference< FastTokenHandler > SvXMLImport::xTokenHandler( new FastTokenHandler() );
std::unordered_map< sal_Int32, std::pair< OUString, OUString > > SvXMLImport::aNamespaceMap;
std::unordered_map< OUString, OUString > SvXMLImport::aNamespaceURIPrefixMap;
-const OUStringLiteral SvXMLImport::aDefaultNamespace = u"";
-const OUStringLiteral SvXMLImport::aNamespaceSeparator = u":";
bool SvXMLImport::bIsNSMapsInitialized = false;
namespace {
diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx
index c0c471f92f50..6dfb4aed4ccd 100644
--- a/xmloff/source/draw/animimp.cxx
+++ b/xmloff/source/draw/animimp.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <xmloff/unointerfacetouniqueidentifiermapper.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/presentation/AnimationEffect.hpp>
@@ -321,12 +325,12 @@ namespace
constexpr OUStringLiteral gsDimColor = u"DimColor";
constexpr OUStringLiteral gsDimHide = u"DimHide";
constexpr OUStringLiteral gsDimPrev = u"DimPrevious";
- constexpr OUStringLiteral gsEffect = u"Effect";
+ constexpr std::u16string_view gsEffect = u"Effect";
constexpr OUStringLiteral gsPlayFull = u"PlayFull";
constexpr OUStringLiteral gsSound = u"Sound";
constexpr OUStringLiteral gsSoundOn = u"SoundOn";
constexpr OUStringLiteral gsSpeed = u"Speed";
- constexpr OUStringLiteral gsTextEffect = u"TextEffect";
+ constexpr std::u16string_view gsTextEffect = u"TextEffect";
constexpr OUStringLiteral gsPresShapeService = u"com.sun.star.presentation.Shape";
constexpr OUStringLiteral gsAnimPath = u"AnimationPath";
constexpr OUStringLiteral gsIsAnimation = u"IsAnimation";
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index 8797425eb8c7..47309a3ab28f 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -45,6 +45,7 @@
#include "ximplink.hxx"
#include <map>
+#include <string_view>
#include <vector>
namespace {
@@ -110,10 +111,10 @@ struct XMLShapeImportHelperImpl
bool mbIsPresentationShapesSupported;
};
-const OUStringLiteral gsStartShape(u"StartShape");
-const OUStringLiteral gsEndShape(u"EndShape");
-const OUStringLiteral gsStartGluePointIndex(u"StartGluePointIndex");
-const OUStringLiteral gsEndGluePointIndex(u"EndGluePointIndex");
+const std::u16string_view gsStartShape(u"StartShape");
+const std::u16string_view gsEndShape(u"EndShape");
+const std::u16string_view gsStartGluePointIndex(u"StartGluePointIndex");
+const std::u16string_view gsEndGluePointIndex(u"EndGluePointIndex");
XMLShapeImportHelper::XMLShapeImportHelper(
SvXMLImport& rImporter,
diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx
index a60d70437d9e..1006fc19a152 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -62,6 +62,7 @@
#include <sal/log.hxx>
#include <algorithm>
+#include <string_view>
namespace xmloff
{
@@ -1122,7 +1123,7 @@ namespace xmloff
{ // attribute flags
SCAFlags::GroupName
};
- static const OUStringLiteral pStringPropertyNames[] =
+ static const std::u16string_view pStringPropertyNames[] =
{ // property names
u"" PROPERTY_GROUP_NAME
};
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 31a331f20504..958ebd6b4a92 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -81,8 +81,8 @@ using namespace ::xmloff::token;
// service prefix and service names
-const char16_t sAPI_textfield_prefix[] = u"com.sun.star.text.TextField.";
-const char16_t sAPI_fieldmaster_prefix[] = u"com.sun.star.text.FieldMaster.";
+constexpr char16_t sAPI_textfield_prefix[] = u"com.sun.star.text.TextField.";
+constexpr char16_t sAPI_fieldmaster_prefix[] = u"com.sun.star.text.FieldMaster.";
const char sAPI_presentation_prefix[] = "com.sun.star.presentation.TextField.";
const char sAPI_date_time[] = "DateTime";
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 70d0d6ef11c1..09e923957221 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -128,20 +128,12 @@ using namespace ::xmloff::token;
// Implement Title/Description Elements UI (#i73249#)
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");
@@ -158,16 +150,9 @@ 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");
@@ -178,19 +163,15 @@ 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");
@@ -201,8 +182,6 @@ const OUStringLiteral gsTextFieldStart( u"TextFieldStart" );
const OUStringLiteral gsTextFieldEnd( u"TextFieldEnd" );
const OUStringLiteral gsTextFieldStartEnd( u"TextFieldStartEnd" );
-const OUStringLiteral XMLTextParagraphExport::gsFrameStyleName(u"FrameStyleName");
-
namespace
{
class TextContentSet
diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx
index 0cff25fedbb7..ed635d9a51c8 100644
--- a/xmloff/source/text/txtvfldi.cxx
+++ b/xmloff/source/text/txtvfldi.cxx
@@ -52,7 +52,7 @@
// service names
-const char16_t sAPI_fieldmaster_prefix[] = u"com.sun.star.text.FieldMaster.";
+constexpr char16_t sAPI_fieldmaster_prefix[] = u"com.sun.star.text.FieldMaster.";
const char sAPI_get_expression[] = "GetExpression";
const char sAPI_set_expression[] = "SetExpression";
const char sAPI_user[] = "User";