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

Justin Luth justin_luth at sil.org
Wed Jan 7 02:52:57 PST 2015


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

New commits:
commit efa21d48a0dcb46e4728a19f89d0e26587a17327
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>

diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 96dac3b..af41675 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