summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-31 12:05:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-14 11:51:44 +0200
commitb0de7bc428aaf914a836da3c33b123e4195e603e (patch)
treeb5d83694bab8f9958281f9b382b2d5731d8f7263 /writerfilter
parent5d5ac2fd9e8fe4781d6175eb58b949ba9c25d564 (diff)
clang-tidy modernize-use-emplace in various
Change-Id: Id1bbd3f380c17beeaab11f7140d4df1304c3d0d8 Reviewed-on: https://gerrit.libreoffice.org/41750 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableHandler.cxx4
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx10
-rw-r--r--writerfilter/source/dmapper/NumberingManager.cxx12
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx2
4 files changed, 12 insertions, 16 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index a00548c84b56..98faa97b635d 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -1152,7 +1152,7 @@ void DomainMapperTableHandler::endTable(unsigned int nestedTableLevel, bool bTab
sal_Int32 nTableWidth = 0;
m_aTableProperties->getValue(TablePropertyMap::TABLE_WIDTH, nTableWidth);
if (m_rDMapper_Impl.GetSectionContext() && nestedTableLevel <= 1 && !m_rDMapper_Impl.IsInHeaderFooter())
- m_rDMapper_Impl.m_aPendingFloatingTables.push_back(FloatingTableInfo(xStart, xEnd, comphelper::containerToSequence(aFrameProperties), nTableWidth));
+ m_rDMapper_Impl.m_aPendingFloatingTables.emplace_back(xStart, xEnd, comphelper::containerToSequence(aFrameProperties), nTableWidth);
else
{
// m_xText points to the body text, get the current xText from m_rDMapper_Impl, in case e.g. we would be in a header.
@@ -1183,7 +1183,7 @@ void DomainMapperTableHandler::endTable(unsigned int nestedTableLevel, bool bTab
void DomainMapperTableHandler::startRow(const TablePropertyMapPtr& pProps)
{
m_aRowProperties.push_back( pProps );
- m_aCellProperties.push_back( PropertyMapVector1() );
+ m_aCellProperties.emplace_back( );
#ifdef DEBUG_WRITERFILTER
TagLogger::getInstance().startElement("table.row");
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 2cd7f7fff6c2..1b777821b8b3 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -600,7 +600,7 @@ void DomainMapper_Impl::InitTabStopFromStyle( const uno::Sequence< style::TabSto
OSL_ENSURE(m_aCurrentTabStops.empty(), "tab stops already initialized");
for( sal_Int32 nTab = 0; nTab < rInitTabStops.getLength(); ++nTab)
{
- m_aCurrentTabStops.push_back( DeletableTabStop(rInitTabStops[nTab]) );
+ m_aCurrentTabStops.emplace_back(rInitTabStops[nTab] );
}
}
@@ -5227,13 +5227,13 @@ void DomainMapper_Impl::ApplySettingsTable()
std::vector<beans::PropertyValue> aViewProps;
if (m_pSettingsTable->GetZoomFactor())
{
- aViewProps.push_back(beans::PropertyValue("ZoomFactor", -1, uno::makeAny(m_pSettingsTable->GetZoomFactor()), beans::PropertyState_DIRECT_VALUE));
- aViewProps.push_back(beans::PropertyValue("VisibleBottom", -1, uno::makeAny(sal_Int32(0)), beans::PropertyState_DIRECT_VALUE));
- aViewProps.push_back(beans::PropertyValue("ZoomType", -1, uno::makeAny(sal_Int16(0)), beans::PropertyState_DIRECT_VALUE));
+ aViewProps.emplace_back("ZoomFactor", -1, uno::makeAny(m_pSettingsTable->GetZoomFactor()), beans::PropertyState_DIRECT_VALUE);
+ aViewProps.emplace_back("VisibleBottom", -1, uno::makeAny(sal_Int32(0)), beans::PropertyState_DIRECT_VALUE);
+ aViewProps.emplace_back("ZoomType", -1, uno::makeAny(sal_Int16(0)), beans::PropertyState_DIRECT_VALUE);
}
if (m_pSettingsTable->GetView())
{
- aViewProps.push_back(beans::PropertyValue("ShowOnlineLayout", -1, uno::makeAny(m_pSettingsTable->GetView() == NS_ooxml::LN_Value_doc_ST_View_web), beans::PropertyState_DIRECT_VALUE));
+ aViewProps.emplace_back("ShowOnlineLayout", -1, uno::makeAny(m_pSettingsTable->GetView() == NS_ooxml::LN_Value_doc_ST_View_web), beans::PropertyState_DIRECT_VALUE);
}
uno::Reference<container::XIndexContainer> xBox = document::IndexedPropertyValues::create(m_xComponentContext);
xBox->insertByIndex(sal_Int32(0), uno::makeAny(comphelper::containerToSequence(aViewProps)));
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 47f5dae1999b..5da02b0004d4 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -217,11 +217,11 @@ uno::Sequence< beans::PropertyValue > ListLevel::GetCharStyleProperties( )
beans::PropertyValue* aGrabIter = vGrabVals.begin();
for(; aGrabIter!=vGrabVals.end(); ++aGrabIter) {
if(!IgnoreForCharStyle(aGrabIter->Name))
- rProperties.push_back(beans::PropertyValue(aGrabIter->Name, 0, aGrabIter->Value, beans::PropertyState_DIRECT_VALUE));
+ rProperties.emplace_back(aGrabIter->Name, 0, aGrabIter->Value, beans::PropertyState_DIRECT_VALUE);
}
}
else
- rProperties.push_back(beans::PropertyValue(aValIter->Name, 0, aValIter->Value, beans::PropertyState_DIRECT_VALUE));
+ rProperties.emplace_back(aValIter->Name, 0, aValIter->Value, beans::PropertyState_DIRECT_VALUE);
}
return comphelper::containerToSequence(rProperties);
@@ -303,16 +303,12 @@ uno::Sequence< beans::PropertyValue > ListLevel::GetLevelProperties( )
for(PropertyIds const & rReadId : aReadIds) {
boost::optional<PropertyMap::Property> aProp = getProperty(rReadId);
if (aProp)
- aNumberingProperties.push_back(
- beans::PropertyValue( getPropertyName(aProp->first), 0, aProp->second, beans::PropertyState_DIRECT_VALUE )
- );
+ aNumberingProperties.emplace_back( getPropertyName(aProp->first), 0, aProp->second, beans::PropertyState_DIRECT_VALUE );
}
boost::optional<PropertyMap::Property> aPropFont = getProperty(PROP_CHAR_FONT_NAME);
if(aPropFont && !isOutlineNumbering())
- aNumberingProperties.push_back(
- beans::PropertyValue( getPropertyName(PROP_BULLET_FONT_NAME), 0, aPropFont->second, beans::PropertyState_DIRECT_VALUE )
- );
+ aNumberingProperties.emplace_back( getPropertyName(PROP_BULLET_FONT_NAME), 0, aPropFont->second, beans::PropertyState_DIRECT_VALUE );
return comphelper::containerToSequence(aNumberingProperties);
}
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index cc63585dc9dc..9e5d80735c47 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -1591,7 +1591,7 @@ OUString StyleSheetTable::getOrCreateCharStyle( PropertyValueVector_t& rCharProp
++aCharPropIter;
}
xCharStyles->insertByName( sListLabel, uno::makeAny( xStyle) );
- m_pImpl->m_aListCharStylePropertyVector.push_back( ListCharStylePropertyMap_t( sListLabel, rCharProperties ));
+ m_pImpl->m_aListCharStylePropertyVector.emplace_back( sListLabel, rCharProperties );
}
catch( const uno::Exception& )
{