[Libreoffice-commits] core.git: sc/source

Caolán McNamara caolanm at redhat.com
Wed Oct 19 13:14:38 UTC 2016


 sc/source/ui/view/tabview4.cxx |   24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

New commits:
commit ef044f82452af7b4c844d5ed1ca05869aafe21c5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 19 14:13:54 2016 +0100

    Resolves: tdf#100841 use Popover instead of Tooltip for the fill series hint
    
    Change-Id: Id84265d7c76869059144e28c1d9a735efa46fe29

diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx
index e016af8..fbb40fa 100644
--- a/sc/source/ui/view/tabview4.cxx
+++ b/sc/source/ui/view/tabview4.cxx
@@ -267,16 +267,20 @@ void ScTabView::UpdateRef( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ )
             else if ( nEndX != aMarkRange.aEnd.Col() || nEndY != aMarkRange.aEnd.Row() )
                 aHelpStr = pDoc->GetAutoFillPreview( aMarkRange, nEndX, nEndY );
 
-            //  je nach Richtung die obere oder untere Ecke:
-            SCCOL nAddX = ( nEndX >= aMarkRange.aEnd.Col() ) ? 1 : 0;
-            SCROW nAddY = ( nEndY >= aMarkRange.aEnd.Row() ) ? 1 : 0;
-            Point aPos = aViewData.GetScrPos( nEndX+nAddX, nEndY+nAddY, aViewData.GetActivePart() );
-            aPos.X() += 8;
-            aPos.Y() += 4;
-            aPos = pWin->OutputToScreenPixel( aPos );
-            Rectangle aRect( aPos, aPos );
-            QuickHelpFlags nAlign = QuickHelpFlags::Left|QuickHelpFlags::Top;
-            Help::ShowQuickHelp(pWin, aRect, aHelpStr, nAlign);
+            if (aHelpStr.getLength())
+            {
+                //  je nach Richtung die obere oder untere Ecke:
+                SCCOL nAddX = ( nEndX >= aMarkRange.aEnd.Col() ) ? 1 : 0;
+                SCROW nAddY = ( nEndY >= aMarkRange.aEnd.Row() ) ? 1 : 0;
+                Point aPos = aViewData.GetScrPos( nEndX+nAddX, nEndY+nAddY, aViewData.GetActivePart() );
+                aPos.X() += 8;
+                aPos.Y() += 4;
+                aPos = pWin->OutputToScreenPixel( aPos );
+                Rectangle aRect( aPos, aPos );
+                QuickHelpFlags nAlign = QuickHelpFlags::Left|QuickHelpFlags::Top;
+                HideTip();
+                nTipVisible = Help::ShowPopover(pWin, aRect, aHelpStr, nAlign);
+            }
         }
     }
 }


More information about the Libreoffice-commits mailing list