diff options
author | Oliver Specht <oliver.specht@cib.de> | 2024-02-06 14:08:12 +0100 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2024-04-30 11:13:25 +0200 |
commit | e7471f2ca4f5c61433c0479bb006ce6d9c2e05c5 (patch) | |
tree | fcd1a1a454d979f6f09ee2c977078d27a0c8f2c2 /editeng | |
parent | be67803b1d90d3c7d516cd2acd144e3d26f34373 (diff) |
Clone Formatting in Impress: Include list attribute
Copies list type and list level from source to target paragraph(s).
Also switches off lists, if source is not in a list.
Change-Id: I260f1d7d9936476f16c355a3a09204b3fb4592d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163054
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/outliner/outlvw.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index 136ecd776c26..3abf627e86b5 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -384,6 +384,24 @@ void OutlinerView::Select( Paragraph const * pParagraph, bool bSelect ) pEditView->SetSelection( aSel ); } +void OutlinerView::SetDepth(sal_Int32 nParagraph, sal_Int16 nDepth) +{ + Paragraph* pParagraph = pOwner->GetParagraph(nParagraph); + pOwner->SetDepth(pParagraph, nDepth); +} + +sal_Int16 OutlinerView::GetDepth() const +{ + ESelection aESelection = GetSelection(); + aESelection.Adjust(); + sal_Int16 nDepth = pOwner->GetDepth(aESelection.nStartPara); + for (sal_Int32 nPara = aESelection.nStartPara + 1; nPara <= aESelection.nEndPara; ++nPara) + { + if (nDepth != pOwner->GetDepth(nPara)) + return -2; + } + return nDepth; +} void OutlinerView::SetAttribs( const SfxItemSet& rAttrs ) { |