diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-15 11:05:19 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-19 10:29:31 +0200 |
commit | 610b2b94b33b0fc2d79cd515f9e293ca1c2610e8 (patch) | |
tree | 6eab2639cb8104ca54daa3f7a2ebd83ef1566cf0 /xmloff | |
parent | 2c35fff7eca3a143d28dc75e6a73fe1101d2af77 (diff) |
remove unnecessary use of OUString constructor when assigning
change code like
aStr = OUString("xxxx");
to
aStr = "xxxx";
Change-Id: Ib981a5cc735677ec5dba76ef9279a107d22e99d4
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/SchXMLSeries2Context.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLTools.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/draw/eventimp.cxx | 26 | ||||
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 29 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumi.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexTabStopEntryContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLTextListAutoStylePool.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 22 | ||||
-rw-r--r-- | xmloff/source/transform/TransformerBase.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/xforms/XFormsInstanceContext.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/xforms/xformsexport.cxx | 4 |
11 files changed, 56 insertions, 57 deletions
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index 61a287406620..29a08b648ab7 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -383,7 +383,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib && m_bStockHasVolume && mnSeriesIndex == 0 ) { - maSeriesChartTypeName = OUString( "com.sun.star.chart2.ColumnChartType" ); + maSeriesChartTypeName = "com.sun.star.chart2.ColumnChartType"; bIsCandleStick = false; } else @@ -425,7 +425,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib { OUString aMainRole("values-y"); if ( maSeriesChartTypeName == "com.sun.star.chart2.BubbleChartType" ) - aMainRole = OUString( "values-size" ); + aMainRole = "values-size"; xSeqProp->setPropertyValue("Role", uno::makeAny( aMainRole )); } xLabeledSeq->setValues( xSeq ); diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index 83930ca9c0c7..b686945d6954 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -293,13 +293,13 @@ XMLTokenEnum getTokenByChartType( if( bUseOldNames ) { - aPrefix = OUString( "com.sun.star.chart."); - aPostfix = OUString( "Diagram"); + aPrefix = "com.sun.star.chart."; + aPostfix = "Diagram"; } else { - aPrefix = OUString( "com.sun.star.chart2."); - aPostfix = OUString( "ChartType"); + aPrefix = "com.sun.star.chart2."; + aPostfix = "ChartType"; } if( rChartTypeService.match( aPrefix )) diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx index 7a2f5570b0d2..12b8f764f736 100644 --- a/xmloff/source/draw/eventimp.cxx +++ b/xmloff/source/draw/eventimp.cxx @@ -296,7 +296,7 @@ void SdXMLEventContext::EndElement() OUString sAPIEventName; uno::Sequence< beans::PropertyValue > aProperties; - sAPIEventName = OUString( "OnClick" ); + sAPIEventName = "OnClick"; if( mbScript ) meClickAction = ClickAction_MACRO; @@ -359,19 +359,19 @@ void SdXMLEventContext::EndElement() msMacroName = msMacroName.copy( rDoc.getLength()+1 ); } - pProperties->Name = OUString( "EventType" ); + pProperties->Name = "EventType"; pProperties->Handle = -1; pProperties->Value <<= OUString( "StarBasic" ); pProperties->State = beans::PropertyState_DIRECT_VALUE; pProperties++; - pProperties->Name = OUString( "MacroName" ); + pProperties->Name = "MacroName"; pProperties->Handle = -1; pProperties->Value <<= msMacroName; pProperties->State = beans::PropertyState_DIRECT_VALUE; pProperties++; - pProperties->Name = OUString( "Library" ); + pProperties->Name = "Library"; pProperties->Handle = -1; pProperties->Value <<= sLibrary; pProperties->State = beans::PropertyState_DIRECT_VALUE; @@ -385,7 +385,7 @@ void SdXMLEventContext::EndElement() pProperties->State = beans::PropertyState_DIRECT_VALUE; pProperties++; - pProperties->Name = OUString( "Script" ); + pProperties->Name = "Script"; pProperties->Handle = -1; pProperties->Value <<= msMacroName; pProperties->State = beans::PropertyState_DIRECT_VALUE; @@ -393,7 +393,7 @@ void SdXMLEventContext::EndElement() } else { - pProperties->Name = OUString( "EventType" ); + pProperties->Name = "EventType"; pProperties->Handle = -1; pProperties->Value <<= OUString( "Presentation" ); pProperties->State = beans::PropertyState_DIRECT_VALUE; @@ -407,7 +407,7 @@ void SdXMLEventContext::EndElement() meClickAction = ClickAction_DOCUMENT; } - pProperties->Name = OUString( "ClickAction" ); + pProperties->Name = "ClickAction"; pProperties->Handle = -1; pProperties->Value <<= meClickAction; pProperties->State = beans::PropertyState_DIRECT_VALUE; @@ -431,20 +431,20 @@ void SdXMLEventContext::EndElement() case ClickAction_DOCUMENT: case ClickAction_PROGRAM: - pProperties->Name = OUString( "Bookmark" ); + pProperties->Name = "Bookmark"; pProperties->Handle = -1; pProperties->Value <<= msBookmark; pProperties->State = beans::PropertyState_DIRECT_VALUE; break; case ClickAction_VANISH: - pProperties->Name = OUString( "Effect" ); + pProperties->Name = "Effect"; pProperties->Handle = -1; pProperties->Value <<= ImplSdXMLgetEffect( meEffect, meDirection, mnStartScale, true ); pProperties->State = beans::PropertyState_DIRECT_VALUE; pProperties++; - pProperties->Name = OUString( "Speed" ); + pProperties->Name = "Speed"; pProperties->Handle = -1; pProperties->Value <<= meSpeed; pProperties->State = beans::PropertyState_DIRECT_VALUE; @@ -453,20 +453,20 @@ void SdXMLEventContext::EndElement() // NOTE: no break here!!! case ClickAction_SOUND: - pProperties->Name = OUString( "SoundURL" ); + pProperties->Name = "SoundURL"; pProperties->Handle = -1; pProperties->Value <<= msSoundURL; pProperties->State = beans::PropertyState_DIRECT_VALUE; pProperties++; - pProperties->Name = OUString( "PlayFull" ); + pProperties->Name = "PlayFull"; pProperties->Handle = -1; pProperties->Value = ::cppu::bool2any(mbPlayFull); pProperties->State = beans::PropertyState_DIRECT_VALUE; break; case ClickAction_VERB: - pProperties->Name = OUString( "Verb" ); + pProperties->Name = "Verb"; pProperties->Handle = -1; pProperties->Value <<= mnVerb; pProperties->State = beans::PropertyState_DIRECT_VALUE; diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 421b11f620ed..32ed660aae4b 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -208,10 +208,10 @@ uno::Reference< drawing::XShape > XMLShapeExport::checkForCustomShapeReplacement { uno::Sequence< uno::Any > aArgument( 1 ); uno::Sequence< beans::PropertyValue > aPropValues( 2 ); - aPropValues[ 0 ].Name = OUString( "CustomShape" ); + aPropValues[ 0 ].Name = "CustomShape"; aPropValues[ 0 ].Value <<= xShape; sal_Bool bForceGroupWithText = sal_True; - aPropValues[ 1 ].Name = OUString( "ForceGroupWithText" ); + aPropValues[ 1 ].Name = "ForceGroupWithText"; aPropValues[ 1 ].Value <<= bForceGroupWithText; aArgument[ 0 ] <<= aPropValues; uno::Reference< uno::XInterface > xInterface( @@ -2773,8 +2773,7 @@ void XMLShapeExport::ImpExportOLE2Shape( { if( !sPersistName.isEmpty() ) { - sURL = OUString( "vnd.sun.star.EmbeddedObject:" ); - sURL += sPersistName; + sURL = "vnd.sun.star.EmbeddedObject:" + sPersistName; } } @@ -2841,7 +2840,7 @@ void XMLShapeExport::ImpExportOLE2Shape( OUString sURLRequest( sURL ); if ( ( mrExport.getExportFlags() & EXPORT_OASIS ) == 0 ) - sURLRequest += OUString( "?oasis=false" ); + sURLRequest += "?oasis=false"; mrExport.AddEmbeddedObjectAsBase64( sURLRequest ); } } @@ -3237,14 +3236,14 @@ void XMLShapeExport::ImpExportMediaShape( xPropSet->getPropertyValue("Zoom") >>= eZoom; switch( eZoom ) { - case( media::ZoomLevel_ZOOM_1_TO_4 ): aZoomValue = OUString( "25%" ); break; - case( media::ZoomLevel_ZOOM_1_TO_2 ): aZoomValue = OUString( "50%" ); break; - case( media::ZoomLevel_ORIGINAL ): aZoomValue = OUString( "100%" ); break; - case( media::ZoomLevel_ZOOM_2_TO_1 ): aZoomValue = OUString( "200%" ); break; - case( media::ZoomLevel_ZOOM_4_TO_1 ): aZoomValue = OUString( "400%" ); break; - case( media::ZoomLevel_FIT_TO_WINDOW ): aZoomValue = OUString( "fit" ); break; - case( media::ZoomLevel_FIT_TO_WINDOW_FIXED_ASPECT ): aZoomValue = OUString( "fixedfit" ); break; - case( media::ZoomLevel_FULLSCREEN ): aZoomValue = OUString( "fullscreen" ); break; + case( media::ZoomLevel_ZOOM_1_TO_4 ) : aZoomValue = "25%"; break; + case( media::ZoomLevel_ZOOM_1_TO_2 ) : aZoomValue = "50%"; break; + case( media::ZoomLevel_ORIGINAL ) : aZoomValue = "100%"; break; + case( media::ZoomLevel_ZOOM_2_TO_1 ) : aZoomValue = "200%"; break; + case( media::ZoomLevel_ZOOM_4_TO_1 ) : aZoomValue = "400%"; break; + case( media::ZoomLevel_FIT_TO_WINDOW ): aZoomValue = "fit"; break; + case( media::ZoomLevel_FIT_TO_WINDOW_FIXED_ASPECT ): aZoomValue = "fixedfit"; break; + case( media::ZoomLevel_FULLSCREEN ) : aZoomValue = "fullscreen"; break; default: break; @@ -4827,9 +4826,9 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape uno::Reference< graphic::XGraphicProvider > xProvider( graphic::GraphicProvider::create(xContext) ); uno::Sequence< beans::PropertyValue > aArgs( 2 ); - aArgs[ 0 ].Name = OUString( "MimeType" ); + aArgs[ 0 ].Name = "MimeType"; aArgs[ 0 ].Value <<= OUString( "image/x-vclgraphic" ); - aArgs[ 1 ].Name = OUString( "OutputStream" ); + aArgs[ 1 ].Name = "OutputStream"; aArgs[ 1 ].Value <<= xPictureStream->getOutputStream(); xProvider->storeGraphic( xGraphic, aArgs ); diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index d8b65c9a94dd..a85527b6ec06 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -524,7 +524,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties( bStarSymbol = sal_True; } if( bStarSymbol ) - aFDesc.Name = OUString( "StarSymbol" ); + aFDesc.Name = "StarSymbol" ; } // Must append 'cBullet' even if it is zero @@ -1283,13 +1283,13 @@ void SvxXMLListStyleContext::SetDefaultStyle( { // TODO: Bullet-Font awt::FontDescriptor aFDesc; - aFDesc.Name = OUString( + aFDesc.Name = #ifdef _WIN32 "StarBats" #else "starbats" #endif - ); + ; aFDesc.Family = FAMILY_DONTKNOW ; aFDesc.Pitch = PITCH_DONTKNOW ; aFDesc.CharSet = RTL_TEXTENCODING_SYMBOL ; diff --git a/xmloff/source/text/XMLIndexTabStopEntryContext.cxx b/xmloff/source/text/XMLIndexTabStopEntryContext.cxx index 7f6289df7785..6cacdc277e54 100644 --- a/xmloff/source/text/XMLIndexTabStopEntryContext.cxx +++ b/xmloff/source/text/XMLIndexTabStopEntryContext.cxx @@ -153,7 +153,7 @@ void XMLIndexTabStopEntryContext::FillPropertyValues( } // tab character #i21237# - pValues[nNextEntry].Name = OUString( "WithTab" ); + pValues[nNextEntry].Name = "WithTab"; pValues[nNextEntry].Value.setValue( &bWithTab, ::getBooleanCppuType()); nNextEntry++; diff --git a/xmloff/source/text/XMLTextListAutoStylePool.cxx b/xmloff/source/text/XMLTextListAutoStylePool.cxx index 1719a9e5aeae..99cfaa55a437 100644 --- a/xmloff/source/text/XMLTextListAutoStylePool.cxx +++ b/xmloff/source/text/XMLTextListAutoStylePool.cxx @@ -148,7 +148,7 @@ XMLTextListAutoStylePool::XMLTextListAutoStylePool( SvXMLExport& rExp ) : sal_uInt16 nExportFlags = rExport.getExportFlags(); sal_Bool bStylesOnly = (nExportFlags & EXPORT_STYLES) != 0 && (nExportFlags & EXPORT_CONTENT) == 0; if( bStylesOnly ) - sPrefix = OUString( "ML" ); + sPrefix = "ML"; } diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 755db3501381..f389b4d5c5f7 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -1279,31 +1279,31 @@ XMLTextParagraphExport::XMLTextParagraphExport( xPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_TEXT ); xTextPropMapper = new XMLTextExportPropertySetMapper( xPropMapper, GetExport() ); - sFamily = OUString( GetXMLToken(XML_TEXT) ); - aPrefix = OUString(static_cast<sal_Unicode>('T')); + sFamily = GetXMLToken(XML_TEXT); + aPrefix = "T"; rAutoStylePool.AddFamily( XML_STYLE_FAMILY_TEXT_TEXT, sFamily, xTextPropMapper, aPrefix ); xPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_AUTO_FRAME ); xAutoFramePropMapper = new XMLTextExportPropertySetMapper( xPropMapper, GetExport() ); - sFamily = OUString( XML_STYLE_FAMILY_SD_GRAPHICS_NAME ); - aPrefix = OUString( "fr" ); + sFamily = XML_STYLE_FAMILY_SD_GRAPHICS_NAME; + aPrefix = "fr"; rAutoStylePool.AddFamily( XML_STYLE_FAMILY_TEXT_FRAME, sFamily, xAutoFramePropMapper, aPrefix ); xPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_SECTION ); xSectionPropMapper = new XMLTextExportPropertySetMapper( xPropMapper, GetExport() ); - sFamily = OUString( GetXMLToken( XML_SECTION ) ); - aPrefix = OUString( "Sect" ); + sFamily = GetXMLToken( XML_SECTION ); + aPrefix = "Sect" ; rAutoStylePool.AddFamily( XML_STYLE_FAMILY_TEXT_SECTION, sFamily, xSectionPropMapper, aPrefix ); xPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_RUBY ); xRubyPropMapper = new SvXMLExportPropertyMapper( xPropMapper ); - sFamily = OUString( GetXMLToken( XML_RUBY ) ); - aPrefix = OUString( "Ru" ); + sFamily = GetXMLToken( XML_RUBY ); + aPrefix = "Ru"; rAutoStylePool.AddFamily( XML_STYLE_FAMILY_TEXT_RUBY, sFamily, xRubyPropMapper, aPrefix ); @@ -1464,17 +1464,17 @@ bool XMLTextParagraphExport::collectTextAutoStylesOptimized( sal_Bool bIsProgres { if ( 0 == i ) { - sName = OUString( "CharacterStyles" ); + sName = "CharacterStyles" ; nFamily = XML_STYLE_FAMILY_TEXT_TEXT; } else if ( 1 == i ) { - sName = OUString( "RubyStyles" ); + sName = "RubyStyles" ; nFamily = XML_STYLE_FAMILY_TEXT_RUBY; } else { - sName = OUString( "ParagraphStyles" ); + sName = "ParagraphStyles" ; nFamily = XML_STYLE_FAMILY_TEXT_PARAGRAPH; } diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx index 24202039ce31..487ed5b3c9f0 100644 --- a/xmloff/source/transform/TransformerBase.cxx +++ b/xmloff/source/transform/TransformerBase.cxx @@ -454,7 +454,7 @@ void SAL_CALL XMLTransformerBase::initialize( const Sequence< Any >& aArguments aAny = m_xPropSet->getPropertyValue(sPropName); aAny >>= sRelPath; } - sPropName = OUString( "StreamName" ); + sPropName = "StreamName"; if( xPropSetInfo->hasPropertyByName(sPropName) ) { aAny = m_xPropSet->getPropertyValue(sPropName); @@ -462,7 +462,7 @@ void SAL_CALL XMLTransformerBase::initialize( const Sequence< Any >& aArguments } if( !sName.isEmpty() ) { - m_aExtPathPrefix = OUString( "../" ); + m_aExtPathPrefix = "../"; // If there is a rel path within a package, then append // additional '../'. If the rel path contains an ':', then it is diff --git a/xmloff/source/xforms/XFormsInstanceContext.cxx b/xmloff/source/xforms/XFormsInstanceContext.cxx index 93107f2f822c..f6f01bb3858f 100644 --- a/xmloff/source/xforms/XFormsInstanceContext.cxx +++ b/xmloff/source/xforms/XFormsInstanceContext.cxx @@ -107,11 +107,11 @@ void XFormsInstanceContext::EndElement() { Sequence<PropertyValue> aSequence( 3 ); PropertyValue* pSequence = aSequence.getArray(); - pSequence[0].Name = OUString( "Instance" ); + pSequence[0].Name = "Instance"; pSequence[0].Value <<= mxInstance; - pSequence[1].Name = OUString( "ID" ); + pSequence[1].Name = "ID"; pSequence[1].Value <<= msId; - pSequence[2].Name = OUString( "URL" ); + pSequence[2].Name = "URL"; pSequence[2].Value <<= msURL; mxModel->getInstances()->insert( makeAny( aSequence ) ); diff --git a/xmloff/source/xforms/xformsexport.cxx b/xmloff/source/xforms/xformsexport.cxx index 9b5339908eee..c3629c029f04 100644 --- a/xmloff/source/xforms/xformsexport.cxx +++ b/xmloff/source/xforms/xformsexport.cxx @@ -793,7 +793,7 @@ void getXFormsSettings( const Reference< XNameAccess >& _rXForms, Sequence< Prop Reference< XPropertySet > xModelProps( _rXForms->getByName( *pModelName ), UNO_QUERY_THROW ); Sequence< PropertyValue > aModelSettings( 1 ); - aModelSettings[0].Name = OUString( "ExternalData" ); + aModelSettings[0].Name = "ExternalData"; aModelSettings[0].Value = xModelProps->getPropertyValue( aModelSettings[0].Name ); xModelSettings->insertByName( *pModelName, makeAny( aModelSettings ) ); @@ -802,7 +802,7 @@ void getXFormsSettings( const Reference< XNameAccess >& _rXForms, Sequence< Prop if ( xModelSettings->hasElements() ) { _out_rSettings.realloc( 1 ); - _out_rSettings[0].Name = OUString( "XFormModels" ); + _out_rSettings[0].Name = "XFormModels"; _out_rSettings[0].Value <<= xModelSettings; } } |