summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/drviews3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/view/drviews3.cxx')
-rw-r--r--sd/source/ui/view/drviews3.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index 90160c3e521a..11690795a70c 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -29,6 +29,7 @@
#include <editeng/frmdiritem.hxx>
#include <editeng/adjustitem.hxx>
#include <svx/ruler.hxx>
+#include <svx/svdotable.hxx>
#include <editeng/numitem.hxx>
#include <svx/rulritem.hxx>
#include <sfx2/zoomitem.hxx>
@@ -932,7 +933,16 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet)
aPointItem.SetValue( aPos );
- aLRSpace.SetLeft( aPagePos.X() + maMarkRect.Left() );
+ ::tools::Rectangle aParaRect(maMarkRect);
+ if (pObj->GetObjIdentifier() == OBJ_TABLE)
+ {
+ sdr::table::SdrTableObj* pTable = static_cast<sdr::table::SdrTableObj*>(pObj);
+ sdr::table::CellPos cellpos;
+ pTable->getActiveCellPos(cellpos);
+ pTable->getCellBounds(cellpos, aParaRect);
+ }
+
+ aLRSpace.SetLeft(aPagePos.X() + aParaRect.Left());
if ( aEditAttr.GetItemState( SDRATTR_TEXT_LEFTDIST ) == SfxItemState::SET )
{
@@ -941,7 +951,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet)
aLRSpace.SetLeft( aLRSpace.GetLeft() + nLD );
}
- aLRSpace.SetRight( aRect.Right() + aPageSize.Width() - maMarkRect.Right() );
+ aLRSpace.SetRight(aRect.Right() + aPageSize.Width() - aParaRect.Right());
aULSpace.SetUpper( aPagePos.Y() + maMarkRect.Top() );
aULSpace.SetLower( aRect.Bottom() + aPageSize.Height() - maMarkRect.Bottom() );