diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2021-10-22 18:10:15 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2021-10-22 19:16:50 +0200 |
commit | 28f245a890560ca9ce078cc286705929358258a4 (patch) | |
tree | 4fb2d9e776032995478310ffc0811c06f737787f /sd | |
parent | 0922d1d2b0ba30d44eae311a8d0dc17345b8dcac (diff) |
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 <serval2412@yahoo.fr>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/unoidl/unopage.cxx | 50 |
1 files changed, 23 insertions, 27 deletions
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 ) |