sd/source/ui/unoidl/unopage.cxx |   50 ++++++++++++++++++----------------------
 1 file changed, 23 insertions(+), 27 deletions(-)

New commits:
commit 28f245a890560ca9ce078cc286705929358258a4
Author:     Julien Nabet <[email protected]>
AuthorDate: Fri Oct 22 18:10:15 2021 +0200
Commit:     Julien Nabet <[email protected]>
CommitDate: Fri Oct 22 19:16:50 2021 +0200

    Revert part of "Simplify vector initialization in sd"
    
    since it needs 2 allocations instead of one
    
    This partially reverts commit 5393f9a53eb8b33537aedd03b7c9efc5222748d6 .
    
    Change-Id: Ifaa1327f2da4bb98ac134ebd8ef105becbc28b5e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124068
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <[email protected]>

diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index a9ecb7f5906c..984b5fd0df2c 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -2061,21 +2061,19 @@ Sequence< uno::Type > SAL_CALL SdDrawPage::getTypes()
         bool bPresPage = IsImpressDocument() && ePageKind != PageKind::Handout;
 
         // Collect the types of this class.
-        ::std::vector<uno::Type> aTypes
-        {
-            cppu::UnoType<drawing::XDrawPage>::get(),
-            cppu::UnoType<beans::XPropertySet>::get(),
-            cppu::UnoType<container::XNamed>::get(),
-            cppu::UnoType<drawing::XMasterPageTarget>::get(),
-            cppu::UnoType<lang::XServiceInfo>::get(),
-            cppu::UnoType<util::XReplaceable>::get(),
-            cppu::UnoType<document::XLinkTargetSupplier>::get(),
-            cppu::UnoType<drawing::XShapeCombiner>::get(),
-            cppu::UnoType<drawing::XShapeBinder>::get(),
-            cppu::UnoType<office::XAnnotationAccess>::get(),
-            cppu::UnoType<beans::XMultiPropertySet>::get()
-        };
+        ::std::vector<uno::Type> aTypes;
         aTypes.reserve(13);
+        aTypes.push_back(cppu::UnoType<drawing::XDrawPage>::get());
+        aTypes.push_back(cppu::UnoType<beans::XPropertySet>::get());
+        aTypes.push_back(cppu::UnoType<container::XNamed>::get());
+        aTypes.push_back(cppu::UnoType<drawing::XMasterPageTarget>::get());
+        aTypes.push_back(cppu::UnoType<lang::XServiceInfo>::get());
+        aTypes.push_back(cppu::UnoType<util::XReplaceable>::get());
+        aTypes.push_back(cppu::UnoType<document::XLinkTargetSupplier>::get());
+        aTypes.push_back(cppu::UnoType<drawing::XShapeCombiner>::get());
+        aTypes.push_back(cppu::UnoType<drawing::XShapeBinder>::get());
+        aTypes.push_back(cppu::UnoType<office::XAnnotationAccess>::get());
+        aTypes.push_back(cppu::UnoType<beans::XMultiPropertySet>::get());
         if( bPresPage )
             
aTypes.push_back(cppu::UnoType<presentation::XPresentationPage>::get());
         if( bPresPage && ePageKind == PageKind::Standard )
@@ -2666,20 +2664,18 @@ Sequence< uno::Type > SAL_CALL SdMasterPage::getTypes()
         bool bPresPage = IsImpressDocument() && SvxFmDrawPage::mpPage && 
ePageKind != PageKind::Handout;
 
         // Collect the types of this class.
-        ::std::vector<uno::Type> aTypes
-        {
-            cppu::UnoType<drawing::XDrawPage>::get(),
-            cppu::UnoType<beans::XPropertySet>::get(),
-            cppu::UnoType<container::XNamed>::get(),
-            cppu::UnoType<lang::XServiceInfo>::get(),
-            cppu::UnoType<util::XReplaceable>::get(),
-            cppu::UnoType<document::XLinkTargetSupplier>::get(),
-            cppu::UnoType<drawing::XShapeCombiner>::get(),
-            cppu::UnoType<drawing::XShapeBinder>::get(),
-            cppu::UnoType<office::XAnnotationAccess>::get(),
-            cppu::UnoType<beans::XMultiPropertySet>::get()
-        };
+        ::std::vector<uno::Type> aTypes;
         aTypes.reserve(12);
+        aTypes.push_back(cppu::UnoType<drawing::XDrawPage>::get());
+        aTypes.push_back(cppu::UnoType<beans::XPropertySet>::get());
+        aTypes.push_back(cppu::UnoType<container::XNamed>::get());
+        aTypes.push_back(cppu::UnoType<lang::XServiceInfo>::get());
+        aTypes.push_back(cppu::UnoType<util::XReplaceable>::get());
+        aTypes.push_back(cppu::UnoType<document::XLinkTargetSupplier>::get());
+        aTypes.push_back(cppu::UnoType<drawing::XShapeCombiner>::get());
+        aTypes.push_back(cppu::UnoType<drawing::XShapeBinder>::get());
+        aTypes.push_back(cppu::UnoType<office::XAnnotationAccess>::get());
+        aTypes.push_back(cppu::UnoType<beans::XMultiPropertySet>::get());
         if( bPresPage )
             
aTypes.push_back(cppu::UnoType<presentation::XPresentationPage>::get());
         if( bPresPage && ePageKind == PageKind::Standard )

Reply via email to