summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2020-05-19 12:42:33 +0530
committerDennis Francis <dennis.francis@collabora.com>2020-05-25 00:39:55 +0530
commitf6685707441770e7141b7b31fed1c2ddf550e297 (patch)
tree416c6a5c1e8ecae2fea6bd30ca78d768e0be4a0e
parentbe7c109de9ae2b1849951e7eb3a4cc2d9a719605 (diff)
lokit: add new callback type LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY
This is to notify the clients about changes in current sheet's geometry data. Change-Id: I478d2e646606320399905d7b15881a165a53146d
-rw-r--r--desktop/source/lib/init.cxx1
-rw-r--r--include/LibreOfficeKit/LibreOfficeKitEnums.h16
-rw-r--r--libreofficekit/source/gtk/lokdocview.cxx1
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx5
-rw-r--r--sc/source/ui/view/tabvwshc.cxx6
5 files changed, 29 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 4c6f16e2ccd0..942dc2be7310 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1407,6 +1407,7 @@ void CallbackFlushHandler::queue(const int type, const char* data)
case LOK_CALLBACK_INVALIDATE_HEADER:
case LOK_CALLBACK_WINDOW:
case LOK_CALLBACK_CALC_FUNCTION_LIST:
+ case LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY:
{
const auto& pos = std::find_if(m_queue.rbegin(), m_queue.rend(),
[type] (const queue_type::value_type& elem) { return (elem.Type == type); });
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index 32fd9f657a5a..c091778a6389 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -747,6 +747,20 @@ typedef enum
* }
*/
LOK_CALLBACK_FORM_FIELD_BUTTON = 49,
+
+ /**
+ * This is Calc specific. Indicates that some or all of the current sheet's
+ * geometry data has changed. Clients must request a full or partial sheet
+ * geometry data set.
+ *
+ * The payload specifies what part of the sheet geometry data has changed.
+ * The payload format is:
+ * 'all|rows|columns [sizes [hidden [filtered [groups]]]]'
+ *
+ * For example, the payload 'rows sizes groups' indicates that the row heights
+ * and row-groups data have changed.
+ */
+ LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY = 50,
}
LibreOfficeKitCallbackType;
@@ -875,6 +889,8 @@ static inline const char* lokCallbackTypeToString(int nType)
return "LOK_CALLBACK_TAB_STOP_LIST";
case LOK_CALLBACK_FORM_FIELD_BUTTON:
return "LOK_CALLBACK_FORM_FIELD_BUTTON";
+ case LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY:
+ return "LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY";
}
assert(!"Unknown LibreOfficeKitCallbackType type.");
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 75deee7a38a0..3c09d7647457 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1400,6 +1400,7 @@ callback (gpointer pData)
case LOK_CALLBACK_CALC_FUNCTION_LIST:
case LOK_CALLBACK_TAB_STOP_LIST:
case LOK_CALLBACK_FORM_FIELD_BUTTON:
+ case LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY:
{
// TODO: Implement me
break;
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index fad4de239c35..467cf12ef99b 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -388,6 +388,11 @@ public:
/// Emits a LOK_CALLBACK_INVALIDATE_HEADER for all views whose current tab is equal to nCurrentTabIndex
static void notifyAllViewsHeaderInvalidation(HeaderType eHeaderType, SCTAB nCurrentTabIndex);
static void notifyAllViewsHeaderInvalidation(bool Columns, SCTAB nCurrentTabIndex);
+ /// Emits a LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY for all views whose current tab
+ /// is equal to nCurrentTabIndex
+ static void notifyAllViewsSheetGeomInvalidation(bool bColumns, bool bRows, bool bSizes,
+ bool bHidden, bool bFiltered, bool bGroups,
+ SCTAB nCurrentTabIndex);
static bool isAnyEditViewInRange(bool bColumns, SCCOLROW nStart, SCCOLROW nEnd);
css::uno::Reference<css::drawing::XShapes> getSelectedXShapes();
static css::uno::Reference<css::datatransfer::XTransferable2> GetClipData(vcl::Window* pWin);
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index afb406b4863a..d26874ea47f4 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -533,6 +533,12 @@ void ScTabViewShell::notifyAllViewsHeaderInvalidation(bool bColumns, SCTAB nCurr
ScTabViewShell::notifyAllViewsHeaderInvalidation(eHeaderType, nCurrentTabIndex);
}
+void ScTabViewShell::notifyAllViewsSheetGeomInvalidation(bool bColumns, bool bRows, bool bSizes,
+ bool bHidden, bool bFiltered, bool bGroups,
+ SCTAB nCurrentTabIndex)
+{
+}
+
bool ScTabViewShell::isAnyEditViewInRange(bool bColumns, SCCOLROW nStart, SCCOLROW nEnd)
{
if (comphelper::LibreOfficeKit::isActive())