summaryrefslogtreecommitdiff
path: root/svx
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
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')
-rw-r--r--svx/sdi/svx.sdi18
-rw-r--r--svx/source/dialog/svxruler.cxx13
2 files changed, 30 insertions, 1 deletions
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 91265a3df430..a2ea22bcf0c9 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -7216,6 +7216,24 @@ SvxProtectItem RulerProtect SID_RULER_PROTECT
GroupId = GID_VIEW;
]
+SfxVoidItem RulerChangeState SID_RULER_CHANGE_STATE
+(SfxStringItem Margin1 SID_RULER_MARGIN1, SfxStringItem Margin2 SID_RULER_MARGIN2)
+[
+ AutoUpdate = FALSE,
+ FastCall = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
SfxVoidItem SbaExecuteSql SID_FM_EXECUTE
()
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