summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/basidesh.cxx9
-rw-r--r--include/sfx2/viewsh.hxx21
-rw-r--r--sc/source/ui/view/prevwsh.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx2
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx4
-rw-r--r--sfx2/source/view/viewimp.hxx2
-rw-r--r--sfx2/source/view/viewsh.cxx17
-rw-r--r--starmath/source/view.cxx2
-rw-r--r--sw/source/uibase/uiview/pview.cxx2
-rw-r--r--sw/source/uibase/uiview/srcview.cxx3
-rw-r--r--sw/source/uibase/uiview/view.cxx3
11 files changed, 31 insertions, 36 deletions
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index 604a6a83e2d4..0f234ee41347 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -143,17 +143,10 @@ void basctl_Shell::InitInterface_Impl()
GetStaticInterface()->RegisterPopupMenu(IDEResId(RID_POPUP_DLGED));
}
-namespace
-{
-
-unsigned const ShellFlags = SFX_VIEW_CAN_PRINT | SFX_VIEW_NO_NEWWINDOW;
-
-}
-
unsigned Shell::nShellCount = 0;
Shell::Shell( SfxViewFrame* pFrame_, SfxViewShell* /* pOldShell */ ) :
- SfxViewShell( pFrame_, ShellFlags ),
+ SfxViewShell( pFrame_, SfxViewShellFlags::CAN_PRINT | SfxViewShellFlags::NO_NEWWINDOW ),
m_aCurDocument( ScriptDocument::getApplicationScriptDocument() ),
aHScrollBar( &GetViewFrame()->GetWindow(), WinBits( WB_HSCROLL | WB_DRAG ) ),
aVScrollBar( &GetViewFrame()->GetWindow(), WinBits( WB_VSCROLL | WB_DRAG ) ),
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index 08d3682e8986..5acc75a22414 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -89,13 +89,18 @@ namespace o3tl
// @[SfxViewShell-Flags]
-#define SFX_VIEW_HAS_PRINTOPTIONS 0x0010 /* Options-Button and Options-
- Dialog in PrintDialog */
-#define SFX_VIEW_CAN_PRINT 0x0020 /* Printing enabled without having
- to create a Printer */
-#define SFX_VIEW_NO_SHOW 0x0040 /* Window of the ViewShell shall
- not be showed automatically */
-#define SFX_VIEW_NO_NEWWINDOW 0x0100 /* Allow N View */
+enum class SfxViewShellFlags
+{
+ NONE = 0x0000,
+ HAS_PRINTOPTIONS = 0x0010, /* Options-Button and Options-Dialog in PrintDialog */
+ CAN_PRINT = 0x0020, /* Printing enabled without having to create a Printer */
+ NO_SHOW = 0x0040, /* Window of the ViewShell shall not be showed automatically */
+ NO_NEWWINDOW = 0x0100, /* Allow N View */
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SfxViewShellFlags> : is_typed_flags<SfxViewShellFlags, 0x0170> {};
+}
/* [Description]
@@ -174,7 +179,7 @@ private:
public:
- SfxViewShell( SfxViewFrame *pFrame, sal_uInt16 nFlags = 0 );
+ SfxViewShell( SfxViewFrame *pFrame, SfxViewShellFlags nFlags = SfxViewShellFlags::NONE );
virtual ~SfxViewShell();
SfxInPlaceClient* GetIPClient() const;
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 29398d4fdc13..9760de2aa91f 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -149,7 +149,7 @@ void ScPreviewShell::Construct( vcl::Window* pParent )
ScPreviewShell::ScPreviewShell( SfxViewFrame* pViewFrame,
SfxViewShell* pOldSh ) :
- SfxViewShell( pViewFrame, SFX_VIEW_CAN_PRINT | SFX_VIEW_HAS_PRINTOPTIONS ),
+ SfxViewShell( pViewFrame, SfxViewShellFlags::CAN_PRINT | SfxViewShellFlags::HAS_PRINTOPTIONS ),
pDocShell( static_cast<ScDocShell*>(pViewFrame->GetObjectShell()) ),
mpFrameWindow(NULL),
nSourceDesignMode( SC_FORCEMODE_NONE ),
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index b62648ec3840..360e23b1e03b 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1647,7 +1647,7 @@ void ScTabViewShell::Construct( sal_uInt8 nForceDesignMode )
ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame,
SfxViewShell* pOldSh ) :
- SfxViewShell( pViewFrame, SFX_VIEW_CAN_PRINT | SFX_VIEW_HAS_PRINTOPTIONS ),
+ SfxViewShell( pViewFrame, SfxViewShellFlags::CAN_PRINT | SfxViewShellFlags::HAS_PRINTOPTIONS ),
ScDBFunc( &pViewFrame->GetWindow(), static_cast<ScDocShell&>(*pViewFrame->GetObjectShell()), this ),
eCurOST(OST_NONE),
nDrawSfxId(0),
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 7f55add6c3fd..480262f97e5f 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -231,8 +231,8 @@ ViewShellBase::ViewShellBase (
SfxViewFrame* _pFrame,
SfxViewShell*)
: SfxViewShell (_pFrame,
- SFX_VIEW_CAN_PRINT
- | SFX_VIEW_HAS_PRINTOPTIONS),
+ SfxViewShellFlags::CAN_PRINT
+ | SfxViewShellFlags::HAS_PRINTOPTIONS),
maMutex(),
mpImpl(),
mpDocShell (NULL),
diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx
index 5d1e8487139a..43b25d045eca 100644
--- a/sfx2/source/view/viewimp.hxx
+++ b/sfx2/source/view/viewimp.hxx
@@ -65,7 +65,7 @@ struct SfxViewShell_Impl
mutable SfxInPlaceClientList* mpIPClientList;
- SfxViewShell_Impl(sal_uInt16 const nFlags);
+ SfxViewShell_Impl(SfxViewShellFlags const nFlags);
~SfxViewShell_Impl();
SfxInPlaceClientList* GetIPClientList_Impl( bool bCreate = true ) const;
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index af454dd5ab66..111b09c60619 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -297,15 +297,14 @@ public:
size_t size() const { return maData.size(); }
};
-SfxViewShell_Impl::SfxViewShell_Impl(sal_uInt16 const nFlags)
+SfxViewShell_Impl::SfxViewShell_Impl(SfxViewShellFlags const nFlags)
: aInterceptorContainer( aMutex )
, m_bControllerSet(false)
, m_nPrinterLocks(0)
-, m_bCanPrint(SFX_VIEW_CAN_PRINT == (nFlags & SFX_VIEW_CAN_PRINT))
-, m_bHasPrintOptions(
- SFX_VIEW_HAS_PRINTOPTIONS == (nFlags & SFX_VIEW_HAS_PRINTOPTIONS))
+, m_bCanPrint(nFlags & SfxViewShellFlags::CAN_PRINT)
+, m_bHasPrintOptions(nFlags & SfxViewShellFlags::HAS_PRINTOPTIONS)
, m_bPlugInsActive(true)
-, m_bIsShowView(SFX_VIEW_NO_SHOW != (nFlags & SFX_VIEW_NO_SHOW))
+, m_bIsShowView(!(nFlags & SfxViewShellFlags::NO_SHOW))
, m_bGotOwnership(false)
, m_bGotFrameOwnership(false)
, m_nFamily(0xFFFF) // undefined, default set by TemplateDialog
@@ -1247,9 +1246,9 @@ void SfxViewShell::SetWindow
SfxViewShell::SfxViewShell
(
- SfxViewFrame* pViewFrame, /* <SfxViewFrame>, which will be
- displayed in this View */
- sal_uInt16 nFlags /* See <SfxViewShell-Flags> */
+ SfxViewFrame* pViewFrame, /* <SfxViewFrame>, which will be
+ displayed in this View */
+ SfxViewShellFlags nFlags /* See <SfxViewShell-Flags> */
)
: SfxShell(this)
@@ -1257,7 +1256,7 @@ SfxViewShell::SfxViewShell
, pFrame(pViewFrame)
, pSubShell(0)
, pWindow(0)
-, bNoNewWindow( 0 != (nFlags & SFX_VIEW_NO_NEWWINDOW) )
+, bNoNewWindow( nFlags & SfxViewShellFlags::NO_NEWWINDOW )
{
if ( pViewFrame->GetParentViewFrame() )
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 5635f3c4e77d..8a8eb2d53a47 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1938,7 +1938,7 @@ void SmViewShell::GetState(SfxItemSet &rSet)
SmViewShell::SmViewShell(SfxViewFrame *pFrame_, SfxViewShell *)
- : SfxViewShell(pFrame_, SFX_VIEW_HAS_PRINTOPTIONS | SFX_VIEW_CAN_PRINT)
+ : SfxViewShell(pFrame_, SfxViewShellFlags::HAS_PRINTOPTIONS | SfxViewShellFlags::CAN_PRINT)
, pImpl(new SmViewShell_Impl)
, aGraphic(this)
, aGraphicController(aGraphic, SID_GAPHIC_SM, pFrame_->GetBindings())
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index fa80f75052a0..973cc9114358 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -101,7 +101,7 @@ void SwPagePreview::InitInterface_Impl()
TYPEINIT1(SwPagePreview,SfxViewShell)
-#define SWVIEWFLAGS ( SFX_VIEW_CAN_PRINT|SFX_VIEW_HAS_PRINTOPTIONS )
+#define SWVIEWFLAGS ( SfxViewShellFlags::CAN_PRINT | SfxViewShellFlags::HAS_PRINTOPTIONS )
#define MIN_PREVIEW_ZOOM 25
#define MAX_PREVIEW_ZOOM 600
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index 558210728968..48989d5b3ce0 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -98,8 +98,7 @@ using namespace ::com::sun::star::ui::dialogs;
using namespace ::sfx2;
using ::com::sun::star::util::SearchOptions;
-#define SWSRCVIEWFLAGS ( SFX_VIEW_CAN_PRINT|\
- SFX_VIEW_NO_NEWWINDOW )
+#define SWSRCVIEWFLAGS ( SfxViewShellFlags::CAN_PRINT | SfxViewShellFlags::NO_NEWWINDOW )
#define SRC_SEARCHOPTIONS (0xFFFF & ~(SEARCH_OPTIONS_FORMAT|SEARCH_OPTIONS_FAMILIES|SEARCH_OPTIONS_SEARCH_ALL))
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index bc929053961c..16e497b5c848 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -119,8 +119,7 @@ using namespace ::com::sun::star::scanner;
extern bool g_bNoInterrupt; // in swmodule.cxx
-#define SWVIEWFLAGS ( SFX_VIEW_CAN_PRINT| \
- SFX_VIEW_HAS_PRINTOPTIONS)
+#define SWVIEWFLAGS ( SfxViewShellFlags::CAN_PRINT | SfxViewShellFlags::HAS_PRINTOPTIONS)
// Statics. OMG.