summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAditya Dewan <iit2015097@iiita.ac.in>2017-07-15 21:47:14 +0530
committerpranavk <pranavk@collabora.co.uk>2017-08-17 13:10:30 +0200
commitd64a7f4ba80fa2a0a0ad2bddc6906ab6b78a23c8 (patch)
tree8269f9ab235c5a4b31ede606bc64b0b474591102 /include
parentea43e0e3ceec30336273da0fb3d47c24073cffd2 (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 d8703674810e..ea38db1e3cea 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -541,6 +541,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 e95febf8fabd..affdebf10099 100644
--- a/include/svtools/ruler.hxx
+++ b/include/svtools/ruler.hxx
@@ -773,6 +773,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 2fef8b7fb7c9..02baa710d2c8 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,
@@ -250,7 +256,6 @@ protected:
bool bForceDontConsiderHidden = false,
sal_uInt16 nAct=USHRT_MAX ) const;
long CalcPropMaxRight(sal_uInt16 nCol = USHRT_MAX) const;
- long GetPageWidth() const;
public:
@@ -273,6 +278,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 2c37e45b9c21..157eb35431f1 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -234,6 +234,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 1689eee3543d..7b0720a429b7 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>
@@ -220,8 +221,14 @@ public:
{
return OUString();
}
-};
+ /// Implementation for
+ /// lok::Document::getCommandValues(".uno:RulerState");
+ virtual OUString getRulerState()
+ {
+ return OUString();
+ }
+};
} // namespace vcl
#endif // INCLUDED_VCL_ITILEDRENDERABLE_HXX