diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2006-01-10 13:47:01 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2006-01-10 13:47:01 +0000 |
commit | 3b70543d629e8766d133f1bcaba626a9b8859a70 (patch) | |
tree | 9f382c3e308057fadcf05ab6670a77f9689b9117 /svx/source/editeng/editobj.cxx | |
parent | INTEGRATION: CWS impresspresobjs (1.95.24); FILE MERGED (diff) | |
download | core-3b70543d629e8766d133f1bcaba626a9b8859a70.tar.gz core-3b70543d629e8766d133f1bcaba626a9b8859a70.zip |
INTEGRATION: CWS impresspresobjs (1.20.140); FILE MERGED
2005/12/09 15:04:50 cl 1.20.140.1: #i58649# added operator== for undo in impress outline view
Diffstat (limited to 'svx/source/editeng/editobj.cxx')
-rw-r--r-- | svx/source/editeng/editobj.cxx | 53 |
1 files changed, 51 insertions, 2 deletions
diff --git a/svx/source/editeng/editobj.cxx b/svx/source/editeng/editobj.cxx index bd46cabf05cb..fab9e4c149ce 100644 --- a/svx/source/editeng/editobj.cxx +++ b/svx/source/editeng/editobj.cxx @@ -4,9 +4,9 @@ * * $RCSfile: editobj.cxx,v $ * - * $Revision: 1.20 $ + * $Revision: 1.21 $ * - * last change: $Author: rt $ $Date: 2005-09-08 22:28:06 $ + * last change: $Author: rt $ $Date: 2006-01-10 14:47:01 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -256,6 +256,27 @@ void ContentInfo::DestroyLoadStoreTempInfos() pTempLoadStoreInfos = NULL; } +bool ContentInfo::operator==( const ContentInfo& rCompare ) const +{ + if( (aText == rCompare.aText) && + (aStyle == rCompare.aStyle ) && + (aAttribs.Count() == rCompare.aAttribs.Count() ) && + (eFamily == rCompare.eFamily ) && + (aParaAttribs == rCompare.aParaAttribs ) ) + { + USHORT n; + for( n = 0; n < aAttribs.Count(); n++ ) + { + if( !(*aAttribs.GetObject(n) == *rCompare.aAttribs.GetObject(n)) ) + return false; + } + + return true; + } + + return false; +} + EditTextObject::EditTextObject( USHORT n) { DBG_CTOR( EE_EditTextObject, 0 ); @@ -565,6 +586,11 @@ void EditTextObject::FinishLoad( SfxStyleSheetPool* pStyleSheetPool ) DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } +bool EditTextObject::operator==( const EditTextObject& rCompare ) const +{ + return static_cast< const BinTextObject* >( this )->operator==( static_cast< const BinTextObject& >( rCompare ) ); +} + BinTextObject::BinTextObject( SfxItemPool* pP ) : EditTextObject( EE_FORMAT_BIN ) { @@ -1756,6 +1782,29 @@ void BinTextObject::FinishLoad( SfxStyleSheetPool* pStyleSheetPool ) } } +bool BinTextObject::operator==( const BinTextObject& rCompare ) const +{ + if( this == &rCompare ) + return true; + + if( ( aContents.Count() != rCompare.aContents.Count() ) || + ( pPool != rCompare.pPool ) || + ( nMetric != rCompare.nMetric ) || + ( nUserType!= rCompare.nUserType ) || + ( nScriptType != rCompare.nScriptType ) || + ( bVertical != rCompare.bVertical ) ) + return false; + + USHORT n; + for( n = 0; n < aContents.Count(); n++ ) + { + if( !( *aContents.GetObject( n ) == *rCompare.aContents.GetObject( n ) ) ) + return false; + } + + return true; +} + void BinTextObject::AdjustImportedLRSpaceItems( BOOL bTurnOfBullets ) { for ( USHORT nPara = GetContents().Count(); nPara; ) |