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

Justin Luth justin_luth at sil.org
Wed Jan 7 05:22:41 PST 2015


 sw/source/filter/ww8/wrtww8.cxx |   16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

New commits:
commit 955994ce0e039d40c48c420c887bf68c1d766615
Author: Justin Luth <justin_luth at sil.org>
Date:   Fri Jan 2 07:33:08 2015 +0300

    WW8 filter: export zoom type
    
    Change-Id: I6a667585cc590ed2fe73581acb1249da62e65d31
    Reviewed-on: https://gerrit.libreoffice.org/13717
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
    (cherry picked from commit efa21d48a0dcb46e4728a19f89d0e26587a17327)
    Reviewed-on: https://gerrit.libreoffice.org/13794
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 16083af..c70da36 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -334,10 +334,20 @@ static void WriteDop( WW8Export& rWrt )
         DefaultItemGet<SvxTabStopItem>(*rWrt.pDoc, RES_PARATR_TABSTOP);
     rDop.dxaTab = (sal_uInt16)rTabStop[0].GetTabPos();
 
-    // Zoom factor
+    // Zoom factor and type
     SwViewShell *pViewShell(rWrt.pDoc->getIDocumentLayoutAccess().GetCurrentViewShell());
-    if (pViewShell && pViewShell->GetViewOptions()->GetZoomType() == SVX_ZOOM_PERCENT)
-        rDop.wScaleSaved = pViewShell->GetViewOptions()->GetZoom();
+    if (pViewShell)
+    {
+        switch ( pViewShell->GetViewOptions()->GetZoomType() )
+        {
+            case SVX_ZOOM_WHOLEPAGE: rDop.zkSaved = 1; break;
+            case SVX_ZOOM_PAGEWIDTH: rDop.zkSaved = 2; break;
+            case SVX_ZOOM_OPTIMAL:   rDop.zkSaved = 3; break;
+            default:                 rDop.zkSaved = 0;
+                rDop.wScaleSaved = pViewShell->GetViewOptions()->GetZoom();
+                break;
+        }
+    }
 
     // Werte aus der DocStatistik (werden aufjedenfall fuer die
     // DocStat-Felder benoetigt!)


More information about the Libreoffice-commits mailing list