[Libreoffice-commits] core.git: dbaccess/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Aug 19 08:13:23 UTC 2020
dbaccess/source/ui/control/sqledit.cxx | 11 +++++++++++
1 file changed, 11 insertions(+)
New commits:
commit 6724040e61c1efbee0b1456e3480b1e7b0827732
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Aug 18 21:09:18 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Aug 19 10:12:38 2020 +0200
don't include syntax highlighting in undo/redo
Change-Id: I7d7560fe94a7c9748ddd1a5e5584ef3e4b1efea2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100959
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx
index 5abf5e228f7c..9790cdab297d 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -201,6 +201,10 @@ void SQLEditView::UpdateData()
{
m_bInUpdate = true;
EditEngine& rEditEngine = GetEditEngine();
+
+ bool bUndoEnabled = rEditEngine.IsUndoEnabled();
+ rEditEngine.EnableUndo(false);
+
// syntax highlighting
bool bOrigModified = rEditEngine.IsModified();
for (sal_Int32 nLine=0; nLine < rEditEngine.GetParagraphCount(); ++nLine)
@@ -226,6 +230,8 @@ void SQLEditView::UpdateData()
rEditEngine.ClearModifyFlag();
m_bInUpdate = false;
+ rEditEngine.EnableUndo(bUndoEnabled);
+
Invalidate();
}
@@ -265,6 +271,9 @@ void SQLEditView::DoBracketHilight(sal_uInt16 nKey)
if (nChar == -1)
return;
+ bool bUndoEnabled = m_xEditEngine->IsUndoEnabled();
+ m_xEditEngine->EnableUndo(false);
+
sal_uInt32 nPara = nStartPara;
do
{
@@ -299,6 +308,8 @@ void SQLEditView::DoBracketHilight(sal_uInt16 nKey)
++nCount;
}
} while (nPara--);
+
+ m_xEditEngine->EnableUndo(bUndoEnabled);
}
Color SQLEditView::GetSyntaxHighlightColor(const svtools::ColorConfig& rColorConfig, HighlighterLanguage eLanguage, TokenType aToken)
More information about the Libreoffice-commits
mailing list