summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/crsr/findattr.cxx8
-rw-r--r--sw/source/core/undo/undobj1.cxx3
-rw-r--r--sw/source/uibase/app/docstyle.cxx3
3 files changed, 8 insertions, 6 deletions
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index 5e347f9fbac7..73b577712c86 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -235,8 +235,8 @@ SwAttrCheckArr::SwAttrCheckArr( const SfxItemSet& rSet, bool bFwd,
// determine area of Fnd/Stack array (Min/Max)
SfxItemIter aIter( aCmpSet );
- nArrStart = aIter.GetFirstWhich();
- nArrLen = aIter.GetLastWhich() - nArrStart + 1;
+ nArrStart = aCmpSet.GetWhichByPos( aIter.GetFirstPos() );
+ nArrLen = aCmpSet.GetWhichByPos( aIter.GetLastPos() ) - nArrStart+1;
char* pFndChar = new char[ nArrLen * sizeof(SwSrchChrAttr) ];
char* pStackChar = new char[ nArrLen * sizeof(SwSrchChrAttr) ];
@@ -287,7 +287,7 @@ void SwAttrCheckArr::SetNewSet( const SwTextNode& rTextNd, const SwPaM& rPam )
{
if( IsInvalidItem( pItem ) )
{
- nWhich = aIter.GetCurWhich();
+ nWhich = aCmpSet.GetWhichByPos( aIter.GetCurPos() );
if( RES_TXTATR_END <= nWhich )
break; // end of text attributes
@@ -861,7 +861,7 @@ static bool lcl_Search( const SwContentNode& rCNd, const SfxItemSet& rCmpSet, bo
{
if( IsInvalidItem( pItem ))
{
- nWhich = aIter.GetCurWhich();
+ nWhich = rCmpSet.GetWhichByPos( aIter.GetCurPos() );
if( SfxItemState::SET != rNdSet.GetItemState( nWhich, !bNoColls, &pNdItem )
|| CmpAttr( *pNdItem, rNdSet.GetPool()->GetDefaultItem( nWhich ) ))
return false;
diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx
index 331470225d06..0b0b21f33e69 100644
--- a/sw/source/core/undo/undobj1.cxx
+++ b/sw/source/core/undo/undobj1.cxx
@@ -531,7 +531,8 @@ void SwUndoSetFlyFormat::UndoImpl(::sw::UndoRedoContext & rContext)
while( pItem )
{
if( IsInvalidItem( pItem ))
- pFrameFormat->ResetFormatAttr( aIter.GetCurWhich() );
+ pFrameFormat->ResetFormatAttr( pItemSet->GetWhichByPos(
+ aIter.GetCurPos() ));
else
pFrameFormat->SetFormatAttr( *pItem );
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index 7a8a5f848822..a4257fa71fb3 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -1677,7 +1677,8 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
// use method <SwDoc::ResetAttrAtFormat(..)> in order to
// create an Undo object for the attribute reset.
- rDoc.ResetAttrAtFormat( aIter.GetCurWhich(), *pFormat );
+ rDoc.ResetAttrAtFormat( rSet.GetWhichByPos(aIter.GetCurPos()),
+ *pFormat );
}
if( aIter.IsAtEnd() )