summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-12-21 12:35:16 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-12-21 12:39:47 +0000
commit63fe7f65d2a606da6b34d7809c159985da0bfc65 (patch)
tree88dd5e4e5b14e8293dbaea44bee71ee1fe0a51d6 /cui
parent528ddb973299d6e626b65cb3d247e25d0f1c4a67 (diff)
unroll IL_LOCK_BMPS ImageList
Change-Id: I5a9c80d5c23bfa22fd6e237b7a2524c29992c9b9
Diffstat (limited to 'cui')
-rw-r--r--cui/source/inc/cuires.hrc3
-rw-r--r--cui/source/tabpages/align.cxx28
-rw-r--r--cui/source/tabpages/align.hrc32
-rw-r--r--cui/source/tabpages/align.src25
4 files changed, 29 insertions, 59 deletions
diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc
index 33f5ea39e1a1..4f2ea367a48d 100644
--- a/cui/source/inc/cuires.hrc
+++ b/cui/source/inc/cuires.hrc
@@ -176,6 +176,9 @@
#define RID_SVXBMP_HLMAILTP (RID_SVX_START + 557)
#define RID_SVXBMP_HLDOCTP (RID_SVX_START + 558)
#define RID_SVXBMP_HLDOCNTP (RID_SVX_START + 559)
+#define RID_SVXBMP_BOTTOMLOCK (RID_SVX_START + 560)
+#define RID_SVXBMP_TOPLOCK (RID_SVX_START + 561)
+#define RID_SVXBMP_CELLLOCK (RID_SVX_START + 562)
#define RID_SVXPAGE_HYPERLINK_INTERNET (RID_SVX_START + 228)
#define RID_SVXPAGE_HYPERLINK_MAIL (RID_SVX_START + 229)
#define RID_SVXPAGE_HYPERLINK_DOCUMENT (RID_SVX_START + 230)
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index aa6ea21dd25c..b65732979c28 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -22,7 +22,6 @@
#include <editeng/svxenum.hxx>
#include <svx/dialogs.hrc>
#include <cuires.hrc>
-#include "align.hrc"
#include <svx/rotmodit.hxx>
#include <svx/algitem.hxx>
@@ -40,6 +39,10 @@
#include <sfx2/request.hxx>
#include <vcl/settings.hxx>
+#define IID_BOTTOMLOCK 1
+#define IID_TOPLOCK 2
+#define IID_CELLLOCK 3
+
namespace svx {
// item connections ===========================================================
@@ -337,29 +340,26 @@ void AlignmentTabPage::InitVsRefEgde()
// remember selection - is deleted in call to ValueSet::Clear()
sal_uInt16 nSel = m_pVsRefEdge->GetSelectItemId();
- ResId aResId( IL_LOCK_BMPS, CUI_MGR() );
- ImageList aImageList( aResId );
+ BitmapEx aBottomLock(ResId(RID_SVXBMP_BOTTOMLOCK, CUI_MGR()));
+ BitmapEx aTopLock(ResId(RID_SVXBMP_TOPLOCK, CUI_MGR()));
+ BitmapEx aCellLock(ResId(RID_SVXBMP_CELLLOCK, CUI_MGR()));
if( GetDPIScaleFactor() > 1 )
{
- for (short i = 0; i < aImageList.GetImageCount(); i++)
- {
- OUString rImageName = aImageList.GetImageName(i);
- BitmapEx b = aImageList.GetImage(rImageName).GetBitmapEx();
- b.Scale(GetDPIScaleFactor(), GetDPIScaleFactor(), BmpScaleFlag::Fast);
- aImageList.ReplaceImage(rImageName, Image(b));
- }
+ aBottomLock.Scale(GetDPIScaleFactor(), GetDPIScaleFactor(), BmpScaleFlag::Fast);
+ aTopLock.Scale(GetDPIScaleFactor(), GetDPIScaleFactor(), BmpScaleFlag::Fast);
+ aCellLock.Scale(GetDPIScaleFactor(), GetDPIScaleFactor(), BmpScaleFlag::Fast);
}
- Size aItemSize( aImageList.GetImage( IID_BOTTOMLOCK ).GetSizePixel() );
+ Size aItemSize(aBottomLock.GetSizePixel());
m_pVsRefEdge->Clear();
m_pVsRefEdge->SetStyle( m_pVsRefEdge->GetStyle() | WB_ITEMBORDER | WB_DOUBLEBORDER );
m_pVsRefEdge->SetColCount( 3 );
- m_pVsRefEdge->InsertItem( IID_BOTTOMLOCK, aImageList.GetImage( IID_BOTTOMLOCK ), m_pFtBotLock->GetText() );
- m_pVsRefEdge->InsertItem( IID_TOPLOCK, aImageList.GetImage( IID_TOPLOCK ), m_pFtTopLock->GetText() );
- m_pVsRefEdge->InsertItem( IID_CELLLOCK, aImageList.GetImage( IID_CELLLOCK ), m_pFtCelLock->GetText() );
+ m_pVsRefEdge->InsertItem(IID_BOTTOMLOCK, Image(aBottomLock), m_pFtBotLock->GetText());
+ m_pVsRefEdge->InsertItem(IID_TOPLOCK, Image(aTopLock), m_pFtTopLock->GetText());
+ m_pVsRefEdge->InsertItem(IID_CELLLOCK, Image(aCellLock), m_pFtCelLock->GetText());
m_pVsRefEdge->SetSizePixel( m_pVsRefEdge->CalcWindowSizePixel( aItemSize ) );
diff --git a/cui/source/tabpages/align.hrc b/cui/source/tabpages/align.hrc
deleted file mode 100644
index 44e3657aeba6..000000000000
--- a/cui/source/tabpages/align.hrc
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_CUI_SOURCE_TABPAGES_ALIGN_HRC
-#define INCLUDED_CUI_SOURCE_TABPAGES_ALIGN_HRC
-
-// image list for ValueSets:
-#define IL_LOCK_BMPS 1100
-#define IID_BOTTOMLOCK 1
-#define IID_TOPLOCK 2
-#define IID_CELLLOCK 3
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/align.src b/cui/source/tabpages/align.src
index 7db8fc80c615..cfb84dfd2d99 100644
--- a/cui/source/tabpages/align.src
+++ b/cui/source/tabpages/align.src
@@ -17,20 +17,19 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "align.hrc"
+Bitmap RID_SVXBMP_BOTTOMLOCK
+{
+ File = "lo01.png";
+};
-#define IL_LOCK_MCOL Color { Red=0xFFFF; Green=0x0000; Blue=0xFFFF; }
+Bitmap RID_SVXBMP_TOPLOCK
+{
+ File = "lo02.png";
+};
-ImageList IL_LOCK_BMPS
- {
- Prefix = "lo";
- IdList =
- {
- IID_BOTTOMLOCK ;
- IID_TOPLOCK ;
- IID_CELLLOCK ;
- };
- IdCount = { 3 ; };
- };
+Bitmap RID_SVXBMP_CELLLOCK
+{
+ File = "lo03.png";
+};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */