remove unnecessary use of OUString constructor in XMLOFF module

Change-Id: I3bb704d2b1063cd8c2c903cbfa237a7723c321d2
This commit is contained in:
Noel Grandin
2013-10-31 13:10:08 +02:00
parent 98fd705924
commit c87a8fc648
7 changed files with 24 additions and 28 deletions

View File

@@ -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,

View File

@@ -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 );

View File

@@ -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);

View File

@@ -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
}
}

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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;