summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-04-17 15:46:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-04-17 22:22:18 +0200
commitb6075c3afed5837a79a9c509f5b38f38eeacf6dc (patch)
tree5cae070135ca387860d9ca8f7a809842801f25e2
parente54762baa8019d02cadd311e750f6ff0d276f67b (diff)
boil incomprehensible template spew down to its simpler reality
Change-Id: I6a428b6515bffb69b6890ddcf8990c2c773b506c Reviewed-on: https://gerrit.libreoffice.org/70889 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/source/ui/inc/anyrefdg.hxx41
-rw-r--r--sc/source/ui/inc/validate.hxx4
2 files changed, 12 insertions, 33 deletions
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index 99c57edf5320..7fd1c4b19381 100644
--- a/sc/source/ui/inc/anyrefdg.hxx
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -241,49 +241,28 @@ struct ScAnyRefDlg : ::ScRefHdlrImpl< ScAnyRefDlg, SfxModelessDialog>
}
};
-template< class TWindow, bool bBindRef = true >
-class ScRefHdlrControllerImplBase: public TWindow, public ScRefHandler
-{
-private:
- ScRefHdlrControllerImplBase(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent, const OUString& rUIXMLDescription, const OString& rID)
- : TWindow(pB, pCW, pParent, rUIXMLDescription, rID)
- , ScRefHandler(*static_cast<TWindow*>(this), pB, bBindRef)
- {
- }
-
- ScRefHdlrControllerImplBase(weld::Window* pParent, const OUString& rUIXMLDescription, const OString& rID, const SfxItemSet* pArg, SfxBindings *pB)
- : TWindow(pParent, rUIXMLDescription, rID, pArg)
- , ScRefHandler(*static_cast<TWindow*>(this), pB, bBindRef)
- {
- }
-
- virtual ~ScRefHdlrControllerImplBase() override
- {
- }
-
- template<class, class, bool> friend struct ScRefHdlrControllerImpl;
-};
-
-template<class TDerived, class TBase, bool bBindRef = true>
-struct ScRefHdlrControllerImpl : ScRefHdlrControllerImplBase<TBase, bBindRef>
+template<class TBase, bool bBindRef = true>
+struct ScRefHdlrControllerImpl : public TBase, public ScRefHandler
{
enum { UNKNOWN_SLOTID = 0U, SLOTID = UNKNOWN_SLOTID };
- ScRefHdlrControllerImpl(weld::Window* rt1, const OUString& rt2, const OString& rt3, const SfxItemSet* rt4, SfxBindings *rt5)
- : ScRefHdlrControllerImplBase<TBase, bBindRef >(rt1, rt2, rt3, rt4, rt5)
+ ScRefHdlrControllerImpl(weld::Window* pParent, const OUString& rUIXMLDescription, const OString& rID, const SfxItemSet* pArg, SfxBindings *pB)
+ : TBase(pParent, rUIXMLDescription, rID, pArg)
+ , ScRefHandler(*static_cast<TBase*>(this), pB, bBindRef)
{
}
- ScRefHdlrControllerImpl(SfxBindings* rt1, SfxChildWindow* rt2, weld::Window* rt3, const OUString& rt4, const OString& rt5)
- : ScRefHdlrControllerImplBase<TBase, bBindRef >(rt1, rt2, rt3, rt4, rt5)
+ ScRefHdlrControllerImpl(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent, const OUString& rUIXMLDescription, const OString& rID)
+ : TBase(pB, pCW, pParent, rUIXMLDescription, rID)
+ , ScRefHandler(*static_cast<TBase*>(this), pB, bBindRef)
{
}
};
-struct ScAnyRefDlgController : ScRefHdlrControllerImpl<ScAnyRefDlgController, SfxModelessDialogController>
+struct ScAnyRefDlgController : ScRefHdlrControllerImpl<SfxModelessDialogController>
{
ScAnyRefDlgController(SfxBindings* rt1, SfxChildWindow* rt2, weld::Window* rt3, const OUString& rt4, const OString& rt5)
- : ScRefHdlrControllerImpl<ScAnyRefDlgController, SfxModelessDialogController>(rt1, rt2, rt3, rt4, rt5)
+ : ScRefHdlrControllerImpl<SfxModelessDialogController>(rt1, rt2, rt3, rt4, rt5)
{
}
};
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
index d28ee58192cd..661b605387d9 100644
--- a/sc/source/ui/inc/validate.hxx
+++ b/sc/source/ui/inc/validate.hxx
@@ -146,10 +146,10 @@ public:
/** The "Validity" tab dialog. */
class ScValidationDlg
- : public ScRefHdlrControllerImpl<ScValidationDlg, SfxTabDialogController, false>
+ : public ScRefHdlrControllerImpl<SfxTabDialogController, false>
, public ScRefHandlerHelper
{
- typedef ScRefHdlrControllerImpl<ScValidationDlg, SfxTabDialogController, false> ScValidationDlgBase;
+ typedef ScRefHdlrControllerImpl<SfxTabDialogController, false> ScValidationDlgBase;
ScTabViewShell * const m_pTabVwSh;
OString m_sValuePageId;