[Libreoffice-commits] .: sw/source
Miklos Vajna
vmiklos at kemper.freedesktop.org
Wed May 2 01:14:19 PDT 2012
sw/source/filter/ww8/docxexport.cxx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 9aff8869069601770c7ad6dbdb597076fd75a0a5
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Wed May 2 10:14:15 2012 +0200
sw: implement w:zoom in DOCX export
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index ab41592..ab67736 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -60,6 +60,8 @@
#include <docary.hxx>
#include <numrule.hxx>
#include <charfmt.hxx>
+#include <viewsh.hxx>
+#include <viewopt.hxx>
#include "ww8par.hxx"
#include "ww8scan.hxx"
@@ -665,7 +667,8 @@ void DocxExport::WriteProperties( )
void DocxExport::WriteSettings()
{
- if( !settings.hasData() && !m_pAttrOutput->HasFootnotes() && !m_pAttrOutput->HasEndnotes())
+ ViewShell *pViewShell(pDoc->GetCurrentViewShell());
+ if( !pViewShell && !settings.hasData() && !m_pAttrOutput->HasFootnotes() && !m_pAttrOutput->HasEndnotes())
return;
m_pFilter->addRelation( m_pDocumentFS->getOutputStream(),
@@ -680,6 +683,10 @@ void DocxExport::WriteSettings()
FSNS( XML_xmlns, XML_w ), "http://schemas.openxmlformats.org/wordprocessingml/2006/main",
FSEND );
+ // Zoom
+ rtl::OString aZoom(rtl::OString::valueOf(pViewShell->GetViewOptions()->GetZoom()));
+ pFS->singleElementNS(XML_w, XML_zoom, FSNS(XML_w, XML_percent), aZoom.getStr(), FSEND);
+
if( settings.evenAndOddHeaders )
pFS->singleElementNS( XML_w, XML_evenAndOddHeaders, FSEND );
More information about the Libreoffice-commits
mailing list