summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/window/paint.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index c7c3b7544937..8531ead70012 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -1202,8 +1202,11 @@ void Window::Invalidate( const tools::Rectangle& rRect, InvalidateFlags nFlags )
tools::Rectangle aRect = pOutDev->ImplLogicToDevicePixel( rRect );
if ( !aRect.IsEmpty() )
{
- vcl::Region aRegion( aRect );
- ImplInvalidate( &aRegion, nFlags );
+ if (!comphelper::LibreOfficeKit::isActive())
+ { // ImplInvalidate() immediatelly returns in LOK mode, skip useless Region construction
+ vcl::Region aRegion( aRect );
+ ImplInvalidate( &aRegion, nFlags );
+ }
tools::Rectangle aLogicRectangle(rRect);
LogicInvalidate(&aLogicRectangle);
}