[Libreoffice-commits] core.git: Branch 'feature/cmis' - 2 commits - include/sfx2 offapi/com offapi/UnoApi_offapi.mk sfx2/source ucb/source

Cao Cuong Ngo cao.cuong.ngo at gmail.com
Tue Jun 18 06:56:32 PDT 2013


 include/sfx2/dinfdlg.hxx                           |   14 +++-
 include/sfx2/sfxbasemodel.hxx                      |   10 +--
 offapi/UnoApi_offapi.mk                            |    2 
 offapi/com/sun/star/document/CmisProperty.idl      |   68 +++++++++++++++++++++
 offapi/com/sun/star/document/CmisPropertyValue.idl |   57 -----------------
 offapi/com/sun/star/document/XCmisDocument.idl     |    4 -
 sfx2/source/dialog/dinfdlg.cxx                     |   63 ++++++++++++++-----
 sfx2/source/doc/objserv.cxx                        |    6 -
 sfx2/source/doc/sfxbasemodel.cxx                   |   24 +++----
 sfx2/source/view/sfxbasecontroller.cxx             |    2 
 ucb/source/ucp/cmis/cmis_content.cxx               |   28 ++++----
 11 files changed, 165 insertions(+), 113 deletions(-)

New commits:
commit 613ce6cadfb915b58a4611bf6d68660724fc95e8
Author: Cao Cuong Ngo <cao.cuong.ngo at gmail.com>
Date:   Tue Jun 18 15:10:26 2013 +0200

    Cmis Property
    
    Add MultiValued, OpenChoice and Choices to CMIS Property
    
    Change-Id: Iade033c86878368b39a0264ad0a56d0286e6bffb

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 949cbd2..dc7d78d 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -165,6 +165,8 @@ public:
     void        ClearCmisProperties();
     void        AddCmisProperty(  const OUString& sId, const OUString& sName,
                                   const bool bUpdatable, const bool bRequired,
+                                  const bool bMultiValued, const bool bOpenChoice,
+                                  const com::sun::star::uno::Any& Choices,
                                   const com::sun::star::uno::Any& rValue );
 
     virtual SfxPoolItem*    Clone( SfxItemPool* pPool = NULL ) const;
@@ -629,6 +631,8 @@ public:
     inline sal_Int32    GetLineHeight() const { return m_nLineHeight; }
     void                AddLine( const OUString& sId, const OUString& sName,
                                  const bool bUpdatable, const bool bRequired,
+                                 const bool bMultiValued, const bool bOpenChoice,
+                                 com::sun::star::uno::Any& aChoices,
                                  com::sun::star::uno::Any& rAny );
     bool                AreAllLinesValid() const;
     void                ClearAllLines();
@@ -658,6 +662,8 @@ public:
 
     void            AddLine( const OUString& sId, const OUString& sName,
                              const bool bUpdatable, const bool bRequired,
+                             const bool bMultiValude, const bool bOpenChoice,
+                             com::sun::star::uno::Any& aChoices,
                              com::sun::star::uno::Any& rAny, bool bInteractive );
 
     inline bool     AreAllLinesValid() const { return m_pPropertiesWin->AreAllLinesValid(); }
