diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-05-23 15:40:08 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-06-10 10:10:45 +0200 |
commit | 16064329c4c4385ca53b243354b04e0d794b1ca6 (patch) | |
tree | eec7032f49dddbdbe25a81b127b52edb86cb5263 /editeng | |
parent | c8522043b239aa0e463e6793b7c9b019d79b2d9d (diff) |
editengine-columns: Create document model and dialog page
Change-Id: I056aad9474ca18134d1f1686a53618cc9ab3d525
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116038
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116868
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editeng.cxx | 5 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 5 | ||||
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 14 | ||||
-rw-r--r-- | editeng/source/outliner/outlin2.cxx | 5 |
4 files changed, 29 insertions, 0 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 3c06cbf96f51..69b54b7f3a1a 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -448,6 +448,11 @@ bool EditEngine::GetDirectVertical() const return pImpEditEngine->GetDirectVertical(); } +void EditEngine::SetTextColumns(sal_Int16 nColumns, sal_Int32 nSpacing) +{ + pImpEditEngine->SetTextColumns(nColumns, nSpacing); +} + void EditEngine::SetFixedCellHeight( bool bUseFixedCellHeight ) { pImpEditEngine->SetFixedCellHeight( bUseFixedCellHeight ); diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 9ce1146ff3dd..8455304eb45b 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -563,6 +563,9 @@ private: sal_Int32 mnOverflowingLine = -1; bool mbNeedsChainingHandling = false; + sal_Int16 mnColumns = 1; + sal_Int32 mnColumnSpacing = 0; + // If it is detected at one point that the StatusHdl has to be called, but // this should not happen immediately (critical section): Timer aStatusTimer; @@ -819,6 +822,8 @@ public: void SetRotation( TextRotation nRotation); TextRotation GetRotation() const { return GetEditDoc().GetRotation(); } + void SetTextColumns(sal_Int16 nColumns, sal_Int32 nSpacing); + bool IsPageOverflow( ) const; void SetFixedCellHeight( bool bUseFixedCellHeight ); diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index bdd95a68d836..2eaf25b7b3b2 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -2636,6 +2636,20 @@ void ImpEditEngine::SetRotation(TextRotation nRotation) } } +void ImpEditEngine::SetTextColumns(sal_Int16 nColumns, sal_Int32 nSpacing) +{ + if (mnColumns != nColumns || mnColumnSpacing != nSpacing) + { + mnColumns = nColumns; + mnColumnSpacing = nSpacing; + if (IsFormatted()) + { + FormatFullDoc(); + UpdateViews(GetActiveView()); + } + } +} + void ImpEditEngine::SetFixedCellHeight( bool bUseFixedCellHeight ) { if ( IsFixedCellHeight() != bUseFixedCellHeight ) diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx index ff3d1583a5f1..8afc83af43f7 100644 --- a/editeng/source/outliner/outlin2.cxx +++ b/editeng/source/outliner/outlin2.cxx @@ -532,6 +532,11 @@ bool Outliner::IsTopToBottom() const return pEditEngine->IsTopToBottom(); } +void Outliner::SetTextColumns(sal_Int16 nColumns, sal_Int32 nSpacing) +{ + pEditEngine->SetTextColumns(nColumns, nSpacing); +} + void Outliner::SetFixedCellHeight( bool bUseFixedCellHeight ) { pEditEngine->SetFixedCellHeight( bUseFixedCellHeight ); |