[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - include/LibreOfficeKit libreofficekit/source sc/source
gokaysatir (via logerrit)
logerrit at kemper.freedesktop.org
Mon Sep 28 09:51:22 UTC 2020
include/LibreOfficeKit/LibreOfficeKitEnums.h | 9 +++++++++
libreofficekit/source/gtk/lokdocview.cxx | 1 +
sc/source/ui/inc/gridwin.hxx | 1 +
sc/source/ui/view/gridwin.cxx | 13 +++++++++++++
sc/source/ui/view/tabview3.cxx | 1 +
5 files changed, 25 insertions(+)
New commits:
commit 41f6f56c54277d3e1bb1c6fe84393b5abbc6731d
Author: gokaysatir <gokaysatir at collabora.com>
AuthorDate: Tue Sep 15 11:35:16 2020 +0300
Commit: Gökay ŞATIR <gokaysatir at collabora.com>
CommitDate: Mon Sep 28 11:50:47 2020 +0200
Online: Show input help on Online / Core part.
Change-Id: I9d10179f266a725b770fdae50045fdb5d77178ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102708
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103521
Reviewed-by: Gökay ŞATIR <gokaysatir at collabora.com>
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index 96eda9b50978..208ad9065950 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -747,6 +747,13 @@ typedef enum
* }
*/
LOK_CALLBACK_FORM_FIELD_BUTTON = 49,
+
+ /**
+ * When for the current cell is defined an input help text.
+ *
+ * The payload format is JSON: { "title": "title text", "content": "content text" }
+ */
+ LOK_CALLBACK_VALIDITY_INPUT_HELP = 51,
}
LibreOfficeKitCallbackType;
@@ -851,6 +858,8 @@ static inline const char* lokCallbackTypeToString(int nType)
return "LOK_CALLBACK_WINDOW";
case LOK_CALLBACK_VALIDITY_LIST_BUTTON:
return "LOK_CALLBACK_VALIDITY_LIST_BUTTON";
+ case LOK_CALLBACK_VALIDITY_INPUT_HELP:
+ return "LOK_CALLBACK_VALIDITY_INPUT_HELP";
case LOK_CALLBACK_CLIPBOARD_CHANGED:
return "LOK_CALLBACK_CLIPBOARD_CHANGED";
case LOK_CALLBACK_CONTEXT_CHANGED:
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index db83f8e9f1f3..581237d550f0 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1367,6 +1367,7 @@ callback (gpointer pData)
case LOK_CALLBACK_DOCUMENT_PASSWORD:
case LOK_CALLBACK_DOCUMENT_PASSWORD_TO_MODIFY:
case LOK_CALLBACK_VALIDITY_LIST_BUTTON:
+ case LOK_CALLBACK_VALIDITY_INPUT_HELP:
case LOK_CALLBACK_SIGNATURE_STATUS:
case LOK_CALLBACK_CONTEXT_MENU:
case LOK_CALLBACK_PROFILE_FRAME:
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 03f0763883e5..14f059df7814 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -466,6 +466,7 @@ public:
virtual FactoryFunction GetUITestFactory() const override;
void updateLOKValListButton(bool bVisible, const ScAddress& rPos) const;
+ void updateLOKInputHelp(const OUString& title, const OUString& content) const;
protected:
void ImpCreateOverlayObjects();
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 6e8cfc680e47..5a8bf3a1734f 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -4689,6 +4689,19 @@ void ScGridWindow::UpdateAutoFillMark(bool bMarked, const ScRange& rMarkRange)
}
}
+void ScGridWindow::updateLOKInputHelp(const OUString& title, const OUString& content) const
+{
+ ScTabViewShell* pViewShell = pViewData->GetViewShell();
+
+ boost::property_tree::ptree aTree;
+ aTree.put("title", title);
+ aTree.put("content", content);
+
+ std::stringstream aStream;
+ boost::property_tree::write_json(aStream, aTree);
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_VALIDITY_INPUT_HELP, aStream.str().c_str());
+}
+
void ScGridWindow::updateLOKValListButton( bool bVisible, const ScAddress& rPos ) const
{
SCCOL nX = rPos.Col();
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 07f644d7dd5a..164771d77546 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -809,6 +809,7 @@ void ScTabView::TestHintWindow()
if (pWindow == pWin)
{
xOverlayManager->add(*pOverlay);
+ pWindow->updateLOKInputHelp(aTitle, aMessage);
}
else
{
More information about the Libreoffice-commits
mailing list