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

Chris Sherlock chris.sherlock79 at gmail.com
Wed May 7 10:27:34 PDT 2014


 vcl/source/app/svapp.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit d32b2863be915999472485b1df21c21e84448ea5
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Thu May 8 00:02:48 2014 +1000

    Handle non-initialized pImplSVData in InitAppFontData
    
    If pSVData->maWinData.mpFirstFrame is null in
    Application::InitAppFontData() then we need to create a new WorkWindow.
    
    Change-Id: I6665ff6525321554c8fd4943ec623978ce35f168
    Reviewed-on: https://gerrit.libreoffice.org/9272
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>

diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 5177aa1..a750ad0 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1659,6 +1659,9 @@ void Application::InitAppFontData()
 
     Window *pWindow = pSVData->mpDefaultWin;
 
+    if (!pWindow)
+       pWindow = new WorkWindow( NULL, 0 );
+
     long nTextHeight = pWindow->GetTextHeight();
     long nTextWidth = pWindow->approximate_char_width() * 8;
     long nSymHeight = nTextHeight*4;
@@ -1698,6 +1701,10 @@ void Application::InitAppFontData()
     pSVData->maGDIData.mnRealAppFontX = pSVData->maGDIData.mnAppFontX;
     if ( pSVData->maAppData.mnDialogScaleX )
         pSVData->maGDIData.mnAppFontX += (pSVData->maGDIData.mnAppFontX*pSVData->maAppData.mnDialogScaleX)/100;
+
+    // a temporary WorkWindow was created, we need to delete it
+    if (!pSVData->mpDefaultWin && pWindow)
+        delete pWindow;
 }
 
 


More information about the Libreoffice-commits mailing list