summaryrefslogtreecommitdiff
path: root/include/sfx2/viewsh.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'include/sfx2/viewsh.hxx')
-rw-r--r--include/sfx2/viewsh.hxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index ca5090f4cce2..1928989aec85 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -41,6 +41,7 @@
#include <sfx2/tabdlg.hxx>
#define LOK_USE_UNSTABLE_API
#include <LibreOfficeKit/LibreOfficeKitTypes.h>
+#include <functional>
class SfxBaseController;
class Size;
@@ -137,6 +138,11 @@ public: \
#define SFX_VIEW_REGISTRATION(DocClass) \
DocClass::Factory().RegisterViewFactory( *Factory() )
+template<class T> bool checkSfxViewShell(const SfxViewShell* pShell)
+{
+ return dynamic_cast<const T*>(pShell) != nullptr;
+}
+
class SFX2_DLLPUBLIC SfxViewShell: public SfxShell, public SfxListener
{
#ifdef INCLUDED_SFX2_VIEWSH_HXX
@@ -166,9 +172,10 @@ protected:
public:
// Iteration
- static SfxViewShell* GetFirst( const TypeId* pType = 0, bool bOnlyVisible = true );
+ static SfxViewShell* GetFirst( bool bOnlyVisible = true, std::function<bool ( const SfxViewShell* )> isViewShell = nullptr );
static SfxViewShell* GetNext( const SfxViewShell& rPrev,
- const TypeId* pType = 0, bool bOnlyVisible = true );
+ bool bOnlyVisible = true,
+ std::function<bool ( const SfxViewShell* )> isViewShell = nullptr );
static SfxViewShell* Current();
static SfxViewShell* Get( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController>& i_rController );