summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-31 13:10:08 +0200
committerNoel Grandin <noel@peralex.com>2013-11-07 13:22:56 +0200
commitc87a8fc6488dcbb2378acbfa921ec2d7ced0a73a (patch)
tree6f2159d78d421426b804b7aea1adccf53ac55460 /xmloff
parent98fd70592463ac6cc4df3bb535230780d44b9fbc (diff)
remove unnecessary use of OUString constructor in XMLOFF module
Change-Id: I3bb704d2b1063cd8c2c903cbfa237a7723c321d2
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx10
-rw-r--r--xmloff/source/core/xmlexp.cxx18
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx6
-rw-r--r--xmloff/source/meta/xmlmetai.cxx4
-rw-r--r--xmloff/source/style/numehelp.cxx2
-rw-r--r--xmloff/source/style/prstylei.cxx4
-rw-r--r--xmloff/source/text/txtstyli.cxx8
7 files changed, 24 insertions, 28 deletions
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 533c873a08b3..cf3f3771fbe3 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -1049,7 +1049,7 @@ SchXMLExportHelper_Impl::SchXMLExportHelper_Impl(
mbRowSourceColumns( sal_True ),
msCLSID( OUString( SvGlobalName( SO3_SCH_CLASSID ).GetHexName()))
{
- msTableName = OUString( "local-table" );
+ msTableName = "local-table";
// create property set mapper
mxPropertySetMapper = new XMLChartPropertySetMapper;
@@ -1227,12 +1227,12 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >&
{
OUString aDataProviderURL( ".." );
if( xNewDoc->hasInternalDataProvider() )
- aDataProviderURL = OUString( "." );
+ aDataProviderURL = ".";
else //special handling for data base data provider necessary
{
Reference< chart2::data::XDatabaseDataProvider > xDBDataProvider( xNewDoc->getDataProvider(), uno::UNO_QUERY );
if( xDBDataProvider.is() )
- aDataProviderURL = OUString( "." );
+ aDataProviderURL = ".";
}
mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, aDataProviderURL );
mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
@@ -2473,7 +2473,7 @@ void SchXMLExportHelper_Impl::exportAxes(
}
}
exportAxis( XML_X, XML_PRIMARY_X, xAxisProps, xNewAxis, aCategoriesRange, bHasXAxisTitle, bHasXAxisMajorGrid, bHasXAxisMinorGrid, bExportContent );
- aCategoriesRange = OUString();
+ aCategoriesRange = "";
}
// secondary x axis
@@ -2740,7 +2740,7 @@ void SchXMLExportHelper_Impl::exportSeries(
if ( nSeriesIdx == 0 && aRange.compareToAscii("label 1") == 0)
modifyLabelRange = true;
if (modifyLabelRange)
- aRange = OUString("label ") + OUString::number(aRange.copy( OUString("label").getLength()).toInt32() - 1);
+ aRange = "label " + OUString::number(aRange.copy( OUString("label").getLength()).toInt32() - 1);
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_LABEL_CELL_ADDRESS,
lcl_ConvertRange(
aRange,
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 0c28b7c4003f..4041196b2766 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -395,8 +395,8 @@ void SvXMLExport::_InitCtor()
mxAttrList = (xml::sax::XAttributeList*)mpAttrList;
- msGraphicObjectProtocol = OUString( "vnd.sun.star.GraphicObject:" );
- msEmbeddedObjectProtocol = OUString( "vnd.sun.star.EmbeddedObject:" );
+ msGraphicObjectProtocol = "vnd.sun.star.GraphicObject:";
+ msEmbeddedObjectProtocol = "vnd.sun.star.EmbeddedObject:";
if (mxModel.is() && !mxEventListener.is())
{
@@ -738,14 +738,14 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< uno::Any >& aArgumen
mpImpl->SetSchemeOf( msOrigFileName );
}
OUString sRelPath;
- sPropName = OUString( "StreamRelPath" );
+ sPropName = "StreamRelPath";
if( xPropertySetInfo->hasPropertyByName(sPropName) )
{
uno::Any aAny = mxExportInfo->getPropertyValue(sPropName);
aAny >>= sRelPath;
}
OUString sName;
- sPropName = OUString( "StreamName" );
+ sPropName = "StreamName";
if( xPropertySetInfo->hasPropertyByName(sPropName) )
{
uno::Any aAny = mxExportInfo->getPropertyValue(sPropName);
@@ -874,8 +874,8 @@ uno::Sequence< OUString > SAL_CALL SvXMLExport::getSupportedServiceNames( )
throw(uno::RuntimeException)
{
uno::Sequence<OUString> aSeq(2);
- aSeq[0] = OUString( "com.sun.star.document.ExportFilter");
- aSeq[1] = OUString( "com.sun.star.xml.XMLExportFilter");
+ aSeq[0] = "com.sun.star.document.ExportFilter";
+ aSeq[1] = "com.sun.star.xml.XMLExportFilter";
return aSeq;
}
@@ -1546,7 +1546,7 @@ void SvXMLExport::_ExportScripts()
if ( mnExportFlags & EXPORT_EMBEDDED )
{
OUString aValue( GetNamespaceMap().GetPrefixByKey( XML_NAMESPACE_OOO ) );
- aValue += OUString( ":Basic" );
+ aValue += ":Basic";
AddAttribute( XML_NAMESPACE_SCRIPT, XML_LANGUAGE, aValue );
SvXMLElementExport aElem( *this, XML_NAMESPACE_OFFICE, XML_SCRIPT, sal_True, sal_True );
@@ -1852,7 +1852,7 @@ void SvXMLExport::GetViewSettingsAndViews(uno::Sequence<beans::PropertyValue>& r
sal_Int32 nOldLength(rProps.getLength());
rProps.realloc(nOldLength + 1);
beans::PropertyValue aProp;
- aProp.Name = OUString("Views");
+ aProp.Name = "Views";
aProp.Value <<= xIndexAccess;
rProps[nOldLength] = aProp;
}
@@ -1921,7 +1921,7 @@ OUString SvXMLExport::AddEmbeddedGraphicObject( const OUString& rGraphicObjectUR
if( (getExportFlags() & EXPORT_EMBEDDED) == 0 )
sRet = mxGraphicResolver->resolveGraphicObjectURL( rGraphicObjectURL );
else
- sRet = OUString();
+ sRet = "";
}
else
sRet = GetRelativeReference( sRet );
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 092c5a0b8956..58cd9384850b 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -750,7 +750,7 @@ void SdXMLExport::ImpPrepAutoLayoutInfos()
sal_Bool SdXMLExport::ImpPrepAutoLayoutInfo(const Reference<XDrawPage>& xPage, OUString& rName)
{
- rName = OUString();
+ rName = "";
sal_Bool bRetval(sal_False);
Reference <beans::XPropertySet> xPropSet(xPage, UNO_QUERY);
@@ -1831,9 +1831,7 @@ void SdXMLExport::_ExportContent()
OUString aFileName( aBookmarkURL.copy( 0, nIndex ) );
OUString aBookmarkName( aBookmarkURL.copy( nIndex+1 ) );
- aBookmarkURL = GetRelativeReference( aFileName );
- aBookmarkURL += OUString(static_cast<sal_Unicode>('#'));
- aBookmarkURL += aBookmarkName;
+ aBookmarkURL = GetRelativeReference( aFileName ) + "#" + aBookmarkName;
}
AddAttribute ( XML_NAMESPACE_XLINK, XML_HREF, aBookmarkURL);
diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx
index 9f0c19378780..9952fb298320 100644
--- a/xmloff/source/meta/xmlmetai.cxx
+++ b/xmloff/source/meta/xmlmetai.cxx
@@ -258,11 +258,11 @@ void SvXMLMetaDocumentContext::setBuildId(OUString const& i_rBuildId, const uno:
|| i_rBuildId.startsWith("StarSuite 7")
|| i_rBuildId.startsWith("OpenOffice.org 1"))
{
- sBuildId = OUString("645$8687");
+ sBuildId = "645$8687";
}
else if (i_rBuildId.startsWith("NeoOffice/2"))
{
- sBuildId = OUString("680$9134"); // fake NeoOffice as OpenOffice.org 2.2 release
+ sBuildId = "680$9134"; // fake NeoOffice as OpenOffice.org 2.2 release
}
}
diff --git a/xmloff/source/style/numehelp.cxx b/xmloff/source/style/numehelp.cxx
index 33396f1ce78b..01128fd556ec 100644
--- a/xmloff/source/style/numehelp.cxx
+++ b/xmloff/source/style/numehelp.cxx
@@ -337,7 +337,7 @@ sal_Bool XMLNumberFormatAttributesExportHelper::GetCurrencySymbol(const sal_Int3
else
{
if ( rCurrencySymbol.getLength() == 1 && rCurrencySymbol.toChar() == NfCurrencyEntry::GetEuroSymbol() )
- rCurrencySymbol = OUString("EUR");
+ rCurrencySymbol = "EUR";
}
}
return sal_True;
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
index dcdb0ed533af..b7a0e6e7dfe5 100644
--- a/xmloff/source/style/prstylei.cxx
+++ b/xmloff/source/style/prstylei.cxx
@@ -194,7 +194,7 @@ void XMLPropStyleContext::CreateAndInsert( sal_Bool bOverwrite )
{
aValues.realloc( nLen + 2 );
PropertyValue *pProps = aValues.getArray() + nLen;
- pProps->Name = OUString("ParaStyleName");
+ pProps->Name = "ParaStyleName";
OUString sParent( GetParentName() );
if( !sParent.isEmpty() )
sParent = GetImport().GetStyleDisplayName( GetFamily(), sParent );
@@ -202,7 +202,7 @@ void XMLPropStyleContext::CreateAndInsert( sal_Bool bOverwrite )
sParent = OUString("Standard");
pProps->Value <<= sParent;
++pProps;
- pProps->Name = OUString("ParaConditionalStyleName");
+ pProps->Name = "ParaConditionalStyleName";
pProps->Value <<= sParent;
}
diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx
index d0b03e4391cf..b9a05031b5e3 100644
--- a/xmloff/source/text/txtstyli.cxx
+++ b/xmloff/source/text/txtstyli.cxx
@@ -515,13 +515,11 @@ void XMLTextStyleContext::FillPropertySet(
rAny >>= sFontName;
if ( !sFontName.isEmpty() )
{
- OUString sStarBats( "StarBats" );
- OUString sStarMath( "StarMath" );
- if ( sFontName.equalsIgnoreAsciiCase( sStarBats ) ||
- sFontName.equalsIgnoreAsciiCase( sStarMath ) )
+ if ( sFontName.equalsIgnoreAsciiCase( "StarBats" ) ||
+ sFontName.equalsIgnoreAsciiCase( "StarMath" ) )
{
// construct new value
- sFontName = OUString("StarSymbol");
+ sFontName = "StarSymbol";
Any aAny( rAny );
aAny <<= sFontName;