diff options
author | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2016-07-02 03:29:26 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-07-03 23:57:50 +0000 |
commit | 46094ff4b0ea06931f2af3fc45d00fd38c3ebf26 (patch) | |
tree | 427b0a412d5aaac7965c0179e5319bdfa6608313 /sc/source | |
parent | c89294233b6a9ffc1bd75e6e9226ad723b7d5538 (diff) |
tdf#48767 Fix orientation issue after export to .xlsx
After save to .xlsx in usePrinterDefaults was added into PageSetup.
Due to bug in MS Excel, when usePrinterDefaults is present,
(no matter what value), the orientation of the Page is alway "portrait".
To resolve that issue, if usePrinterDefaults is set to default value,
then usePrinterDefaults XML field is not added during export to .xlsx
Change-Id: I3ab310babb278913bce3d66f7fae1192ed9727b9
Reviewed-on: https://gerrit.libreoffice.org/26871
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/filter/excel/xepage.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/filter/excel/xepage.cxx b/sc/source/filter/excel/xepage.cxx index 2895819d4ff9..31c17b6d251e 100644 --- a/sc/source/filter/excel/xepage.cxx +++ b/sc/source/filter/excel/xepage.cxx @@ -102,7 +102,10 @@ void XclExpSetup::SaveXml( XclExpXmlStream& rStrm ) pAttrList->add( XML_fitToHeight, OString::number( mrData.mnFitToHeight ).getStr() ); pAttrList->add( XML_pageOrder, mrData.mbPrintInRows ? "overThenDown" : "downThenOver" ); pAttrList->add( XML_orientation, mrData.mbPortrait ? "portrait" : "landscape" ); // OOXTODO: "default"? - pAttrList->add( XML_usePrinterDefaults, XclXmlUtils::ToPsz( !mrData.mbValid ) ); + // tdf#48767 if XML_usePrinterDefaults field is exist, then XML_orientation is always "portrait" in MS Excel + // To resolve that import issue, if XML_usePrinterDefaults has default value (false) then XML_usePrinterDefaults is not added. + if ( !mrData.mbValid ) + pAttrList->add( XML_usePrinterDefaults, XclXmlUtils::ToPsz( !mrData.mbValid ) ); pAttrList->add( XML_blackAndWhite, XclXmlUtils::ToPsz( mrData.mbBlackWhite ) ); pAttrList->add( XML_draft, XclXmlUtils::ToPsz( mrData.mbDraftQuality ) ); pAttrList->add( XML_cellComments, mrData.mbPrintNotes ? "atEnd" : "none" ); // OOXTODO: "asDisplayed"? |