diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-24 20:54:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-25 19:01:03 +0200 |
commit | b4bf19321ed9ce2d0e49341193690fef0c7085ea (patch) | |
tree | 1ada5626ee19de2217f3178e2888282cd1aaf9f2 | |
parent | 18321eb3f447c9e6519e1691673677fc8a2c8117 (diff) |
directly instantiate IndexedPropertyValuesContainer
without the overhead of the UNO service engine
Change-Id: I4a02fda2b3c92a897634374bf72cfffee4f531f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134923
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | comphelper/source/container/IndexedPropertyValuesContainer.cxx | 45 | ||||
-rw-r--r-- | include/comphelper/indexedpropertyvalues.hxx | 55 | ||||
-rw-r--r-- | reportdesign/source/core/api/ReportDefinition.cxx | 7 | ||||
-rw-r--r-- | sc/source/filter/excel/xltoolbar.cxx | 7 | ||||
-rw-r--r-- | sc/source/filter/oox/viewsettings.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 5 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8toolbar.cxx | 7 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlexp.cxx | 6 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/core/DocumentSettingsContext.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/core/SettingsExportHelper.cxx | 7 |
14 files changed, 95 insertions, 71 deletions
diff --git a/comphelper/source/container/IndexedPropertyValuesContainer.cxx b/comphelper/source/container/IndexedPropertyValuesContainer.cxx index 08b46518bebf..f5b7358d64c4 100644 --- a/comphelper/source/container/IndexedPropertyValuesContainer.cxx +++ b/comphelper/source/container/IndexedPropertyValuesContainer.cxx @@ -17,56 +17,19 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <com/sun/star/container/XIndexContainer.hpp> -#include <com/sun/star/uno/Sequence.h> -#include <com/sun/star/beans/PropertyValue.hpp> -#include <cppuhelper/implbase.hxx> #include <com/sun/star/lang/IllegalArgumentException.hpp> #include <com/sun/star/lang/IndexOutOfBoundsException.hpp> -#include <com/sun/star/lang/XServiceInfo.hpp> +#include <comphelper/indexedpropertyvalues.hxx> #include <cppuhelper/supportsservice.hxx> #include <o3tl/safeint.hxx> -#include <vector> - namespace com::sun::star::uno { class XComponentContext; } using namespace com::sun::star; -typedef std::vector < uno::Sequence< beans::PropertyValue > > IndexedPropertyValues; - -namespace { - -class IndexedPropertyValuesContainer : public cppu::WeakImplHelper< container::XIndexContainer, lang::XServiceInfo > -{ -public: - IndexedPropertyValuesContainer() noexcept; - - // XIndexContainer - virtual void SAL_CALL insertByIndex( sal_Int32 nIndex, const css::uno::Any& aElement ) override; - virtual void SAL_CALL removeByIndex( sal_Int32 nIndex ) override; - - // XIndexReplace - virtual void SAL_CALL replaceByIndex( sal_Int32 nIndex, const css::uno::Any& aElement ) override; - // XIndexAccess - virtual sal_Int32 SAL_CALL getCount( ) override; - virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 nIndex ) override; +namespace comphelper { - // XElementAccess - virtual css::uno::Type SAL_CALL getElementType( ) override; - virtual sal_Bool SAL_CALL hasElements( ) override; - - //XServiceInfo - virtual OUString SAL_CALL getImplementationName( ) override; - virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override; - -private: - IndexedPropertyValues maProperties; -}; - -} IndexedPropertyValuesContainer::IndexedPropertyValuesContainer() noexcept { @@ -151,12 +114,14 @@ css::uno::Sequence< OUString > SAL_CALL IndexedPropertyValuesContainer::getSuppo return { "com.sun.star.document.IndexedPropertyValues" }; } +} // namespace comphelper + extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * IndexedPropertyValuesContainer_get_implementation( css::uno::XComponentContext *, css::uno::Sequence<css::uno::Any> const &) { - return cppu::acquire(new IndexedPropertyValuesContainer()); + return cppu::acquire(new comphelper::IndexedPropertyValuesContainer()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/comphelper/indexedpropertyvalues.hxx b/include/comphelper/indexedpropertyvalues.hxx new file mode 100644 index 000000000000..5a5f3e8ba72b --- /dev/null +++ b/include/comphelper/indexedpropertyvalues.hxx @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +#pragma once + +#include <sal/config.h> +#include <com/sun/star/beans/PropertyValue.hpp> +#include <com/sun/star/container/XIndexContainer.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/uno/Sequence.h> +#include <comphelper/comphelperdllapi.h> +#include <cppuhelper/implbase.hxx> +#include <vector> + +namespace comphelper +{ +typedef std::vector<css::uno::Sequence<css::beans::PropertyValue>> IndexedPropertyValues; + +class COMPHELPER_DLLPUBLIC IndexedPropertyValuesContainer final + : public cppu::WeakImplHelper<css::container::XIndexContainer, css::lang::XServiceInfo> +{ +public: + IndexedPropertyValuesContainer() noexcept; + + // XIndexContainer + virtual void SAL_CALL insertByIndex(sal_Int32 nIndex, const css::uno::Any& aElement) override; + virtual void SAL_CALL removeByIndex(sal_Int32 nIndex) override; + + // XIndexReplace + virtual void SAL_CALL replaceByIndex(sal_Int32 nIndex, const css::uno::Any& aElement) override; + + // XIndexAccess + virtual sal_Int32 SAL_CALL getCount() override; + virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override; + + // XElementAccess + virtual css::uno::Type SAL_CALL getElementType() override; + virtual sal_Bool SAL_CALL hasElements() override; + + //XServiceInfo + virtual OUString SAL_CALL getImplementationName() override; + virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; + virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override; + +private: + IndexedPropertyValues maProperties; +}; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 4ff066ba86cb..282b66b06b17 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -79,6 +79,7 @@ #include <comphelper/broadcasthelper.hxx> #include <comphelper/documentconstants.hxx> #include <comphelper/genericpropertyset.hxx> +#include <comphelper/indexedpropertyvalues.hxx> #include <unotools/mediadescriptor.hxx> #include <comphelper/namecontainer.hxx> #include <comphelper/namedvaluecollection.hxx> @@ -1838,15 +1839,15 @@ uno::Reference< container::XIndexAccess > SAL_CALL OReportDefinition::getViewDat ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed); if ( !m_pImpl->m_xViewData.is() ) { - m_pImpl->m_xViewData = document::IndexedPropertyValues::create(m_aProps->m_xContext); - uno::Reference< container::XIndexContainer > xContainer(m_pImpl->m_xViewData,uno::UNO_QUERY); + rtl::Reference<comphelper::IndexedPropertyValuesContainer> xNewViewData = new comphelper::IndexedPropertyValuesContainer(); + m_pImpl->m_xViewData = xNewViewData; for (const auto& rxController : m_pImpl->m_aControllers) { if ( rxController.is() ) { try { - xContainer->insertByIndex(xContainer->getCount(), rxController->getViewData()); + xNewViewData->insertByIndex(xNewViewData->getCount(), rxController->getViewData()); } catch (const uno::Exception&) { diff --git a/sc/source/filter/excel/xltoolbar.cxx b/sc/source/filter/excel/xltoolbar.cxx index a743b97a25d4..efb54925bd69 100644 --- a/sc/source/filter/excel/xltoolbar.cxx +++ b/sc/source/filter/excel/xltoolbar.cxx @@ -10,13 +10,14 @@ #include <sal/log.hxx> #include <o3tl/safeint.hxx> #include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/document/IndexedPropertyValues.hpp> #include <com/sun/star/ui/XUIConfigurationPersistence.hpp> #include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp> #include <com/sun/star/ui/ItemType.hpp> +#include <comphelper/indexedpropertyvalues.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/propertyvalue.hxx> #include <comphelper/sequence.hxx> +#include <rtl/ref.hxx> #include <map> using namespace com::sun::star; @@ -295,7 +296,7 @@ bool ScTBC::ImportToolBarControl( ScCTBWrapper& rWrapper, const css::uno::Refere ScCTB* pCustTB = rWrapper.GetCustomizationData( pMenu->Name() ); if ( pCustTB ) { - uno::Reference< container::XIndexContainer > xMenuDesc = document::IndexedPropertyValues::create( comphelper::getProcessComponentContext() ); + rtl::Reference< comphelper::IndexedPropertyValuesContainer > xMenuDesc = new comphelper::IndexedPropertyValuesContainer(); if ( !pCustTB->ImportMenuTB( rWrapper, xMenuDesc, helper ) ) return false; if ( !bIsMenuToolbar ) @@ -307,7 +308,7 @@ bool ScTBC::ImportToolBarControl( ScCTBWrapper& rWrapper, const css::uno::Refere { beans::PropertyValue aProp; aProp.Name = "ItemDescriptorContainer"; - aProp.Value <<= xMenuDesc; + aProp.Value <<= uno::Reference< container::XIndexContainer >(xMenuDesc); props.push_back( aProp ); } } diff --git a/sc/source/filter/oox/viewsettings.cxx b/sc/source/filter/oox/viewsettings.cxx index 45a6a8fbcdd8..c72a61b17c15 100644 --- a/sc/source/filter/oox/viewsettings.cxx +++ b/sc/source/filter/oox/viewsettings.cxx @@ -23,11 +23,11 @@ #include <com/sun/star/awt/Size.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/container/XIndexContainer.hpp> -#include <com/sun/star/document/IndexedPropertyValues.hpp> #include <com/sun/star/document/XViewDataSupplier.hpp> #include <com/sun/star/document/NamedPropertyValues.hpp> #include <com/sun/star/sheet/XSpreadsheet.hpp> #include <com/sun/star/sheet/XSpreadsheetDocument.hpp> +#include <comphelper/indexedpropertyvalues.hxx> #include <osl/diagnose.h> #include <unotools/mediadescriptor.hxx> #include <oox/core/filterbase.hxx> @@ -563,8 +563,8 @@ void ViewSettings::finalizeImport() if( !rxActiveSheetView ) rxActiveSheetView = std::make_shared<SheetViewModel>(); - Reference< XIndexContainer > xContainer = IndexedPropertyValues::create( getBaseFilter().getComponentContext() ); - if( xContainer.is() ) try + rtl::Reference< comphelper::IndexedPropertyValuesContainer > xContainer = new comphelper::IndexedPropertyValuesContainer(); + try { PropertyMap aPropMap; aPropMap.setProperty( PROP_Tables, xSheetsNC); diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 9bc6d1604c70..2f27948d0fe2 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -66,10 +66,10 @@ #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/ServiceNotRegisteredException.hpp> #include <com/sun/star/document/XDocumentEventBroadcaster.hpp> -#include <com/sun/star/document/IndexedPropertyValues.hpp> #include <com/sun/star/script/XInvocation.hpp> #include <com/sun/star/script/vba/XVBAEventProcessor.hpp> #include <com/sun/star/beans/XFastPropertySet.hpp> +#include <comphelper/indexedpropertyvalues.hxx> #include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/profilezone.hxx> @@ -2615,8 +2615,8 @@ uno::Reference< container::XIndexAccess > SAL_CALL ScModelObj::getViewData( ) SolarMutexGuard aGuard; if (pDocShell && pDocShell->GetCreateMode() == SfxObjectCreateMode::EMBEDDED) { - uno::Reference < container::XIndexContainer > xCont = document::IndexedPropertyValues::create( ::comphelper::getProcessComponentContext() ); - xRet.set( xCont, uno::UNO_QUERY_THROW ); + rtl::Reference< comphelper::IndexedPropertyValuesContainer > xCont = new comphelper::IndexedPropertyValuesContainer(); + xRet = xCont; OUString sName; pDocShell->GetDocument().GetName( pDocShell->GetDocument().GetVisibleTab(), sName ); diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 5e24a5cfcfdf..ff66696d7d8f 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -32,6 +32,7 @@ #include <com/sun/star/embed/Aspects.hpp> #include <officecfg/Office/Common.hxx> +#include <comphelper/indexedpropertyvalues.hxx> #include <comphelper/lok.hxx> #include <comphelper/propertyvalue.hxx> #include <comphelper/sequence.hxx> @@ -610,7 +611,7 @@ uno::Reference < container::XIndexAccess > SAL_CALL SdXImpressDocument::getViewD if( !rList.empty() ) { - xRet = document::IndexedPropertyValues::create( ::comphelper::getProcessComponentContext() ); + xRet = new comphelper::IndexedPropertyValuesContainer(); uno::Reference < container::XIndexContainer > xCont( xRet, uno::UNO_QUERY ); DBG_ASSERT( xCont.is(), "SdXImpressDocument::getViewData() failed for OLE object" ); diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 4d95e47ba1be..dc9a056e31bb 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -42,7 +42,6 @@ #include <com/sun/star/frame/DoubleInitializationException.hpp> #include <com/sun/star/embed/XStorage.hpp> #include <com/sun/star/document/XStorageChangeListener.hpp> -#include <com/sun/star/document/IndexedPropertyValues.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertySetInfo.hpp> #include <com/sun/star/container/XIndexContainer.hpp> @@ -60,6 +59,7 @@ #include <com/sun/star/util/InvalidStateException.hpp> #include <com/sun/star/util/CloseVetoException.hpp> #include <comphelper/enumhelper.hxx> +#include <comphelper/indexedpropertyvalues.hxx> #include <comphelper/string.hxx> #include <cppuhelper/implbase.hxx> @@ -3293,7 +3293,7 @@ Reference < container::XIndexAccess > SAL_CALL SfxBaseModel::getViewData() // currently no frame for this document at all or View is under construction return Reference < container::XIndexAccess >(); - m_pData->m_contViewData = document::IndexedPropertyValues::create( ::comphelper::getProcessComponentContext() ); + m_pData->m_contViewData = new comphelper::IndexedPropertyValuesContainer(); if ( !m_pData->m_contViewData.is() ) { diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index f59d81ed6efb..8b253338cf2d 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -117,11 +117,11 @@ #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> #include <com/sun/star/document/XViewDataSupplier.hpp> -#include <com/sun/star/document/IndexedPropertyValues.hpp> #include <svl/lngmisc.hxx> #include <svl/itemiter.hxx> +#include <comphelper/indexedpropertyvalues.hxx> #include <comphelper/processfactory.hxx> #include <basic/basmgr.hxx> @@ -1845,8 +1845,7 @@ void SwWW8ImplReader::ImportDop() { "ZoomType", uno::Any(nZoomType) } })); - uno::Reference< uno::XComponentContext > xComponentContext(comphelper::getProcessComponentContext()); - uno::Reference<container::XIndexContainer> xBox = document::IndexedPropertyValues::create(xComponentContext); + rtl::Reference< comphelper::IndexedPropertyValuesContainer > xBox = new comphelper::IndexedPropertyValuesContainer(); xBox->insertByIndex(sal_Int32(0), uno::Any(aViewProps)); uno::Reference<document::XViewDataSupplier> xViewDataSupplier(m_pDocShell->GetModel(), uno::UNO_QUERY); xViewDataSupplier->setViewData(xBox); diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx index af07d077384d..b03eb8b863ac 100644 --- a/sw/source/filter/ww8/ww8toolbar.cxx +++ b/sw/source/filter/ww8/ww8toolbar.cxx @@ -10,13 +10,13 @@ #include "ww8toolbar.hxx" #include "ww8scan.hxx" #include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/document/IndexedPropertyValues.hpp> #include <com/sun/star/ui/XUIConfigurationPersistence.hpp> #include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp> #include <com/sun/star/lang/XSingleComponentFactory.hpp> #include <com/sun/star/ui/ItemType.hpp> #include <fstream> #include <comphelper/documentinfo.hxx> +#include <comphelper/indexedpropertyvalues.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/propertyvalue.hxx> #include <comphelper/sequence.hxx> @@ -24,6 +24,7 @@ #include <sfx2/objsh.hxx> #include <tools/diagnose_ex.h> #include <unotools/configmgr.hxx> +#include <rtl/ref.hxx> #include <map> #include <sal/log.hxx> @@ -568,7 +569,7 @@ SwTBC::ImportToolBarControl( SwCTBWrapper& rWrapper, const css::uno::Reference< SwCTB* pCustTB = rWrapper.GetCustomizationData( pMenu->Name() ); if ( pCustTB ) { - uno::Reference< container::XIndexContainer > xMenuDesc = document::IndexedPropertyValues::create( comphelper::getProcessComponentContext() ); + rtl::Reference< comphelper::IndexedPropertyValuesContainer > xMenuDesc = new comphelper::IndexedPropertyValuesContainer(); if ( !pCustTB->ImportMenuTB( rWrapper,xMenuDesc, helper ) ) return false; if ( !bIsMenuBar ) @@ -580,7 +581,7 @@ SwTBC::ImportToolBarControl( SwCTBWrapper& rWrapper, const css::uno::Reference< { beans::PropertyValue aProp; aProp.Name = "ItemDescriptorContainer"; - aProp.Value <<= xMenuDesc; + aProp.Value <<= uno::Reference< container::XIndexContainer >(xMenuDesc); props.push_back( aProp ); } } diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index a86eb59e0bef..65df1c99e243 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -21,10 +21,10 @@ #include <com/sun/star/drawing/XDrawPageSupplier.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/container/XIndexContainer.hpp> -#include <com/sun/star/document/IndexedPropertyValues.hpp> #include <com/sun/star/xforms/XFormsSupplier.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <comphelper/indexedpropertyvalues.hxx> #include <osl/diagnose.h> #include <o3tl/any.hxx> #include <sax/tools/converter.hxx> @@ -339,9 +339,9 @@ void SwXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps) // Currently exporting 9 properties PropertyValue *pValue = aProps.getArray(); - Reference < XIndexContainer > xBox = IndexedPropertyValues::create( comphelper::getProcessComponentContext() ); + rtl::Reference< comphelper::IndexedPropertyValuesContainer > xBox = new comphelper::IndexedPropertyValuesContainer(); pValue[0].Name = "Views"; - pValue[0].Value <<= xBox; + pValue[0].Value <<= uno::Reference< container::XIndexContainer >(xBox); SwDoc *pDoc = getDoc(); const tools::Rectangle rRect = diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index fd2e3c41631d..1371b7cc0e32 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -32,7 +32,6 @@ #include <com/sun/star/beans/XPropertyState.hpp> #include <com/sun/star/container/XNamed.hpp> #include <com/sun/star/document/PrinterIndependentLayout.hpp> -#include <com/sun/star/document/IndexedPropertyValues.hpp> #include <com/sun/star/drawing/XDrawPageSupplier.hpp> #include <com/sun/star/embed/XEmbeddedObject.hpp> #include <com/sun/star/i18n/NumberFormatMapper.hpp> @@ -82,6 +81,7 @@ #include <com/sun/star/embed/ElementModes.hpp> #include <com/sun/star/document/XImporter.hpp> #include <com/sun/star/document/XFilter.hpp> +#include <comphelper/indexedpropertyvalues.hxx> #include <editeng/flditem.hxx> #include <editeng/unotext.hxx> #include <o3tl/safeint.hxx> @@ -8265,7 +8265,7 @@ void DomainMapper_Impl::ApplySettingsTable() uno::Any(m_pSettingsTable->GetZoomType()), beans::PropertyState_DIRECT_VALUE); } - uno::Reference<container::XIndexContainer> xBox = document::IndexedPropertyValues::create(m_xComponentContext); + rtl::Reference< comphelper::IndexedPropertyValuesContainer > xBox = new comphelper::IndexedPropertyValuesContainer(); xBox->insertByIndex(sal_Int32(0), uno::Any(comphelper::containerToSequence(aViewProps))); uno::Reference<document::XViewDataSupplier> xViewDataSupplier(m_xTextDocument, uno::UNO_QUERY); xViewDataSupplier->setViewData(xBox); diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx index 9eb30779be6a..bf3a8f7f6472 100644 --- a/xmloff/source/core/DocumentSettingsContext.cxx +++ b/xmloff/source/core/DocumentSettingsContext.cxx @@ -40,9 +40,9 @@ #include <com/sun/star/util/DateTime.hpp> #include <com/sun/star/document/XViewDataSupplier.hpp> #include <com/sun/star/document/PrinterIndependentLayout.hpp> -#include <com/sun/star/document/IndexedPropertyValues.hpp> #include <com/sun/star/document/NamedPropertyValues.hpp> #include <com/sun/star/beans/XPropertySet.hpp> +#include <comphelper/indexedpropertyvalues.hxx> #include <sal/log.hxx> #include <osl/diagnose.h> #include <tools/diagnose_ex.h> @@ -109,7 +109,7 @@ uno::Reference<container::XNameContainer> XMLMyList::GetNameContainer() uno::Reference<container::XIndexContainer> XMLMyList::GetIndexContainer() { - uno::Reference<container::XIndexContainer> xIndexContainer = document::IndexedPropertyValues::create(m_xContext); + rtl::Reference< comphelper::IndexedPropertyValuesContainer > xIndexContainer = new comphelper::IndexedPropertyValuesContainer(); sal_uInt32 i(0); for (auto const& prop : aProps) { diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx index 090aa2bc3263..9f0444d8f9f5 100644 --- a/xmloff/source/core/SettingsExportHelper.cxx +++ b/xmloff/source/core/SettingsExportHelper.cxx @@ -22,6 +22,7 @@ #include <xmloff/SettingsExportHelper.hxx> #include <xmloff/xmltoken.hxx> +#include <rtl/ref.hxx> #include <sal/log.hxx> #include <tools/debug.hxx> #include <tools/diagnose_ex.h> @@ -38,7 +39,7 @@ #include <com/sun/star/util/DateTime.hpp> #include <com/sun/star/formula/SymbolDescriptor.hpp> #include <com/sun/star/document/PrinterIndependentLayout.hpp> -#include <com/sun/star/document/IndexedPropertyValues.hpp> +#include <comphelper/indexedpropertyvalues.hxx> #include <xmloff/XMLSettingsExportContext.hxx> #include "xmlenums.hxx" @@ -284,7 +285,7 @@ void XMLSettingsExportHelper::exportSymbolDescriptors( const uno::Sequence < formula::SymbolDescriptor > &rProps, const OUString& rName) const { - uno::Reference< container::XIndexContainer > xBox = document::IndexedPropertyValues::create(m_rContext.GetComponentContext()); + rtl::Reference< comphelper::IndexedPropertyValuesContainer > xBox = new comphelper::IndexedPropertyValuesContainer(); static const OUStringLiteral sName ( u"Name" ); static const OUStringLiteral sExportName ( u"ExportName" ); @@ -419,7 +420,7 @@ void XMLSettingsExportHelper::exportForbiddenCharacters( if( !xForbChars.is() || !xLocales.is() ) return; - uno::Reference< container::XIndexContainer > xBox = document::IndexedPropertyValues::create(m_rContext.GetComponentContext()); + rtl::Reference< comphelper::IndexedPropertyValuesContainer > xBox = new comphelper::IndexedPropertyValuesContainer(); const uno::Sequence< lang::Locale > aLocales( xLocales->getLocales() ); /* FIXME-BCP47: this stupid and counterpart in |