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

Bernhard Widl bernhard.widl at cib.de
Fri Oct 13 14:24:13 UTC 2017


 sc/source/ui/view/tabview.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 21ccc64782f485f4fce7cd645f24dabb4b6eb985
Author: Bernhard Widl <bernhard.widl at cib.de>
Date:   Wed Oct 11 18:32:26 2017 +0200

    derive size of tab bar in Calc from TabFont (in pixels).
    
    Change-Id: I3a35850cb6a66b06ae6568b54c008669ee2f391a
    Reviewed-on: https://gerrit.libreoffice.org/43328
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 0f227b18ef5f..53a40774869d 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -355,7 +355,11 @@ void ScTabView::DoResize( const Point& rOffset, const Size& rSize, bool bInner )
 
     const StyleSettings& rStyleSettings = pFrameWin->GetSettings().GetStyleSettings();
 
-    sal_Int32 nTabWidth = pFrameWin->GetFont().GetFontHeight() + WIDTH_MARGIN;
+
+    Size aFontSize = rStyleSettings.GetTabFont().GetFontSize();
+    MapMode aPtMapMode(MapUnit::MapPoint);
+    aFontSize = pFrameWin->LogicToPixel(aFontSize, aPtMapMode);
+    sal_Int32 nTabWidth = aFontSize.Height() + WIDTH_MARGIN;
 
     if ( aViewData.GetHSplitMode() != SC_SPLIT_NONE )
     {


More information about the Libreoffice-commits mailing list