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 /dbaccess | |
parent | 3e5f9c03433d3480080276640a924b2aa0bdc227 (diff) |
loplugin:mergeclasses, merge ILabelProvider with LabelProvider
Change-Id: I8fb231b4189c09d8e049855d38b0f1eb518ac2b9
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/dlg/sqlmessage.cxx | 24 |
1 files changed, 8 insertions, 16 deletions
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; |