summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-03-25 09:53:33 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-03-25 10:06:26 +0100
commita0656ec6fc2b41e65f1b40dbd64f546175e2762f (patch)
treec0d3443a27d9dc10266760110e96b50cce46ef02 /oox
parente9c6fd6b4d09ee59b6a86942cbf001f2ba9782e6 (diff)
const OUString -> const OUStringLiteral
Mostly automated rewrite Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/core/filterbase.cxx6
-rw-r--r--oox/source/drawingml/customshapeproperties.cxx6
-rw-r--r--oox/source/drawingml/hyperlinkcontext.cxx4
-rw-r--r--oox/source/drawingml/shape.cxx8
-rw-r--r--oox/source/export/shapes.cxx2
-rw-r--r--oox/source/helper/propertymap.cxx2
-rw-r--r--oox/source/ole/vbacontrol.cxx2
-rw-r--r--oox/source/ole/vbaexport.cxx2
-rw-r--r--oox/source/ppt/pptshape.cxx2
-rw-r--r--oox/source/ppt/presentationfragmenthandler.cxx8
-rw-r--r--oox/source/ppt/slidepersist.cxx8
-rw-r--r--oox/source/vml/vmlshape.cxx2
12 files changed, 26 insertions, 26 deletions
diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx
index 3e90a66158db..1fd2ebc4f010 100644
--- a/oox/source/core/filterbase.cxx
+++ b/oox/source/core/filterbase.cxx
@@ -266,10 +266,10 @@ OUString FilterBase::getAbsoluteUrl( const OUString& rUrl ) const
{
// handle some special cases before calling ::rtl::Uri::convertRelToAbs()
- const OUString aFileSchema = "file:";
- const OUString aFilePrefix = "file:///";
+ static const OUStringLiteral aFileSchema = u"file:";
+ static const OUStringLiteral aFilePrefix = u"file:///";
const sal_Int32 nFilePrefixLen = aFilePrefix.getLength();
- const OUString aUncPrefix = "//";
+ static const OUStringLiteral aUncPrefix = u"//";
/* (1) convert all backslashes to slashes, and check that passed URL is
not empty. */
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index fd39bb36e30e..1066b67aac76 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -152,8 +152,8 @@ void CustomShapeProperties::pushToPropSet(
Sequence< PropertyValue > aSeq = aPropertyMap.makePropertyValueSequence();
aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq );
- const OUString sCustomShapeGeometry("CustomShapeGeometry");
- const OUString sAdjustmentValues("AdjustmentValues");
+ static const OUStringLiteral sCustomShapeGeometry(u"CustomShapeGeometry");
+ static const OUStringLiteral sAdjustmentValues(u"AdjustmentValues");
uno::Any aGeoPropSet = xPropSet->getPropertyValue( sCustomShapeGeometry );
uno::Sequence< beans::PropertyValue > aGeoPropSeq;
@@ -177,7 +177,7 @@ void CustomShapeProperties::pushToPropSet(
if ( !maAdjustmentGuideList.empty() )
{
- const OUString sType = "Type";
+ static const OUStringLiteral sType = u"Type";
if ( aGeoPropSet >>= aGeoPropSeq )
{
for ( auto& rGeoProp : aGeoPropSeq )
diff --git a/oox/source/drawingml/hyperlinkcontext.cxx b/oox/source/drawingml/hyperlinkcontext.cxx
index d0a09b140dcf..be2336be5ba7 100644
--- a/oox/source/drawingml/hyperlinkcontext.cxx
+++ b/oox/source/drawingml/hyperlinkcontext.cxx
@@ -78,7 +78,7 @@ HyperLinkContext::HyperLinkContext( ContextHandler2Helper const & rParent,
// ppaction://macro?name=MACRO_NAME
// ppaction://program
- const OUString sPPAction( "ppaction://" );
+ static const OUStringLiteral sPPAction( u"ppaction://" );
if ( aAction.matchIgnoreAsciiCase( sPPAction ) )
{
OUString aPPAct( aAction.copy( sPPAction.getLength() ) );
@@ -87,7 +87,7 @@ HyperLinkContext::HyperLinkContext( ContextHandler2Helper const & rParent,
if ( aPPAction.match( "hlinkshowjump" ) )
{
- const OUString sJump( "jump=" );
+ static const OUStringLiteral sJump( u"jump=" );
if ( aPPAct.match( sJump, nIndex + 1 ) )
{
OUString aDestination( aPPAct.copy( nIndex + 1 + sJump.getLength() ) );
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index b11ccbb5f97c..bc2d7b59f1d8 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -607,9 +607,9 @@ static void lcl_createPresetShape(const uno::Reference<drawing::XShape>& xShape,
aGeomPropSeq );
// Reset old properties
- const OUString sTextPath( "TextPath" );
- const OUString sAdjustmentValues( "AdjustmentValues" );
- const OUString sPresetTextWarp( "PresetTextWarp" );
+ static const OUStringLiteral sTextPath( u"TextPath" );
+ static const OUStringLiteral sAdjustmentValues( u"AdjustmentValues" );
+ static const OUStringLiteral sPresetTextWarp( u"PresetTextWarp" );
lcl_resetPropertyValue( aGeomPropVec, "CoordinateSize" );
lcl_resetPropertyValue( aGeomPropVec, "Equations" );
@@ -1169,7 +1169,7 @@ Reference< XShape > const & Shape::createAndInsert(
if(mnRotation)
{
uno::Reference<beans::XPropertySet> xPropertySet(mxShape, uno::UNO_QUERY);
- const OUString aGrabBagPropName = "FrameInteropGrabBag";
+ static const OUStringLiteral aGrabBagPropName = u"FrameInteropGrabBag";
uno::Sequence<beans::PropertyValue> aGrabBag;
xPropertySet->getPropertyValue(aGrabBagPropName) >>= aGrabBag;
beans::PropertyValue aPair;
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index e889901c477c..0f9e13fbb6e4 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -635,7 +635,7 @@ static void lcl_AnalyzeHandles( const uno::Sequence<beans::PropertyValues> & rHa
{
for ( const Sequence< PropertyValue >& rPropSeq : rHandles )
{
- const OUString sPosition( "Position" );
+ static const OUStringLiteral sPosition( u"Position" );
bool bPosition = false;
EnhancedCustomShapeParameterPair aPosition;
for ( const PropertyValue& rPropVal: rPropSeq )
diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx
index 3bc994aabc19..15d8f65f1175 100644
--- a/oox/source/helper/propertymap.cxx
+++ b/oox/source/helper/propertymap.cxx
@@ -896,7 +896,7 @@ void PropertyMap::dumpCode( const Reference< XPropertySet >& rXPropSet )
{
Reference< XPropertySetInfo > info = rXPropSet->getPropertySetInfo ();
const Sequence< Property > props = info->getProperties ();
- const OUString sType = "Type";
+ static const OUStringLiteral sType = u"Type";
for (const Property& rProp : props) {
diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx
index 07c91483c773..88d7f28617ef 100644
--- a/oox/source/ole/vbacontrol.cxx
+++ b/oox/source/ole/vbacontrol.cxx
@@ -800,7 +800,7 @@ void VbaUserForm::importForm( const Reference< XNameContainer >& rxDialogLib,
// scan for the line 'Begin {GUID} <FormName>'
TextInputStream aFrameTextStrm( mxContext, aInStrm, eTextEnc );
- const OUString aBegin = "Begin";
+ static const OUStringLiteral aBegin = u"Begin";
OUString aLine;
bool bBeginFound = false;
while( !bBeginFound && !aFrameTextStrm.isEof() )
diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index 4b3e1f092c3c..372f821aa0b7 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -764,7 +764,7 @@ void exportDirStream(SvStream& rStrm, const css::uno::Reference<css::container::
aDirStream.WriteUInt32(0x00000000); // reserved
#if VBA_EXPORT_DEBUG
- const OUString aDirFileName("/tmp/vba_dir_out.bin");
+ static const OUStringLiteral aDirFileName(u"/tmp/vba_dir_out.bin");
SvFileStream aDirStreamDebug(aDirFileName, StreamMode::READWRITE);
aDirStream.Seek(0);
aDirStreamDebug.WriteStream(aDirStream);
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index 96ca319f2a8e..62a070e5c840 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -134,7 +134,7 @@ void PPTShape::addShape(
if (sServiceName != "com.sun.star.drawing.GraphicObjectShape" &&
sServiceName != "com.sun.star.drawing.OLE2Shape")
{
- const OUString sOutlinerShapeService("com.sun.star.presentation.OutlinerShape");
+ static const OUStringLiteral sOutlinerShapeService(u"com.sun.star.presentation.OutlinerShape");
SAL_INFO("oox.ppt","has master: " << std::hex << rSlidePersist.getMasterPersist().get());
switch (mnSubType)
{
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx
index 2683905b8a74..aced17a2523b 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -108,7 +108,7 @@ static void ResolveTextFields( XmlFilterBase const & rFilter )
const Reference< frame::XModel >& xModel( rFilter.getModel() );
for (auto const& textField : rTextFields)
{
- const OUString sURL = "URL";
+ static const OUStringLiteral sURL = u"URL";
Reference< drawing::XDrawPagesSupplier > xDPS( xModel, uno::UNO_QUERY_THROW );
Reference< drawing::XDrawPages > xDrawPages( xDPS->getDrawPages(), uno::UNO_SET_THROW );
@@ -120,8 +120,8 @@ static void ResolveTextFields( XmlFilterBase const & rFilter )
OUString aURL;
if ( xPropSet->getPropertyValue( sURL ) >>= aURL )
{
- const OUString sSlide = "#Slide ";
- const OUString sNotes = "#Notes ";
+ static const OUStringLiteral sSlide = u"#Slide ";
+ static const OUStringLiteral sNotes = u"#Notes ";
bool bNotes = false;
sal_Int32 nPageNumber = 0;
if ( aURL.match( sSlide ) )
@@ -171,7 +171,7 @@ void PresentationFragmentHandler::saveThemeToGrabBag(const oox::drawingml::Theme
{
uno::Reference<beans::XPropertySetInfo> xPropsInfo = xDocProps->getPropertySetInfo();
- const OUString aGrabBagPropName = "InteropGrabBag";
+ static const OUStringLiteral aGrabBagPropName = u"InteropGrabBag";
if (xPropsInfo.is() && xPropsInfo->hasPropertyByName(aGrabBagPropName))
{
// get existing grab bag
diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index c6be45e71ce1..2b4169bf6062 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -246,10 +246,10 @@ void SlidePersist::applyTextStyles( const XmlFilterBase& rFilterBase )
OUString aStyle;
OUString aFamily;
- const OUString sOutline( "outline1" );
- const OUString sTitle( "title" );
- const OUString sStandard( "standard" );
- const OUString sSubtitle( "subtitle" );
+ static const OUStringLiteral sOutline( u"outline1" );
+ static const OUStringLiteral sTitle( u"title" );
+ static const OUStringLiteral sStandard( u"standard" );
+ static const OUStringLiteral sSubtitle( u"subtitle" );
for( int i = 0; i < 4; i++ ) // todo: aggregation of bodystyle (subtitle)
{
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 2d4e99c7be3f..d5ad6963ff85 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -311,7 +311,7 @@ void ShapeBase::finalizeFragmentImport()
else {
// Temporary fix, shapetype not found if referenced from different substream
// FIXME: extend scope of ShapeContainer to store all shapetypes from the document
- const OUString sShapeTypePrefix = "shapetype_";
+ static const OUStringLiteral sShapeTypePrefix = u"shapetype_";
OUString tmp;
if (aType.startsWith(sShapeTypePrefix)) {
maTypeModel.moShapeType = aType.copy(sShapeTypePrefix.getLength()).toInt32();