From d553aa44d2def412bafe33b9fe68c463e957bda5 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 6 Nov 2015 09:36:33 +0100 Subject: loplugin:stringconstant: elide explicit ctor usage (automatic rewrite) Change-Id: Ia944d081842753fcf82f77bda82defe1d5566b37 --- oox/source/core/fragmenthandler2.cxx | 2 +- oox/source/export/chartexport.cxx | 6 +++--- oox/source/ole/olehelper.cxx | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'oox') diff --git a/oox/source/core/fragmenthandler2.cxx b/oox/source/core/fragmenthandler2.cxx index 9ccfcd4ec012..5f7cb7f4d40b 100644 --- a/oox/source/core/fragmenthandler2.cxx +++ b/oox/source/core/fragmenthandler2.cxx @@ -60,7 +60,7 @@ bool FragmentHandler2::prepareMceContext( sal_Int32 nElement, const AttributeLis case MCE_TOKEN( Choice ): { - OUString aRequires = rAttribs.getString( ( XML_Requires ), OUString("none") ); + OUString aRequires = rAttribs.getString( ( XML_Requires ), "none" ); if (!getFilter().hasNamespaceURL(aRequires)) // Check to see if we have this namespace defined first, // because calling getNamespaceURL() would throw if the diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index f823c2723698..d3952fc150bc 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -279,7 +279,7 @@ Reference< chart2::data::XDataSource > lcl_pressUsedDataIntoRectangularFormat( c //the first x-values is always the next sequence //todo ... other x-values get lost for old format Reference< chart2::data::XLabeledDataSequence > xXValues( - lcl_getDataSequenceByRole( aSeriesSeqVector, OUString("values-x") ) ); + lcl_getDataSequenceByRole( aSeriesSeqVector, "values-x" ) ); if( xXValues.is() ) aLabeledSeqVector.push_back( xXValues ); @@ -2126,7 +2126,7 @@ void ChartExport::exportSeries( Reference xChartType, || (eChartType == chart::TYPEID_BUBBLE) ) { // export xVal - Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, OUString("values-x") ) ); + Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, "values-x" ) ); if( xSequence.is() ) { Reference< chart2::data::XDataSequence > xValues( xSequence->getValues() ); @@ -2138,7 +2138,7 @@ void ChartExport::exportSeries( Reference xChartType, if( eChartType == chart::TYPEID_BUBBLE ) { // export yVal - Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, OUString("values-y") ) ); + Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, "values-y" ) ); if( xSequence.is() ) { Reference< chart2::data::XDataSequence > xValues( xSequence->getValues() ); diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx index c33f417a244b..cf9bbed1fcfa 100644 --- a/oox/source/ole/olehelper.cxx +++ b/oox/source/ole/olehelper.cxx @@ -527,13 +527,13 @@ bool MSConvertOCXControls::ReadOCXStorage( tools::SvRef& xOleStg, { if ( xOleStg.Is() ) { - tools::SvRef pNameStream = xOleStg->OpenSotStream( OUString("\3OCXNAME")); + tools::SvRef pNameStream = xOleStg->OpenSotStream( "\3OCXNAME"); BinaryXInputStream aNameStream( Reference< XInputStream >( new utl::OSeekableInputStreamWrapper( *pNameStream ) ), true ); - tools::SvRef pContents = xOleStg->OpenSotStream( OUString("contents")); + tools::SvRef pContents = xOleStg->OpenSotStream( "contents"); BinaryXInputStream aInStrm( Reference< XInputStream >( new utl::OSeekableInputStreamWrapper( *pContents ) ), true ); - tools::SvRef pClsStrm = xOleStg->OpenSotStream(OUString("\1CompObj")); + tools::SvRef pClsStrm = xOleStg->OpenSotStream("\1CompObj"); BinaryXInputStream aClsStrm( Reference< XInputStream >( new utl::OSeekableInputStreamWrapper(*pClsStrm ) ), true ); aClsStrm.skip(12); @@ -588,17 +588,17 @@ bool MSConvertOCXControls::WriteOCXStream( const Reference< XModel >& rxModel, t rName = exportHelper.getTypeName(); xOleStg->SetClass( aName, SotClipboardFormatId::EMBEDDED_OBJ_OLE, sFullName); { - tools::SvRef pNameStream = xOleStg->OpenSotStream(OUString("\3OCXNAME")); + tools::SvRef pNameStream = xOleStg->OpenSotStream("\3OCXNAME"); Reference< XOutputStream > xOut = new utl::OSeekableOutputStreamWrapper( *pNameStream ); exportHelper.exportName( xOut ); } { - tools::SvRef pObjStream = xOleStg->OpenSotStream(OUString("\1CompObj")); + tools::SvRef pObjStream = xOleStg->OpenSotStream("\1CompObj"); Reference< XOutputStream > xOut = new utl::OSeekableOutputStreamWrapper( *pObjStream ); exportHelper.exportCompObj( xOut ); } { - tools::SvRef pContents = xOleStg->OpenSotStream(OUString("contents")); + tools::SvRef pContents = xOleStg->OpenSotStream("contents"); Reference< XOutputStream > xOut = new utl::OSeekableOutputStreamWrapper( *pContents ); exportHelper.exportControl( xOut, rSize ); } -- cgit v1.2.3