Kaydet (Commit) e27eec96 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

sal_Bool->bool in ScGridWindow. One of them wasn't even used.

üst 0847d1cb
...@@ -147,65 +147,63 @@ private: ...@@ -147,65 +147,63 @@ private:
::std::auto_ptr<ScCheckListMenuWindow> mpDPFieldPopup; ::std::auto_ptr<ScCheckListMenuWindow> mpDPFieldPopup;
::std::auto_ptr<ScDPFieldButton> mpFilterButton; ::std::auto_ptr<ScDPFieldButton> mpFilterButton;
sal_uInt16 nCursorHideCount; sal_uInt16 nCursorHideCount;
sal_Bool bMarking; sal_uInt16 nButtonDown;
sal_uInt8 nMouseStatus;
sal_uInt8 nNestedButtonState; // track nested button up/down calls
sal_uInt16 nButtonDown;
sal_Bool bEEMouse; // Edit-Engine hat Maus
sal_uInt8 nMouseStatus;
sal_uInt8 nNestedButtonState; // track nested button up/down calls
sal_Bool bDPMouse; // DataPilot-D&D (neue Pivottabellen)
long nDPField; long nDPField;
ScDPObject* pDragDPObj; //! name? ScDPObject* pDragDPObj; //! name?
sal_Bool bRFMouse; // RangeFinder-Drag sal_uInt16 nRFIndex;
sal_Bool bRFSize;
sal_uInt16 nRFIndex;
SCsCOL nRFAddX; SCsCOL nRFAddX;
SCsROW nRFAddY; SCsROW nRFAddY;
sal_uInt16 nPagebreakMouse; // Pagebreak-Modus Drag sal_uInt16 nPagebreakMouse; // Pagebreak-Modus Drag
SCCOLROW nPagebreakBreak; SCCOLROW nPagebreakBreak;
SCCOLROW nPagebreakPrev; SCCOLROW nPagebreakPrev;
ScRange aPagebreakSource; ScRange aPagebreakSource;
ScRange aPagebreakDrag; ScRange aPagebreakDrag;
sal_Bool bPagebreakDrawn;
sal_uInt8 nPageScript; sal_uInt8 nPageScript;
long nLastClickX; long nLastClickX;
long nLastClickY; long nLastClickY;
sal_Bool bDragRect;
SCCOL nDragStartX; SCCOL nDragStartX;
SCROW nDragStartY; SCROW nDragStartY;
SCCOL nDragEndX; SCCOL nDragEndX;
SCROW nDragEndY; SCROW nDragEndY;
InsCellCmd meDragInsertMode; InsCellCmd meDragInsertMode;
sal_uInt16 nCurrentPointer; sal_uInt16 nCurrentPointer;
sal_Bool bIsInScroll;
sal_Bool bIsInPaint;
ScDDComboBoxButton aComboButton; ScDDComboBoxButton aComboButton;
Point aCurMousePos; Point aCurMousePos;
sal_uInt16 nPaintCount; sal_uInt16 nPaintCount;
Rectangle aRepaintPixel; Rectangle aRepaintPixel;
sal_Bool bNeedsRepaint;
sal_Bool bAutoMarkVisible;
ScAddress aAutoMarkPos; ScAddress aAutoMarkPos;
sal_Bool bListValButton;
ScAddress aListValPos; ScAddress aListValPos;
Rectangle aInvertRect; Rectangle aInvertRect;
bool bEEMouse:1; // Edit-Engine hat Maus
bool bDPMouse:1; // DataPilot-D&D (neue Pivottabellen)
bool bRFMouse:1; // RangeFinder-Drag
bool bRFSize:1;
bool bPagebreakDrawn:1;
bool bDragRect:1;
bool bIsInScroll:1;
bool bIsInPaint:1;
bool bNeedsRepaint:1;
bool bAutoMarkVisible:1;
bool bListValButton:1;
DECL_LINK( PopupModeEndHdl, FloatingWindow* ); DECL_LINK( PopupModeEndHdl, FloatingWindow* );
DECL_LINK( PopupSpellingHdl, SpellCallbackInfo* ); DECL_LINK( PopupSpellingHdl, SpellCallbackInfo* );
...@@ -278,8 +276,8 @@ private: ...@@ -278,8 +276,8 @@ private:
sal_Bool GetEditUrlOrError( sal_Bool bSpellErr, const Point& rPos, sal_Bool GetEditUrlOrError( sal_Bool bSpellErr, const Point& rPos,
String* pName=0, String* pUrl=0, String* pTarget=0 ); String* pName=0, String* pUrl=0, String* pTarget=0 );
sal_Bool HitRangeFinder( const Point& rMouse, sal_Bool& rCorner, sal_uInt16* pIndex = NULL, bool HitRangeFinder( const Point& rMouse, bool& rCorner, sal_uInt16* pIndex = NULL,
SCsCOL* pAddX = NULL, SCsROW* pAddY = NULL ); SCsCOL* pAddX = NULL, SCsROW* pAddY = NULL );
sal_uInt16 HitPageBreak( const Point& rMouse, ScRange* pSource = NULL, sal_uInt16 HitPageBreak( const Point& rMouse, ScRange* pSource = NULL,
SCCOLROW* pBreak = NULL, SCCOLROW* pPrev = NULL ); SCCOLROW* pBreak = NULL, SCCOLROW* pPrev = NULL );
...@@ -362,7 +360,7 @@ public: ...@@ -362,7 +360,7 @@ public:
void HideCursor(); void HideCursor();
void ShowCursor(); void ShowCursor();
void UpdateAutoFillMark(sal_Bool bMarked, const ScRange& rMarkRange); void UpdateAutoFillMark(bool bMarked, const ScRange& rMarkRange);
void UpdateListValPos( sal_Bool bVisible, const ScAddress& rPos ); void UpdateListValPos( sal_Bool bVisible, const ScAddress& rPos );
...@@ -376,7 +374,7 @@ public: ...@@ -376,7 +374,7 @@ public:
void StopMarking(); void StopMarking();
void UpdateInputContext(); void UpdateInputContext();
void CheckInverted() { if (nPaintCount) bNeedsRepaint = sal_True; } void CheckInverted() { if (nPaintCount) bNeedsRepaint = true; }
void DoInvertRect( const Rectangle& rPixel ); void DoInvertRect( const Rectangle& rPixel );
......
...@@ -429,28 +429,28 @@ ScGridWindow::ScGridWindow( Window* pParent, ScViewData* pData, ScSplitPos eWhic ...@@ -429,28 +429,28 @@ ScGridWindow::ScGridWindow( Window* pParent, ScViewData* pData, ScSplitPos eWhic
mpDPFieldPopup(NULL), mpDPFieldPopup(NULL),
mpFilterButton(NULL), mpFilterButton(NULL),
nCursorHideCount( 0 ), nCursorHideCount( 0 ),
bMarking( false ),
nButtonDown( 0 ), nButtonDown( 0 ),
bEEMouse( false ),
nMouseStatus( SC_GM_NONE ), nMouseStatus( SC_GM_NONE ),
nNestedButtonState( SC_NESTEDBUTTON_NONE ), nNestedButtonState( SC_NESTEDBUTTON_NONE ),
bDPMouse( false ),
bRFMouse( false ),
nPagebreakMouse( SC_PD_NONE ), nPagebreakMouse( SC_PD_NONE ),
bPagebreakDrawn( false ),
nPageScript( 0 ), nPageScript( 0 ),
bDragRect( false ),
nDragStartX( -1 ), nDragStartX( -1 ),
nDragStartY( -1 ), nDragStartY( -1 ),
nDragEndX( -1 ), nDragEndX( -1 ),
nDragEndY( -1 ), nDragEndY( -1 ),
meDragInsertMode( INS_NONE ), meDragInsertMode( INS_NONE ),
nCurrentPointer( 0 ), nCurrentPointer( 0 ),
bIsInScroll( false ),
bIsInPaint( false ),
aComboButton( this ), aComboButton( this ),
aCurMousePos( 0,0 ), aCurMousePos( 0,0 ),
nPaintCount( 0 ), nPaintCount( 0 ),
bEEMouse( false ),
bDPMouse( false ),
bRFMouse( false ),
bRFSize( false ),
bPagebreakDrawn( false ),
bDragRect( false ),
bIsInScroll( false ),
bIsInPaint( false ),
bNeedsRepaint( false ), bNeedsRepaint( false ),
bAutoMarkVisible( false ), bAutoMarkVisible( false ),
bListValButton( false ) bListValButton( false )
...@@ -1589,7 +1589,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt ) ...@@ -1589,7 +1589,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
GrabFocus(); GrabFocus();
pScMod->SetInputMode( SC_INPUT_TABLE ); pScMod->SetInputMode( SC_INPUT_TABLE );
bEEMouse = sal_True; bEEMouse = true;
bEditMode = pEditView->MouseButtonDown( rMEvt ); bEditMode = pEditView->MouseButtonDown( rMEvt );
return; return;
} }
...@@ -1608,9 +1608,12 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt ) ...@@ -1608,9 +1608,12 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
// Reihenfolge passend zum angezeigten Cursor: // Reihenfolge passend zum angezeigten Cursor:
// RangeFinder, AutoFill, PageBreak, Drawing // RangeFinder, AutoFill, PageBreak, Drawing
if ( HitRangeFinder( rMEvt.GetPosPixel(), bRFSize, &nRFIndex, &nRFAddX, &nRFAddY ) ) bool bCorner;
bool bFound = HitRangeFinder(rMEvt.GetPosPixel(), bCorner, &nRFIndex, &nRFAddX, &nRFAddY);
bRFSize = bCorner;
if (bFound)
{ {
bRFMouse = sal_True; // die anderen Variablen sind oben initialisiert bRFMouse = true; // die anderen Variablen sind oben initialisiert
if ( pViewData->GetActivePart() != eWhich ) if ( pViewData->GetActivePart() != eWhich )
pViewData->GetView()->ActivatePart( eWhich ); //! schon oben immer ??? pViewData->GetView()->ActivatePart( eWhich ); //! schon oben immer ???
...@@ -2344,7 +2347,7 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt ) ...@@ -2344,7 +2347,7 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
// Range-Finder // Range-Finder
sal_Bool bCorner; bool bCorner;
if ( HitRangeFinder( rMEvt.GetPosPixel(), bCorner ) ) if ( HitRangeFinder( rMEvt.GetPosPixel(), bCorner ) )
{ {
if (bCorner) if (bCorner)
...@@ -2514,7 +2517,7 @@ void ScGridWindow::Tracking( const TrackingEvent& rTEvt ) ...@@ -2514,7 +2517,7 @@ void ScGridWindow::Tracking( const TrackingEvent& rTEvt )
} }
if (bRFMouse) if (bRFMouse)
{ {
RFMouseMove( rMEvt, sal_True ); // richtig abbrechen geht dabei nicht... RFMouseMove( rMEvt, true ); // richtig abbrechen geht dabei nicht...
bRFMouse = false; bRFMouse = false;
} }
if (nPagebreakMouse) if (nPagebreakMouse)
...@@ -3451,7 +3454,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt ) ...@@ -3451,7 +3454,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
nDragStartY = nNewDragY; nDragStartY = nNewDragY;
nDragEndX = nDragStartX+nSizeX-1; nDragEndX = nDragStartX+nSizeX-1;
nDragEndY = nDragStartY+nSizeY-1; nDragEndY = nDragStartY+nSizeY-1;
bDragRect = sal_True; bDragRect = true;
meDragInsertMode = eDragInsertMode; meDragInsertMode = eDragInsertMode;
UpdateDragRectOverlay(); UpdateDragRectOverlay();
...@@ -4352,7 +4355,7 @@ void ScGridWindow::UpdateFormulas() ...@@ -4352,7 +4355,7 @@ void ScGridWindow::UpdateFormulas()
// nicht anfangen, verschachtelt zu painten // nicht anfangen, verschachtelt zu painten
// (dann wuerde zumindest der MapMode nicht mehr stimmen) // (dann wuerde zumindest der MapMode nicht mehr stimmen)
bNeedsRepaint = sal_True; // -> am Ende vom Paint nochmal Invalidate auf alles bNeedsRepaint = true; // -> am Ende vom Paint nochmal Invalidate auf alles
aRepaintPixel = Rectangle(); // alles aRepaintPixel = Rectangle(); // alles
return; return;
} }
...@@ -4414,7 +4417,7 @@ void ScGridWindow::UpdateFormulas() ...@@ -4414,7 +4417,7 @@ void ScGridWindow::UpdateFormulas()
CheckNeedsRepaint(); // #i90362# used to be called via Draw() - still needed here CheckNeedsRepaint(); // #i90362# used to be called via Draw() - still needed here
} }
void ScGridWindow::UpdateAutoFillMark(sal_Bool bMarked, const ScRange& rMarkRange) void ScGridWindow::UpdateAutoFillMark(bool bMarked, const ScRange& rMarkRange)
{ {
if ( bMarked != bAutoMarkVisible || ( bMarked && rMarkRange.aEnd != aAutoMarkPos ) ) if ( bMarked != bAutoMarkVisible || ( bMarked && rMarkRange.aEnd != aAutoMarkPos ) )
{ {
...@@ -4430,7 +4433,7 @@ void ScGridWindow::UpdateAutoFillMark(sal_Bool bMarked, const ScRange& rMarkRang ...@@ -4430,7 +4433,7 @@ void ScGridWindow::UpdateAutoFillMark(sal_Bool bMarked, const ScRange& rMarkRang
void ScGridWindow::UpdateListValPos( sal_Bool bVisible, const ScAddress& rPos ) void ScGridWindow::UpdateListValPos( sal_Bool bVisible, const ScAddress& rPos )
{ {
sal_Bool bOldButton = bListValButton; bool bOldButton = bListValButton;
ScAddress aOldPos = aListValPos; ScAddress aOldPos = aListValPos;
bListValButton = bVisible; bListValButton = bVisible;
...@@ -4502,10 +4505,10 @@ Point ScGridWindow::GetMousePosPixel() const { return aCurMousePos; } ...@@ -4502,10 +4505,10 @@ Point ScGridWindow::GetMousePosPixel() const { return aCurMousePos; }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
sal_Bool ScGridWindow::HitRangeFinder( const Point& rMouse, sal_Bool& rCorner, bool ScGridWindow::HitRangeFinder( const Point& rMouse, bool& rCorner,
sal_uInt16* pIndex, SCsCOL* pAddX, SCsROW* pAddY ) sal_uInt16* pIndex, SCsCOL* pAddX, SCsROW* pAddY )
{ {
sal_Bool bFound = false; bool bFound = false;
ScInputHandler* pHdl = SC_MOD()->GetInputHdl( pViewData->GetViewShell() ); ScInputHandler* pHdl = SC_MOD()->GetInputHdl( pViewData->GetViewShell() );
if (pHdl) if (pHdl)
{ {
...@@ -4531,13 +4534,13 @@ sal_Bool ScGridWindow::HitRangeFinder( const Point& rMouse, sal_Bool& rCorner, ...@@ -4531,13 +4534,13 @@ sal_Bool ScGridWindow::HitRangeFinder( const Point& rMouse, sal_Bool& rCorner,
aNext.X() += nSizeXPix * nLayoutSign; aNext.X() += nSizeXPix * nLayoutSign;
aNext.Y() += nSizeYPix; aNext.Y() += nSizeYPix;
sal_Bool bCornerHor; bool bCornerHor;
if ( bLayoutRTL ) if ( bLayoutRTL )
bCornerHor = ( rMouse.X() >= aNext.X() && rMouse.X() <= aNext.X() + 8 ); bCornerHor = ( rMouse.X() >= aNext.X() && rMouse.X() <= aNext.X() + 8 );
else else
bCornerHor = ( rMouse.X() >= aNext.X() - 8 && rMouse.X() <= aNext.X() ); bCornerHor = ( rMouse.X() >= aNext.X() - 8 && rMouse.X() <= aNext.X() );
sal_Bool bCellCorner = ( bCornerHor && bool bCellCorner = ( bCornerHor &&
rMouse.Y() >= aNext.Y() - 8 && rMouse.Y() <= aNext.Y() ); rMouse.Y() >= aNext.Y() - 8 && rMouse.Y() <= aNext.Y() );
// corner is hit only if the mouse is within the cell // corner is hit only if the mouse is within the cell
......
...@@ -186,7 +186,7 @@ void ScGridWindow::DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt ...@@ -186,7 +186,7 @@ void ScGridWindow::DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt
long nField = pDPObj->GetHeaderDim( aPos, nOrient ); long nField = pDPObj->GetHeaderDim( aPos, nOrient );
if ( nField >= 0 ) if ( nField >= 0 )
{ {
bDPMouse = sal_True; bDPMouse = true;
nDPField = nField; nDPField = nField;
pDragDPObj = pDPObj; pDragDPObj = pDPObj;
......
...@@ -334,7 +334,7 @@ void ScGridWindow::Paint( const Rectangle& rRect ) ...@@ -334,7 +334,7 @@ void ScGridWindow::Paint( const Rectangle& rRect )
} }
else else
{ {
bNeedsRepaint = sal_True; bNeedsRepaint = true;
aRepaintPixel = LogicToPixel(rRect); // nur betroffenen Bereich aRepaintPixel = LogicToPixel(rRect); // nur betroffenen Bereich
} }
return; return;
...@@ -343,7 +343,7 @@ void ScGridWindow::Paint( const Rectangle& rRect ) ...@@ -343,7 +343,7 @@ void ScGridWindow::Paint( const Rectangle& rRect )
if (bIsInPaint) if (bIsInPaint)
return; return;
bIsInPaint = sal_True; bIsInPaint = true;
Rectangle aPixRect = LogicToPixel( rRect ); Rectangle aPixRect = LogicToPixel( rRect );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment