[Libreoffice-commits] core.git: sw/source vcl/source

Henry Castro hcastro at collabora.com
Thu Jun 11 01:38:08 PDT 2015


 sw/source/uibase/docvw/edtwin.cxx |    4 +++-
 sw/source/uibase/uno/unotxdoc.cxx |    9 ---------
 vcl/source/window/paint.cxx       |    9 +++++----
 3 files changed, 8 insertions(+), 14 deletions(-)

New commits:
commit a6f4fde8baf3eeb36820d18ffad84192e995145f
Author: Henry Castro <hcastro at collabora.com>
Date:   Wed Jun 10 18:08:48 2015 -0400

    sw tiled rendering: Ignore window size check.
    
    In the tiled rendering case it does not need to check
    if the window size is (0,0). But it still has to trigger
    LOKit LOK_CALLBACK_INVALIDATE_TILES
    
    Change-Id: I4c458edfd6e44599b8c8148e0f8543fb0563e627

diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index d2c42ae..95e8b37 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -6203,7 +6203,9 @@ void SwEditWin::LogicInvalidate(const Rectangle* pRectangle)
         sRectangle = "EMPTY";
     else
         sRectangle = pRectangle->toString();
-    m_rView.GetWrtShell().libreOfficeKitCallback(LOK_CALLBACK_INVALIDATE_TILES, sRectangle.getStr());
+
+    if ( m_rView.GetWrtShellPtr() )
+        m_rView.GetWrtShell().libreOfficeKitCallback(LOK_CALLBACK_INVALIDATE_TILES, sRectangle.getStr());
 }
 
 void SwEditWin::LogicMouseButtonDown(const MouseEvent& rMouseEvent)
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index e89ef6d..4f7731a 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3157,15 +3157,6 @@ void SwXTextDocument::initializeForTiledRendering()
     SwViewShell* pViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
     pViewShell->setTiledRendering(true);
 
-    if ( pViewShell->GetWin() )
-    {
-        // Check initial window size and set minimal size (1,1)
-        Size aSize( pViewShell->GetWin()->GetOutputSizePixel() );
-        if ( aSize.Width() == 0 || aSize.Height() == 0 )
-            pViewShell->GetWin()->SetOutputSizePixel(Size( std::max( aSize.Width() , long(1)),
-                                                           std::max( aSize.Height(), long(1)) ));
-    }
-
     bool      bBookMode = false;
     sal_Int16 nColumns = 1;
 
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 1dcf72a..ae29766 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -31,6 +31,7 @@
 #include <salgdi.hxx>
 #include <salframe.hxx>
 #include <svdata.hxx>
+#include <comphelper/lok.hxx>
 
 #define IMPL_PAINT_PAINT            ((sal_uInt16)0x0001)
 #define IMPL_PAINT_PAINTALL         ((sal_uInt16)0x0002)
@@ -1132,7 +1133,7 @@ vcl::Region Window::GetPaintRegion() const
 
 void Window::Invalidate( InvalidateFlags nFlags )
 {
-    if ( !IsDeviceOutputNecessary() || !mnOutWidth || !mnOutHeight )
+    if ( !comphelper::LibreOfficeKit::isActive() && (!IsDeviceOutputNecessary() || !mnOutWidth || !mnOutHeight) )
         return;
 
     ImplInvalidate( NULL, nFlags );
@@ -1141,7 +1142,7 @@ void Window::Invalidate( InvalidateFlags nFlags )
 
 void Window::Invalidate( const Rectangle& rRect, InvalidateFlags nFlags )
 {
-    if ( !IsDeviceOutputNecessary() || !mnOutWidth || !mnOutHeight )
+    if ( !comphelper::LibreOfficeKit::isActive() && (!IsDeviceOutputNecessary() || !mnOutWidth || !mnOutHeight) )
         return;
 
     OutputDevice *pOutDev = GetOutDev();
@@ -1157,7 +1158,7 @@ void Window::Invalidate( const Rectangle& rRect, InvalidateFlags nFlags )
 
 void Window::Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags )
 {
-    if ( !IsDeviceOutputNecessary() || !mnOutWidth || !mnOutHeight )
+    if ( !comphelper::LibreOfficeKit::isActive() && (!IsDeviceOutputNecessary() || !mnOutWidth || !mnOutHeight) )
         return;
 
     if ( rRegion.IsNull() )
@@ -1180,7 +1181,7 @@ void Window::Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags )
 void Window::Validate( ValidateFlags nFlags )
 {
 
-    if ( !IsDeviceOutputNecessary() || !mnOutWidth || !mnOutHeight )
+    if ( !comphelper::LibreOfficeKit::isActive() && (!IsDeviceOutputNecessary() || !mnOutWidth || !mnOutHeight) )
         return;
 
     ImplValidate( NULL, nFlags );


More information about the Libreoffice-commits mailing list