summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-12 09:45:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-12 10:33:27 +0200
commita185ea4ec12898574d52ebdf4a1017005745df7d (patch)
treed6a88042cb6be1d75f3a12a11f0b918eeb6fa403 /sd
parente609ac1e5ffe1a6882551660256d9625b630d346 (diff)
clang-tidy modernize-use-emplace in sd
Change-Id: I2e3000f7bd0f3beed8309e0e3dd18e6ed4b8feee Reviewed-on: https://gerrit.libreoffice.org/42184 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx2
-rw-r--r--sd/source/core/drawdoc3.cxx2
-rw-r--r--sd/source/core/stlpool.cxx28
-rw-r--r--sd/source/filter/eppt/eppt.cxx2
-rw-r--r--sd/source/filter/eppt/epptso.cxx6
-rw-r--r--sd/source/ui/dlg/assclass.cxx2
-rw-r--r--sd/source/ui/framework/configuration/ResourceFactoryManager.cxx2
-rw-r--r--sd/source/ui/func/fuinsfil.cxx2
-rw-r--r--sd/source/ui/presenter/CanvasUpdateRequester.cxx2
-rw-r--r--sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx2
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx50
-rw-r--r--sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx3
-rw-r--r--sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx8
-rw-r--r--sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlsClipboard.cxx8
-rw-r--r--sd/source/ui/unoidl/DrawController.cxx60
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx8
-rw-r--r--sd/source/ui/view/Outliner.cxx2
-rw-r--r--sd/source/ui/view/ViewShellManager.cxx2
-rw-r--r--sd/source/ui/view/WindowUpdater.cxx2
-rw-r--r--sd/source/ui/view/drviews2.cxx2
21 files changed, 87 insertions, 110 deletions
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 7f85c8892d9e..c72b42a5ac5b 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -285,7 +285,7 @@ void SdTiledRenderingTest::callbackImpl(int nType, const char* pPayload)
boost::property_tree::read_json(aStream, aTree);
for (boost::property_tree::ptree::value_type& rValue : aTree.get_child("searchResultSelection"))
{
- m_aSearchResultSelection.push_back(rValue.second.get<std::string>("rectangles").c_str());
+ m_aSearchResultSelection.emplace_back(rValue.second.get<std::string>("rectangles").c_str());
m_aSearchResultPart.push_back(std::atoi(rValue.second.get<std::string>("part").c_str()));
}
}
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index f1bdd1f78260..a2f9352fb40d 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -1595,7 +1595,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
pMySheet->GetItemSet().ClearItem(); // Delete all
pMySheet->GetItemSet().Put(pHisSheet->GetItemSet());
- aCreatedStyles.push_back( SdStyleSheetRef( static_cast< SdStyleSheet* >( pMySheet ) ) );
+ aCreatedStyles.emplace_back( static_cast< SdStyleSheet* >( pMySheet ) );
}
StyleReplaceData aReplData;
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 6397dc1f5fd6..d2dcd481d1c6 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -680,7 +680,7 @@ void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily
// Also set parent relation for copied style sheets
OUString aParent( xSheet->GetParent() );
if( !aParent.isEmpty() )
- aNewStyles.push_back( std::pair< rtl::Reference< SfxStyleSheetBase >, OUString >( xNewSheet, aParent ) );
+ aNewStyles.emplace_back( xNewSheet, aParent );
if( !bAddToList )
{
@@ -689,14 +689,14 @@ void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily
}
xNewSheet->GetItemSet().Put( xSheet->GetItemSet() );
- rCreatedSheets.push_back( SdStyleSheetRef( static_cast< SdStyleSheet* >( xNewSheet.get() ) ) );
- aRenamedList.push_back( std::pair< OUString, OUString >( xSheet->GetName(), aName ) );
+ rCreatedSheets.emplace_back( static_cast< SdStyleSheet* >( xNewSheet.get() ) );
+ aRenamedList.emplace_back( xSheet->GetName(), aName );
}
else if (bAddToList)
{
// Add to list - used for renaming
- rCreatedSheets.push_back( SdStyleSheetRef( static_cast< SdStyleSheet* >( pExistingSheet ) ) );
- aRenamedList.push_back( std::pair< OUString, OUString >( xSheet->GetName(), aName ) );
+ rCreatedSheets.emplace_back( static_cast< SdStyleSheet* >( pExistingSheet ) );
+ aRenamedList.emplace_back( xSheet->GetName(), aName );
}
}
@@ -752,7 +752,7 @@ void SdStyleSheetPool::CopyLayoutSheets(const OUString& rLayoutName, SdStyleShee
OUString file;
rNewSheet.SetHelpId( file, pSourceSheet->GetHelpId( file ) );
rNewSheet.GetItemSet().Put(pSourceSheet->GetItemSet());
- rCreatedSheets.push_back( SdStyleSheetRef( static_cast< SdStyleSheet* >( &rNewSheet ) ) );
+ rCreatedSheets.emplace_back( static_cast< SdStyleSheet* >( &rNewSheet ) );
}
}
}
@@ -796,13 +796,13 @@ void SdStyleSheetPool::CreateLayoutSheetNames(const OUString& rLayoutName, std::
OUString aPrefix(rLayoutName + SD_LT_SEPARATOR);
for (sal_Int32 nLevel = 1; nLevel < 10; nLevel++)
- aNameList.push_back( aPrefix + STR_LAYOUT_OUTLINE " " + OUString::number( nLevel ) );
+ aNameList.emplace_back(aPrefix + STR_LAYOUT_OUTLINE " " + OUString::number( nLevel ) );
- aNameList.push_back(aPrefix + STR_LAYOUT_TITLE);
- aNameList.push_back(aPrefix + STR_LAYOUT_SUBTITLE);
- aNameList.push_back(aPrefix + STR_LAYOUT_NOTES);
- aNameList.push_back(aPrefix + STR_LAYOUT_BACKGROUNDOBJECTS);
- aNameList.push_back(aPrefix + STR_LAYOUT_BACKGROUND);
+ aNameList.emplace_back(aPrefix + STR_LAYOUT_TITLE);
+ aNameList.emplace_back(aPrefix + STR_LAYOUT_SUBTITLE);
+ aNameList.emplace_back(aPrefix + STR_LAYOUT_NOTES);
+ aNameList.emplace_back(aPrefix + STR_LAYOUT_BACKGROUNDOBJECTS);
+ aNameList.emplace_back(aPrefix + STR_LAYOUT_BACKGROUND);
}
/*************************************************************************
@@ -822,7 +822,7 @@ void SdStyleSheetPool::CreateLayoutSheetList(const OUString& rLayoutName, SdStyl
while (pSheet)
{
if (pSheet->GetName().startsWith(aLayoutNameWithSep))
- rLayoutSheets.push_back( SdStyleSheetRef( static_cast< SdStyleSheet* >( pSheet ) ) );
+ rLayoutSheets.emplace_back( static_cast< SdStyleSheet* >( pSheet ) );
pSheet = aIter.Next();
}
}
@@ -1406,7 +1406,7 @@ SdStyleSheetVector SdStyleSheetPool::CreateChildList( SdStyleSheet const * pShee
SdStyleSheet* pChild = dynamic_cast< SdStyleSheet* >( pSheet->GetListener(n) );
if(pChild && pChild->GetParent() == pSheet->GetName())
{
- aResult.push_back( SdStyleSheetRef( pChild ) );
+ aResult.emplace_back( pChild );
}
}
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index c9224fd7aacc..7b882ed168d0 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -732,7 +732,7 @@ bool PPTWriter::ImplCreateDocument()
if ( aXName.is() )
maSlideNameList.push_back( aXName->getName() );
else
- maSlideNameList.push_back( OUString() );
+ maSlideNameList.emplace_back( );
}
mpPptEscherEx->CloseContainer(); // EPP_SlideListWithText
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 5fe016dcbba7..a025423adddc 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -369,7 +369,7 @@ sal_uInt32 PPTWriter::ImplInsertBookmarkURL( const OUString& rBookmarkURL, const
if ( !aRelUrl.isEmpty() )
sBookmarkURL = aRelUrl;
}
- maHyperlink.push_back( EPPTHyperlink( sBookmarkURL, nType ) );
+ maHyperlink.emplace_back( sBookmarkURL, nType );
mpExEmbed->WriteUInt16( 0xf )
.WriteUInt16( EPP_ExHyperlink )
@@ -3090,7 +3090,7 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape > const & rXSha
awt::Size aS( 0, 0 );
xPropSet->getPropertyValue( "Width" ) >>= aS.Width;
awt::Size aM( MapSize( aS ) );
- aColumns.push_back( std::pair< sal_Int32, sal_Int32 >( nPosition, aM.Width ) );
+ aColumns.emplace_back( nPosition, aM.Width );
nPosition += aM.Width;
if ( x == nColumnCount - 1 && nPosition != maRect.Right() )
maRect.Right() = nPosition;
@@ -3103,7 +3103,7 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape > const & rXSha
awt::Size aS( 0, 0 );
xPropSet->getPropertyValue( "Height" ) >>= aS.Height;
awt::Size aM( MapSize( aS ) );
- aRows.push_back( std::pair< sal_Int32, sal_Int32 >( nPosition, aM.Height ) );
+ aRows.emplace_back( nPosition, aM.Height );
nPosition += aM.Height;
if ( y == nRowCount - 1 && nPosition != maRect.Bottom())
maRect.Bottom() = nPosition;
diff --git a/sd/source/ui/dlg/assclass.cxx b/sd/source/ui/dlg/assclass.cxx
index 286ddc08be35..b88445232a7a 100644
--- a/sd/source/ui/dlg/assclass.cxx
+++ b/sd/source/ui/dlg/assclass.cxx
@@ -40,7 +40,7 @@ bool Assistent::InsertControl(int nDestPage, vcl::Window* pUsedControl)
if((nDestPage>0)&&(nDestPage<=mnPages))
{
- maPages[nDestPage-1].push_back(pUsedControl);
+ maPages[nDestPage-1].emplace_back(pUsedControl);
pUsedControl->Hide();
pUsedControl->Disable();
return true;
diff --git a/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx b/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx
index 22133635c731..c6264ddef099 100644
--- a/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx
+++ b/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx
@@ -79,7 +79,7 @@ void ResourceFactoryManager::AddFactory (
if (rsURL.indexOf('*') >= 0 || rsURL.indexOf('?') >= 0)
{
// The URL is a URL pattern not an single URL.
- maFactoryPatternList.push_back(FactoryPatternList::value_type(rsURL, rxFactory));
+ maFactoryPatternList.emplace_back(rsURL, rxFactory);
#if defined VERBOSE && VERBOSE>=1
SAL_INFO("sd","ResourceFactoryManager::AddFactory pattern " << rsURL << std::hex << rxFactory.get());
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index 210d8d95a4cd..58b13887bbe5 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -100,7 +100,7 @@ void lcl_AddFilter ( ::std::vector< FilterDesc >& rFilterDescList,
const std::shared_ptr<const SfxFilter>& pFilter )
{
if (pFilter)
- rFilterDescList.push_back( ::std::make_pair( pFilter->GetUIName(), pFilter->GetDefaultExtension() ) );
+ rFilterDescList.emplace_back( pFilter->GetUIName(), pFilter->GetDefaultExtension() );
}
}
diff --git a/sd/source/ui/presenter/CanvasUpdateRequester.cxx b/sd/source/ui/presenter/CanvasUpdateRequester.cxx
index 2517c710c1d7..e5013c5436b1 100644
--- a/sd/source/ui/presenter/CanvasUpdateRequester.cxx
+++ b/sd/source/ui/presenter/CanvasUpdateRequester.cxx
@@ -76,7 +76,7 @@ std::shared_ptr<CanvasUpdateRequester> CanvasUpdateRequester::Instance (
// No requester for the given canvas found. Create a new one.
std::shared_ptr<CanvasUpdateRequester> pRequester (
new CanvasUpdateRequester(rxSharedCanvas), Deleter());
- s_RequesterMap.push_back(std::make_pair(rxSharedCanvas, pRequester));
+ s_RequesterMap.emplace_back(rxSharedCanvas, pRequester);
return pRequester;
}
diff --git a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
index b38442bafa2c..639ba57386bf 100644
--- a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
+++ b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
@@ -166,7 +166,7 @@ void RecentlyUsedMasterPages::LoadPersistentValues()
pDescriptor->mpPreviewProvider = std::shared_ptr<PreviewProvider>(
new PagePreviewProvider());
MasterPageContainer::Token aToken (mpContainer->PutMasterPage(pDescriptor));
- mvMasterPages.push_back(Descriptor(aToken,sURL,sName));
+ mvMasterPages.emplace_back(aToken,sURL,sName);
}
}
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 9b0e78166dcf..358b603f7c86 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -441,11 +441,10 @@ void AnimationSlideController::displayCurrentSlide( const Reference< XSlideShow
Sequence< Any > aValue(2);
aValue[0] <<= xSlide;
aValue[1] <<= xAnimNode;
- aProperties.push_back(
- PropertyValue( "Prefetch" ,
+ aProperties.emplace_back( "Prefetch" ,
-1,
Any(aValue),
- PropertyState_DIRECT_VALUE));
+ PropertyState_DIRECT_VALUE);
}
if (bSkipAllMainSequenceEffects)
{
@@ -453,16 +452,14 @@ void AnimationSlideController::displayCurrentSlide( const Reference< XSlideShow
// shown (to speed up the transition to the previous slide) and
// one to show all main sequence effects so that the user can
// continue to undo effects.
- aProperties.push_back(
- PropertyValue( "SkipAllMainSequenceEffects",
+ aProperties.emplace_back( "SkipAllMainSequenceEffects",
-1,
Any(true),
- PropertyState_DIRECT_VALUE));
- aProperties.push_back(
- PropertyValue("SkipSlideTransition",
+ PropertyState_DIRECT_VALUE);
+ aProperties.emplace_back("SkipSlideTransition",
-1,
Any(true),
- PropertyState_DIRECT_VALUE));
+ PropertyState_DIRECT_VALUE);
}
if( getSlideAPI( nCurrentSlideNumber, xSlide, xAnimNode ) )
@@ -977,47 +974,40 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
std::vector<beans::PropertyValue> aProperties;
aProperties.reserve( 4 );
- aProperties.push_back(
- beans::PropertyValue( "AdvanceOnClick" ,
+ aProperties.emplace_back( "AdvanceOnClick" ,
-1, Any( !maPresSettings.mbLockedPages ),
- beans::PropertyState_DIRECT_VALUE ) );
+ beans::PropertyState_DIRECT_VALUE );
- aProperties.push_back(
- beans::PropertyValue( "ImageAnimationsAllowed" ,
+ aProperties.emplace_back( "ImageAnimationsAllowed" ,
-1, Any( maPresSettings.mbAnimationAllowed ),
- beans::PropertyState_DIRECT_VALUE ) );
+ beans::PropertyState_DIRECT_VALUE );
const bool bZOrderEnabled(
SD_MOD()->GetSdOptions( mpDoc->GetDocumentType() )->IsSlideshowRespectZOrder() );
- aProperties.push_back(
- beans::PropertyValue( "DisableAnimationZOrder" ,
+ aProperties.emplace_back( "DisableAnimationZOrder" ,
-1, Any( !bZOrderEnabled ),
- beans::PropertyState_DIRECT_VALUE ) );
+ beans::PropertyState_DIRECT_VALUE );
- aProperties.push_back(
- beans::PropertyValue( "ForceManualAdvance" ,
+ aProperties.emplace_back( "ForceManualAdvance" ,
-1, Any( maPresSettings.mbManual ),
- beans::PropertyState_DIRECT_VALUE ) );
+ beans::PropertyState_DIRECT_VALUE );
if( mbUsePen )
{
- aProperties.push_back(
- beans::PropertyValue( "UserPaintColor" ,
+ aProperties.emplace_back( "UserPaintColor" ,
// User paint color is black by default.
-1, Any( mnUserPaintColor ),
- beans::PropertyState_DIRECT_VALUE ) );
+ beans::PropertyState_DIRECT_VALUE );
- aProperties.push_back(
- beans::PropertyValue( "UserPaintStrokeWidth" ,
+ aProperties.emplace_back( "UserPaintStrokeWidth" ,
// User paint color is black by default.
-1, Any( mdUserPaintStrokeWidth ),
- beans::PropertyState_DIRECT_VALUE ) );
+ beans::PropertyState_DIRECT_VALUE );
}
if (mbRehearseTimings) {
- aProperties.push_back(
- beans::PropertyValue( "RehearseTimings" ,
- -1, Any(true), beans::PropertyState_DIRECT_VALUE ) );
+ aProperties.emplace_back( "RehearseTimings" ,
+ -1, Any(true), beans::PropertyState_DIRECT_VALUE );
}
bRet = startShowImpl( Sequence<beans::PropertyValue>(
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
index ba9e1686bd76..c26da7a5cab1 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
@@ -387,8 +387,7 @@ void BitmapCache::Recycle (const BitmapCache& rCache)
if ( ! iEntry->second.HasPreview())
continue;
- aSortedContainer.push_back(SortableBitmapContainer::value_type(
- iEntry->first,iEntry->second));
+ aSortedContainer.emplace_back(iEntry->first,iEntry->second);
}
// Sort the remaining entries.
diff --git a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
index a2d93d23a48a..b5626c8ccba6 100644
--- a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
@@ -233,8 +233,8 @@ void PageCacheManager::Recycle (
for (iActiveCache=mpPageCaches->begin(); iActiveCache!=mpPageCaches->end(); ++iActiveCache)
{
if (iActiveCache->first.mpDocument == pDocument)
- aCaches.push_back(BestFittingPageCaches::value_type(
- iActiveCache->first.maPreviewSize, iActiveCache->second));
+ aCaches.emplace_back(
+ iActiveCache->first.maPreviewSize, iActiveCache->second);
}
// Add bitmap caches from recently used caches.
@@ -243,8 +243,8 @@ void PageCacheManager::Recycle (
{
RecentlyUsedQueue::const_iterator iRecentCache;
for (iRecentCache=iQueue->second.begin();iRecentCache!=iQueue->second.end();++iRecentCache)
- aCaches.push_back(BestFittingPageCaches::value_type(
- iRecentCache->maPreviewSize, iRecentCache->mpCache));
+ aCaches.emplace_back(
+ iRecentCache->maPreviewSize, iRecentCache->mpCache);
}
::std::sort(aCaches.begin(), aCaches.end(), BestFittingCacheComparer(rPreviewSize));
diff --git a/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx b/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx
index 95661edd2725..3527bda5e98a 100644
--- a/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx
@@ -82,7 +82,7 @@ AnimationParametricFunction::AnimationParametricFunction (const ParametricFuncti
for (sal_Int32 nIndex=0; nIndex<nSampleCount; ++nIndex)
{
const double nT (nIndex/double(nSampleCount-1));
- aPoints.push_back(basegfx::B2DPoint(rFunction(nT)));
+ aPoints.emplace_back(rFunction(nT));
}
// Interpolate at evenly spaced points.
diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
index a1985f744fe3..826ca1f60aaf 100644
--- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
@@ -424,9 +424,9 @@ void Clipboard::CreateSlideTransferable (
if ( ! pDescriptor || pDescriptor->GetPage()==nullptr)
continue;
Bitmap aPreview (pPreviewCache->GetPreviewBitmap(pDescriptor->GetPage(), false));
- aRepresentatives.push_back(TransferableData::Representative(
+ aRepresentatives.emplace_back(
aPreview,
- pDescriptor->HasState(model::PageDescriptor::ST_Excluded)));
+ pDescriptor->HasState(model::PageDescriptor::ST_Excluded));
if (aRepresentatives.size() >= 3)
break;
}
@@ -535,9 +535,9 @@ std::shared_ptr<SdTransferable::UserData> Clipboard::CreateTransferableUserData
if ( ! pDescriptor || pDescriptor->GetPage()==nullptr)
break;
Bitmap aPreview (pPreviewCache->GetPreviewBitmap(pDescriptor->GetPage(), false));
- aRepresentatives.push_back(TransferableData::Representative(
+ aRepresentatives.emplace_back(
aPreview,
- pDescriptor->HasState(model::PageDescriptor::ST_Excluded)));
+ pDescriptor->HasState(model::PageDescriptor::ST_Excluded));
// Remember the page in maPagesToRemove so that it can be removed
// when drag and drop action is "move".
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx
index 4feccd46cae4..ba6b31ebe8b5 100644
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -583,69 +583,57 @@ sal_Int64 SAL_CALL DrawController::getSomething (const Sequence<sal_Int8>& rId)
void DrawController::FillPropertyTable (
::std::vector<beans::Property>& rProperties)
{
- rProperties.push_back(
- beans::Property("VisibleArea",
+ rProperties.emplace_back("VisibleArea",
PROPERTY_WORKAREA,
::cppu::UnoType< css::awt::Rectangle>::get(),
- beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY));
- rProperties.push_back(
- beans::Property(
+ beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY);
+ rProperties.emplace_back(
"SubController",
PROPERTY_SUB_CONTROLLER,
cppu::UnoType<drawing::XDrawSubController>::get(),
- beans::PropertyAttribute::BOUND));
- rProperties.push_back(
- beans::Property(
+ beans::PropertyAttribute::BOUND);
+ rProperties.emplace_back(
"CurrentPage",
PROPERTY_CURRENTPAGE,
cppu::UnoType<drawing::XDrawPage>::get(),
- beans::PropertyAttribute::BOUND ));
- rProperties.push_back(
- beans::Property("IsLayerMode",
+ beans::PropertyAttribute::BOUND );
+ rProperties.emplace_back("IsLayerMode",
PROPERTY_LAYERMODE,
cppu::UnoType<bool>::get(),
- beans::PropertyAttribute::BOUND ));
- rProperties.push_back(
- beans::Property("IsMasterPageMode",
+ beans::PropertyAttribute::BOUND );
+ rProperties.emplace_back("IsMasterPageMode",
PROPERTY_MASTERPAGEMODE,
cppu::UnoType<bool>::get(),
- beans::PropertyAttribute::BOUND ));
- rProperties.push_back(
- beans::Property("ActiveLayer",
+ beans::PropertyAttribute::BOUND );
+ rProperties.emplace_back("ActiveLayer",
PROPERTY_ACTIVE_LAYER,
cppu::UnoType<drawing::XLayer>::get(),
- beans::PropertyAttribute::BOUND ));
- rProperties.push_back(
- beans::Property("ZoomValue",
+ beans::PropertyAttribute::BOUND );
+ rProperties.emplace_back("ZoomValue",
PROPERTY_ZOOMVALUE,
::cppu::UnoType<sal_Int16>::get(),
- beans::PropertyAttribute::BOUND ));
- rProperties.push_back(
- beans::Property("ZoomType",
+ beans::PropertyAttribute::BOUND );
+ rProperties.emplace_back("ZoomType",
PROPERTY_ZOOMTYPE,
::cppu::UnoType<sal_Int16>::get(),
- beans::PropertyAttribute::BOUND ));
- rProperties.push_back(
- beans::Property("ViewOffset",
+ beans::PropertyAttribute::BOUND );
+ rProperties.emplace_back("ViewOffset",
PROPERTY_VIEWOFFSET,
::cppu::UnoType< css::awt::Point>::get(),
- beans::PropertyAttribute::BOUND ));
- rProperties.push_back(
- beans::Property("DrawViewMode",
+ beans::PropertyAttribute::BOUND );
+ rProperties.emplace_back("DrawViewMode",
PROPERTY_DRAWVIEWMODE,
::cppu::UnoType< css::awt::Point>::get(),
- beans::PropertyAttribute::BOUND|beans::PropertyAttribute::READONLY|beans::PropertyAttribute::MAYBEVOID ));
+ beans::PropertyAttribute::BOUND|beans::PropertyAttribute::READONLY|beans::PropertyAttribute::MAYBEVOID );
// add new property to update current page's acc information
- rProperties.push_back(
- beans::Property( "UpdateAcc",
+ rProperties.emplace_back( "UpdateAcc",
PROPERTY_UPDATEACC,
::cppu::UnoType<sal_Int16>::get(),
- beans::PropertyAttribute::BOUND ));
- rProperties.push_back(
- beans::Property( "PageChange",
+ beans::PropertyAttribute::BOUND );
+ rProperties.emplace_back( "PageChange",
PROPERTY_PAGE_CHANGE,
::cppu::UnoType<sal_Int16>::get(),
- beans::PropertyAttribute::BOUND ));
+ beans::PropertyAttribute::BOUND );
}
IPropertyArrayHelper & DrawController::getInfoHelper()
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index fab60111657b..4cadfb2e3540 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -2034,16 +2034,16 @@ private:
sal_uInt32 nFirstIndex = 0, nLastIndex = aPageVector.size() - 1;
if( aPageVector.size() & 1 )
- aPairVector.push_back( std::make_pair( (sal_uInt16) 65535, aPageVector[ nFirstIndex++ ] ) );
+ aPairVector.emplace_back( (sal_uInt16) 65535, aPageVector[ nFirstIndex++ ] );
else
- aPairVector.push_back( std::make_pair( aPageVector[ nLastIndex-- ], aPageVector[ nFirstIndex++ ] ) );
+ aPairVector.emplace_back( aPageVector[ nLastIndex-- ], aPageVector[ nFirstIndex++ ] );
while( nFirstIndex < nLastIndex )
{
if( nFirstIndex & 1 )
- aPairVector.push_back( std::make_pair( aPageVector[ nFirstIndex++ ], aPageVector[ nLastIndex-- ] ) );
+ aPairVector.emplace_back( aPageVector[ nFirstIndex++ ], aPageVector[ nLastIndex-- ] );
else
- aPairVector.push_back( std::make_pair( aPageVector[ nLastIndex-- ], aPageVector[ nFirstIndex++ ] ) );
+ aPairVector.emplace_back( aPageVector[ nLastIndex-- ], aPageVector[ nFirstIndex++ ] );
}
}
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index e6af2d221c9a..be8c1a9c3faa 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -1554,7 +1554,7 @@ void SdOutliner::HandleChangedSelection()
maMarkListCopy.clear();
maMarkListCopy.reserve (nCount);
for (size_t i=0; i<nCount; ++i)
- maMarkListCopy.push_back (rMarkList.GetMark(i)->GetMarkedSdrObj ());
+ maMarkListCopy.emplace_back(rMarkList.GetMark(i)->GetMarkedSdrObj ());
}
else
// No marked object. Is this case possible?
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index 7fd7e6a8d438..5c0dc56a4c6f 100644
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -540,7 +540,7 @@ void ViewShellManager::Implementation::ActivateSubShell (
// Add just the id of the sub shell. The actual shell is created
// later in CreateShells().
UpdateLock aLock (*this);
- rList.push_back(ShellDescriptor(nId));
+ rList.emplace_back(nId);
}
void ViewShellManager::Implementation::DeactivateSubShell (
diff --git a/sd/source/ui/view/WindowUpdater.cxx b/sd/source/ui/view/WindowUpdater.cxx
index e355feb42ee6..394ad5c6c677 100644
--- a/sd/source/ui/view/WindowUpdater.cxx
+++ b/sd/source/ui/view/WindowUpdater.cxx
@@ -53,7 +53,7 @@ void WindowUpdater::RegisterWindow (vcl::Window* pWindow)
{
// Update the device once right now and add it to the list.
Update (pWindow);
- maWindowList.push_back (pWindow);
+ maWindowList.emplace_back(pWindow);
}
}
}
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index cbd8088f8e8d..71da780084cf 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -806,7 +806,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
{
auto pNewSet = o3tl::make_unique<SfxItemSet>( GetDoc()->GetPool(), svl::Items<SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT>{} );
pNewSet->Put(pObj->GetMergedItemSet());
- aAttrList.push_back(std::make_pair(std::move(pNewSet), pObj->GetUserCall()));
+ aAttrList.emplace_back(std::move(pNewSet), pObj->GetUserCall());
}
}