diff --git a/offapi/com/sun/star/document/CmisProperty.idl b/offapi/com/sun/star/document/CmisProperty.idl
index f6009a0..65caab1 100644
--- a/offapi/com/sun/star/document/CmisProperty.idl
+++ b/offapi/com/sun/star/document/CmisProperty.idl
@@ -21,7 +21,7 @@
 
 module com {  module sun {  module star {  module document {
 
-/** specifies a CMIS property value.
+/** specifies a CMIS property.
  */
 struct CmisProperty
 {
@@ -42,6 +42,19 @@ struct CmisProperty
     */
     boolean Required;
 
+    /** specifies if the property has multiple value
+    */
+    boolean MultiValued;
+
+    /** specifies if the property value can be freely set
+        or is restricted from a list of choices.
+    */
+    boolean OpenChoice;
+
+    /** specifies the possible choices of the values.
+    */
+    any Choices;
+
     /** specifies value of the property
     */
     any Value;
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 1e85aad..8d1e79e 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -97,26 +97,38 @@ struct CmisProperty
     OUString                    m_sName;
     bool                        m_bUpdatable;
     bool                        m_bRequired;
+    bool                        m_bMultiValued;
+    bool                        m_bOpenChoice;
+    com::sun::star::uno::Any    m_aChoices;
     com::sun::star::uno::Any    m_aValue;
 
     CmisProperty( const OUString& sId,
                   const OUString& sName,
                   const bool bUpdatable,
                   const bool bRequired,
+                  const bool bMultiValued,
+                  const bool bOpenChoice,
+                  const com::sun::star::uno::Any& aChoices,
                   const com::sun::star::uno::Any& rValue ) :
                 m_sId( sId ),
                 m_sName( sName ),
                 m_bUpdatable( bUpdatable ),
                 m_bRequired( bRequired ),
+                m_bMultiValued( bMultiValued ),
+                m_bOpenChoice( bOpenChoice ),
+                m_aChoices( aChoices),
                 m_aValue( rValue )
         {}
 
     inline bool operator==( const CmisProperty& rProp )
     { return m_sId.equals( rProp.m_sId )
-          && m_sName      == rProp.m_sName
-          && m_bUpdatable == rProp.m_bUpdatable
-          && m_bRequired  == rProp.m_bRequired
-          && m_aValue     == rProp.m_aValue;
+          && m_sName         == rProp.m_sName
+          && m_bUpdatable    == rProp.m_bUpdatable
+          && m_bRequired     == rProp.m_bRequired
+          && m_bMultiValued  == rProp.m_bMultiValued
+          && m_bOpenChoice   == rProp.m_bOpenChoice
+          && m_aChoices      == rProp.m_aChoices
+          && m_aValue        == rProp.m_aValue;
     }
 };
 
@@ -306,6 +318,9 @@ SfxDocumentInfoItem::SfxDocumentInfoItem( const String& rFile,
                                                    i_cmisProps[i].Name,
                                                    i_cmisProps[i].Updatable,
                                                    i_cmisProps[i].Required,
+                                                   i_cmisProps[i].MultiValued,
+                                                   i_cmisProps[i].OpenChoice,
+                                                   i_cmisProps[i].Choices,
                                                    i_cmisProps[i].Value );
            m_aCmisProperties.push_back( pProp );
         }
@@ -350,6 +365,9 @@ SfxDocumentInfoItem::SfxDocumentInfoItem( const SfxDocumentInfoItem& rItem )
                                                 rItem.m_aCmisProperties[i]->m_sName,
                                                 rItem.m_aCmisProperties[i]->m_bUpdatable,
                                                 rItem.m_aCmisProperties[i]->m_bRequired,
+                                                rItem.m_aCmisProperties[i]->m_bMultiValued,
+                                                rItem.m_aCmisProperties[i]->m_bOpenChoice,
+                                                rItem.m_aCmisProperties[i]->m_aChoices,
                                                 rItem.m_aCmisProperties[i]->m_aValue );
         m_aCmisProperties.push_back( pProp );
     }
@@ -546,6 +564,9 @@ std::vector< CmisProperty* > SfxDocumentInfoItem::GetCmisProperties() const
                                                 m_aCmisProperties[i]->m_sName,
                                                 m_aCmisProperties[i]->m_bUpdatable,
                                                 m_aCmisProperties[i]->m_bRequired,
+                                                m_aCmisProperties[i]->m_bMultiValued,
+                                                m_aCmisProperties[i]->m_bOpenChoice,
+                                                m_aCmisProperties[i]->m_aChoices,
                                                 m_aCmisProperties[i]->m_aValue );
         aRet.push_back( pProp );
     }
@@ -564,10 +585,14 @@ void SfxDocumentInfoItem::AddCmisProperty( const OUString& sId,
                                            const OUString& sName,
                                            const bool bUpdatable,
                                            const bool bRequired,
-                                           const Any& rValue )
+                                           const bool bMultiValued,
+                                           const bool bOpenChoice,
+                                           const Any& aChoices,
+                                           const Any& aValue )
 {
     CmisProperty* pProp = new CmisProperty( sId, sName, bUpdatable,
-                                              bRequired, rValue );
+                                            bRequired, bMultiValued,
+                                            bOpenChoice, aChoices, aValue );
     m_aCmisProperties.push_back( pProp );
 }
 
