summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomaž Vajngerl <quikee@gmail.com>2013-07-25 23:55:05 +0200
committerTomaž Vajngerl <quikee@gmail.com>2013-07-26 00:05:03 +0200
commitbfa3f8584b2f2492f5c0573f22e4ebd96d9a8af5 (patch)
tree97e2e3fdfb283f1e17d6166c08e17e0f1ddc662d /include
parent81219456462e831cf931d7594657281b5c4c09a1 (diff)
fdo#38144 Enhance snapping to markers, also snap to frame margins
Change-Id: I5de4f8bafecabf84224a0518d9515295d23d7321
Diffstat (limited to 'include')
-rw-r--r--include/svtools/ruler.hxx3
-rw-r--r--include/svx/ruler.hxx4
2 files changed, 5 insertions, 2 deletions
diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx
index 04237dfe40e2..b37aa817be2b 100644
--- a/include/svtools/ruler.hxx
+++ b/include/svtools/ruler.hxx
@@ -771,6 +771,9 @@ public:
void SetMargin2( long nPos, sal_uInt16 nMarginStyle = RULER_MARGIN_SIZEABLE );
long GetMargin2() const;
+ void SetLeftFrameMargin( long nPos );
+ void SetRightFrameMargin( long nPos );
+
void SetLines( sal_uInt16 n = 0, const RulerLine* pLineAry = NULL );
void SetBorders( sal_uInt16 n = 0, const RulerBorder* pBrdAry = NULL );
diff --git a/include/svx/ruler.hxx b/include/svx/ruler.hxx
index a6faad748bc8..f017dafeb0f4 100644
--- a/include/svx/ruler.hxx
+++ b/include/svx/ruler.hxx
@@ -124,8 +124,8 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener
void UpdateColumns();
void UpdateObject();
- // Normalize position to the ruler's tick value
- void NormalizePosition(long& rValue) const;
+ // Convert position to stick to ruler ticks
+ long MakePositionSticky(long rValue, bool aSnapToFrameMargin = true) const;
long PixelHAdjust(long lPos, long lPos2) const;
long PixelVAdjust(long lPos, long lPos2) const;