diff options
Diffstat (limited to 'sc/source/ui/view/output.cxx')
-rw-r--r-- | sc/source/ui/view/output.cxx | 280 |
1 files changed, 140 insertions, 140 deletions
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index 8fbe8819fc46..421038b24a46 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -91,7 +91,7 @@ private: const ScAppOptions& rOpt; const ScStrCollection& rUsers; String aLastUserName; - USHORT nLastUserIndex; + sal_uInt16 nLastUserIndex; ColorData nColor; public: @@ -142,7 +142,7 @@ void ScActionColorChanger::Update( const ScChangeAction& rAction ) { aLastUserName = rAction.GetUser(); StrData aData(aLastUserName); - USHORT nIndex; + sal_uInt16 nIndex; if (!rUsers.Search(&aData, nIndex)) { // empty string is possible if a name wasn't found while saving a 5.0 file @@ -183,25 +183,25 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType, pEditObj( NULL ), pViewShell( NULL ), pDrawView( NULL ), // #114135# - bEditMode( FALSE ), - bMetaFile( FALSE ), - bSingleGrid( FALSE ), - bPagebreakMode( FALSE ), - bSolidBackground( FALSE ), - bUseStyleColor( FALSE ), + bEditMode( false ), + bMetaFile( false ), + bSingleGrid( false ), + bPagebreakMode( false ), + bSolidBackground( false ), + bUseStyleColor( false ), bForceAutoColor( SC_MOD()->GetAccessOptions().GetIsAutomaticFontColor() ), - bSyntaxMode( FALSE ), + bSyntaxMode( false ), pValueColor( NULL ), pTextColor( NULL ), pFormulaColor( NULL ), aGridColor( COL_BLACK ), - bShowNullValues( TRUE ), - bShowFormulas( FALSE ), - bShowSpellErrors( FALSE ), - bMarkClipped( FALSE ), // FALSE fuer Drucker/Metafile etc. - bSnapPixel( FALSE ), - bAnyRotated( FALSE ), - bAnyClipped( FALSE ), + bShowNullValues( sal_True ), + bShowFormulas( false ), + bShowSpellErrors( false ), + bMarkClipped( false ), // sal_False fuer Drucker/Metafile etc. + bSnapPixel( false ), + bAnyRotated( false ), + bAnyClipped( false ), mpTargetPaintWindow(0) // #i74769# use SdrPaintWindow direct { if (pZoomX) @@ -262,27 +262,27 @@ void ScOutputData::SetGridColor( const Color& rColor ) aGridColor = rColor; } -void ScOutputData::SetMarkClipped( BOOL bSet ) +void ScOutputData::SetMarkClipped( sal_Bool bSet ) { bMarkClipped = bSet; } -void ScOutputData::SetShowNullValues( BOOL bSet ) +void ScOutputData::SetShowNullValues( sal_Bool bSet ) { bShowNullValues = bSet; } -void ScOutputData::SetShowFormulas( BOOL bSet ) +void ScOutputData::SetShowFormulas( sal_Bool bSet ) { bShowFormulas = bSet; } -void ScOutputData::SetShowSpellErrors( BOOL bSet ) +void ScOutputData::SetShowSpellErrors( sal_Bool bSet ) { bShowSpellErrors = bSet; } -void ScOutputData::SetSnapPixel( BOOL bSet ) +void ScOutputData::SetSnapPixel( sal_Bool bSet ) { bSnapPixel = bSet; } @@ -291,20 +291,20 @@ void ScOutputData::SetEditCell( SCCOL nCol, SCROW nRow ) { nEditCol = nCol; nEditRow = nRow; - bEditMode = TRUE; + bEditMode = sal_True; } -void ScOutputData::SetMetaFileMode( BOOL bNewMode ) +void ScOutputData::SetMetaFileMode( sal_Bool bNewMode ) { bMetaFile = bNewMode; } -void ScOutputData::SetSingleGrid( BOOL bNewMode ) +void ScOutputData::SetSingleGrid( sal_Bool bNewMode ) { bSingleGrid = bNewMode; } -void ScOutputData::SetSyntaxMode( BOOL bNewMode ) +void ScOutputData::SetSyntaxMode( sal_Bool bNewMode ) { bSyntaxMode = bNewMode; if (bNewMode) @@ -316,7 +316,7 @@ void ScOutputData::SetSyntaxMode( BOOL bNewMode ) } } -void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage ) +void ScOutputData::DrawGrid( sal_Bool bGrid, sal_Bool bPage ) { SCCOL nX; SCROW nY; @@ -326,12 +326,12 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage ) ScBreakType nBreak = BREAK_NONE; ScBreakType nBreakOld = BREAK_NONE; - BOOL bSingle; + sal_Bool bSingle; Color aPageColor; Color aManualColor; if (bPagebreakMode) - bPage = FALSE; // keine "normalen" Umbrueche ueber volle Breite/Hoehe + bPage = false; // keine "normalen" Umbrueche ueber volle Breite/Hoehe //! um den einen Pixel sieht das Metafile (oder die Druck-Ausgabe) anders aus //! als die Bildschirmdarstellung, aber wenigstens passen Druck und Metafile zusammen @@ -372,7 +372,7 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage ) { SCCOL nXplus1 = nX+1; SCCOL nXplus2 = nX+2; - USHORT nWidth = pRowInfo[0].pCellInfo[nXplus1].nWidth; + sal_uInt16 nWidth = pRowInfo[0].pCellInfo[nXplus1].nWidth; if (nWidth) { nPosX += nWidth * nLayoutSign; @@ -400,9 +400,9 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage ) } } - BOOL bDraw = bGrid || nBreakOld; // einfaches Gitter nur wenn eingestellt + sal_Bool bDraw = bGrid || nBreakOld; // einfaches Gitter nur wenn eingestellt - USHORT nWidthXplus2 = pRowInfo[0].pCellInfo[nXplus2].nWidth; + sal_uInt16 nWidthXplus2 = pRowInfo[0].pCellInfo[nXplus2].nWidth; bSingle = bSingleGrid; //! in Fillinfo holen !!!!! if ( nX<MAXCOL && !bSingle ) { @@ -410,9 +410,9 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage ) for (nArrY=1; nArrY+1<nArrCount && !bSingle; nArrY++) { if (pRowInfo[nArrY].pCellInfo[nXplus2].bHOverlapped) - bSingle = TRUE; + bSingle = sal_True; if (pRowInfo[nArrY].pCellInfo[nXplus1].bHideGrid) - bSingle = TRUE; + bSingle = sal_True; } } @@ -431,7 +431,7 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage ) RowInfo* pThisRowInfo = &pRowInfo[nArrY]; nNextY = nPosY + pThisRowInfo->nHeight; - BOOL bHOver = pThisRowInfo->pCellInfo[nXplus1].bHideGrid; + sal_Bool bHOver = pThisRowInfo->pCellInfo[nXplus1].bHideGrid; if (!bHOver) { if (nWidthXplus2) @@ -509,14 +509,14 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage ) } } - BOOL bDraw = bGrid || nBreakOld; // einfaches Gitter nur wenn eingestellt + sal_Bool bDraw = bGrid || nBreakOld; // einfaches Gitter nur wenn eingestellt - BOOL bNextYisNextRow = (pRowInfo[nArrYplus1].nRowNo == nYplus1); + sal_Bool bNextYisNextRow = (pRowInfo[nArrYplus1].nRowNo == nYplus1); bSingle = !bNextYisNextRow; // Hidden for (SCCOL i=nX1; i<=nX2 && !bSingle; i++) { if (pRowInfo[nArrYplus1].pCellInfo[i+1].bVOverlapped) - bSingle = TRUE; + bSingle = sal_True; } if (bDraw) @@ -535,7 +535,7 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage ) nNextX = nPosX + pRowInfo[0].pCellInfo[i+1].nWidth * nLayoutSign; if (nNextX != nPosX) // sichtbar { - BOOL bVOver; + sal_Bool bVOver; if ( bNextYisNextRow ) bVOver = pRowInfo[nArrYplus1].pCellInfo[i+1].bVOverlapped; else @@ -569,15 +569,15 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage ) void ScOutputData::SetPagebreakMode( ScPageBreakData* pPageData ) { - bPagebreakMode = TRUE; + bPagebreakMode = sal_True; if (!pPageData) return; // noch nicht initialisiert -> alles "nicht gedruckt" // gedruckten Bereich markieren - // (in FillInfo ist schon alles auf FALSE initialisiert) + // (in FillInfo ist schon alles auf sal_False initialisiert) - USHORT nRangeCount = sal::static_int_cast<USHORT>(pPageData->GetCount()); - for (USHORT nPos=0; nPos<nRangeCount; nPos++) + sal_uInt16 nRangeCount = sal::static_int_cast<sal_uInt16>(pPageData->GetCount()); + for (sal_uInt16 nPos=0; nPos<nRangeCount; nPos++) { ScRange aRange = pPageData->GetData( nPos ).GetPrintRange(); @@ -593,7 +593,7 @@ void ScOutputData::SetPagebreakMode( ScPageBreakData* pPageData ) pThisRowInfo->nRowNo <= nEndY ) { for (SCCOL nX=nStartX; nX<=nEndX; nX++) - pThisRowInfo->pCellInfo[nX+1].bPrinted = TRUE; + pThisRowInfo->pCellInfo[nX+1].bPrinted = sal_True; } } } @@ -630,11 +630,11 @@ void ScOutputData::FindRotated() if ( pPattern ) // Spalte nicht ausgeblendet { - BYTE nDir = pPattern->GetRotateDir( pCondSet ); + sal_uInt8 nDir = pPattern->GetRotateDir( pCondSet ); if (nDir != SC_ROTDIR_NONE) { pInfo->nRotateDir = nDir; - bAnyRotated = TRUE; + bAnyRotated = sal_True; } } } @@ -644,12 +644,12 @@ void ScOutputData::FindRotated() // ---------------------------------------------------------------------------- -USHORT lcl_GetRotateDir( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab ) +sal_uInt16 lcl_GetRotateDir( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab ) { const ScPatternAttr* pPattern = pDoc->GetPattern( nCol, nRow, nTab ); const SfxItemSet* pCondSet = pDoc->GetCondResult( nCol, nRow, nTab ); - USHORT nRet = SC_ROTDIR_NONE; + sal_uInt16 nRet = SC_ROTDIR_NONE; long nAttrRotate = pPattern->GetRotateVal( pCondSet ); if ( nAttrRotate ) @@ -684,7 +684,7 @@ const SvxBrushItem* lcl_FindBackground( ScDocument* pDoc, SCCOL nCol, SCROW nRow const SvxBrushItem* pBackground = (const SvxBrushItem*) &pPattern->GetItem( ATTR_BACKGROUND, pCondSet ); - USHORT nDir = lcl_GetRotateDir( pDoc, nCol, nRow, nTab ); + sal_uInt16 nDir = lcl_GetRotateDir( pDoc, nCol, nRow, nTab ); // CENTER wird wie RIGHT behandelt... if ( nDir == SC_ROTDIR_RIGHT || nDir == SC_ROTDIR_CENTER ) @@ -717,12 +717,12 @@ const SvxBrushItem* lcl_FindBackground( ScDocument* pDoc, SCCOL nCol, SCROW nRow // ---------------------------------------------------------------------------- -BOOL lcl_EqualBack( const RowInfo& rFirst, const RowInfo& rOther, - SCCOL nX1, SCCOL nX2, BOOL bShowProt, BOOL bPagebreakMode ) +sal_Bool lcl_EqualBack( const RowInfo& rFirst, const RowInfo& rOther, + SCCOL nX1, SCCOL nX2, sal_Bool bShowProt, sal_Bool bPagebreakMode ) { if ( rFirst.bChanged != rOther.bChanged || rFirst.bEmptyBack != rOther.bEmptyBack ) - return FALSE; + return false; SCCOL nX; if ( bShowProt ) @@ -733,27 +733,27 @@ BOOL lcl_EqualBack( const RowInfo& rFirst, const RowInfo& rOther, const ScPatternAttr* pPat2 = rOther.pCellInfo[nX+1].pPatternAttr; if ( !pPat1 || !pPat2 || &pPat1->GetItem(ATTR_PROTECTION) != &pPat2->GetItem(ATTR_PROTECTION) ) - return FALSE; + return false; } } else { for ( nX=nX1; nX<=nX2; nX++ ) if ( rFirst.pCellInfo[nX+1].pBackground != rOther.pCellInfo[nX+1].pBackground ) - return FALSE; + return false; } if ( rFirst.nRotMaxCol != SC_ROTMAX_NONE || rOther.nRotMaxCol != SC_ROTMAX_NONE ) for ( nX=nX1; nX<=nX2; nX++ ) if ( rFirst.pCellInfo[nX+1].nRotateDir != rOther.pCellInfo[nX+1].nRotateDir ) - return FALSE; + return false; if ( bPagebreakMode ) for ( nX=nX1; nX<=nX2; nX++ ) if ( rFirst.pCellInfo[nX+1].bPrinted != rOther.pCellInfo[nX+1].bPrinted ) - return FALSE; + return false; - return TRUE; + return sal_True; } void ScOutputData::DrawDocumentBackground() @@ -787,11 +787,11 @@ void ScOutputData::DrawBackground() pDev->SetLineColor(); - BOOL bShowProt = bSyntaxMode && pDoc->IsTabProtected(nTab); - BOOL bDoAll = bShowProt || bPagebreakMode || bSolidBackground; + sal_Bool bShowProt = bSyntaxMode && pDoc->IsTabProtected(nTab); + sal_Bool bDoAll = bShowProt || bPagebreakMode || bSolidBackground; // SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE) - BOOL bCellContrast = bUseStyleColor && + sal_Bool bCellContrast = bUseStyleColor && Application::GetSettings().GetStyleSettings().GetHighContrastMode(); long nPosY = nScrY; @@ -900,16 +900,16 @@ void ScOutputData::DrawBackground() void ScOutputData::DrawShadow() { - DrawExtraShadow( FALSE, FALSE, FALSE, FALSE ); + DrawExtraShadow( false, false, false, false ); } -void ScOutputData::DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBottom) +void ScOutputData::DrawExtraShadow(sal_Bool bLeft, sal_Bool bTop, sal_Bool bRight, sal_Bool bBottom) { pDev->SetLineColor(); const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); // SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE) - BOOL bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode(); + sal_Bool bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode(); Color aAutoTextColor; if ( bCellContrast ) aAutoTextColor.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor ); @@ -926,8 +926,8 @@ void ScOutputData::DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBot long nPosY = nScrY - pRowInfo[0].nHeight; for (SCSIZE nArrY=0; nArrY<nArrCount; nArrY++) { - BOOL bCornerY = ( nArrY == 0 ) || ( nArrY+1 == nArrCount ); - BOOL bSkipY = ( nArrY==0 && !bTop ) || ( nArrY+1 == nArrCount && !bBottom ); + sal_Bool bCornerY = ( nArrY == 0 ) || ( nArrY+1 == nArrCount ); + sal_Bool bSkipY = ( nArrY==0 && !bTop ) || ( nArrY+1 == nArrCount && !bBottom ); RowInfo* pThisRowInfo = &pRowInfo[nArrY]; long nRowHeight = pThisRowInfo->nHeight; @@ -937,10 +937,10 @@ void ScOutputData::DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBot long nPosX = nInitPosX - pRowInfo[0].pCellInfo[nX1].nWidth * nLayoutSign; for (SCCOL nArrX=nX1; nArrX<=nX2+2; nArrX++) { - BOOL bCornerX = ( nArrX==nX1 || nArrX==nX2+2 ); - BOOL bSkipX = ( nArrX==nX1 && !bLeft ) || ( nArrX==nX2+2 && !bRight ); + sal_Bool bCornerX = ( nArrX==nX1 || nArrX==nX2+2 ); + sal_Bool bSkipX = ( nArrX==nX1 && !bLeft ) || ( nArrX==nX2+2 && !bRight ); - for (USHORT nPass=0; nPass<2; nPass++) // horizontal / vertikal + for (sal_uInt16 nPass=0; nPass<2; nPass++) // horizontal / vertikal { const SvxShadowItem* pAttr = nPass ? pThisRowInfo->pCellInfo[nArrX].pVShadowOrigin : @@ -951,10 +951,10 @@ void ScOutputData::DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBot pThisRowInfo->pCellInfo[nArrX].eVShadowPart : pThisRowInfo->pCellInfo[nArrX].eHShadowPart; - BOOL bDo = TRUE; + sal_Bool bDo = sal_True; if ( (nPass==0 && bCornerX) || (nPass==1 && bCornerY) ) if ( ePart != SC_SHADOW_CORNER ) - bDo = FALSE; + bDo = false; if (bDo) { @@ -1107,20 +1107,20 @@ long lclGetSnappedY( OutputDevice& rDev, long nPosY, bool bSnapPixel ) return (bSnapPixel && nPosY) ? rDev.PixelToLogic( rDev.LogicToPixel( Size( 0, nPosY ) ) ).Height() : nPosY; } -size_t lclGetArrayColFromCellInfoX( USHORT nCellInfoX, USHORT nCellInfoFirstX, USHORT nCellInfoLastX, bool bRTL ) +size_t lclGetArrayColFromCellInfoX( sal_uInt16 nCellInfoX, sal_uInt16 nCellInfoFirstX, sal_uInt16 nCellInfoLastX, bool bRTL ) { return static_cast< size_t >( bRTL ? (nCellInfoLastX + 2 - nCellInfoX) : (nCellInfoX - nCellInfoFirstX) ); } void ScOutputData::DrawFrame() { - ULONG nOldDrawMode = pDev->GetDrawMode(); + sal_uLong nOldDrawMode = pDev->GetDrawMode(); Color aSingleColor; - BOOL bUseSingleColor = FALSE; + sal_Bool bUseSingleColor = false; const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); // SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE) - BOOL bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode(); + sal_Bool bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode(); // if a Calc OLE object is embedded in Draw/Impress, the VCL DrawMode is used // for display mode / B&W printing. The VCL DrawMode handling doesn't work for lines @@ -1131,18 +1131,18 @@ void ScOutputData::DrawFrame() { pDev->SetDrawMode( nOldDrawMode & (~DRAWMODE_WHITEFILL) ); aSingleColor.SetColor( COL_BLACK ); - bUseSingleColor = TRUE; + bUseSingleColor = sal_True; } else if ( ( nOldDrawMode & DRAWMODE_SETTINGSFILL ) && ( nOldDrawMode & DRAWMODE_SETTINGSLINE ) ) { pDev->SetDrawMode( nOldDrawMode & (~DRAWMODE_SETTINGSFILL) ); aSingleColor = rStyleSettings.GetWindowTextColor(); // same as used in VCL for DRAWMODE_SETTINGSLINE - bUseSingleColor = TRUE; + bUseSingleColor = sal_True; } else if ( bCellContrast ) { aSingleColor.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor ); - bUseSingleColor = TRUE; + bUseSingleColor = sal_True; } const Color* pForceColor = bUseSingleColor ? &aSingleColor : 0; @@ -1191,7 +1191,7 @@ void ScOutputData::DrawFrame() // set X offset for left-to-right sheets; for right-to-left sheets this is done after for() loop if( !bLayoutRTL ) rArray.SetXOffset( nOldSnapX ); - for( USHORT nInfoIdx = nX1; nInfoIdx <= nX2 + 2; ++nInfoIdx ) + for( sal_uInt16 nInfoIdx = nX1; nInfoIdx <= nX2 + 2; ++nInfoIdx ) { size_t nCol = lclGetArrayColFromCellInfoX( nInfoIdx, nX1, nX2, bLayoutRTL ); long nNewPosX = nOldPosX + pRowInfo[ 0 ].pCellInfo[ nInfoIdx ].nWidth * nLayoutSign; @@ -1235,13 +1235,13 @@ void ScOutputData::DrawFrame() // Linie unter der Zelle const SvxBorderLine* lcl_FindHorLine( ScDocument* pDoc, - SCCOL nCol, SCROW nRow, SCTAB nTab, USHORT nRotDir, - BOOL bTopLine ) + SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nRotDir, + sal_Bool bTopLine ) { if ( nRotDir != SC_ROTDIR_LEFT && nRotDir != SC_ROTDIR_RIGHT ) return NULL; - BOOL bFound = FALSE; + sal_Bool bFound = false; while (!bFound) { if ( nRotDir == SC_ROTDIR_LEFT ) @@ -1265,7 +1265,7 @@ const SvxBorderLine* lcl_FindHorLine( ScDocument* pDoc, if ( !pPattern->GetRotateVal( pCondSet ) || ((const SvxRotateModeItem&)pPattern->GetItem( ATTR_ROTATE_MODE, pCondSet)).GetValue() == SVX_ROTATE_MODE_STANDARD ) - bFound = TRUE; + bFound = sal_True; } if (bTopLine) @@ -1384,7 +1384,7 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor ) const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); // SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE) - BOOL bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode(); + sal_Bool bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode(); // color (pForceColor) is determined externally, including DrawMode changes @@ -1432,7 +1432,7 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor ) { if (nX==nX1) nPosX = nInitPosX; // calculated individually for preceding positions - USHORT nArrX = nX + 1; + sal_uInt16 nArrX = nX + 1; CellInfo* pInfo = &rThisRowInfo.pCellInfo[nArrX]; long nColWidth = pRowInfo[0].pCellInfo[nArrX].nWidth; @@ -1590,7 +1590,7 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor ) nX = nX1 > 0 ? (nX1-1) : static_cast<SCCOL>(0); for (; nX<=nX2+1; nX++) // sichtbarer Teil +- 1 { - USHORT nArrX = nX + 1; + sal_uInt16 nArrX = nX + 1; CellInfo& rInfo = rThisRowInfo.pCellInfo[nArrX]; if ( rInfo.nRotateDir > SC_ROTDIR_STANDARD && !rInfo.bHOverlapped && !rInfo.bVOverlapped ) @@ -1604,17 +1604,17 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor ) // horizontal: angrenzende Linie verlaengern // (nur, wenn die gedrehte Zelle eine Umrandung hat) - USHORT nDir = rInfo.nRotateDir; + sal_uInt16 nDir = rInfo.nRotateDir; if ( rArray.GetCellStyleTop( nCol, nRow ).Prim() && eRotMode != SVX_ROTATE_MODE_TOP ) { - svx::frame::Style aStyle( lcl_FindHorLine( pDoc, nX, nY, nTab, nDir, TRUE ), nPPTY ); + svx::frame::Style aStyle( lcl_FindHorLine( pDoc, nX, nY, nTab, nDir, sal_True ), nPPTY ); rArray.SetCellStyleTop( nCol, nRow, aStyle ); if( nRow > 0 ) rArray.SetCellStyleBottom( nCol, nRow - 1, aStyle ); } if ( rArray.GetCellStyleBottom( nCol, nRow ).Prim() && eRotMode != SVX_ROTATE_MODE_BOTTOM ) { - svx::frame::Style aStyle( lcl_FindHorLine( pDoc, nX, nY, nTab, nDir, FALSE ), nPPTY ); + svx::frame::Style aStyle( lcl_FindHorLine( pDoc, nX, nY, nTab, nDir, false ), nPPTY ); rArray.SetCellStyleBottom( nCol, nRow, aStyle ); if( nRow + 1 < rArray.GetRowCount() ) rArray.SetCellStyleTop( nCol, nRow + 1, aStyle ); @@ -1659,7 +1659,7 @@ PolyPolygon ScOutputData::GetChangedArea() aDrawingRect.Left() = nScrX; aDrawingRect.Right() = nScrX+nScrW-1; - BOOL bHad = FALSE; + sal_Bool bHad = false; long nPosY = nScrY; SCSIZE nArrY; for (nArrY=1; nArrY+1<nArrCount; nArrY++) @@ -1671,14 +1671,14 @@ PolyPolygon ScOutputData::GetChangedArea() if (!bHad) { aDrawingRect.Top() = nPosY; - bHad = TRUE; + bHad = sal_True; } aDrawingRect.Bottom() = nPosY + pRowInfo[nArrY].nHeight - 1; } else if (bHad) { aPoly.Insert( Polygon( pDev->PixelToLogic(aDrawingRect) ) ); - bHad = FALSE; + bHad = false; } nPosY += pRowInfo[nArrY].nHeight; } @@ -1689,7 +1689,7 @@ PolyPolygon ScOutputData::GetChangedArea() return aPoly; } -BOOL ScOutputData::SetChangedClip() +sal_Bool ScOutputData::SetChangedClip() { PolyPolygon aPoly; @@ -1697,7 +1697,7 @@ BOOL ScOutputData::SetChangedClip() aDrawingRect.Left() = nScrX; aDrawingRect.Right() = nScrX+nScrW-1; - BOOL bHad = FALSE; + sal_Bool bHad = false; long nPosY = nScrY; SCSIZE nArrY; for (nArrY=1; nArrY+1<nArrCount; nArrY++) @@ -1709,14 +1709,14 @@ BOOL ScOutputData::SetChangedClip() if (!bHad) { aDrawingRect.Top() = nPosY; - bHad = TRUE; + bHad = sal_True; } aDrawingRect.Bottom() = nPosY + pRowInfo[nArrY].nHeight - 1; } else if (bHad) { aPoly.Insert( Polygon( pDev->PixelToLogic(aDrawingRect) ) ); - bHad = FALSE; + bHad = false; } nPosY += pRowInfo[nArrY].nHeight; } @@ -1724,7 +1724,7 @@ BOOL ScOutputData::SetChangedClip() if (bHad) aPoly.Insert( Polygon( pDev->PixelToLogic(aDrawingRect) ) ); - BOOL bRet = (aPoly.Count() != 0); + sal_Bool bRet = (aPoly.Count() != 0); if (bRet) pDev->SetClipRegion(Region(aPoly)); return bRet; @@ -1735,12 +1735,12 @@ void ScOutputData::FindChanged() SCCOL nX; SCSIZE nArrY; - BOOL bWasIdleDisabled = pDoc->IsIdleDisabled(); - pDoc->DisableIdle( TRUE ); + sal_Bool bWasIdleDisabled = pDoc->IsIdleDisabled(); + pDoc->DisableIdle( sal_True ); for (nArrY=0; nArrY<nArrCount; nArrY++) - pRowInfo[nArrY].bChanged = FALSE; + pRowInfo[nArrY].bChanged = false; - BOOL bProgress = FALSE; + sal_Bool bProgress = false; for (nArrY=0; nArrY<nArrCount; nArrY++) { RowInfo* pThisRowInfo = &pRowInfo[nArrY]; @@ -1753,22 +1753,22 @@ void ScOutputData::FindChanged() ScFormulaCell* pFCell = (ScFormulaCell*)pCell; if ( !bProgress && pFCell->GetDirty() ) { - ScProgress::CreateInterpretProgress( pDoc, TRUE ); - bProgress = TRUE; + ScProgress::CreateInterpretProgress( pDoc, sal_True ); + bProgress = sal_True; } if (!pFCell->IsRunning()) { (void)pFCell->GetValue(); if (pFCell->IsChanged()) { - pThisRowInfo->bChanged = TRUE; + pThisRowInfo->bChanged = sal_True; if ( pThisRowInfo->pCellInfo[nX+1].bMerged ) { SCSIZE nOverY = nArrY + 1; while ( nOverY<nArrCount && pRowInfo[nOverY].pCellInfo[nX+1].bVOverlapped ) { - pRowInfo[nOverY].bChanged = TRUE; + pRowInfo[nOverY].bChanged = sal_True; ++nOverY; } } @@ -1784,7 +1784,7 @@ void ScOutputData::FindChanged() void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY, SCCOL nRefEndX, SCROW nRefEndY, - const Color& rColor, BOOL bHandle ) + const Color& rColor, sal_Bool bHandle ) { PutInOrder( nRefStartX, nRefEndX ); PutInOrder( nRefStartY, nRefEndY ); @@ -1807,14 +1807,14 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY, } long nLayoutSign = bLayoutRTL ? -1 : 1; - BOOL bTop = FALSE; - BOOL bBottom = FALSE; - BOOL bLeft = FALSE; - BOOL bRight = FALSE; + sal_Bool bTop = false; + sal_Bool bBottom = false; + sal_Bool bLeft = false; + sal_Bool bRight = false; long nPosY = nScrY; - BOOL bNoStartY = ( nY1 < nRefStartY ); - BOOL bNoEndY = FALSE; + sal_Bool bNoStartY = ( nY1 < nRefStartY ); + sal_Bool bNoEndY = false; for (SCSIZE nArrY=1; nArrY<nArrCount; nArrY++) // loop to end for bNoEndY check { SCROW nY = pRowInfo[nArrY].nRowNo; @@ -1822,17 +1822,17 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY, if ( nY==nRefStartY || (nY>nRefStartY && bNoStartY) ) { nMinY = nPosY; - bTop = TRUE; + bTop = sal_True; } if ( nY==nRefEndY ) { nMaxY = nPosY + pRowInfo[nArrY].nHeight - 2; - bBottom = TRUE; + bBottom = sal_True; } if ( nY>nRefEndY && bNoEndY ) { nMaxY = nPosY-2; - bBottom = TRUE; + bBottom = sal_True; } bNoStartY = ( nY < nRefStartY ); bNoEndY = ( nY < nRefEndY ); @@ -1848,12 +1848,12 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY, if ( nX==nRefStartX ) { nMinX = nPosX; - bLeft = TRUE; + bLeft = sal_True; } if ( nX==nRefEndX ) { nMaxX = nPosX + ( pRowInfo[0].pCellInfo[nX+1].nWidth - 2 ) * nLayoutSign; - bRight = TRUE; + bRight = sal_True; } nPosX += pRowInfo[0].pCellInfo[nX+1].nWidth * nLayoutSign; } @@ -1890,7 +1890,7 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY, void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY, SCCOL nRefEndX, SCROW nRefEndY, - const Color& rColor, USHORT nType ) + const Color& rColor, sal_uInt16 nType ) { PutInOrder( nRefStartX, nRefEndX ); PutInOrder( nRefStartY, nRefEndY ); @@ -1913,14 +1913,14 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY, } long nLayoutSign = bLayoutRTL ? -1 : 1; - BOOL bTop = FALSE; - BOOL bBottom = FALSE; - BOOL bLeft = FALSE; - BOOL bRight = FALSE; + sal_Bool bTop = false; + sal_Bool bBottom = false; + sal_Bool bLeft = false; + sal_Bool bRight = false; long nPosY = nScrY; - BOOL bNoStartY = ( nY1 < nRefStartY ); - BOOL bNoEndY = FALSE; + sal_Bool bNoStartY = ( nY1 < nRefStartY ); + sal_Bool bNoEndY = false; for (SCSIZE nArrY=1; nArrY<nArrCount; nArrY++) // loop to end for bNoEndY check { SCROW nY = pRowInfo[nArrY].nRowNo; @@ -1928,17 +1928,17 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY, if ( nY==nRefStartY || (nY>nRefStartY && bNoStartY) ) { nMinY = nPosY - 1; - bTop = TRUE; + bTop = sal_True; } if ( nY==nRefEndY ) { nMaxY = nPosY + pRowInfo[nArrY].nHeight - 1; - bBottom = TRUE; + bBottom = sal_True; } if ( nY>nRefEndY && bNoEndY ) { nMaxY = nPosY - 1; - bBottom = TRUE; + bBottom = sal_True; } bNoStartY = ( nY < nRefStartY ); bNoEndY = ( nY < nRefEndY ); @@ -1954,12 +1954,12 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY, if ( nX==nRefStartX ) { nMinX = nPosX - nLayoutSign; - bLeft = TRUE; + bLeft = sal_True; } if ( nX==nRefEndX ) { nMaxX = nPosX + ( pRowInfo[0].pCellInfo[nX+1].nWidth - 1 ) * nLayoutSign; - bRight = TRUE; + bRight = sal_True; } nPosX += pRowInfo[0].pCellInfo[nX+1].nWidth * nLayoutSign; } @@ -1968,9 +1968,9 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY, nMaxY >= nMinY ) { if ( nType == SC_CAT_DELETE_ROWS ) - bLeft = bRight = bBottom = FALSE; //! dicke Linie ??? + bLeft = bRight = bBottom = false; //! dicke Linie ??? else if ( nType == SC_CAT_DELETE_COLS ) - bTop = bBottom = bRight = FALSE; //! dicke Linie ??? + bTop = bBottom = bRight = false; //! dicke Linie ??? pDev->SetLineColor( rColor ); if (bTop && bBottom && bLeft && bRight) @@ -2047,7 +2047,7 @@ void ScOutputData::DrawChangeTrack() aColorChanger.Update( *pAction ); Color aColor( aColorChanger.GetColor() ); DrawOneChange( aRange.aStart.Col(), aRange.aStart.Row(), - aRange.aEnd.Col(), aRange.aEnd.Row(), aColor, sal::static_int_cast<USHORT>(eActionType) ); + aRange.aEnd.Col(), aRange.aEnd.Row(), aColor, sal::static_int_cast<sal_uInt16>(eActionType) ); } } @@ -2063,7 +2063,7 @@ void ScOutputData::DrawChangeTrack() aColorChanger.Update( *pAction ); Color aColor( aColorChanger.GetColor() ); DrawOneChange( aRange.aStart.Col(), aRange.aStart.Row(), - aRange.aEnd.Col(), aRange.aEnd.Row(), aColor, sal::static_int_cast<USHORT>(eActionType) ); + aRange.aEnd.Col(), aRange.aEnd.Row(), aColor, sal::static_int_cast<sal_uInt16>(eActionType) ); } } } @@ -2074,7 +2074,7 @@ void ScOutputData::DrawChangeTrack() void ScOutputData::DrawNoteMarks() { - BOOL bFirst = TRUE; + sal_Bool bFirst = sal_True; long nInitPosX = nScrX; if ( bLayoutRTL ) @@ -2092,12 +2092,12 @@ void ScOutputData::DrawNoteMarks() { CellInfo* pInfo = &pThisRowInfo->pCellInfo[nX+1]; ScBaseCell* pCell = pInfo->pCell; - BOOL bIsMerged = FALSE; + sal_Bool bIsMerged = false; if ( nX==nX1 && pInfo->bHOverlapped && !pInfo->bVOverlapped ) { // find start of merged cell - bIsMerged = TRUE; + bIsMerged = sal_True; SCROW nY = pRowInfo[nArrY].nRowNo; SCCOL nMergeX = nX; SCROW nMergeY = nY; @@ -2119,7 +2119,7 @@ void ScOutputData::DrawNoteMarks() else pDev->SetFillColor(COL_LIGHTRED); - bFirst = FALSE; + bFirst = false; } long nMarkX = nPosX + ( pRowInfo[0].pCellInfo[nX+1].nWidth - 4 ) * nLayoutSign; @@ -2170,7 +2170,7 @@ void ScOutputData::AddPDFNotes() { CellInfo* pInfo = &pThisRowInfo->pCellInfo[nX+1]; ScBaseCell* pCell = pInfo->pCell; - BOOL bIsMerged = FALSE; + sal_Bool bIsMerged = false; SCROW nY = pRowInfo[nArrY].nRowNo; SCCOL nMergeX = nX; SCROW nMergeY = nY; @@ -2178,7 +2178,7 @@ void ScOutputData::AddPDFNotes() if ( nX==nX1 && pInfo->bHOverlapped && !pInfo->bVOverlapped ) { // find start of merged cell - bIsMerged = TRUE; + bIsMerged = sal_True; pDoc->ExtendOverlapped( nMergeX, nMergeY, nX, nY, nTab ); pCell = pDoc->GetCell( ScAddress(nMergeX,nMergeY,nTab) ); // use origin's pCell for NotePtr test below @@ -2238,7 +2238,7 @@ void ScOutputData::DrawClipMarks() Color aArrowFillCol( COL_LIGHTRED ); - ULONG nOldDrawMode = pDev->GetDrawMode(); + sal_uLong nOldDrawMode = pDev->GetDrawMode(); const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); if ( bUseStyleColor && rStyleSettings.GetHighContrastMode() ) { @@ -2345,14 +2345,14 @@ void ScOutputData::DrawClipMarks() // visually left Rectangle aMarkRect = aCellRect; aMarkRect.Right() = aCellRect.Left()+nMarkPixel-1; - SvxFont::DrawArrow( *pDev, aMarkRect, aMarkSize, aArrowFillCol, TRUE ); + SvxFont::DrawArrow( *pDev, aMarkRect, aMarkSize, aArrowFillCol, true ); } if ( pInfo->nClipMark & ( bLayoutRTL ? SC_CLIPMARK_LEFT : SC_CLIPMARK_RIGHT ) ) { // visually right Rectangle aMarkRect = aCellRect; aMarkRect.Left() = aCellRect.Right()-nMarkPixel+1; - SvxFont::DrawArrow( *pDev, aMarkRect, aMarkSize, aArrowFillCol, FALSE ); + SvxFont::DrawArrow( *pDev, aMarkRect, aMarkSize, aArrowFillCol, false ); } } nPosX += pRowInfo[0].pCellInfo[nX+1].nWidth * nLayoutSign; |