diff options
Diffstat (limited to 'editeng/source/editeng/impedit5.cxx')
-rw-r--r-- | editeng/source/editeng/impedit5.cxx | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx index 0918594ee59d..e3ed4f7d8f2e 100644 --- a/editeng/source/editeng/impedit5.cxx +++ b/editeng/source/editeng/impedit5.cxx @@ -35,13 +35,13 @@ void ImpEditEngine::SetStyleSheetPool( SfxStyleSheetPool* pSPool ) } } -const SfxStyleSheet* ImpEditEngine::GetStyleSheet( sal_uInt16 nPara ) const +const SfxStyleSheet* ImpEditEngine::GetStyleSheet( sal_Int32 nPara ) const { const ContentNode* pNode = aEditDoc.GetObject( nPara ); return pNode ? pNode->GetContentAttribs().GetStyleSheet() : NULL; } -SfxStyleSheet* ImpEditEngine::GetStyleSheet( sal_uInt16 nPara ) +SfxStyleSheet* ImpEditEngine::GetStyleSheet( sal_Int32 nPara ) { ContentNode* pNode = aEditDoc.GetObject( nPara ); return pNode ? pNode->GetContentAttribs().GetStyleSheet() : NULL; @@ -51,19 +51,19 @@ void ImpEditEngine::SetStyleSheet( EditSelection aSel, SfxStyleSheet* pStyle ) { aSel.Adjust( aEditDoc ); - sal_uInt16 nStartPara = aEditDoc.GetPos( aSel.Min().GetNode() ); - sal_uInt16 nEndPara = aEditDoc.GetPos( aSel.Max().GetNode() ); + sal_Int32 nStartPara = aEditDoc.GetPos( aSel.Min().GetNode() ); + sal_Int32 nEndPara = aEditDoc.GetPos( aSel.Max().GetNode() ); sal_Bool _bUpdate = GetUpdateMode(); SetUpdateMode( sal_False ); - for ( sal_uInt16 n = nStartPara; n <= nEndPara; n++ ) + for ( sal_Int32 n = nStartPara; n <= nEndPara; n++ ) SetStyleSheet( n, pStyle ); SetUpdateMode( _bUpdate, 0 ); } -void ImpEditEngine::SetStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pStyle ) +void ImpEditEngine::SetStyleSheet( sal_Int32 nPara, SfxStyleSheet* pStyle ) { DBG_ASSERT( GetStyleSheetPool() || !pStyle, "SetStyleSheet: No StyleSheetPool registered!" ); ContentNode* pNode = aEditDoc.GetObject( nPara ); @@ -102,7 +102,7 @@ void ImpEditEngine::UpdateParagraphsWithStyleSheet( SfxStyleSheet* pStyle ) CreateFont( aFontFromStyle, pStyle->GetItemSet() ); sal_Bool bUsed = sal_False; - for ( sal_uInt16 nNode = 0; nNode < aEditDoc.Count(); nNode++ ) + for ( sal_Int32 nNode = 0; nNode < aEditDoc.Count(); nNode++ ) { ContentNode* pNode = aEditDoc.GetObject( nNode ); if ( pNode->GetStyleSheet() == pStyle ) @@ -125,7 +125,7 @@ void ImpEditEngine::UpdateParagraphsWithStyleSheet( SfxStyleSheet* pStyle ) void ImpEditEngine::RemoveStyleFromParagraphs( SfxStyleSheet* pStyle ) { - for ( sal_uInt16 nNode = 0; nNode < aEditDoc.Count(); nNode++ ) + for ( sal_Int32 nNode = 0; nNode < aEditDoc.Count(); nNode++ ) { ContentNode* pNode = aEditDoc.GetObject(nNode); if ( pNode->GetStyleSheet() == pStyle ) @@ -184,8 +184,8 @@ EditUndoSetAttribs* ImpEditEngine::CreateAttribUndo( EditSelection aSel, const S ESelection aESel( CreateESel( aSel ) ); - sal_uInt16 nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); - sal_uInt16 nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); + sal_Int32 nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); + sal_Int32 nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); DBG_ASSERT( nStartNode <= nEndNode, "CreateAttribUndo: Start > End ?!" ); @@ -203,7 +203,7 @@ EditUndoSetAttribs* ImpEditEngine::CreateAttribUndo( EditSelection aSel, const S SfxItemPool* pPool = pUndo->GetNewAttribs().GetPool(); - for ( sal_uInt16 nPara = nStartNode; nPara <= nEndNode; nPara++ ) + for ( sal_Int32 nPara = nStartNode; nPara <= nEndNode; nPara++ ) { ContentNode* pNode = aEditDoc.GetObject( nPara ); DBG_ASSERT( aEditDoc.GetObject( nPara ), "Node not found: CreateAttribUndo" ); @@ -312,11 +312,11 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, sal_Bool bOnlyHardAttr SfxItemSet aCurSet( GetEmptyItemSet() ); - sal_uInt16 nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); - sal_uInt16 nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); + sal_Int32 nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); + sal_Int32 nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); // iterate over the paragraphs ... - for ( sal_uInt16 nNode = nStartNode; nNode <= nEndNode; nNode++ ) + for ( sal_Int32 nNode = nStartNode; nNode <= nEndNode; nNode++ ) { ContentNode* pNode = aEditDoc.GetObject( nNode ); DBG_ASSERT( aEditDoc.GetObject( nNode ), "Node not found: GetAttrib" ); @@ -397,7 +397,7 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, sal_Bool bOnlyHardAttr } -SfxItemSet ImpEditEngine::GetAttribs( sal_uInt16 nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt8 nFlags ) const +SfxItemSet ImpEditEngine::GetAttribs( sal_Int32 nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt8 nFlags ) const { // Optimized function with less Puts(), which cause unnecessary cloning from default items. // If this works, change GetAttribs( EditSelection ) to use this for each paragraph and merge the results! @@ -498,8 +498,8 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, sal_ if ( ( nSpecial == ATTRSPECIAL_WHOLEWORD ) && !aSel.HasRange() ) aSel = SelectWord( aSel, ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES, sal_False ); - sal_uInt16 nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); - sal_uInt16 nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); + sal_Int32 nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); + sal_Int32 nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); if ( IsUndoEnabled() && !IsInUndo() && aStatus.DoUndoAttribs() ) { @@ -517,7 +517,7 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, sal_ } // iterate over the paragraphs ... - for ( sal_uInt16 nNode = nStartNode; nNode <= nEndNode; nNode++ ) + for ( sal_Int32 nNode = nStartNode; nNode <= nEndNode; nNode++ ) { sal_Bool bParaAttribFound = sal_False; sal_Bool bCharAttribFound = sal_False; @@ -591,8 +591,8 @@ void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, sal_Bool bRemoveParaA { aSel.Adjust( aEditDoc ); - sal_uInt16 nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); - sal_uInt16 nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); + sal_Int32 nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() ); + sal_Int32 nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() ); const SfxItemSet* _pEmptyItemSet = bRemoveParaAttribs ? &GetEmptyItemSet() : 0; @@ -607,7 +607,7 @@ void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, sal_Bool bRemoveParaA } // iterate over the paragraphs ... - for ( sal_uInt16 nNode = nStartNode; nNode <= nEndNode; nNode++ ) + for ( sal_Int32 nNode = nStartNode; nNode <= nEndNode; nNode++ ) { ContentNode* pNode = aEditDoc.GetObject( nNode ); ParaPortion* pPortion = GetParaPortions()[nNode]; @@ -653,7 +653,7 @@ void ImpEditEngine::RemoveCharAttribs( EditSelection aSel, sal_Bool bRemoveParaA } } -void ImpEditEngine::RemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich, sal_Bool bRemoveFeatures ) +void ImpEditEngine::RemoveCharAttribs( sal_Int32 nPara, sal_uInt16 nWhich, sal_Bool bRemoveFeatures ) { ContentNode* pNode = aEditDoc.GetObject( nPara ); ParaPortion* pPortion = GetParaPortions().SafeGetObject( nPara ); @@ -682,7 +682,7 @@ void ImpEditEngine::RemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich, sal_ pPortion->MarkSelectionInvalid( 0, pNode->Len() ); } -void ImpEditEngine::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ) +void ImpEditEngine::SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) { ContentNode* pNode = aEditDoc.GetObject( nPara ); @@ -712,14 +712,14 @@ void ImpEditEngine::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ) } } -const SfxItemSet& ImpEditEngine::GetParaAttribs( sal_uInt16 nPara ) const +const SfxItemSet& ImpEditEngine::GetParaAttribs( sal_Int32 nPara ) const { const ContentNode* pNode = aEditDoc.GetObject( nPara ); DBG_ASSERT( pNode, "Node not found: GetParaAttribs" ); return pNode->GetContentAttribs().GetItems(); } -bool ImpEditEngine::HasParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich ) const +bool ImpEditEngine::HasParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) const { const ContentNode* pNode = aEditDoc.GetObject( nPara ); DBG_ASSERT( pNode, "Node not found: HasParaAttrib" ); @@ -727,7 +727,7 @@ bool ImpEditEngine::HasParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich ) const return pNode->GetContentAttribs().HasItem( nWhich ); } -const SfxPoolItem& ImpEditEngine::GetParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich ) const +const SfxPoolItem& ImpEditEngine::GetParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) const { const ContentNode* pNode = aEditDoc.GetObject( nPara ); DBG_ASSERT( pNode, "Node not found: GetParaAttrib" ); @@ -735,7 +735,7 @@ const SfxPoolItem& ImpEditEngine::GetParaAttrib( sal_uInt16 nPara, sal_uInt16 nW return pNode->GetContentAttribs().GetItem( nWhich ); } -void ImpEditEngine::GetCharAttribs( sal_uInt16 nPara, std::vector<EECharAttrib>& rLst ) const +void ImpEditEngine::GetCharAttribs( sal_Int32 nPara, std::vector<EECharAttrib>& rLst ) const { rLst.clear(); const ContentNode* pNode = aEditDoc.GetObject( nPara ); |