diff options
author | Mihai Varga <mihai.varga@collabora.com> | 2015-11-13 09:48:14 +0200 |
---|---|---|
committer | Mihai Varga <mihai.mv13@gmail.com> | 2015-11-16 15:03:01 +0200 |
commit | 8a5cf61b7b0dc6668c283fe9476b3474736d33bc (patch) | |
tree | ab649da5f57117168cdc1d5173ad6a5c9a65fc80 /sc | |
parent | c4d5cbfa85dba8a695ccdc98a57685bd48bbbee8 (diff) |
LOK: calc formula callback + formula bar implementation in gtk
We need the callback to be able implement the formula bar
Change-Id: I1c78ab0b9ed9304c0465a9993a7101f8efb91052
Conflicts:
include/LibreOfficeKit/LibreOfficeKitEnums.h
libreofficekit/source/gtk/lokdocview.cxx
Conflicts:
libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
libreofficekit/source/gtk/lokdocview.cxx
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index fe9ef00e709f..fa2225e257bc 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -52,6 +52,7 @@ #include <tools/urlobj.hxx> #include <comphelper/string.hxx> #include <formula/formulahelper.hxx> +#include <LibreOfficeKit/LibreOfficeKitEnums.h> #include "inputwin.hxx" #include "tabvwsh.hxx" @@ -2138,6 +2139,11 @@ void ScInputHandler::DataChanged( bool bFromTopNotify, bool bSetModified ) if ( pInputWin ) pInputWin->SetTextString( aText ); + + ScDocShell* pDocSh = pActiveViewSh->GetViewData().GetDocShell(); + ScDocument& rDoc = pDocSh->GetDocument(); + if ( rDoc.GetDrawLayer()->isTiledRendering() ) + rDoc.GetDrawLayer()->libreOfficeKitCallback(LOK_CALLBACK_CELL_FORMULA, aText.toUtf8().getStr()); } // If the cursor is before the end of a paragraph, parts are being pushed to @@ -3474,6 +3480,8 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState, if ( pInputWin ) pInputWin->SetTextString(aString); + else if ( rDoc.GetDrawLayer()->isTiledRendering() ) + rDoc.GetDrawLayer()->libreOfficeKitCallback(LOK_CALLBACK_CELL_FORMULA, aString.toUtf8().getStr()); } if ( pInputWin ) // Named range input |