diff options
author | Winfried Donkers <W.Donkers@dci-electronics.nl> | 2011-12-09 17:44:20 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-12-09 20:47:08 +0100 |
commit | a34ccd2ec9ffaf09162427b198fdc08cc324a3f3 (patch) | |
tree | c072b5752a1d26492e7bddb68e046865b5885580 | |
parent | 15a14cdc33367269b4e6297ab8fb73524ac6bac8 (diff) |
fdo#36874: Label PRINTING misplaced on paper sheet
-rw-r--r-- | sw/source/ui/app/applab.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx index f6784f5daff4..e913db72f742 100644 --- a/sw/source/ui/app/applab.cxx +++ b/sw/source/ui/app/applab.cxx @@ -264,10 +264,14 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel) aDesc.SetUseOn(nsUseOnPage::PD_ALL); // Site numbering + // fix (fdo36874) revised page size calculation // Set page size - rFmt.SetFmtAttr(SwFmtFrmSize(ATT_FIX_SIZE, - rItem.lLeft + rItem.nCols * rItem.lHDist + MINLAY, - rItem.lUpper + rItem.nRows * rItem.lVDist + MINLAY)); + long lPgWidth, lPgHeight; + lPgWidth = (((rItem.lLeft + (rItem.nCols - 1) * rItem.lHDist + rItem.lWidth + rItem.lLeft) > MINLAY) ? + (rItem.lLeft + (rItem.nCols - 1) * rItem.lHDist + rItem.lWidth + rItem.lLeft) : MINLAY); + lPgHeight = (((rItem.lUpper + (rItem.nRows - 1) * rItem.lVDist + rItem.lHeight + rItem.lUpper) > MINLAY) ? + (rItem.lUpper + (rItem.nRows - 1) * rItem.lVDist + rItem.lHeight + rItem.lUpper) : MINLAY); + rFmt.SetFmtAttr( SwFmtFrmSize( ATT_FIX_SIZE, lPgWidth, lPgHeight )); // Numbering type SvxNumberType aType; |