diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-03-25 09:53:33 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-03-25 10:06:26 +0100 |
commit | a0656ec6fc2b41e65f1b40dbd64f546175e2762f (patch) | |
tree | c0d3443a27d9dc10266760110e96b50cce46ef02 /xmloff/source/draw | |
parent | e9c6fd6b4d09ee59b6a86942cbf001f2ba9782e6 (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 'xmloff/source/draw')
-rw-r--r-- | xmloff/source/draw/XMLGraphicsDefaultStyle.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/draw/layerexp.cxx | 12 | ||||
-rw-r--r-- | xmloff/source/draw/sdxmlexp.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 16 | ||||
-rw-r--r-- | xmloff/source/draw/xexptran.cxx | 24 | ||||
-rw-r--r-- | xmloff/source/draw/ximppage.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/draw/ximpshap.cxx | 16 |
7 files changed, 43 insertions, 43 deletions
diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx index c6c07e27ebcc..2224b236c7aa 100644 --- a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx +++ b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx @@ -122,7 +122,7 @@ void XMLGraphicsDefaultStyle::SetDefaults() ) ) bWordWrapDefault = false; - const OUString sTextWordWrap( "TextWordWrap" ); + static const OUStringLiteral sTextWordWrap( u"TextWordWrap" ); Reference< XPropertySetInfo > xInfo( xDefaults->getPropertySetInfo() ); if ( xInfo->hasPropertyByName( sTextWordWrap ) ) xDefaults->setPropertyValue( sTextWordWrap, Any( bWordWrapDefault ) ); diff --git a/xmloff/source/draw/layerexp.cxx b/xmloff/source/draw/layerexp.cxx index 36f74ba5696d..9ac924e92c6c 100644 --- a/xmloff/source/draw/layerexp.cxx +++ b/xmloff/source/draw/layerexp.cxx @@ -53,12 +53,12 @@ void SdXMLayerExporter::exportLayer( SvXMLExport& rExport ) if( nCount == 0 ) return; - const OUString strName( "Name" ); - const OUString strTitle( "Title" ); - const OUString strDescription( "Description" ); - const OUString strIsVisible( "IsVisible"); - const OUString strIsPrintable( "IsPrintable"); - const OUString strIsLocked( "IsLocked" ); + static const OUStringLiteral strName( u"Name" ); + static const OUStringLiteral strTitle( u"Title" ); + static const OUStringLiteral strDescription( u"Description" ); + static const OUStringLiteral strIsVisible( u"IsVisible"); + static const OUStringLiteral strIsPrintable( u"IsPrintable"); + static const OUStringLiteral strIsLocked( u"IsLocked" ); OUString sTmp; diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 515644f953cd..bab2dc2aa27f 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -1373,7 +1373,7 @@ HeaderFooterPageSettingsImpl SdXMLExport::ImpPrepDrawPageHeaderFooterDecls( cons OUString aStrText; - const OUString aStrHeaderTextProp( "HeaderText" ); + static const OUStringLiteral aStrHeaderTextProp( u"HeaderText" ); if( xInfo->hasPropertyByName( aStrHeaderTextProp ) ) { xSet->getPropertyValue( aStrHeaderTextProp ) >>= aStrText; @@ -1381,7 +1381,7 @@ HeaderFooterPageSettingsImpl SdXMLExport::ImpPrepDrawPageHeaderFooterDecls( cons aSettings.maStrHeaderDeclName = findOrAppendImpl( maHeaderDeclsVector, aStrText, gpStrHeaderTextPrefix ); } - const OUString aStrFooterTextProp( "FooterText" ); + static const OUStringLiteral aStrFooterTextProp( u"FooterText" ); if( xInfo->hasPropertyByName( aStrFooterTextProp ) ) { xSet->getPropertyValue( aStrFooterTextProp ) >>= aStrText; @@ -1389,7 +1389,7 @@ HeaderFooterPageSettingsImpl SdXMLExport::ImpPrepDrawPageHeaderFooterDecls( cons aSettings.maStrFooterDeclName = findOrAppendImpl( maFooterDeclsVector, aStrText, gpStrFooterTextPrefix ); } - const OUString aStrDateTimeTextProp( "DateTimeText" ); + static const OUStringLiteral aStrDateTimeTextProp( u"DateTimeText" ); if( xInfo->hasPropertyByName( aStrDateTimeTextProp ) ) { bool bFixed = false; @@ -1507,7 +1507,7 @@ OUString SdXMLExport::ImpCreatePresPageStyleName( const Reference<XDrawPage>& xD // which itself is a property of the pages property set // we now merge these two propertysets if possible to simulate // a single propertyset with all draw page properties - const OUString aBackground("Background"); + static const OUStringLiteral aBackground(u"Background"); Reference< beans::XPropertySet > xPropSet2; Reference< beans::XPropertySetInfo > xInfo( xPropSet1->getPropertySetInfo() ); if( xInfo.is() && xInfo->hasPropertyByName( aBackground ) ) diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 27f280d7ed9b..823f4dbefb3a 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -2345,7 +2345,7 @@ namespace OUString getNameFromStreamURL(OUString const & rURL) { - const OUString sPackageURL("vnd.sun.star.Package:"); + static const OUStringLiteral sPackageURL(u"vnd.sun.star.Package:"); OUString sResult; @@ -3017,7 +3017,7 @@ void XMLShapeExport::ImpExportPageShape( // export page number used for this page uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() ); - const OUString aPageNumberStr("PageNumber"); + static const OUStringLiteral aPageNumberStr(u"PageNumber"); if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(aPageNumberStr)) { sal_Int32 nPageNumber = 0; @@ -3338,14 +3338,14 @@ void XMLShapeExport::ImpExportMediaShape( const OUString aFalseStr( "false" ), aTrueStr( "true" ); bool bLoop = false; - const OUString aLoopStr( "Loop" ); + static const OUStringLiteral aLoopStr( u"Loop" ); xPropSet->getPropertyValue( aLoopStr ) >>= bLoop; mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, aLoopStr ); mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_VALUE, bLoop ? aTrueStr : aFalseStr ); delete new SvXMLElementExport( mrExport, XML_NAMESPACE_DRAW, XML_PARAM, false, true ); bool bMute = false; - const OUString aMuteStr( "Mute" ); + static const OUStringLiteral aMuteStr( u"Mute" ); xPropSet->getPropertyValue( aMuteStr ) >>= bMute; mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, aMuteStr ); mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_VALUE, bMute ? aTrueStr : aFalseStr ); @@ -3709,9 +3709,9 @@ void XMLShapeExport::export3DLamps( const css::uno::Reference< css::beans::XProp OUString aStr; OUStringBuffer sStringBuffer; - const OUString aColorPropName("D3DSceneLightColor"); - const OUString aDirectionPropName("D3DSceneLightDirection"); - const OUString aLightOnPropName("D3DSceneLightOn"); + static const OUStringLiteral aColorPropName(u"D3DSceneLightColor"); + static const OUStringLiteral aDirectionPropName(u"D3DSceneLightDirection"); + static const OUStringLiteral aLightOnPropName(u"D3DSceneLightOn"); ::basegfx::B3DVector aLightDirection; drawing::Direction3D aLightDir; @@ -4163,7 +4163,7 @@ static void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Referenc uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() ); // geometry - const OUString sCustomShapeGeometry( "CustomShapeGeometry" ); + static const OUStringLiteral sCustomShapeGeometry( u"CustomShapeGeometry" ); if ( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName( sCustomShapeGeometry ) ) { uno::Any aGeoPropSet( xPropSet->getPropertyValue( sCustomShapeGeometry ) ); diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx index ce3eeac8d45f..c8e7f51bb403 100644 --- a/xmloff/source/draw/xexptran.cxx +++ b/xmloff/source/draw/xexptran.cxx @@ -357,12 +357,12 @@ void SdXMLImExTransform2D::SetString(const OUString& rNew, const SvXMLUnitConver const OUString aStr = msString; const sal_Int32 nLen(aStr.getLength()); - const OUString aString_rotate( "rotate" ); - const OUString aString_scale( "scale" ); - const OUString aString_translate( "translate" ); - const OUString aString_skewX( "skewX" ); - const OUString aString_skewY( "skewY" ); - const OUString aString_matrix( "matrix" ); + static const OUStringLiteral aString_rotate( u"rotate" ); + static const OUStringLiteral aString_scale( u"scale" ); + static const OUStringLiteral aString_translate( u"translate" ); + static const OUStringLiteral aString_skewX( u"skewX" ); + static const OUStringLiteral aString_skewY( u"skewY" ); + static const OUStringLiteral aString_matrix( u"matrix" ); sal_Int32 nPos(0); @@ -764,12 +764,12 @@ void SdXMLImExTransform3D::SetString(const OUString& rNew, const SvXMLUnitConver const OUString aStr = msString; const sal_Int32 nLen(aStr.getLength()); - const OUString aString_rotatex( "rotatex" ); - const OUString aString_rotatey( "rotatey" ); - const OUString aString_rotatez( "rotatez" ); - const OUString aString_scale( "scale" ); - const OUString aString_translate( "translate" ); - const OUString aString_matrix( "matrix" ); + static const OUStringLiteral aString_rotatex( u"rotatex" ); + static const OUStringLiteral aString_rotatey( u"rotatey" ); + static const OUStringLiteral aString_rotatez( u"rotatez" ); + static const OUStringLiteral aString_scale( u"scale" ); + static const OUStringLiteral aString_translate( u"translate" ); + static const OUStringLiteral aString_matrix( u"matrix" ); sal_Int32 nPos(0); diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx index be6732d5fe96..c6777d015236 100644 --- a/xmloff/source/draw/ximppage.cxx +++ b/xmloff/source/draw/ximppage.cxx @@ -286,7 +286,7 @@ void SdXMLGenericPageContext::endFastElement(sal_Int32 ) if( !maUseHeaderDeclName.isEmpty() ) { - const OUString aStrHeaderTextProp( "HeaderText" ); + static const OUStringLiteral aStrHeaderTextProp( u"HeaderText" ); if( xInfo->hasPropertyByName( aStrHeaderTextProp ) ) xSet->setPropertyValue( aStrHeaderTextProp, makeAny( GetSdImport().GetHeaderDecl( maUseHeaderDeclName ) ) ); @@ -294,7 +294,7 @@ void SdXMLGenericPageContext::endFastElement(sal_Int32 ) if( !maUseFooterDeclName.isEmpty() ) { - const OUString aStrFooterTextProp( "FooterText" ); + static const OUStringLiteral aStrFooterTextProp( u"FooterText" ); if( xInfo->hasPropertyByName( aStrFooterTextProp ) ) xSet->setPropertyValue( aStrFooterTextProp, makeAny( GetSdImport().GetFooterDecl( maUseFooterDeclName ) ) ); @@ -302,7 +302,7 @@ void SdXMLGenericPageContext::endFastElement(sal_Int32 ) if( !maUseDateTimeDeclName.isEmpty() ) { - const OUString aStrDateTimeTextProp( "DateTimeText" ); + static const OUStringLiteral aStrDateTimeTextProp( u"DateTimeText" ); if( xInfo->hasPropertyByName( aStrDateTimeTextProp ) ) { bool bFixed; @@ -369,7 +369,7 @@ void SdXMLGenericPageContext::SetStyle( OUString const & rStyleName ) Reference< beans::XPropertySet > xPropSet( xPropSet1 ); Reference< beans::XPropertySet > xBackgroundSet; - const OUString aBackground("Background"); + static const OUStringLiteral aBackground(u"Background"); if( xPropSet1->getPropertySetInfo()->hasPropertyByName( aBackground ) ) { Reference< beans::XPropertySetInfo > xInfo( xPropSet1->getPropertySetInfo() ); diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index 1e2d11f6e850..a1fdad1cc41c 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -2158,7 +2158,7 @@ void SdXMLPageShapeContext::startFastElement (sal_Int32 nElement, if(xPropSet.is()) { uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() ); - const OUString aPageNumberStr("PageNumber"); + static const OUStringLiteral aPageNumberStr(u"PageNumber"); if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(aPageNumberStr)) xPropSet->setPropertyValue(aPageNumberStr, uno::makeAny( mnPageNumber )); } @@ -2585,7 +2585,7 @@ void SdXMLObjectShapeContext::startFastElement (sal_Int32 /*nElement*/, if ( GetImport().IsPackageURL( maHref ) ) { - const OUString sURL( "vnd.sun.star.EmbeddedObject:" ); + static const OUStringLiteral sURL( u"vnd.sun.star.EmbeddedObject:" ); if ( aPersistName.startsWith( sURL ) ) aPersistName = aPersistName.copy( sURL.getLength() ); @@ -2633,7 +2633,7 @@ void SdXMLObjectShapeContext::endFastElement(sal_Int32 nElement) if( mxBase64Stream.is() ) { OUString aPersistName( GetImport().ResolveEmbeddedObjectURLFromBase64() ); - const OUString sURL( "vnd.sun.star.EmbeddedObject:" ); + static const OUStringLiteral sURL( u"vnd.sun.star.EmbeddedObject:" ); aPersistName = aPersistName.copy( sURL.getLength() ); @@ -2942,7 +2942,7 @@ void SdXMLPluginShapeContext::endFastElement(sal_Int32 nElement) { if ( maSize.Width && maSize.Height ) { - const OUString sVisibleArea( "VisibleArea" ); + static const OUStringLiteral sVisibleArea( u"VisibleArea" ); uno::Reference< beans::XPropertySetInfo > aXPropSetInfo( xProps->getPropertySetInfo() ); if ( !aXPropSetInfo.is() || aXPropSetInfo->hasPropertyByName( sVisibleArea ) ) { @@ -3588,10 +3588,10 @@ void SdXMLCustomShapeContext::endFastElement(sal_Int32 nElement) if (aScale.getX() < 0.0) { - const OUString sName("MirroredX"); + static const OUStringLiteral sName(u"MirroredX"); //fdo#84043 Merge, if property exists, otherwise append it auto aI = std::find_if(maCustomShapeGeometry.begin(), maCustomShapeGeometry.end(), - [&sName](beans::PropertyValue& rValue) { return rValue.Name == sName; }); + [](beans::PropertyValue& rValue) { return rValue.Name == sName; }); if (aI != maCustomShapeGeometry.end()) { beans::PropertyValue& rItem = *aI; @@ -3614,10 +3614,10 @@ void SdXMLCustomShapeContext::endFastElement(sal_Int32 nElement) if (aScale.getY() < 0.0) { - const OUString sName("MirroredY"); + static const OUStringLiteral sName(u"MirroredY"); //fdo#84043 Merge, if property exists, otherwise append it auto aI = std::find_if(maCustomShapeGeometry.begin(), maCustomShapeGeometry.end(), - [&sName](beans::PropertyValue& rValue) { return rValue.Name == sName; }); + [](beans::PropertyValue& rValue) { return rValue.Name == sName; }); if (aI != maCustomShapeGeometry.end()) { beans::PropertyValue& rItem = *aI; |