summaryrefslogtreecommitdiffstats
path: root/svx/source/editeng/editdoc.cxx
diff options
context:
space:
mode:
authorMalte Timmermann <mt@openoffice.org>2002-10-10 11:17:38 +0000
committerMalte Timmermann <mt@openoffice.org>2002-10-10 11:17:38 +0000
commitb885879527171cab0f27fa4aa4a6a7c048d6d6b9 (patch)
tree1c28fdc1943399e4e0960afb0b59795fa77a32d3 /svx/source/editeng/editdoc.cxx
parent#104082# refresh always when it's a contour frame. That refresh is necessary ... (diff)
downloadcore-b885879527171cab0f27fa4aa4a6a7c048d6d6b9.tar.gz
core-b885879527171cab0f27fa4aa4a6a7c048d6d6b9.zip
#102710# ModifyHdl
Diffstat (limited to 'svx/source/editeng/editdoc.cxx')
-rw-r--r--svx/source/editeng/editdoc.cxx39
1 files changed, 24 insertions, 15 deletions
diff --git a/svx/source/editeng/editdoc.cxx b/svx/source/editeng/editdoc.cxx
index c8884c7aaab9..781c6f23a0f5 100644
--- a/svx/source/editeng/editdoc.cxx
+++ b/svx/source/editeng/editdoc.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: editdoc.cxx,v $
*
- * $Revision: 1.32 $
+ * $Revision: 1.33 $
*
- * last change: $Author: mt $ $Date: 2002-08-22 11:11:04 $
+ * last change: $Author: mt $ $Date: 2002-10-10 12:16:44 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1205,7 +1205,7 @@ EditDoc::EditDoc( SfxItemPool* pPool )
// Don't create a empty node, Clear() will be called in EditEngine-CTOR
- bModified = FALSE;
+ SetModified( FALSE );
};
EditDoc::~EditDoc()
@@ -1450,12 +1450,21 @@ EditPaM EditDoc::Clear()
CreateDefFont( FALSE );
- bModified = FALSE;
+ SetModified( FALSE );
EditPaM aPaM( pNode, 0 );
return aPaM;
}
+void EditDoc::SetModified( BOOL b )
+{
+ bModified = b;
+ if ( bModified )
+ {
+ aModifyHdl.Call( NULL );
+ }
+}
+
EditPaM EditDoc::RemoveText()
{
// Das alte ItemSetmerken, damit z.B. im Chart Font behalten bleibt
@@ -1473,7 +1482,7 @@ EditPaM EditDoc::RemoveText()
pNode->GetContentAttribs().GetItems().Set( aPrevSet );
pNode->GetCharAttribs().GetDefFont() = aPrevFont;
- bModified = TRUE;
+ SetModified( TRUE );
EditPaM aPaM( pNode, 0 );
return aPaM;
@@ -1488,7 +1497,7 @@ void EditDoc::InsertText( const EditPaM& rPaM, xub_Unicode c )
rPaM.GetNode()->Insert( c, rPaM.GetIndex() );
rPaM.GetNode()->ExpandAttribs( rPaM.GetIndex(), 1, GetItemPool() );
- bModified = TRUE;
+ SetModified( TRUE );
}
EditPaM EditDoc::InsertText( EditPaM aPaM, const XubString& rStr )
@@ -1502,7 +1511,7 @@ EditPaM EditDoc::InsertText( EditPaM aPaM, const XubString& rStr )
aPaM.GetNode()->ExpandAttribs( aPaM.GetIndex(), rStr.Len(), GetItemPool() );
aPaM.GetIndex() += rStr.Len();
- bModified = TRUE;
+ SetModified( TRUE );
return aPaM;
}
@@ -1535,7 +1544,7 @@ EditPaM EditDoc::InsertParaBreak( EditPaM aPaM, BOOL bKeepEndingAttribs )
Insert( pNode, nPos+1 );
- bModified = TRUE;
+ SetModified( TRUE );
aPaM.SetNode( pNode );
aPaM.SetIndex( 0 );
@@ -1554,7 +1563,7 @@ EditPaM EditDoc::InsertFeature( EditPaM aPaM, const SfxPoolItem& rItem )
DBG_ASSERT( pAttrib, "Warum kann ich kein Feature anlegen ?" );
aPaM.GetNode()->GetCharAttribs().InsertAttrib( pAttrib );
- bModified = TRUE;
+ SetModified( TRUE );
aPaM.GetIndex()++;
return aPaM;
@@ -1575,7 +1584,7 @@ EditPaM EditDoc::ConnectParagraphs( ContentNode* pLeft, ContentNode* pRight )
Remove( nRight );
delete pRight;
- bModified = TRUE;
+ SetModified( TRUE );
return aPaM;
}
@@ -1586,7 +1595,7 @@ EditPaM EditDoc::RemoveChars( EditPaM aPaM, USHORT nChars )
aPaM.GetNode()->Erase( aPaM.GetIndex(), nChars );
aPaM.GetNode()->CollapsAttribs( aPaM.GetIndex(), nChars, GetItemPool() );
- bModified = TRUE;
+ SetModified( TRUE );
return aPaM;
}
@@ -1626,7 +1635,7 @@ void EditDoc::InsertAttribInSelection( ContentNode* pNode, USHORT nStart, USHORT
if ( pStartingAttrib )
pNode->GetCharAttribs().ResortAttribs();
- bModified = TRUE;
+ SetModified( TRUE );
}
BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, USHORT nWhich )
@@ -1735,7 +1744,7 @@ BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, Edi
}
if ( bChanged )
- bModified = TRUE;
+ SetModified( TRUE );
return bChanged;
}
@@ -1749,7 +1758,7 @@ void EditDoc::InsertAttrib( const SfxPoolItem& rPoolItem, ContentNode* pNode, US
DBG_ASSERT( pAttrib, "MakeCharAttrib fehlgeschlagen!" );
pNode->GetCharAttribs().InsertAttrib( pAttrib );
- bModified = TRUE;
+ SetModified( TRUE );
}
void EditDoc::InsertAttrib( ContentNode* pNode, USHORT nStart, USHORT nEnd, const SfxPoolItem& rPoolItem )
@@ -1794,7 +1803,7 @@ void EditDoc::InsertAttrib( ContentNode* pNode, USHORT nStart, USHORT nEnd, cons
InsertAttrib( rPoolItem, pNode, nStart, nStart );
}
- bModified = TRUE;
+ SetModified( TRUE );
}
void EditDoc::FindAttribs( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos, SfxItemSet& rCurSet )