diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-03-10 16:55:21 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-03-10 20:21:13 -0500 |
commit | 12343c15568dcc2c9209d8ca41fda2263122448f (patch) | |
tree | 3212a89c6cd8ea2e0aee7103aa9669bbb8a6f307 /sc/source/ui/view/gridwin4.cxx | |
parent | 99745dbcbb25b61437914c9782475d0b67a4b0bd (diff) | |
parent | ce6308e4fad2281241bf4ca78280eba29f744d43 (diff) |
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
Diffstat (limited to 'sc/source/ui/view/gridwin4.cxx')
-rw-r--r-- | sc/source/ui/view/gridwin4.cxx | 212 |
1 files changed, 106 insertions, 106 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 9fdd02c867d4..57dc1dd9c22f 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -88,9 +88,9 @@ void lcl_LimitRect( Rectangle& rRect, const Rectangle& rVisible ) } void lcl_DrawOneFrame( OutputDevice* pDev, const Rectangle& rInnerPixel, - const String& rTitle, const Color& rColor, BOOL bTextBelow, + const String& rTitle, const Color& rColor, sal_Bool bTextBelow, double nPPTX, double nPPTY, const Fraction& rZoomY, - ScDocument* pDoc, ScViewData* pButtonViewData, BOOL bLayoutRTL ) + ScDocument* pDoc, ScViewData* pButtonViewData, sal_Bool bLayoutRTL ) { // pButtonViewData wird nur benutzt, um die Button-Groesse zu setzen, // darf ansonsten NULL sein! @@ -149,20 +149,20 @@ void lcl_DrawOneFrame( OutputDevice* pDev, const Rectangle& rInnerPixel, long nBHeight = nVer + aTextSize.Height() + 1; Size aButSize( nBWidth, nBHeight ); long nButtonPos = bLayoutRTL ? aOuter.Left() : aOuter.Right()-nBWidth+1; - aComboButton.Draw( Point(nButtonPos, nButtonY), aButSize, FALSE ); + aComboButton.Draw( Point(nButtonPos, nButtonY), aButSize, false ); if (pButtonViewData) pButtonViewData->SetScenButSize( aButSize ); long nTextStart = bLayoutRTL ? aInner.Right() - aTextSize.Width() + 1 : aInner.Left(); - BOOL bWasClip = FALSE; + sal_Bool bWasClip = false; Region aOldClip; - BOOL bClip = ( aTextSize.Width() > aOuter.Right() - nBWidth - aInner.Left() ); + sal_Bool bClip = ( aTextSize.Width() > aOuter.Right() - nBWidth - aInner.Left() ); if ( bClip ) { if (pDev->IsClipRegion()) { - bWasClip = TRUE; + bWasClip = sal_True; aOldClip = pDev->GetActiveClipRegion(); } long nClipStartX = bLayoutRTL ? aOuter.Left() + nBWidth : aInner.Left(); @@ -207,11 +207,11 @@ void lcl_DrawScenarioFrames( OutputDevice* pDev, ScViewData* pViewData, ScSplitP ScMarkData aMarks; for (SCTAB i=nTab+1; i<nTabCount && pDoc->IsScenario(i); i++) - pDoc->MarkScenario( i, nTab, aMarks, FALSE, SC_SCENARIO_SHOWFRAME ); + pDoc->MarkScenario( i, nTab, aMarks, false, SC_SCENARIO_SHOWFRAME ); ScRangeListRef xRanges = new ScRangeList; - aMarks.FillRangeListWithMarks( xRanges, FALSE ); + aMarks.FillRangeListWithMarks( xRanges, false ); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; for (size_t j = 0, n = xRanges->size(); j < n; ++j) @@ -226,16 +226,16 @@ void lcl_DrawScenarioFrames( OutputDevice* pDev, ScViewData* pViewData, ScSplitP if ( aRange.Intersects( aViewRange ) ) //! Platz fuer Text/Button? { Point aStartPos = pViewData->GetScrPos( - aRange.aStart.Col(), aRange.aStart.Row(), eWhich, TRUE ); + aRange.aStart.Col(), aRange.aStart.Row(), eWhich, sal_True ); Point aEndPos = pViewData->GetScrPos( - aRange.aEnd.Col()+1, aRange.aEnd.Row()+1, eWhich, TRUE ); + aRange.aEnd.Col()+1, aRange.aEnd.Row()+1, eWhich, sal_True ); // on the grid: aStartPos.X() -= nLayoutSign; aStartPos.Y() -= 1; aEndPos.X() -= nLayoutSign; aEndPos.Y() -= 1; - BOOL bTextBelow = ( aRange.aStart.Row() == 0 ); + sal_Bool bTextBelow = ( aRange.aStart.Row() == 0 ); String aCurrent; Color aColor( COL_LIGHTGRAY ); @@ -243,7 +243,7 @@ void lcl_DrawScenarioFrames( OutputDevice* pDev, ScViewData* pViewData, ScSplitP if ( pDoc->IsActiveScenario(nAct) && pDoc->HasScenarioRange(nAct,aRange) ) { String aDummyComment; - USHORT nDummyFlags; + sal_uInt16 nDummyFlags; pDoc->GetName( nAct, aCurrent ); pDoc->GetScenarioData( nAct, aDummyComment, aColor, nDummyFlags ); } @@ -268,8 +268,8 @@ void lcl_DrawHighlight( ScOutputData& rOutputData, ScViewData* pViewData, ScHighlightRanges& rHighlightRanges ) { SCTAB nTab = pViewData->GetTabNo(); - ULONG nCount = rHighlightRanges.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = rHighlightRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) { ScHighlightEntry* pEntry = rHighlightRanges.GetObject( i ); if (pEntry) @@ -280,7 +280,7 @@ void lcl_DrawHighlight( ScOutputData& rOutputData, ScViewData* pViewData, rOutputData.DrawRefMark( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), - pEntry->aColor, FALSE ); + pEntry->aColor, false ); } } } @@ -338,7 +338,7 @@ void ScGridWindow::Paint( const Rectangle& rRect ) } else { - bNeedsRepaint = TRUE; + bNeedsRepaint = sal_True; aRepaintPixel = LogicToPixel(rRect); // nur betroffenen Bereich } return; @@ -347,7 +347,7 @@ void ScGridWindow::Paint( const Rectangle& rRect ) if (bIsInPaint) return; - bIsInPaint = TRUE; + bIsInPaint = sal_True; Rectangle aPixRect = LogicToPixel( rRect ); @@ -392,7 +392,7 @@ void ScGridWindow::Paint( const Rectangle& rRect ) Draw( nX1,nY1,nX2,nY2, SC_UPDATE_MARKS ); // nicht weiterzeichnen - bIsInPaint = FALSE; + bIsInPaint = false; } // @@ -402,8 +402,8 @@ void ScGridWindow::Paint( const Rectangle& rRect ) void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMode eMode ) { ScModule* pScMod = SC_MOD(); - BOOL bTextWysiwyg = pScMod->GetInputOptions().GetTextWysiwyg(); - BOOL bGridFirst = TRUE; //! entscheiden!!! + sal_Bool bTextWysiwyg = pScMod->GetInputOptions().GetTextWysiwyg(); + sal_Bool bGridFirst = true; //! entscheiden!!! if (pViewData->IsMinimized()) return; @@ -446,7 +446,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod Point aScrPos = pViewData->GetScrPos( nX1, nY1, eWhich ); long nMirrorWidth = GetSizePixel().Width(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; if ( bLayoutRTL ) { @@ -463,7 +463,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod SCCOL nCurEndX = nCurX; SCROW nCurEndY = nCurY; pDoc->ExtendMerge( nCurX, nCurY, nCurEndX, nCurEndY, nTab ); - BOOL bCurVis = nCursorHideCount==0 && + sal_Bool bCurVis = nCursorHideCount==0 && ( nCurEndX+1 >= nX1 && nCurX <= nX2+1 && nCurEndY+1 >= nY1 && nCurY <= nY2+1 ); // AutoFill-Anfasser @@ -483,14 +483,14 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod double nPPTY = pViewData->GetPPTY(); const ScViewOptions& rOpts = pViewData->GetOptions(); - BOOL bFormulaMode = rOpts.GetOption( VOPT_FORMULAS ); - BOOL bMarkClipped = rOpts.GetOption( VOPT_CLIPMARKS ); + sal_Bool bFormulaMode = rOpts.GetOption( VOPT_FORMULAS ); + sal_Bool bMarkClipped = rOpts.GetOption( VOPT_CLIPMARKS ); // Datenblock ScTableInfo aTabInfo; pDoc->FillInfo( aTabInfo, nX1, nY1, nX2, nY2, nTab, - nPPTX, nPPTY, FALSE, bFormulaMode, + nPPTX, nPPTY, false, bFormulaMode, &pViewData->GetMarkData() ); //-------------------------------------------------------------------- @@ -504,7 +504,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod aOutputData.SetMirrorWidth( nMirrorWidth ); // needed for RTL std::auto_ptr< VirtualDevice > xFmtVirtDev; - BOOL bLogicText = bTextWysiwyg; // call DrawStrings in logic MapMode? + sal_Bool bLogicText = bTextWysiwyg; // call DrawStrings in logic MapMode? if ( bTextWysiwyg ) { @@ -523,11 +523,11 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod xFmtVirtDev->SetMapMode( MAP_100TH_MM ); aOutputData.SetFmtDevice( xFmtVirtDev.get() ); - bLogicText = TRUE; // use logic MapMode + bLogicText = sal_True; // use logic MapMode } const svtools::ColorConfig& rColorCfg = pScMod->GetColorConfig(); - Color aGridColor( rColorCfg.GetColorValue( svtools::CALCGRID, FALSE ).nColor ); + Color aGridColor( rColorCfg.GetColorValue( svtools::CALCGRID, false ).nColor ); if ( aGridColor.GetColor() == COL_TRANSPARENT ) { // use view options' grid color only if color config has "automatic" color @@ -541,22 +541,22 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod aOutputData.SetShowSpellErrors ( pDoc->GetDocOptions().IsAutoSpell() ); aOutputData.SetMarkClipped ( bMarkClipped ); - aOutputData.SetUseStyleColor( TRUE ); // always set in table view + aOutputData.SetUseStyleColor( true ); // always set in table view aOutputData.SetEditObject( GetEditObject() ); aOutputData.SetViewShell( pViewData->GetViewShell() ); - BOOL bGrid = rOpts.GetOption( VOPT_GRID ) && pViewData->GetShowGrid(); + sal_Bool bGrid = rOpts.GetOption( VOPT_GRID ) && pViewData->GetShowGrid(); - BOOL bPage = rOpts.GetOption( VOPT_PAGEBREAKS ); + sal_Bool bPage = rOpts.GetOption( VOPT_PAGEBREAKS ); if ( eMode == SC_UPDATE_CHANGED ) { aOutputData.FindChanged(); - aOutputData.SetSingleGrid(TRUE); + aOutputData.SetSingleGrid(sal_True); } - BOOL bPageMode = pViewData->IsPagebreakMode(); + sal_Bool bPageMode = pViewData->IsPagebreakMode(); if (bPageMode) // nach FindChanged { // SetPagebreakMode initialisiert auch bPrinted Flags @@ -564,7 +564,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod } EditView* pEditView = NULL; - BOOL bEditMode = pViewData->HasEditView(eWhich); + sal_Bool bEditMode = pViewData->HasEditView(eWhich); if ( bEditMode && pViewData->GetRefTabNo() == nTab ) { SCCOL nEditCol; @@ -576,7 +576,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod if ( nEditEndCol >= nX1 && nEditCol <= nX2 && nEditEndRow >= nY1 && nEditRow <= nY2 ) aOutputData.SetEditCell( nEditCol, nEditRow ); else - bEditMode = FALSE; + bEditMode = false; } // define drawing layer map mode and paint rectangle @@ -691,7 +691,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod DrawRedraw( aOutputData, eMode, SC_LAYER_BACK ); } else - aOutputData.SetSolidBackground(TRUE); + aOutputData.SetSolidBackground(sal_True); pContentDev->SetMapMode(MAP_PIXEL); aOutputData.DrawDocumentBackground(); @@ -710,15 +710,15 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod aOutputData.DrawShadow(); aOutputData.DrawFrame(); if ( !bLogicText ) - aOutputData.DrawStrings(FALSE); // in pixel MapMode + aOutputData.DrawStrings(false); // in pixel MapMode // edit cells and printer-metrics text must be before the buttons // (DataPilot buttons contain labels in UI font) pContentDev->SetMapMode(pViewData->GetLogicMode(eWhich)); if ( bLogicText ) - aOutputData.DrawStrings(TRUE); // in logic MapMode if bTextWysiwyg is set - aOutputData.DrawEdit(TRUE); + aOutputData.DrawStrings(sal_True); // in logic MapMode if bTextWysiwyg is set + aOutputData.DrawEdit(sal_True); pContentDev->SetMapMode(MAP_PIXEL); // Autofilter- und Pivot-Buttons @@ -743,15 +743,15 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod SCTAB nTabCount = pDoc->GetTableCount(); ScHighlightRanges* pHigh = pViewData->GetView()->GetHighlightRanges(); - BOOL bHasScenario = ( nTab+1<nTabCount && pDoc->IsScenario(nTab+1) && !pDoc->IsScenario(nTab) ); - BOOL bHasChange = ( pDoc->GetChangeTrack() != NULL ); + sal_Bool bHasScenario = ( nTab+1<nTabCount && pDoc->IsScenario(nTab+1) && !pDoc->IsScenario(nTab) ); + sal_Bool bHasChange = ( pDoc->GetChangeTrack() != NULL ); if ( bHasChange || bHasScenario || pHigh != NULL ) { //! SetChangedClip() mit DrawMarks() zusammenfassen?? (anderer MapMode!) - BOOL bAny = TRUE; + sal_Bool bAny = sal_True; if (eMode == SC_UPDATE_CHANGED) bAny = aOutputData.SetChangedClip(); if (bAny) @@ -793,7 +793,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod Color aRefColor( rColorCfg.GetColorValue(svtools::CALCREFERENCE).nColor ); aOutputData.DrawRefMark( pViewData->GetRefStartX(), pViewData->GetRefStartY(), pViewData->GetRefEndX(), pViewData->GetRefEndY(), - aRefColor, FALSE ); + aRefColor, false ); } // Range-Finder @@ -805,8 +805,8 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod if ( pRangeFinder && !pRangeFinder->IsHidden() && pRangeFinder->GetDocName() == pDocSh->GetTitle() ) { - USHORT nCount = (USHORT)pRangeFinder->Count(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = (sal_uInt16)pRangeFinder->Count(); + for (sal_uInt16 i=0; i<nCount; i++) { ScRangeFindData* pData = pRangeFinder->GetObject(i); if (pData) @@ -817,7 +817,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod aOutputData.DrawRefMark( aRef.aStart.Col(), aRef.aStart.Row(), aRef.aEnd.Col(), aRef.aEnd.Row(), Color( ScRangeFindList::GetColorName( i ) ), - TRUE ); + sal_True ); } } } @@ -899,7 +899,7 @@ void ScGridWindow::CheckNeedsRepaint() if (bNeedsRepaint) { - bNeedsRepaint = FALSE; + bNeedsRepaint = false; if (aRepaintPixel.IsEmpty()) Invalidate(); else @@ -948,7 +948,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, else { // use EditEngine to draw mixed-script string - pEditEng = new ScEditEngineDefaulter( EditEngine::CreatePool(), TRUE ); + pEditEng = new ScEditEngineDefaulter( EditEngine::CreatePool(), sal_True ); pEditEng->SetRefMapMode( pContentDev->GetMapMode() ); SfxItemSet* pEditDefaults = new SfxItemSet( pEditEng->GetEmptyItemSet() ); rDefPattern.FillEditItemSet( pEditDefaults ); @@ -956,8 +956,8 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, pEditEng->SetDefaults( pEditDefaults ); } - USHORT nCount = sal::static_int_cast<USHORT>( pPageData->GetCount() ); - for (USHORT nPos=0; nPos<nCount; nPos++) + sal_uInt16 nCount = sal::static_int_cast<sal_uInt16>( pPageData->GetCount() ); + for (sal_uInt16 nPos=0; nPos<nCount; nPos++) { ScPrintRangeData& rData = pPageData->GetData(nPos); ScRange aRange = rData.GetPrintRange(); @@ -974,9 +974,9 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, pContentDev->SetFillColor( aManual ); Point aStart = pViewData->GetScrPos( - aRange.aStart.Col(), aRange.aStart.Row(), eWhich, TRUE ); + aRange.aStart.Col(), aRange.aStart.Row(), eWhich, sal_True ); Point aEnd = pViewData->GetScrPos( - aRange.aEnd.Col() + 1, aRange.aEnd.Row() + 1, eWhich, TRUE ); + aRange.aEnd.Col() + 1, aRange.aEnd.Row() + 1, eWhich, sal_True ); aStart.X() -= 2; aStart.Y() -= 2; @@ -1010,7 +1010,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, else pContentDev->SetFillColor( aAutomatic ); Point aBreak = pViewData->GetScrPos( - nBreak, aRange.aStart.Row(), eWhich, TRUE ); + nBreak, aRange.aStart.Row(), eWhich, sal_True ); pContentDev->DrawRect( Rectangle( aBreak.X()-1, aStart.Y(), aBreak.X(), aEnd.Y() ) ); } } @@ -1029,7 +1029,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, else pContentDev->SetFillColor( aAutomatic ); Point aBreak = pViewData->GetScrPos( - aRange.aStart.Col(), nBreak, eWhich, TRUE ); + aRange.aStart.Col(), nBreak, eWhich, sal_True ); pContentDev->DrawRect( Rectangle( aStart.X(), aBreak.Y()-1, aEnd.X(), aBreak.Y() ) ); } } @@ -1049,9 +1049,9 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, if ( nPrEndX >= nX1 && nPrStartX <= nX2 ) { Point aPageStart = pViewData->GetScrPos( - nPrStartX, nPrStartY, eWhich, TRUE ); + nPrStartX, nPrStartY, eWhich, sal_True ); Point aPageEnd = pViewData->GetScrPos( - nPrEndX+1,nPrEndY+1, eWhich, TRUE ); + nPrEndX+1,nPrEndY+1, eWhich, sal_True ); long nPageNo = rData.GetFirstPage(); if ( rData.IsTopDown() ) @@ -1134,9 +1134,9 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2 ScQueryParam* pQueryParam = NULL; RowInfo* pRowInfo = rTabInfo.mpRowInfo; - USHORT nArrCount = rTabInfo.mnArrCount; + sal_uInt16 nArrCount = rTabInfo.mnArrCount; - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); Point aOldPos = aComboButton.GetPosPixel(); // Zustand fuer MouseDown/Up Size aOldSize = aComboButton.GetSizePixel(); // merken @@ -1158,7 +1158,7 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2 if (!pQueryParam) pQueryParam = new ScQueryParam; - BOOL bNewData = TRUE; + sal_Bool bNewData = sal_True; if (pDBData) { SCCOL nStartCol; @@ -1169,7 +1169,7 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2 pDBData->GetArea( nAreaTab, nStartCol, nStartRow, nEndCol, nEndRow ); if ( nCol >= nStartCol && nCol <= nEndCol && nRow >= nStartRow && nRow <= nEndRow ) - bNewData = FALSE; + bNewData = false; } if (bNewData) { @@ -1185,10 +1185,10 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2 // pQueryParam kann nur MAXQUERY Eintraege enthalten - BOOL bSimpleQuery = TRUE; - BOOL bColumnFound = FALSE; + sal_Bool bSimpleQuery = sal_True; + sal_Bool bColumnFound = false; if (!pQueryParam->bInplace) - bSimpleQuery = FALSE; + bSimpleQuery = false; for (nQuery=0; nQuery<MAXQUERY && bSimpleQuery; nQuery++) if (pQueryParam->GetEntry(nQuery).bDoQuery) { @@ -1196,10 +1196,10 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2 // (auch bei ">1" soll der Spaltenkopf blau werden) if (pQueryParam->GetEntry(nQuery).nField == nCol) - bColumnFound = TRUE; + bColumnFound = sal_True; if (nQuery > 0) if (pQueryParam->GetEntry(nQuery).eConnect != SC_AND) - bSimpleQuery = FALSE; + bSimpleQuery = false; } bool bArrowState = bSimpleQuery && bColumnFound; @@ -1254,7 +1254,7 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2 aComboButton.SetPosPixel( aRect.TopLeft() ); aComboButton.SetSizePixel( aRect.GetSize() ); pContentDev->SetClipRegion( aRect ); - aComboButton.Draw( FALSE, FALSE ); + aComboButton.Draw( false, false ); pContentDev->SetClipRegion(); // always called from Draw() without clip region aComboButton.SetPosPixel( aOldPos ); // restore old state aComboButton.SetSizePixel( aOldSize ); // for MouseUp/Down (AutoFilter) @@ -1269,7 +1269,7 @@ Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos ) { ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; ScDDComboBoxButton aButton( this ); // for optimal size @@ -1293,7 +1293,7 @@ Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos ) nNextCol = nCol + pMerge->GetColMerge(); // next cell after the merged area while ( nNextCol <= MAXCOL && pDoc->ColHidden(nNextCol, nTab) ) ++nNextCol; - BOOL bNextCell = ( nNextCol <= MAXCOL ); + sal_Bool bNextCell = ( nNextCol <= MAXCOL ); if ( bNextCell ) nAvailable = ScViewData::ToPixel( pDoc->GetColWidth( nNextCol, nTab ), pViewData->GetPPTX() ); @@ -1302,7 +1302,7 @@ Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos ) if ( nCellSizeY < aBtnSize.Height() ) aBtnSize.Height() = nCellSizeY; - Point aPos = pViewData->GetScrPos( nCol, nRow, eWhich, TRUE ); + Point aPos = pViewData->GetScrPos( nCol, nRow, eWhich, sal_True ); aPos.X() += nCellSizeX * nLayoutSign; // start of next cell if (!bNextCell) aPos.X() -= aBtnSize.Width() * nLayoutSign; // right edge of cell if next cell not available @@ -1315,7 +1315,7 @@ Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos ) return Rectangle( aPos, aBtnSize ); } -BOOL ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab ) +sal_Bool ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab ) { ScDocument* pDoc = pViewData->GetDocument(); ScDBData* pDBData = pDoc->GetDBAtCursor( nCol, nRow, nTab ); @@ -1328,12 +1328,12 @@ BOOL ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab ) OSL_FAIL("Auto-Filter-Button ohne DBData"); } - BOOL bSimpleQuery = TRUE; - BOOL bColumnFound = FALSE; + sal_Bool bSimpleQuery = sal_True; + sal_Bool bColumnFound = false; SCSIZE nQuery; if ( !aQueryParam.bInplace ) - bSimpleQuery = FALSE; + bSimpleQuery = false; // aQueryParam kann nur MAXQUERY Eintraege enthalten @@ -1341,18 +1341,18 @@ BOOL ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab ) if ( aQueryParam.GetEntry(nQuery).bDoQuery ) { if (aQueryParam.GetEntry(nQuery).nField == nCol) - bColumnFound = TRUE; + bColumnFound = sal_True; if (nQuery > 0) if (aQueryParam.GetEntry(nQuery).eConnect != SC_AND) - bSimpleQuery = FALSE; + bSimpleQuery = false; } return ( bSimpleQuery && bColumnFound ); } void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, - BOOL bTestMerge, BOOL bRepeat ) + sal_Bool bTestMerge, sal_Bool bRepeat ) { //! if INVERT_HIGHLIGHT swaps foreground and background (like on Mac), //! use INVERT_HIGHLIGHT only for cells that have no background color set @@ -1365,7 +1365,7 @@ void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; SCCOL nTestX2 = nX2; @@ -1402,30 +1402,30 @@ void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, Point aScrPos = pViewData->GetScrPos( nX1, nY1, eWhich ); long nScrY = aScrPos.Y(); - BOOL bWasHidden = FALSE; + sal_Bool bWasHidden = false; for (SCROW nY=nY1; nY<=nY2; nY++) { - BOOL bFirstRow = ( nY == nPosY ); // first visible row? - BOOL bDoHidden = FALSE; // versteckte nachholen ? - USHORT nHeightTwips = pDoc->GetRowHeight( nY,nTab ); - BOOL bDoRow = ( nHeightTwips != 0 ); + sal_Bool bFirstRow = ( nY == nPosY ); // first visible row? + sal_Bool bDoHidden = false; // versteckte nachholen ? + sal_uInt16 nHeightTwips = pDoc->GetRowHeight( nY,nTab ); + sal_Bool bDoRow = ( nHeightTwips != 0 ); if (bDoRow) { if (bTestMerge) if (bWasHidden) // auf versteckte zusammengefasste testen { - bDoHidden = TRUE; - bDoRow = TRUE; + bDoHidden = true; + bDoRow = true; } - bWasHidden = FALSE; + bWasHidden = false; } else { - bWasHidden = TRUE; + bWasHidden = sal_True; if (bTestMerge) if (nY==nY2) - bDoRow = TRUE; // letzte Zeile aus Block + bDoRow = sal_True; // letzte Zeile aus Block } if ( bDoRow ) @@ -1478,7 +1478,7 @@ void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, } } - if ( rMark.IsCellMarked( nThisX, nThisY, TRUE ) == bRepeat ) + if ( rMark.IsCellMarked( nThisX, nThisY, sal_True ) == bRepeat ) { if ( !pMergeFlag->IsOverlapped() ) { @@ -1503,7 +1503,7 @@ void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, } else // !bTestMerge { - if ( rMark.IsCellMarked( nX, nY, TRUE ) == bRepeat && + if ( rMark.IsCellMarked( nX, nY, sal_True ) == bRepeat && nEndX * nLayoutSign >= nScrX * nLayoutSign && nEndY >= nScrY ) { aInvert.AddRect( Rectangle( nScrX,nScrY,nEndX,nEndY ) ); @@ -1527,13 +1527,13 @@ void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects ) { ScMarkData aMultiMark( pViewData->GetMarkData() ); - aMultiMark.SetMarking( FALSE ); + aMultiMark.SetMarking( false ); aMultiMark.MarkToMulti(); ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; if ( !aMultiMark.IsMultiMarked() ) @@ -1549,8 +1549,8 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects ) PutInOrder( nX1, nX2 ); PutInOrder( nY1, nY2 ); - BOOL bTestMerge = TRUE; - BOOL bRepeat = TRUE; + sal_Bool bTestMerge = sal_True; + sal_Bool bRepeat = sal_True; SCCOL nTestX2 = nX2; SCROW nTestY2 = nY2; @@ -1584,30 +1584,30 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects ) Point aScrPos = pViewData->GetScrPos( nX1, nY1, eWhich ); long nScrY = aScrPos.Y(); - BOOL bWasHidden = FALSE; + sal_Bool bWasHidden = false; for (SCROW nY=nY1; nY<=nY2; nY++) { - BOOL bFirstRow = ( nY == nPosY ); // first visible row? - BOOL bDoHidden = FALSE; // versteckte nachholen ? - USHORT nHeightTwips = pDoc->GetRowHeight( nY,nTab ); - BOOL bDoRow = ( nHeightTwips != 0 ); + sal_Bool bFirstRow = ( nY == nPosY ); // first visible row? + sal_Bool bDoHidden = false; // versteckte nachholen ? + sal_uInt16 nHeightTwips = pDoc->GetRowHeight( nY,nTab ); + sal_Bool bDoRow = ( nHeightTwips != 0 ); if (bDoRow) { if (bTestMerge) if (bWasHidden) // auf versteckte zusammengefasste testen { - bDoHidden = TRUE; - bDoRow = TRUE; + bDoHidden = sal_True; + bDoRow = sal_True; } - bWasHidden = FALSE; + bWasHidden = false; } else { - bWasHidden = TRUE; + bWasHidden = sal_True; if (bTestMerge) if (nY==nY2) - bDoRow = TRUE; // letzte Zeile aus Block + bDoRow = sal_True; // letzte Zeile aus Block } if ( bDoRow ) @@ -1660,7 +1660,7 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects ) } } - if ( aMultiMark.IsCellMarked( nThisX, nThisY, TRUE ) == bRepeat ) + if ( aMultiMark.IsCellMarked( nThisX, nThisY, sal_True ) == bRepeat ) { if ( !pMergeFlag->IsOverlapped() ) { @@ -1685,7 +1685,7 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects ) } else // !bTestMerge { - if ( aMultiMark.IsCellMarked( nX, nY, TRUE ) == bRepeat && + if ( aMultiMark.IsCellMarked( nX, nY, sal_True ) == bRepeat && nEndX * nLayoutSign >= nScrX * nLayoutSign && nEndY >= nScrY ) { aInvert.AddRect( Rectangle( nScrX,nScrY,nEndX,nEndY ) ); |