[Libreoffice-commits] core.git: sc/source

Markus Mohrhard markus.mohrhard at googlemail.com
Sat Jan 13 21:19:58 UTC 2018


 sc/source/ui/navipi/navipi.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit cfa0b631d00f1c17d15646ddcf78093b7f4df03b
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Jan 11 22:42:07 2018 +0100

    shapes provide their name through the container::XNamed interface, tdf#114932
    
    This is actually a problem introduced by 1c80246e5ff8aeb3e05384d86766a56aa878c7be
    and not by 5ee141ee2fb77c3cc452ac656235d7e83e15072c as mentioned in the bug report.
    
    Change-Id: I5f4032c13cf5eac3e515ada10b9bfa87598da438
    Reviewed-on: https://gerrit.libreoffice.org/47841
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index a9e650230473..46fc019c6618 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -809,9 +809,9 @@ void ScNavigatorDlg::UpdateSelection()
         uno::Reference< drawing::XShape > xShape;
         if( xIndexAccess->getByIndex(0) >>= xShape )
         {
-            uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY_THROW );
-            OUString sName;
-            if( ( xProps->getPropertyValue("Name") >>= sName ) && !sName.isEmpty() )
+            uno::Reference< container::XNamed > xNamed( xShape, uno::UNO_QUERY_THROW );
+            OUString sName = xNamed->getName();
+            if (!sName.isEmpty())
             {
                 aLbEntries->SelectEntryByName( ScContentId::DRAWING, sName );
             }


More information about the Libreoffice-commits mailing list