summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8par6.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-02-03 17:44:38 +0100
committerMiklos Vajna <vmiklos@collabora.com>2021-02-09 14:45:19 +0100
commit0a50ed4fb20cc816a8999798339857862ec245b4 (patch)
treedef14bcf03b5e9b83ecbbeb5bd74b0be3ef6d46c /sw/source/filter/ww8/ww8par6.cxx
parent391f6cbf804f0a2bbd5e22cd3626d7af9a2e8cfa (diff)
tdf#91920 sw page gutter margin: add DOC filter
Map between sprmSDzaGutter and SvxLRSpaceItem::m_nGutterMargin, but leave the fRTLGutter and iGutterPos cases alone for now. (cherry picked from commit 5e6f79348c2df12c8793e3c5cb943a86f9e47cc5) Conflicts: sw/qa/extras/ww8export/ww8export3.cxx Change-Id: I6f2ede619a8ea47404c4c37480b0e6d886cf5fce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110628 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/source/filter/ww8/ww8par6.cxx')
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 634ac5131b0c..4a8821f678f8 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -477,9 +477,14 @@ void wwSectionManager::SetLeftRight(wwSection &rSection)
case is handled in GetPageULData.
*/
if (rSection.maSep.fRTLGutter)
+ {
nWWRi += nWWGu;
- else if (!mrReader.m_xWDop->iGutterPos)
- nWWLe += nWWGu;
+ nWWGu = 0;
+ }
+ else if (mrReader.m_xWDop->iGutterPos)
+ {
+ nWWGu = 0;
+ }
// Left / Right
if ((rSection.nPgWidth - nWWLe - nWWRi) < MINLAY)
@@ -502,6 +507,7 @@ void wwSectionManager::SetLeftRight(wwSection &rSection)
rSection.nPgLeft = nWWLe;
rSection.nPgRight = nWWRi;
+ rSection.nPgGutter = nWWGu;
}
void wwSectionManager::SetPage(SwPageDesc &rInPageDesc, SwFrameFormat &rFormat,
@@ -516,8 +522,9 @@ void wwSectionManager::SetPage(SwPageDesc &rInPageDesc, SwFrameFormat &rFormat,
aSz.SetHeight(SvxPaperInfo::GetSloppyPaperDimension(rSection.GetPageHeight()));
rFormat.SetFormatAttr(aSz);
- rFormat.SetFormatAttr(
- SvxLRSpaceItem(rSection.GetPageLeft(), rSection.GetPageRight(), 0, 0, RES_LR_SPACE));
+ SvxLRSpaceItem aLR(rSection.GetPageLeft(), rSection.GetPageRight(), 0, 0, RES_LR_SPACE);
+ aLR.SetGutterMargin(rSection.nPgGutter);
+ rFormat.SetFormatAttr(aLR);
if (!bIgnoreCols)
SetCols(rFormat, rSection, rSection.GetTextAreaWidth());
@@ -810,6 +817,7 @@ wwSection::wwSection(const SwPosition &rPos) : maStart(rPos.nNode)
, nPgWidth(SvxPaperInfo::GetPaperSize(PAPER_A4).Width())
, nPgLeft(MM_250)
, nPgRight(MM_250)
+ , nPgGutter(0)
, mnVerticalAdjustment(drawing::TextVerticalAdjust_TOP)
, mnBorders(0)
, mbHasFootnote(false)