summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2017-02-16 22:29:10 +0100
committerAndras Timar <andras.timar@collabora.com>2018-02-12 19:09:19 +0100
commit15c51b17dbe120ddc84bff7f72c7873214ffdcce (patch)
tree7419b3db29ba68fef33b8f397757970e082ae432 /svx/source
parent999df3e27d6ab582a67bd7c47a6e4ebb123bdcf3 (diff)
tdf#103224: Get the initial colour right
Change-Id: I59309f5b433eb7aa92d05ce7d373d69cb413b258 Reviewed-on: https://gerrit.libreoffice.org/34383 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> (cherry picked from commit f35e6f2504384ad66b475d39849ed10987b2da53) Signed-off-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/xoutdev/xtabcolr.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/svx/source/xoutdev/xtabcolr.cxx b/svx/source/xoutdev/xtabcolr.cxx
index 374f6fc9a6cb..44f881403580 100644
--- a/svx/source/xoutdev/xtabcolr.cxx
+++ b/svx/source/xoutdev/xtabcolr.cxx
@@ -157,4 +157,17 @@ Bitmap XColorList::CreateBitmapForUI( long /*nIndex*/ )
return Bitmap();
}
+long XColorList::GetIndexOfColor( const Color& rColor ) const
+{
+ for( long i = 0, n = maList.size(); i < n; ++i )
+ {
+ const Color aColor = static_cast<XColorEntry*>( maList[i].get() )->GetColor();
+
+ if (aColor == rColor )
+ return i;
+ }
+
+ return -1;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */