diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-12 11:52:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-12 12:42:26 +0200 |
commit | abd619b108e697a5dd045000573d9d1bc675cc98 (patch) | |
tree | 7ac7b1a0fad54400f355326a140de9dc12d30904 /svx/source | |
parent | dd6d7992d6f16133fafa7a617cf5fa0ba1ae37cc (diff) |
fix bug in ColorNameMap constructor
introduce by commit 9ffb86c7e93c1633866ed89f0749831fd7f31a35
Author: Noel Grandin <noel@peralex.com>
Date: Wed Mar 27 10:41:40 2013 +0200
fdo#46808, convert drawing::ColorTable to new style
Change-Id: I5e91b41caa6e7e43ff0f261a22b027c8574b669a
Reviewed-on: https://gerrit.libreoffice.org/37532
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/accessibility/lookupcolorname.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/svx/source/accessibility/lookupcolorname.cxx b/svx/source/accessibility/lookupcolorname.cxx index 423eb4345fd9..b94434f885fd 100644 --- a/svx/source/accessibility/lookupcolorname.cxx +++ b/svx/source/accessibility/lookupcolorname.cxx @@ -58,15 +58,16 @@ ColorNameMap::ColorNameMap() { try { // Create color table in which to look up the given color. - css::uno::Reference< css::container::XNameContainer > xColorTable = - css::drawing::ColorTable::create( comphelper::getProcessComponentContext() ); + css::uno::Reference< css::container::XNameContainer > xColorTable = + css::drawing::ColorTable::create( comphelper::getProcessComponentContext() ); // Get list of color names in order to iterate over the color table. // Lock the solar mutex here as workaround for missing lock in // called function. SolarMutexGuard aGuard; - aNames = xNA->getElementNames(); + xNA = xColorTable; + aNames = xColorTable->getElementNames(); } catch (css::uno::RuntimeException const&) { @@ -81,7 +82,7 @@ ColorNameMap::ColorNameMap() { // Get the numerical value for the i-th color name. try { - css::uno::Any aColor (xNA->getByName (aNames[i])); + css::uno::Any aColor = xNA->getByName(aNames[i]); long nColor = 0; aColor >>= nColor; map_[nColor] = aNames[i]; |