summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2015-01-02 07:44:33 +0300
committerCaolán McNamara <caolanm@redhat.com>2015-01-05 17:26:13 +0000
commit42f48db159980ad30588ed1d52867afbbe9648f5 (patch)
treea2ba695242a647b99a62f496ac25fc5d632bef73
parent416596954529dd7897ab81951c47ba5984b11a34 (diff)
fdo#67870 WW8 filter: import zoom type
Change-Id: If919880b51bdb30d9afdb168dae8f84dbfe18524 (cherry picked from commit 615ba47c5937dd62573181a0404ae24968d7daec) Reviewed-on: https://gerrit.libreoffice.org/13745 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/filter/ww8/ww8par.cxx9
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx2
2 files changed, 9 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 61e4b09a0bad..abcdf628b001 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -82,6 +82,7 @@
#include <docufld.hxx>
#include <swfltopt.hxx>
#include <viewsh.hxx>
+#include <viewopt.hxx>
#include <shellres.hxx>
#include <mdiexp.hxx>
#include <statstr.hrc>
@@ -1900,7 +1901,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<container::XIndexContainer> xBox = document::IndexedPropertyValues::create(xComponentContext);
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index a3ce96fefd72..95711aea890d 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -1595,7 +1595,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 ;