[Libreoffice-commits] core.git: Branch 'feature/cmis' - sfx2/source

Cédric Bosdonnat cedric.bosdonnat at free.fr
Mon Oct 14 07:58:49 PDT 2013


 sfx2/source/doc/objserv.cxx |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 72d4ce6f24383176d923b8d7088e3bbe58e3c623
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date:   Mon Oct 14 16:51:32 2013 +0200

    CMIS: fixed regression for Checkin/out entries in Files menu
    
    Change-Id: I6ba77175dc650230039da60a4baee20e0801cc5e

diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 5e04bb6..8e0026f 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -953,10 +953,12 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
                         sal_Bool bCheckedOut = sal_False;
                         for ( sal_Int32 i = 0; i < aCmisProperties.getLength() && !bFoundCheckedout; ++i )
                         {
-                            if ( aCmisProperties[i].Name == "cmis:isVersionSeriesCheckedOut" )
+                            if ( aCmisProperties[i].Id == "cmis:isVersionSeriesCheckedOut" )
                             {
                                 bFoundCheckedout = true;
-                                aCmisProperties[i].Value >>= bCheckedOut;
+                                uno::Sequence< sal_Bool > aValues;
+                                aCmisProperties[i].Value >>= aValues;
+                                bCheckedOut = aValues.getLength() > 0 && aValues[0];
                             }
                         }
                         bShow = !bCheckedOut;
@@ -984,10 +986,12 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
                         sal_Bool bCheckedOut = sal_False;
                         for ( sal_Int32 i = 0; i < aCmisProperties.getLength() && !bFoundCheckedout; ++i )
                         {
-                            if ( aCmisProperties[i].Name == "cmis:isVersionSeriesCheckedOut" )
+                            if ( aCmisProperties[i].Id == "cmis:isVersionSeriesCheckedOut" )
                             {
                                 bFoundCheckedout = true;
-                                aCmisProperties[i].Value >>= bCheckedOut;
+                                uno::Sequence< sal_Bool > aValues;
+                                aCmisProperties[i].Value >>= aValues;
+                                bCheckedOut = aValues.getLength() > 0 && aValues[0];
                             }
                         }
                         bShow = bCheckedOut;


More information about the Libreoffice-commits mailing list