[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 2 commits - sc/source sfx2/source

Henry Castro (via logerrit) logerrit at kemper.freedesktop.org
Fri Apr 9 13:47:43 UTC 2021


 sc/source/ui/app/inputwin.cxx  |    5 +++++
 sc/source/ui/unoobj/docuno.cxx |    5 -----
 sfx2/source/appl/app.cxx       |   21 +++++++++++++++++++++
 3 files changed, 26 insertions(+), 5 deletions(-)

New commits:
commit 31daa9fd1e6aed4ccc79a7b8d869a2fe532f0199
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Tue Mar 2 19:35:01 2021 -0400
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 14:47:08 2021 +0100

    lok: show error message dialog for VBA macros
    
    It creates and exclusive message dialog to show
    the VBA errors to client side.
    
    Otherwise the IDE window to show the source code
    and the error message is not supported yet.
    
    Change-Id: Ie74f911b109cb13aebd39de2cb8e899d779c1cf1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111854
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113689
    Tested-by: Jenkins
    Reviewed-by: Henry Castro <hcastro at collabora.com>

diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index f3138419f4a3..ed0596250056 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -29,6 +29,7 @@
 #include <svl/svdde.hxx>
 #include <unotools/configmgr.hxx>
 #include <com/sun/star/frame/XFrame.hpp>
+#include <comphelper/lok.hxx>
 #include <comphelper/processfactory.hxx>
 #include <com/sun/star/uri/UriReferenceFactory.hpp>
 #include <com/sun/star/uri/XVndSunStarScriptUrl.hpp>
@@ -390,6 +391,26 @@ IMPL_STATIC_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBas
     return false;
 #else
 
+    if (comphelper::LibreOfficeKit::isActive())
+    {
+        OUString aError;
+        std::unique_ptr<ErrorInfo> pErrorInfo = ErrorInfo::GetErrorInfo(StarBASIC::GetErrorCode());
+        if (ErrorStringFactory::CreateString(pErrorInfo.get(), aError))
+        {
+            const SfxViewFrame* pViewFrame = SfxViewFrame::Current();
+            std::shared_ptr<weld::MessageDialog> xBox;
+            xBox.reset(Application::CreateMessageDialog(
+                           pViewFrame->GetWindow().GetFrameWeld(),
+                           VclMessageType::Error,
+                           VclButtonsType::Ok,
+                           aError,
+                           true));
+
+            xBox->runAsync(xBox, [](sal_Int32 /*nResult*/) {});
+        }
+        return true;
+    }
+
 #ifndef DISABLE_DYNLOADING
     basicide_handle_basic_error pSymbol = reinterpret_cast<basicide_handle_basic_error>(sfx2::getBasctlFunction("basicide_handle_basic_error"));
 
commit 528f93ea1bb791f2bee78fca0e2c090b7e234136
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Thu Feb 4 14:35:04 2021 +0000
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 14:47:08 2021 +0100

    lok: sc - suppress LOK editengine events for the calc input bar.
    
    The calc input uses an EditEngine - but it emits events as if it is
    part of the document - as well as emitting events as if it is a dialog
    window. This causes horrible jumping artifacts to the top of the
    document with word auto-completion and typing in cells a few page down.
    
    Also remove obsolete tweak to turn off autocorrect for LOK, since
    it was contradicted by: 1f0943e5e9432f96daff9f3b006388d5bc7415b2
    
    Change-Id: I7352cd3b5ca6d18645cfd9e18959b0e44ec969d7
    Signed-off-by: Michael Meeks <michael.meeks at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110422
    Tested-by: Jenkins

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 1b81059f4fed..21cf4519cd83 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1511,6 +1511,11 @@ void ScTextWnd::InitEditEngine()
         static_cast<ScEditEngineDefaulter*>(m_xEditEngine.get())->SetTextCurrentDefaults(aString); // At least the right text then
 
     m_xEditView = std::make_unique<EditView>(m_xEditEngine.get(), nullptr);
+
+    // we get cursor, selection etc. messages from the VCL/window layer
+    // otherwise these are injected into the document causing confusion.
+    m_xEditView->SuppressLOKMessages(true);
+
     m_xEditView->setEditViewCallbacks(this);
     m_xEditView->SetInsertMode(bIsInsertMode);
 
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index eca643fc5a1c..b6d19cce1fcb 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1167,11 +1167,6 @@ void ScModelObj::initializeForTiledRendering(const css::uno::Sequence<css::beans
 {
     SolarMutexGuard aGuard;
 
-    // disable word autocompletion
-    ScAppOptions aAppOptions( SC_MOD()->GetAppOptions() );
-    aAppOptions.SetAutoComplete(false);
-    SC_MOD()->SetAppOptions(aAppOptions);
-
     for (const beans::PropertyValue& rValue : rArguments)
     {
         if (rValue.Name == ".uno:SpellOnline" && rValue.Value.has<bool>())


More information about the Libreoffice-commits mailing list