diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-09 20:22:37 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-11 14:29:30 +0100 |
commit | feb8164afa67d3e2e5fe27dd01c5101d6d0cb847 (patch) | |
tree | 3826f9558fa30a6806f10d6124028dc0d1e29a63 /include | |
parent | 47ad7497f736b27c23667e0754cd686b78b60744 (diff) |
drop newly unused code and macros
Change-Id: I4b3fe1d7a62305f04589bd05a80aa771910a4f98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112246
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/app.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/childwin.hxx | 76 |
2 files changed, 0 insertions, 78 deletions
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx index 26b14e2ca2d4..b3b1761baece 100644 --- a/include/sfx2/app.hxx +++ b/include/sfx2/app.hxx @@ -36,7 +36,6 @@ namespace weld { class Window; } class BasicManager; class DdeService; -struct SfxChildWinContextFactory; class SfxAppData_Impl; class SfxChildWinFactArr_Impl; class SfxDispatcher; @@ -174,7 +173,6 @@ public: // Object-Factories/global arrays SAL_DLLPRIVATE void RegisterChildWindow_Impl(SfxModule*, std::unique_ptr<SfxChildWinFactory>); - SAL_DLLPRIVATE void RegisterChildWindowContext_Impl(SfxModule*, sal_uInt16, std::unique_ptr<SfxChildWinContextFactory>); SAL_DLLPRIVATE void RegisterStatusBarControl_Impl(SfxModule*, const SfxStbCtrlFactory&); SAL_DLLPRIVATE void RegisterToolBoxControl_Impl( SfxModule*, const SfxTbxCtrlFactory&); SAL_DLLPRIVATE SfxTbxCtrlFactArr_Impl& GetTbxCtrlFactories_Impl() const; diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx index b78f8301c653..6668ddcbee32 100644 --- a/include/sfx2/childwin.hxx +++ b/include/sfx2/childwin.hxx @@ -35,7 +35,6 @@ namespace com::sun::star::frame { class XFrame; } class SfxWorkWindow; class SfxModule; class SfxChildWindow; -class SfxChildWindowContext; class SfxBindings; class SfxModelessDialogController; @@ -83,57 +82,18 @@ typedef std::unique_ptr<SfxChildWindow> (*SfxChildWinCtor)( vcl::Window *pParent SfxBindings *pBindings, SfxChildWinInfo *pInfo); -// ChildWindowsContexts factory methods -typedef std::unique_ptr<SfxChildWindowContext> (*SfxChildWinContextCtor)( vcl::Window *pParentWindow, - SfxBindings *pBindings, - SfxChildWinInfo *pInfo); -struct SfxChildWinContextFactory -{ - SfxChildWinContextCtor pCtor; // Factory method - sal_uInt16 nContextId; // Identifier for SfxInterface - - SfxChildWinContextFactory( SfxChildWinContextCtor pTheCtor, sal_uInt16 nID ) - : pCtor(pTheCtor) - , nContextId(nID) - {} -}; - -class SfxChildWinContextArr_Impl; - struct SFX2_DLLPUBLIC SfxChildWinFactory { SfxChildWinCtor pCtor; // Factory method sal_uInt16 nId; // ChildWindow-Id ( SlotId ) SfxChildWinInfo aInfo; // Configuration sal_uInt16 nPos; // Position in UI - std::unique_ptr<SfxChildWinContextArr_Impl> pArr; // Array for Contexts SfxChildWinFactory( SfxChildWinCtor pTheCtor, sal_uInt16 nID, sal_uInt16 n ); ~SfxChildWinFactory(); }; struct SfxChildWindow_Impl; -class SFX2_DLLPUBLIC SfxChildWindowContext -{ -friend class SfxChildWindow; - VclPtr<vcl::Window> pWindow; - sal_uInt16 nContextId; - -protected: - SfxChildWindowContext( sal_uInt16 nId ); - -public: - virtual ~SfxChildWindowContext(); - - void SetWindow( vcl::Window* pWin ) - { pWindow=pWin; } - vcl::Window* GetWindow() const - { return pWindow; } - sal_uInt16 GetContextId() const - { return nContextId; } - - static void RegisterChildWindowContext(SfxModule*, sal_uInt16, std::unique_ptr<SfxChildWinContextFactory>); -}; extern SFX2_DLLPUBLIC bool ParentIsFloatingWindow(vcl::Window *pParent); @@ -145,7 +105,6 @@ class SFX2_DLLPUBLIC SfxChildWindow std::shared_ptr<SfxDialogController> xController; // actual contents SfxChildAlignment eChildAlignment; // Current css::drawing::Alignment std::unique_ptr< SfxChildWindow_Impl> pImpl; // Implementation data - std::unique_ptr<SfxChildWindowContext> pContext; // With context-sensitive ChildWindows: // Another window in pWindow SAL_DLLPRIVATE void ClearWorkwin(); @@ -173,15 +132,6 @@ public: sal_uInt16 GetType() const { return nType; } - void CreateContext( sal_uInt16 nContextId, SfxBindings& ); - sal_uInt16 GetContextId() const - { return pContext ? pContext->GetContextId(): 0; } - - vcl::Window* GetContextWindow() const - { return pContext ? pContext->GetWindow(): nullptr; } - - vcl::Window* GetContextWindow( SfxModule const *pModule ) const; - virtual SfxChildWinInfo GetInfo() const; void SaveStatus(const SfxChildWinInfo& rInfo); @@ -203,36 +153,10 @@ public: SAL_DLLPRIVATE void SetWorkWindow_Impl( SfxWorkWindow* ); SAL_DLLPRIVATE void Activate_Impl(); - SAL_DLLPRIVATE SfxChildWindowContext* - GetContext_Impl() const - { return pContext.get(); } SAL_DLLPRIVATE void SetFactory_Impl( SfxChildWinFactory* ); }; -//! The Macro of the future ... -#define SFX_DECL_CHILDWINDOWCONTEXT(Class) \ - static std::unique_ptr<SfxChildWindowContext> CreateImpl(vcl::Window *pParent, \ - SfxBindings *pBindings, SfxChildWinInfo* pInfo ); \ - static void RegisterChildWindowContext(sal_uInt16, SfxModule *pMod=nullptr); \ - -//! The Macro of the future ... -// As a parameter and because of ContextId, CreateImpl must be handed the -// factory. As long as Id is set to 0 and patched in -// SfxChildWindow::CreateContext -#define SFX_IMPL_CHILDWINDOWCONTEXT(Class, MyID) \ - std::unique_ptr<SfxChildWindowContext> Class::CreateImpl( vcl::Window *pParent, \ - SfxBindings *pBindings, SfxChildWinInfo* pInfo ) \ - { \ - return std::make_unique<Class>(pParent,0,pBindings,pInfo);\ - } \ - void Class::RegisterChildWindowContext(sal_uInt16 nId, SfxModule* pMod) \ - { \ - auto pFact = std::make_unique<SfxChildWinContextFactory>( \ - Class::CreateImpl, nId ); \ - SfxChildWindowContext::RegisterChildWindowContext(pMod, MyID, std::move(pFact)); \ - } - #define SFX_DECL_CHILDWINDOW(Class) \ public : \ static std::unique_ptr<SfxChildWindow> CreateImpl(vcl::Window *pParent, sal_uInt16 nId, \ |