diff options
author | Tomaž Vajngerl <quikee@gmail.com> | 2013-09-13 17:04:31 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2013-09-15 15:34:15 +0200 |
commit | b46079bb41591d9697339e8250d4ca7bf0930c0f (patch) | |
tree | 134114fa7bc8bc3ed53c7fd968a9ded65d7b7d89 /sw | |
parent | 9d4cbae332c3741b76cd80a4b31c6e2bed4ccb66 (diff) |
Fix ruler margin dragging in vertical mode
Change-Id: I4727bbb304059859f3f5b4a96f834b41191c0bab
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/uiview/viewtab.cxx | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx index 2be6825398f7..e5c4f30a23e6 100644 --- a/sw/source/ui/uiview/viewtab.cxx +++ b/sw/source/ui/uiview/viewtab.cxx @@ -1610,19 +1610,38 @@ void SwView::StateTabWin(SfxItemSet& rSet) const SwRect aPrtRect = rSh.GetAnyCurRect(RECT_PAGE_PRT, pPt); const SvxBoxItem& rBox = (const SvxBoxItem&)rMaster.GetFmtAttr(RES_BOX); long nDist = rBox.GetDistance(); - ::lcl_FillSvxColumn(aCol, + + lcl_FillSvxColumn( + aCol, sal_uInt16(bVerticalWriting ? aPrtRect.Height() : aPrtRect.Width() ), aColItem, nDist); if(bBrowse) { - aColItem.SetLeft((sal_uInt16)rPagePrtRect.Left()); - aColItem.SetRight(sal_uInt16(nPageWidth - rPagePrtRect.Right())); + if (bVerticalWriting) + { + aColItem.SetLeft((sal_uInt16)rPagePrtRect.Top()); + aColItem.SetRight(sal_uInt16(nPageHeight - rPagePrtRect.Bottom())); + } + else + { + aColItem.SetLeft((sal_uInt16)rPagePrtRect.Left()); + aColItem.SetRight(sal_uInt16(nPageWidth - rPagePrtRect.Right())); + } } else { - aColItem.SetLeft (aPageLRSpace.GetLeft()); - aColItem.SetRight(aPageLRSpace.GetRight()); + if (bVerticalWriting) + { + SvxULSpaceItem aUL( rDesc.GetMaster().GetULSpace() ); + aColItem.SetLeft (aUL.GetUpper()); + aColItem.SetRight(aUL.GetLower()); + } + else + { + aColItem.SetLeft (aPageLRSpace.GetLeft()); + aColItem.SetRight(aPageLRSpace.GetRight()); + } } aColItem.SetOrtho(aColItem.CalcOrtho()); |