summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-18 08:05:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-18 12:35:08 +0200
commit25cce7cd249379f0a98fddc63327b38bd2e48882 (patch)
tree6f724f7b04e2df6bc7547d1963cd1e87e3ac39f5 /dbaccess
parentb68f4ff85bc1d6e008facbc310ddbfb5d799b7a5 (diff)
Revert "loplugin:unusedmethods"
This reverts commit 7990680e92e4fba376ef4f9346d1bc53661bde30. screenshot build is failing Change-Id: Idfe4cac73edaf9be1e704c0bd734e858643defda Reviewed-on: https://gerrit.libreoffice.org/77654 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/dlg/adminpages.hxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx
index 7266901af8f8..4a4db351e0bd 100644
--- a/dbaccess/source/ui/dlg/adminpages.hxx
+++ b/dbaccess/source/ui/dlg/adminpages.hxx
@@ -41,6 +41,17 @@ namespace dbaui
virtual void Disable() = 0;
};
+ template < class T > class OSaveValueWrapper : public ISaveValueWrapper
+ {
+ VclPtr<T> m_pSaveValue;
+ public:
+ explicit OSaveValueWrapper(T* _pSaveValue) : m_pSaveValue(_pSaveValue)
+ { OSL_ENSURE(m_pSaveValue,"Illegal argument!"); }
+
+ virtual void SaveValue() override { m_pSaveValue->SaveValue(); }
+ virtual void Disable() override { m_pSaveValue->Disable(); }
+ };
+
template < class T > class OSaveValueWidgetWrapper : public ISaveValueWrapper
{
T* m_pSaveValue;
@@ -85,6 +96,17 @@ namespace dbaui
virtual void Disable() override { m_pSaveValue->set_sensitive(false); }
};
+ template < class T > class ODisableWrapper : public ISaveValueWrapper
+ {
+ VclPtr<T> m_pSaveValue;
+ public:
+ explicit ODisableWrapper(T* _pSaveValue) : m_pSaveValue(_pSaveValue)
+ { OSL_ENSURE(m_pSaveValue,"Illegal argument!"); }
+
+ virtual void SaveValue() override {}
+ virtual void Disable() override { m_pSaveValue->Disable(); }
+ };
+
// OGenericAdministrationPage
class IDatabaseSettingsDialog;
class IItemSetHelper;