diff options
Diffstat (limited to 'ucb/source/ucp/package/pkgcontentcaps.cxx')
-rw-r--r-- | ucb/source/ucp/package/pkgcontentcaps.cxx | 65 |
1 files changed, 53 insertions, 12 deletions
diff --git a/ucb/source/ucp/package/pkgcontentcaps.cxx b/ucb/source/ucp/package/pkgcontentcaps.cxx index 0538d93f8702..b2ae1951fb37 100644 --- a/ucb/source/ucp/package/pkgcontentcaps.cxx +++ b/ucb/source/ucp/package/pkgcontentcaps.cxx @@ -45,6 +45,7 @@ MediaType (w) (w) w Title r w w Size - - r + CreatableContentsInfo r r r Compressed - - w Encrypted - - w HasEncryptedEntries r - - @@ -58,6 +59,7 @@ open x x x transfer x x - flush x x - + createNewContent x x - *************************************************************************/ #include <com/sun/star/beans/Property.hpp> @@ -78,6 +80,12 @@ using namespace package_ucp; // //========================================================================= +#define MAKEPROPSEQUENCE( a ) \ + uno::Sequence< beans::Property >( a, sizeof( a ) / sizeof( a[ 0 ] ) ) + +#define MAKECMDSEQUENCE( a ) \ + uno::Sequence< ucb::CommandInfo >( a, sizeof( a ) / sizeof( a[ 0 ] ) ) + //========================================================================= // // IMPORTENT: If any property data ( name / type / ... ) are changed, then @@ -145,6 +153,15 @@ uno::Sequence< beans::Property > Content::getProperties( getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ), + beans::Property( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( + "CreatableContentsInfo" ) ), + -1, + getCppuType( static_cast< + const uno::Sequence< ucb::ContentInfo > * >( 0 ) ), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::READONLY + ), /////////////////////////////////////////////////////////////// // New properties /////////////////////////////////////////////////////////////// @@ -157,8 +174,7 @@ uno::Sequence< beans::Property > Content::getProperties( | beans::PropertyAttribute::READONLY ) }; - return uno::Sequence< beans::Property >( - aRootFolderPropertyInfoTable, 6 ); + return MAKEPROPSEQUENCE( aRootFolderPropertyInfoTable ); } else { @@ -210,13 +226,21 @@ uno::Sequence< beans::Property > Content::getProperties( -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND + ), + beans::Property( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( + "CreatableContentsInfo" ) ), + -1, + getCppuType( static_cast< + const uno::Sequence< ucb::ContentInfo > * >( 0 ) ), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::READONLY ) /////////////////////////////////////////////////////////////// // New properties /////////////////////////////////////////////////////////////// }; - return uno::Sequence< beans::Property >( - aFolderPropertyInfoTable, 5 ); + return MAKEPROPSEQUENCE( aFolderPropertyInfoTable ); } } else @@ -275,6 +299,15 @@ uno::Sequence< beans::Property > Content::getProperties( beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), + beans::Property( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( + "CreatableContentsInfo" ) ), + -1, + getCppuType( static_cast< + const uno::Sequence< ucb::ContentInfo > * >( 0 ) ), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::READONLY + ), /////////////////////////////////////////////////////////////// // New properties /////////////////////////////////////////////////////////////// @@ -291,7 +324,7 @@ uno::Sequence< beans::Property > Content::getProperties( beans::PropertyAttribute::BOUND ) }; - return uno::Sequence< beans::Property >( aStreamPropertyInfoTable, 8 ); + return MAKEPROPSEQUENCE( aStreamPropertyInfoTable ); } } @@ -360,6 +393,12 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( getCppuType( static_cast< ucb::TransferInfo * >( 0 ) ) ), + ucb::CommandInfo( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( "createNewContent" ) ), + -1, + getCppuType( static_cast< ucb::ContentInfo * >( 0 ) ) + ), /////////////////////////////////////////////////////////// // New commands /////////////////////////////////////////////////////////// @@ -370,8 +409,7 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( ) }; - return uno::Sequence< - ucb::CommandInfo >( aRootFolderCommandInfoTable, 7 ); + return MAKECMDSEQUENCE( aRootFolderCommandInfoTable ); } else { @@ -439,6 +477,12 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( getCppuType( static_cast< ucb::TransferInfo * >( 0 ) ) ), + ucb::CommandInfo( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( "createNewContent" ) ), + -1, + getCppuType( static_cast< ucb::ContentInfo * >( 0 ) ) + ), /////////////////////////////////////////////////////////// // New commands /////////////////////////////////////////////////////////// @@ -449,8 +493,7 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( ) }; - return uno::Sequence< - ucb::CommandInfo >( aFolderCommandInfoTable, 9 ); + return MAKECMDSEQUENCE( aFolderCommandInfoTable ); } } else @@ -517,8 +560,6 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( /////////////////////////////////////////////////////////////// }; - return uno::Sequence< ucb::CommandInfo >( - aStreamCommandInfoTable, 7 ); + return MAKECMDSEQUENCE( aStreamCommandInfoTable ); } } - |