forms/source/component/FormattedFieldWrapper.cxx | 20 +++++++++++++------- forms/source/component/FormattedFieldWrapper.hxx | 6 ++++-- 2 files changed, 17 insertions(+), 9 deletions(-)
New commits: commit 29b3265a6eee7aada7cb6d8f478bfeb0a32c006e Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Fri Apr 21 13:50:50 2023 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Fri Apr 21 15:05:37 2023 +0200 Fix some getImplementationName ...to match the corresponding .component entries Change-Id: I4c2a838b7a88e3d21e230310c1a4057b427a7c7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150756 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/forms/source/component/FormattedFieldWrapper.cxx b/forms/source/component/FormattedFieldWrapper.cxx index 8a8f27830395..834527ccd79b 100644 --- a/forms/source/component/FormattedFieldWrapper.cxx +++ b/forms/source/component/FormattedFieldWrapper.cxx @@ -44,14 +44,17 @@ using namespace ::com::sun::star::io; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::util; -OFormattedFieldWrapper::OFormattedFieldWrapper(const Reference<XComponentContext>& _rxFactory) +OFormattedFieldWrapper::OFormattedFieldWrapper(const Reference<XComponentContext>& _rxFactory, + OUString const & implementationName) :m_xContext(_rxFactory) + ,m_implementationName(implementationName) { } -css::uno::Reference<css::uno::XInterface> OFormattedFieldWrapper::createFormattedFieldWrapper(const css::uno::Reference< css::uno::XComponentContext>& _rxFactory, bool bActAsFormatted) +css::uno::Reference<css::uno::XInterface> OFormattedFieldWrapper::createFormattedFieldWrapper(const css::uno::Reference< css::uno::XComponentContext>& _rxFactory, bool bActAsFormatted, OUString const & implementationName) { - rtl::Reference<OFormattedFieldWrapper> pRef = new OFormattedFieldWrapper(_rxFactory); + rtl::Reference<OFormattedFieldWrapper> pRef = new OFormattedFieldWrapper(_rxFactory, + implementationName); if (bActAsFormatted) { @@ -82,7 +85,8 @@ Reference< XCloneable > SAL_CALL OFormattedFieldWrapper::createClone() { ensureAggregate(); - rtl::Reference< OFormattedFieldWrapper > xRef(new OFormattedFieldWrapper(m_xContext)); + rtl::Reference< OFormattedFieldWrapper > xRef(new OFormattedFieldWrapper(m_xContext, + m_implementationName)); Reference< XCloneable > xCloneAccess; query_aggregation( m_xAggregate, xCloneAccess ); @@ -174,7 +178,7 @@ OUString SAL_CALL OFormattedFieldWrapper::getServiceName() OUString SAL_CALL OFormattedFieldWrapper::getImplementationName( ) { - return "com.sun.star.comp.forms.OFormattedFieldWrapper_ForcedFormatted"; + return m_implementationName; } sal_Bool SAL_CALL OFormattedFieldWrapper::supportsService( const OUString& _rServiceName ) @@ -342,7 +346,8 @@ com_sun_star_form_OFormattedFieldWrapper_get_implementation(css::uno::XComponent css::uno::Sequence<css::uno::Any> const &) { css::uno::Reference<css::uno::XInterface> inst( - OFormattedFieldWrapper::createFormattedFieldWrapper(component, false)); + OFormattedFieldWrapper::createFormattedFieldWrapper( + component, false, "com.sun.star.form.OFormattedFieldWrapper")); inst->acquire(); return inst.get(); } @@ -352,7 +357,8 @@ com_sun_star_comp_forms_OFormattedFieldWrapper_ForcedFormatted_get_implementatio css::uno::Sequence<css::uno::Any> const &) { css::uno::Reference<css::uno::XInterface> inst( - OFormattedFieldWrapper::createFormattedFieldWrapper(component, true)); + OFormattedFieldWrapper::createFormattedFieldWrapper( + component, true, "com.sun.star.comp.forms.OFormattedFieldWrapper_ForcedFormatted")); inst->acquire(); return inst.get(); } diff --git a/forms/source/component/FormattedFieldWrapper.hxx b/forms/source/component/FormattedFieldWrapper.hxx index b34db4148531..9dc093dece0d 100644 --- a/forms/source/component/FormattedFieldWrapper.hxx +++ b/forms/source/component/FormattedFieldWrapper.hxx @@ -42,6 +42,7 @@ typedef ::cppu::WeakAggImplHelper3 < css::io::XPersistObject class OFormattedFieldWrapper final : public OFormattedFieldWrapper_Base { css::uno::Reference< css::uno::XComponentContext> m_xContext; + OUString m_implementationName; css::uno::Reference< css::uno::XAggregation> m_xAggregate; @@ -49,7 +50,8 @@ class OFormattedFieldWrapper final : public OFormattedFieldWrapper_Base // if we act as formatted this is used to write the EditModel part css::uno::Reference< css::io::XPersistObject> m_xFormattedPart; - OFormattedFieldWrapper(const css::uno::Reference< css::uno::XComponentContext>& _rxFactory); + OFormattedFieldWrapper(const css::uno::Reference< css::uno::XComponentContext>& _rxFactory, + OUString const & implementationName); virtual ~OFormattedFieldWrapper() override; @@ -58,7 +60,7 @@ public: // to read and write the FormattedModel part // if bActAsFormatted is false, the state is undetermined until somebody calls // ::read or does anything which requires a living aggregate - static css::uno::Reference<css::uno::XInterface> createFormattedFieldWrapper(const css::uno::Reference< css::uno::XComponentContext>& _rxFactory, bool bActAsFormatted); + static css::uno::Reference<css::uno::XInterface> createFormattedFieldWrapper(const css::uno::Reference< css::uno::XComponentContext>& _rxFactory, bool bActAsFormatted, OUString const & implementationName); // UNO DECLARE_UNO3_AGG_DEFAULTS(OFormattedFieldWrapper, OWeakAggObject)