summaryrefslogtreecommitdiff
path: root/editeng/source/editeng/editdoc2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'editeng/source/editeng/editdoc2.cxx')
-rw-r--r--editeng/source/editeng/editdoc2.cxx218
1 files changed, 90 insertions, 128 deletions
diff --git a/editeng/source/editeng/editdoc2.cxx b/editeng/source/editeng/editdoc2.cxx
index 71077d07ce..4bf4ef3809 100644
--- a/editeng/source/editeng/editdoc2.cxx
+++ b/editeng/source/editeng/editdoc2.cxx
@@ -63,33 +63,13 @@
#include <editeng/wrlmitem.hxx>
#include <editeng/charscaleitem.hxx>
-#include <vcl/svapp.hxx> // Fuer AppWindow...
+#include <vcl/svapp.hxx> // For AppWindow...
DBG_NAME( EE_ParaPortion )
SV_IMPL_VARARR( CharPosArray, sal_Int32 );
-/*
-BOOL EditStyleSheet::HasStyleAsAnyParent( SfxStyleSheet& rStyle )
-{
- if ( GetParent() == rStyle.GetName() )
- return TRUE;
-
- if ( GetParent().Len() && ( GetParent() != GetName() ) )
- {
- EditStyleSheet* pS = (EditStyleSheet*)GetPool().Find( GetParent(), rStyle.GetFamily() );
- if ( pS )
- return pS->HasStyleAsAnyParent( rStyle );
- }
- return FALSE;
-}
-
-*/
-
-// -------------------------------------------------------------------------
-// class TextPortionList
-// -------------------------------------------------------------------------
TextPortionList::TextPortionList()
{
}
@@ -101,24 +81,24 @@ TextPortionList::~TextPortionList()
void TextPortionList::Reset()
{
- for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+ for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ )
delete GetObject( nPortion );
Remove( 0, Count() );
}
-void TextPortionList::DeleteFromPortion( USHORT nDelFrom )
+void TextPortionList::DeleteFromPortion( sal_uInt16 nDelFrom )
{
DBG_ASSERT( ( nDelFrom < Count() ) || ( (nDelFrom == 0) && (Count() == 0) ), "DeleteFromPortion: Out of range" );
- for ( USHORT nP = nDelFrom; nP < Count(); nP++ )
+ for ( sal_uInt16 nP = nDelFrom; nP < Count(); nP++ )
delete GetObject( nP );
Remove( nDelFrom, Count()-nDelFrom );
}
-USHORT TextPortionList::FindPortion( USHORT nCharPos, USHORT& nPortionStart, BOOL bPreferStartingPortion )
+sal_uInt16 TextPortionList::FindPortion( sal_uInt16 nCharPos, sal_uInt16& nPortionStart, sal_Bool bPreferStartingPortion )
{
- // Bei nCharPos an Portion-Grenze wird die linke Portion gefunden
- USHORT nTmpPos = 0;
- for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+ // When nCharPos at portion limit, the left portion is found
+ sal_uInt16 nTmpPos = 0;
+ for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ )
{
TextPortion* pPortion = GetObject( nPortion );
nTmpPos = nTmpPos + pPortion->GetLen();
@@ -132,14 +112,14 @@ USHORT TextPortionList::FindPortion( USHORT nCharPos, USHORT& nPortionStart, BOO
}
}
}
- DBG_ERROR( "FindPortion: Nicht gefunden!" );
+ OSL_FAIL( "FindPortion: Not found!" );
return ( Count() - 1 );
}
-USHORT TextPortionList::GetStartPos( USHORT nPortion )
+sal_uInt16 TextPortionList::GetStartPos( sal_uInt16 nPortion )
{
- USHORT nPos = 0;
- for ( USHORT n = 0; n < nPortion; n++ )
+ sal_uInt16 nPos = 0;
+ for ( sal_uInt16 n = 0; n < nPortion; n++ )
{
TextPortion* pPortion = GetObject( n );
nPos = nPos + pPortion->GetLen();
@@ -148,10 +128,6 @@ USHORT TextPortionList::GetStartPos( USHORT nPortion )
}
-// -------------------------------------------------------------------------
-// class ExtraPortionInfo
-// -------------------------------------------------------------------------
-
ExtraPortionInfo::ExtraPortionInfo()
{
nOrgWidth = 0;
@@ -159,8 +135,8 @@ ExtraPortionInfo::ExtraPortionInfo()
nMaxCompression100thPercent = 0;
nAsianCompressionTypes = 0;
nPortionOffsetX = 0;
- bFirstCharIsRightPunktuation = FALSE;
- bCompressed = FALSE;
+ bFirstCharIsRightPunktuation = sal_False;
+ bCompressed = sal_False;
pOrgDXArray = NULL;
}
@@ -169,7 +145,7 @@ ExtraPortionInfo::~ExtraPortionInfo()
delete[] pOrgDXArray;
}
-void ExtraPortionInfo::SaveOrgDXArray( const sal_Int32* pDXArray, USHORT nLen )
+void ExtraPortionInfo::SaveOrgDXArray( const sal_Int32* pDXArray, sal_uInt16 nLen )
{
delete[] pOrgDXArray;
pOrgDXArray = new sal_Int32[nLen];
@@ -183,18 +159,15 @@ void ExtraPortionInfo::DestroyOrgDXArray()
}
-// -------------------------------------------------------------------------
-// class ParaPortion
-// -------------------------------------------------------------------------
ParaPortion::ParaPortion( ContentNode* pN )
{
DBG_CTOR( EE_ParaPortion, 0 );
pNode = pN;
- bInvalid = TRUE;
- bVisible = TRUE;
- bSimple = FALSE;
- bForceRepaint = FALSE;
+ bInvalid = sal_True;
+ bVisible = sal_True;
+ bSimple = sal_False;
+ bForceRepaint = sal_False;
nInvalidPosStart = 0;
nInvalidDiff = 0;
nHeight = 0;
@@ -207,9 +180,9 @@ ParaPortion::~ParaPortion()
DBG_DTOR( EE_ParaPortion, 0 );
}
-void ParaPortion::MarkInvalid( USHORT nStart, short nDiff )
+void ParaPortion::MarkInvalid( sal_uInt16 nStart, short nDiff )
{
- if ( bInvalid == FALSE )
+ if ( bInvalid == sal_False )
{
// nInvalidPosEnd = nStart; // ??? => CreateLines
nInvalidPosStart = ( nDiff >= 0 ) ? nStart : ( nStart + nDiff );
@@ -217,13 +190,13 @@ void ParaPortion::MarkInvalid( USHORT nStart, short nDiff )
}
else
{
- // Einfaches hintereinander tippen
+ // Simple tap in succession
if ( ( nDiff > 0 ) && ( nInvalidDiff > 0 ) &&
( ( nInvalidPosStart+nInvalidDiff ) == nStart ) )
{
nInvalidDiff = nInvalidDiff + nDiff;
}
- // Einfaches hintereinander loeschen
+ // Simple delete in succession
else if ( ( nDiff < 0 ) && ( nInvalidDiff < 0 ) && ( nInvalidPosStart == nStart ) )
{
nInvalidPosStart = nInvalidPosStart + nDiff;
@@ -233,20 +206,19 @@ void ParaPortion::MarkInvalid( USHORT nStart, short nDiff )
{
// nInvalidPosEnd = pNode->Len();
DBG_ASSERT( ( nDiff >= 0 ) || ( (nStart+nDiff) >= 0 ), "MarkInvalid: Diff out of Range" );
- nInvalidPosStart = Min( nInvalidPosStart, (USHORT) ( nDiff < 0 ? nStart+nDiff : nDiff ) );
+ nInvalidPosStart = Min( nInvalidPosStart, (sal_uInt16) ( nDiff < 0 ? nStart+nDiff : nDiff ) );
nInvalidDiff = 0;
- bSimple = FALSE;
+ bSimple = sal_False;
}
}
- bInvalid = TRUE;
- aScriptInfos.Remove( 0, aScriptInfos.Count() );
- aWritingDirectionInfos.Remove( 0, aWritingDirectionInfos.Count() );
-// aExtraCharInfos.Remove( 0, aExtraCharInfos.Count() );
+ bInvalid = sal_True;
+ aScriptInfos.clear();
+ aWritingDirectionInfos.clear();
}
-void ParaPortion::MarkSelectionInvalid( USHORT nStart, USHORT /* nEnd */ )
+void ParaPortion::MarkSelectionInvalid( sal_uInt16 nStart, sal_uInt16 /* nEnd */ )
{
- if ( bInvalid == FALSE )
+ if ( bInvalid == sal_False )
{
nInvalidPosStart = nStart;
// nInvalidPosEnd = nEnd;
@@ -257,92 +229,91 @@ void ParaPortion::MarkSelectionInvalid( USHORT nStart, USHORT /* nEnd */ )
// nInvalidPosEnd = pNode->Len();
}
nInvalidDiff = 0;
- bInvalid = TRUE;
- bSimple = FALSE;
- aScriptInfos.Remove( 0, aScriptInfos.Count() );
- aWritingDirectionInfos.Remove( 0, aWritingDirectionInfos.Count() );
-// aExtraCharInfos.Remove( 0, aExtraCharInfos.Count() );
+ bInvalid = sal_True;
+ bSimple = sal_False;
+ aScriptInfos.clear();
+ aWritingDirectionInfos.clear();
}
-USHORT ParaPortion::GetLineNumber( USHORT nIndex )
+sal_uInt16 ParaPortion::GetLineNumber( sal_uInt16 nIndex )
{
- DBG_ASSERTWARNING( aLineList.Count(), "Leere ParaPortion in GetLine!" );
- DBG_ASSERT( bVisible, "Wozu GetLine() bei einem unsichtbaren Absatz?" );
+ DBG_ASSERTWARNING( aLineList.Count(), "Empty ParaPortion in GetLine!" );
+ DBG_ASSERT( bVisible, "Why GetLine() on an invisible paragraph?" );
- for ( USHORT nLine = 0; nLine < aLineList.Count(); nLine++ )
+ for ( sal_uInt16 nLine = 0; nLine < aLineList.Count(); nLine++ )
{
if ( aLineList[nLine]->IsIn( nIndex ) )
return nLine;
}
- // Dann sollte es am Ende der letzten Zeile sein!
- DBG_ASSERT( nIndex == aLineList[ aLineList.Count() - 1 ]->GetEnd(), "Index voll daneben!" );
+ // Then it should be at the end of the last line!
+ DBG_ASSERT( nIndex == aLineList[ aLineList.Count() - 1 ]->GetEnd(), "Index dead wrong!" );
return (aLineList.Count()-1);
}
-void ParaPortion::SetVisible( BOOL bMakeVisible )
+void ParaPortion::SetVisible( sal_Bool bMakeVisible )
{
bVisible = bMakeVisible;
}
-void ParaPortion::CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedLine )
+void ParaPortion::CorrectValuesBehindLastFormattedLine( sal_uInt16 nLastFormattedLine )
{
- USHORT nLines = aLineList.Count();
- DBG_ASSERT( nLines, "CorrectPortionNumbersFromLine: Leere Portion?" );
+ sal_uInt16 nLines = aLineList.Count();
+ DBG_ASSERT( nLines, "CorrectPortionNumbersFromLine: Empty Portion?" );
if ( nLastFormattedLine < ( nLines - 1 ) )
{
const EditLine* pLastFormatted = aLineList[ nLastFormattedLine ];
const EditLine* pUnformatted = aLineList[ nLastFormattedLine+1 ];
short nPortionDiff = pUnformatted->GetStartPortion() - pLastFormatted->GetEndPortion();
short nTextDiff = pUnformatted->GetStart() - pLastFormatted->GetEnd();
- nTextDiff++; // LastFormatted->GetEnd() war incl. => 1 zuviel abgezogen!
+ nTextDiff++; // LastFormatted->GetEnd() was included => 1 deducted too much!
- // Die erste unformatierte muss genau eine Portion hinter der letzten der
- // formatierten beginnen:
- // Wenn in der geaenderten Zeile eine Portion gesplittet wurde,
- // kann nLastEnd > nNextStart sein!
+ // The first unformatted must begin exactly one Portion behind the last
+ // of the formatted:
+ // If the modified line was split into one portion, can
+ // nLastEnd > nNextStart!
int nPDiff = -( nPortionDiff-1 );
int nTDiff = -( nTextDiff-1 );
if ( nPDiff || nTDiff )
{
- for ( USHORT nL = nLastFormattedLine+1; nL < nLines; nL++ )
+ for ( sal_uInt16 nL = nLastFormattedLine+1; nL < nLines; nL++ )
{
EditLine* pLine = aLineList[ nL ];
- pLine->GetStartPortion() = sal::static_int_cast< USHORT >(
+ pLine->GetStartPortion() = sal::static_int_cast< sal_uInt16 >(
pLine->GetStartPortion() + nPDiff);
- pLine->GetEndPortion() = sal::static_int_cast< USHORT >(
+ pLine->GetEndPortion() = sal::static_int_cast< sal_uInt16 >(
pLine->GetEndPortion() + nPDiff);
- pLine->GetStart() = sal::static_int_cast< USHORT >(
+ pLine->GetStart() = sal::static_int_cast< sal_uInt16 >(
pLine->GetStart() + nTDiff);
- pLine->GetEnd() = sal::static_int_cast< USHORT >(
+ pLine->GetEnd() = sal::static_int_cast< sal_uInt16 >(
pLine->GetEnd() + nTDiff);
pLine->SetValid();
}
}
}
- DBG_ASSERT( aLineList[ aLineList.Count()-1 ]->GetEnd() == pNode->Len(), "CorrectLines: Ende stimmt nicht!" );
+ DBG_ASSERT( aLineList[ aLineList.Count()-1 ]->GetEnd() == pNode->Len(), "CorrectLines: The end is not right!" );
}
// Shared reverse lookup acceleration pieces ...
-static USHORT FastGetPos( const VoidPtr *pPtrArray, USHORT nPtrArrayLen,
- VoidPtr pPtr, USHORT &rLastPos )
+static sal_uInt16 FastGetPos( const VoidPtr *pPtrArray, sal_uInt16 nPtrArrayLen,
+ VoidPtr pPtr, sal_uInt16 &rLastPos )
{
// Through certain filter code-paths we do a lot of appends, which in
// turn call GetPos - creating some N^2 nightmares. If we have a
// non-trivially large list, do a few checks from the end first.
if( rLastPos > 16 )
{
- USHORT nEnd;
+ sal_uInt16 nEnd;
if (rLastPos > nPtrArrayLen - 2)
nEnd = nPtrArrayLen;
else
nEnd = rLastPos + 2;
- for( USHORT nIdx = rLastPos - 2; nIdx < nEnd; nIdx++ )
+ for( sal_uInt16 nIdx = rLastPos - 2; nIdx < nEnd; nIdx++ )
{
if( pPtrArray[ nIdx ] == pPtr )
{
@@ -352,15 +323,12 @@ static USHORT FastGetPos( const VoidPtr *pPtrArray, USHORT nPtrArrayLen,
}
}
// The world's lamest linear search from svarray ...
- for( USHORT nIdx = 0; nIdx < nPtrArrayLen; nIdx++ )
+ for( sal_uInt16 nIdx = 0; nIdx < nPtrArrayLen; nIdx++ )
if (pPtrArray[ nIdx ] == pPtr )
return rLastPos = nIdx;
return USHRT_MAX;
}
-// -------------------------------------------------------------------------
-// class ParaPortionList
-// -------------------------------------------------------------------------
ParaPortionList::ParaPortionList() : nLastCache( 0 )
{
}
@@ -370,14 +338,14 @@ ParaPortionList::~ParaPortionList()
Reset();
}
-USHORT ParaPortionList::GetPos( const ParaPortionPtr &rPtr ) const
+sal_uInt16 ParaPortionList::GetPos( const ParaPortionPtr &rPtr ) const
{
return FastGetPos( reinterpret_cast<const VoidPtr *>( GetData() ),
Count(), static_cast<VoidPtr>( rPtr ),
((ParaPortionList *)this)->nLastCache );
}
-USHORT ContentList::GetPos( const ContentNodePtr &rPtr ) const
+sal_uInt16 ContentList::GetPos( const ContentNodePtr &rPtr ) const
{
return FastGetPos( reinterpret_cast<const VoidPtr *>( GetData() ),
Count(), static_cast<VoidPtr>( rPtr ),
@@ -386,7 +354,7 @@ USHORT ContentList::GetPos( const ContentNodePtr &rPtr ) const
void ParaPortionList::Reset()
{
- for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+ for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ )
delete GetObject( nPortion );
Remove( 0, Count() );
}
@@ -394,27 +362,27 @@ void ParaPortionList::Reset()
long ParaPortionList::GetYOffset( ParaPortion* pPPortion )
{
long nHeight = 0;
- for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+ for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ )
{
ParaPortion* pTmpPortion = GetObject(nPortion);
if ( pTmpPortion == pPPortion )
return nHeight;
nHeight += pTmpPortion->GetHeight();
}
- DBG_ERROR( "GetYOffset: Portion nicht gefunden" );
+ OSL_FAIL( "GetYOffset: Portion not found" );
return nHeight;
}
-USHORT ParaPortionList::FindParagraph( long nYOffset )
+sal_uInt16 ParaPortionList::FindParagraph( long nYOffset )
{
long nY = 0;
- for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+ for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ )
{
- nY += GetObject(nPortion)->GetHeight(); // sollte auch bei !bVisible richtig sein!
+ nY += GetObject(nPortion)->GetHeight(); // should also be correct even in bVisible!
if ( nY > nYOffset )
return nPortion;
}
- return 0xFFFF; // solte mal ueber EE_PARA_NOT_FOUND erreicht werden!
+ return 0xFFFF; // Should be reachable through EE_PARA_NOT_FOUND!
}
void ParaPortionList::DbgCheck( EditDoc&
@@ -424,12 +392,12 @@ void ParaPortionList::DbgCheck( EditDoc&
)
{
#ifdef DBG_UTIL
- DBG_ASSERT( Count() == rDoc.Count(), "ParaPortionList::DbgCheck() - Count() ungleich!" );
- for ( USHORT i = 0; i < Count(); i++ )
+ DBG_ASSERT( Count() == rDoc.Count(), "ParaPortionList::DbgCheck() - Count() unequal!" );
+ for ( sal_uInt16 i = 0; i < Count(); i++ )
{
- DBG_ASSERT( SaveGetObject(i), "ParaPortionList::DbgCheck() - Null-Pointer in Liste!" );
- DBG_ASSERT( GetObject(i)->GetNode(), "ParaPortionList::DbgCheck() - Null-Pointer in Liste(2)!" );
- DBG_ASSERT( GetObject(i)->GetNode() == rDoc.GetObject(i), "ParaPortionList::DbgCheck() - Eintraege kreuzen sich!" );
+ DBG_ASSERT( SaveGetObject(i), "ParaPortionList::DbgCheck() - Null-Pointer in List!" );
+ DBG_ASSERT( GetObject(i)->GetNode(), "ParaPortionList::DbgCheck() - Null-Pointer in List(2)!" );
+ DBG_ASSERT( GetObject(i)->GetNode() == rDoc.GetObject(i), "ParaPortionList::DbgCheck() - Entries intersect!" );
}
#endif
}
@@ -449,37 +417,36 @@ void ConvertItem( SfxPoolItem& rPoolItem, MapUnit eSourceUnit, MapUnit eDestUnit
{
case EE_PARA_LRSPACE:
{
- DBG_ASSERT( rPoolItem.IsA( TYPE( SvxLRSpaceItem ) ), "ConvertItem: Ungueltiges Item!" );
+ DBG_ASSERT( rPoolItem.IsA( TYPE( SvxLRSpaceItem ) ), "ConvertItem: invalid Item!" );
SvxLRSpaceItem& rItem = (SvxLRSpaceItem&)rPoolItem;
rItem.SetTxtFirstLineOfst( sal::static_int_cast< short >( OutputDevice::LogicToLogic( rItem.GetTxtFirstLineOfst(), eSourceUnit, eDestUnit ) ) );
rItem.SetTxtLeft( OutputDevice::LogicToLogic( rItem.GetTxtLeft(), eSourceUnit, eDestUnit ) );
-// rItem.SetLeft( OutputDevice::LogicToLogic( rItem.GetLeft(), eSourceUnit, eDestUnit ) ); // #96298# SetLeft manipulates nTxtLeft!
rItem.SetRight( OutputDevice::LogicToLogic( rItem.GetRight(), eSourceUnit, eDestUnit ) );
}
break;
case EE_PARA_ULSPACE:
{
- DBG_ASSERT( rPoolItem.IsA( TYPE( SvxULSpaceItem ) ), "ConvertItem: Ungueltiges Item!" );
+ DBG_ASSERT( rPoolItem.IsA( TYPE( SvxULSpaceItem ) ), "ConvertItem: Invalid Item!" );
SvxULSpaceItem& rItem = (SvxULSpaceItem&)rPoolItem;
- rItem.SetUpper( sal::static_int_cast< USHORT >( OutputDevice::LogicToLogic( rItem.GetUpper(), eSourceUnit, eDestUnit ) ) );
- rItem.SetLower( sal::static_int_cast< USHORT >( OutputDevice::LogicToLogic( rItem.GetLower(), eSourceUnit, eDestUnit ) ) );
+ rItem.SetUpper( sal::static_int_cast< sal_uInt16 >( OutputDevice::LogicToLogic( rItem.GetUpper(), eSourceUnit, eDestUnit ) ) );
+ rItem.SetLower( sal::static_int_cast< sal_uInt16 >( OutputDevice::LogicToLogic( rItem.GetLower(), eSourceUnit, eDestUnit ) ) );
}
break;
case EE_PARA_SBL:
{
- DBG_ASSERT( rPoolItem.IsA( TYPE( SvxLineSpacingItem ) ), "ConvertItem: Ungueltiges Item!" );
+ DBG_ASSERT( rPoolItem.IsA( TYPE( SvxLineSpacingItem ) ), "ConvertItem: Invalid Item!" );
SvxLineSpacingItem& rItem = (SvxLineSpacingItem&)rPoolItem;
- // #96298# SetLineHeight changes also eLineSpace!
+ // SetLineHeight changes also eLineSpace!
if ( rItem.GetLineSpaceRule() == SVX_LINE_SPACE_MIN )
- rItem.SetLineHeight( sal::static_int_cast< USHORT >( OutputDevice::LogicToLogic( rItem.GetLineHeight(), eSourceUnit, eDestUnit ) ) );
+ rItem.SetLineHeight( sal::static_int_cast< sal_uInt16 >( OutputDevice::LogicToLogic( rItem.GetLineHeight(), eSourceUnit, eDestUnit ) ) );
}
break;
case EE_PARA_TABS:
{
- DBG_ASSERT( rPoolItem.IsA( TYPE( SvxTabStopItem ) ), "ConvertItem: Ungueltiges Item!" );
+ DBG_ASSERT( rPoolItem.IsA( TYPE( SvxTabStopItem ) ), "ConvertItem: Invalid Item!" );
SvxTabStopItem& rItem = (SvxTabStopItem&)rPoolItem;
SvxTabStopItem aNewItem( EE_PARA_TABS );
- for ( USHORT i = 0; i < rItem.Count(); i++ )
+ for ( sal_uInt16 i = 0; i < rItem.Count(); i++ )
{
const SvxTabStop& rTab = rItem[i];
SvxTabStop aNewStop( OutputDevice::LogicToLogic( rTab.GetTabPos(), eSourceUnit, eDestUnit ), rTab.GetAdjustment(), rTab.GetDecimal(), rTab.GetFill() );
@@ -492,7 +459,7 @@ void ConvertItem( SfxPoolItem& rPoolItem, MapUnit eSourceUnit, MapUnit eDestUnit
case EE_CHAR_FONTHEIGHT_CJK:
case EE_CHAR_FONTHEIGHT_CTL:
{
- DBG_ASSERT( rPoolItem.IsA( TYPE( SvxFontHeightItem ) ), "ConvertItem: Ungueltiges Item!" );
+ DBG_ASSERT( rPoolItem.IsA( TYPE( SvxFontHeightItem ) ), "ConvertItem: Invalid Item!" );
SvxFontHeightItem& rItem = (SvxFontHeightItem&)rPoolItem;
rItem.SetHeight( OutputDevice::LogicToLogic( rItem.GetHeight(), eSourceUnit, eDestUnit ) );
}
@@ -505,20 +472,20 @@ void ConvertAndPutItems( SfxItemSet& rDest, const SfxItemSet& rSource, const Map
const SfxItemPool* pSourcePool = rSource.GetPool();
const SfxItemPool* pDestPool = rDest.GetPool();
- for ( USHORT nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ )
+ for ( sal_uInt16 nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ )
{
- // Wenn moeglich ueber SlotID gehen...
+ // If possible go through SlotID ...
- USHORT nSourceWhich = nWhich;
- USHORT nSlot = pDestPool->GetTrueSlotId( nWhich );
+ sal_uInt16 nSourceWhich = nWhich;
+ sal_uInt16 nSlot = pDestPool->GetTrueSlotId( nWhich );
if ( nSlot )
{
- USHORT nW = pSourcePool->GetTrueWhich( nSlot );
+ sal_uInt16 nW = pSourcePool->GetTrueWhich( nSlot );
if ( nW )
nSourceWhich = nW;
}
- if ( rSource.GetItemState( nSourceWhich, FALSE ) == SFX_ITEM_ON )
+ if ( rSource.GetItemState( nSourceWhich, sal_False ) == SFX_ITEM_ON )
{
MapUnit eSourceUnit = pSourceUnit ? *pSourceUnit : (MapUnit)pSourcePool->GetMetric( nSourceWhich );
MapUnit eDestUnit = pDestUnit ? *pDestUnit : (MapUnit)pDestPool->GetMetric( nWhich );
@@ -535,11 +502,6 @@ void ConvertAndPutItems( SfxItemSet& rDest, const SfxItemSet& rSource, const Map
rDest.Put( rSource.Get( nSourceWhich ), nWhich );
}
}
- else
- {
- // MT 3.3.99: Waere so eigentlich richtig, aber schon seit Jahren nicht so...
-// rDest.ClearItem( nWhich );
- }
}
}