diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-12 14:22:39 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-13 10:07:50 +0200 |
commit | ade2ba503f345fcbd2ac889a749db584a94a3043 (patch) | |
tree | 223ce6e9e7a95558cdcb2906e5fc8fdedbd9e615 | |
parent | 3e5f9c03433d3480080276640a924b2aa0bdc227 (diff) |
loplugin:mergeclasses, merge ILabelProvider with LabelProvider
Change-Id: I8fb231b4189c09d8e049855d38b0f1eb518ac2b9
-rw-r--r-- | compilerplugins/clang/mergeclasses.results | 1 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/sqlmessage.cxx | 24 |
2 files changed, 8 insertions, 17 deletions
diff --git a/compilerplugins/clang/mergeclasses.results b/compilerplugins/clang/mergeclasses.results index 61d9cd4c8b33..147c46a0dcbf 100644 --- a/compilerplugins/clang/mergeclasses.results +++ b/compilerplugins/clang/mergeclasses.results @@ -109,7 +109,6 @@ merge cppcanvas::Renderer with cppcanvas::internal::ImplRenderer merge cppu::PropertySetMixinImpl with cppu::PropertySetMixin merge dbaccess::IPropertyContainer with dbaccess::OColumn merge dbaccess::IRefreshListener with dbaccess::OConnection -merge dbaui::(anonymous namespace)::ILabelProvider with dbaui::(anonymous namespace)::LabelProvider merge dbaui::IEntryFilter with dbaui::(anonymous namespace)::FilterByEntryDataId merge dbaui::OOdbcLibWrapper with dbaui::OOdbcEnumeration merge dbaui::SbaGridListener with dbaui::SbaXDataBrowserController diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index 0f9e9d382a48..8ab9396e8c41 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -55,14 +55,6 @@ namespace dbaui namespace { - class ILabelProvider - { - public: - virtual OUString getLabel() const = 0; - - virtual ~ILabelProvider() { }; - }; - class ImageProvider { private: @@ -84,7 +76,7 @@ namespace } }; - class LabelProvider : public ILabelProvider + class LabelProvider { private: OUString m_label; @@ -94,7 +86,7 @@ namespace { } - virtual OUString getLabel() const override + OUString getLabel() const { return m_label; } @@ -106,9 +98,9 @@ namespace mutable std::shared_ptr< ImageProvider > m_pErrorImage; mutable std::shared_ptr< ImageProvider > m_pWarningsImage; mutable std::shared_ptr< ImageProvider > m_pInfoImage; - mutable std::shared_ptr< ILabelProvider > m_pErrorLabel; - mutable std::shared_ptr< ILabelProvider > m_pWarningsLabel; - mutable std::shared_ptr< ILabelProvider > m_pInfoLabel; + mutable std::shared_ptr< LabelProvider > m_pErrorLabel; + mutable std::shared_ptr< LabelProvider > m_pWarningsLabel; + mutable std::shared_ptr< LabelProvider > m_pInfoLabel; public: ProviderFactory() @@ -141,9 +133,9 @@ namespace return *ppProvider; } - std::shared_ptr< ILabelProvider > getLabelProvider( SQLExceptionInfo::TYPE _eType, bool _bSubLabel ) const + std::shared_ptr< LabelProvider > getLabelProvider( SQLExceptionInfo::TYPE _eType, bool _bSubLabel ) const { - std::shared_ptr< ILabelProvider >* ppProvider( &m_pErrorLabel ); + std::shared_ptr< LabelProvider >* ppProvider( &m_pErrorLabel ); sal_uInt16 nLabelID( STR_EXCEPTION_ERROR ); switch ( _eType ) @@ -174,7 +166,7 @@ namespace SQLExceptionInfo::TYPE eType; std::shared_ptr< ImageProvider > pImageProvider; - std::shared_ptr< ILabelProvider > pLabelProvider; + std::shared_ptr< LabelProvider > pLabelProvider; bool bSubEntry; |