summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorAditya Dewan <iit2015097@iiita.ac.in>2017-07-15 21:47:14 +0530
committerJan Holesovsky <kendy@collabora.com>2017-09-14 12:06:15 +0200
commitb04d175b03ec22c00e149fd3a42041225b156760 (patch)
tree8d877e4a483648ec8be2187d588ebc32e8ea7665 /svx/source
parent180dec34838389b17ed9d0d3d17fd19a6e5a9c71 (diff)
implementing callback for ruler invalidation
adding commands to fetch and changee ruler state '.uno:RulerState' and '.uno:RulerStateChange' Change-Id: I66107039a7ae5893691feb45c8ab2e4aa476ea76 Reviewed-on: https://gerrit.libreoffice.org/40727 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: pranavk <pranavk@collabora.co.uk>
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/dialog/svxruler.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index 9cd586654e31..2b178555828a 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -34,6 +34,7 @@
#include <editeng/tstpitem.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/protitem.hxx>
+#include <comphelper/lok.hxx>
#include <svx/svdtrans.hxx>
@@ -3628,4 +3629,14 @@ void SvxRuler::SetTabsRelativeToIndent( bool bRel )
mxRulerImpl->bIsTabsRelativeToIndent = bRel;
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+void SvxRuler::SetValues(RulerChangeType type, long diffValue)
+{
+ if (diffValue == 0)
+ return;
+
+ if (type == RulerChangeType::MARGIN1)
+ AdjustMargin1(diffValue);
+ else if (type == RulerChangeType::MARGIN2)
+ SetMargin2( GetMargin2() - diffValue);
+ ApplyMargins();
+} \ No newline at end of file