sw/source/filter/ascii/parasc.cxx | 1 + sw/source/filter/ww8/ww8par.cxx | 9 ++++++++- sw/source/filter/ww8/ww8scan.hxx | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-)
New commits: commit 0b39d560da27ece227830a4bcc5556ae902a0921 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Jan 5 15:49:47 2015 +0000 valgrind: uninitialized read on loading id:000386,src:000000,op:havoc,rep:128.jpg as text Change-Id: I98364ffbcc4ea788613cc8071c4d8774ba167033 diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index 68d8b38..d4e5347 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -323,6 +323,7 @@ sal_uLong SwASCIIParser::ReadChars() sal_Size nNewLen = lGCount, nCntBytes; aWork.reset(new sal_Unicode[nNewLen + 1]); // add 1 for '\0' sal_Unicode* pBuf = aWork.get(); + pBuf[nNewLen] = 0; // ensure '\0' nNewLen = rtl_convertTextToUnicode( hConverter, hContext, pArr, lGCount, pBuf, nNewLen, commit 615ba47c5937dd62573181a0404ae24968d7daec Author: Justin Luth <justin_l...@sil.org> Date: Fri Jan 2 07:44:33 2015 +0300 fdo#67870 WW8 filter: import zoom type Change-Id: If919880b51bdb30d9afdb168dae8f84dbfe18524 diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 1d7dcad..9faf655 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -81,6 +81,7 @@ #include <docufld.hxx> #include <swfltopt.hxx> #include <viewsh.hxx> +#include <viewopt.hxx> #include <shellres.hxx> #include <mdiexp.hxx> #include <statstr.hrc> @@ -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<container::XIndexContainer> xBox = document::IndexedPropertyValues::create(xComponentContext); diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx index fb08c8e..642a56a 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 ;
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits