summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-26 10:16:39 +0200
committerNoel Grandin <noel@peralex.com>2015-05-27 11:14:25 +0200
commitedc69a55c30ac6cc12de0bf18bddb7dc3f210be4 (patch)
treed661c9dadcf3bf4b9215667a15501656cee9e4fe
parent5ad3886ec8d3d465c956d99fab42fffda656392c (diff)
simplify GetWindowClipRegionPixel
since it has only one call-site Change-Id: I80344faf4beab9aa9427ba8d448b0cf3fd30c7b6
-rw-r--r--include/vcl/window.hxx6
-rw-r--r--sw/source/core/view/viewsh.cxx2
-rw-r--r--vcl/source/window/clipping.cxx34
3 files changed, 10 insertions, 32 deletions
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index e2578acc9fc9..9b9ebd27d3e3 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -354,10 +354,6 @@ enum class StateChangedType : sal_uInt16
#define WINDOW_DLGCTRL_MOD1TAB ((sal_uInt16)0x0004)
#define WINDOW_DLGCTRL_FLOATWIN_POPUPMODEEND_CANCEL ((sal_uInt16)0x0008)
-// GetWindowClipRegionPixel-Flags
-#define WINDOW_GETCLIPREGION_NULL ((sal_uInt16)0x0001)
-#define WINDOW_GETCLIPREGION_NOCHILDREN ((sal_uInt16)0x0002)
-
// EndExtTextInput() Flags
enum class EndExtTextInputFlags
{
@@ -963,7 +959,7 @@ public:
void SetWindowRegionPixel( const vcl::Region& rRegion );
const vcl::Region& GetWindowRegionPixel() const;
bool IsWindowRegionPixel() const;
- vcl::Region GetWindowClipRegionPixel( sal_uInt16 nFlags = 0 ) const;
+ vcl::Region GetWindowClipRegionPixel() const;
vcl::Region GetPaintRegion() const;
bool IsInPaint() const;
// while IsInPaint returns true ExpandPaintClipRegion adds the
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 61dcf46c3924..3c163d9d314f 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1196,7 +1196,7 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect
// #i75172# isolated static conditions
const bool bOnlyYScroll(!lXDiff && std::abs(lYDiff) != 0 && std::abs(lYDiff) < lMax);
- const bool bAllowedWithChildWindows(GetWin()->GetWindowClipRegionPixel(WINDOW_GETCLIPREGION_NOCHILDREN|WINDOW_GETCLIPREGION_NULL).IsNull());
+ const bool bAllowedWithChildWindows(GetWin()->GetWindowClipRegionPixel().IsNull());
const bool bSmoothScrollAllowed(bOnlyYScroll && mbEnableSmooth && GetViewOptions()->IsSmoothScroll() && bAllowedWithChildWindows);
if(bSmoothScrollAllowed)
diff --git a/vcl/source/window/clipping.cxx b/vcl/source/window/clipping.cxx
index 38efc376c7ef..ef56b63cff55 100644
--- a/vcl/source/window/clipping.cxx
+++ b/vcl/source/window/clipping.cxx
@@ -112,37 +112,19 @@ void Window::ExpandPaintClipRegion( const vcl::Region& rRegion )
}
}
-vcl::Region Window::GetWindowClipRegionPixel( sal_uInt16 nFlags ) const
+vcl::Region Window::GetWindowClipRegionPixel() const
{
-
vcl::Region aWinClipRegion;
- if ( nFlags & WINDOW_GETCLIPREGION_NOCHILDREN )
- {
- if ( mpWindowImpl->mbInitWinClipRegion )
- const_cast<vcl::Window*>(this)->ImplInitWinClipRegion();
- aWinClipRegion = mpWindowImpl->maWinClipRegion;
- }
- else
- {
- vcl::Region* pWinChildClipRegion = const_cast<vcl::Window*>(this)->ImplGetWinChildClipRegion();
- aWinClipRegion = *pWinChildClipRegion;
- // --- RTL --- remirror clip region before passing it to somebody
- if( ImplIsAntiparallel() )
- {
- const OutputDevice *pOutDev = GetOutDev();
- pOutDev->ReMirror( aWinClipRegion );
- }
- }
+ if ( mpWindowImpl->mbInitWinClipRegion )
+ const_cast<vcl::Window*>(this)->ImplInitWinClipRegion();
+ aWinClipRegion = mpWindowImpl->maWinClipRegion;
- if ( nFlags & WINDOW_GETCLIPREGION_NULL )
- {
- Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
- vcl::Region aWinRegion( aWinRect );
+ Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
+ vcl::Region aWinRegion( aWinRect );
- if ( aWinRegion == aWinClipRegion )
- aWinClipRegion.SetNull();
- }
+ if ( aWinRegion == aWinClipRegion )
+ aWinClipRegion.SetNull();
aWinClipRegion.Move( -mnOutOffX, -mnOutOffY );