summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2023-02-28 09:42:16 -0400
committerHenry Castro <hcastro@collabora.com>2023-06-21 17:18:40 +0200
commitba38ef8f7733a8fcfdc9228c5cf746c3130976c7 (patch)
tree7bf52260b61cab0b5a4674c8e9b09437c39030cb
parent2bef6e112b5ed9b37fafd71a71b883d01c8716d7 (diff)
editeng: add setter function SingleLine
Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I66cad37e1d3728369f0a08195bf85e6c0d50f0ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148000 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153399 Tested-by: Jenkins
-rw-r--r--editeng/source/editeng/editeng.cxx11
-rw-r--r--include/editeng/editeng.hxx2
2 files changed, 13 insertions, 0 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 12e52b27331a..c766328fd667 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -1872,6 +1872,17 @@ bool EditEngine::IsFlatMode() const
return !( pImpEditEngine->aStatus.UseCharAttribs() );
}
+void EditEngine::SetSingleLine(bool bValue)
+{
+ if (bValue == pImpEditEngine->aStatus.IsSingleLine())
+ return;
+
+ if (bValue)
+ pImpEditEngine->aStatus.TurnOnFlags(EEControlBits::SINGLELINE);
+ else
+ pImpEditEngine->aStatus.TurnOffFlags(EEControlBits::SINGLELINE);
+}
+
void EditEngine::SetControlWord( EEControlBits nWord )
{
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx
index b31b77160ad5..85accc9d36e3 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -404,6 +404,8 @@ public:
bool IsFlatMode() const;
void SetFlatMode( bool bFlat );
+ void SetSingleLine( bool bValue );
+
void SetControlWord( EEControlBits nWord );
EEControlBits GetControlWord() const;