summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2015-01-02 07:33:08 +0300
committerCaolán McNamara <caolanm@redhat.com>2015-01-07 13:22:04 +0000
commit955994ce0e039d40c48c420c887bf68c1d766615 (patch)
tree01937043a4a77b6b17e0666fed32129dcde5609f /sw
parent6d62f6484c0ecb4a09332ad442f5cc53e6da9401 (diff)
WW8 filter: export zoom type
Change-Id: I6a667585cc590ed2fe73581acb1249da62e65d31 Reviewed-on: https://gerrit.libreoffice.org/13717 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit efa21d48a0dcb46e4728a19f89d0e26587a17327) Reviewed-on: https://gerrit.libreoffice.org/13794 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx16
1 files changed, 13 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 16083afa4dbe..c70da36d9258 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!)