diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-05-23 15:40:08 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-06-08 14:50:33 +0200 |
commit | c4f615b359be56e88e4fbf9aaaf30affb29d57e2 (patch) | |
tree | 484f1caaf27bc3cefc0d1a7e0614342927117440 /editeng | |
parent | 064a13e94e9b38bc88381b5c497cf6c9ddbe93e4 (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>
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 7000403ff2b4..cb1244f2e30f 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -452,6 +452,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 a105716f8791..394165930379 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -561,6 +561,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; @@ -817,6 +820,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 fff957f46f14..6a14cda16f92 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -2635,6 +2635,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 1acab5ba4d48..a0ea00d555f6 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 ); |