summaryrefslogtreecommitdiff
path: root/editeng/source/outliner/outlvw.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'editeng/source/outliner/outlvw.cxx')
-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 )
{