summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-30 16:38:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-31 08:56:20 +0000
commit1c3e84d8192218befebcddae2ed9842d081dc6c7 (patch)
treef4fc5cddd181d6d49bf55f74e6d3d107b8ae8d18 /xmloff
parente1e6cdbb1e9ff37f0bb740a70045c66953bec50c (diff)
teach lolugin:stringconstant about calling constructors
so we can remove unnecessary calls to the OUString(literal) constructor when calling constructors like this: Foo(OUString("xxx"), 1) Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36 Reviewed-on: https://gerrit.libreoffice.org/33698 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLChartContext.cxx14
-rw-r--r--xmloff/source/chart/SchXMLSeries2Context.cxx10
-rw-r--r--xmloff/source/forms/layerexport.cxx5
3 files changed, 13 insertions, 16 deletions
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index f9e2dab38a91..4ce36805398c 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -594,15 +594,15 @@ static void lcl_ApplyDataFromRectangularRangeToDiagram(
uno::Sequence< beans::PropertyValue > aArgs( 3 );
aArgs[0] = beans::PropertyValue(
- OUString( "CellRangeRepresentation" ),
+ "CellRangeRepresentation",
-1, uno::makeAny( rRectangularRange ),
beans::PropertyState_DIRECT_VALUE );
aArgs[1] = beans::PropertyValue(
- OUString( "DataRowSource" ),
+ "DataRowSource",
-1, uno::makeAny( eDataRowSource ),
beans::PropertyState_DIRECT_VALUE );
aArgs[2] = beans::PropertyValue(
- OUString( "FirstCellAsLabel" ),
+ "FirstCellAsLabel",
-1, uno::makeAny( bFirstCellAsLabel ),
beans::PropertyState_DIRECT_VALUE );
@@ -610,7 +610,7 @@ static void lcl_ApplyDataFromRectangularRangeToDiagram(
{
aArgs.realloc( aArgs.getLength() + 1 );
aArgs[ sal::static_int_cast<sal_uInt32>(aArgs.getLength()) - 1 ] = beans::PropertyValue(
- OUString( "SequenceMapping" ),
+ "SequenceMapping",
-1, uno::makeAny( !sColTrans.isEmpty()
? lcl_getNumberSequenceFromString( sColTrans, bHasCateories && !xNewDoc->hasInternalDataProvider() )
: lcl_getNumberSequenceFromString( sRowTrans, bHasCateories && !xNewDoc->hasInternalDataProvider() ) ),
@@ -636,7 +636,7 @@ static void lcl_ApplyDataFromRectangularRangeToDiagram(
{
aArgs.realloc( aArgs.getLength() + 1 );
aArgs[ sal::static_int_cast<sal_uInt32>(aArgs.getLength()) - 1 ] = beans::PropertyValue(
- OUString( "ChartOleObjectName" ),
+ "ChartOleObjectName",
-1, uno::makeAny( aChartOleObjectName ),
beans::PropertyState_DIRECT_VALUE );
}
@@ -647,11 +647,11 @@ static void lcl_ApplyDataFromRectangularRangeToDiagram(
aArgs.realloc( aArgs.getLength() + 2 );
aArgs[ sal::static_int_cast<sal_uInt32>(aArgs.getLength()) - 2 ] = beans::PropertyValue(
- OUString( "HasCategories" ),
+ "HasCategories",
-1, uno::makeAny( bHasCateories ),
beans::PropertyState_DIRECT_VALUE );
aArgs[ sal::static_int_cast<sal_uInt32>(aArgs.getLength()) - 1 ] = beans::PropertyValue(
- OUString("UseCategoriesAsX"),
+ "UseCategoriesAsX",
-1, uno::makeAny( false ),//categories in ODF files are not to be used as x values (independent from what is offered in our ui)
beans::PropertyState_DIRECT_VALUE );
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index 542255d7daae..70eda5253150 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -506,7 +506,7 @@ void SchXMLSeries2Context::EndElement()
//different handling for different chart types necessary
if( bIsScatterChart || ( nDomainCount==1 && !bIsBubbleChart ) )
{
- DomainInfo aDomainInfo( OUString( "values-x" ), m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress, m_rGlobalSeriesImportInfo.nFirstFirstDomainIndex ) ;
+ DomainInfo aDomainInfo( "values-x", m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress, m_rGlobalSeriesImportInfo.nFirstFirstDomainIndex ) ;
bool bCreateXValues = true;
if( !maDomainAddresses.empty() )
{
@@ -539,7 +539,7 @@ void SchXMLSeries2Context::EndElement()
{
if( nDomainCount>1 )
{
- DomainInfo aDomainInfo( OUString( "values-x" ), maDomainAddresses[1], m_rGlobalSeriesImportInfo.nCurrentDataIndex ) ;
+ DomainInfo aDomainInfo( "values-x", maDomainAddresses[1], m_rGlobalSeriesImportInfo.nCurrentDataIndex ) ;
if( m_rGlobalSeriesImportInfo.aFirstSecondDomainAddress.isEmpty() )
{
//for bubble chart the second domain contains the x values which should become an index smaller than y values for own data table
@@ -552,12 +552,12 @@ void SchXMLSeries2Context::EndElement()
}
else if( !m_rGlobalSeriesImportInfo.aFirstSecondDomainAddress.isEmpty() )
{
- DomainInfo aDomainInfo( OUString( "values-x" ), m_rGlobalSeriesImportInfo.aFirstSecondDomainAddress, m_rGlobalSeriesImportInfo.nFirstSecondDomainIndex ) ;
+ DomainInfo aDomainInfo( "values-x", m_rGlobalSeriesImportInfo.aFirstSecondDomainAddress, m_rGlobalSeriesImportInfo.nFirstSecondDomainIndex ) ;
aDomainInfos.push_back( aDomainInfo );
}
if( nDomainCount>0)
{
- DomainInfo aDomainInfo( OUString( "values-y" ), maDomainAddresses.front(), m_rGlobalSeriesImportInfo.nCurrentDataIndex ) ;
+ DomainInfo aDomainInfo( "values-y", maDomainAddresses.front(), m_rGlobalSeriesImportInfo.nCurrentDataIndex ) ;
if( m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress.isEmpty() )
{
m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress = maDomainAddresses.front();
@@ -568,7 +568,7 @@ void SchXMLSeries2Context::EndElement()
}
else if( !m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress.isEmpty() )
{
- DomainInfo aDomainInfo( OUString("values-y"), m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress, m_rGlobalSeriesImportInfo.nFirstFirstDomainIndex ) ;
+ DomainInfo aDomainInfo( "values-y", m_rGlobalSeriesImportInfo.aFirstFirstDomainAddress, m_rGlobalSeriesImportInfo.nFirstFirstDomainIndex ) ;
aDomainInfos.push_back( aDomainInfo );
}
}
diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx
index 068200dccad8..b2838447e2ca 100644
--- a/xmloff/source/forms/layerexport.cxx
+++ b/xmloff/source/forms/layerexport.cxx
@@ -716,10 +716,7 @@ namespace xmloff
{
// create it for en-US (does not really matter, as we will specify a locale for every
// concrete language to use)
- Locale aLocale ( OUString("en"),
- OUString("US"),
- OUString()
- );
+ Locale aLocale ( "en", "US", OUString() );
xFormatsSupplier = NumberFormatsSupplier::createWithLocale( m_rContext.getComponentContext(), aLocale );
m_xControlNumberFormats = xFormatsSupplier->getNumberFormats();
}