summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-08 10:51:28 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-03-08 11:45:47 +0000
commit2600220f53f51be2d017b012c56293bf8cf835ef (patch)
tree88bb373d0ecaea1e64c71ca4388e55e593d58aa7 /vcl/source/window
parent7f40ed57eb921e491f2fb83c820cb453babd9843 (diff)
loplugin:constantparams in vcl
Change-Id: I2114436f4bef3ac71a3035a206186cefaf88bca1 Reviewed-on: https://gerrit.libreoffice.org/23023 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/source/window')
-rw-r--r--vcl/source/window/mouse.cxx2
-rw-r--r--vcl/source/window/paint.cxx8
-rw-r--r--vcl/source/window/printdlg.cxx2
-rw-r--r--vcl/source/window/window.cxx25
-rw-r--r--vcl/source/window/winproc.cxx4
-rw-r--r--vcl/source/window/wrkwin.cxx4
6 files changed, 20 insertions, 25 deletions
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 913b47c7bb42..94a8f9757e36 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -290,7 +290,7 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags )
// EndExtTextInput if it is not the same window
if ( pSVData->maWinData.mpExtTextInputWin &&
(pSVData->maWinData.mpExtTextInputWin.get() != this) )
- pSVData->maWinData.mpExtTextInputWin->EndExtTextInput( EndExtTextInputFlags::Complete );
+ pSVData->maWinData.mpExtTextInputWin->EndExtTextInput();
// mark this windows as the last FocusWindow
vcl::Window* pOverlapWindow = ImplGetFirstOverlapWindow();
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 0c49837cdf4f..08ce4e43703f 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -945,10 +945,10 @@ void Window::ImplValidateFrameRegion( const vcl::Region* pRegion, ValidateFlags
}
}
-void Window::ImplValidate( const vcl::Region* pRegion, ValidateFlags nFlags )
+void Window::ImplValidate( ValidateFlags nFlags )
{
// assemble region
- bool bValidateAll = !pRegion;
+ bool bValidateAll = true;
ValidateFlags nOrgFlags = nFlags;
if ( !(nFlags & (ValidateFlags::Children | ValidateFlags::NoChildren)) )
{
@@ -965,8 +965,6 @@ void Window::ImplValidate( const vcl::Region* pRegion, ValidateFlags nFlags )
{
Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
vcl::Region aRegion( aRect );
- if ( pRegion )
- aRegion.Intersect( *pRegion );
ImplClipBoundaries( aRegion, true, true );
if ( nFlags & ValidateFlags::NoChildren )
{
@@ -1225,7 +1223,7 @@ void Window::Validate()
if ( !comphelper::LibreOfficeKit::isActive() && (!IsDeviceOutputNecessary() || !mnOutWidth || !mnOutHeight) )
return;
- ImplValidate( nullptr, ValidateFlags::NONE );
+ ImplValidate( ValidateFlags::NONE );
}
bool Window::HasPaintEvent() const
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 28c739f999c4..53d8ea7be466 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -1344,7 +1344,7 @@ void PrintDialog::preparePreview( bool i_bNewPage, bool i_bMayUseCache )
Size aCurPageSize = aPrt->PixelToLogic( aPrt->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) );
mpPreviewWindow->setPreview( aMtf, aCurPageSize,
- aPrt->GetPaperName( false ),
+ aPrt->GetPaperName(),
nPages > 0 ? OUString() : maNoPageStr,
aPrt->GetDPIX(), aPrt->GetDPIY(),
aPrt->GetPrinterOptions().IsConvertToGreyscales()
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 4d89a1789394..9f1e38cef4e4 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -413,7 +413,7 @@ void Window::dispose()
// EndExtTextInputMode
if ( pSVData->maWinData.mpExtTextInputWin == this )
{
- EndExtTextInput( EndExtTextInputFlags::Complete );
+ EndExtTextInput();
if ( pSVData->maWinData.mpExtTextInputWin == this )
pSVData->maWinData.mpExtTextInputWin = nullptr;
}
@@ -1970,20 +1970,17 @@ void Window::StateChanged(StateChangedType eType)
}
}
-bool Window::IsLocked( bool bChildren ) const
+bool Window::IsLocked() const
{
if ( mpWindowImpl->mnLockCount != 0 )
return true;
- if ( bChildren || mpWindowImpl->mbChildNotify )
+ vcl::Window* pChild = mpWindowImpl->mpFirstChild;
+ while ( pChild )
{
- vcl::Window* pChild = mpWindowImpl->mpFirstChild;
- while ( pChild )
- {
- if ( pChild->IsLocked( true ) )
- return true;
- pChild = pChild->mpWindowImpl->mpNext;
- }
+ if ( pChild->IsLocked() )
+ return true;
+ pChild = pChild->mpWindowImpl->mpNext;
}
return false;
@@ -2113,11 +2110,11 @@ void Window::SetInputContext( const InputContext& rInputContext )
ImplNewInputContext();
}
-void Window::EndExtTextInput( EndExtTextInputFlags nFlags )
+void Window::EndExtTextInput()
{
if ( mpWindowImpl->mbExtTextInput )
- ImplGetFrame()->EndExtTextInput( nFlags );
+ ImplGetFrame()->EndExtTextInput( EndExtTextInputFlags::Complete );
}
void Window::SetCursorRect( const Rectangle* pRect, long nExtTextInputWidth )
@@ -2967,10 +2964,10 @@ Rectangle Window::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const
return ImplGetWindowExtentsRelative( pRelativeWindow, false );
}
-Rectangle Window::GetClientWindowExtentsRelative( vcl::Window *pRelativeWindow ) const
+Rectangle Window::GetClientWindowExtentsRelative() const
{
// without decoration
- return ImplGetWindowExtentsRelative( pRelativeWindow, true );
+ return ImplGetWindowExtentsRelative( nullptr, true );
}
Rectangle Window::ImplGetWindowExtentsRelative( vcl::Window *pRelativeWindow, bool bClientOnly ) const
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index c680cb4bce66..4fba05c55662 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -407,7 +407,7 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent
if ( pSVData->maWinData.mpExtTextInputWin &&
((nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN) ||
(nSVEvent == MouseNotifyEvent::MOUSEBUTTONUP)) )
- pSVData->maWinData.mpExtTextInputWin->EndExtTextInput( EndExtTextInputFlags::Complete );
+ pSVData->maWinData.mpExtTextInputWin->EndExtTextInput();
}
// determine mouse event data
@@ -1807,7 +1807,7 @@ IMPL_LINK_NOARG_TYPED(vcl::Window, ImplAsyncFocusHdl, void*, void)
// TrackingMode is ended in ImplHandleLoseFocus
#ifdef _WIN32
// To avoid problems with the Unix IME
- pFocusWin->EndExtTextInput( EndExtTextInputFlags::Complete );
+ pFocusWin->EndExtTextInput();
#endif
// XXX #102010# hack for accessibility: do not close the menu,
diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx
index 0d4e9d1f369f..caeee5642d2b 100644
--- a/vcl/source/window/wrkwin.cxx
+++ b/vcl/source/window/wrkwin.cxx
@@ -155,9 +155,9 @@ void WorkWindow::ShowFullScreenMode( bool bFullScreenMode, sal_Int32 nDisplayScr
}
}
-void WorkWindow::StartPresentationMode( bool bPresentation, PresentationFlags nFlags )
+void WorkWindow::StartPresentationMode( PresentationFlags nFlags )
{
- return StartPresentationMode( bPresentation, nFlags, GetScreenNumber());
+ return StartPresentationMode( false/*bPresentation*/, nFlags, GetScreenNumber());
}
void WorkWindow::StartPresentationMode( bool bPresentation, PresentationFlags nFlags, sal_uInt32 nDisplayScreen )