diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-10-19 14:13:54 +0100 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2016-10-20 09:43:17 +0000 |
commit | 0c6ef4325f6612f4e39448fd12dd6d3f4b0682fa (patch) | |
tree | d04abf039be4a82891e0e40d0194361046f1f396 | |
parent | e3789123da397c82109a5fcead3d49f803ba6aad (diff) |
Resolves: tdf#100841 use Popover instead of Tooltip for the fill series hint
Change-Id: Id84265d7c76869059144e28c1d9a735efa46fe29
(cherry picked from commit ef044f82452af7b4c844d5ed1ca05869aafe21c5)
Reviewed-on: https://gerrit.libreoffice.org/30058
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
-rw-r--r-- | sc/source/ui/view/tabview4.cxx | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx index e016af84f657..fbb40fa31e5a 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); + } } } } |