summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/olinewin.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-26 12:46:39 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-04-26 16:18:48 +0200
commit6022a17e79e2cc0a483122bf7f73fcb3e246caf6 (patch)
tree459513cb7f83c7efef1a3322dd7137f39eb674f9 /sc/source/ui/view/olinewin.cxx
parent662f372d3e5751f92609a1e2535ee1388a8fd1cf (diff)
remove sc bitmaps from .src files
Change-Id: I351b67616b240e3c0c91ea31d8f14ecfa6de8b4a Reviewed-on: https://gerrit.libreoffice.org/36991 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/view/olinewin.cxx')
-rw-r--r--sc/source/ui/view/olinewin.cxx31
1 files changed, 22 insertions, 9 deletions
diff --git a/sc/source/ui/view/olinewin.cxx b/sc/source/ui/view/olinewin.cxx
index daa983f18e11..6e1d9174dd4d 100644
--- a/sc/source/ui/view/olinewin.cxx
+++ b/sc/source/ui/view/olinewin.cxx
@@ -27,6 +27,7 @@
#include "dbfunc.hxx"
#include "scres.hrc"
#include "scresid.hxx"
+#include "bitmaps.hlst"
const long SC_OL_BITMAPSIZE = 12;
const long SC_OL_POSOFFSET = 2;
@@ -529,15 +530,15 @@ void ScOutlineWindow::DrawRectRel(
namespace
{
- Image GetImage(sal_uInt16 nId)
+ Image GetImage(const OUString& rId)
{
- return Image(BitmapEx(ScResId(nId)));
+ return Image(BitmapEx(rId));
}
}
-void ScOutlineWindow::DrawImageRel(long nLevelPos, long nEntryPos, sal_uInt16 nId)
+void ScOutlineWindow::DrawImageRel(long nLevelPos, long nEntryPos, const OUString& rId)
{
- const Image& rImage = GetImage(nId);
+ const Image& rImage = GetImage(rId);
SetLineColor();
SetFillColor( GetBackground().GetColor() );
Point aPos( GetPoint( nLevelPos, nEntryPos ) );
@@ -550,11 +551,11 @@ void ScOutlineWindow::DrawBorderRel( size_t nLevel, size_t nEntry, bool bPressed
Point aPos;
if ( GetImagePos( nLevel, nEntry, aPos ) )
{
- sal_uInt16 nId = bPressed ? RID_BMP_PRESSED : RID_BMP_NOTPRESSED;
+ OUString sId = bPressed ? OUString(RID_BMP_PRESSED) : OUString(RID_BMP_NOTPRESSED);
bool bClip = (nEntry != SC_OL_HEADERENTRY);
if ( bClip )
SetEntryAreaClipRegion();
- DrawImage(aPos, GetImage(nId));
+ DrawImage(aPos, GetImage(sId));
if ( bClip )
SetClipRegion();
}
@@ -600,6 +601,18 @@ void ScOutlineWindow::HideFocus()
}
}
+static const OUStringLiteral aLevelBmps[]=
+{
+ RID_BMP_LEVEL1,
+ RID_BMP_LEVEL2,
+ RID_BMP_LEVEL3,
+ RID_BMP_LEVEL4,
+ RID_BMP_LEVEL5,
+ RID_BMP_LEVEL6,
+ RID_BMP_LEVEL7,
+ RID_BMP_LEVEL8
+};
+
void ScOutlineWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& /* rRect */ )
{
long nEntriesSign = mbMirrorEntries ? -1 : 1;
@@ -624,7 +637,7 @@ void ScOutlineWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const tools
{
long nEntryPos = GetHeaderEntryPos();
for ( size_t nLevel = 0; nLevel < nLevelCount; ++nLevel )
- DrawImageRel(GetLevelPos(nLevel), nEntryPos, RID_BMP_LEVEL1 + nLevel);
+ DrawImageRel(GetLevelPos(nLevel), nEntryPos, aLevelBmps[nLevel]);
SetLineColor( maLineColor );
long nLinePos = mnHeaderPos + (mbMirrorEntries ? 0 : (mnHeaderSize - 1));
@@ -696,8 +709,8 @@ void ScOutlineWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const tools
// draw, if not hidden by higher levels
if ( bDraw )
{
- sal_uInt16 nImageId = pEntry->IsHidden() ? RID_BMP_PLUS : RID_BMP_MINUS;
- DrawImageRel( nLevelPos, nImagePos, nImageId );
+ OUString sImageId = pEntry->IsHidden() ? OUString(RID_BMP_PLUS) : OUString(RID_BMP_MINUS);
+ DrawImageRel(nLevelPos, nImagePos, sImageId);
}
}
}