diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-06-29 16:15:08 +0200 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-06-29 16:23:24 +0200 |
commit | 955ebe83a8e57a776044b7f7749b4701ba82b8f4 (patch) | |
tree | 1ead4da716db8f19b27d0cec2785301935ceea9d /xmloff | |
parent | remove some createFromAscii usage (diff) | |
download | core-955ebe83a8e57a776044b7f7749b4701ba82b8f4.tar.gz core-955ebe83a8e57a776044b7f7749b4701ba82b8f4.zip |
String to OUString and cleanup
Change-Id: Idc18c1a6a64edea3399c8747ec0f096a2f964b68
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/core/xmlimp.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/draw/xexptran.cxx | 58 | ||||
-rw-r--r-- | xmloff/source/style/XMLFontAutoStylePool.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/transform/StyleOOoTContext.cxx | 4 |
4 files changed, 33 insertions, 34 deletions
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index d76eefe95d0d..2e4eb46a33c4 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -1283,8 +1283,7 @@ OUString SvXMLImport::ResolveEmbeddedObjectURL( OUString sURL( rURL ); if( !rClassId.isEmpty() ) { - sURL += OUString( sal_Unicode('!') ); - sURL += rClassId; + sURL += "!" + rClassId; } sRet = mxEmbeddedResolver->resolveEmbeddedObjectURL( sURL ); } diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx index 127004d0a8de..06adb8a84951 100644 --- a/xmloff/source/draw/xexptran.cxx +++ b/xmloff/source/draw/xexptran.cxx @@ -397,8 +397,8 @@ void SdXMLImExTransform2D::AddSkewX(double fNew) const OUString& SdXMLImExTransform2D::GetExportString(const SvXMLUnitConverter& rConv) { OUString aNewString; - OUString aClosingBrace(sal_Unicode(')')); - OUString aEmptySpace(sal_Unicode(' ')); + OUString aClosingBrace(")"); + OUString aEmptySpace(" "); const sal_uInt32 nCount = maList.size(); for(sal_uInt32 a(0L); a < nCount; a++) @@ -836,8 +836,8 @@ void SdXMLImExTransform3D::AddHomogenMatrix(const drawing::HomogenMatrix& xHomMa const OUString& SdXMLImExTransform3D::GetExportString(const SvXMLUnitConverter& rConv) { OUString aNewString; - OUString aClosingBrace(sal_Unicode(')')); - OUString aEmptySpace(sal_Unicode(' ')); + OUString aClosingBrace(")"); + OUString aEmptySpace(" "); const sal_uInt32 nCount = maList.size(); for(sal_uInt32 a(0L); a < nCount; a++) @@ -1275,7 +1275,7 @@ SdXMLImExViewBox::SdXMLImExViewBox(const OUString& rNew, const SvXMLUnitConverte const OUString& SdXMLImExViewBox::GetExportString() { OUString aNewString; - OUString aEmptySpace(sal_Unicode(' ')); + OUString aEmptySpace(" "); Imp_PutNumberChar(aNewString, mnX); aNewString += aEmptySpace; @@ -1346,12 +1346,12 @@ SdXMLImExPointsElement::SdXMLImExPointsElement(drawing::PointSequence* pPoints, // X and comma Imp_PutNumberChar(aNewString, nX); - aNewString += OUString(static_cast<sal_Unicode>(',')); + aNewString += ","; // Y and space (not for last) Imp_PutNumberChar(aNewString, nY); if(a + 1 != nCnt) - aNewString += OUString(static_cast<sal_Unicode>(' ')); + aNewString += " "; // next point pArray++; @@ -1725,7 +1725,7 @@ void SdXMLImExSvgDElement::AddPolygon( if(mbRelative) { if(aLastCommand != sal_Unicode('t')) - aNewString += OUString(sal_Unicode('t')); + aNewString += "t"; Imp_PutNumberCharWithSpace(aNewString, nX - mnLastX); Imp_PutNumberCharWithSpace(aNewString, nY - mnLastY); @@ -1735,7 +1735,7 @@ void SdXMLImExSvgDElement::AddPolygon( else { if(aLastCommand != sal_Unicode('T')) - aNewString += OUString(sal_Unicode('T')); + aNewString += "T"; Imp_PutNumberCharWithSpace(aNewString, nX); Imp_PutNumberCharWithSpace(aNewString, nY); @@ -1755,7 +1755,7 @@ void SdXMLImExSvgDElement::AddPolygon( if(mbRelative) { if(aLastCommand != sal_Unicode('q')) - aNewString += OUString(sal_Unicode('q')); + aNewString += "q"; Imp_PutNumberCharWithSpace(aNewString, nX1 - mnLastX); Imp_PutNumberCharWithSpace(aNewString, nY1 - mnLastY); @@ -1767,7 +1767,7 @@ void SdXMLImExSvgDElement::AddPolygon( else { if(aLastCommand != sal_Unicode('Q')) - aNewString += OUString(sal_Unicode('Q')); + aNewString += "Q"; Imp_PutNumberCharWithSpace(aNewString, nX1); Imp_PutNumberCharWithSpace(aNewString, nY1); @@ -1817,7 +1817,7 @@ void SdXMLImExSvgDElement::AddPolygon( if(mbRelative) { if(aLastCommand != sal_Unicode('t')) - aNewString += OUString(static_cast<sal_Unicode>('t')); + aNewString += "t"; Imp_PutNumberCharWithSpace(aNewString, nX - mnLastX); Imp_PutNumberCharWithSpace(aNewString, nY - mnLastY); @@ -1827,7 +1827,7 @@ void SdXMLImExSvgDElement::AddPolygon( else { if(aLastCommand != sal_Unicode('T')) - aNewString += OUString(static_cast<sal_Unicode>('T')); + aNewString += "T"; Imp_PutNumberCharWithSpace(aNewString, nX); Imp_PutNumberCharWithSpace(aNewString, nY); @@ -1847,7 +1847,7 @@ void SdXMLImExSvgDElement::AddPolygon( if(mbRelative) { if(aLastCommand != sal_Unicode('q')) - aNewString += OUString(static_cast<sal_Unicode>('q')); + aNewString += "q"; Imp_PutNumberCharWithSpace(aNewString, nX1 - mnLastX); Imp_PutNumberCharWithSpace(aNewString, nY1 - mnLastY); @@ -1859,7 +1859,7 @@ void SdXMLImExSvgDElement::AddPolygon( else { if(aLastCommand != sal_Unicode('Q')) - aNewString += OUString(static_cast<sal_Unicode>('Q')); + aNewString += "Q"; Imp_PutNumberCharWithSpace(aNewString, nX1); Imp_PutNumberCharWithSpace(aNewString, nY1); @@ -1906,7 +1906,7 @@ void SdXMLImExSvgDElement::AddPolygon( if(mbRelative) { if(aLastCommand != sal_Unicode('s')) - aNewString += OUString(static_cast<sal_Unicode>('s')); + aNewString += "s"; Imp_PutNumberCharWithSpace(aNewString, nX2 - mnLastX); Imp_PutNumberCharWithSpace(aNewString, nY2 - mnLastY); @@ -1918,7 +1918,7 @@ void SdXMLImExSvgDElement::AddPolygon( else { if(aLastCommand != sal_Unicode('S')) - aNewString += OUString(static_cast<sal_Unicode>('S')); + aNewString += "S"; Imp_PutNumberCharWithSpace(aNewString, nX2); Imp_PutNumberCharWithSpace(aNewString, nY2); @@ -1940,7 +1940,7 @@ void SdXMLImExSvgDElement::AddPolygon( if(mbRelative) { if(aLastCommand != sal_Unicode('c')) - aNewString += OUString(static_cast<sal_Unicode>('c')); + aNewString += "c"; Imp_PutNumberCharWithSpace(aNewString, nX1 - mnLastX); Imp_PutNumberCharWithSpace(aNewString, nY1 - mnLastY); @@ -1954,7 +1954,7 @@ void SdXMLImExSvgDElement::AddPolygon( else { if(aLastCommand != sal_Unicode('C')) - aNewString += OUString(static_cast<sal_Unicode>('C')); + aNewString += "C"; Imp_PutNumberCharWithSpace(aNewString, nX1); Imp_PutNumberCharWithSpace(aNewString, nY1); @@ -1996,7 +1996,7 @@ void SdXMLImExSvgDElement::AddPolygon( if(mbRelative) { if(aLastCommand != sal_Unicode('v')) - aNewString += OUString(static_cast<sal_Unicode>('v')); + aNewString += "v"; Imp_PutNumberCharWithSpace(aNewString, nY - mnLastY); @@ -2005,7 +2005,7 @@ void SdXMLImExSvgDElement::AddPolygon( else { if(aLastCommand != sal_Unicode('V')) - aNewString += OUString(static_cast<sal_Unicode>('V')); + aNewString += "V"; Imp_PutNumberCharWithSpace(aNewString, nY); @@ -2017,7 +2017,7 @@ void SdXMLImExSvgDElement::AddPolygon( if(mbRelative) { if(aLastCommand != sal_Unicode('h')) - aNewString += OUString(static_cast<sal_Unicode>('h')); + aNewString += "h"; Imp_PutNumberCharWithSpace(aNewString, nX - mnLastX); @@ -2026,7 +2026,7 @@ void SdXMLImExSvgDElement::AddPolygon( else { if(aLastCommand != sal_Unicode('H')) - aNewString += OUString(static_cast<sal_Unicode>('H')); + aNewString += "H"; Imp_PutNumberCharWithSpace(aNewString, nX); @@ -2038,7 +2038,7 @@ void SdXMLImExSvgDElement::AddPolygon( if(mbRelative) { if(aLastCommand != sal_Unicode('l')) - aNewString += OUString(static_cast<sal_Unicode>('l')); + aNewString += "l"; Imp_PutNumberCharWithSpace(aNewString, nX - mnLastX); Imp_PutNumberCharWithSpace(aNewString, nY - mnLastY); @@ -2048,7 +2048,7 @@ void SdXMLImExSvgDElement::AddPolygon( else { if(aLastCommand != sal_Unicode('L')) - aNewString += OUString(static_cast<sal_Unicode>('L')); + aNewString += "L"; Imp_PutNumberCharWithSpace(aNewString, nX); Imp_PutNumberCharWithSpace(aNewString, nY); @@ -2062,7 +2062,7 @@ void SdXMLImExSvgDElement::AddPolygon( // write as start point if(mbRelative) { - aNewString += OUString(static_cast<sal_Unicode>('m')); + aNewString += "m"; Imp_PutNumberCharWithSpace(aNewString, nX - mnLastX); Imp_PutNumberCharWithSpace(aNewString, nY - mnLastY); @@ -2071,7 +2071,7 @@ void SdXMLImExSvgDElement::AddPolygon( } else { - aNewString += OUString(static_cast<sal_Unicode>('M')); + aNewString += "M"; Imp_PutNumberCharWithSpace(aNewString, nX); Imp_PutNumberCharWithSpace(aNewString, nY); @@ -2099,9 +2099,9 @@ void SdXMLImExSvgDElement::AddPolygon( if(bClosed) { if(mbRelative) - aNewString += OUString(static_cast<sal_Unicode>('z')); + aNewString += "z"; else - aNewString += OUString(static_cast<sal_Unicode>('Z')); + aNewString += "Z"; // update current point - we're back at the start if( bDidWriteStart ) diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx index 1f56d66dfa2f..e02d62f94603 100644 --- a/xmloff/source/style/XMLFontAutoStylePool.cxx +++ b/xmloff/source/style/XMLFontAutoStylePool.cxx @@ -162,7 +162,7 @@ OUString XMLFontAutoStylePool::Add( else { OUString sName; - sal_Int32 nLen = rFamilyName.indexOf( sal_Unicode(';'), 0 ); + sal_Int32 nLen = rFamilyName.indexOf( ';', 0 ); if( -1 == nLen ) { sName = rFamilyName; diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx index 5432f85e5d61..a56827e82ab3 100644 --- a/xmloff/source/transform/StyleOOoTContext.cxx +++ b/xmloff/source/transform/StyleOOoTContext.cxx @@ -867,7 +867,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement( case XML_ATACTION_CAPTION_ESCAPE_OOO: { OUString aAttrValue( sAttrValue ); - if( aAttrValue.indexOf( sal_Unicode('%') ) != -1 ) + if( aAttrValue.indexOf( '%' ) != -1 ) { sal_Int32 nValue = 0; ::sax::Converter::convertPercent( nValue, sAttrValue ); @@ -952,7 +952,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement( case XML_ATACTION_OPACITY_FIX: { sal_Int32 nValue; - if( sAttrValue.indexOf( sal_Unicode('%') ) != -1 ) + if( sAttrValue.indexOf( '%' ) != -1 ) { ::sax::Converter::convertPercent( nValue, sAttrValue ); } |