diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-03-28 15:31:05 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-03-28 15:31:05 -0400 |
commit | 48cd6ac1ec7e92a9c9a21f5365db4f9ff5fde93c (patch) | |
tree | 3b815906dc4a6d0fdd357e2844edce1b0c40bcba /editeng/source | |
parent | 17cc39f2b0ef13efdfb052fe6b815508879fb755 (diff) |
Fix tinderbox error & some cleanup.
Diffstat (limited to 'editeng/source')
-rw-r--r-- | editeng/source/editeng/editdoc.hxx | 7 | ||||
-rw-r--r-- | editeng/source/editeng/editdoc2.cxx | 6 | ||||
-rw-r--r-- | editeng/source/editeng/editeng.cxx | 2 |
3 files changed, 9 insertions, 6 deletions
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx index 7551eca0c523..7f760f396082 100644 --- a/editeng/source/editeng/editdoc.hxx +++ b/editeng/source/editeng/editdoc.hxx @@ -298,10 +298,11 @@ SV_DECL_PTRARR( DummyContentList, ContentNodePtr, 0 ) class ContentList : public DummyContentList { - sal_uInt16 nLastCache; + sal_uInt16 nLastCache; + public: - ContentList() : DummyContentList( 0 ), nLastCache(0) {} - sal_uInt16 GetPos( const ContentNodePtr &rPtr ) const; + ContentList(); + sal_uInt16 GetPos(ContentNode* p) const; }; // ------------------------------------------------------------------------- diff --git a/editeng/source/editeng/editdoc2.cxx b/editeng/source/editeng/editdoc2.cxx index c13b6565417c..68da6aa6f799 100644 --- a/editeng/source/editeng/editdoc2.cxx +++ b/editeng/source/editeng/editdoc2.cxx @@ -337,10 +337,12 @@ sal_uInt16 ParaPortionList::GetPos( const ParaPortionPtr &rPtr ) const ((ParaPortionList *)this)->nLastCache ); } -sal_uInt16 ContentList::GetPos( const ContentNodePtr &rPtr ) const +ContentList::ContentList() : DummyContentList( 0 ), nLastCache(0) {} + +sal_uInt16 ContentList::GetPos(ContentNode* p) const { return FastGetPos( reinterpret_cast<const VoidPtr *>( GetData() ), - Count(), static_cast<VoidPtr>( rPtr ), + Count(), static_cast<VoidPtr>(p), ((ContentList *)this)->nLastCache ); } diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 0954d51195bb..9fcd0a2f9b32 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -2113,7 +2113,7 @@ void EditEngine::RemoveFields( sal_Bool bKeepFieldText, TypeId aType ) const SvxFieldData* pFldData = static_cast<const SvxFieldItem*>(rAttr.GetItem())->GetField(); if ( pFldData && ( !aType || ( pFldData->IsA( aType ) ) ) ) { - DBG_ASSERT( rAttr->GetItem()->ISA( SvxFieldItem ), "no field item..." ); + DBG_ASSERT( dynamic_cast<const SvxFieldItem*>(rAttr.GetItem()), "no field item..." ); EditSelection aSel( EditPaM(pNode, rAttr.GetStart()), EditPaM(pNode, rAttr.GetEnd()) ); String aFieldText = static_cast<const EditCharAttribField&>(rAttr).GetFieldValue(); pImpEditEngine->ImpInsertText( aSel, aFieldText ); |