diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-12-21 10:22:07 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-12-21 11:07:22 +0000 |
commit | 2ebe42ff29c5d2bdf27535b8b739e29ebe652282 (patch) | |
tree | 630a8927ab0fe78680336d715bdf29b0e30387f3 /svtools | |
parent | e3203ad42dd57d546ab8cd002b8fcbe54c9bcd11 (diff) |
unwind RID_SVTOOLS_IMAGELIST_EDITBROWSEBOX ImageList
Change-Id: I4cf82ca8530f8b244be593e10976965be2ef2b60
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/brwbox/editbrowsebox.cxx | 34 | ||||
-rw-r--r-- | svtools/source/brwbox/editbrowsebox.hrc | 35 | ||||
-rw-r--r-- | svtools/source/brwbox/editbrowsebox.src | 59 |
3 files changed, 54 insertions, 74 deletions
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index bf46a5adf108..2b167d84e15a 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -19,8 +19,6 @@ #include <svtools/editbrowsebox.hxx> -#include "editbrowsebox.hrc" - #include <vcl/svapp.hxx> #include <tools/debug.hxx> #include <vcl/window.hxx> @@ -230,7 +228,6 @@ namespace svt } } - void EditBrowseBox::PaintField( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const { @@ -253,59 +250,50 @@ namespace svt } } - Image EditBrowseBox::GetImage(RowStatus eStatus) const { - if ( !m_aStatusImages.GetImageCount() ) - { - const_cast<EditBrowseBox*>(this)->m_aStatusImages = ImageList( SvtResId( RID_SVTOOLS_IMAGELIST_EDITBROWSEBOX ) ); - } - - Image aImage; + BitmapEx aBitmap; bool bNeedMirror = IsRTLEnabled(); switch (eStatus) { case CURRENT: - aImage = m_aStatusImages.GetImage(IMG_EBB_CURRENT); + aBitmap = BitmapEx(SvtResId((BMP_CURRENT))); break; case CURRENTNEW: - aImage = m_aStatusImages.GetImage(IMG_EBB_CURRENTNEW); + aBitmap = BitmapEx(SvtResId((BMP_CURRENTNEW))); break; case MODIFIED: - aImage = m_aStatusImages.GetImage(IMG_EBB_MODIFIED); + aBitmap = BitmapEx(SvtResId((BMP_MODIFIED))); bNeedMirror = false; // the pen is not mirrored break; case NEW: - aImage = m_aStatusImages.GetImage(IMG_EBB_NEW); + aBitmap = BitmapEx(SvtResId((BMP_NEW))); break; case DELETED: - aImage = m_aStatusImages.GetImage(IMG_EBB_DELETED); + aBitmap = BitmapEx(SvtResId((BMP_DELETED))); break; case PRIMARYKEY: - aImage = m_aStatusImages.GetImage(IMG_EBB_PRIMARYKEY); + aBitmap = BitmapEx(SvtResId((BMP_PRIMARYKEY))); break; case CURRENT_PRIMARYKEY: - aImage = m_aStatusImages.GetImage(IMG_EBB_CURRENT_PRIMARYKEY); + aBitmap = BitmapEx(SvtResId((BMP_CURRENT_PRIMARYKEY))); break; case FILTER: - aImage = m_aStatusImages.GetImage(IMG_EBB_FILTER); + aBitmap = BitmapEx(SvtResId((BMP_FILTER))); break; case HEADERFOOTER: - aImage = m_aStatusImages.GetImage(IMG_EBB_HEADERFOOTER); + aBitmap = BitmapEx(SvtResId((BMP_HEADERFOOTER))); break; case CLEAN: break; } if ( bNeedMirror ) { - BitmapEx aBitmap( aImage.GetBitmapEx() ); aBitmap.Mirror( BmpMirrorFlags::Horizontal ); - aImage = Image( aBitmap ); } - return aImage; + return Image(aBitmap); } - void EditBrowseBox::PaintStatusCell(OutputDevice& rDev, const Rectangle& rRect) const { if (nPaintRow < 0) diff --git a/svtools/source/brwbox/editbrowsebox.hrc b/svtools/source/brwbox/editbrowsebox.hrc deleted file mode 100644 index f66949a213a0..000000000000 --- a/svtools/source/brwbox/editbrowsebox.hrc +++ /dev/null @@ -1,35 +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_SVTOOLS_SOURCE_BRWBOX_EDITBROWSEBOX_HRC -#define INCLUDED_SVTOOLS_SOURCE_BRWBOX_EDITBROWSEBOX_HRC - -#define IMG_EBB_CURRENT 1 -#define IMG_EBB_MODIFIED 2 -#define IMG_EBB_NEW 3 -#define IMG_EBB_DELETED 4 -#define IMG_EBB_CURRENTNEW 5 -#define IMG_EBB_PRIMARYKEY 6 -#define IMG_EBB_CURRENT_PRIMARYKEY 7 -#define IMG_EBB_FILTER 8 -#define IMG_EBB_HEADERFOOTER 9 - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/brwbox/editbrowsebox.src b/svtools/source/brwbox/editbrowsebox.src index 2ffc3e1d45ec..32e0ac7eade4 100644 --- a/svtools/source/brwbox/editbrowsebox.src +++ b/svtools/source/brwbox/editbrowsebox.src @@ -17,24 +17,51 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "editbrowsebox.hrc" #include <svtools/svtools.hrc> -ImageList RID_SVTOOLS_IMAGELIST_EDITBROWSEBOX -{ - Prefix = "ed"; - IdList = { - IMG_EBB_CURRENT; - IMG_EBB_MODIFIED; - IMG_EBB_NEW; - IMG_EBB_DELETED; - IMG_EBB_CURRENTNEW; - IMG_EBB_PRIMARYKEY; - IMG_EBB_CURRENT_PRIMARYKEY; - IMG_EBB_FILTER; - IMG_EBB_HEADERFOOTER; - }; - IdCount = { 9; }; +Bitmap BMP_CURRENT +{ + File = "ed01.png"; +}; + +Bitmap BMP_MODIFIED +{ + File = "ed02.png"; +}; + +Bitmap BMP_NEW +{ + File = "ed03.png"; +}; + +Bitmap BMP_DELETED +{ + File = "ed04.png"; +}; + +Bitmap BMP_CURRENTNEW +{ + File = "ed05.png"; +}; + +Bitmap BMP_PRIMARYKEY +{ + File = "ed06.png"; +}; + +Bitmap BMP_CURRENT_PRIMARYKEY +{ + File = "ed07.png"; +}; + +Bitmap BMP_FILTER +{ + File = "ed08.png"; +}; + +Bitmap BMP_HEADERFOOTER +{ + File = "ed09.png"; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |