diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-27 09:37:41 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-27 11:14:26 +0200 |
commit | 66854d697f973f36e1b878080999901e0936dae6 (patch) | |
tree | 118776c3cda5bbeb59ece7d9b33686a5a4163fc6 | |
parent | 9e3b1236b68069016d646b5682ce541335b5340c (diff) |
convert WINDOW_DRAW flags to scoped enum
Change-Id: I9400a286fab18d683b4c109007961685f01b6da3
50 files changed, 179 insertions, 172 deletions
diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx index 03d708752ae5..b775f64ebaf8 100644 --- a/forms/source/richtext/richtextcontrol.cxx +++ b/forms/source/richtext/richtextcontrol.cxx @@ -359,7 +359,7 @@ namespace frm if ( eTargetUnit != MAP_PIXEL ) aPos = pTargetDevice->PixelToLogic( aPos ); - pControl->Draw( pTargetDevice, aPos, aSize, WINDOW_DRAW_NOCONTROLS ); + pControl->Draw( pTargetDevice, aPos, aSize, DrawFlags::NoControls ); } diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx index bc4a6292d48c..a37190d987ad 100644 --- a/forms/source/richtext/richtextimplcontrol.cxx +++ b/forms/source/richtext/richtextimplcontrol.cxx @@ -569,7 +569,7 @@ namespace frm } - void RichTextControlImpl::Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, sal_uLong /*_nFlags*/ ) + void RichTextControlImpl::Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, DrawFlags /*_nFlags*/ ) { // need to normalize the map mode of the device - every paint operation on any device needs // to use the same map mode diff --git a/forms/source/richtext/richtextimplcontrol.hxx b/forms/source/richtext/richtextimplcontrol.hxx index ce4f22179d53..aba1e061288b 100644 --- a/forms/source/richtext/richtextimplcontrol.hxx +++ b/forms/source/richtext/richtextimplcontrol.hxx @@ -142,7 +142,7 @@ namespace frm bool GetHideInactiveSelection() const; /// draws the control onto a given output device - void Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, sal_uLong _nFlags ); + void Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, DrawFlags _nFlags ); /// handles command events arrived at the anti-impl control long HandleCommand( const CommandEvent& _rEvent ); diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx index 80481370836e..a444551929bf 100644 --- a/forms/source/richtext/richtextvclcontrol.cxx +++ b/forms/source/richtext/richtextvclcontrol.cxx @@ -296,7 +296,7 @@ namespace frm } - void RichTextControl::Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, sal_uLong _nFlags ) + void RichTextControl::Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, DrawFlags _nFlags ) { m_pImpl->Draw( _pDev, _rPos, _rSize, _nFlags ); } diff --git a/forms/source/richtext/richtextvclcontrol.hxx b/forms/source/richtext/richtextvclcontrol.hxx index b5532ca4bc0f..7abdcf5ea049 100644 --- a/forms/source/richtext/richtextvclcontrol.hxx +++ b/forms/source/richtext/richtextvclcontrol.hxx @@ -100,7 +100,7 @@ namespace frm EditView& getView(); // Window overridables - virtual void Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, sal_uLong _nFlags ) SAL_OVERRIDE; + virtual void Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, DrawFlags _nFlags ) SAL_OVERRIDE; protected: // Window overridables diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx index 6c3465544e4c..8da492530b1c 100644 --- a/include/svtools/brwbox.hxx +++ b/include/svtools/brwbox.hxx @@ -436,7 +436,7 @@ public: virtual void GetFocus() SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE; - virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; + virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) SAL_OVERRIDE; virtual void Command( const CommandEvent& rEvt ) SAL_OVERRIDE; virtual void StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) SAL_OVERRIDE; diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx index 5fdfc3758b7b..2e4bac86f2ee 100644 --- a/include/svtools/editbrowsebox.hxx +++ b/include/svtools/editbrowsebox.hxx @@ -291,7 +291,7 @@ namespace svt virtual void GetFocus() SAL_OVERRIDE; virtual bool PreNotify(NotifyEvent& rEvt) SAL_OVERRIDE; virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rClientRect) SAL_OVERRIDE; - virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; + virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) SAL_OVERRIDE; virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE; virtual void DataChanged( const DataChangedEvent& _rEvent ) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; diff --git a/include/svtools/filectrl.hxx b/include/svtools/filectrl.hxx index 8f6abd2591a3..a0340b86be8b 100644 --- a/include/svtools/filectrl.hxx +++ b/include/svtools/filectrl.hxx @@ -83,7 +83,7 @@ public: Edit& GetEdit() { return *maEdit.get(); } PushButton& GetButton() { return *maButton.get(); } - void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; + void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) SAL_OVERRIDE; void SetOpenDialog( bool bOpen ) { mbOpenDlg = bOpen; } bool IsOpenDialog() const { return mbOpenDlg; } diff --git a/include/svtools/headbar.hxx b/include/svtools/headbar.hxx index 9feeaa2500da..77d9bed41d6c 100644 --- a/include/svtools/headbar.hxx +++ b/include/svtools/headbar.hxx @@ -272,7 +272,7 @@ private: SVT_DLLPRIVATE sal_uInt16 ImplHitTest( const Point& rPos, long& nMouseOff, sal_uInt16& nPos ) const; SVT_DLLPRIVATE void ImplInvertDrag( sal_uInt16 nStartPos, sal_uInt16 nEndPos ); SVT_DLLPRIVATE void ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHigh, bool bDrag, - const Rectangle& rItemRect, const Rectangle* pRect, sal_uLong nFlags); + const Rectangle& rItemRect, const Rectangle* pRect, DrawFlags nFlags); SVT_DLLPRIVATE void ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHigh = false, bool bDrag = false, const Rectangle* pRect = NULL); SVT_DLLPRIVATE void ImplUpdate( sal_uInt16 nPos, @@ -292,7 +292,7 @@ public: virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void Tracking( const TrackingEvent& rTEvt ) SAL_OVERRIDE; virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) SAL_OVERRIDE; - virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; + virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; virtual void Command( const CommandEvent& rCEvt ) SAL_OVERRIDE; virtual void RequestHelp( const HelpEvent& rHEvt ) SAL_OVERRIDE; diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx index 6c79094ee6ef..183b2b1ba6b2 100644 --- a/include/vcl/button.hxx +++ b/include/vcl/button.hxx @@ -49,9 +49,9 @@ private: public: SAL_DLLPRIVATE DrawButtonFlags ImplGetButtonState() const; SAL_DLLPRIVATE DrawButtonFlags& ImplGetButtonState(); - SAL_DLLPRIVATE DrawTextFlags ImplGetTextStyle( OUString& rText, WinBits nWinStyle, sal_uLong nDrawFlags ); + SAL_DLLPRIVATE DrawTextFlags ImplGetTextStyle( OUString& rText, WinBits nWinStyle, DrawFlags nDrawFlags ); SAL_DLLPRIVATE void ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, Size& rSize, - bool bLayout, sal_uLong nImageSep, sal_uLong nDrawFlags, + bool bLayout, sal_uLong nImageSep, DrawFlags nDrawFlags, DrawTextFlags nTextStyle, Rectangle *pSymbolRect=NULL, bool bAddImageSep = false ); SAL_DLLPRIVATE void ImplSetFocusRect( const Rectangle &rFocusRect ); SAL_DLLPRIVATE const Rectangle& ImplGetFocusRect() const; @@ -126,11 +126,11 @@ protected: SAL_DLLPRIVATE void ImplInitPushButtonData(); SAL_DLLPRIVATE WinBits ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle ); SAL_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); - SAL_DLLPRIVATE void ImplDrawPushButtonContent(OutputDevice* pDev, sal_uLong nDrawFlags, + SAL_DLLPRIVATE void ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFlags, const Rectangle& rRect, bool bLayout, bool bMenuBtnSep); SAL_DLLPRIVATE void ImplDrawPushButton(vcl::RenderContext& rRenderContext, bool bLayout = false); using Button::ImplGetTextStyle; - SAL_DLLPRIVATE DrawTextFlags ImplGetTextStyle( sal_uLong nDrawFlags ) const; + SAL_DLLPRIVATE DrawTextFlags ImplGetTextStyle( DrawFlags nDrawFlags ) const; SAL_DLLPRIVATE bool IsSymbol() const { return ( (meSymbol != SymbolType::DONTKNOW) && (meSymbol != SymbolType::IMAGE) ); } SAL_DLLPRIVATE bool IsImage() const { return Button::HasImage(); } @@ -165,7 +165,7 @@ public: virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE; virtual void KeyUp( const KeyEvent& rKEvt ) SAL_OVERRIDE; virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE; - virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; + virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; virtual void GetFocus() SAL_OVERRIDE; virtual void LoseFocus() SAL_OVERRIDE; @@ -298,7 +298,7 @@ private: SAL_DLLPRIVATE WinBits ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle ); SAL_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); SAL_DLLPRIVATE void ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext); - SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, + SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, const Point& rPos, const Size& rSize, const Size& rImageSize, Rectangle& rStateRect, Rectangle& rMouseRect, bool bLayout = false ); @@ -347,7 +347,7 @@ public: virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE; virtual void KeyUp( const KeyEvent& rKEvt ) SAL_OVERRIDE; virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE; - virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; + virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; virtual void GetFocus() SAL_OVERRIDE; virtual void LoseFocus() SAL_OVERRIDE; @@ -426,7 +426,7 @@ private: SAL_DLLPRIVATE void ImplInitCheckBoxData(); SAL_DLLPRIVATE WinBits ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle ); SAL_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); - SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, + SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, const Point& rPos, const Size& rSize, const Size& rImageSize, Rectangle& rStateRect, Rectangle& rMouseRect, bool bLayout ); @@ -462,7 +462,7 @@ public: virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE; virtual void KeyUp( const KeyEvent& rKEvt ) SAL_OVERRIDE; virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE; - virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; + virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; virtual void GetFocus() SAL_OVERRIDE; virtual void LoseFocus() SAL_OVERRIDE; diff --git a/include/vcl/combobox.hxx b/include/vcl/combobox.hxx index 50058fd2eaa7..87e2b92a4dc4 100644 --- a/include/vcl/combobox.hxx +++ b/include/vcl/combobox.hxx @@ -94,7 +94,7 @@ public: virtual ~ComboBox(); virtual void dispose() SAL_OVERRIDE; - virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; + virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE; diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx index 2dc4cc38ee49..8afe77480082 100644 --- a/include/vcl/dialog.hxx +++ b/include/vcl/dialog.hxx @@ -71,7 +71,7 @@ public: protected: explicit Dialog( WindowType nType ); explicit Dialog( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription, WindowType nType, InitFlag eFlag = InitFlag::Default ); - virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; + virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) SAL_OVERRIDE; virtual void settingOptimalLayoutSize(Window *pBox) SAL_OVERRIDE; protected: diff --git a/include/vcl/edit.hxx b/include/vcl/edit.hxx index 634722e2c13e..a116a1e332b3 100644 --- a/include/vcl/edit.hxx +++ b/include/vcl/edit.hxx @@ -178,7 +178,7 @@ public: virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE; virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; - virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; + virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) SAL_OVERRIDE; virtual void GetFocus() SAL_OVERRIDE; virtual void LoseFocus() SAL_OVERRIDE; virtual void Tracking( const TrackingEvent& rTEvt ) SAL_OVERRIDE; diff --git a/include/vcl/fixed.hxx b/include/vcl/fixed.hxx index fc455d82ef65..cfc759007663 100644 --- a/include/vcl/fixed.hxx +++ b/include/vcl/fixed.hxx @@ -44,7 +44,7 @@ private: using Window::ImplInit; SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle ); SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle ); - SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, + SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, const Point& rPos, const Size& rSize, bool bFillLayout = false ) const; public: SAL_DLLPRIVATE static DrawTextFlags ImplGetTextStyle( WinBits nWinBits ); @@ -66,7 +66,7 @@ public: virtual void ApplySettings(vcl::RenderContext& rRenderContext) SAL_OVERRIDE; virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE; - virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; + virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; virtual void StateChanged( StateChangedType nType ) SAL_OVERRIDE; virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; @@ -120,7 +120,7 @@ public: virtual void ApplySettings(vcl::RenderContext&) SAL_OVERRIDE; virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE; - virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; + virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; virtual void StateChanged( StateChangedType nType ) SAL_OVERRIDE; virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; @@ -138,7 +138,7 @@ private: using Window::ImplInit; SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle ); SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle ); - SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, + SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, const Point& rPos, const Size& rSize ); public: @@ -147,7 +147,7 @@ public: virtual void ApplySettings(vcl::RenderContext&) SAL_OVERRIDE; virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE; - virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; + virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; virtual void StateChanged( StateChangedType nType ) SAL_OVERRIDE; virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; @@ -174,7 +174,7 @@ private: SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle ); protected: - SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, + SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, const Point& rPos, const Size& rSize ); SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); @@ -185,7 +185,7 @@ public: virtual void ApplySettings(vcl::RenderContext&) SAL_OVERRIDE; virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE; - virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; + virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; virtual void StateChanged( StateChangedType nType ) SAL_OVERRIDE; virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; diff --git a/include/vcl/group.hxx b/include/vcl/group.hxx index ec2e119b6135..cacf2d3a6767 100644 --- a/include/vcl/group.hxx +++ b/include/vcl/group.hxx @@ -36,7 +36,7 @@ private: SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle ); SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle ); SAL_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); - SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, + SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, const Point& rPos, const Size& rSize, bool bLayout = false ); virtual void FillLayoutData() const SAL_OVERRIDE; @@ -49,7 +49,7 @@ public: explicit GroupBox( vcl::Window* pParent, WinBits nStyle = 0 ); virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE; - virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; + virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; virtual void StateChanged( StateChangedType nType ) SAL_OVERRIDE; virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; diff --git a/include/vcl/imgctrl.hxx b/include/vcl/imgctrl.hxx index 79f0780dd038..6f7121f7a638 100644 --- a/include/vcl/imgctrl.hxx +++ b/include/vcl/imgctrl.hxx @@ -42,13 +42,13 @@ public: ::sal_Int16 GetScaleMode() const { return mnScaleMode; } virtual void Resize() SAL_OVERRIDE; - virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; + virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) SAL_OVERRIDE; virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE; virtual void GetFocus() SAL_OVERRIDE; virtual void LoseFocus() SAL_OVERRIDE; protected: - void ImplDraw( OutputDevice& rDev, sal_uLong nDrawFlags, const Point& rPos, const Size& rSize ) const; + void ImplDraw( OutputDevice& rDev, DrawFlags nDrawFlags, const Point& rPos, const Size& rSize ) const; }; #endif // INCLUDED_VCL_IMGCTRL_HXX diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx index 8a5efc5bc853..1197e686bff7 100644 --- a/include/vcl/lstbox.hxx +++ b/include/vcl/lstbox.hxx @@ -86,7 +86,7 @@ public: virtual void dispose() SAL_OVERRIDE; virtual void ApplySettings(vcl::RenderContext& rRenderContext) SAL_OVERRIDE; - virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; + virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; virtual void StateChanged( StateChangedType nType ) SAL_OVERRIDE; diff --git a/include/vcl/scrbar.hxx b/include/vcl/scrbar.hxx index 0bc0d2276675..1c3c63f8fd2d 100644 --- a/include/vcl/scrbar.hxx +++ b/include/vcl/scrbar.hxx @@ -97,7 +97,7 @@ public: virtual void Tracking(const TrackingEvent& rTEvt) SAL_OVERRIDE; virtual void KeyInput(const KeyEvent& rKEvt) SAL_OVERRIDE; virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) SAL_OVERRIDE; - virtual void Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags) SAL_OVERRIDE; + virtual void Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; virtual void StateChanged(StateChangedType nType) SAL_OVERRIDE; virtual void DataChanged(const DataChangedEvent& rDCEvt) SAL_OVERRIDE; diff --git a/include/vcl/spin.hxx b/include/vcl/spin.hxx index 48c8b4e9463c..c97b1b11a0e7 100644 --- a/include/vcl/spin.hxx +++ b/include/vcl/spin.hxx @@ -63,7 +63,7 @@ public: virtual void Resize() SAL_OVERRIDE; virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE; - virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; + virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) SAL_OVERRIDE; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE; diff --git a/include/vcl/spinfld.hxx b/include/vcl/spinfld.hxx index bf4879b52425..9c2efcb3d8ad 100644 --- a/include/vcl/spinfld.hxx +++ b/include/vcl/spinfld.hxx @@ -83,7 +83,7 @@ public: virtual void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE; - virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; + virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; virtual void StateChanged( StateChangedType nType ) SAL_OVERRIDE; virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; diff --git a/include/vcl/tabpage.hxx b/include/vcl/tabpage.hxx index 86a81cbd62e9..6a022f858dff 100644 --- a/include/vcl/tabpage.hxx +++ b/include/vcl/tabpage.hxx @@ -45,7 +45,7 @@ public: virtual void dispose() SAL_OVERRIDE; virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE; - virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; + virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) SAL_OVERRIDE; virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE; virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; diff --git a/include/vcl/vclmedit.hxx b/include/vcl/vclmedit.hxx index d7eb4807b1c6..54165218ae85 100644 --- a/include/vcl/vclmedit.hxx +++ b/include/vcl/vclmedit.hxx @@ -123,7 +123,7 @@ public: Size CalcBlockSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const; void GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const; - void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; + void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) SAL_OVERRIDE; void SetLeftMargin( sal_uInt16 n ); diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index ec12c25b496b..8caf63f1c390 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -337,16 +337,24 @@ enum class StateChangedType : sal_uInt16 #define GETFOCUS_FLOATWIN_POPUPMODEEND_CANCEL ((sal_uInt16)0x0400) -// Draw-Flags fuer Draw() -#define WINDOW_DRAW_MONO ((sal_uLong)0x00000001) -#define WINDOW_DRAW_NOBORDER ((sal_uLong)0x00000002) -#define WINDOW_DRAW_NOCONTROLS ((sal_uLong)0x00000004) -#define WINDOW_DRAW_NODISABLE ((sal_uLong)0x00000008) -#define WINDOW_DRAW_NOMNEMONIC ((sal_uLong)0x00000010) -#define WINDOW_DRAW_NOSELECTION ((sal_uLong)0x00000020) -#define WINDOW_DRAW_NOFOCUS ((sal_uLong)0x00000040) -#define WINDOW_DRAW_NOBACKGROUND ((sal_uLong)0x00000080) -#define WINDOW_DRAW_ROLLOVER ((sal_uLong)0x00000100) +// Flags for Draw() +enum class DrawFlags +{ + NONE = 0x0000, + Mono = 0x0001, + NoBorder = 0x0002, + NoControls = 0x0004, + NoDisable = 0x0008, + NoMnemonic = 0x0010, + NoSelection = 0x0020, + NoFocus = 0x0040, + NoBackground = 0x0080, + NoRollover = 0x0100, +}; +namespace o3tl +{ + template<> struct typed_flags<DrawFlags> : is_typed_flags<DrawFlags, 0x01ff> {}; +} // DialogControl-Flags enum class DialogControlFlags @@ -826,7 +834,7 @@ public: OutputDevice::Erase(rRect); } - virtual void Draw( ::OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ); + virtual void Draw( ::OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ); virtual void Move(); virtual void Resize(); virtual void Activate(); diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index 1fa03aa9f59d..ff53f441b32a 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -701,9 +701,9 @@ void BrowseBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect -void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) +void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) { - bool bDrawSelection = (nFlags & WINDOW_DRAW_NOSELECTION) == 0; + bool bDrawSelection = !(nFlags & DrawFlags::NoSelection); // we need pixel coordinates Size aRealSize = pDev->LogicToPixel(rSize); @@ -815,7 +815,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, pDev->SetClipRegion( pDev->PixelToLogic( aRegion ) ); // do we have to paint the background - bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && GetDataWindow().IsControlBackground(); + bool bBackground = !(nFlags & DrawFlags::NoBackground) && GetDataWindow().IsControlBackground(); if ( bBackground ) { Rectangle aRect( aRealPos, aRealSize ); diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx index a23e325f1bcb..e55b90d0c123 100644 --- a/svtools/source/brwbox/ebbcontrols.cxx +++ b/svtools/source/brwbox/ebbcontrols.cxx @@ -288,7 +288,7 @@ namespace svt } - void CheckBoxControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) + void CheckBoxControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) { pBox->Draw(pDev,rPos,rSize,nFlags); } diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx index ab07a4a7b688..ab520bf4730b 100644 --- a/svtools/source/control/filectrl.cxx +++ b/svtools/source/control/filectrl.cxx @@ -205,7 +205,7 @@ void FileControl::SetEditModifyHdl( const Link<>& rLink ) maEdit->SetModifyHdl(rLink); } -void FileControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) +void FileControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) { WinBits nOldEditStyle = GetEdit().GetStyle(); if ( GetStyle() & WB_BORDER ) diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx index 87e9f5831455..68a435e001c5 100644 --- a/svtools/source/control/headbar.cxx +++ b/svtools/source/control/headbar.cxx @@ -278,7 +278,7 @@ void HeaderBar::ImplInvertDrag( sal_uInt16 nStartPos, sal_uInt16 nEndPos ) } void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHigh, bool bDrag, - const Rectangle& rItemRect, const Rectangle* pRect, sal_uLong ) + const Rectangle& rItemRect, const Rectangle* pRect, DrawFlags ) { ImplControlValue aControlValue(0); Rectangle aCtrlRegion; @@ -619,7 +619,7 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos bool bHigh, bool bDrag, const Rectangle* pRect ) { Rectangle aRect = ImplGetItemRect(nPos); - ImplDrawItem(rRenderContext, nPos, bHigh, bDrag, aRect, pRect, 0 ); + ImplDrawItem(rRenderContext, nPos, bHigh, bDrag, aRect, pRect, DrawFlags::NONE ); } void HeaderBar::ImplUpdate(sal_uInt16 nPos, bool bEnd, bool /*bDirect*/) @@ -947,7 +947,7 @@ void HeaderBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect } void HeaderBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, - sal_uLong nFlags ) + DrawFlags nFlags ) { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); @@ -957,13 +957,13 @@ void HeaderBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, pDev->Push(); pDev->SetMapMode(); pDev->SetFont( aFont ); - if ( nFlags & WINDOW_DRAW_MONO ) + if ( nFlags & DrawFlags::Mono ) pDev->SetTextColor( Color( COL_BLACK ) ); else pDev->SetTextColor( GetTextColor() ); pDev->SetTextFillColor(); - if ( !(nFlags & WINDOW_DRAW_NOBACKGROUND) ) + if ( !(nFlags & DrawFlags::NoBackground) ) { pDev->DrawWallpaper( aRect, GetBackground() ); if ( mnBorderOff1 || mnBorderOff2 ) diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 52b828926c16..27763ce1a67f 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -992,7 +992,7 @@ void DbCellControl::PaintCell( OutputDevice& _rDev, const Rectangle& _rRect ) m_pPainter->SetParentUpdateMode( true ); } else - m_pPainter->Draw( &_rDev, _rRect.TopLeft(), _rRect.GetSize(), 0 ); + m_pPainter->Draw( &_rDev, _rRect.TopLeft(), _rRect.GetSize(), DrawFlags::NONE ); } diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx index 9514ac0eca90..e438ed0a76a7 100644 --- a/sw/inc/SidebarWin.hxx +++ b/sw/inc/SidebarWin.hxx @@ -177,7 +177,7 @@ class SwSidebarWin : public vcl::Window void ChangeSidebarItem( SwSidebarItem& rSidebarItem ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible() SAL_OVERRIDE; - virtual void Draw(OutputDevice* pDev, const Point&, const Size&, sal_uLong) SAL_OVERRIDE; + virtual void Draw(OutputDevice* pDev, const Point&, const Size&, DrawFlags) SAL_OVERRIDE; protected: virtual void DataChanged( const DataChangedEvent& aEvent) SAL_OVERRIDE; diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index 727a9bb050ac..44185b4884fb 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -843,7 +843,7 @@ void SwPostItMgr::DrawNotesForPage(OutputDevice *pOutDev, sal_uInt32 nPage) continue; Point aPoint(mpEditWin->PixelToLogic(pPostIt->GetPosPixel())); Size aSize(pPostIt->PixelToLogic(pPostIt->GetSizePixel())); - pPostIt->Draw(pOutDev, aPoint, aSize, 0); + pPostIt->Draw(pOutDev, aPoint, aSize, DrawFlags::NONE); } } diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index 6524ad61ed24..3d6be4699168 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -126,7 +126,7 @@ void SidebarTextControl::RequestHelp(const HelpEvent &rEvt) } } -void SidebarTextControl::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, sal_uLong) +void SidebarTextControl::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, DrawFlags) { //Take the control's height, but overwrite the scrollbar area if there was one Size aSize(PixelToLogic(GetSizePixel())); diff --git a/sw/source/uibase/docvw/SidebarTxtControl.hxx b/sw/source/uibase/docvw/SidebarTxtControl.hxx index 1a6d6677cd43..52305191a277 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.hxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.hxx @@ -68,7 +68,7 @@ class SidebarTextControl : public Control virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible() SAL_OVERRIDE; - virtual void Draw(OutputDevice* pDev, const Point&, const Size&, sal_uLong) SAL_OVERRIDE; + virtual void Draw(OutputDevice* pDev, const Point&, const Size&, DrawFlags) SAL_OVERRIDE; }; } } // end of namespace sw::sidebarwindows diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx index 6b8149650964..28da61c427bf 100644 --- a/sw/source/uibase/docvw/SidebarWin.cxx +++ b/sw/source/uibase/docvw/SidebarWin.cxx @@ -234,7 +234,7 @@ void SwSidebarWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rR } } -void SwSidebarWin::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, sal_uLong nInFlags) +void SwSidebarWin::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, DrawFlags nInFlags) { if (mpMetadataAuthor->IsVisible() ) { diff --git a/toolkit/source/awt/vclxtabpagecontainer.cxx b/toolkit/source/awt/vclxtabpagecontainer.cxx index 7eb39fa623e5..cd2790129380 100644 --- a/toolkit/source/awt/vclxtabpagecontainer.cxx +++ b/toolkit/source/awt/vclxtabpagecontainer.cxx @@ -70,7 +70,7 @@ void SAL_CALL VCLXTabPageContainer::draw( sal_Int32 nX, sal_Int32 nY ) throw(Run aPos = pDev->PixelToLogic( aPos ); aSize = pDev->PixelToLogic( aSize ); - pTabPage->Draw( pDev, aPos, aSize, 0 ); + pTabPage->Draw( pDev, aPos, aSize, DrawFlags::NONE ); } } diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index b2fc478adeb2..f293581c4109 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -2249,7 +2249,7 @@ void VCLXWindow::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno: aPos = pDev->PixelToLogic( aPos ); aSize = pDev->PixelToLogic( aSize ); - pTabPage->Draw( pDev, aPos, aSize, 0 ); + pTabPage->Draw( pDev, aPos, aSize, DrawFlags::NONE ); return; } @@ -2306,7 +2306,7 @@ void VCLXWindow::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno: || ( pPDFExport != NULL ); if ( bDrawSimple ) { - pWindow->Draw( pDev, aP, aSz, WINDOW_DRAW_NOCONTROLS ); + pWindow->Draw( pDev, aP, aSz, DrawFlags::NoControls ); } else { diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 64afdffef4e9..d5fb69ef01ee 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -2359,7 +2359,7 @@ void SAL_CALL VCLXDialog::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::s Size aSize = pDev->PixelToLogic( pWindow->GetSizePixel() ); Point aPos = pDev->PixelToLogic( Point( nX, nY ) ); - pWindow->Draw( pDev, aPos, aSize, WINDOW_DRAW_NOCONTROLS ); + pWindow->Draw( pDev, aPos, aSize, DrawFlags::NoControls ); } } @@ -2492,7 +2492,7 @@ throw(::com::sun::star::uno::RuntimeException, std::exception) Size aSize = pDev->PixelToLogic( pWindow->GetSizePixel() ); Point aPos = pDev->PixelToLogic( Point( nX, nY ) ); - pWindow->Draw( pDev, aPos, aSize, WINDOW_DRAW_NOCONTROLS ); + pWindow->Draw( pDev, aPos, aSize, DrawFlags::NoControls ); } } @@ -2769,7 +2769,7 @@ throw(::com::sun::star::uno::RuntimeException, std::exception) Size aSize = pDev->PixelToLogic( pWindow->GetSizePixel() ); Point aPos = pDev->PixelToLogic( Point( nX, nY ) ); - pWindow->Draw( pDev, aPos, aSize, WINDOW_DRAW_NOCONTROLS ); + pWindow->Draw( pDev, aPos, aSize, DrawFlags::NoControls ); } } @@ -6583,7 +6583,7 @@ throw(::com::sun::star::uno::RuntimeException, std::exception) Size aSize = pDev->PixelToLogic( pWindow->GetSizePixel() ); Point aPos = pDev->PixelToLogic( Point( nX, nY ) ); - pWindow->Draw( pDev, aPos, aSize, WINDOW_DRAW_NOCONTROLS ); + pWindow->Draw( pDev, aPos, aSize, DrawFlags::NoControls ); } } diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 2259b3971599..2ee5d5e13f65 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -210,12 +210,12 @@ void Button::ImplSetSeparatorX( long nX ) mpButtonData->mnSeparatorX = nX; } -DrawTextFlags Button::ImplGetTextStyle(OUString& rText, WinBits nWinStyle, sal_uLong nDrawFlags ) +DrawTextFlags Button::ImplGetTextStyle(OUString& rText, WinBits nWinStyle, DrawFlags nDrawFlags ) { const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); DrawTextFlags nTextStyle = FixedText::ImplGetTextStyle(nWinStyle & ~WB_DEFBUTTON); - if (nDrawFlags & WINDOW_DRAW_NOMNEMONIC) + if (nDrawFlags & DrawFlags::NoMnemonic) { if (nTextStyle & DrawTextFlags::Mnemonic) { @@ -224,13 +224,13 @@ DrawTextFlags Button::ImplGetTextStyle(OUString& rText, WinBits nWinStyle, sal_u } } - if (!(nDrawFlags & WINDOW_DRAW_NODISABLE)) + if (!(nDrawFlags & DrawFlags::NoDisable)) { if (!IsEnabled()) nTextStyle |= DrawTextFlags::Disable; } - if ((nDrawFlags & WINDOW_DRAW_MONO) || + if ((nDrawFlags & DrawFlags::Mono) || (rStyleSettings.GetOptions() & StyleSettingsOptions::Mono)) { nTextStyle |= DrawTextFlags::Mono; @@ -241,7 +241,7 @@ DrawTextFlags Button::ImplGetTextStyle(OUString& rText, WinBits nWinStyle, sal_u void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, Size& rSize, bool bLayout, - sal_uLong nImageSep, sal_uLong nDrawFlags, + sal_uLong nImageSep, DrawFlags nDrawFlags, DrawTextFlags nTextStyle, Rectangle *pSymbolRect, bool bAddImageSep) { @@ -261,7 +261,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, ImageAlign eImageAlign = mpButtonData->meImageAlign; Size aImageSize = mpButtonData->maImage.GetSizePixel(); - if ((nDrawFlags & WINDOW_DRAW_NOMNEMONIC) && + if ((nDrawFlags & DrawFlags::NoMnemonic) && (nTextStyle & DrawTextFlags::Mnemonic)) { aText = GetNonMnemonicString(aText); @@ -491,7 +491,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, DrawImageFlags nStyle = DrawImageFlags::NONE; - if (!(nDrawFlags & WINDOW_DRAW_NODISABLE) && + if (!(nDrawFlags & DrawFlags::NoDisable) && !IsEnabled()) { nStyle |= DrawImageFlags::Disable; @@ -746,14 +746,14 @@ bool PushButton::ImplHitTestPushButton( vcl::Window* pDev, return aTestRect.IsInside( rPos ); } -DrawTextFlags PushButton::ImplGetTextStyle( sal_uLong nDrawFlags ) const +DrawTextFlags PushButton::ImplGetTextStyle( DrawFlags nDrawFlags ) const { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); DrawTextFlags nTextStyle = DrawTextFlags::Mnemonic | DrawTextFlags::MultiLine | DrawTextFlags::EndEllipsis; if ( ( rStyleSettings.GetOptions() & StyleSettingsOptions::Mono ) || - ( nDrawFlags & WINDOW_DRAW_MONO ) ) + ( nDrawFlags & DrawFlags::Mono ) ) nTextStyle |= DrawTextFlags::Mono; if ( GetStyle() & WB_WORDBREAK ) @@ -775,7 +775,7 @@ DrawTextFlags PushButton::ImplGetTextStyle( sal_uLong nDrawFlags ) const else nTextStyle |= DrawTextFlags::VCenter; - if ( ! ( (nDrawFlags & WINDOW_DRAW_NODISABLE) || IsEnabled() ) ) + if ( ! ( (nDrawFlags & DrawFlags::NoDisable) || IsEnabled() ) ) nTextStyle |= DrawTextFlags::Disable; return nTextStyle; @@ -807,7 +807,7 @@ static void ImplDrawBtnDropDownArrow( OutputDevice* pDev, pDev->SetFillColor( aOldFillColor ); } -void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, sal_uLong nDrawFlags, +void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFlags, const Rectangle& rRect, bool bLayout, bool bMenuBtnSep) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -823,20 +823,20 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, sal_uLong nDrawFl pDev->Push( PushFlags::CLIPREGION ); pDev->IntersectClipRegion( aInRect ); - if ( nDrawFlags & WINDOW_DRAW_MONO ) + if ( nDrawFlags & DrawFlags::Mono ) aColor = Color( COL_BLACK ); - else if( (nDrawFlags & WINDOW_DRAW_ROLLOVER) && IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL) ) + else if( (nDrawFlags & DrawFlags::NoRollover) && IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL) ) aColor = rStyleSettings.GetButtonRolloverTextColor(); else if ( IsControlForeground() ) aColor = GetControlForeground(); - else if( nDrawFlags & WINDOW_DRAW_ROLLOVER ) + else if( nDrawFlags & DrawFlags::NoRollover ) aColor = rStyleSettings.GetButtonRolloverTextColor(); else aColor = rStyleSettings.GetButtonTextColor(); pDev->SetTextColor( aColor ); - if ( IsEnabled() || (nDrawFlags & WINDOW_DRAW_NODISABLE) ) + if ( IsEnabled() || (nDrawFlags & DrawFlags::NoDisable) ) nStyle = DrawSymbolFlags::NONE; else nStyle = DrawSymbolFlags::Disable; @@ -902,7 +902,7 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, sal_uLong nDrawFl bool bBlack = false; Color aArrowColor( COL_BLACK ); - if ( !(nDrawFlags & WINDOW_DRAW_MONO) ) + if ( !(nDrawFlags & DrawFlags::Mono) ) { if ( !IsEnabled() ) aArrowColor = rStyleSettings.GetShadowColor(); @@ -1070,7 +1070,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext, bool bLa } // draw content using the same aInRect as non-native VCL would do - ImplDrawPushButtonContent(&rRenderContext, (nState&ControlState::ROLLOVER) ? WINDOW_DRAW_ROLLOVER : 0, + ImplDrawPushButtonContent(&rRenderContext, (nState&ControlState::ROLLOVER) ? DrawFlags::NoRollover : DrawFlags::NONE, aInRect, bLayout, bDrawMenuSep); if (HasFocus()) @@ -1097,7 +1097,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext, bool bLa } // draw content - ImplDrawPushButtonContent(&rRenderContext, 0, aInRect, bLayout, bDrawMenuSep); + ImplDrawPushButtonContent(&rRenderContext, DrawFlags::NONE, aInRect, bLayout, bDrawMenuSep); if (!bLayout && HasFocus()) { @@ -1349,7 +1349,7 @@ void PushButton::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) } void PushButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, - sal_uLong nFlags ) + DrawFlags nFlags ) { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); @@ -1359,7 +1359,7 @@ void PushButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, pDev->Push(); pDev->SetMapMode(); pDev->SetFont( aFont ); - if ( nFlags & WINDOW_DRAW_MONO ) + if ( nFlags & DrawFlags::Mono ) { pDev->SetTextColor( Color( COL_BLACK ) ); } @@ -1381,7 +1381,7 @@ void PushButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DecorationView aDecoView( pDev ); DrawButtonFlags nButtonStyle = DrawButtonFlags::NONE; - if ( nFlags & WINDOW_DRAW_MONO ) + if ( nFlags & DrawFlags::Mono ) nButtonStyle |= DrawButtonFlags::Mono; if ( IsChecked() ) nButtonStyle |= DrawButtonFlags::Checked; @@ -1630,9 +1630,8 @@ Size PushButton::CalcMinimumSize( long nMaxWidth ) const } if ( !PushButton::GetText().isEmpty() && ! (ImplGetButtonState() & DrawButtonFlags::NoText) ) { - sal_uLong nDrawFlags = 0; Size textSize = GetTextRect( Rectangle( Point(), Size( nMaxWidth ? nMaxWidth : 0x7fffffff, 0x7fffffff ) ), - PushButton::GetText(), ImplGetTextStyle( nDrawFlags ) ).GetSize(); + PushButton::GetText(), ImplGetTextStyle( DrawFlags::NONE ) ).GetSize(); aSize.Width() += textSize.Width(); aSize.Height() = std::max( aSize.Height(), long( textSize.Height() * 1.15 ) ); } @@ -1993,7 +1992,7 @@ void RadioButton::ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext) } } -void RadioButton::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, +void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, const Point& rPos, const Size& rSize, const Size& rImageSize, Rectangle& rStateRect, Rectangle& rMouseRect, bool bLayout ) @@ -2144,7 +2143,7 @@ void RadioButton::ImplDrawRadioButton(vcl::RenderContext& rRenderContext, bool b aImageSize.Height() = CalcZoom(aImageSize.Height()); // Draw control text - ImplDraw(&rRenderContext, 0, Point(), GetOutputSizePixel(), + ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel(), aImageSize, maStateRect, maMouseRect, bLayout); if (!bLayout || rRenderContext.IsNativeControlSupported(CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL)) @@ -2445,7 +2444,7 @@ void RadioButton::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) } void RadioButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, - sal_uLong nFlags ) + DrawFlags nFlags ) { if ( !maImage ) { @@ -2478,7 +2477,7 @@ void RadioButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize pDev->Push(); pDev->SetMapMode(); pDev->SetFont( aFont ); - if ( nFlags & WINDOW_DRAW_MONO ) + if ( nFlags & DrawFlags::Mono ) pDev->SetTextColor( Color( COL_BLACK ) ); else pDev->SetTextColor( GetTextColor() ); @@ -3072,7 +3071,7 @@ void CheckBox::ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext) } } -void CheckBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, +void CheckBox::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, const Point& rPos, const Size& rSize, const Size& rImageSize, Rectangle& rStateRect, Rectangle& rMouseRect, bool bLayout ) @@ -3184,7 +3183,7 @@ void CheckBox::ImplDrawCheckBox(vcl::RenderContext& rRenderContext, bool bLayout if (!bLayout) HideFocus(); - ImplDraw(&rRenderContext, 0, Point(), GetOutputSizePixel(), + ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel(), aImageSize, maStateRect, maMouseRect, bLayout); if (!bLayout) @@ -3348,7 +3347,7 @@ void CheckBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) } void CheckBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, - sal_uLong nFlags ) + DrawFlags nFlags ) { MapMode aResMapMode( MAP_100TH_MM ); Point aPos = pDev->LogicToPixel( rPos ); @@ -3382,7 +3381,7 @@ void CheckBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, pDev->Push(); pDev->SetMapMode(); pDev->SetFont( aFont ); - if ( nFlags & WINDOW_DRAW_MONO ) + if ( nFlags & DrawFlags::Mono ) pDev->SetTextColor( Color( COL_BLACK ) ); else pDev->SetTextColor( GetTextColor() ); diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index f16fd05ed0f2..4ba8095ace4b 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -1129,7 +1129,7 @@ void ComboBox::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines } } -void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) +void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) { mpImplLB->GetMainWindow()->ApplySettings(*pDev); @@ -1146,8 +1146,8 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, s // Border/Background pDev->SetLineColor(); pDev->SetFillColor(); - bool bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER); - bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground(); + bool bBorder = !(nFlags & DrawFlags::NoBorder ) && (GetStyle() & WB_BORDER); + bool bBackground = !(nFlags & DrawFlags::NoBackground) && IsControlBackground(); if ( bBorder || bBackground ) { Rectangle aRect( aPos, aSize ); @@ -1182,13 +1182,13 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, s else nTextStyle |= DrawTextFlags::Left; - if ( ( nFlags & WINDOW_DRAW_MONO ) || ( eOutDevType == OUTDEV_PRINTER ) ) + if ( ( nFlags & DrawFlags::Mono ) || ( eOutDevType == OUTDEV_PRINTER ) ) { pDev->SetTextColor( Color( COL_BLACK ) ); } else { - if ( !(nFlags & WINDOW_DRAW_NODISABLE ) && !IsEnabled() ) + if ( !(nFlags & DrawFlags::NoDisable ) && !IsEnabled() ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); pDev->SetTextColor( rStyleSettings.GetDisableColor() ); diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index e3079819630b..15cf93d1c179 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -1793,7 +1793,7 @@ void Edit::Resize() } } -void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) +void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); @@ -1808,8 +1808,8 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_u // Border/Background pDev->SetLineColor(); pDev->SetFillColor(); - bool bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER); - bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground(); + bool bBorder = !(nFlags & DrawFlags::NoBorder ) && (GetStyle() & WB_BORDER); + bool bBackground = !(nFlags & DrawFlags::NoBackground) && IsControlBackground(); if ( bBorder || bBackground ) { Rectangle aRect( aPos, aSize ); @@ -1825,11 +1825,11 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_u } // Inhalt - if ( ( nFlags & WINDOW_DRAW_MONO ) || ( eOutDevType == OUTDEV_PRINTER ) ) + if ( ( nFlags & DrawFlags::Mono ) || ( eOutDevType == OUTDEV_PRINTER ) ) pDev->SetTextColor( Color( COL_BLACK ) ); else { - if ( !(nFlags & WINDOW_DRAW_NODISABLE ) && !IsEnabled() ) + if ( !(nFlags & DrawFlags::NoDisable ) && !IsEnabled() ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); pDev->SetTextColor( rStyleSettings.GetDisableColor() ); diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index 92ff28c15aa6..c891061be18c 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -159,7 +159,7 @@ DrawTextFlags FixedText::ImplGetTextStyle( WinBits nWinStyle ) return nTextStyle; } -void FixedText::ImplDraw(OutputDevice* pDev, sal_uLong nDrawFlags, +void FixedText::ImplDraw(OutputDevice* pDev, DrawFlags nDrawFlags, const Point& rPos, const Size& rSize, bool bFillLayout) const { @@ -177,7 +177,7 @@ void FixedText::ImplDraw(OutputDevice* pDev, sal_uLong nDrawFlags, nTextStyle &= ~DrawTextFlags(DrawTextFlags::EndEllipsis | DrawTextFlags::MultiLine | DrawTextFlags::WordBreak); nTextStyle |= DrawTextFlags::PathEllipsis; } - if ( nDrawFlags & WINDOW_DRAW_NOMNEMONIC ) + if ( nDrawFlags & DrawFlags::NoMnemonic ) { if ( nTextStyle & DrawTextFlags::Mnemonic ) { @@ -185,12 +185,12 @@ void FixedText::ImplDraw(OutputDevice* pDev, sal_uLong nDrawFlags, nTextStyle &= ~DrawTextFlags::Mnemonic; } } - if ( !(nDrawFlags & WINDOW_DRAW_NODISABLE) ) + if ( !(nDrawFlags & DrawFlags::NoDisable) ) { if ( !IsEnabled() ) nTextStyle |= DrawTextFlags::Disable; } - if ( (nDrawFlags & WINDOW_DRAW_MONO) || + if ( (nDrawFlags & DrawFlags::Mono) || (rStyleSettings.GetOptions() & StyleSettingsOptions::Mono) ) nTextStyle |= DrawTextFlags::Mono; @@ -230,11 +230,11 @@ void FixedText::ApplySettings(vcl::RenderContext& rRenderContext) void FixedText::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) { - ImplDraw(&rRenderContext, 0, Point(), GetOutputSizePixel()); + ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel()); } void FixedText::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, - sal_uLong nFlags ) + DrawFlags nFlags ) { ApplySettings(*pDev); @@ -245,14 +245,14 @@ void FixedText::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, pDev->Push(); pDev->SetMapMode(); pDev->SetFont( aFont ); - if ( nFlags & WINDOW_DRAW_MONO ) + if ( nFlags & DrawFlags::Mono ) pDev->SetTextColor( Color( COL_BLACK ) ); else pDev->SetTextColor( GetTextColor() ); pDev->SetTextFillColor(); - bool bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER); - bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground(); + bool bBorder = !(nFlags & DrawFlags::NoBorder ) && (GetStyle() & WB_BORDER); + bool bBackground = !(nFlags & DrawFlags::NoBackground) && IsControlBackground(); if ( bBorder || bBackground ) { Rectangle aRect( aPos, aSize ); @@ -386,7 +386,7 @@ Size FixedText::GetOptimalSize() const void FixedText::FillLayoutData() const { mpControlData->mpLayoutData = new vcl::ControlLayoutData(); - ImplDraw(const_cast<FixedText*>(this), 0, Point(), GetOutputSizePixel(), true); + ImplDraw(const_cast<FixedText*>(this), DrawFlags::NONE, Point(), GetOutputSizePixel(), true); //const_cast<FixedText*>(this)->Invalidate(); } @@ -641,7 +641,7 @@ void FixedLine::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) ImplDraw(rRenderContext); } -void FixedLine::Draw( OutputDevice*, const Point&, const Size&, sal_uLong ) +void FixedLine::Draw( OutputDevice*, const Point&, const Size&, DrawFlags ) { } @@ -727,7 +727,7 @@ FixedBitmap::FixedBitmap( vcl::Window* pParent, WinBits nStyle ) : ImplInit( pParent, nStyle ); } -void FixedBitmap::ImplDraw( OutputDevice* pDev, sal_uLong /* nDrawFlags */, +void FixedBitmap::ImplDraw( OutputDevice* pDev, DrawFlags /* nDrawFlags */, const Point& rPos, const Size& rSize ) { Bitmap* pBitmap = &maBitmap; @@ -770,11 +770,11 @@ void FixedBitmap::ApplySettings(vcl::RenderContext& rRenderContext) void FixedBitmap::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) { - ImplDraw(&rRenderContext, 0, Point(), GetOutputSizePixel()); + ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel()); } void FixedBitmap::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, - sal_uLong nFlags ) + DrawFlags nFlags ) { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); @@ -784,7 +784,7 @@ void FixedBitmap::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize pDev->SetMapMode(); // Border - if ( !(nFlags & WINDOW_DRAW_NOBORDER) && (GetStyle() & WB_BORDER) ) + if ( !(nFlags & DrawFlags::NoBorder) && (GetStyle() & WB_BORDER) ) { DecorationView aDecoView( pDev ); aRect = aDecoView.DrawFrame( aRect, DrawFrameStyle::DoubleIn ); @@ -890,11 +890,11 @@ FixedImage::FixedImage( vcl::Window* pParent, const ResId& rResId ) : Show(); } -void FixedImage::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, +void FixedImage::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, const Point& rPos, const Size& rSize ) { DrawImageFlags nStyle = DrawImageFlags::NONE; - if ( !(nDrawFlags & WINDOW_DRAW_NODISABLE) ) + if ( !(nDrawFlags & DrawFlags::NoDisable) ) { if ( !IsEnabled() ) nStyle |= DrawImageFlags::Disable; @@ -941,7 +941,7 @@ void FixedImage::ApplySettings(vcl::RenderContext& rRenderContext) void FixedImage::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) { - ImplDraw(&rRenderContext, 0, Point(), GetOutputSizePixel()); + ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel()); } Size FixedImage::GetOptimalSize() const @@ -950,7 +950,7 @@ Size FixedImage::GetOptimalSize() const } void FixedImage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, - sal_uLong nFlags ) + DrawFlags nFlags ) { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); @@ -960,7 +960,7 @@ void FixedImage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, pDev->SetMapMode(); // Border - if ( !(nFlags & WINDOW_DRAW_NOBORDER) && (GetStyle() & WB_BORDER) ) + if ( !(nFlags & DrawFlags::NoBorder) && (GetStyle() & WB_BORDER) ) { ImplDrawFrame( pDev, aRect ); } diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx index c3f2231cd293..69dcca532f4e 100644 --- a/vcl/source/control/group.cxx +++ b/vcl/source/control/group.cxx @@ -92,7 +92,7 @@ GroupBox::GroupBox( vcl::Window* pParent, WinBits nStyle ) : ImplInit( pParent, nStyle ); } -void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, +void GroupBox::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags, const Point& rPos, const Size& rSize, bool bLayout ) { long nTop; @@ -104,7 +104,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, if ( GetStyle() & WB_NOLABEL ) nTextStyle &= ~DrawTextFlags::Mnemonic; - if ( nDrawFlags & WINDOW_DRAW_NOMNEMONIC ) + if ( nDrawFlags & DrawFlags::NoMnemonic ) { if ( nTextStyle & DrawTextFlags::Mnemonic ) { @@ -112,16 +112,16 @@ void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, nTextStyle &= ~DrawTextFlags::Mnemonic; } } - if ( !(nDrawFlags & WINDOW_DRAW_NODISABLE) ) + if ( !(nDrawFlags & DrawFlags::NoDisable) ) { if ( !IsEnabled() ) nTextStyle |= DrawTextFlags::Disable; } - if ( (nDrawFlags & WINDOW_DRAW_MONO) || + if ( (nDrawFlags & DrawFlags::Mono) || (rStyleSettings.GetOptions() & StyleSettingsOptions::Mono) ) { nTextStyle |= DrawTextFlags::Mono; - nDrawFlags |= WINDOW_DRAW_MONO; + nDrawFlags |= DrawFlags::Mono; } if (aText.isEmpty()) @@ -141,7 +141,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, if( ! bLayout ) { - if ( nDrawFlags & WINDOW_DRAW_MONO ) + if ( nDrawFlags & DrawFlags::Mono ) pDev->SetLineColor( Color( COL_BLACK ) ); else pDev->SetLineColor( rStyleSettings.GetShadowColor() ); @@ -161,7 +161,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, // if we're drawing onto a printer, spare the 3D effect // #i46986# / 2005-04-13 / frank.schoenheit@sun.com - if ( !bIsPrinter && !(nDrawFlags & WINDOW_DRAW_MONO) ) + if ( !bIsPrinter && !(nDrawFlags & DrawFlags::Mono) ) { pDev->SetLineColor( rStyleSettings.GetLightColor() ); if (aText.isEmpty()) @@ -185,16 +185,16 @@ void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, void GroupBox::FillLayoutData() const { mpControlData->mpLayoutData = new vcl::ControlLayoutData(); - const_cast<GroupBox*>(this)-> ImplDraw( const_cast<GroupBox*>(this), 0, Point(), GetOutputSizePixel(), true ); + const_cast<GroupBox*>(this)->ImplDraw( const_cast<GroupBox*>(this), DrawFlags::NONE, Point(), GetOutputSizePixel(), true ); } void GroupBox::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) { - ImplDraw(&rRenderContext, 0, Point(), GetOutputSizePixel()); + ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel()); } void GroupBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, - sal_uLong nFlags ) + DrawFlags nFlags ) { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); @@ -203,7 +203,7 @@ void GroupBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, pDev->Push(); pDev->SetMapMode(); pDev->SetFont( aFont ); - if ( nFlags & WINDOW_DRAW_MONO ) + if ( nFlags & DrawFlags::Mono ) pDev->SetTextColor( Color( COL_BLACK ) ); else pDev->SetTextColor( GetTextColor() ); diff --git a/vcl/source/control/imgctrl.cxx b/vcl/source/control/imgctrl.cxx index 8d9a5cbddff1..a41f3f4062c8 100644 --- a/vcl/source/control/imgctrl.cxx +++ b/vcl/source/control/imgctrl.cxx @@ -67,10 +67,10 @@ namespace } } -void ImageControl::ImplDraw(OutputDevice& rDev, sal_uLong nDrawFlags, const Point& rPos, const Size& rSize) const +void ImageControl::ImplDraw(OutputDevice& rDev, DrawFlags nDrawFlags, const Point& rPos, const Size& rSize) const { DrawImageFlags nStyle = DrawImageFlags::NONE; - if ( !(nDrawFlags & WINDOW_DRAW_NODISABLE) ) + if ( !(nDrawFlags & DrawFlags::NoDisable) ) { if ( !IsEnabled() ) nStyle |= DrawImageFlags::Disable; @@ -87,7 +87,7 @@ void ImageControl::ImplDraw(OutputDevice& rDev, sal_uLong nDrawFlags, const Poin WinBits nWinStyle = GetStyle(); DrawTextFlags nTextStyle = FixedText::ImplGetTextStyle( nWinStyle ); - if ( !(nDrawFlags & WINDOW_DRAW_NODISABLE) ) + if ( !(nDrawFlags & DrawFlags::NoDisable) ) if ( !IsEnabled() ) nTextStyle |= DrawTextFlags::Disable; @@ -133,7 +133,7 @@ void ImageControl::ImplDraw(OutputDevice& rDev, sal_uLong nDrawFlags, const Poin void ImageControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/) { - ImplDraw(rRenderContext, 0, Point(), GetOutputSizePixel()); + ImplDraw(rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel()); if (HasFocus()) { @@ -157,7 +157,7 @@ void ImageControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /* } } -void ImageControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) +void ImageControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) { const Point aPos = pDev->LogicToPixel( rPos ); const Size aSize = pDev->LogicToPixel( rSize ); @@ -167,7 +167,7 @@ void ImageControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSiz pDev->SetMapMode(); // Border - if ( !(nFlags & WINDOW_DRAW_NOBORDER) && (GetStyle() & WB_BORDER) ) + if ( !(nFlags & DrawFlags::NoBorder) && (GetStyle() & WB_BORDER) ) { ImplDrawFrame( pDev, aRect ); } diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index bb95cee469b3..a1ad0ebb8bca 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -373,7 +373,7 @@ void ListBox::ApplySettings(vcl::RenderContext& rRenderContext) rRenderContext.SetBackground(); } -void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) +void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) { mpImplLB->GetMainWindow()->ApplySettings(*pDev); @@ -390,8 +390,8 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sa // Border/Background pDev->SetLineColor(); pDev->SetFillColor(); - bool bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER); - bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground(); + bool bBorder = !(nFlags & DrawFlags::NoBorder ) && (GetStyle() & WB_BORDER); + bool bBackground = !(nFlags & DrawFlags::NoBackground) && IsControlBackground(); if ( bBorder || bBackground ) { Rectangle aRect( aPos, aSize ); @@ -407,13 +407,13 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sa } // Content - if ( ( nFlags & WINDOW_DRAW_MONO ) || ( eOutDevType == OUTDEV_PRINTER ) ) + if ( ( nFlags & DrawFlags::Mono ) || ( eOutDevType == OUTDEV_PRINTER ) ) { pDev->SetTextColor( Color( COL_BLACK ) ); } else { - if ( !(nFlags & WINDOW_DRAW_NODISABLE ) && !IsEnabled() ) + if ( !(nFlags & DrawFlags::NoDisable ) && !IsEnabled() ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); pDev->SetTextColor( rStyleSettings.GetDisableColor() ); diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index 2db7fc1bdcc7..2d7fdc3adb3e 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -411,13 +411,13 @@ void ScrollBar::ImplCalc( bool bUpdate ) ImplUpdateRects( bUpdate ); } -void ScrollBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& /* rSize */, sal_uLong nFlags ) +void ScrollBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& /* rSize */, DrawFlags nFlags ) { Point aPos = pDev->LogicToPixel( rPos ); pDev->Push(); pDev->SetMapMode(); - if ( !(nFlags & WINDOW_DRAW_MONO) ) + if ( !(nFlags & DrawFlags::Mono) ) { // DecoView uses the FaceColor... AllSettings aSettings = pDev->GetSettings(); diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx index 6d1d5f324172..ad47e9fc4bcb 100644 --- a/vcl/source/control/spinbtn.cxx +++ b/vcl/source/control/spinbtn.cxx @@ -120,14 +120,14 @@ void SpinButton::Resize() Invalidate(); } -void SpinButton::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags) +void SpinButton::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags) { Point aPos = pDev->LogicToPixel(rPos); Size aSize = pDev->LogicToPixel(rSize); pDev->Push(); pDev->SetMapMode(); - if ( !(nFlags & WINDOW_DRAW_MONO) ) + if ( !(nFlags & DrawFlags::Mono) ) { // DecoView uses the FaceColor... AllSettings aSettings = pDev->GetSettings(); diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index f64c5a7fe626..1db4d358e654 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -977,12 +977,12 @@ IMPL_LINK_TYPED( SpinField, ImplTimeout, Timer*, pTimer, void ) } } -void SpinField::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags) +void SpinField::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags) { Edit::Draw(pDev, rPos, rSize, nFlags); WinBits nFieldStyle = GetStyle(); - if ( !(nFlags & WINDOW_DRAW_NOCONTROLS ) && ( nFieldStyle & (WB_SPIN|WB_DROPDOWN) ) ) + if ( !(nFlags & DrawFlags::NoControls ) && ( nFieldStyle & (WB_SPIN|WB_DROPDOWN) ) ) { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); @@ -1010,7 +1010,7 @@ void SpinField::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, s aDown.Move(aPos.X(), aPos.Y()); Color aButtonTextColor; - if ((nFlags & WINDOW_DRAW_MONO) || (eOutDevType == OUTDEV_PRINTER)) + if ((nFlags & DrawFlags::Mono) || (eOutDevType == OUTDEV_PRINTER)) aButtonTextColor = Color( COL_BLACK ); else aButtonTextColor = GetSettings().GetStyleSettings().GetButtonTextColor(); @@ -1024,7 +1024,7 @@ void SpinField::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, s if (GetSettings().GetStyleSettings().GetOptions() & StyleSettingsOptions::SpinUpDown) eSymbol = SymbolType::SPIN_UPDOWN; - DrawSymbolFlags nSymbolStyle = (IsEnabled() || (nFlags & WINDOW_DRAW_NODISABLE)) ? DrawSymbolFlags::NONE : DrawSymbolFlags::Disable; + DrawSymbolFlags nSymbolStyle = (IsEnabled() || (nFlags & DrawFlags::NoDisable)) ? DrawSymbolFlags::NONE : DrawSymbolFlags::Disable; aView.DrawSymbol(aInnerRect, eSymbol, aButtonTextColor, nSymbolStyle); } diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index a21c360799cd..11471c8c7f3d 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -1360,7 +1360,7 @@ void VclMultiLineEdit::DataChanged( const DataChangedEvent& rDCEvt ) Control::DataChanged( rDCEvt ); } -void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) +void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) { ImplInitSettings( true, true, true ); @@ -1378,8 +1378,8 @@ void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& // Border/Background pDev->SetLineColor(); pDev->SetFillColor(); - bool bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER); - bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground(); + bool bBorder = !(nFlags & DrawFlags::NoBorder ) && (GetStyle() & WB_BORDER); + bool bBackground = !(nFlags & DrawFlags::NoBackground) && IsControlBackground(); if ( bBorder || bBackground ) { Rectangle aRect( aPos, aSize ); @@ -1396,11 +1396,11 @@ void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& } // contents - if ( ( nFlags & WINDOW_DRAW_MONO ) || ( eOutDevType == OUTDEV_PRINTER ) ) + if ( ( nFlags & DrawFlags::Mono ) || ( eOutDevType == OUTDEV_PRINTER ) ) pDev->SetTextColor( Color( COL_BLACK ) ); else { - if ( !(nFlags & WINDOW_DRAW_NODISABLE ) && !IsEnabled() ) + if ( !(nFlags & DrawFlags::NoDisable ) && !IsEnabled() ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); pDev->SetTextColor( rStyleSettings.GetDisableColor() ); diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 2a0bf5d38228..a58c625cd442 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -1093,7 +1093,7 @@ void Dialog::GetDrawWindowBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, aImplWin->GetBorder( rLeftBorder, rTopBorder, rRightBorder, rBottomBorder ); } -void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong ) +void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags ) { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx index 0f326758683a..170dbcaf169b 100644 --- a/vcl/source/window/tabpage.cxx +++ b/vcl/source/window/tabpage.cxx @@ -148,7 +148,7 @@ void TabPage::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& ) } } -void TabPage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong ) +void TabPage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags ) { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 6bb652f51129..c93e6c0f6ea6 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1913,7 +1913,7 @@ void Window::KeyUp( const KeyEvent& rKEvt ) mpWindowImpl->mbKeyUp = true; } -void Window::Draw( OutputDevice*, const Point&, const Size&, sal_uLong ) +void Window::Draw( OutputDevice*, const Point&, const Size&, DrawFlags ) { } |