summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-03-03 09:59:31 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-03-04 00:51:57 +0000
commitc6223049651d6607101ef04271773e478a429c8a (patch)
treef2bfb8c976896009409ae47780c324d3a9b51c77 /writerfilter
parent242ed97d9a74a08363e1306452bba20f06d673e4 (diff)
V813: Decreased performance
Change-Id: Ica2563d9e8da15e19eb38246d4de54a1fcb75655
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/CellColorHandler.cxx4
-rw-r--r--writerfilter/source/dmapper/CellColorHandler.hxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableHandler.cxx4
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.hxx2
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx4
-rw-r--r--writerfilter/source/dmapper/PropertyMap.hxx2
-rw-r--r--writerfilter/source/dmapper/SdtHelper.cxx12
-rw-r--r--writerfilter/source/dmapper/SdtHelper.hxx4
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx15
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.hxx2
11 files changed, 24 insertions, 29 deletions
diff --git a/writerfilter/source/dmapper/CellColorHandler.cxx b/writerfilter/source/dmapper/CellColorHandler.cxx
index 7d4ce2bc8bc8..98a4e5e2b0f3 100644
--- a/writerfilter/source/dmapper/CellColorHandler.cxx
+++ b/writerfilter/source/dmapper/CellColorHandler.cxx
@@ -284,14 +284,14 @@ TablePropertyMapPtr CellColorHandler::getProperties()
return pPropertyMap;
}
-void CellColorHandler::createGrabBag(const OUString& aName, uno::Any aAny)
+void CellColorHandler::createGrabBag(const OUString& aName, const uno::Any& rAny)
{
if (m_aInteropGrabBagName.isEmpty())
return;
beans::PropertyValue aValue;
aValue.Name = aName;
- aValue.Value = aAny;
+ aValue.Value = rAny;
m_aInteropGrabBag.push_back(aValue);
}
diff --git a/writerfilter/source/dmapper/CellColorHandler.hxx b/writerfilter/source/dmapper/CellColorHandler.hxx
index 36ac6fa5c66f..c55d280d0b79 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) SAL_OVERRIDE;
virtual void lcl_sprm(Sprm & sprm) SAL_OVERRIDE;
- void createGrabBag(const OUString& aName, css::uno::Any aValue);
+ void createGrabBag(const OUString& aName, const css::uno::Any& rValue);
public:
CellColorHandler( );
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 60ea3d6aa2be..de9467eea2d2 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -962,7 +962,7 @@ RowPropertyValuesSeq_t DomainMapperTableHandler::endTableGetRowProperties()
// Apply paragraph property to each paragraph within a cell.
static void lcl_ApplyCellParaProps(uno::Reference<table::XCell> const& xCell,
- uno::Any aBottomMargin)
+ const uno::Any& rBottomMargin)
{
uno::Reference<container::XEnumerationAccess> xEnumerationAccess(xCell, uno::UNO_QUERY);
uno::Reference<container::XEnumeration> xEnumeration = xEnumerationAccess->createEnumeration();
@@ -973,7 +973,7 @@ static void lcl_ApplyCellParaProps(uno::Reference<table::XCell> const& xCell,
// Don't apply in case direct formatting is already present.
// TODO: probably paragraph style has priority over table style here.
if (xPropertyState.is() && xPropertyState->getPropertyState("ParaBottomMargin") == beans::PropertyState_DEFAULT_VALUE)
- xParagraph->setPropertyValue("ParaBottomMargin", aBottomMargin);
+ xParagraph->setPropertyValue("ParaBottomMargin", rBottomMargin);
}
}
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 31e828b227bc..62b98aaa74a2 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -5034,7 +5034,7 @@ SectionPropertyMap * DomainMapper_Impl::GetSectionContext()
return pSectionContext;
}
-void DomainMapper_Impl::deferCharacterProperty( sal_Int32 id, com::sun::star::uno::Any value )
+void DomainMapper_Impl::deferCharacterProperty(sal_Int32 id, const css::uno::Any& value)
{
deferredCharacterProperties[ id ] = value;
}
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index 956e461502e5..a19af0dcc7dd 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -768,7 +768,7 @@ public:
on another one that comes in the same CONTEXT_CHARACTER). The property will be processed
again in DomainMapper::processDeferredCharacterProperties().
*/
- void deferCharacterProperty( sal_Int32 id, com::sun::star::uno::Any value );
+ void deferCharacterProperty(sal_Int32 id, const css::uno::Any& value);
/**
Processes properties deferred using deferCharacterProperty(). To be called whenever the top
CONTEXT_CHARACTER is going to be used (e.g. by appendText()).
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index f1f3a65c9ac6..63995b88a901 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -688,7 +688,7 @@ void SectionPropertyMap::ApplyBorderToPageStyles(
}
}
-table::ShadowFormat PropertyMap::getShadowFromBorder(table::BorderLine2 aBorder)
+table::ShadowFormat PropertyMap::getShadowFromBorder(const table::BorderLine2& rBorder)
{
// In Word UI, shadow is a boolean property, in OOXML, it's a boolean
// property of each 4 border type, finally in Writer the border is a
@@ -697,7 +697,7 @@ table::ShadowFormat PropertyMap::getShadowFromBorder(table::BorderLine2 aBorder)
table::ShadowFormat aFormat;
aFormat.Color = COL_BLACK;
aFormat.Location = table::ShadowLocation_BOTTOM_RIGHT;
- aFormat.ShadowWidth = aBorder.LineWidth;
+ aFormat.ShadowWidth = rBorder.LineWidth;
return aFormat;
}
diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx
index 58908334bbd5..a1bb5c63dd5e 100644
--- a/writerfilter/source/dmapper/PropertyMap.hxx
+++ b/writerfilter/source/dmapper/PropertyMap.hxx
@@ -174,7 +174,7 @@ public:
#ifdef DEBUG_WRITERFILTER
void dumpXml( const TagLogger::Pointer_t pLogger ) const;
#endif
- static com::sun::star::table::ShadowFormat getShadowFromBorder(com::sun::star::table::BorderLine2 aBorder);
+ static com::sun::star::table::ShadowFormat getShadowFromBorder(const css::table::BorderLine2& rBorder);
};
typedef std::shared_ptr<PropertyMap> PropertyMapPtr;
diff --git a/writerfilter/source/dmapper/SdtHelper.cxx b/writerfilter/source/dmapper/SdtHelper.cxx
index 1c98e6f03382..673293d1e7b3 100644
--- a/writerfilter/source/dmapper/SdtHelper.cxx
+++ b/writerfilter/source/dmapper/SdtHelper.cxx
@@ -90,7 +90,7 @@ void SdtHelper::createDropDownControl()
m_aDropDownItems.clear();
}
-void SdtHelper::createDateControl(OUString& rContentText, beans::PropertyValue aCharFormat)
+void SdtHelper::createDateControl(OUString& rContentText, const beans::PropertyValue& rCharFormat)
{
uno::Reference<awt::XControlModel> xControlModel;
try
@@ -138,7 +138,7 @@ void SdtHelper::createDateControl(OUString& rContentText, beans::PropertyValue a
aGrabBag["OriginalContent"] <<= rContentText;
aGrabBag["DateFormat"] <<= sDateFormat;
aGrabBag["Locale"] <<= m_sLocale.makeStringAndClear();
- aGrabBag["CharFormat"] <<= aCharFormat.Value;
+ aGrabBag["CharFormat"] <<= rCharFormat.Value;
// merge in properties like ooxml:CT_SdtPr_alias and friends.
aGrabBag.update(comphelper::SequenceAsHashMap(comphelper::containerToSequence(m_aGrabBag)));
// and empty the property list, so they won't end up on the next sdt as well
@@ -170,13 +170,7 @@ void SdtHelper::createControlShape(awt::Size aSize, uno::Reference<awt::XControl
m_bHasElements = true;
}
-
-
-
-
-
-
-void SdtHelper::appendToInteropGrabBag(com::sun::star::beans::PropertyValue rValue)
+void SdtHelper::appendToInteropGrabBag(const com::sun::star::beans::PropertyValue& rValue)
{
m_aGrabBag.push_back(rValue);
}
diff --git a/writerfilter/source/dmapper/SdtHelper.hxx b/writerfilter/source/dmapper/SdtHelper.hxx
index f22f30664f2c..52576d79f521 100644
--- a/writerfilter/source/dmapper/SdtHelper.hxx
+++ b/writerfilter/source/dmapper/SdtHelper.hxx
@@ -112,9 +112,9 @@ public:
/// Create drop-down control from w:sdt's w:dropDownList.
void createDropDownControl();
/// Create date control from w:sdt's w:date.
- void createDateControl(OUString& rContentText, css::beans::PropertyValue aCharFormat);
+ void createDateControl(OUString& rContentText, const css::beans::PropertyValue& rCharFormat);
- void appendToInteropGrabBag(com::sun::star::beans::PropertyValue rValue);
+ void appendToInteropGrabBag(const com::sun::star::beans::PropertyValue& rValue);
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> getInteropGrabBagAndClear();
bool isInteropGrabBagEmpty();
bool containedInInteropGrabBag(const OUString& rValueName);
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index a8dab40188be..087425c8ba0f 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -192,9 +192,9 @@ beans::PropertyValue StyleSheetEntry::GetInteropGrabBag()
return aRet;
}
-void StyleSheetEntry::AppendInteropGrabBag(beans::PropertyValue aValue)
+void StyleSheetEntry::AppendInteropGrabBag(const beans::PropertyValue& rValue)
{
- m_aInteropGrabBag.push_back(aValue);
+ m_aInteropGrabBag.push_back(rValue);
}
void lcl_mergeProps( PropertyMapPtr pToFill, PropertyMapPtr pToAdd, TblStyleType nStyleId )
@@ -875,23 +875,24 @@ class PropValVector : public _PropValVector
public:
PropValVector(){}
- void Insert( beans::PropertyValue aVal );
+ void Insert(const beans::PropertyValue& rVal);
uno::Sequence< uno::Any > getValues();
uno::Sequence< OUString > getNames();
};
-void PropValVector::Insert( beans::PropertyValue aVal )
+
+void PropValVector::Insert(const beans::PropertyValue& rVal)
{
_PropValVector::iterator aIt = begin();
while(aIt != end())
{
- if(aIt->Name > aVal.Name)
+ if(aIt->Name > rVal.Name)
{
- insert( aIt, aVal );
+ insert( aIt, rVal );
return;
}
++aIt;
}
- push_back( aVal );
+ push_back(rVal);
}
uno::Sequence< uno::Any > PropValVector::getValues()
{
diff --git a/writerfilter/source/dmapper/StyleSheetTable.hxx b/writerfilter/source/dmapper/StyleSheetTable.hxx
index 27091481f158..e7eaf02ea47c 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.hxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.hxx
@@ -68,7 +68,7 @@ public:
std::vector<css::beans::PropertyValue> aLsdExceptions; ///< List of lsdException attribute lists
bool bAutoRedefine; ///< Writer calls this auto-update.
- void AppendInteropGrabBag(css::beans::PropertyValue aValue);
+ void AppendInteropGrabBag(const css::beans::PropertyValue& rValue);
css::beans::PropertyValue GetInteropGrabBag(); ///< Used for table styles, has a name.
css::beans::PropertyValues GetInteropGrabBagSeq(); ///< Used for existing styles, just a list of properties.