summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-01-29 21:05:26 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-01-30 13:18:36 +0000
commite216078272373b2d7a96929437b5e5986b4ec185 (patch)
treec1920b3d6d07ba482fefa2545ccc282f99da20d4 /xmloff
parent5d138c0de15ee9bd3fe7d35a194935073813092b (diff)
reduce unnecessary includes
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/inc/xmloff/xmlimp.hxx4
-rw-r--r--xmloff/source/core/RDFaImportHelper.cxx2
-rw-r--r--xmloff/source/core/xmlimp.cxx5
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx3
-rw-r--r--xmloff/source/draw/shapeexport.cxx1
-rw-r--r--xmloff/source/draw/shapeexport4.cxx5
-rw-r--r--xmloff/source/draw/xexptran.cxx43
-rw-r--r--xmloff/source/draw/ximpbody.cxx3
-rw-r--r--xmloff/source/draw/ximpshap.cxx1
-rw-r--r--xmloff/source/style/fonthdl.cxx15
-rw-r--r--xmloff/source/text/txtparae.cxx9
11 files changed, 39 insertions, 52 deletions
diff --git a/xmloff/inc/xmloff/xmlimp.hxx b/xmloff/inc/xmloff/xmlimp.hxx
index eb8b950ee867..2f00ffa08142 100644
--- a/xmloff/inc/xmloff/xmlimp.hxx
+++ b/xmloff/inc/xmloff/xmlimp.hxx
@@ -397,8 +397,8 @@ public:
sal_Bool IsTextDocInOOoFileFormat() const;
- String GetBaseURL() const;
- String GetDocumentBase() const;
+ ::rtl::OUString GetBaseURL() const;
+ ::rtl::OUString GetDocumentBase() const;
/// name of stream in package, e.g., "content.xml"
::rtl::OUString GetStreamName() const;
diff --git a/xmloff/source/core/RDFaImportHelper.cxx b/xmloff/source/core/RDFaImportHelper.cxx
index ff625d8fb071..6b980d4a36e2 100644
--- a/xmloff/source/core/RDFaImportHelper.cxx
+++ b/xmloff/source/core/RDFaImportHelper.cxx
@@ -34,8 +34,6 @@
#include <comphelper/sequenceasvector.hxx>
-#include <tools/string.hxx> // for GetAbsoluteReference
-
#include <com/sun/star/rdf/URI.hpp>
#include <com/sun/star/rdf/XDocumentMetadataAccess.hpp>
#include <com/sun/star/rdf/XDocumentRepository.hpp>
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 6213ad9b69df..e8f59b50637d 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -59,7 +59,6 @@
#include <comphelper/namecontainer.hxx>
#include <comphelper/servicehelper.hxx>
#include <rtl/logfile.hxx>
-#include <tools/string.hxx> // used in StartElement for logging
#include <cppuhelper/implbase1.hxx>
#include <comphelper/extract.hxx>
#include <comphelper/processfactory.hxx>
@@ -1779,12 +1778,12 @@ SvXMLImport::GetComponentContext() const
return mpImpl->mxComponentContext;
}
-String SvXMLImport::GetBaseURL() const
+::rtl::OUString SvXMLImport::GetBaseURL() const
{
return mpImpl->aBaseURL.GetMainURL( INetURLObject::NO_DECODE );
}
-String SvXMLImport::GetDocumentBase() const
+::rtl::OUString SvXMLImport::GetDocumentBase() const
{
return mpImpl->aDocBase.GetMainURL( INetURLObject::NO_DECODE );
}
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 9768c5d0ba74..ce4d4180a24c 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -78,7 +78,6 @@
#include "layerexp.hxx"
#include "XMLNumberStylesExport.hxx"
-#include <tools/string.hxx>
#include <xmloff/animationexport.hxx>
@@ -1883,7 +1882,7 @@ void SdXMLExport::_ExportContent()
OUString aBookmarkName( aBookmarkURL.copy( nIndex+1 ) );
aBookmarkURL = GetRelativeReference( aFileName );
- aBookmarkURL += String( '#' );
+ aBookmarkURL += rtl::OUString(static_cast<sal_Unicode>('#'));
aBookmarkURL += aBookmarkName;
}
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index e48bf8823572..d07302cd9b0e 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -53,7 +53,6 @@
#include <tools/debug.hxx>
#include <xmloff/contextid.hxx>
#include <xmloff/xmltoken.hxx>
-#include <tools/string.hxx>
#include <sot/clsids.hxx>
#include <tools/globname.hxx>
#include <com/sun/star/beans/XPropertyState.hpp>
diff --git a/xmloff/source/draw/shapeexport4.cxx b/xmloff/source/draw/shapeexport4.cxx
index 173f88f14c37..d2eece2f9615 100644
--- a/xmloff/source/draw/shapeexport4.cxx
+++ b/xmloff/source/draw/shapeexport4.cxx
@@ -66,7 +66,6 @@
#include <com/sun/star/drawing/EnhancedCustomShapeTextPathMode.hpp>
#include <com/sun/star/beans/PropertyValues.hpp>
#include <rtl/math.hxx>
-#include <tools/string.hxx>
#include <basegfx/vector/b3dvector.hxx>
#include "xmloff/xmlnmspe.hxx"
@@ -155,7 +154,7 @@ void ImpExportEquations( SvXMLExport& rExport, const uno::Sequence< rtl::OUStrin
sal_Int32 i;
for ( i = 0; i < rEquations.getLength(); i++ )
{
- rtl::OUString aStr( String( 'f' ) );
+ rtl::OUString aStr(static_cast<sal_Unicode>('f'));
aStr += rtl::OUString::valueOf( i );
rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, aStr );
@@ -167,7 +166,7 @@ void ImpExportEquations( SvXMLExport& rExport, const uno::Sequence< rtl::OUStrin
if ( nIndex != -1 )
{
rtl::OUString aNew( aStr.copy( 0, nIndex + 1 ) );
- aNew += String( 'f' );
+ aNew += rtl::OUString(static_cast<sal_Unicode>('f'));
aNew += aStr.copy( nIndex + 1, ( aStr.getLength() - nIndex ) - 1 );
aStr = aNew;
nIndex++;
diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx
index 6c4bd633f75c..15ef848438fc 100644
--- a/xmloff/source/draw/xexptran.cxx
+++ b/xmloff/source/draw/xexptran.cxx
@@ -39,7 +39,6 @@
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/tools/unotools.hxx>
-#include <tools/string.hxx>
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
@@ -158,7 +157,7 @@ void Imp_PutNumberCharWithSpace(OUString& rStr, sal_Int32 nValue)
const sal_Int32 aLen(rStr.getLength());
if(aLen)
if(Imp_IsOnNumberChar(rStr, aLen - 1, false) && nValue >= 0)
- rStr += String(sal_Unicode(' '));
+ rStr += rtl::OUString(static_cast<sal_Unicode>(' '));
Imp_PutNumberChar(rStr, nValue);
}
@@ -1356,12 +1355,12 @@ SdXMLImExPointsElement::SdXMLImExPointsElement(drawing::PointSequence* pPoints,
// X and comma
Imp_PutNumberChar(aNewString, nX);
- aNewString += String(sal_Unicode(','));
+ aNewString += rtl::OUString(static_cast<sal_Unicode>(','));
// Y and space (not for last)
Imp_PutNumberChar(aNewString, nY);
if(a + 1 != nCnt)
- aNewString += String(sal_Unicode(' '));
+ aNewString += rtl::OUString(static_cast<sal_Unicode>(' '));
// next point
pArray++;
@@ -1817,7 +1816,7 @@ void SdXMLImExSvgDElement::AddPolygon(
if(bRelative)
{
if(aLastCommand != sal_Unicode('t'))
- aNewString += String(sal_Unicode('t'));
+ aNewString += rtl::OUString(static_cast<sal_Unicode>('t'));
Imp_PutNumberCharWithSpace(aNewString, nX - mnLastX);
Imp_PutNumberCharWithSpace(aNewString, nY - mnLastY);
@@ -1827,7 +1826,7 @@ void SdXMLImExSvgDElement::AddPolygon(
else
{
if(aLastCommand != sal_Unicode('T'))
- aNewString += String(sal_Unicode('T'));
+ aNewString += rtl::OUString(static_cast<sal_Unicode>('T'));
Imp_PutNumberCharWithSpace(aNewString, nX);
Imp_PutNumberCharWithSpace(aNewString, nY);
@@ -1847,7 +1846,7 @@ void SdXMLImExSvgDElement::AddPolygon(
if(bRelative)
{
if(aLastCommand != sal_Unicode('q'))
- aNewString += String(sal_Unicode('q'));
+ aNewString += rtl::OUString(static_cast<sal_Unicode>('q'));
Imp_PutNumberCharWithSpace(aNewString, nX1 - mnLastX);
Imp_PutNumberCharWithSpace(aNewString, nY1 - mnLastY);
@@ -1859,7 +1858,7 @@ void SdXMLImExSvgDElement::AddPolygon(
else
{
if(aLastCommand != sal_Unicode('Q'))
- aNewString += String(sal_Unicode('Q'));
+ aNewString += rtl::OUString(static_cast<sal_Unicode>('Q'));
Imp_PutNumberCharWithSpace(aNewString, nX1);
Imp_PutNumberCharWithSpace(aNewString, nY1);
@@ -1906,7 +1905,7 @@ void SdXMLImExSvgDElement::AddPolygon(
if(bRelative)
{
if(aLastCommand != sal_Unicode('s'))
- aNewString += String(sal_Unicode('s'));
+ aNewString += rtl::OUString(static_cast<sal_Unicode>('s'));
Imp_PutNumberCharWithSpace(aNewString, nX2 - mnLastX);
Imp_PutNumberCharWithSpace(aNewString, nY2 - mnLastY);
@@ -1918,7 +1917,7 @@ void SdXMLImExSvgDElement::AddPolygon(
else
{
if(aLastCommand != sal_Unicode('S'))
- aNewString += String(sal_Unicode('S'));
+ aNewString += rtl::OUString(static_cast<sal_Unicode>('S'));
Imp_PutNumberCharWithSpace(aNewString, nX2);
Imp_PutNumberCharWithSpace(aNewString, nY2);
@@ -1940,7 +1939,7 @@ void SdXMLImExSvgDElement::AddPolygon(
if(bRelative)
{
if(aLastCommand != sal_Unicode('c'))
- aNewString += String(sal_Unicode('c'));
+ aNewString += rtl::OUString(static_cast<sal_Unicode>('c'));
Imp_PutNumberCharWithSpace(aNewString, nX1 - mnLastX);
Imp_PutNumberCharWithSpace(aNewString, nY1 - mnLastY);
@@ -1954,7 +1953,7 @@ void SdXMLImExSvgDElement::AddPolygon(
else
{
if(aLastCommand != sal_Unicode('C'))
- aNewString += String(sal_Unicode('C'));
+ aNewString += rtl::OUString(static_cast<sal_Unicode>('C'));
Imp_PutNumberCharWithSpace(aNewString, nX1);
Imp_PutNumberCharWithSpace(aNewString, nY1);
@@ -1996,7 +1995,7 @@ void SdXMLImExSvgDElement::AddPolygon(
if(bRelative)
{
if(aLastCommand != sal_Unicode('v'))
- aNewString += String(sal_Unicode('v'));
+ aNewString += rtl::OUString(static_cast<sal_Unicode>('v'));
Imp_PutNumberCharWithSpace(aNewString, nY - mnLastY);
@@ -2005,7 +2004,7 @@ void SdXMLImExSvgDElement::AddPolygon(
else
{
if(aLastCommand != sal_Unicode('V'))
- aNewString += String(sal_Unicode('V'));
+ aNewString += rtl::OUString(static_cast<sal_Unicode>('V'));
Imp_PutNumberCharWithSpace(aNewString, nY);
@@ -2017,7 +2016,7 @@ void SdXMLImExSvgDElement::AddPolygon(
if(bRelative)
{
if(aLastCommand != sal_Unicode('h'))
- aNewString += String(sal_Unicode('h'));
+ aNewString += rtl::OUString(static_cast<sal_Unicode>('h'));
Imp_PutNumberCharWithSpace(aNewString, nX - mnLastX);
@@ -2026,7 +2025,7 @@ void SdXMLImExSvgDElement::AddPolygon(
else
{
if(aLastCommand != sal_Unicode('H'))
- aNewString += String(sal_Unicode('H'));
+ aNewString += rtl::OUString(static_cast<sal_Unicode>('H'));
Imp_PutNumberCharWithSpace(aNewString, nX);
@@ -2038,7 +2037,7 @@ void SdXMLImExSvgDElement::AddPolygon(
if(bRelative)
{
if(aLastCommand != sal_Unicode('l'))
- aNewString += String(sal_Unicode('l'));
+ aNewString += rtl::OUString(static_cast<sal_Unicode>('l'));
Imp_PutNumberCharWithSpace(aNewString, nX - mnLastX);
Imp_PutNumberCharWithSpace(aNewString, nY - mnLastY);
@@ -2048,7 +2047,7 @@ void SdXMLImExSvgDElement::AddPolygon(
else
{
if(aLastCommand != sal_Unicode('L'))
- aNewString += String(sal_Unicode('L'));
+ aNewString += rtl::OUString(static_cast<sal_Unicode>('L'));
Imp_PutNumberCharWithSpace(aNewString, nX);
Imp_PutNumberCharWithSpace(aNewString, nY);
@@ -2062,7 +2061,7 @@ void SdXMLImExSvgDElement::AddPolygon(
// write as start point
if(bRelative)
{
- aNewString += String(sal_Unicode('m'));
+ aNewString += rtl::OUString(static_cast<sal_Unicode>('m'));
Imp_PutNumberCharWithSpace(aNewString, nX - mnLastX);
Imp_PutNumberCharWithSpace(aNewString, nY - mnLastY);
@@ -2071,7 +2070,7 @@ void SdXMLImExSvgDElement::AddPolygon(
}
else
{
- aNewString += String(sal_Unicode('M'));
+ aNewString += rtl::OUString(static_cast<sal_Unicode>('M'));
Imp_PutNumberCharWithSpace(aNewString, nX);
Imp_PutNumberCharWithSpace(aNewString, nY);
@@ -2098,9 +2097,9 @@ void SdXMLImExSvgDElement::AddPolygon(
if(bClosed)
{
if(bRelative)
- aNewString += String(sal_Unicode('z'));
+ aNewString += rtl::OUString(static_cast<sal_Unicode>('z'));
else
- aNewString += String(sal_Unicode('Z'));
+ aNewString += rtl::OUString(static_cast<sal_Unicode>('Z'));
}
// append new string
diff --git a/xmloff/source/draw/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx
index 43c877e2217c..c33f3dca9968 100644
--- a/xmloff/source/draw/ximpbody.cxx
+++ b/xmloff/source/draw/ximpbody.cxx
@@ -45,7 +45,6 @@
#include "ximpshow.hxx"
#include "PropertySetMerger.hxx"
#include "animationimport.hxx"
-#include <tools/string.hxx>
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
@@ -208,7 +207,7 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport,
OUString aBookmarkName( maHREF.copy( nIndex+1 ) );
maHREF = GetImport().GetAbsoluteReference( aFileName );
- maHREF += String( (sal_Unicode)'#' );
+ maHREF += OUString(static_cast<sal_Unicode>('#'));
maHREF += aBookmarkName;
}
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index c41dab4e3fd4..6d2192ac6e3a 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -86,7 +86,6 @@
#include "XMLEmbeddedObjectImportContext.hxx"
#include "xmloff/xmlerror.hxx"
#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <tools/string.hxx>
#include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp>
#include <com/sun/star/text/XTextDocument.hpp>
diff --git a/xmloff/source/style/fonthdl.cxx b/xmloff/source/style/fonthdl.cxx
index ca7774e0b011..31abfa3c9a62 100644
--- a/xmloff/source/style/fonthdl.cxx
+++ b/xmloff/source/style/fonthdl.cxx
@@ -37,8 +37,6 @@
#include <com/sun/star/uno/Any.hxx>
#include <tools/fontenum.hxx>
-#include <tools/string.hxx>
-
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
@@ -80,7 +78,7 @@ XMLFontFamilyNamePropHdl::~XMLFontFamilyNamePropHdl()
sal_Bool XMLFontFamilyNamePropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& ) const
{
sal_Bool bRet = sal_False;
- String sValue;
+ OUStringBuffer sValue;
sal_Int32 nPos = 0;
do
@@ -109,11 +107,10 @@ sal_Bool XMLFontFamilyNamePropHdl::importXML( const OUString& rStrImpValue, uno:
if( nFirst <= nLast )
{
- if( sValue.Len() != 0 )
- sValue += sal_Unicode(';');
+ if( sValue.getLength() != 0 )
+ sValue.append(';');
- OUString sTemp = rStrImpValue.copy( nFirst, nLast-nFirst+1 );
- sValue += sTemp.getStr();
+ sValue.append(rStrImpValue.copy( nFirst, nLast-nFirst+1));
}
if( -1 != nPos )
@@ -121,9 +118,9 @@ sal_Bool XMLFontFamilyNamePropHdl::importXML( const OUString& rStrImpValue, uno:
}
while( -1 != nPos );
- if( sValue.Len() )
+ if (sValue.getLength())
{
- rValue <<= OUString(sValue.GetBuffer());
+ rValue <<= sValue.makeStringAndClear();
bRet = sal_True;
}
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 5dab1cb232eb..d48675b5d48d 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -35,7 +35,6 @@
#include <vector>
#include <list>
#include <boost/unordered_map.hpp>
-#include <tools/string.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
@@ -1267,7 +1266,7 @@ XMLTextParagraphExport::XMLTextParagraphExport(
GetExport() );
OUString sFamily( GetXMLToken(XML_PARAGRAPH) );
- OUString aPrefix( String( 'P' ) );
+ OUString aPrefix(static_cast<sal_Unicode>('P'));
rAutoStylePool.AddFamily( XML_STYLE_FAMILY_TEXT_PARAGRAPH, sFamily,
xParaPropMapper, aPrefix );
@@ -1275,7 +1274,7 @@ XMLTextParagraphExport::XMLTextParagraphExport(
xTextPropMapper = new XMLTextExportPropertySetMapper( xPropMapper,
GetExport() );
sFamily = OUString( GetXMLToken(XML_TEXT) );
- aPrefix = OUString( String( 'T' ) );
+ aPrefix = OUString(static_cast<sal_Unicode>('T'));
rAutoStylePool.AddFamily( XML_STYLE_FAMILY_TEXT_TEXT, sFamily,
xTextPropMapper, aPrefix );
@@ -2064,7 +2063,7 @@ void XMLTextParagraphExport::exportParagraph(
}
{
- String sParaIsNumberingRestart
+ rtl::OUString sParaIsNumberingRestart
(RTL_CONSTASCII_USTRINGPARAM
("ParaIsNumberingRestart"));
bool bIsRestartNumbering = false;
@@ -2087,7 +2086,7 @@ void XMLTextParagraphExport::exportParagraph(
XML_RESTART_NUMBERING,
XML_TRUE);
- String sNumberingStartValue
+ rtl::OUString sNumberingStartValue
(RTL_CONSTASCII_USTRINGPARAM
("NumberingStartValue"));