summaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKitEnums.h19
-rw-r--r--include/sfx2/sfxsids.hrc2
-rw-r--r--include/svtools/ruler.hxx1
-rw-r--r--include/svx/ruler.hxx9
-rw-r--r--include/svx/svxids.hrc1
-rw-r--r--include/vcl/ITiledRenderable.hxx9
6 files changed, 38 insertions, 3 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index 300b71bb01ff..c3b71f3f1aad 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -504,7 +504,24 @@ typedef enum
/**
* The text content of the address field in Calc.
*/
- LOK_CALLBACK_CELL_ADDRESS = 34
+ LOK_CALLBACK_CELL_ADDRESS = 34,
+ /**
+ * The key ruler related properties on change are reported by this.
+ *
+ * The payload format is:
+ *
+ * {
+ * "margin1": "...",
+ * "margin2": "...",
+ * "leftOffset": "...",
+ * "pageOffset": "...",
+ * "pageWidth": "...",
+ * "unit": "..."
+ * }
+ *
+ * Here all aproperties are same as described in svxruler.
+ */
+ LOK_CALLBACK_RULER_UPDATE = 35
}
LibreOfficeKitCallbackType;
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index cfc59403d198..20afe0808bc2 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -562,6 +562,8 @@
#define SID_COMP_BIBLIOGRAPHY (SID_SVX_START + 880)
#define SID_ADDRESS_DATA_SOURCE (SID_SVX_START + 934)
#define SID_OPEN_SMARTTAGOPTIONS (SID_SVX_START + 1062)
+#define SID_RULER_MARGIN1 (SID_SVX_START + 1063)
+#define SID_RULER_MARGIN2 (SID_SVX_START + 1064)
#define FID_SVX_START (SID_LIB_START + 500)
#define FID_SEARCH_NOW (FID_SVX_START + 2)
diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx
index 1c5b0cdea845..fa9da1d8c162 100644
--- a/include/svtools/ruler.hxx
+++ b/include/svtools/ruler.hxx
@@ -776,6 +776,7 @@ public:
void SetMargin2() { SetMargin2( 0, RulerMarginStyle::Invisible ); }
void SetMargin2( long nPos, RulerMarginStyle nMarginStyle = RulerMarginStyle::Sizeable );
long GetMargin2() const;
+ long GetPageWidth() const;
void SetLeftFrameMargin( long nPos );
void SetRightFrameMargin( long nPos );
diff --git a/include/svx/ruler.hxx b/include/svx/ruler.hxx
index d8a78516b156..f8ba4cea149f 100644
--- a/include/svx/ruler.hxx
+++ b/include/svx/ruler.hxx
@@ -41,6 +41,12 @@ class SvxObjectItem;
class SfxBoolItem;
struct SvxRuler_Impl;
+enum class RulerChangeType
+{
+ MARGIN1,
+ MARGIN2
+};
+
enum class SvxRulerDragFlags
{
NONE = 0x00,
@@ -255,7 +261,6 @@ protected:
bool bForceDontConsiderHidden = false,
sal_uInt16 nAct=USHRT_MAX ) const;
long CalcPropMaxRight(sal_uInt16 nCol = USHRT_MAX) const;
- long GetPageWidth() const;
public:
@@ -278,6 +283,8 @@ public:
//#i24363# tab stops relative to indent
void SetTabsRelativeToIndent( bool bRel );
+ void SetValues(RulerChangeType type, long value);
+ long GetPageWidth() const;
};
#endif
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 40b63ea05018..394276fd1ac3 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -255,6 +255,7 @@
// CAUTION! Range <64 .. 67> used by EditEngine (!)
+#define SID_RULER_CHANGE_STATE ( SID_SVX_START + 78 )
#define SID_RULER_NULL_OFFSET ( SID_SVX_START + 79 )
#define SID_RULER_BORDERS ( SID_SVX_START + 80 )
#define SID_RULER_OBJECT ( SID_SVX_START + 81 )
diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx
index e330cd14f074..ae3ba9e76c3c 100644
--- a/include/vcl/ITiledRenderable.hxx
+++ b/include/vcl/ITiledRenderable.hxx
@@ -13,6 +13,7 @@
#include <LibreOfficeKit/LibreOfficeKitTypes.h>
#include <tools/gen.hxx>
+#include <svx/ruler.hxx>
#include <vcl/pointr.hxx>
#include <vcl/virdev.hxx>
#include <com/sun/star/datatransfer/clipboard/XClipboardEx.hpp>
@@ -233,8 +234,14 @@ public:
{
return OUString();
}
-};
+ /// Implementation for
+ /// lok::Document::getCommandValues(".uno:RulerState");
+ virtual OUString getRulerState()
+ {
+ return OUString();
+ }
+};
} // namespace vcl
#endif // INCLUDED_VCL_ITILEDRENDERABLE_HXX