summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2024-02-06 14:08:12 +0100
committerThorsten Behrens <thorsten.behrens@allotropia.de>2024-02-09 00:05:39 +0100
commitbbe1f37645cf864c7c974d36cf2fe3a73d0c085f (patch)
treec07a796e9d49b3e12c016e2bcb506d3ff59cc918 /editeng
parentad4a06692b05c4312c1c7c8a8ff38cf12422e692 (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.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index 8daeee025c9b..e3e28207d11e 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 )
{