summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCao Cuong Ngo <cao.cuong.ngo@gmail.com>2013-06-18 14:00:48 +0200
committerCao Cuong Ngo <cao.cuong.ngo@gmail.com>2013-06-18 14:42:38 +0200
commitc84defbbcc8d88fa85232075fb3243ac9fff253f (patch)
tree11c1a615f95638eecd64f8cccdfc7469294b724d
parentfcb72e2e0dfb9e2f19c5d2ca5c2b8e2d1c655b98 (diff)
CMIS properties dialog
Rename CmisPropertyValues to CmisProperty Change-Id: I7360e6b55406c1abe381c8d915be41d972498167
-rw-r--r--include/sfx2/dinfdlg.hxx8
-rw-r--r--include/sfx2/sfxbasemodel.hxx10
-rw-r--r--offapi/UnoApi_offapi.mk2
-rw-r--r--offapi/com/sun/star/document/CmisProperty.idl (renamed from offapi/com/sun/star/document/CmisPropertyValue.idl)8
-rw-r--r--offapi/com/sun/star/document/XCmisDocument.idl4
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx10
-rw-r--r--sfx2/source/doc/objserv.cxx6
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx24
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx2
-rw-r--r--ucb/source/ucp/cmis/cmis_content.cxx15
10 files changed, 42 insertions, 47 deletions
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 9edaf7d92515..949cbd21f536 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 37abb06acbc9..10115b6d3631 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 ae31d366283a..4f75eaea80af 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
index f60bb6d68899..f6009a0f3685 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 66e478a77651..51bcf508649f 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 07f5cfbc5199..1e85aadffc70 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 1647a89eaa10..acb008fe598d 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 794f32e81be4..4f0f7a35a58f 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 2beec0f03634..1d67c978d91e 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 2465ffb442a5..d419d11ba2bf 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(),