From 615ba47c5937dd62573181a0404ae24968d7daec Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Fri, 2 Jan 2015 07:44:33 +0300 Subject: fdo#67870 WW8 filter: import zoom type Change-Id: If919880b51bdb30d9afdb168dae8f84dbfe18524 --- sw/source/filter/ww8/ww8par.cxx | 9 ++++++++- sw/source/filter/ww8/ww8scan.hxx | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'sw') diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 1d7dcad7481b..9faf65520a87 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -81,6 +81,7 @@ #include #include #include +#include #include #include #include @@ -1901,7 +1902,13 @@ void SwWW8ImplReader::ImportDop() aViewProps[1].Name = "VisibleBottom"; aViewProps[1].Value <<= sal_Int32(0); aViewProps[2].Name = "ZoomType"; - aViewProps[2].Value <<= sal_Int16(0); + //Import zoom type + switch (pWDop->zkSaved) { + case 1: aViewProps[2].Value <<= sal_Int16(SVX_ZOOM_WHOLEPAGE); break; + case 2: aViewProps[2].Value <<= sal_Int16(SVX_ZOOM_PAGEWIDTH); break; + case 3: aViewProps[2].Value <<= sal_Int16(SVX_ZOOM_OPTIMAL); break; + default: aViewProps[2].Value <<= sal_Int16(SVX_ZOOM_PERCENT); break; + } uno::Reference< uno::XComponentContext > xComponentContext(comphelper::getProcessComponentContext()); uno::Reference xBox = document::IndexedPropertyValues::create(xComponentContext); diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx index fb08c8ebad14..642a56a00ce0 100644 --- a/sw/source/filter/ww8/ww8scan.hxx +++ b/sw/source/filter/ww8/ww8scan.hxx @@ -1628,7 +1628,7 @@ public: sal_Int32 lKeyProtDoc; // document protection password key, only valid if dop.fProtEnabled, dop.fLockAtn or dop.fLockRev are 1. sal_uInt16 wvkSaved : 3; // document view kind: 0 Normal view, 1 Outline view, 2 Page View sal_uInt16 wScaleSaved : 9; ///< Specifies the zoom percentage that was in use when the document was saved. - sal_uInt16 zkSaved : 2; + sal_uInt16 zkSaved : 2; // document zoom type: 0 percent, 1 whole/entire page, 2 page width, 3 text width/optimal bool fRotateFontW6 : 1; bool iGutterPos : 1 ; -- cgit