svx/source/accessibility/lookupcolorname.cxx |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit abd619b108e697a5dd045000573d9d1bc675cc98
Author: Noel Grandin <noel.gran...@collabora.co.uk>
Date:   Fri May 12 11:52:59 2017 +0200

    fix bug in ColorNameMap constructor
    
    introduce by commit 9ffb86c7e93c1633866ed89f0749831fd7f31a35
        Author: Noel Grandin <n...@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 <c...@libreoffice.org>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

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];
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to