@@ -2418,7 +2443,8 @@ void CmisPropertiesWindow::updateLineWidth()
 
 void CmisPropertiesWindow::AddLine( const OUString& /*sId*/, const OUString& sName,
                                     const bool bUpdatable, const bool /*bRequired*/,
-                                    Any& rAny )
+                                    const bool /*bMultiValued*/, const bool /*bOpenChoice*/,
+                                    Any& /*aChoices*/, Any& rAny )
 {
     CmisPropertyLine* pNewLine = new CmisPropertyLine( this );
     pNewLine->m_aValueEdit.SetLoseFocusHdl( LINK( this, CmisPropertiesWindow, EditLoseFocusHdl ) );
@@ -2712,12 +2738,13 @@ IMPL_LINK( CmisPropertiesControl, ScrollHdl, ScrollBar*, pScrollBar )
     return 0;
 }
 
-
 void CmisPropertiesControl::AddLine( const OUString& sId, const OUString& sName,
                                      const bool bUpdatable, const bool bRequired,
-                                     Any& rAny, bool bInteractive )
+                                     const bool bMultiValued, const bool bOpenChoice,
+                                     Any& aChoices, Any& rAny, bool bInteractive )
 {
-    m_pPropertiesWin->AddLine( sId, sName, bUpdatable, bRequired, rAny );
+    m_pPropertiesWin->AddLine( sId, sName, bUpdatable, bRequired, bMultiValued,
+                               bOpenChoice, aChoices, rAny );
     m_pVertScroll->SetRangeMax( m_pPropertiesWin->GetLineCount() + 1 );
     if ( bInteractive && m_pPropertiesWin->GetOutputSizePixel().Height() <
         m_pPropertiesWin->GetLineCount() * m_pPropertiesWin->GetLineHeight() )
@@ -2763,6 +2790,9 @@ sal_Bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet& rSet )
                                         aPropertySeq[i].Name,
                                         aPropertySeq[i].Updatable,
                                         aPropertySeq[i].Required,
+                                        aPropertySeq[i].MultiValued,
+                                        aPropertySeq[i].OpenChoice,
+                                        aPropertySeq[i].Choices,
                                         aPropertySeq[i].Value );
         }
     }
@@ -2784,6 +2814,9 @@ void SfxCmisPropertiesPage::Reset( const SfxItemSet& rItemSet )
                                     aCmisProps[i]->m_sName,
                                     aCmisProps[i]->m_bUpdatable,
                                     aCmisProps[i]->m_bRequired,
+                                    aCmisProps[i]->m_bMultiValued,
+                                    aCmisProps[i]->m_bOpenChoice,
+                                    aCmisProps[i]->m_aChoices,
                                     aCmisProps[i]->m_aValue, false );
     }
 }
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index d419d11..34da455 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -589,12 +589,17 @@ namespace cmis
                         {
                             string sId = it->first;
                             string sDisplayName =  it->second->getPropertyType()->getDisplayName( );
-                            bool isUpdatable = it->second->getPropertyType()->isUpdatable( );
-                            bool isRequired = it->second->getPropertyType()->isRequired( );
+                            bool bUpdatable = it->second->getPropertyType()->isUpdatable( );
+                            bool bRequired = it->second->getPropertyType()->isRequired( );
+                            bool bMultiValued = it->second->getPropertyType()->isMultiValued();
+                            bool bOpenChoice = it->second->getPropertyType()->isOpenChoice();
+
                             pCmisProps[i].Id = STD_TO_OUSTR( sId );
                             pCmisProps[i].Name = STD_TO_OUSTR( sDisplayName );
-                            pCmisProps[i].Updatable = isUpdatable;
-                            pCmisProps[i].Required = isRequired;
+                            pCmisProps[i].Updatable = bUpdatable;
+                            pCmisProps[i].Required = bRequired;
+                            pCmisProps[i].MultiValued = bMultiValued;
+                            pCmisProps[i].OpenChoice = bOpenChoice;
                             pCmisProps[i].Value = lcl_cmisPropertyToUno( it->second );
                         }
                         xRow->appendObject( rProp.Name, uno::makeAny( aCmisProperties ) );
