summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-05-02 12:19:44 +0000
committerOliver Bolte <obo@openoffice.org>2005-05-02 12:19:44 +0000
commitaea12117eeef91f4050b102c9ad53b3cadadfa61 (patch)
tree6b45c38af8b124948becb9a63f61944f4d46ae25 /sd/source/ui
parent7f283fcaea380c4f37a7afc34868f7758debe9c9 (diff)
INTEGRATION: CWS impress52 (1.34.16); FILE MERGED
2005/04/28 10:37:31 cl 1.34.16.1: #i48314# guard outliner callbacks from page change events
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/view/outlview.cxx23
1 files changed, 20 insertions, 3 deletions
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index c261ea20ad4a..424c7ed87f79 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: outlview.cxx,v $
*
- * $Revision: 1.34 $
+ * $Revision: 1.35 $
*
- * last change: $Author: obo $ $Date: 2005-04-18 11:38:06 $
+ * last change: $Author: obo $ $Date: 2005-05-02 13:19:44 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -660,6 +660,8 @@ IMPL_LINK( OutlineView, ParagraphInsertedHdl, ::Outliner *, pOutliner )
IMPL_LINK( OutlineView, ParagraphRemovingHdl, ::Outliner *, pOutliner )
{
+ OutlineViewPageChangesGuard aGuard(this);
+
Paragraph* pPara = pOutliner->GetHdlParagraph();
if ( pOutliner->GetDepth( (USHORT) pOutliner->GetAbsPos( pPara ) ) == 0 )
{
@@ -711,6 +713,7 @@ IMPL_LINK( OutlineView, ParagraphRemovingHdl, ::Outliner *, pOutliner )
}
pOutliner->UpdateFields();
}
+
return 0;
}
@@ -723,6 +726,8 @@ IMPL_LINK( OutlineView, ParagraphRemovingHdl, ::Outliner *, pOutliner )
IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner )
{
+ OutlineViewPageChangesGuard aGuard(this);
+
Paragraph* pPara = pOutliner->GetHdlParagraph();
if ( pOutliner->GetDepth( (USHORT) pOutliner->GetAbsPos( pPara ) ) == 0 )
{
@@ -861,7 +866,6 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner )
}
}
-
// wieviele Titel sind vor dem fraglichen Titelabsatz?
ULONG nPos = -1L;
@@ -2134,4 +2138,17 @@ void OutlineView::IgnoreCurrentPageChanges (bool bIgnoreChanges)
mnIgnoreCurrentPageChangesLevel--;
}
+OutlineViewPageChangesGuard::OutlineViewPageChangesGuard( OutlineView* pView )
+: mpView( pView )
+{
+ if( mpView )
+ mpView->IgnoreCurrentPageChanges( true );
+}
+
+OutlineViewPageChangesGuard::~OutlineViewPageChangesGuard()
+{
+ if( mpView )
+ mpView->IgnoreCurrentPageChanges( false );
+}
+
} // end of namespace sd