[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - sw/source

Miklos Vajna vmiklos at collabora.co.uk
Mon Mar 2 02:53:01 PST 2015


 sw/source/core/crsr/viscrs.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 59760d4a3cf0e9afaf4d6504fc07399283b239b4
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Mar 2 11:50:06 2015 +0100

    SwShellTableCrsr::FillStartEnd: make sure that the rectangle's width is not 0
    
    The shell (i.e. non-table) cursor does this already and this also fixes
    the SwRect::SVRect() assertions firing during the drag of a table
    selection handle.
    
    Change-Id: Ia63844f5e2f6e107d47b7ed39af2a72bd433003e

diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 1422f3d..c0b4a33 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -356,12 +356,12 @@ void SwSelPaintRects::Show()
                 SwRect aEndRect;
                 FillStartEnd(aStartRect, aEndRect);
 
-                if (aStartRect.Height())
+                if (aStartRect.HasArea())
                 {
                     OString sRect = aStartRect.SVRect().toString();
                     GetShell()->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION_START, sRect.getStr());
                 }
-                if (aEndRect.Height())
+                if (aEndRect.HasArea())
                 {
                     OString sRect = aEndRect.SVRect().toString();
                     GetShell()->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION_END, sRect.getStr());
@@ -759,7 +759,7 @@ void SwShellTableCrsr::FillRects()
                 if (bStart)
                 {
                     bStart = false;
-                    m_aStart = SwRect(pFrm->Frm().Left(), pFrm->Frm().Top(), 0, pFrm->Frm().Height());
+                    m_aStart = SwRect(pFrm->Frm().Left(), pFrm->Frm().Top(), 1, pFrm->Frm().Height());
                 }
             }
 
@@ -768,7 +768,7 @@ void SwShellTableCrsr::FillRects()
         }
     }
     if (pEndFrm)
-        m_aEnd = SwRect(pEndFrm->Frm().Right(), pEndFrm->Frm().Top(), 0, pEndFrm->Frm().Height());
+        m_aEnd = SwRect(pEndFrm->Frm().Right(), pEndFrm->Frm().Top(), 1, pEndFrm->Frm().Height());
     aReg.Invert();
     insert( begin(), aReg.begin(), aReg.end() );
 }


More information about the Libreoffice-commits mailing list