https://bugs.documentfoundation.org/show_bug.cgi?id=92145

--- Comment #12 from László Németh <[email protected]> ---
The reason of the bug  is the following change:

commit 9905a8b953953b9ec5e123a17997d5931978acfe
Author: Tomaž Vajngerl <[email protected]>
Date:   Tue Apr 28 12:53:27 2015 +0900

    replace Paint calls to Invalidate + fix compilation

    Change-Id: Id716c47d56922ab6ce0c3adb3d426ea814980674

...
@@ -2364,7 +2364,7 @@ bool Ruler::StartDocDrag( const MouseEvent& rMEvt,
RulerType eDragType )
         // update ruler
         if ( mbFormat )
         {
-            Paint(Rectangle());
+            Invalidate();
             mnUpdateFlags &= ~RULER_UPDATE_DRAW;
         }
...


Paint() sets the mpData values by calling ImplFormat() and ImplCalc(), and
these data are used by StartDocDrag() to check the place of the click.

When the rulers are switched off, now Paint()/ImplFormat()/ImplCalc() aren't
called, and mpData will contain only initial empty data, first resulting
bad false return value (RULER_TYPE_OUTSIDE case) in ImplHitTest(): 

bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest,
                         bool bRequireStyle, sal_uInt16 nRequiredStyle ) const

...
    if ((nX < mpData->nRulVirOff - nXExtraOff) ||
         (nX > mpData->nRulVirOff + mpData->nRulWidth + nXExtraOff) ||
         (nY < 0) ||
         (nY > nHitBottom) )
    {
        pHitTest->nPos = 0;
        pHitTest->eType = RULER_TYPE_OUTSIDE;
        return false;
    }
...

because mpData->nRulVirOff is zero.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to