summaryrefslogtreecommitdiffstats
path: root/sc/source/filter/starcalc/scflt.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/filter/starcalc/scflt.cxx')
-rw-r--r--sc/source/filter/starcalc/scflt.cxx348
1 files changed, 174 insertions, 174 deletions
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index c9bf2a90a7a5..a7d0150ee220 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -126,7 +126,7 @@ void lcl_ReadRGB(SvStream& rStream, Sc10Color& rColor)
void lcl_ReadPalette(SvStream& rStream, Sc10Color* pPalette)
{
- for (USHORT i = 0; i < 16; i++)
+ for (sal_uInt16 i = 0; i < 16; i++)
lcl_ReadRGB(rStream, pPalette[i]);
}
@@ -295,7 +295,7 @@ void lcl_ReadChartTypeData(SvStream& rStream, Sc10ChartTypeData& rTypeData)
rStream >> rTypeData.GraphStyle;
rStream.Read(&rTypeData.GraphTitle, sizeof(rTypeData.GraphTitle));
rStream.Read(&rTypeData.BottomTitle, sizeof(rTypeData.BottomTitle));
- USHORT i;
+ sal_uInt16 i;
for (i = 0; i < 256; i++)
rStream >> rTypeData.SymbolData[i];
for (i = 0; i < 256; i++)
@@ -366,7 +366,7 @@ double lcl_PascalToDouble(sal_Char* tp6)
}
-void lcl_ChangeColor( USHORT nIndex, Color& rColor )
+void lcl_ChangeColor( sal_uInt16 nIndex, Color& rColor )
{
ColorData aCol;
@@ -393,7 +393,7 @@ void lcl_ChangeColor( USHORT nIndex, Color& rColor )
rColor.SetColor( aCol );
}
-String lcl_MakeOldPageStyleFormatName( USHORT i )
+String lcl_MakeOldPageStyleFormatName( sal_uInt16 i )
{
String aName = ScGlobal::GetRscString( STR_PAGESTYLE );
aName.AppendAscii( " " );
@@ -412,7 +412,7 @@ Sc10FontData::Sc10FontData(SvStream& rStream)
rStream >> Height;
rStream >> CharSet;
rStream >> PitchAndFamily;
- USHORT nLen;
+ sal_uInt16 nLen;
rStream >> nLen;
rStream.Read(FaceName, nLen);
}
@@ -422,13 +422,13 @@ Sc10FontCollection::Sc10FontCollection(SvStream& rStream) :
ScCollection (4, 4),
nError (0)
{
- USHORT ID;
+ sal_uInt16 ID;
rStream >> ID;
if (ID == FontID)
{
- USHORT nAnz;
+ sal_uInt16 nAnz;
rStream >> nAnz;
- for (USHORT i=0; (i < nAnz) && (nError == 0); i++)
+ for (sal_uInt16 i=0; (i < nAnz) && (nError == 0); i++)
{
Insert(new Sc10FontData(rStream));
nError = rStream.GetError();
@@ -449,7 +449,7 @@ Sc10FontCollection::Sc10FontCollection(SvStream& rStream) :
Sc10NameData::Sc10NameData(SvStream& rStream)
{
- BYTE nLen;
+ sal_uInt8 nLen;
rStream >> nLen;
rStream.Read(Name, sizeof(Name) - 1);
Name[nLen] = 0;
@@ -465,13 +465,13 @@ Sc10NameCollection::Sc10NameCollection(SvStream& rStream) :
ScCollection (4, 4),
nError (0)
{
- USHORT ID;
+ sal_uInt16 ID;
rStream >> ID;
if (ID == NameID)
{
- USHORT nAnz;
+ sal_uInt16 nAnz;
rStream >> nAnz;
- for (USHORT i=0; (i < nAnz) && (nError == 0); i++)
+ for (sal_uInt16 i=0; (i < nAnz) && (nError == 0); i++)
{
Insert(new Sc10NameData(rStream));
nError = rStream.GetError();
@@ -513,13 +513,13 @@ Sc10PatternCollection::Sc10PatternCollection(SvStream& rStream) :
ScCollection (4, 4),
nError (0)
{
- USHORT ID;
+ sal_uInt16 ID;
rStream >> ID;
if (ID == PatternID)
{
- USHORT nAnz;
+ sal_uInt16 nAnz;
rStream >> nAnz;
- for (USHORT i=0; (i < nAnz) && (nError == 0); i++)
+ for (sal_uInt16 i=0; (i < nAnz) && (nError == 0); i++)
{
Insert(new Sc10PatternData(rStream));
nError = rStream.GetError();
@@ -579,14 +579,14 @@ Sc10DataBaseCollection::Sc10DataBaseCollection(SvStream& rStream) :
ScCollection (4, 4),
nError (0)
{
- USHORT ID;
+ sal_uInt16 ID;
rStream >> ID;
if (ID == DataBaseID)
{
rStream.Read(ActName, sizeof(ActName));
- USHORT nAnz;
+ sal_uInt16 nAnz;
rStream >> nAnz;
- for (USHORT i=0; (i < nAnz) && (nError == 0); i++)
+ for (sal_uInt16 i=0; (i < nAnz) && (nError == 0); i++)
{
Insert(new Sc10DataBaseData(rStream));
nError = rStream.GetError();
@@ -673,9 +673,9 @@ int Sc10PageFormat::operator==( const Sc10PageFormat& rData ) const
}
-USHORT Sc10PageCollection::InsertFormat( const Sc10PageFormat& rData )
+sal_uInt16 Sc10PageCollection::InsertFormat( const Sc10PageFormat& rData )
{
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
if (At(i)->aPageFormat == rData)
return i;
@@ -685,15 +685,15 @@ USHORT Sc10PageCollection::InsertFormat( const Sc10PageFormat& rData )
}
-static inline UINT8 GetMixedCol( const UINT8 nB, const UINT8 nF, const UINT16 nFak )
+static inline sal_uInt8 GetMixedCol( const sal_uInt8 nB, const sal_uInt8 nF, const sal_uInt16 nFak )
{
- INT32 nT = nB - nF;
- nT *= ( INT32 ) nFak;
+ sal_Int32 nT = nB - nF;
+ nT *= ( sal_Int32 ) nFak;
nT /= 0xFFFF;
nT += nF;
- return ( UINT8 ) nT;
+ return ( sal_uInt8 ) nT;
}
-static inline Color GetMixedColor( const Color& rFore, const Color& rBack, UINT16 nFact )
+static inline Color GetMixedColor( const Color& rFore, const Color& rBack, sal_uInt16 nFact )
{
return Color( GetMixedCol( rBack.GetRed(), rFore.GetRed(), nFact ),
GetMixedCol( rBack.GetGreen(), rFore.GetGreen(), nFact ),
@@ -707,7 +707,7 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc )
EditEngine aEditEngine( pDoc->GetEnginePool() );
EditTextObject* pEmptyObject = aEditEngine.CreateTextObject();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
Sc10PageFormat* pPage = &At(i)->aPageFormat;
@@ -730,7 +730,7 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc )
SfxItemSet* pSet = &pSheet->GetItemSet();
- for (USHORT nHeadFoot=0; nHeadFoot<2; nHeadFoot++)
+ for (sal_uInt16 nHeadFoot=0; nHeadFoot<2; nHeadFoot++)
{
Sc10HeadFootLine* pHeadFootLine = nHeadFoot ? &pPage->FootLine : &pPage->HeadLine;
@@ -805,11 +805,11 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc )
nColor = pHeadFootLine->RasterColor;
Color aRColor( nColor.Red, nColor.Green, nColor.Blue );
- UINT16 nFact;
- BOOL bSwapCol = FALSE;
+ sal_uInt16 nFact;
+ sal_Bool bSwapCol = sal_False;
switch (pHeadFootLine->Raster)
{
- case raNone: nFact = 0xffff; bSwapCol = TRUE; break;
+ case raNone: nFact = 0xffff; bSwapCol = sal_True; break;
case raGray12: nFact = (0xffff / 100) * 12; break;
case raGray25: nFact = (0xffff / 100) * 25; break;
case raGray50: nFact = (0xffff / 100) * 50; break;
@@ -823,14 +823,14 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc )
if (pHeadFootLine->Frame != 0)
{
- USHORT nLeft = 0;
- USHORT nTop = 0;
- USHORT nRight = 0;
- USHORT nBottom = 0;
- USHORT fLeft = (pHeadFootLine->Frame & 0x000F);
- USHORT fTop = (pHeadFootLine->Frame & 0x00F0) / 0x0010;
- USHORT fRight = (pHeadFootLine->Frame & 0x0F00) / 0x0100;
- USHORT fBottom = (pHeadFootLine->Frame & 0xF000) / 0x1000;
+ sal_uInt16 nLeft = 0;
+ sal_uInt16 nTop = 0;
+ sal_uInt16 nRight = 0;
+ sal_uInt16 nBottom = 0;
+ sal_uInt16 fLeft = (pHeadFootLine->Frame & 0x000F);
+ sal_uInt16 fTop = (pHeadFootLine->Frame & 0x00F0) / 0x0010;
+ sal_uInt16 fRight = (pHeadFootLine->Frame & 0x0F00) / 0x0100;
+ sal_uInt16 fBottom = (pHeadFootLine->Frame & 0xF000) / 0x1000;
if (fLeft > 1)
nLeft = 50;
else if (fLeft > 0)
@@ -851,10 +851,10 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc )
Color ColorTop(COL_BLACK);
Color ColorRight(COL_BLACK);
Color ColorBottom(COL_BLACK);
- USHORT cLeft = (pHeadFootLine->FrameColor & 0x000F);
- USHORT cTop = (pHeadFootLine->FrameColor & 0x00F0) >> 4;
- USHORT cRight = (pHeadFootLine->FrameColor & 0x0F00) >> 8;
- USHORT cBottom = (pHeadFootLine->FrameColor & 0xF000) >> 12;
+ sal_uInt16 cLeft = (pHeadFootLine->FrameColor & 0x000F);
+ sal_uInt16 cTop = (pHeadFootLine->FrameColor & 0x00F0) >> 4;
+ sal_uInt16 cRight = (pHeadFootLine->FrameColor & 0x0F00) >> 8;
+ sal_uInt16 cBottom = (pHeadFootLine->FrameColor & 0xF000) >> 12;
lcl_ChangeColor(cLeft, ColorLeft);
lcl_ChangeColor(cTop, ColorTop);
lcl_ChangeColor(cRight, ColorRight);
@@ -884,9 +884,9 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc )
else
aSetItemItemSet.Put( SvxSizeItem( ATTR_PAGE_SIZE, Size( 0, pPage->Bottom - pPage->Foot ) ) );
- aSetItemItemSet.Put(SfxBoolItem( ATTR_PAGE_ON, TRUE ));
- aSetItemItemSet.Put(SfxBoolItem( ATTR_PAGE_DYNAMIC, FALSE ));
- aSetItemItemSet.Put(SfxBoolItem( ATTR_PAGE_SHARED, TRUE ));
+ aSetItemItemSet.Put(SfxBoolItem( ATTR_PAGE_ON, sal_True ));
+ aSetItemItemSet.Put(SfxBoolItem( ATTR_PAGE_DYNAMIC, sal_False ));
+ aSetItemItemSet.Put(SfxBoolItem( ATTR_PAGE_SHARED, sal_True ));
pSet->Put( SvxSetItem( nHeadFoot ? ATTR_PAGE_FOOTERSET : ATTR_PAGE_HEADERSET,
aSetItemItemSet ) );
@@ -944,7 +944,7 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc )
pSet->Put( ScViewObjectModeItem( ATTR_PAGE_OBJECTS, VOBJ_MODE_SHOW ) );
pSet->Put( ScViewObjectModeItem( ATTR_PAGE_DRAWINGS, VOBJ_MODE_SHOW ) );
pSet->Put( SfxUInt16Item( ATTR_PAGE_SCALE,
- (UINT16)( lcl_PascalToDouble( pPage->PrnZoom ) * 100 ) ) );
+ (sal_uInt16)( lcl_PascalToDouble( pPage->PrnZoom ) * 100 ) ) );
pSet->Put( SfxUInt16Item( ATTR_PAGE_FIRSTPAGENO, 1 ) );
pSet->Put( SvxSizeItem( ATTR_PAGE_SIZE, Size( pPage->Width, pPage->Height ) ) );
@@ -994,7 +994,7 @@ Sc10Import::~Sc10Import()
}
-ULONG Sc10Import::Import()
+sal_uLong Sc10Import::Import()
{
pPrgrsBar = new ScfStreamProgressBar( rStream, pDoc->GetDocumentShell() );
@@ -1095,10 +1095,10 @@ void Sc10Import::LoadProtect()
void Sc10Import::LoadViewColRowBar()
{
- BYTE ViewColRowBar;
+ sal_uInt8 ViewColRowBar;
rStream >> ViewColRowBar;
nError = rStream.GetError();
- aSc30ViewOpt.SetOption( VOPT_HEADER, (BOOL)ViewColRowBar );
+ aSc30ViewOpt.SetOption( VOPT_HEADER, (sal_Bool)ViewColRowBar );
}
@@ -1142,7 +1142,7 @@ void Sc10Import::ImportNameCollection()
{
ScRangeName* pRN = pDoc->GetRangeName();
- for (USHORT i = 0; i < pNameCollection->GetCount(); i++)
+ for (sal_uInt16 i = 0; i < pNameCollection->GetCount(); i++)
{
Sc10NameData* pName = pNameCollection->At( i );
pRN->Insert( new ScRangeData( pDoc,
@@ -1156,7 +1156,7 @@ void Sc10Import::LoadPatternCollection()
{
pPatternCollection = new Sc10PatternCollection( rStream );
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
- for( USHORT i = 0 ; i < pPatternCollection->GetCount() ; i++ )
+ for( sal_uInt16 i = 0 ; i < pPatternCollection->GetCount() ; i++ )
{
Sc10PatternData* pPattern = pPatternCollection->At( i );
String aName( pPattern->Name, DEFCHARSET );
@@ -1207,10 +1207,10 @@ void Sc10Import::LoadPatternCollection()
// Ausrichtung
if( ( pPattern->FormatFlags & pfJustify ) == pfJustify )
{
- USHORT HorJustify = ( pPattern->Justify & 0x000F );
- USHORT VerJustify = ( pPattern->Justify & 0x00F0 ) >> 4;
- USHORT OJustify = ( pPattern->Justify & 0x0F00 ) >> 8;
- USHORT EJustify = ( pPattern->Justify & 0xF000 ) >> 12;
+ sal_uInt16 HorJustify = ( pPattern->Justify & 0x000F );
+ sal_uInt16 VerJustify = ( pPattern->Justify & 0x00F0 ) >> 4;
+ sal_uInt16 OJustify = ( pPattern->Justify & 0x0F00 ) >> 8;
+ sal_uInt16 EJustify = ( pPattern->Justify & 0xF000 ) >> 12;
if( HorJustify != 0 )
switch( HorJustify )
{
@@ -1239,13 +1239,13 @@ void Sc10Import::LoadPatternCollection()
}
if( ( OJustify & ojWordBreak ) == ojWordBreak )
- rItemSet.Put( SfxBoolItem( TRUE ) );
+ rItemSet.Put( SfxBoolItem( sal_True ) );
if( ( OJustify & ojBottomTop ) == ojBottomTop )
rItemSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 9000 ) );
else if( ( OJustify & ojTopBottom ) == ojTopBottom )
rItemSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 27000 ) );
- INT16 Margin = Max( ( USHORT ) 20, ( USHORT ) ( EJustify * 20 ) );
+ sal_Int16 Margin = Max( ( sal_uInt16 ) 20, ( sal_uInt16 ) ( EJustify * 20 ) );
// if( ( ( OJustify & ojBottomTop ) == ojBottomTop ) ||
// ( ( OJustify & ojBottomTop ) == ojBottomTop ) )
// vielleicht so?
@@ -1260,14 +1260,14 @@ void Sc10Import::LoadPatternCollection()
{
if( pPattern->Frame != 0 )
{
- USHORT nLeft = 0;
- USHORT nTop = 0;
- USHORT nRight = 0;
- USHORT nBottom = 0;
- USHORT fLeft = ( pPattern->Frame & 0x000F );
- USHORT fTop = ( pPattern->Frame & 0x00F0 ) / 0x0010;
- USHORT fRight = ( pPattern->Frame & 0x0F00 ) / 0x0100;
- USHORT fBottom = ( pPattern->Frame & 0xF000 ) / 0x1000;
+ sal_uInt16 nLeft = 0;
+ sal_uInt16 nTop = 0;
+ sal_uInt16 nRight = 0;
+ sal_uInt16 nBottom = 0;
+ sal_uInt16 fLeft = ( pPattern->Frame & 0x000F );
+ sal_uInt16 fTop = ( pPattern->Frame & 0x00F0 ) / 0x0010;
+ sal_uInt16 fRight = ( pPattern->Frame & 0x0F00 ) / 0x0100;
+ sal_uInt16 fBottom = ( pPattern->Frame & 0xF000 ) / 0x1000;
if( fLeft > 1 )
nLeft = 50;
@@ -1294,10 +1294,10 @@ void Sc10Import::LoadPatternCollection()
Color ColorRight( COL_BLACK );
Color ColorBottom( COL_BLACK );
- USHORT cLeft = ( pPattern->FrameColor & 0x000F );
- USHORT cTop = ( pPattern->FrameColor & 0x00F0 ) >> 4;
- USHORT cRight = ( pPattern->FrameColor & 0x0F00 ) >> 8;
- USHORT cBottom = ( pPattern->FrameColor & 0xF000 ) >> 12;
+ sal_uInt16 cLeft = ( pPattern->FrameColor & 0x000F );
+ sal_uInt16 cTop = ( pPattern->FrameColor & 0x00F0 ) >> 4;
+ sal_uInt16 cRight = ( pPattern->FrameColor & 0x0F00 ) >> 8;
+ sal_uInt16 cBottom = ( pPattern->FrameColor & 0xF000 ) >> 12;
lcl_ChangeColor( cLeft, ColorLeft );
lcl_ChangeColor( cTop, ColorTop );
@@ -1327,8 +1327,8 @@ void Sc10Import::LoadPatternCollection()
{
if( pPattern->Raster != 0 )
{
- USHORT nBColor = ( pPattern->nColor & 0x00F0 ) >> 4;
- USHORT nRColor = ( pPattern->nColor & 0x0F00 ) >> 8;
+ sal_uInt16 nBColor = ( pPattern->nColor & 0x00F0 ) >> 4;
+ sal_uInt16 nRColor = ( pPattern->nColor & 0x0F00 ) >> 8;
Color aBColor( COL_BLACK );
lcl_ChangeColor( nBColor, aBColor );
@@ -1340,12 +1340,12 @@ void Sc10Import::LoadPatternCollection()
Color aRColor( COL_BLACK );
lcl_ChangeColor( nRColor, aRColor );
- UINT16 nFact;
- BOOL bSwapCol = FALSE;
- BOOL bSetItem = TRUE;
+ sal_uInt16 nFact;
+ sal_Bool bSwapCol = sal_False;
+ sal_Bool bSetItem = sal_True;
switch (pPattern->Raster)
{
- case raNone: nFact = 0xffff; bSwapCol = TRUE; bSetItem = (nBColor > 0); break;
+ case raNone: nFact = 0xffff; bSwapCol = sal_True; bSetItem = (nBColor > 0); break;
case raGray12: nFact = (0xffff / 100) * 12; break;
case raGray25: nFact = (0xffff / 100) * 25; break;
case raGray50: nFact = (0xffff / 100) * 50; break;
@@ -1365,19 +1365,19 @@ void Sc10Import::LoadPatternCollection()
if( ( pPattern->ValueFormat.Format != 0 ) &&
( ( pPattern->FormatFlags & pfValue ) == pfValue ) )
{
- ULONG nKey = 0;
+ sal_uLong nKey = 0;
ChangeFormat( pPattern->ValueFormat.Format, pPattern->ValueFormat.Info, nKey );
- rItemSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, ( UINT32 ) nKey ) );
+ rItemSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, ( sal_uInt32 ) nKey ) );
}
// Zellattribute (Schutz, Versteckt...)
if( ( pPattern->Flags != 0 ) &&
( ( pPattern->FormatFlags & pfProtection ) == pfProtection ) )
{
- BOOL bProtect = ( ( pPattern->Flags & paProtect ) == paProtect );
- BOOL bHFormula = ( ( pPattern->Flags & paHideFormula ) == paHideFormula );
- BOOL bHCell = ( ( pPattern->Flags & paHideAll ) == paHideAll );
- BOOL bHPrint = ( ( pPattern->Flags & paHidePrint ) == paHidePrint );
+ sal_Bool bProtect = ( ( pPattern->Flags & paProtect ) == paProtect );
+ sal_Bool bHFormula = ( ( pPattern->Flags & paHideFormula ) == paHideFormula );
+ sal_Bool bHCell = ( ( pPattern->Flags & paHideAll ) == paHideAll );
+ sal_Bool bHPrint = ( ( pPattern->Flags & paHidePrint ) == paHidePrint );
rItemSet.Put( ScProtectionAttr( bProtect, bHFormula, bHCell, bHPrint ) );
}
} // if Style != 0
@@ -1388,7 +1388,7 @@ void Sc10Import::LoadPatternCollection()
void Sc10Import::LoadDataBaseCollection()
{
pDataBaseCollection = new Sc10DataBaseCollection(rStream);
- for( USHORT i = 0 ; i < pDataBaseCollection->GetCount() ; i++ )
+ for( sal_uInt16 i = 0 ; i < pDataBaseCollection->GetCount() ; i++ )
{
Sc10DataBaseData* pOldData = pDataBaseCollection->At(i);
ScDBData* pNewData = new ScDBData( SC10TOSTRING( pOldData->DataBaseRec.Name ),
@@ -1397,8 +1397,8 @@ void Sc10Import::LoadDataBaseCollection()
( SCROW ) pOldData->DataBaseRec.Block.y1,
( SCCOL ) pOldData->DataBaseRec.Block.x2,
( SCROW ) pOldData->DataBaseRec.Block.y2,
- TRUE,
- ( BOOL) pOldData->DataBaseRec.RowHeader );
+ sal_True,
+ ( sal_Bool) pOldData->DataBaseRec.RowHeader );
pDoc->GetDBCollection()->Insert( pNewData );
}
}
@@ -1408,31 +1408,31 @@ void Sc10Import::LoadTables()
{
Sc10PageCollection aPageCollection;
- INT16 nTabCount;
+ sal_Int16 nTabCount;
rStream >> nTabCount;
- for (INT16 Tab = 0; (Tab < nTabCount) && (nError == 0); Tab++)
+ for (sal_Int16 Tab = 0; (Tab < nTabCount) && (nError == 0); Tab++)
{
Sc10PageFormat PageFormat;
- INT16 DataBaseIndex;
+ sal_Int16 DataBaseIndex;
Sc10TableProtect TabProtect;
- INT16 TabNo;
+ sal_Int16 TabNo;
sal_Char TabName[128];
- USHORT Display;
- BYTE Visible;
- USHORT ID;
- USHORT DataCount;
- USHORT DataStart;
- USHORT DataEnd;
- USHORT DataValue;
- USHORT Count;
- USHORT i;
+ sal_uInt16 Display;
+ sal_uInt8 Visible;
+ sal_uInt16 ID;
+ sal_uInt16 DataCount;
+ sal_uInt16 DataStart;
+ sal_uInt16 DataEnd;
+ sal_uInt16 DataValue;
+ sal_uInt16 Count;
+ sal_uInt16 i;
String aStr; // Universal-Konvertierungs-String
//rStream.Read(&PageFormat, sizeof(PageFormat));
lcl_ReadPageFormat(rStream, PageFormat);
- USHORT nAt = aPageCollection.InsertFormat(PageFormat);
+ sal_uInt16 nAt = aPageCollection.InsertFormat(PageFormat);
String aPageName = lcl_MakeOldPageStyleFormatName( nAt );
pPrgrsBar->Progress();
@@ -1449,7 +1449,7 @@ void Sc10Import::LoadTables()
rStream >> TabNo;
- BYTE nLen;
+ sal_uInt8 nLen;
rStream >> nLen;
rStream.Read(TabName, sizeof(TabName) - 1);
TabName[nLen] = 0;
@@ -1457,7 +1457,7 @@ void Sc10Import::LoadTables()
//----------------------------------------------------------
rStream >> Display;
- if ( Tab == (INT16)nShowTab )
+ if ( Tab == (sal_Int16)nShowTab )
{
ScVObjMode eObjMode = VOBJ_MODE_SHOW;
@@ -1465,10 +1465,10 @@ void Sc10Import::LoadTables()
aSc30ViewOpt.SetOption( VOPT_NULLVALS, IS_SET(dfZerro,Display) );
aSc30ViewOpt.SetOption( VOPT_SYNTAX, IS_SET(dfSyntax,Display) );
aSc30ViewOpt.SetOption( VOPT_NOTES, IS_SET(dfNoteMark,Display) );
- aSc30ViewOpt.SetOption( VOPT_VSCROLL, TRUE );
- aSc30ViewOpt.SetOption( VOPT_HSCROLL, TRUE );
- aSc30ViewOpt.SetOption( VOPT_TABCONTROLS, TRUE );
- aSc30ViewOpt.SetOption( VOPT_OUTLINER, TRUE );
+ aSc30ViewOpt.SetOption( VOPT_VSCROLL, sal_True );
+ aSc30ViewOpt.SetOption( VOPT_HSCROLL, sal_True );
+ aSc30ViewOpt.SetOption( VOPT_TABCONTROLS, sal_True );
+ aSc30ViewOpt.SetOption( VOPT_OUTLINER, sal_True );
aSc30ViewOpt.SetOption( VOPT_GRID, IS_SET(dfGrid,Display) );
// VOPT_HEADER wird in LoadViewColRowBar() gesetzt
@@ -1487,13 +1487,13 @@ void Sc10Import::LoadTables()
/* wofuer wird das benoetigt? Da in SC 1.0 die Anzeigeflags pro Tabelle gelten und nicht pro View
Dieses Flag in die ViewOptions eintragen bei Gelegenheit, Sollte der Stephan Olk machen
- USHORT nDisplayMask = 0xFFFF;
- USHORT nDisplayValue = 0;
+ sal_uInt16 nDisplayMask = 0xFFFF;
+ sal_uInt16 nDisplayValue = 0;
if (Tab == 0)
nDisplayValue = Display;
else
{
- USHORT nDiff = Display ^ nDisplayValue;
+ sal_uInt16 nDiff = Display ^ nDisplayValue;
nDisplayMask &= ~nDiff;
}
*/
@@ -1504,13 +1504,13 @@ void Sc10Import::LoadTables()
if (nError != 0) return;
if (TabNo == 0)
- pDoc->RenameTab(static_cast<SCTAB> (TabNo), SC10TOSTRING( TabName ), FALSE);
+ pDoc->RenameTab(static_cast<SCTAB> (TabNo), SC10TOSTRING( TabName ), sal_False);
else
pDoc->InsertTab(SC_TAB_APPEND, SC10TOSTRING( TabName ) );
pDoc->SetPageStyle( static_cast<SCTAB>(Tab), aPageName );
- if (Visible == 0) pDoc->SetVisible(static_cast<SCTAB> (TabNo), FALSE);
+ if (Visible == 0) pDoc->SetVisible(static_cast<SCTAB> (TabNo), sal_False);
// ColWidth
rStream >> ID;
@@ -1638,13 +1638,13 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab)
{
LoadColAttr(Col, Tab);
- USHORT CellCount;
- BYTE CellType;
- USHORT Row;
+ sal_uInt16 CellCount;
+ sal_uInt8 CellType;
+ sal_uInt16 Row;
rStream >> CellCount;
SCROW nScCount = static_cast< SCROW >( CellCount );
if (nScCount > MAXROW) nError = errUnknownFormat;
- for (USHORT i = 0; (i < CellCount) && (nError == 0); i++)
+ for (sal_uInt16 i = 0; (i < CellCount) && (nError == 0); i++)
{
rStream >> CellType;
rStream >> Row;
@@ -1656,7 +1656,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab)
case ctValue :
{
const SfxPoolItem* pValueFormat = pDoc->GetAttr(Col, static_cast<SCROW> (Row), Tab, ATTR_VALUE_FORMAT);
- ULONG nFormat = ((SfxUInt32Item*)pValueFormat)->GetValue();
+ sal_uLong nFormat = ((SfxUInt32Item*)pValueFormat)->GetValue();
double Value = ScfTools::ReadLongDouble(rStream);
//rStream.Read(&Value, sizeof(Value));
@@ -1671,7 +1671,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab)
}
case ctString :
{
- BYTE Len;
+ sal_uInt8 Len;
sal_Char s[256];
rStream >> Len;
rStream.Read(s, Len);
@@ -1683,7 +1683,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab)
case ctFormula :
{
/*double Value =*/ ScfTools::ReadLongDouble(rStream);
- BYTE Len;
+ sal_uInt8 Len;
sal_Char s[256];
//rStream.Read(&Value, sizeof(Value));
rStream >> Len;
@@ -1692,7 +1692,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab)
s[Len + 1] = 0;
ScFormulaCell* pCell = new ScFormulaCell( pDoc, ScAddress( Col, static_cast<SCROW> (Row), Tab ) );
pCell->SetHybridFormula( SC10TOSTRING( s ),formula::FormulaGrammar::GRAM_NATIVE );
- pDoc->PutCell( Col, static_cast<SCROW> (Row), Tab, pCell, (BOOL)TRUE );
+ pDoc->PutCell( Col, static_cast<SCROW> (Row), Tab, pCell, (sal_Bool)sal_True );
break;
}
case ctNote :
@@ -1701,7 +1701,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab)
nError = errUnknownFormat;
break;
}
- USHORT NoteLen;
+ sal_uInt16 NoteLen;
rStream >> NoteLen;
if (NoteLen != 0)
{
@@ -1747,9 +1747,9 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
{
SCROW nStart;
SCROW nEnd;
- USHORT i;
- UINT16 nLimit;
- UINT16 nValue1;
+ sal_uInt16 i;
+ sal_uInt16 nLimit;
+ sal_uInt16 nValue1;
Sc10ColData *pColData;
// Font (Name, Groesse)
@@ -1844,10 +1844,10 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
if ((nStart <= nEnd) && (nValue1))
{
ScPatternAttr aScPattern(pDoc->GetPool());
- USHORT HorJustify = (nValue1 & 0x000F);
- USHORT VerJustify = (nValue1 & 0x00F0) >> 4;
- USHORT OJustify = (nValue1 & 0x0F00) >> 8;
- USHORT EJustify = (nValue1 & 0xF000) >> 12;
+ sal_uInt16 HorJustify = (nValue1 & 0x000F);
+ sal_uInt16 VerJustify = (nValue1 & 0x00F0) >> 4;
+ sal_uInt16 OJustify = (nValue1 & 0x0F00) >> 8;
+ sal_uInt16 EJustify = (nValue1 & 0xF000) >> 12;
switch (HorJustify)
{
@@ -1876,13 +1876,13 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
}
if (OJustify & ojWordBreak)
- aScPattern.GetItemSet().Put(SfxBoolItem(TRUE));
+ aScPattern.GetItemSet().Put(SfxBoolItem(sal_True));
if (OJustify & ojBottomTop)
aScPattern.GetItemSet().Put(SfxInt32Item(ATTR_ROTATE_VALUE,9000));
else if (OJustify & ojTopBottom)
aScPattern.GetItemSet().Put(SfxInt32Item(ATTR_ROTATE_VALUE,27000));
- INT16 Margin = Max((USHORT)20, (USHORT)(EJustify * 20));
+ sal_Int16 Margin = Max((sal_uInt16)20, (sal_uInt16)(EJustify * 20));
if (((OJustify & ojBottomTop) == ojBottomTop) || ((OJustify & ojBottomTop) == ojBottomTop))
aScPattern.GetItemSet().Put(SvxMarginItem(20, Margin, 20, Margin, ATTR_MARGIN));
else
@@ -1892,15 +1892,15 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
nStart = nEnd + 1;
}
// Umrandung
- BOOL bEnd = FALSE;
- USHORT nColorIndex = 0;
- USHORT nFrameIndex = 0;
+ sal_Bool bEnd = sal_False;
+ sal_uInt16 nColorIndex = 0;
+ sal_uInt16 nFrameIndex = 0;
// Special Fix...
- const UINT32 nHelpMeStart = 100;
- UINT32 nHelpMe = nHelpMeStart;
- USHORT nColorIndexOld = nColorIndex;
- USHORT nFrameIndexOld = nColorIndex;
+ const sal_uInt32 nHelpMeStart = 100;
+ sal_uInt32 nHelpMe = nHelpMeStart;
+ sal_uInt16 nColorIndexOld = nColorIndex;
+ sal_uInt16 nFrameIndexOld = nColorIndex;
nEnd = 0;
nStart = 0;
@@ -1908,15 +1908,15 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
{
pColData = &aFrame.pData[ nFrameIndex ];
- USHORT nValue = pColData->Value;
- USHORT nLeft = 0;
- USHORT nTop = 0;
- USHORT nRight = 0;
- USHORT nBottom = 0;
- USHORT fLeft = ( nValue & 0x000F );
- USHORT fTop = ( nValue & 0x00F0 ) >> 4;
- USHORT fRight = ( nValue & 0x0F00 ) >> 8;
- USHORT fBottom = ( nValue & 0xF000 ) >> 12;
+ sal_uInt16 nValue = pColData->Value;
+ sal_uInt16 nLeft = 0;
+ sal_uInt16 nTop = 0;
+ sal_uInt16 nRight = 0;
+ sal_uInt16 nBottom = 0;
+ sal_uInt16 fLeft = ( nValue & 0x000F );
+ sal_uInt16 fTop = ( nValue & 0x00F0 ) >> 4;
+ sal_uInt16 fRight = ( nValue & 0x0F00 ) >> 8;
+ sal_uInt16 fBottom = ( nValue & 0xF000 ) >> 12;
if( fLeft > 1 )
nLeft = 50;
@@ -1942,12 +1942,12 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
Color ColorTop( COL_BLACK );
Color ColorRight( COL_BLACK );
Color ColorBottom( COL_BLACK );
- USHORT nFrmColVal = aFrameColor.pData[ nColorIndex ].Value;
+ sal_uInt16 nFrmColVal = aFrameColor.pData[ nColorIndex ].Value;
SCROW nFrmColRow = static_cast<SCROW>(aFrameColor.pData[ nColorIndex ].Row);
- USHORT cLeft = ( nFrmColVal & 0x000F );
- USHORT cTop = ( nFrmColVal & 0x00F0 ) >> 4;
- USHORT cRight = ( nFrmColVal & 0x0F00 ) >> 8;
- USHORT cBottom = ( nFrmColVal & 0xF000 ) >> 12;
+ sal_uInt16 cLeft = ( nFrmColVal & 0x000F );
+ sal_uInt16 cTop = ( nFrmColVal & 0x00F0 ) >> 4;
+ sal_uInt16 cRight = ( nFrmColVal & 0x0F00 ) >> 8;
+ sal_uInt16 cBottom = ( nFrmColVal & 0xF000 ) >> 12;
lcl_ChangeColor( cLeft, ColorLeft );
lcl_ChangeColor( cTop, ColorTop );
@@ -2018,20 +2018,20 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
// ACHTUNG: Code bis hier ueberarbeitet ... jetzt hab' ich keinen Bock mehr! (GT)
// Hintergrund (Farbe, Raster)
- USHORT nRasterIndex = 0;
- bEnd = FALSE;
+ sal_uInt16 nRasterIndex = 0;
+ bEnd = sal_False;
nColorIndex = 0;
nEnd = 0;
nStart = 0;
// Special Fix...
nHelpMe = nHelpMeStart;
- USHORT nRasterIndexOld = nRasterIndex;
+ sal_uInt16 nRasterIndexOld = nRasterIndex;
while( !bEnd && nHelpMe )
{
- USHORT nBColor = ( aColor.pData[ nColorIndex ].Value & 0x00F0 ) >> 4;
- USHORT nRColor = ( aColor.pData[ nColorIndex ].Value & 0x0F00 ) >> 8;
+ sal_uInt16 nBColor = ( aColor.pData[ nColorIndex ].Value & 0x00F0 ) >> 4;
+ sal_uInt16 nRColor = ( aColor.pData[ nColorIndex ].Value & 0x0F00 ) >> 8;
Color aBColor( COL_BLACK );
lcl_ChangeColor( nBColor, aBColor );
@@ -2047,12 +2047,12 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
ScPatternAttr aScPattern( pDoc->GetPool() );
- UINT16 nFact;
- BOOL bSwapCol = FALSE;
- BOOL bSetItem = TRUE;
+ sal_uInt16 nFact;
+ sal_Bool bSwapCol = sal_False;
+ sal_Bool bSetItem = sal_True;
switch ( aRaster.pData[ nRasterIndex ].Value )
{
- case raNone: nFact = 0xffff; bSwapCol = TRUE; bSetItem = (nBColor > 0); break;
+ case raNone: nFact = 0xffff; bSwapCol = sal_True; bSetItem = (nBColor > 0); break;
case raGray12: nFact = (0xffff / 100) * 12; break;
case raGray25: nFact = (0xffff / 100) * 25; break;
case raGray50: nFact = (0xffff / 100) * 50; break;
@@ -2116,12 +2116,12 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
nValue1 = pColData->Value;
if ((nStart <= nEnd) && (nValue1))
{
- ULONG nKey = 0;
- USHORT nFormat = (nValue1 & 0x00FF);
- USHORT nInfo = (nValue1 & 0xFF00) >> 8;
+ sal_uLong nKey = 0;
+ sal_uInt16 nFormat = (nValue1 & 0x00FF);
+ sal_uInt16 nInfo = (nValue1 & 0xFF00) >> 8;
ChangeFormat(nFormat, nInfo, nKey);
ScPatternAttr aScPattern(pDoc->GetPool());
- aScPattern.GetItemSet().Put(SfxUInt32Item(ATTR_VALUE_FORMAT, (UINT32)nKey));
+ aScPattern.GetItemSet().Put(SfxUInt32Item(ATTR_VALUE_FORMAT, (sal_uInt32)nKey));
pDoc->ApplyPatternAreaTab(Col, nStart, Col, nEnd, Tab, aScPattern);
}
nStart = nEnd + 1;
@@ -2135,10 +2135,10 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
nEnd = static_cast<SCROW>(aFlag.pData[i].Row);
if ((nStart <= nEnd) && (aFlag.pData[i].Value != 0))
{
- BOOL bProtect = ((aFlag.pData[i].Value & paProtect) == paProtect);
- BOOL bHFormula = ((aFlag.pData[i].Value & paHideFormula) == paHideFormula);
- BOOL bHCell = ((aFlag.pData[i].Value & paHideAll) == paHideAll);
- BOOL bHPrint = ((aFlag.pData[i].Value & paHidePrint) == paHidePrint);
+ sal_Bool bProtect = ((aFlag.pData[i].Value & paProtect) == paProtect);
+ sal_Bool bHFormula = ((aFlag.pData[i].Value & paHideFormula) == paHideFormula);
+ sal_Bool bHCell = ((aFlag.pData[i].Value & paHideAll) == paHideAll);
+ sal_Bool bHPrint = ((aFlag.pData[i].Value & paHidePrint) == paHidePrint);
ScPatternAttr aScPattern(pDoc->GetPool());
aScPattern.GetItemSet().Put(ScProtectionAttr(bProtect, bHFormula, bHCell, bHPrint));
pDoc->ApplyPatternAreaTab(Col, nStart, Col, nEnd, Tab, aScPattern);
@@ -2155,7 +2155,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
nEnd = static_cast<SCROW>(aPattern.pData[i].Row);
if ((nStart <= nEnd) && (aPattern.pData[i].Value != 0))
{
- USHORT nPatternIndex = (aPattern.pData[i].Value & 0x00FF) - 1;
+ sal_uInt16 nPatternIndex = (aPattern.pData[i].Value & 0x00FF) - 1;
Sc10PatternData* pPattern = pPatternCollection->At(nPatternIndex);
if (pPattern != NULL)
{
@@ -2189,7 +2189,7 @@ void Sc10Import::LoadAttr(Sc10ColAttr& rAttr)
rAttr.pData = new Sc10ColData[rAttr.Count];
if (rAttr.pData != NULL)
{
- for (USHORT i = 0; i < rAttr.Count; i++)
+ for (sal_uInt16 i = 0; i < rAttr.Count; i++)
{
rStream >> rAttr.pData[i].Row;
rStream >> rAttr.pData[i].Value;
@@ -2202,7 +2202,7 @@ void Sc10Import::LoadAttr(Sc10ColAttr& rAttr)
}
-void Sc10Import::ChangeFormat(USHORT nFormat, USHORT nInfo, ULONG& nKey)
+void Sc10Import::ChangeFormat(sal_uInt16 nFormat, sal_uInt16 nInfo, sal_uLong& nKey)
{
// Achtung: Die Formate werden nur auf die StarCalc 3.0 internen Formate gemappt
// Korrekterweise muessten zum Teil neue Formate erzeugt werden (sollte Stephan sich ansehen)
@@ -2347,7 +2347,7 @@ void Sc10Import::ChangeFormat(USHORT nFormat, USHORT nInfo, ULONG& nKey)
void Sc10Import::LoadObjects()
{
- USHORT ID;
+ sal_uInt16 ID;
rStream >> ID;
if (rStream.IsEof()) return;
if (ID == ObjectID)
@@ -2371,17 +2371,17 @@ void Sc10Import::LoadObjects()
//-----------------------------------
#endif
- USHORT nAnz;
+ sal_uInt16 nAnz;
rStream >> nAnz;
sal_Char Reserved[32];
rStream.Read(Reserved, sizeof(Reserved));
nError = rStream.GetError();
if ((nAnz > 0) && (nError == 0))
{
- BYTE ObjectType;
+ sal_uInt8 ObjectType;
Sc10GraphHeader GraphHeader;
- BOOL IsOleObject = FALSE; // Achtung dies ist nur ein Notnagel
- for (USHORT i = 0; (i < nAnz) && (nError == 0) && !rStream.IsEof() && !IsOleObject; i++)
+ sal_Bool IsOleObject = sal_False; // Achtung dies ist nur ein Notnagel
+ for (sal_uInt16 i = 0; (i < nAnz) && (nError == 0) && !rStream.IsEof() && !IsOleObject; i++)
{
rStream >> ObjectType;
//rStream.Read(&GraphHeader, sizeof(GraphHeader));
@@ -2437,7 +2437,7 @@ void Sc10Import::LoadObjects()
{
case otOle :
// Achtung hier muss sowas wie OleLoadFromStream passieren
- IsOleObject = TRUE;
+ IsOleObject = sal_True;
break;
case otImage :
{