Blame SOURCES/0036-sw-tiled-rendering-set-minimal-window-size.patch

135360
From 8bc21ff727beb36e68076995cc642ac98296b689 Mon Sep 17 00:00:00 2001
135360
From: Henry Castro <hcastro@collabora.com>
135360
Date: Tue, 9 Jun 2015 23:19:40 -0400
135360
Subject: [PATCH 036/398] sw: tiled rendering, set minimal window size.
135360
135360
Set minimal window size (1,1), so it can trigger
135360
LOK_CALLBACK_INVALIDATE_TILES
135360
135360
Change-Id: If6ef9aeec94b396febd41375b3ce96b1aa1d6115
135360
(cherry picked from commit 2281a4922f2209511f79b961ca2140c112bc41eb)
135360
---
135360
 sw/source/uibase/uno/unotxdoc.cxx | 9 +++++++++
135360
 1 file changed, 9 insertions(+)
135360
135360
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
135360
index c19976c05289..450650d26c13 100644
135360
--- a/sw/source/uibase/uno/unotxdoc.cxx
135360
+++ b/sw/source/uibase/uno/unotxdoc.cxx
135360
@@ -3164,6 +3164,15 @@ void SwXTextDocument::initializeForTiledRendering()
135360
     SwViewShell* pViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
135360
     pViewShell->setTiledRendering(true);
135360
 
135360
+    if ( pViewShell->GetWin() )
135360
+    {
135360
+        // Check initial window size and set minimal size (1,1)
135360
+        Size aSize( pViewShell->GetWin()->GetOutputSizePixel() );
135360
+        if ( aSize.Width() == 0 || aSize.Height() == 0 )
135360
+            pViewShell->GetWin()->SetOutputSizePixel(Size( std::max( aSize.Width() , long(1)),
135360
+                                                           std::max( aSize.Height(), long(1)) ));
135360
+    }
135360
+
135360
     bool      bBookMode = false;
135360
     sal_Int16 nColumns = 1;
135360
 
135360
-- 
135360
2.12.0
135360