diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2017-02-16 22:29:10 +0100 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2017-02-20 10:29:49 +0000 |
commit | f35e6f2504384ad66b475d39849ed10987b2da53 (patch) | |
tree | 941d57244f1953cb39ea044f403e0a39dbcb6fda /svx | |
parent | c3007ce68018f02d618797f4558b7b803f786d0b (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>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/xoutdev/xtabcolr.cxx | 13 |
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: */ |