kbrown / rpms / libreoffice

Forked from rpms/libreoffice 2 years ago
Clone

Blame SOURCES/0021-don-t-use-fixed-size-icon-sets-fdo-62652.patch

f0633d
From a9d6a9c78cccaa5068a21b9b0e526ab60bbcfabf Mon Sep 17 00:00:00 2001
f0633d
From: Markus Mohrhard <markus.mohrhard@googlemail.com>
f0633d
Date: Mon, 2 Dec 2013 08:06:44 +0100
f0633d
Subject: [PATCH 021/109] don't use fixed size icon sets, fdo#62652
f0633d
MIME-Version: 1.0
f0633d
Content-Type: text/plain; charset=UTF-8
f0633d
Content-Transfer-Encoding: 8bit
f0633d
f0633d
actually we should switch to svg as soon as it becomes possible
f0633d
f0633d
Change-Id: Ifbbe5befab94441f04fadb90b779e0bc8c15eda4
f0633d
Reviewed-on: https://gerrit.libreoffice.org/6890
f0633d
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
f0633d
Tested-by: Caolán McNamara <caolanm@redhat.com>
f0633d
---
f0633d
 sc/source/ui/view/output.cxx | 5 +++--
f0633d
 1 file changed, 3 insertions(+), 2 deletions(-)
f0633d
f0633d
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
f0633d
index 5826efd..9bbfee8 100644
f0633d
--- a/sc/source/ui/view/output.cxx
f0633d
+++ b/sc/source/ui/view/output.cxx
f0633d
@@ -882,11 +882,12 @@ BitmapEx& getIcon( ScIconSetType eType, sal_Int32 nIndex )
f0633d
 
f0633d
 void drawIconSets( const ScIconSetInfo* pOldIconSetInfo, OutputDevice* pDev, const Rectangle& rRect )
f0633d
 {
f0633d
-    long nSize = 16;
f0633d
+    //long nSize = 16;
f0633d
     ScIconSetType eType = pOldIconSetInfo->eIconSetType;
f0633d
     sal_Int32 nIndex = pOldIconSetInfo->nIconIndex;
f0633d
     BitmapEx& rIcon = getIcon( eType, nIndex );
f0633d
-    pDev->DrawBitmapEx( Point( rRect.Left() +2, rRect.Top() + 2 ), Size( nSize, nSize ), rIcon );
f0633d
+    long aOrigSize = std::max<long>(0,std::min(rRect.GetSize().getWidth() - 4, rRect.GetSize().getHeight() -4));
f0633d
+    pDev->DrawBitmapEx( Point( rRect.Left() +2, rRect.Top() + 2 ), Size(aOrigSize, aOrigSize), rIcon );
f0633d
 }
f0633d
 
f0633d
 void drawCells(const Color* pColor, const SvxBrushItem* pBackground, const Color*& pOldColor, const SvxBrushItem*& pOldBackground,
f0633d
-- 
f0633d
1.8.4.2
f0633d