Kaydet (Commit) 92204f06 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#708643 nOffsetY missing from copy ctor

its normally always 0, so shrink the code based
on that

Change-Id: Ic9a4615f0ecb0713a00e4acd73485f99fd50a859
üst 11abf53b
......@@ -39,7 +39,6 @@ private:
ImplCursorData* mpData;
Window* mpWindow; // only for shadow cursor
long mnSlant;
long mnOffsetY; // Offset for rotation
Size maSize;
Point maPos;
short mnOrientation;
......@@ -74,7 +73,6 @@ public:
void SetPos( const Point& rNewPos );
const Point& GetPos() const { return maPos; }
long GetOffsetY() const { return mnOffsetY; }
void SetSize( const Size& rNewSize );
const Size& GetSize() const { return maSize; }
......
......@@ -450,7 +450,7 @@ void AnnotationWindow::SetSizePixel( const Size& rNewSize )
void AnnotationWindow::SetScrollbar()
{
mpVScrollbar->SetThumbPos( mpOutlinerView->GetVisArea().Top()+ mpOutlinerView->GetEditView().GetCursor()->GetOffsetY());
mpVScrollbar->SetThumbPos(mpOutlinerView->GetVisArea().Top());
}
void AnnotationWindow::ResizeIfNecessary(long aOldHeight, long aNewHeight)
......
......@@ -757,7 +757,7 @@ void SwSidebarWin::SetSizePixel( const Size& rNewSize )
void SwSidebarWin::SetScrollbar()
{
mpVScrollbar->SetThumbPos( mpOutlinerView->GetVisArea().Top()+ mpOutlinerView->GetEditView().GetCursor()->GetOffsetY());
mpVScrollbar->SetThumbPos(mpOutlinerView->GetVisArea().Top());
}
void SwSidebarWin::ResizeIfNecessary(long aOldHeight, long aNewHeight)
......
......@@ -133,12 +133,9 @@ void Cursor::ImplDraw()
mpData->mnPixSlant = pWindow->LogicToPixel( Size( mnSlant, 0 ) ).Width();
mpData->mnOrientation = mnOrientation;
mpData->mnDirection = mnDirection;
long nOffsetY = pWindow->LogicToPixel( Size( 0, mnOffsetY ) ).Height();
// correct the position with the offset
mpData->maPixPos.Y() -= nOffsetY;
mpData->maPixRotOff = mpData->maPixPos;
mpData->maPixRotOff.Y() += nOffsetY;
// use width (as set in Settings) if size is 0,
if ( !mpData->maPixSize.Width() )
......@@ -278,7 +275,6 @@ Cursor::Cursor()
mpData = NULL;
mpWindow = NULL;
mnSlant = 0;
mnOffsetY = 0;
mnOrientation = 0;
mnDirection = 0;
mnStyle = 0;
......
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