summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/svtools/editbrowsebox.hxx3
-rw-r--r--include/svtools/svtools.hrc10
-rw-r--r--svtools/source/brwbox/editbrowsebox.cxx34
-rw-r--r--svtools/source/brwbox/editbrowsebox.hrc35
-rw-r--r--svtools/source/brwbox/editbrowsebox.src59
5 files changed, 64 insertions, 77 deletions
diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx
index e31bcf0d5f8b..c3d54e600b98 100644
--- a/include/svtools/editbrowsebox.hxx
+++ b/include/svtools/editbrowsebox.hxx
@@ -490,8 +490,7 @@ namespace svt
VclPtr<CheckBoxControl> pCheckBoxPaint;
EditBrowseBoxFlags m_nBrowserFlags;
- ImageList m_aStatusImages;
- ::std::unique_ptr< EditBrowseBoxImpl> m_aImpl;
+ std::unique_ptr< EditBrowseBoxImpl> m_aImpl;
protected:
VclPtr<BrowserHeader> pHeader;
diff --git a/include/svtools/svtools.hrc b/include/svtools/svtools.hrc
index c149f8643c31..44b14c4c4b1c 100644
--- a/include/svtools/svtools.hrc
+++ b/include/svtools/svtools.hrc
@@ -246,12 +246,20 @@
#define BMP_PLUGIN (RID_SVTOOLS_BITMAP_START + 3)
#define BMP_LIST_ADD (RID_SVTOOLS_BITMAP_START + 4)
+#define BMP_CURRENT (RID_SVTOOLS_BITMAP_START + 5)
+#define BMP_MODIFIED (RID_SVTOOLS_BITMAP_START + 6)
+#define BMP_NEW (RID_SVTOOLS_BITMAP_START + 7)
+#define BMP_DELETED (RID_SVTOOLS_BITMAP_START + 8)
+#define BMP_CURRENTNEW (RID_SVTOOLS_BITMAP_START + 9)
+#define BMP_PRIMARYKEY (RID_SVTOOLS_BITMAP_START + 10)
+#define BMP_CURRENT_PRIMARYKEY (RID_SVTOOLS_BITMAP_START + 11)
+#define BMP_FILTER (RID_SVTOOLS_BITMAP_START + 12)
+#define BMP_HEADERFOOTER (RID_SVTOOLS_BITMAP_START + 13)
// image lists
#define RID_SVTOOLS_IMAGELIST_BIG (RID_SVTOOLS_IMAGELIST_START + 1)
#define RID_SVTOOLS_IMAGELIST_SMALL (RID_SVTOOLS_IMAGELIST_START + 2)
-#define RID_SVTOOLS_IMAGELIST_EDITBROWSEBOX (RID_SVTOOLS_IMAGELIST_START + 3)
// images
#define RID_IMG_TREENODE_COLLAPSED (RID_SVTOOLS_START + 0)
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: */