commit c84defbbcc8d88fa85232075fb3243ac9fff253f
Author: Cao Cuong Ngo <cao.cuong.ngo at gmail.com>
Date:   Tue Jun 18 14:00:48 2013 +0200

    CMIS properties dialog
    
    Rename CmisPropertyValues to CmisProperty
    
    Change-Id: I7360e6b55406c1abe381c8d915be41d972498167

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 9edaf7d..949cbd2 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -24,7 +24,7 @@
 
 #include <com/sun/star/util/DateTime.hpp>
 #include <com/sun/star/util/Duration.hpp>
-#include <com/sun/star/document/CmisPropertyValue.hpp>
+#include <com/sun/star/document/CmisProperty.hpp>
 
 #include <svl/stritem.hxx>
 #include <svl/zforlist.hxx>
@@ -88,7 +88,7 @@ public:
         const ::com::sun::star::uno::Reference<
             ::com::sun::star::document::XDocumentProperties> & i_xDocProps,
         const ::com::sun::star::uno::Sequence<
-            ::com::sun::star::document::CmisPropertyValue> & i_cmisProps,
+            ::com::sun::star::document::CmisProperty> & i_cmisProps,
         sal_Bool bUseUserData );
     SfxDocumentInfoItem( const SfxDocumentInfoItem& );
     virtual ~SfxDocumentInfoItem();
@@ -634,7 +634,7 @@ public:
     void                ClearAllLines();
     void                DoScroll( sal_Int32 nNewPos );
 
-    ::com::sun::star::uno::Sequence< ::com::sun::star::document::CmisPropertyValue >
+    ::com::sun::star::uno::Sequence< ::com::sun::star::document::CmisProperty >
                         GetCmisProperties() const;
     void                updateLineWidth();
 };
@@ -662,7 +662,7 @@ public:
 
     inline bool     AreAllLinesValid() const { return m_pPropertiesWin->AreAllLinesValid(); }
     inline void     ClearAllLines() { m_pPropertiesWin->ClearAllLines(); }
-    inline ::com::sun::star::uno::Sequence< ::com::sun::star::document::CmisPropertyValue >
+    inline ::com::sun::star::uno::Sequence< ::com::sun::star::document::CmisProperty >
                     GetCmisProperties() const
                         { return m_pPropertiesWin->GetCmisProperties(); }
     void    Init(VclBuilderContainer& rParent);
diff --git a/include/sfx2/sfxbasemodel.hxx b/include/sfx2/sfxbasemodel.hxx
index 37abb06..10115b6 100644
--- a/include/sfx2/sfxbasemodel.hxx
+++ b/include/sfx2/sfxbasemodel.hxx
@@ -63,7 +63,7 @@
 #include <com/sun/star/frame/XStorable2.hpp>
 #include <com/sun/star/frame/XLoadable.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/document/CmisPropertyValue.hpp>
+#include <com/sun/star/document/CmisProperty.hpp>
 #include <com/sun/star/lang/EventObject.hpp>
 #include <com/sun/star/datatransfer/XTransferable.hpp>
 #include <com/sun/star/script/provider/XScriptProviderSupplier.hpp>
@@ -1308,12 +1308,12 @@ public:
 
     // XCmisDocument
 
-    virtual css::uno::Sequence< css::document::CmisPropertyValue >
-            SAL_CALL getCmisPropertiesValues()
+    virtual css::uno::Sequence< css::document::CmisProperty >
+            SAL_CALL getCmisProperties()
         throw (css::uno::RuntimeException);
-    virtual void SAL_CALL setCmisPropertiesValues(
+    virtual void SAL_CALL setCmisProperties(
             const css::uno::Sequence<
-                css::document::CmisPropertyValue >& _cmispropertiesvalues )
+                css::document::CmisProperty >& _cmisproperties )
         throw (css::uno::RuntimeException);
 
     virtual void SAL_CALL checkOut(  ) throw ( css::uno::RuntimeException );
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index ae31d36..4f75eae 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -2174,7 +2174,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/document,\
 	AmbigousFilterRequest \
 	BrokenPackageRequest \
 	ChangedByOthersRequest \
-	CmisPropertyValue \
+	CmisProperty \
 	CorruptedFilterConfigurationException \
 	DocumentEvent \
 	EmptyUndoStackException \
