diff options
author | Oliver Bolte <obo@openoffice.org> | 2006-10-12 11:34:59 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2006-10-12 11:34:59 +0000 |
commit | c11799ffb3fa8578ec9514edc423ed53e55d8bf7 (patch) | |
tree | 592400a3b1ad377bba1b0f3d5734d87cb610dfa7 /svx/source/editeng/editdoc.cxx | |
parent | INTEGRATION: CWS sb59 (1.16.62); FILE MERGED (diff) | |
download | core-c11799ffb3fa8578ec9514edc423ed53e55d8bf7.tar.gz core-c11799ffb3fa8578ec9514edc423ed53e55d8bf7.zip |
INTEGRATION: CWS sb59 (1.43.62); FILE MERGED
2006/08/28 12:57:48 sb 1.43.62.2: #i67487# Made code warning-free (wntmsci10).
2006/08/03 13:51:39 cl 1.43.62.1: removed compiler warnings
Diffstat (limited to 'svx/source/editeng/editdoc.cxx')
-rw-r--r-- | svx/source/editeng/editdoc.cxx | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/svx/source/editeng/editdoc.cxx b/svx/source/editeng/editdoc.cxx index 4bc0f521236d..72b371708550 100644 --- a/svx/source/editeng/editdoc.cxx +++ b/svx/source/editeng/editdoc.cxx @@ -4,9 +4,9 @@ * * $RCSfile: editdoc.cxx,v $ * - * $Revision: 1.44 $ + * $Revision: 1.45 $ * - * last change: $Author: obo $ $Date: 2006-09-17 04:48:37 $ + * last change: $Author: obo $ $Date: 2006-10-12 12:34:59 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -532,7 +532,7 @@ Size EditLine::CalcTextSize( ParaPortion& rParaPortion ) } break; } - nIndex += pPortion->GetLen(); + nIndex = nIndex + pPortion->GetLen(); } SetHeight( (USHORT)aSz.Height() ); @@ -1000,8 +1000,8 @@ void ContentNode::CopyAndCutAttribs( ContentNode* pPrevNode, SfxItemPool& rPool, aCharAttribList.InsertAttrib( pAttrib ); DBG_ASSERT( pAttrib->GetStart() >= nCut, "Start < nCut!" ); DBG_ASSERT( pAttrib->GetEnd() >= nCut, "End < nCut!" ); - pAttrib->GetStart() -= nCut; - pAttrib->GetEnd() -= nCut; + pAttrib->GetStart() = pAttrib->GetStart() - nCut; + pAttrib->GetEnd() = pAttrib->GetEnd() - nCut; nAttr--; } nAttr++; @@ -1037,7 +1037,8 @@ void ContentNode::AppendAttribs( ContentNode* pNextNode ) if ( ( pTmpAttrib->Which() == pAttrib->Which() ) && ( *(pTmpAttrib->GetItem()) == *(pAttrib->GetItem() ) ) ) { - pTmpAttrib->GetEnd() += pAttrib->GetLen(); + pTmpAttrib->GetEnd() = + pTmpAttrib->GetEnd() + pAttrib->GetLen(); pNextNode->GetCharAttribs().GetAttribs().Remove( nAttr ); // Vom Pool abmelden ?! delete pAttrib; @@ -1051,8 +1052,8 @@ void ContentNode::AppendAttribs( ContentNode* pNextNode ) if ( !bMelted ) { - pAttrib->GetStart() += nNewStart; - pAttrib->GetEnd() += nNewStart; + pAttrib->GetStart() = pAttrib->GetStart() + nNewStart; + pAttrib->GetEnd() = pAttrib->GetEnd() + nNewStart; aCharAttribList.InsertAttrib( pAttrib ); ++nAttr; } @@ -1075,7 +1076,7 @@ void ContentNode::CreateDefFont() // ... dann die harte Absatzformatierung rueberbuegeln... CreateFont( GetCharAttribs().GetDefFont(), - GetContentAttribs().GetItems(), ( pS ? FALSE : TRUE ) ); + GetContentAttribs().GetItems(), pS == NULL ); } void ContentNode::SetStyleSheet( SfxStyleSheet* pS, const SvxFont& rFontFromStyle ) @@ -1086,7 +1087,7 @@ void ContentNode::SetStyleSheet( SfxStyleSheet* pS, const SvxFont& rFontFromStyl GetCharAttribs().GetDefFont() = rFontFromStyle; // ... dann die harte Absatzformatierung rueberbuegeln... CreateFont( GetCharAttribs().GetDefFont(), - GetContentAttribs().GetItems(), ( pS ? FALSE : TRUE ) ); + GetContentAttribs().GetItems(), pS == NULL ); } void ContentNode::SetStyleSheet( SfxStyleSheet* pS, BOOL bRecalcFont ) @@ -1256,7 +1257,7 @@ void EditDoc::RemoveItemsFromPool( ContentNode* pNode ) } } -void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, BOOL bSearchInParent, short nScriptType ) +void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, short nScriptType ) { Font aPrevFont( rFont ); rFont.SetAlign( ALIGN_BASELINE ); @@ -1305,7 +1306,7 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, BOOL bSearchInParent, s if ( nEsc == DFLT_ESC_AUTO_SUPER ) nEsc = 100 - nProp; else if ( nEsc == DFLT_ESC_AUTO_SUB ) - nEsc = -( 100 - nProp ); + nEsc = sal::static_int_cast< short >( -( 100 - nProp ) ); rFont.SetEscapement( nEsc ); } if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_PAIRKERNING ) == SFX_ITEM_ON ) ) @@ -1534,7 +1535,7 @@ EditPaM EditDoc::InsertText( EditPaM aPaM, const XubString& rStr ) aPaM.GetNode()->Insert( rStr, aPaM.GetIndex() ); aPaM.GetNode()->ExpandAttribs( aPaM.GetIndex(), rStr.Len(), GetItemPool() ); - aPaM.GetIndex() += rStr.Len(); + aPaM.GetIndex() = aPaM.GetIndex() + rStr.Len(); SetModified( TRUE ); @@ -2013,7 +2014,13 @@ void CharAttribList::ResortAttribs() { if ( Count() ) { +#if defined __SUNPRO_CC +#pragma disable_warn +#endif qsort( (void*)aAttribs.GetData(), aAttribs.Count(), sizeof( EditCharAttrib* ), CompareStart ); +#if defined __SUNPRO_CC +#pragma enable_warn +#endif } } |