summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-03-17 09:14:00 +0200
committerNoel Grandin <noel@peralex.com>2014-03-17 13:30:50 +0200
commit006df8a7f77d79d5ab2d8da053552a0ccc3dcd7a (patch)
tree5dea827bf01d7efc263f69d63d97f8f887def76c /writerfilter
parent71c88f02a019dee180686ac9ec88d8c7c1f7f534 (diff)
writerfilter: prefer passing OUString by reference
Change-Id: I5f296d4df6c09e88674cf9aa6d1b831ec2b0c2f2
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/inc/dmapper/DomainMapper.hxx2
-rw-r--r--writerfilter/source/dmapper/BorderHandler.cxx6
-rw-r--r--writerfilter/source/dmapper/BorderHandler.hxx6
-rw-r--r--writerfilter/source/dmapper/CellColorHandler.cxx4
-rw-r--r--writerfilter/source/dmapper/CellColorHandler.hxx4
-rw-r--r--writerfilter/source/dmapper/CellMarginHandler.cxx4
-rw-r--r--writerfilter/source/dmapper/CellMarginHandler.hxx4
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx4
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx16
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.hxx18
-rw-r--r--writerfilter/source/dmapper/MeasureHandler.cxx2
-rw-r--r--writerfilter/source/dmapper/MeasureHandler.hxx2
-rw-r--r--writerfilter/source/dmapper/NumberingManager.cxx4
-rw-r--r--writerfilter/source/dmapper/NumberingManager.hxx14
-rw-r--r--writerfilter/source/dmapper/OLEHandler.cxx2
-rw-r--r--writerfilter/source/dmapper/OLEHandler.hxx2
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx9
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.hxx2
-rw-r--r--writerfilter/source/dmapper/TDefTableHandler.cxx6
-rw-r--r--writerfilter/source/dmapper/TDefTableHandler.hxx6
-rw-r--r--writerfilter/source/dmapper/TblStylePrHandler.cxx4
-rw-r--r--writerfilter/source/dmapper/TblStylePrHandler.hxx4
-rw-r--r--writerfilter/source/dmapper/ThemeTable.cxx2
-rw-r--r--writerfilter/source/dmapper/ThemeTable.hxx2
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx2
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.hxx2
-rw-r--r--writerfilter/source/rtftok/rtfsdrimport.cxx8
-rw-r--r--writerfilter/source/rtftok/rtfsdrimport.hxx8
-rw-r--r--writerfilter/source/rtftok/rtfvalue.cxx6
-rw-r--r--writerfilter/source/rtftok/rtfvalue.hxx6
30 files changed, 81 insertions, 80 deletions
diff --git a/writerfilter/inc/dmapper/DomainMapper.hxx b/writerfilter/inc/dmapper/DomainMapper.hxx
index 25c123227d48..243639f8da93 100644
--- a/writerfilter/inc/dmapper/DomainMapper.hxx
+++ b/writerfilter/inc/dmapper/DomainMapper.hxx
@@ -123,7 +123,7 @@ public:
void setInTableStyleRunProps(bool bInTableStyleRunProps);
/// Enable storing of seen tokens in a named grab bag.
- void enableInteropGrabBag(OUString aName);
+ void enableInteropGrabBag(const OUString& aName);
/// Get the stored tokens and clear the internal storage.
beans::PropertyValue getInteropGrabBag();
diff --git a/writerfilter/source/dmapper/BorderHandler.cxx b/writerfilter/source/dmapper/BorderHandler.cxx
index 876e7437b2be..dd82dd779779 100644
--- a/writerfilter/source/dmapper/BorderHandler.cxx
+++ b/writerfilter/source/dmapper/BorderHandler.cxx
@@ -194,12 +194,12 @@ bool BorderHandler::getShadow()
return m_bShadow;
}
-void BorderHandler::enableInteropGrabBag(OUString aName)
+void BorderHandler::enableInteropGrabBag(const OUString& aName)
{
m_aInteropGrabBagName = aName;
}
-beans::PropertyValue BorderHandler::getInteropGrabBag(OUString aName)
+beans::PropertyValue BorderHandler::getInteropGrabBag(const OUString& aName)
{
beans::PropertyValue aRet;
if (aName.isEmpty())
@@ -216,7 +216,7 @@ beans::PropertyValue BorderHandler::getInteropGrabBag(OUString aName)
return aRet;
}
-void BorderHandler::appendGrabBag(OUString aKey, OUString aValue)
+void BorderHandler::appendGrabBag(const OUString& aKey, const OUString& aValue)
{
beans::PropertyValue aProperty;
aProperty.Name = aKey;
diff --git a/writerfilter/source/dmapper/BorderHandler.hxx b/writerfilter/source/dmapper/BorderHandler.hxx
index efe290998f09..bfe50bd1f251 100644
--- a/writerfilter/source/dmapper/BorderHandler.hxx
+++ b/writerfilter/source/dmapper/BorderHandler.hxx
@@ -58,7 +58,7 @@ private:
::com::sun::star::table::BorderLine2 m_aBorderLines[BORDER_COUNT];
OUString m_aInteropGrabBagName;
std::vector<beans::PropertyValue> m_aInteropGrabBag;
- void appendGrabBag(OUString aKey, OUString aValue);
+ void appendGrabBag(const OUString& aKey, const OUString& aValue);
// Properties
virtual void lcl_attribute(Id Name, Value & val);
@@ -72,8 +72,8 @@ public:
::com::sun::star::table::BorderLine2 getBorderLine();
sal_Int32 getLineDistance() const { return m_nLineDistance;}
bool getShadow();
- void enableInteropGrabBag(OUString aName);
- beans::PropertyValue getInteropGrabBag(OUString aName = OUString());
+ void enableInteropGrabBag(const OUString& aName);
+ beans::PropertyValue getInteropGrabBag(const OUString& aName = OUString());
};
typedef boost::shared_ptr< BorderHandler > BorderHandlerPtr;
}}
diff --git a/writerfilter/source/dmapper/CellColorHandler.cxx b/writerfilter/source/dmapper/CellColorHandler.cxx
index e4507a17ff7e..22c4aea673c5 100644
--- a/writerfilter/source/dmapper/CellColorHandler.cxx
+++ b/writerfilter/source/dmapper/CellColorHandler.cxx
@@ -322,7 +322,7 @@ TablePropertyMapPtr CellColorHandler::getProperties()
return pPropertyMap;
}
-void CellColorHandler::createGrabBag(OUString aName, uno::Any aAny)
+void CellColorHandler::createGrabBag(const OUString& aName, uno::Any aAny)
{
if (m_aInteropGrabBagName.isEmpty())
return;
@@ -333,7 +333,7 @@ void CellColorHandler::createGrabBag(OUString aName, uno::Any aAny)
m_aInteropGrabBag.push_back(aValue);
}
-void CellColorHandler::enableInteropGrabBag(OUString aName)
+void CellColorHandler::enableInteropGrabBag(const OUString& aName)
{
m_aInteropGrabBagName = aName;
}
diff --git a/writerfilter/source/dmapper/CellColorHandler.hxx b/writerfilter/source/dmapper/CellColorHandler.hxx
index fbfef52276da..9c2b28a8fc3b 100644
--- a/writerfilter/source/dmapper/CellColorHandler.hxx
+++ b/writerfilter/source/dmapper/CellColorHandler.hxx
@@ -46,7 +46,7 @@ private:
virtual void lcl_attribute(Id Name, Value & val);
virtual void lcl_sprm(Sprm & sprm);
- void createGrabBag(OUString aName, uno::Any aValue);
+ void createGrabBag(const OUString& aName, uno::Any aValue);
public:
CellColorHandler( );
@@ -56,7 +56,7 @@ public:
void setOutputFormat( OutputFormat format ) { m_OutputFormat = format; }
- void enableInteropGrabBag(OUString aName);
+ void enableInteropGrabBag(const OUString& aName);
beans::PropertyValue getInteropGrabBag();
void disableInteropGrabBag();
sal_Bool isInteropGrabBagEnabled();
diff --git a/writerfilter/source/dmapper/CellMarginHandler.cxx b/writerfilter/source/dmapper/CellMarginHandler.cxx
index eed5eafa8469..380a8d95772c 100644
--- a/writerfilter/source/dmapper/CellMarginHandler.cxx
+++ b/writerfilter/source/dmapper/CellMarginHandler.cxx
@@ -68,7 +68,7 @@ void CellMarginHandler::lcl_attribute(Id rName, Value & rVal)
}
}
-void CellMarginHandler::createGrabBag(OUString aName)
+void CellMarginHandler::createGrabBag(const OUString& aName)
{
if (m_aInteropGrabBagName.isEmpty())
return;
@@ -158,7 +158,7 @@ void CellMarginHandler::lcl_sprm(Sprm & rSprm)
m_nValue = 0;
}
-void CellMarginHandler::enableInteropGrabBag(OUString aName)
+void CellMarginHandler::enableInteropGrabBag(const OUString& aName)
{
m_aInteropGrabBagName = aName;
}
diff --git a/writerfilter/source/dmapper/CellMarginHandler.hxx b/writerfilter/source/dmapper/CellMarginHandler.hxx
index 24be82bab9dc..2b2258ec327d 100644
--- a/writerfilter/source/dmapper/CellMarginHandler.hxx
+++ b/writerfilter/source/dmapper/CellMarginHandler.hxx
@@ -42,7 +42,7 @@ private:
virtual void lcl_attribute(Id Name, Value & val);
virtual void lcl_sprm(Sprm & sprm);
- void createGrabBag(OUString aName);
+ void createGrabBag(const OUString& aName);
public:
sal_Int32 m_nLeftMargin;
@@ -60,7 +60,7 @@ public:
::boost::shared_ptr<TablePropertyMap> getProperties();
- void enableInteropGrabBag(OUString aName);
+ void enableInteropGrabBag(const OUString& aName);
beans::PropertyValue getInteropGrabBag();
};
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 60208a38aaba..43821d9d593d 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -916,7 +916,7 @@ void DomainMapper::lcl_sprm(Sprm & rSprm)
sprmWithProps( rSprm, m_pImpl->GetTopContext() );
}
-sal_Int32 lcl_getCurrentNumberingProperty(uno::Reference<container::XIndexAccess> xNumberingRules, sal_Int32 nNumberingLevel, OUString aProp)
+sal_Int32 lcl_getCurrentNumberingProperty(uno::Reference<container::XIndexAccess> xNumberingRules, sal_Int32 nNumberingLevel, const OUString& aProp)
{
sal_Int32 nRet = 0;
@@ -3076,7 +3076,7 @@ bool DomainMapper::IsInHeaderFooter() const
return m_pImpl->IsInHeaderFooter();
}
-void DomainMapper::enableInteropGrabBag(OUString aName)
+void DomainMapper::enableInteropGrabBag(const OUString& aName)
{
m_pImpl->m_aInteropGrabBagName = aName;
}
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index b912ab48a62d..2d647fcd50f8 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2632,7 +2632,7 @@ void DomainMapper_Impl::handleAuthor
#undef SET_DATE
}
-uno::Sequence< beans::PropertyValues > lcl_createTOXLevelHyperlinks( bool bHyperlinks, OUString sChapterNoSeparator,
+uno::Sequence< beans::PropertyValues > lcl_createTOXLevelHyperlinks( bool bHyperlinks, const OUString& sChapterNoSeparator,
uno::Sequence< beans::PropertyValues >aLevel,
PropertyNameSupplier& rPropNameSupplier )
{
@@ -4216,7 +4216,7 @@ sal_Int32 DomainMapper_Impl::GetCurrentRedlineToken( )
return nToken;
}
-void DomainMapper_Impl::SetCurrentRedlineAuthor( OUString sAuthor )
+void DomainMapper_Impl::SetCurrentRedlineAuthor( const OUString& sAuthor )
{
if (!m_xAnnotationField.is())
{
@@ -4228,13 +4228,13 @@ void DomainMapper_Impl::SetCurrentRedlineAuthor( OUString sAuthor )
m_xAnnotationField->setPropertyValue("Author", uno::makeAny(sAuthor));
}
-void DomainMapper_Impl::SetCurrentRedlineInitials( OUString sInitials )
+void DomainMapper_Impl::SetCurrentRedlineInitials( const OUString& sInitials )
{
if (m_xAnnotationField.is())
m_xAnnotationField->setPropertyValue("Initials", uno::makeAny(sInitials));
}
-void DomainMapper_Impl::SetCurrentRedlineDate( OUString sDate )
+void DomainMapper_Impl::SetCurrentRedlineDate( const OUString& sDate )
{
if (!m_xAnnotationField.is())
{
@@ -4442,7 +4442,7 @@ void DomainMapper_Impl::processDeferredCharacterProperties()
}
}
-sal_Int32 DomainMapper_Impl::getCurrentNumberingProperty(OUString aProp)
+sal_Int32 DomainMapper_Impl::getCurrentNumberingProperty(const OUString& aProp)
{
sal_Int32 nRet = 0;
@@ -4478,7 +4478,7 @@ bool DomainMapper_Impl::IsNewDoc()
return m_bIsNewDoc;
}
-void DomainMapper_Impl::enableInteropGrabBag(OUString aName)
+void DomainMapper_Impl::enableInteropGrabBag(const OUString& aName)
{
m_aInteropGrabBagName = aName;
}
@@ -4495,7 +4495,7 @@ bool DomainMapper_Impl::isInteropGrabBagEnabled()
return !(m_aInteropGrabBagName.isEmpty());
}
-void DomainMapper_Impl::appendGrabBag(std::vector<beans::PropertyValue>& rInteropGrabBag, OUString aKey, OUString aValue)
+void DomainMapper_Impl::appendGrabBag(std::vector<beans::PropertyValue>& rInteropGrabBag, const OUString& aKey, const OUString& aValue)
{
if (m_aInteropGrabBagName.isEmpty())
return;
@@ -4505,7 +4505,7 @@ void DomainMapper_Impl::appendGrabBag(std::vector<beans::PropertyValue>& rIntero
rInteropGrabBag.push_back(aProperty);
}
-void DomainMapper_Impl::appendGrabBag(std::vector<beans::PropertyValue>& rInteropGrabBag, OUString aKey, std::vector<beans::PropertyValue>& rValue)
+void DomainMapper_Impl::appendGrabBag(std::vector<beans::PropertyValue>& rInteropGrabBag, const OUString& aKey, std::vector<beans::PropertyValue>& rValue)
{
if (m_aInteropGrabBagName.isEmpty())
return;
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index fe8a93807078..952e6e0c944b 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -528,8 +528,8 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > GetCurrentTabStopAndClear();
void NextTabStop() {++m_nCurrentTabStopIndex;}
- void SetCurrentParaStyleId(OUString sStringValue) {m_sCurrentParaStyleId = sStringValue;}
- OUString GetCurrentParaStyleId() const {return m_sCurrentParaStyleId;}
+ void SetCurrentParaStyleId(const OUString& sStringValue) {m_sCurrentParaStyleId = sStringValue;}
+ OUString GetCurrentParaStyleId() const {return m_sCurrentParaStyleId;}
::com::sun::star::uno::Any GetPropertyFromStyleSheet(PropertyIds eId);
void SetStyleSheetImport( bool bSet ) { m_bInStyleSheetImport = bSet;}
@@ -685,14 +685,14 @@ public:
RedlineParamsPtr GetTopRedline( );
sal_Int32 GetCurrentRedlineToken( );
- void SetCurrentRedlineAuthor( OUString sAuthor );
- void SetCurrentRedlineDate( OUString sDate );
+ void SetCurrentRedlineAuthor( const OUString& sAuthor );
+ void SetCurrentRedlineDate( const OUString& sDate );
void SetCurrentRedlineId( sal_Int32 nId );
void SetCurrentRedlineToken( sal_Int32 nToken );
void SetCurrentRedlineRevertProperties( uno::Sequence<beans::PropertyValue> aProperties );
void RemoveCurrentRedline( );
void ResetParaMarkerRedline( );
- void SetCurrentRedlineInitials( OUString sInitials );
+ void SetCurrentRedlineInitials( const OUString& sInitials );
bool IsFirstRun() { return m_bIsFirstRun;}
void SetIsFirstRun(bool bval) { m_bIsFirstRun = bval;}
@@ -716,7 +716,7 @@ public:
void processDeferredCharacterProperties();
/// Get a property of the current numbering style's current level.
- sal_Int32 getCurrentNumberingProperty(OUString aProp);
+ sal_Int32 getCurrentNumberingProperty(const OUString& aProp);
/// If we're importing into a new document, or just pasting to an existing one.
bool IsNewDoc();
@@ -750,11 +750,11 @@ public:
std::vector<FloatingTableInfo> m_aPendingFloatingTables;
/// Append a property to a sub-grabbag if necessary (e.g. 'lineRule', 'auto')
- void appendGrabBag(std::vector<beans::PropertyValue>& rInteropGrabBag, OUString aKey, OUString aValue);
- void appendGrabBag(std::vector<beans::PropertyValue>& rInteropGrabBag, OUString aKey, std::vector<beans::PropertyValue>& rValue);
+ void appendGrabBag(std::vector<beans::PropertyValue>& rInteropGrabBag, const OUString& aKey, const OUString& aValue);
+ void appendGrabBag(std::vector<beans::PropertyValue>& rInteropGrabBag, const OUString& aKey, std::vector<beans::PropertyValue>& rValue);
/// Enable, disable an check status of grabbags
- void enableInteropGrabBag(OUString aName);
+ void enableInteropGrabBag(const OUString& aName);
void disableInteropGrabBag();
bool isInteropGrabBagEnabled();
diff --git a/writerfilter/source/dmapper/MeasureHandler.cxx b/writerfilter/source/dmapper/MeasureHandler.cxx
index 11dc82b0e388..52a1ecdc3e61 100644
--- a/writerfilter/source/dmapper/MeasureHandler.cxx
+++ b/writerfilter/source/dmapper/MeasureHandler.cxx
@@ -124,7 +124,7 @@ sal_Int32 MeasureHandler::getMeasureValue() const
return nRet;
}
-void MeasureHandler::enableInteropGrabBag(OUString aName)
+void MeasureHandler::enableInteropGrabBag(const OUString& aName)
{
m_aInteropGrabBagName = aName;
}
diff --git a/writerfilter/source/dmapper/MeasureHandler.hxx b/writerfilter/source/dmapper/MeasureHandler.hxx
index be8be8a5ca4e..d688f3971d7a 100644
--- a/writerfilter/source/dmapper/MeasureHandler.hxx
+++ b/writerfilter/source/dmapper/MeasureHandler.hxx
@@ -54,7 +54,7 @@ public:
sal_Int32 getUnit() const { return m_nUnit; }
sal_Int16 GetRowHeightSizeType() const { return m_nRowHeightSizeType;}
- void enableInteropGrabBag(OUString aName);
+ void enableInteropGrabBag(const OUString& aName);
beans::PropertyValue getInteropGrabBag();
};
typedef boost::shared_ptr
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 553c024251de..036a4ec25082 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -64,7 +64,7 @@ void lcl_printProperties( uno::Sequence< beans::PropertyValue > aProps )
}
}
-sal_Int32 lcl_findProperty( uno::Sequence< beans::PropertyValue > aProps, OUString sName )
+sal_Int32 lcl_findProperty( uno::Sequence< beans::PropertyValue > aProps, const OUString& sName )
{
sal_Int32 i = 0;
sal_Int32 nLen = aProps.getLength( );
@@ -151,7 +151,7 @@ void ListLevel::SetParaStyle( boost::shared_ptr< StyleSheetEntry > pStyle )
&& styleId[ RTL_CONSTASCII_LENGTH( "Heading" ) ] <= '9' );
}
-sal_Int16 ListLevel::GetParentNumbering( OUString sText, sal_Int16 nLevel,
+sal_Int16 ListLevel::GetParentNumbering( const OUString& sText, sal_Int16 nLevel,
OUString& rPrefix, OUString& rSuffix )
{
sal_Int16 nParentNumbering = 1;
diff --git a/writerfilter/source/dmapper/NumberingManager.hxx b/writerfilter/source/dmapper/NumberingManager.hxx
index 7fe054af226e..59edda016de9 100644
--- a/writerfilter/source/dmapper/NumberingManager.hxx
+++ b/writerfilter/source/dmapper/NumberingManager.hxx
@@ -79,12 +79,12 @@ public:
// Setters for the import
void SetValue( Id nId, sal_Int32 nValue );
- void SetBulletChar( OUString sValue ) { m_sBulletChar = sValue; };
- void SetGraphicURL( OUString sValue ) { m_sGraphicURL = sValue; };
+ void SetBulletChar( const OUString& sValue ) { m_sBulletChar = sValue; };
+ void SetGraphicURL( const OUString& sValue ) { m_sGraphicURL = sValue; };
void SetGraphicBitmap( com::sun::star::uno::Reference< com::sun::star::graphic::XGraphic > sValue )
{ m_sGraphicBitmap = sValue; }
void SetParaStyle( boost::shared_ptr< StyleSheetEntry > pStyle );
- void AddRGBXchNums( OUString sValue ) { m_sRGBXchNums += sValue; };
+ void AddRGBXchNums( const OUString& sValue ) { m_sRGBXchNums += sValue; };
// Getters
OUString GetBulletChar( ) { return m_sBulletChar; };
@@ -94,7 +94,7 @@ public:
// UNO mapping functions
// rPrefix and rSuffix are out parameters
- static sal_Int16 GetParentNumbering( OUString sText, sal_Int16 nLevel,
+ static sal_Int16 GetParentNumbering( const OUString& sText, sal_Int16 nLevel,
OUString& rPrefix, OUString& rSuffix );
com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >
@@ -156,7 +156,7 @@ public:
// Setters using during the import
void SetId( sal_Int32 nId ) { m_nId = nId; };
void SetValue( sal_uInt32 nSprmId, sal_Int32 nValue );
- void AddRGISTD( OUString sValue ) { m_sRGISTD += sValue; };
+ void AddRGISTD( const OUString& sValue ) { m_sRGISTD += sValue; };
// Accessors
sal_Int32 GetId( ) { return m_nId; };
@@ -171,8 +171,8 @@ public:
com::sun::star::uno::Sequence<
com::sun::star::beans::PropertyValue > > GetPropertyValues( );
- void SetNumStyleLink(rtl::OUString sValue) { m_sNumStyleLink = sValue; };
- ::rtl::OUString GetNumStyleLink() { return m_sNumStyleLink; };
+ void SetNumStyleLink(const OUString& sValue) { m_sNumStyleLink = sValue; };
+ OUString GetNumStyleLink() { return m_sNumStyleLink; };
};
class ListDef : public AbstractListDef
diff --git a/writerfilter/source/dmapper/OLEHandler.cxx b/writerfilter/source/dmapper/OLEHandler.cxx
index fb49aa405df9..1976a13c24d8 100644
--- a/writerfilter/source/dmapper/OLEHandler.cxx
+++ b/writerfilter/source/dmapper/OLEHandler.cxx
@@ -171,7 +171,7 @@ void OLEHandler::lcl_sprm(Sprm & rSprm)
}
-void OLEHandler::saveInteropProperties( uno::Reference< text::XTextDocument > xTextDocument, OUString sObjectName )
+void OLEHandler::saveInteropProperties( uno::Reference< text::XTextDocument > xTextDocument, const OUString& sObjectName )
{
const OUString sGrabBagPropName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG;
const OUString sEmbeddingsPropName = "EmbeddedObjects";
diff --git a/writerfilter/source/dmapper/OLEHandler.hxx b/writerfilter/source/dmapper/OLEHandler.hxx
index 7a76dd076605..63be85b0ed0a 100644
--- a/writerfilter/source/dmapper/OLEHandler.hxx
+++ b/writerfilter/source/dmapper/OLEHandler.hxx
@@ -71,7 +71,7 @@ class OLEHandler : public LoggedProperties
// Interoperability
virtual void saveInteropProperties( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextDocument > xTextDocument,
- OUString sObjectName );
+ const OUString& sObjectName );
public:
OLEHandler();
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index d3a6953b6b9f..42dd33edd370 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -308,7 +308,7 @@ struct StyleSheetTable_Impl
OUString HasListCharStyle( const PropertyValueVector_t& rCharProperties );
/// Appends the given key-value pair to the list of latent style properties of the current entry.
- void AppendLatentStyleProperty(OUString aName, Value& rValue);
+ void AppendLatentStyleProperty(const OUString& aName, Value& rValue);
};
@@ -372,7 +372,7 @@ OUString StyleSheetTable_Impl::HasListCharStyle( const PropertyValueVector_t& rP
return sRet;
}
-void StyleSheetTable_Impl::AppendLatentStyleProperty(OUString aName, Value& rValue)
+void StyleSheetTable_Impl::AppendLatentStyleProperty(const OUString& aName, Value& rValue)
{
beans::PropertyValue aValue;
aValue.Name = aName;
@@ -1272,13 +1272,14 @@ const StyleSheetEntryPtr StyleSheetTable::FindDefaultParaStyle()
return pRet;
}
-const StyleSheetEntryPtr StyleSheetTable::FindParentStyleSheet(OUString sBaseStyle)
+const StyleSheetEntryPtr StyleSheetTable::FindParentStyleSheet(const OUString& _sBaseStyle)
{
- if( sBaseStyle.isEmpty() )
+ if( _sBaseStyle.isEmpty() )
{
StyleSheetEntryPtr pEmptyPtr;
return pEmptyPtr;
}
+ OUString sBaseStyle = _sBaseStyle;
if( m_pImpl->m_pCurrentEntry)
sBaseStyle = m_pImpl->m_pCurrentEntry->sBaseStyleIdentifier;
diff --git a/writerfilter/source/dmapper/StyleSheetTable.hxx b/writerfilter/source/dmapper/StyleSheetTable.hxx
index bcb5700fb414..42b3817735f4 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.hxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.hxx
@@ -99,7 +99,7 @@ public:
const StyleSheetEntryPtr FindStyleSheetByConvertedStyleName(const OUString& rIndex);
const StyleSheetEntryPtr FindDefaultParaStyle();
// returns the parent of the one with the given name - if empty the parent of the current style sheet is returned
- const StyleSheetEntryPtr FindParentStyleSheet(OUString sBaseStyle);
+ const StyleSheetEntryPtr FindParentStyleSheet(const OUString& sBaseStyle);
OUString ConvertStyleName( const OUString& rWWName, bool bExtendedSearch = false );
OUString GetStyleIdFromIndex(const sal_uInt32 sti);
diff --git a/writerfilter/source/dmapper/TDefTableHandler.cxx b/writerfilter/source/dmapper/TDefTableHandler.cxx
index 6f26d27a4746..58b551d27654 100644
--- a/writerfilter/source/dmapper/TDefTableHandler.cxx
+++ b/writerfilter/source/dmapper/TDefTableHandler.cxx
@@ -495,12 +495,12 @@ size_t TDefTableHandler::getCellCount() const
return m_aCellVertAlign.size();
}
-void TDefTableHandler::enableInteropGrabBag(OUString aName)
+void TDefTableHandler::enableInteropGrabBag(const OUString& aName)
{
m_aInteropGrabBagName = aName;
}
-beans::PropertyValue TDefTableHandler::getInteropGrabBag(OUString aName)
+beans::PropertyValue TDefTableHandler::getInteropGrabBag(const OUString& aName)
{
beans::PropertyValue aRet;
if (aName.isEmpty())
@@ -518,7 +518,7 @@ beans::PropertyValue TDefTableHandler::getInteropGrabBag(OUString aName)
return aRet;
}
-void TDefTableHandler::appendGrabBag(OUString aKey, OUString aValue)
+void TDefTableHandler::appendGrabBag(const OUString& aKey, const OUString& aValue)
{
beans::PropertyValue aProperty;
aProperty.Name = aKey;
diff --git a/writerfilter/source/dmapper/TDefTableHandler.hxx b/writerfilter/source/dmapper/TDefTableHandler.hxx
index 3a1c7d7f55b8..cedb63ca8dd6 100644
--- a/writerfilter/source/dmapper/TDefTableHandler.hxx
+++ b/writerfilter/source/dmapper/TDefTableHandler.hxx
@@ -64,7 +64,7 @@ private:
OUString m_aInteropGrabBagName;
std::vector<beans::PropertyValue> m_aInteropGrabBag;
- void appendGrabBag(OUString aKey, OUString aValue);
+ void appendGrabBag(const OUString& aKey, const OUString& aValue);
void localResolve(Id Name, writerfilter::Reference<Properties>::Pointer_t pProperties);
@@ -80,8 +80,8 @@ public:
void fillCellProperties( size_t nCell, ::boost::shared_ptr< TablePropertyMap > pCellProperties) const;
::boost::shared_ptr<PropertyMap> getRowProperties() const;
sal_Int32 getTableWidth() const;
- void enableInteropGrabBag(OUString aName);
- beans::PropertyValue getInteropGrabBag(OUString aName = OUString());
+ void enableInteropGrabBag(const OUString& aName);
+ beans::PropertyValue getInteropGrabBag(const OUString& aName = OUString());
static OUString getBorderTypeString(sal_Int32 nType);
static OUString getThemeColorTypeString(sal_Int32 nType);
};
diff --git a/writerfilter/source/dmapper/TblStylePrHandler.cxx b/writerfilter/source/dmapper/TblStylePrHandler.cxx
index 10eecfb7847c..d835be8884a7 100644
--- a/writerfilter/source/dmapper/TblStylePrHandler.cxx
+++ b/writerfilter/source/dmapper/TblStylePrHandler.cxx
@@ -158,7 +158,7 @@ void TblStylePrHandler::resolveSprmProps(Sprm & rSprm)
pProperties->resolve(*this);
}
-void TblStylePrHandler::appendInteropGrabBag(OUString aKey, OUString aValue)
+void TblStylePrHandler::appendInteropGrabBag(const OUString& aKey, const OUString& aValue)
{
beans::PropertyValue aProperty;
aProperty.Name = aKey;
@@ -166,7 +166,7 @@ void TblStylePrHandler::appendInteropGrabBag(OUString aKey, OUString aValue)
m_aInteropGrabBag.push_back(aProperty);
}
-beans::PropertyValue TblStylePrHandler::getInteropGrabBag(OUString aName)
+beans::PropertyValue TblStylePrHandler::getInteropGrabBag(const OUString& aName)
{
beans::PropertyValue aRet;
aRet.Name = aName;
diff --git a/writerfilter/source/dmapper/TblStylePrHandler.hxx b/writerfilter/source/dmapper/TblStylePrHandler.hxx
index eed2c0ed5464..e9d39c9275e7 100644
--- a/writerfilter/source/dmapper/TblStylePrHandler.hxx
+++ b/writerfilter/source/dmapper/TblStylePrHandler.hxx
@@ -71,8 +71,8 @@ public:
inline PropertyMapPtr getProperties() { return m_pProperties; };
inline TblStyleType getType() { return m_nType; };
OUString getTypeString();
- void appendInteropGrabBag(OUString aKey, OUString aValue);
- beans::PropertyValue getInteropGrabBag(OUString aName);
+ void appendInteropGrabBag(const OUString& aKey, const OUString& aValue);
+ beans::PropertyValue getInteropGrabBag(const OUString& aName);
private:
diff --git a/writerfilter/source/dmapper/ThemeTable.cxx b/writerfilter/source/dmapper/ThemeTable.cxx
index 52be4c25524c..f654e2c406fc 100644
--- a/writerfilter/source/dmapper/ThemeTable.cxx
+++ b/writerfilter/source/dmapper/ThemeTable.cxx
@@ -265,7 +265,7 @@ void ThemeTable::setThemeFontLangProperties(uno::Sequence<beans::PropertyValue>
}
}
-OUString ThemeTable::fromLocaleToScriptTag(OUString sLocale)
+OUString ThemeTable::fromLocaleToScriptTag(const OUString& sLocale)
{
return fromLCIDToScriptTag(LanguageTag::convertToLanguageType(sLocale));
}
diff --git a/writerfilter/source/dmapper/ThemeTable.hxx b/writerfilter/source/dmapper/ThemeTable.hxx
index e159954e77ac..176ea68bbcdd 100644
--- a/writerfilter/source/dmapper/ThemeTable.hxx
+++ b/writerfilter/source/dmapper/ThemeTable.hxx
@@ -54,7 +54,7 @@ public:
virtual void lcl_entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref);
// Helper methods
- OUString fromLocaleToScriptTag(OUString sLocale);
+ OUString fromLocaleToScriptTag(const OUString& sLocale);
OUString fromLCIDToScriptTag(LanguageType lang);
};
typedef boost::shared_ptr< ThemeTable > ThemeTablePtr;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index c50e13e6d972..ab4c3c9fe915 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -614,7 +614,7 @@ sal_uInt32 RTFDocumentImpl::getColorTable(sal_uInt32 nIndex)
return m_pSuperstream->getColorTable(nIndex);
}
-rtl_TextEncoding RTFDocumentImpl::getEncoding(OUString aFontName)
+rtl_TextEncoding RTFDocumentImpl::getEncoding(const OUString& aFontName)
{
if (!m_pSuperstream)
{
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index b1a1b8e0ac8e..0fc84e2f9c97 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -358,7 +358,7 @@ namespace writerfilter {
/// Return the style name of an RTF style index.
OUString getStyleName(int nIndex);
/// Return the encoding associated with a font name.
- rtl_TextEncoding getEncoding(OUString aFontName);
+ rtl_TextEncoding getEncoding(const OUString& aFontName);
/// Get the default parser state.
RTFParserState& getDefaultState();
oox::GraphicHelper& getGraphicHelper();
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index fa147d77445c..d9871d9ea11a 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -60,7 +60,7 @@ RTFSdrImport::~RTFSdrImport()
m_aParents.pop();
}
-void RTFSdrImport::createShape(OUString aStr, uno::Reference<drawing::XShape>& xShape, uno::Reference<beans::XPropertySet>& xPropertySet)
+void RTFSdrImport::createShape(const OUString& aStr, uno::Reference<drawing::XShape>& xShape, uno::Reference<beans::XPropertySet>& xPropertySet)
{
if (m_rImport.getModelFactory().is())
xShape.set(m_rImport.getModelFactory()->createInstance(aStr), uno::UNO_QUERY);
@@ -134,7 +134,7 @@ void RTFSdrImport::resolveFLine(uno::Reference<beans::XPropertySet> xPropertySet
xPropertySet->setPropertyValue("LineStyle", uno::makeAny(drawing::LineStyle_NONE));
}
-void RTFSdrImport::applyProperty(uno::Reference<drawing::XShape> xShape, OUString aKey, OUString aValue)
+void RTFSdrImport::applyProperty(uno::Reference<drawing::XShape> xShape, const OUString& aKey, const OUString& aValue)
{
uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY);
sal_Int16 nHoriOrient = 0;
@@ -703,12 +703,12 @@ void RTFSdrImport::close()
m_rImport.Mapper().endShape();
}
-void RTFSdrImport::append(OUString aKey, OUString aValue)
+void RTFSdrImport::append(const OUString& aKey, const OUString& aValue)
{
applyProperty(m_xShape, aKey, aValue);
}
-void RTFSdrImport::appendGroupProperty(OUString aKey, OUString aValue)
+void RTFSdrImport::appendGroupProperty(const OUString& aKey, const OUString& aValue)
{
uno::Reference<drawing::XShape> xShape(m_aParents.top(), uno::UNO_QUERY);
if (xShape.is())
diff --git a/writerfilter/source/rtftok/rtfsdrimport.hxx b/writerfilter/source/rtftok/rtfsdrimport.hxx
index 31d08b4bba5b..6fb5e42d24ea 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.hxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.hxx
@@ -25,9 +25,9 @@ namespace writerfilter {
void resolve(RTFShape& rShape, bool bClose);
void close();
- void append(OUString aKey, OUString aValue);
+ void append(const OUString& aKey, const OUString& aValue);
/// Append property on the current parent.
- void appendGroupProperty(OUString aKey, OUString aValue);
+ void appendGroupProperty(const OUString& aKey, const OUString& aValue);
void resolveDhgt(uno::Reference<beans::XPropertySet> xPropertySet, sal_Int32 nZOrder, bool bOldStyle);
void resolveFLine(uno::Reference<beans::XPropertySet> xPropertySet, sal_Int32 nFLine);
/**
@@ -41,8 +41,8 @@ namespace writerfilter {
/// Pop the current group shape from the parent stack.
void popParent();
private:
- void createShape(OUString aService, uno::Reference<drawing::XShape>& xShape, uno::Reference<beans::XPropertySet>& xPropertySet);
- void applyProperty(uno::Reference<drawing::XShape> xShape, OUString aKey, OUString aValue);
+ void createShape(const OUString& aService, uno::Reference<drawing::XShape>& xShape, uno::Reference<beans::XPropertySet>& xPropertySet);
+ void applyProperty(uno::Reference<drawing::XShape> xShape, const OUString& aKey, const OUString& aValue);
RTFDocumentImpl& m_rImport;
std::stack< uno::Reference<drawing::XShapes> > m_aParents;
diff --git a/writerfilter/source/rtftok/rtfvalue.cxx b/writerfilter/source/rtftok/rtfvalue.cxx
index 9a582bfab004..cf218e7d828e 100644
--- a/writerfilter/source/rtftok/rtfvalue.cxx
+++ b/writerfilter/source/rtftok/rtfvalue.cxx
@@ -14,7 +14,7 @@ namespace writerfilter {
namespace rtftok {
-RTFValue::RTFValue(int nValue, OUString sValue, RTFSprms rAttributes,
+RTFValue::RTFValue(int nValue, const OUString& sValue, RTFSprms rAttributes,
RTFSprms rSprms, uno::Reference<drawing::XShape> xShape,
uno::Reference<io::XInputStream> xStream, uno::Reference<embed::XEmbeddedObject> xObject, bool bForceString,
RTFShape aShape)
@@ -56,7 +56,7 @@ RTFValue::RTFValue(int nValue)
m_pShape.reset(new RTFShape());
}
-RTFValue::RTFValue(OUString sValue, bool bForce)
+RTFValue::RTFValue(const OUString& sValue, bool bForce)
: m_nValue(),
m_sValue(sValue),
m_xShape(),
@@ -164,7 +164,7 @@ OUString RTFValue::getString() const
return OUString::number(m_nValue);
}
-void RTFValue::setString(OUString sValue)
+void RTFValue::setString(const OUString& sValue)
{
m_sValue = sValue;
}
diff --git a/writerfilter/source/rtftok/rtfvalue.hxx b/writerfilter/source/rtftok/rtfvalue.hxx
index 91bb6b86cc1b..adfd4b0d307e 100644
--- a/writerfilter/source/rtftok/rtfvalue.hxx
+++ b/writerfilter/source/rtftok/rtfvalue.hxx
@@ -24,12 +24,12 @@ namespace writerfilter {
{
public:
typedef boost::shared_ptr<RTFValue> Pointer_t;
- RTFValue(int nValue, OUString sValue, RTFSprms rAttributes, RTFSprms rSprms, uno::Reference<drawing::XShape> rShape,
+ RTFValue(int nValue, const OUString& sValue, RTFSprms rAttributes, RTFSprms rSprms, uno::Reference<drawing::XShape> rShape,
uno::Reference<io::XInputStream> rStream, uno::Reference<embed::XEmbeddedObject> rObject, bool bForceString,
RTFShape aShape);
RTFValue();
RTFValue(int nValue);
- RTFValue(OUString sValue, bool bForce = false);
+ RTFValue(const OUString& sValue, bool bForce = false);
RTFValue(RTFSprms rAttributes);
RTFValue(RTFSprms rAttributes, RTFSprms rSprms);
RTFValue(uno::Reference<drawing::XShape> rShape);
@@ -37,7 +37,7 @@ namespace writerfilter {
RTFValue(uno::Reference<embed::XEmbeddedObject> rObject);
RTFValue(RTFShape aShape);
virtual ~RTFValue();
- void setString(OUString sValue);
+ void setString(const OUString& sValue);
virtual int getInt() const;
virtual OUString getString() const;
virtual uno::Any getAny() const;