diff --git a/offapi/com/sun/star/document/CmisPropertyValue.idl b/offapi/com/sun/star/document/CmisProperty.idl
similarity index 88%
rename from offapi/com/sun/star/document/CmisPropertyValue.idl
rename to offapi/com/sun/star/document/CmisProperty.idl
index f60bb6d..f6009a0 100644
--- a/offapi/com/sun/star/document/CmisPropertyValue.idl
+++ b/offapi/com/sun/star/document/CmisProperty.idl
@@ -16,16 +16,14 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef __com_sun_star_document_CmisPropertyValue_idl__
-#define __com_sun_star_document_CmisPropertyValue_idl__
-
-#include <com/sun/star/beans/PropertyValue.idl>
+#ifndef __com_sun_star_document_CmisProperty_idl__
+#define __com_sun_star_document_CmisProperty_idl__
 
 module com {  module sun {  module star {  module document {
 
 /** specifies a CMIS property value.
  */
-struct CmisPropertyValue
+struct CmisProperty
 {
     /** unique ID of the Cmis property
     */
diff --git a/offapi/com/sun/star/document/XCmisDocument.idl b/offapi/com/sun/star/document/XCmisDocument.idl
index 66e478a..51bcf50 100644
--- a/offapi/com/sun/star/document/XCmisDocument.idl
+++ b/offapi/com/sun/star/document/XCmisDocument.idl
@@ -9,7 +9,7 @@
 #ifndef __com_sun_star_document_XCmisDocument_idl__
 #define __com_sun_star_document_XCmisDocument_idl__
 
-#include <com/sun/star/document/CmisPropertyValue.idl>
+#include <com/sun/star/document/CmisProperty.idl>
 #include <com/sun/star/uno/XInterface.idl>
 
 module com {   module sun {   module star {   module document {
@@ -46,7 +46,7 @@ interface XCmisDocument : com::sun::star::uno::XInterface
 
     /** Contains the properties values named after their CMIS ID.
      */
-    [attribute] sequence <com::sun::star::document::CmisPropertyValue> CmisPropertiesValues;
+    [attribute] sequence <com::sun::star::document::CmisProperty> CmisProperties;
 };
 
 }; }; }; };
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 07f5cfb..1e85aad 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -44,7 +44,7 @@
 #include <com/sun/star/util/Time.hpp>
 #include <com/sun/star/util/Duration.hpp>
 #include <com/sun/star/document/XDocumentProperties.hpp>
-#include <com/sun/star/document/CmisPropertyValue.hpp>
+#include <com/sun/star/document/CmisProperty.hpp>
 
 #include <vcl/timer.hxx>
 #include "sfx2/dinfdlg.hxx"
@@ -250,7 +250,7 @@ SfxDocumentInfoItem::SfxDocumentInfoItem()
 
 SfxDocumentInfoItem::SfxDocumentInfoItem( const String& rFile,
         const uno::Reference<document::XDocumentProperties>& i_xDocProps,
-        const uno::Sequence<document::CmisPropertyValue>& i_cmisProps,
+        const uno::Sequence<document::CmisProperty>& i_cmisProps,
         sal_Bool bIs )
     : SfxStringItem( SID_DOCINFO, rFile )
     , m_AutoloadDelay( i_xDocProps->getAutoloadSecs() )
@@ -2573,9 +2573,9 @@ void CmisPropertiesWindow::DoScroll( sal_Int32 nNewPos )
     }
 }
 
-Sequence< document::CmisPropertyValue > CmisPropertiesWindow::GetCmisProperties() const
+Sequence< document::CmisProperty > CmisPropertiesWindow::GetCmisProperties() const
 {
-    Sequence< document::CmisPropertyValue > aPropertiesSeq( m_aCmisPropertiesLines.size() );
+    Sequence< document::CmisProperty > aPropertiesSeq( m_aCmisPropertiesLines.size() );
     sal_Int32 i = 0;
     std::vector< CmisPropertyLine* >::const_iterator pIter;
     for ( pIter = m_aCmisPropertiesLines.begin();
@@ -2754,7 +2754,7 @@ sal_Bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet& rSet )
     if ( pInfo )
     {
         pInfo->ClearCmisProperties();
-        Sequence< document::CmisPropertyValue > aPropertySeq = m_pPropertiesCtrl->GetCmisProperties();
+        Sequence< document::CmisProperty > aPropertySeq = m_pPropertiesCtrl->GetCmisProperties();
         sal_Int32 i = 0, nCount = aPropertySeq.getLength();
         for ( ; i < nCount; ++i )
         {
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 1647a89..acb008f 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -492,7 +492,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
                 }
 
                 Reference< XCmisDocument > xCmisDoc( GetModel(), uno::UNO_QUERY );
-                uno::Sequence< document::CmisPropertyValue> aCmisProperties = xCmisDoc->getCmisPropertiesValues();
+                uno::Sequence< document::CmisProperty> aCmisProperties = xCmisDoc->getCmisProperties();
 
                 SfxDocumentInfoItem aDocInfoItem( aURL, getDocProperties(), aCmisProperties,
                     IsUseUserData() );
@@ -940,7 +940,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
                 {
                     bool bShow = false;
                     Reference< XCmisDocument > xCmisDoc( GetModel(), uno::UNO_QUERY );
-                    uno::Sequence< document::CmisPropertyValue> aCmisProperties = xCmisDoc->getCmisPropertiesValues();
+                    uno::Sequence< document::CmisProperty> aCmisProperties = xCmisDoc->getCmisProperties();
 
                     if ( xCmisDoc->isVersionable( ) && aCmisProperties.hasElements( ) )
                     {
@@ -971,7 +971,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
                 {
                     bool bShow = false;
                     Reference< XCmisDocument > xCmisDoc( GetModel(), uno::UNO_QUERY );
-                    uno::Sequence< document::CmisPropertyValue> aCmisProperties = xCmisDoc->getCmisPropertiesValues( );
+                    uno::Sequence< document::CmisProperty> aCmisProperties = xCmisDoc->getCmisProperties( );
 
                     if ( xCmisDoc->isVersionable( ) && aCmisProperties.hasElements( ) )
                     {
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 794f32e..4f0f7a3 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -122,7 +122,7 @@
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using ::com::sun::star::beans::PropertyValue;
-using ::com::sun::star::document::CmisPropertyValue;
+using ::com::sun::star::document::CmisProperty;
 using ::com::sun::star::frame::XFrame;
 using ::com::sun::star::frame::XController;
 using ::com::sun::star::frame::XController2;
@@ -214,7 +214,7 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument
     Reference< frame::XUntitledNumbers >     m_xNumberedControllers;
     Reference< rdf::XDocumentMetadataAccess>           m_xDocumentMetadata;
     ::rtl::Reference< ::sfx2::DocumentUndoManager >         m_pDocumentUndoManager;
-    Sequence< document::CmisPropertyValue>                    m_cmisPropertiesValues;
+    Sequence< document::CmisProperty>                    m_cmisProperties;
 
     IMPL_SfxBaseModel_DataContainer( ::osl::Mutex& rMutex, SfxObjectShell* pObjectShell )
             :   m_pObjectShell          ( pObjectShell  )
@@ -232,7 +232,7 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument
             ,   m_xNumberedControllers  ()
             ,   m_xDocumentMetadata     () // lazy
             ,   m_pDocumentUndoManager  ()
-            ,   m_cmisPropertiesValues  ()
+            ,   m_cmisProperties  ()
     {
         // increase global instance counter.
         ++g_nInstanceCounter;
@@ -2464,16 +2464,16 @@ void SAL_CALL SfxBaseModel::notifyDocumentEvent( const OUString&, const Referenc
     throw lang::NoSupportException( OUString( "SfxBaseModel controlls all the sent notifications itself!"  ), Reference< XInterface >() );
 }
 
-Sequence< document::CmisPropertyValue > SAL_CALL SfxBaseModel::getCmisPropertiesValues()
+Sequence< document::CmisProperty > SAL_CALL SfxBaseModel::getCmisProperties()
     throw ( RuntimeException )
 {
-    return m_pData->m_cmisPropertiesValues;
+    return m_pData->m_cmisProperties;
 }
 
-void SAL_CALL SfxBaseModel::setCmisPropertiesValues( const Sequence< document::CmisPropertyValue >& _cmispropertiesvalues )
+void SAL_CALL SfxBaseModel::setCmisProperties( const Sequence< document::CmisProperty >& _cmisproperties )
     throw ( RuntimeException )
 {
-    m_pData->m_cmisPropertiesValues = _cmispropertiesvalues;
+    m_pData->m_cmisProperties = _cmisproperties;
 }
 
 void SAL_CALL SfxBaseModel::checkOut(  ) throw ( RuntimeException )
@@ -2639,12 +2639,12 @@ void SfxBaseModel::loadCmisProperties( )
                 Reference<ucb::XCommandEnvironment>(),
                 comphelper::getProcessComponentContext() );
             Reference < beans::XPropertySetInfo > xProps = aContent.getProperties();
-            OUString aCmisPropsValues( "CmisPropertiesValues" );
-            if ( xProps->hasPropertyByName( aCmisPropsValues ) )
+            OUString aCmisProps( "CmisProperties" );
+            if ( xProps->hasPropertyByName( aCmisProps ) )
             {
-                Sequence< document::CmisPropertyValue> aCmisValues;
-                aContent.getPropertyValue( aCmisPropsValues ) >>= aCmisValues;
-                setCmisPropertiesValues( aCmisValues );
+                Sequence< document::CmisProperty> aCmisProperties;
+                aContent.getPropertyValue( aCmisProps ) >>= aCmisProperties;
+                setCmisProperties( aCmisProperties );
             }
         }
         catch (const ucb::ContentCreationException &)
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 2beec0f..1d67c97 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -1430,7 +1430,7 @@ void SfxBaseController::ShowInfoBars( )
         Reference< document::XCmisDocument > xCmisDoc( m_pData->m_pViewShell->GetObjectShell()->GetModel(), uno::UNO_QUERY );
         if ( xCmisDoc.is( ) && xCmisDoc->canCheckOut( ) )
         {
-            uno::Sequence< document::CmisPropertyValue> aCmisProperties = xCmisDoc->getCmisPropertiesValues( );
+            uno::Sequence< document::CmisProperty> aCmisProperties = xCmisDoc->getCmisProperties( );
 
             if ( xCmisDoc->isVersionable( ) && aCmisProperties.hasElements( ) )
             {
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index 2465ffb..d419d11 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -16,7 +16,7 @@
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <com/sun/star/beans/PropertyValues.hpp>
 #include <com/sun/star/beans/XPropertySetInfo.hpp>
-#include <com/sun/star/document/CmisPropertyValue.hpp>
+#include <com/sun/star/document/CmisProperty.hpp>
 #include <com/sun/star/io/XActiveDataSink.hpp>
 #include <com/sun/star/io/XActiveDataStreamer.hpp>
 #include <com/sun/star/lang/IllegalAccessException.hpp>
@@ -575,14 +575,14 @@ namespace cmis
                         xRow->appendVoid( rProp );
                     }
                 }
-                else if ( rProp.Name == "CmisPropertiesValues" )
+                else if ( rProp.Name == "CmisProperties" )
                 {
                     try
                     {
                         libcmis::ObjectPtr object = getObject( xEnv );
                         map< string, libcmis::PropertyPtr >& aProperties = object->getProperties( );
-                        uno::Sequence< document::CmisPropertyValue > aCmisProperties( aProperties.size( ) );
-                        document::CmisPropertyValue* pCmisProps = aCmisProperties.getArray( );
+                        uno::Sequence< document::CmisProperty > aCmisProperties( aProperties.size( ) );
+                        document::CmisProperty* pCmisProps = aCmisProperties.getArray( );
                         sal_Int32 i = 0;
                         for ( map< string, libcmis::PropertyPtr >::iterator it = aProperties.begin();
                                 it != aProperties.end( ); ++it, ++i )
@@ -1270,11 +1270,8 @@ namespace cmis
             beans::Property( OUString( "MediaType" ),
                 -1, getCppuType( static_cast< const OUString * >( 0 ) ),
                 beans::PropertyAttribute::BOUND ),
-            beans::Property( OUString( "CmisPropertiesValues" ),
-                -1, getCppuType( static_cast< const beans::PropertyValues * >( 0 ) ),
-                beans::PropertyAttribute::BOUND ),
-            beans::Property( OUString( "CmisPropertiesDisplayNames" ),
-                -1, getCppuType( static_cast< const beans::PropertyValues * >( 0 ) ),
+            beans::Property( OUString( "CmisProperties" ),
+                -1, getCppuType( static_cast< const uno::Sequence< document::CmisProperty> * >( 0 ) ),
                 beans::PropertyAttribute::BOUND ),
             beans::Property( OUString( "IsVersionable" ),
                 -1, getCppuBooleanType(),


More information about the Libreoffice-commits mailing list