diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-01-23 19:16:22 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-01-25 15:40:16 +0000 |
commit | 63ef3cf5bfa8b58e5ac9a645aea2f043599dc6d4 (patch) | |
tree | b9fe504557d33c0b3a8363ce8b0bac74e1451655 | |
parent | cbfbf11952374c49274938600c350d2f1f27bb32 (diff) |
Use ImplInheritanceHelper in OAccessibleTextHelper
(Explicitly deleting the special member functions is needed to avoid MSVC
> include\cppuhelper/implbase.hxx(152): error C2280: 'comphelper::OAccessibleExtendedComponentHelper::OAccessibleExtendedComponentHelper(comphelper::OAccessibleExtendedComponentHelper &&)': attempting to reference a deleted function
> include\comphelper/accessiblecomponenthelper.hxx(220): note: see declaration of 'comphelper::OAccessibleExtendedComponentHelper::OAccessibleExtendedComponentHelper'
> include\comphelper/accessiblecomponenthelper.hxx(220): note: 'comphelper::OAccessibleExtendedComponentHelper::OAccessibleExtendedComponentHelper(comphelper::OAccessibleExtendedComponentHelper &&)': function was explicitly deleted
> include\comphelper/accessibletexthelper.hxx(133): note: see reference to function template instantiation 'cppu::ImplInheritanceHelper<comphelper::OAccessibleExtendedComponentHelper,com::sun::star::accessibility::XAccessibleText>::ImplInheritanceHelper<cppu::ImplInheritanceHelper<comphelper::OAccessibleExtendedComponentHelper,com::sun::star::accessibility::XAccessibleText>>(cppu::ImplInheritanceHelper<comphelper::OAccessibleExtendedComponentHelper,com::sun::star::accessibility::XAccessibleText> &&)' being compiled
> include\comphelper/accessibletexthelper.hxx(133): note: see reference to function template instantiation 'cppu::ImplInheritanceHelper<comphelper::OAccessibleExtendedComponentHelper,com::sun::star::accessibility::XAccessibleText>::ImplInheritanceHelper<cppu::ImplInheritanceHelper<comphelper::OAccessibleExtendedComponentHelper,com::sun::star::accessibility::XAccessibleText>>(cppu::ImplInheritanceHelper<comphelper::OAccessibleExtendedComponentHelper,com::sun::star::accessibility::XAccessibleText> &&)' being compiled
)
Change-Id: I00377be4a5fb44b2ef2b5001823ca0d89ead026b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146109
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | accessibility/inc/standard/vclxaccessibletextcomponent.hxx | 1 | ||||
-rw-r--r-- | comphelper/source/misc/accessibletexthelper.cxx | 12 | ||||
-rw-r--r-- | include/comphelper/accessibletexthelper.hxx | 24 |
3 files changed, 12 insertions, 25 deletions
diff --git a/accessibility/inc/standard/vclxaccessibletextcomponent.hxx b/accessibility/inc/standard/vclxaccessibletextcomponent.hxx index 205af38d5660..7bc47ac79679 100644 --- a/accessibility/inc/standard/vclxaccessibletextcomponent.hxx +++ b/accessibility/inc/standard/vclxaccessibletextcomponent.hxx @@ -22,6 +22,7 @@ #include <com/sun/star/accessibility/AccessibleScrollType.hpp> #include <toolkit/awt/vclxaccessiblecomponent.hxx> #include <comphelper/accessibletexthelper.hxx> +#include <cppuhelper/implbase1.hxx> diff --git a/comphelper/source/misc/accessibletexthelper.cxx b/comphelper/source/misc/accessibletexthelper.cxx index cc7fa4cd3d15..da39ac1ce252 100644 --- a/comphelper/source/misc/accessibletexthelper.cxx +++ b/comphelper/source/misc/accessibletexthelper.cxx @@ -732,18 +732,6 @@ namespace comphelper } - // XInterface - - - IMPLEMENT_FORWARD_XINTERFACE2( OAccessibleTextHelper, OAccessibleExtendedComponentHelper, OAccessibleTextHelper_Base ) - - - // XTypeProvider - - - IMPLEMENT_FORWARD_XTYPEPROVIDER2( OAccessibleTextHelper, OAccessibleExtendedComponentHelper, OAccessibleTextHelper_Base ) - - // XAccessibleText diff --git a/include/comphelper/accessibletexthelper.hxx b/include/comphelper/accessibletexthelper.hxx index 607004aee30f..30730469be91 100644 --- a/include/comphelper/accessibletexthelper.hxx +++ b/include/comphelper/accessibletexthelper.hxx @@ -23,7 +23,7 @@ #include <com/sun/star/accessibility/XAccessibleText.hpp> #include <com/sun/star/accessibility/TextSegment.hpp> #include <comphelper/accessiblecomponenthelper.hxx> -#include <cppuhelper/implbase1.hxx> +#include <cppuhelper/implbase.hxx> #include <comphelper/comphelperdllapi.h> namespace com::sun::star::i18n { class XBreakIterator; } @@ -111,26 +111,24 @@ namespace comphelper // OAccessibleTextHelper - typedef ::cppu::ImplHelper1 < css::accessibility::XAccessibleText - > OAccessibleTextHelper_Base; - /** a helper class for implementing an AccessibleExtendedComponent which at the same time supports an XAccessibleText interface */ - class COMPHELPER_DLLPUBLIC OAccessibleTextHelper : public OAccessibleExtendedComponentHelper, - public OCommonAccessibleText, - public OAccessibleTextHelper_Base + class COMPHELPER_DLLPUBLIC OAccessibleTextHelper : public cppu::ImplInheritanceHelper< + OAccessibleExtendedComponentHelper, + css::accessibility::XAccessibleText>, + public OCommonAccessibleText { + private: + OAccessibleTextHelper(OAccessibleTextHelper const &) = delete; + OAccessibleTextHelper(OAccessibleTextHelper &&) = delete; + void operator =(OAccessibleTextHelper const &) = delete; + void operator =(OAccessibleTextHelper &&) = delete; + protected: OAccessibleTextHelper(); public: - // XInterface - DECLARE_XINTERFACE( ) - - // XTypeProvider - DECLARE_XTYPEPROVIDER( ) - // XAccessibleText virtual OUString SAL_CALL getSelectedText() override; virtual sal_Int32 SAL_CALL getSelectionStart() override; |