diff options
author | Henry Castro <hcastro@collabora.com> | 2023-02-28 09:42:16 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2023-05-06 21:05:54 +0200 |
commit | f13f89b97ce0a9d394c06cc4c8cedbeb6f7278a6 (patch) | |
tree | 77baf0cf05e52d2f24dddb4e25380d3a3a5fbc2d | |
parent | 8e4f947ca6a2dc5a3c05347af7dfde2146352abe (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/+/151427
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
-rw-r--r-- | editeng/source/editeng/editeng.cxx | 11 | ||||
-rw-r--r-- | include/editeng/editeng.hxx | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index e63de2032da1..d364cc47a179 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -1871,6 +1871,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 6ac71935d54f..57e57125da8c 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -402,6 +402,8 @@ public: bool IsFlatMode() const; void SetFlatMode( bool bFlat ); + void SetSingleLine( bool bValue ); + void SetControlWord( EEControlBits nWord ); EEControlBits GetControlWord() const; |