[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sd/source

Caolán McNamara caolanm at redhat.com
Thu Sep 18 10:38:23 PDT 2014


 sd/source/ui/view/DocumentRenderer.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 7b3ec856595cc52e8fec911ae420170a455d4888
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Sep 18 11:40:26 2014 +0100

    IsDraw doesn't mean the app/page is Draw
    
    it means a slide in impress.
    
    commit 7b31e45ec7106d2cfbdbb7915d97667ba710f81c
    Date:   Mon Jun 23 20:55:21 2014 +0100
        Make Draw use paper size when printing - fdo#63905
    
        Previously, Draw/Impress use the default size from the printer.
        Now Draw uses the paper size (specified in page formatting).
        Impress still uses the old method - not sure if this is correct
        but printing handouts etc probably complicate print/paper size.
    
    suggests the intent is for this to not affect Impress and to only
    affect Draw, so this does that
    
    (cherry picked from commit f1f89f0202232635e7fbbd7ca47de51755b2bce0)
    
    Conflicts:
    	sd/source/ui/view/DocumentRenderer.cxx
    
    Change-Id: I481a824ef244fd837992c893f6de0c051af0a26b
    Reviewed-on: https://gerrit.libreoffice.org/11511
    Reviewed-by: Matúš Kukan <matus.kukan at collabora.com>
    Tested-by: Matúš Kukan <matus.kukan at collabora.com>

diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 52aa9c5..e1e3c7d 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1409,6 +1409,7 @@ private:
         PrintInfo& rInfo)
     {
         SdDrawDocument* pDocument = mrBase.GetMainViewShell()->GetDoc();
+        bool bIsDraw = pDocument->GetDocumentType() == DOCUMENT_TYPE_DRAW;
         rInfo.meOrientation = ORIENTATION_PORTRAIT;
 
         if( ! mpOptions->IsBooklet())
@@ -1420,7 +1421,7 @@ private:
 
         // Draw should abide by specified paper size
         Size aPaperSize;
-        if (mpOptions->IsDraw())
+        if (bIsDraw)
         {
             aPaperSize.setWidth(rInfo.maPageSize.Width());
             aPaperSize.setHeight(rInfo.maPageSize.Height());
@@ -1497,7 +1498,7 @@ private:
                 aInfo.msTimeDate += GetSdrGlobalData().GetLocaleData()->getTime( Time( Time::SYSTEM ), sal_False, sal_False );
 
             // Draw should use specified paper size when printing
-            if (mpOptions->IsDraw())
+            if (mrBase.GetDocShell()->GetDocumentType() == DOCUMENT_TYPE_DRAW)
             {
                 aInfo.maPrintSize = mrBase.GetDocument()->GetSdPage(0, PK_STANDARD)->GetSize();
                 maPrintSize = awt::Size(aInfo.maPrintSize.Width(),


More information about the Libreoffice-commits mailing list