[Libreoffice-commits] core.git: oox/inc oox/source oox/util solenv/bin
oox/inc/services.hxx |7 --- oox/source/core/services.cxx |1 - oox/source/ppt/pptimport.cxx | 27 --- oox/util/oox.component |3 ++- solenv/bin/native-code.py|1 + 5 files changed, 11 insertions(+), 28 deletions(-) New commits: commit c3c43c7966e0f4c7a3b76361559d29c9335487d9 Author: Miklos Vajna AuthorDate: Fri Sep 7 08:41:44 2018 +0200 Commit: Miklos Vajna CommitDate: Fri Sep 7 11:58:02 2018 +0200 oox: create PowerPointImport instances with an uno constructor PowerPointImport_getSupportedServiceNames() was copy from oox::core::FilterBase::getSupportedServiceNames(), so it can go away entirely. Change-Id: Ia6352cea1c2d65ba94cae66b500de951d82f455a Reviewed-on: https://gerrit.libreoffice.org/60124 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/oox/inc/services.hxx b/oox/inc/services.hxx index 849c28a279bc..7140a5b87d80 100644 --- a/oox/inc/services.hxx +++ b/oox/inc/services.hxx @@ -24,13 +24,6 @@ namespace oox { namespace ppt { -extern OUString PowerPointImport_getImplementationName(); -extern css::uno::Sequence< OUString > PowerPointImport_getSupportedServiceNames(); -/// @throws css::uno::Exception -extern css::uno::Reference< css::uno::XInterface > PowerPointImport_createInstance( -const css::uno::Reference< css::uno::XComponentContext >& rxContext ); -} -namespace ppt { extern OUString QuickDiagrammingImport_getImplementationName(); extern css::uno::Sequence< OUString > QuickDiagrammingImport_getSupportedServiceNames(); /// @throws css::uno::Exception diff --git a/oox/source/core/services.cxx b/oox/source/core/services.cxx index 9bf8e57466bf..c336022110a2 100644 --- a/oox/source/core/services.cxx +++ b/oox/source/core/services.cxx @@ -35,7 +35,6 @@ namespace { // Impress" would actually want to make use of them: static ::cppu::ImplementationEntry const spServices[] = { -IMPLEMENTATION_ENTRY( ::oox::ppt::PowerPointImport ), IMPLEMENTATION_ENTRY( ::oox::ppt::QuickDiagrammingImport ), IMPLEMENTATION_ENTRY( ::oox::ppt::QuickDiagrammingLayout ), IMPLEMENTATION_ENTRY( ::oox::shape::ShapeContextHandler ), diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx index 634cd877f66f..8d5a6aa03f67 100644 --- a/oox/source/ppt/pptimport.cxx +++ b/oox/source/ppt/pptimport.cxx @@ -54,24 +54,6 @@ using ::com::sun::star::lang::XComponent; namespace oox { namespace ppt { -OUString PowerPointImport_getImplementationName() -{ -return OUString( "com.sun.star.comp.oox.ppt.PowerPointImport" ); -} - -uno::Sequence< OUString > PowerPointImport_getSupportedServiceNames() -{ -Sequence< OUString > aSeq( 2 ); -aSeq[ 0 ] = "com.sun.star.document.ImportFilter"; -aSeq[ 1 ] = "com.sun.star.document.ExportFilter"; -return aSeq; -} - -uno::Reference< uno::XInterface > PowerPointImport_createInstance( const Reference< XComponentContext >& rxContext ) -{ -return static_cast< ::cppu::OWeakObject* >( new PowerPointImport( rxContext ) ); -} - #if OSL_DEBUG_LEVEL > 0 XmlFilterBase* PowerPointImport::mpDebugFilterBase = nullptr; #endif @@ -321,9 +303,16 @@ GraphicHelper* PowerPointImport::implCreateGraphicHelper() const OUString PowerPointImport::getImplementationName() { -return PowerPointImport_getImplementationName(); +return OUString( "com.sun.star.comp.oox.ppt.PowerPointImport" ); } }} +extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* +com_sun_star_comp_oox_ppt_PowerPointImport_get_implementation( +uno::XComponentContext* pCtx, uno::Sequence const& /*rSeq*/) +{ +return cppu::acquire(new oox::ppt::PowerPointImport(pCtx)); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/util/oox.component b/oox/util/oox.component index 399348db905c..09952c7abdf4 100644 --- a/oox/util/oox.component +++ b/oox/util/oox.component @@ -31,7 +31,8 @@ constructor="com_sun_star_comp_oox_docprop_DocumentPropertiesImporter_get_implementation"> - + diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py index d297f93bba05..75d3afbcbbac 100755 --- a/solenv/bin/native-code.py +++ b/solenv/bin/native-code.py @@ -256,6 +256,7 @@ core_constructor_list = [ "com_sun_star_comp_oox_core_FastTokenHandler_get_implementation", "com_sun_star_comp_oox_FormatDetector_get_implementation", "com_sun_star_comp_oox_docprop_DocumentPropertiesImporter_get_implementation", +"com_sun_star_comp_oox_ppt_PowerPointImport_get_implementation", ] # edit group for apps, where you can edit documents ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: oox/inc oox/source oox/util solenv/bin
oox/inc/services.hxx |7 --- oox/source/core/services.cxx |1 - oox/source/docprop/ooxmldocpropimport.cxx | 30 -- oox/util/oox.component|3 ++- solenv/bin/native-code.py |1 + 5 files changed, 15 insertions(+), 27 deletions(-) New commits: commit 4ccac77652d61b823160cac073e3c1bf725352f1 Author: Miklos Vajna AuthorDate: Thu Aug 30 21:58:14 2018 +0200 Commit: Miklos Vajna CommitDate: Fri Aug 31 09:08:47 2018 +0200 oox: create DocumentPropertiesImporter instances with an uno constructor Change-Id: I2600a59e4eac7375882aff0491ecf16bad449520 Reviewed-on: https://gerrit.libreoffice.org/59841 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/oox/inc/services.hxx b/oox/inc/services.hxx index 9fd9ddd46b70..849c28a279bc 100644 --- a/oox/inc/services.hxx +++ b/oox/inc/services.hxx @@ -23,13 +23,6 @@ #include namespace oox { -namespace docprop { -extern OUString DocumentPropertiesImport_getImplementationName(); -extern css::uno::Sequence< OUString > DocumentPropertiesImport_getSupportedServiceNames(); -/// @throws css::uno::Exception -extern css::uno::Reference< css::uno::XInterface > DocumentPropertiesImport_createInstance( -const css::uno::Reference< css::uno::XComponentContext >& rxContext ); -} namespace ppt { extern OUString PowerPointImport_getImplementationName(); extern css::uno::Sequence< OUString > PowerPointImport_getSupportedServiceNames(); diff --git a/oox/source/core/services.cxx b/oox/source/core/services.cxx index 2c9412ea2640..9bf8e57466bf 100644 --- a/oox/source/core/services.cxx +++ b/oox/source/core/services.cxx @@ -35,7 +35,6 @@ namespace { // Impress" would actually want to make use of them: static ::cppu::ImplementationEntry const spServices[] = { -IMPLEMENTATION_ENTRY( ::oox::docprop::DocumentPropertiesImport ), IMPLEMENTATION_ENTRY( ::oox::ppt::PowerPointImport ), IMPLEMENTATION_ENTRY( ::oox::ppt::QuickDiagrammingImport ), IMPLEMENTATION_ENTRY( ::oox::ppt::QuickDiagrammingLayout ), diff --git a/oox/source/docprop/ooxmldocpropimport.cxx b/oox/source/docprop/ooxmldocpropimport.cxx index a15518b2eb75..6129030f7c4e 100644 --- a/oox/source/docprop/ooxmldocpropimport.cxx +++ b/oox/source/docprop/ooxmldocpropimport.cxx @@ -33,6 +33,8 @@ #include +using namespace ::com::sun::star; + namespace oox { namespace docprop { @@ -44,22 +46,6 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::xml::sax; -OUString DocumentPropertiesImport_getImplementationName() -{ -return OUString( "com.sun.star.comp.oox.docprop.DocumentPropertiesImporter" ); -} - -Sequence< OUString > DocumentPropertiesImport_getSupportedServiceNames() -{ -Sequence aServices { "com.sun.star.document.OOXMLDocumentPropertiesImporter" }; -return aServices; -} - -Reference< XInterface > DocumentPropertiesImport_createInstance( const Reference< XComponentContext >& rxContext ) -{ -return static_cast< ::cppu::OWeakObject* >( new DocumentPropertiesImport( rxContext ) ); -} - namespace { /// @throws RuntimeException @@ -113,7 +99,7 @@ DocumentPropertiesImport::DocumentPropertiesImport( const Reference< XComponentC // XServiceInfo OUString SAL_CALL DocumentPropertiesImport::getImplementationName() { -return DocumentPropertiesImport_getImplementationName(); +return OUString( "com.sun.star.comp.oox.docprop.DocumentPropertiesImporter" ); } sal_Bool SAL_CALL DocumentPropertiesImport::supportsService( const OUString& rServiceName ) @@ -123,7 +109,8 @@ sal_Bool SAL_CALL DocumentPropertiesImport::supportsService( const OUString& rSe Sequence< OUString > SAL_CALL DocumentPropertiesImport::getSupportedServiceNames() { -return DocumentPropertiesImport_getSupportedServiceNames(); +Sequence aServices { "com.sun.star.document.OOXMLDocumentPropertiesImporter" }; +return aServices; } // XOOXMLDocumentPropertiesImporter @@ -179,4 +166,11 @@ void SAL_CALL DocumentPropertiesImport::importProperties( } // namespace docprop } // namespace oox +extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* +com_sun_star_comp_oox_docprop_DocumentPropertiesImporter_get_implementation( +uno::XComponentContext* pCtx, uno::Sequence const& /*rSeq*/) +{ +return cppu::acquire(new oox::docprop::DocumentPropertiesImport(pCtx)); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/util/oox.component b/oox/util/oox.component index 5d235e1485cf..399348db905c 100644 --- a/oox/util/oox.component +++ b/oox/util/oox.component @@ -27,7 +27,8 @@ constructor="com_sun_star_comp_oox_FormatDetector_get_implementation"> - + diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py index 0056fb1a6dc3..d297f93bba05 100755 ---
[Libreoffice-commits] core.git: oox/inc oox/source oox/util solenv/bin
oox/inc/services.hxx |7 --- oox/source/core/filterdetect.cxx | 33 - oox/source/core/services.cxx |1 - oox/util/oox.component |3 ++- solenv/bin/native-code.py|1 + 5 files changed, 15 insertions(+), 30 deletions(-) New commits: commit 2963e0c69949c2c5d0c57a1960ac0406edfc2311 Author: Miklos Vajna AuthorDate: Thu Aug 9 21:27:45 2018 +0200 Commit: Miklos Vajna CommitDate: Fri Aug 10 09:03:50 2018 +0200 oox: create FilterDetect instances with an uno constructor Change-Id: Ic9baba6a4ca37af18c5f5175aadcc59bf47c7b64 Reviewed-on: https://gerrit.libreoffice.org/58798 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/oox/inc/services.hxx b/oox/inc/services.hxx index 5b77f4b1d9a4..9fd9ddd46b70 100644 --- a/oox/inc/services.hxx +++ b/oox/inc/services.hxx @@ -23,13 +23,6 @@ #include namespace oox { -namespace core { -extern OUString FilterDetect_getImplementationName(); -extern css::uno::Sequence< OUString > FilterDetect_getSupportedServiceNames(); -/// @throws css::uno::Exception -extern css::uno::Reference< css::uno::XInterface > FilterDetect_createInstance( -const css::uno::Reference< css::uno::XComponentContext >& rxContext ); -} namespace docprop { extern OUString DocumentPropertiesImport_getImplementationName(); extern css::uno::Sequence< OUString > DocumentPropertiesImport_getSupportedServiceNames(); diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx index 0f1fe8625b7c..cbbaae3ed333 100644 --- a/oox/source/core/filterdetect.cxx +++ b/oox/source/core/filterdetect.cxx @@ -38,6 +38,8 @@ #include +using namespace ::com::sun::star; + namespace oox { namespace core { @@ -228,25 +230,6 @@ void FilterDetectDocHandler::parseContentTypesOverride( const AttributeList& rAt mrFilterName = getFilterNameFromContentType( rAttribs.getString( XML_ContentType, OUString() ), maFileName ); } -/* Helper for XServiceInfo */ -Sequence< OUString > FilterDetect_getSupportedServiceNames() -{ -Sequence aServiceNames { "com.sun.star.frame.ExtendedTypeDetection" }; -return aServiceNames; -} - -/* Helper for XServiceInfo */ -OUString FilterDetect_getImplementationName() -{ -return OUString( "com.sun.star.comp.oox.FormatDetector" ); -} - -/* Helper for registry */ -Reference< XInterface > FilterDetect_createInstance( const Reference< XComponentContext >& rxContext ) -{ -return static_cast< ::cppu::OWeakObject* >( new FilterDetect( rxContext ) ); -} - FilterDetect::FilterDetect( const Reference< XComponentContext >& rxContext ) : mxContext( rxContext, UNO_SET_THROW ) { @@ -377,7 +360,7 @@ Reference< XInputStream > FilterDetect::extractUnencryptedPackage( MediaDescript OUString SAL_CALL FilterDetect::getImplementationName() { -return FilterDetect_getImplementationName(); +return OUString( "com.sun.star.comp.oox.FormatDetector" ); } sal_Bool SAL_CALL FilterDetect::supportsService( const OUString& rServiceName ) @@ -387,7 +370,8 @@ sal_Bool SAL_CALL FilterDetect::supportsService( const OUString& rServiceName ) Sequence< OUString > SAL_CALL FilterDetect::getSupportedServiceNames() { -return FilterDetect_getSupportedServiceNames(); +Sequence aServiceNames { "com.sun.star.frame.ExtendedTypeDetection" }; +return aServiceNames; } // com.sun.star.document.XExtendedFilterDetection interface --- @@ -452,4 +436,11 @@ OUString SAL_CALL FilterDetect::detect( Sequence< PropertyValue >& rMediaDescSeq } // namespace core } // namespace oox +extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* +com_sun_star_comp_oox_FormatDetector_get_implementation(uno::XComponentContext* pCtx, + uno::Sequence const& /*rSeq*/) +{ +return cppu::acquire(new oox::core::FilterDetect(pCtx)); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/source/core/services.cxx b/oox/source/core/services.cxx index 354501e79e2c..2c9412ea2640 100644 --- a/oox/source/core/services.cxx +++ b/oox/source/core/services.cxx @@ -35,7 +35,6 @@ namespace { // Impress" would actually want to make use of them: static ::cppu::ImplementationEntry const spServices[] = { -IMPLEMENTATION_ENTRY( ::oox::core::FilterDetect ), IMPLEMENTATION_ENTRY( ::oox::docprop::DocumentPropertiesImport ), IMPLEMENTATION_ENTRY( ::oox::ppt::PowerPointImport ), IMPLEMENTATION_ENTRY( ::oox::ppt::QuickDiagrammingImport ), diff --git a/oox/util/oox.component b/oox/util/oox.component index ccbba4d28759..5d235e1485cf 100644 --- a/oox/util/oox.component +++ b/oox/util/oox.component @@ -23,7 +23,8 @@ constructor="com_sun_star_comp_oox_core_FastTokenHandler_get_implementation"> - + diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py