[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - dbaccess/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sat Aug 22 02:34:50 UTC 2020
dbaccess/source/ui/dlg/directsql.cxx | 12 ++++++++++++
1 file changed, 12 insertions(+)
New commits:
commit a1fcdd52ff55d8564ccc174b765dd4f38a785223
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Aug 18 21:09:18 2020 +0100
Commit: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Sat Aug 22 04:34:20 2020 +0200
don't include syntax highlighting in undo/redo
Change-Id: I7d7560fe94a7c9748ddd1a5e5584ef3e4b1efea2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100960
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx
index 5e7b579df72e..8cb2a2e2ac0a 100644
--- a/dbaccess/source/ui/dlg/directsql.cxx
+++ b/dbaccess/source/ui/dlg/directsql.cxx
@@ -77,6 +77,9 @@ namespace dbaui
if (nChar == -1)
return;
+ bool bUndoEnabled = m_xEditEngine->IsUndoEnabled();
+ m_xEditEngine->EnableUndo(false);
+
sal_uInt32 nPara = nStartPara;
do
{
@@ -111,6 +114,8 @@ namespace dbaui
++nCount;
}
} while (nPara--);
+
+ m_xEditEngine->EnableUndo(bUndoEnabled);
}
bool SQLEditView::KeyInput(const KeyEvent& rKEvt)
@@ -461,6 +466,10 @@ namespace dbaui
{
m_bInUpdate = true;
EditEngine& rEditEngine = m_xSQL->GetEditEngine();
+
+ bool bUndoEnabled = rEditEngine.IsUndoEnabled();
+ rEditEngine.EnableUndo(false);
+
// syntax highlighting
bool bOrigModified = rEditEngine.IsModified();
for (sal_Int32 nLine=0; nLine < rEditEngine.GetParagraphCount(); ++nLine)
@@ -484,6 +493,9 @@ namespace dbaui
}
if (!bOrigModified)
rEditEngine.ClearModifyFlag();
+
+ rEditEngine.EnableUndo(bUndoEnabled);
+
m_bInUpdate = false;
}
More information about the Libreoffice-commits
mailing list