summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-03-17 08:58:59 +0200
committerNoel Grandin <noel@peralex.com>2014-03-17 09:00:08 +0200
commitc66229bfa4284758b787bf80ddd1b2e3795881df (patch)
tree322e0e4d0f6d3d575bd8ead750d9b0fffdc68594 /oox
parentbd8ce8b959f6147a2175a8ce84fd212151ca05dc (diff)
oox: prefer passing OUString by reference
Change-Id: Iace276878e7ae668bba5bb6e36af1e5d5d72d6cb
Diffstat (limited to 'oox')
-rw-r--r--oox/source/crypto/DocumentEncryption.cxx2
-rw-r--r--oox/source/drawingml/color.cxx2
-rw-r--r--oox/source/drawingml/shape.cxx2
-rw-r--r--oox/source/export/drawingml.cxx8
-rw-r--r--oox/source/helper/grabbagstack.cxx10
-rw-r--r--oox/source/helper/storagebase.cxx3
-rw-r--r--oox/source/ppt/comments.cxx3
7 files changed, 16 insertions, 14 deletions
diff --git a/oox/source/crypto/DocumentEncryption.cxx b/oox/source/crypto/DocumentEncryption.cxx
index e0941cfa5d95..8928101a9bc2 100644
--- a/oox/source/crypto/DocumentEncryption.cxx
+++ b/oox/source/crypto/DocumentEncryption.cxx
@@ -25,7 +25,7 @@ using namespace css::uno;
using namespace std;
-DocumentEncryption::DocumentEncryption(Reference< XStream > xDocumentStream, oox::ole::OleStorage& rOleStorage, OUString aPassword) :
+DocumentEncryption::DocumentEncryption(Reference< XStream > xDocumentStream, oox::ole::OleStorage& rOleStorage, const OUString& aPassword) :
mxDocumentStream(xDocumentStream),
mrOleStorage(rOleStorage),
maPassword(aPassword)
diff --git a/oox/source/drawingml/color.cxx b/oox/source/drawingml/color.cxx
index bebc967db23b..59334492a24b 100644
--- a/oox/source/drawingml/color.cxx
+++ b/oox/source/drawingml/color.cxx
@@ -382,7 +382,7 @@ OUString Color::getColorTransformationName( sal_Int32 nElement )
return OUString();
}
-sal_Int32 Color::getColorTransformationToken( OUString sName )
+sal_Int32 Color::getColorTransformationToken( const OUString& sName )
{
if( sName == "red" )
return XML_red;
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 3487b310f2de..56342dd19903 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -1207,7 +1207,7 @@ void Shape::putPropertiesToGrabBag( const Sequence< PropertyValue >& aProperties
}
}
-uno::Sequence< uno::Sequence< uno::Any > > Shape::resolveRelationshipsOfTypeFromOfficeDoc(core::XmlFilterBase& rFilter, OUString sFragment, OUString sType )
+uno::Sequence< uno::Sequence< uno::Any > > Shape::resolveRelationshipsOfTypeFromOfficeDoc(core::XmlFilterBase& rFilter, const OUString& sFragment, const OUString& sType )
{
uno::Sequence< uno::Sequence< uno::Any > > xRelListTemp;
sal_Int32 counter = 0;
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 5f869eef95eb..aeeff2587362 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -123,7 +123,7 @@ void DrawingML::ResetCounters()
mnImageCounter = 1;
}
-bool DrawingML::GetProperty( Reference< XPropertySet > rXPropSet, OUString aName )
+bool DrawingML::GetProperty( Reference< XPropertySet > rXPropSet, const OUString& aName )
{
bool bRetValue = false;
@@ -136,7 +136,7 @@ bool DrawingML::GetProperty( Reference< XPropertySet > rXPropSet, OUString aName
return bRetValue;
}
-bool DrawingML::GetPropertyAndState( Reference< XPropertySet > rXPropSet, Reference< XPropertyState > rXPropState, OUString aName, PropertyState& eState )
+bool DrawingML::GetPropertyAndState( Reference< XPropertySet > rXPropSet, Reference< XPropertyState > rXPropState, const OUString& aName, PropertyState& eState )
{
bool bRetValue = false;
@@ -180,7 +180,7 @@ void DrawingML::WriteColor( sal_uInt32 nColor, sal_Int32 nAlpha )
}
}
-void DrawingML::WriteColor( OUString sColorSchemeName, Sequence< PropertyValue > aTransformations )
+void DrawingML::WriteColor( const OUString& sColorSchemeName, Sequence< PropertyValue > aTransformations )
{
// prevent writing a tag with empty val attribute
if( sColorSchemeName.isEmpty() )
@@ -220,7 +220,7 @@ void DrawingML::WriteSolidFill( sal_uInt32 nColor, sal_Int32 nAlpha )
mpFS->endElementNS( XML_a, XML_solidFill );
}
-void DrawingML::WriteSolidFill( OUString sSchemeName, Sequence< PropertyValue > aTransformations )
+void DrawingML::WriteSolidFill( const OUString& sSchemeName, Sequence< PropertyValue > aTransformations )
{
mpFS->startElementNS( XML_a, XML_solidFill, FSEND );
WriteColor( sSchemeName, aTransformations );
diff --git a/oox/source/helper/grabbagstack.cxx b/oox/source/helper/grabbagstack.cxx
index b62f5e248a18..a8dbb6cd6e70 100644
--- a/oox/source/helper/grabbagstack.cxx
+++ b/oox/source/helper/grabbagstack.cxx
@@ -17,7 +17,7 @@ namespace oox
using namespace css::beans;
using namespace css::uno;
-GrabBagStack::GrabBagStack(OUString aName)
+GrabBagStack::GrabBagStack(const OUString& aName)
{
mCurrentElement.maName = aName;
}
@@ -54,7 +54,7 @@ PropertyValue GrabBagStack::getRootProperty()
return aProperty;
}
-void GrabBagStack::appendElement(OUString aName, Any aAny)
+void GrabBagStack::appendElement(const OUString& aName, Any aAny)
{
PropertyValue aValue;
aValue.Name = aName;
@@ -62,7 +62,7 @@ void GrabBagStack::appendElement(OUString aName, Any aAny)
mCurrentElement.maPropertyList.push_back(aValue);
}
-void GrabBagStack::push(OUString aKey)
+void GrabBagStack::push(const OUString& aKey)
{
mStack.push(mCurrentElement);
mCurrentElement.maName = aKey;
@@ -83,12 +83,12 @@ void GrabBagStack::pop()
appendElement(aName, makeAny(aSequence));
}
-void GrabBagStack::addInt32(OUString aElementName, sal_Int32 aIntValue)
+void GrabBagStack::addInt32(const OUString& aElementName, sal_Int32 aIntValue)
{
appendElement(aElementName, makeAny(aIntValue));
}
-void GrabBagStack::addString(OUString aElementName, OUString aStringValue)
+void GrabBagStack::addString(const OUString& aElementName, const OUString& aStringValue)
{
appendElement(aElementName, makeAny(aStringValue));
}
diff --git a/oox/source/helper/storagebase.cxx b/oox/source/helper/storagebase.cxx
index 0e049c689e58..17deba75b76b 100644
--- a/oox/source/helper/storagebase.cxx
+++ b/oox/source/helper/storagebase.cxx
@@ -37,8 +37,9 @@ using namespace ::com::sun::star::uno;
namespace {
-void lclSplitFirstElement( OUString& orElement, OUString& orRemainder, OUString aFullName )
+void lclSplitFirstElement( OUString& orElement, OUString& orRemainder, const OUString& _aFullName )
{
+ OUString aFullName = _aFullName;
sal_Int32 nSlashPos = aFullName.indexOf( '/' );
// strip leading slashes
diff --git a/oox/source/ppt/comments.cxx b/oox/source/ppt/comments.cxx
index efeabac0369c..81d22e9c3d7e 100644
--- a/oox/source/ppt/comments.cxx
+++ b/oox/source/ppt/comments.cxx
@@ -30,8 +30,9 @@ void CommentAuthorList::setValues(const CommentAuthorList& list)
}
//DateTime is saved as : 2013-01-10T15:53:26.000
-void Comment::setDateTime (OUString datetime)
+void Comment::setDateTime (const OUString& _datetime)
{
+ OUString datetime = _datetime;
aDateTime.Year = datetime.getToken(0,'-').toInt32();
aDateTime.Month = datetime.getToken(1,'-').toInt32();
aDateTime.Day = datetime.getToken(2,'-').toInt32();