LCOV - code coverage report
Current view: top level - libreoffice/ucb/source/ucp/tdoc - tdoc_contentcaps.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 89 0.0 %
Date: 2012-12-27 Functions: 0 11 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : 
      21             : /**************************************************************************
      22             :                                 TODO
      23             :  **************************************************************************
      24             : 
      25             :  **************************************************************************
      26             : 
      27             :     Props/Commands:
      28             : 
      29             :                         root  document folder  folder  stream  stream
      30             :                                                 (new)          (new)
      31             :     ----------------------------------------------------------------
      32             :     ContentType         r       r       r       r       r       r
      33             :     IsDocument          r       r       r       r       r       r
      34             :     IsFolder            r       r       r       r       r       r
      35             :     Title               r       r       w       w       w       w
      36             :     CreatableContentsInfo r     r       r       r       r       r
      37             :     Storage             -       -       r       r       -       -
      38             :     DocumentModel       -       r       -       -       -       -
      39             : 
      40             :     getCommandInfo      x       x       x       x       x       x
      41             :     getPropertySetInfo  x       x       x       x       x       x
      42             :     getPropertyValues   x       x       x       x       x       x
      43             :     setPropertyValues   x       x       x       x       x       x
      44             :     insert              -       -       x       x       x(*)    x(*)
      45             :     delete              -       -       x       -       x       -
      46             :     open                x       x       x       -       x       -
      47             :     transfer            -       x       x       -       -       -
      48             :     createNewContent    -       x       x       -       -       -
      49             : 
      50             : #ifdef NO_STREAM_CREATION_WITHIN_DOCUMENT_ROOT
      51             :  (*) not supported by streams that are direct children of document
      52             : #endif
      53             : 
      54             :  *************************************************************************/
      55             : 
      56             : #include <com/sun/star/beans/Property.hpp>
      57             : #include <com/sun/star/beans/PropertyAttribute.hpp>
      58             : #include <com/sun/star/beans/PropertyValue.hpp>
      59             : #include <com/sun/star/embed/XStorage.hpp>
      60             : #include <com/sun/star/frame/XModel.hpp>
      61             : #include <com/sun/star/ucb/CommandInfo.hpp>
      62             : #include <com/sun/star/ucb/OpenCommandArgument2.hpp>
      63             : #include <com/sun/star/ucb/TransferInfo.hpp>
      64             : #include <sal/macros.h>
      65             : #include <tdoc_content.hxx>
      66             : 
      67             : namespace com { namespace sun { namespace star { namespace embed {
      68             :     class XStorage;
      69             : } } } }
      70             : 
      71             : using namespace com::sun::star;
      72             : using namespace tdoc_ucp;
      73             : 
      74             : //=========================================================================
      75             : //
      76             : // Content implementation.
      77             : //
      78             : //=========================================================================
      79             : 
      80             : #define MAKEPROPSEQUENCE( a ) \
      81             :     uno::Sequence< beans::Property >( a, (sizeof (a) / sizeof (a[0])) )
      82             : 
      83             : #define MAKECMDSEQUENCE( a ) \
      84             :     uno::Sequence< ucb::CommandInfo >( a, (sizeof (a) / sizeof (a[0])) )
      85             : 
      86             : //=========================================================================
      87             : //
      88             : // IMPORTENT: If any property data ( name / type / ... ) are changed, then
      89             : //            Content::getPropertyValues(...) must be adapted too!
      90             : //
      91             : //=========================================================================
      92             : 
      93             : // virtual
      94           0 : uno::Sequence< beans::Property > Content::getProperties(
      95             :             const uno::Reference< ucb::XCommandEnvironment > & /*xEnv*/ )
      96             : {
      97           0 :     osl::Guard< osl::Mutex > aGuard( m_aMutex );
      98             : 
      99           0 :     if ( m_aProps.getType() == STREAM )
     100             :     {
     101             :         //=================================================================
     102             :         //
     103             :         // Stream: Supported properties
     104             :         //
     105             :         //=================================================================
     106             : 
     107             :         static const beans::Property aStreamPropertyInfoTable[] =
     108             :         {
     109             :             ///////////////////////////////////////////////////////////
     110             :             // Mandatory properties
     111             :             ///////////////////////////////////////////////////////////
     112             :             beans::Property(
     113             :                 rtl::OUString(
     114             :                     RTL_CONSTASCII_USTRINGPARAM( "ContentType" ) ),
     115             :                 -1,
     116           0 :                 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
     117             :                 beans::PropertyAttribute::BOUND
     118             :                     | beans::PropertyAttribute::READONLY
     119             :             ),
     120             :             beans::Property(
     121             :                 rtl::OUString(
     122             :                     RTL_CONSTASCII_USTRINGPARAM( "IsDocument" ) ),
     123             :                 -1,
     124           0 :                 getCppuBooleanType(),
     125             :                 beans::PropertyAttribute::BOUND
     126             :                     | beans::PropertyAttribute::READONLY
     127             :             ),
     128             :             beans::Property(
     129             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ),
     130             :                 -1,
     131           0 :                 getCppuBooleanType(),
     132             :                 beans::PropertyAttribute::BOUND
     133             :                     | beans::PropertyAttribute::READONLY
     134             :             ),
     135             :             beans::Property(
     136             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ),
     137             :                 -1,
     138           0 :                 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
     139             :                 beans::PropertyAttribute::BOUND
     140             :             ),
     141             :             ///////////////////////////////////////////////////////////
     142             :             // Optional standard properties
     143             :             ///////////////////////////////////////////////////////////
     144             :             beans::Property(
     145             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
     146             :                     "CreatableContentsInfo" ) ),
     147             :                 -1,
     148             :                 getCppuType( static_cast<
     149           0 :                     const uno::Sequence< ucb::ContentInfo > * >( 0 ) ),
     150             :                 beans::PropertyAttribute::BOUND
     151             :                     | beans::PropertyAttribute::READONLY
     152             :             )
     153             :             ///////////////////////////////////////////////////////////
     154             :             // New properties
     155             :             ///////////////////////////////////////////////////////////
     156           0 :         };
     157           0 :         return MAKEPROPSEQUENCE( aStreamPropertyInfoTable );
     158             :     }
     159           0 :     else if ( m_aProps.getType() == FOLDER )
     160             :     {
     161             :         //=================================================================
     162             :         //
     163             :         // Folder: Supported properties
     164             :         //
     165             :         //=================================================================
     166             : 
     167             :         static const beans::Property aFolderPropertyInfoTable[] =
     168             :         {
     169             :             ///////////////////////////////////////////////////////////
     170             :             // Mandatory properties
     171             :             ///////////////////////////////////////////////////////////
     172             :             beans::Property(
     173             :                 rtl::OUString(
     174             :                     RTL_CONSTASCII_USTRINGPARAM( "ContentType" ) ),
     175             :                 -1,
     176           0 :                 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
     177             :                 beans::PropertyAttribute::BOUND
     178             :                     | beans::PropertyAttribute::READONLY
     179             :             ),
     180             :             beans::Property(
     181             :                 rtl::OUString(
     182             :                     RTL_CONSTASCII_USTRINGPARAM( "IsDocument" ) ),
     183             :                 -1,
     184           0 :                 getCppuBooleanType(),
     185             :                 beans::PropertyAttribute::BOUND
     186             :                     | beans::PropertyAttribute::READONLY
     187             :             ),
     188             :             beans::Property(
     189             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ),
     190             :                 -1,
     191           0 :                 getCppuBooleanType(),
     192             :                 beans::PropertyAttribute::BOUND
     193             :                     | beans::PropertyAttribute::READONLY
     194             :             ),
     195             :             beans::Property(
     196             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ),
     197             :                 -1,
     198           0 :                 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
     199             :                 beans::PropertyAttribute::BOUND
     200             :             ),
     201             :             ///////////////////////////////////////////////////////////
     202             :             // Optional standard properties
     203             :             ///////////////////////////////////////////////////////////
     204             :             beans::Property(
     205             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
     206             :                     "CreatableContentsInfo" ) ),
     207             :                 -1,
     208             :                 getCppuType( static_cast<
     209           0 :                     const uno::Sequence< ucb::ContentInfo > * >( 0 ) ),
     210             :                 beans::PropertyAttribute::BOUND
     211             :                     | beans::PropertyAttribute::READONLY
     212             :             ),
     213             :             ///////////////////////////////////////////////////////////
     214             :             // New properties
     215             :             ///////////////////////////////////////////////////////////
     216             :             beans::Property(
     217             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Storage" ) ),
     218             :                 -1,
     219             :                 getCppuType( static_cast<
     220           0 :                     const uno::Reference< embed::XStorage > * >( 0 ) ),
     221             :                 beans::PropertyAttribute::BOUND
     222             :                     | beans::PropertyAttribute::READONLY
     223             :             )
     224           0 :         };
     225           0 :         return MAKEPROPSEQUENCE( aFolderPropertyInfoTable );
     226             :     }
     227           0 :     else if ( m_aProps.getType() == DOCUMENT )
     228             :     {
     229             :         //=================================================================
     230             :         //
     231             :         // Document: Supported properties
     232             :         //
     233             :         //=================================================================
     234             : 
     235             :         static const beans::Property aDocPropertyInfoTable[] =
     236             :         {
     237             :             ///////////////////////////////////////////////////////////
     238             :             // Mandatory properties
     239             :             ///////////////////////////////////////////////////////////
     240             :             beans::Property(
     241             :                 rtl::OUString(
     242             :                     RTL_CONSTASCII_USTRINGPARAM( "ContentType" ) ),
     243             :                 -1,
     244           0 :                 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
     245             :                 beans::PropertyAttribute::BOUND
     246             :                     | beans::PropertyAttribute::READONLY
     247             :             ),
     248             :             beans::Property(
     249             :                 rtl::OUString(
     250             :                     RTL_CONSTASCII_USTRINGPARAM( "IsDocument" ) ),
     251             :                 -1,
     252           0 :                 getCppuBooleanType(),
     253             :                 beans::PropertyAttribute::BOUND
     254             :                     | beans::PropertyAttribute::READONLY
     255             :             ),
     256             :             beans::Property(
     257             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ),
     258             :                 -1,
     259           0 :                 getCppuBooleanType(),
     260             :                 beans::PropertyAttribute::BOUND
     261             :                     | beans::PropertyAttribute::READONLY
     262             :             ),
     263             :             beans::Property(
     264             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ),
     265             :                 -1,
     266           0 :                 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
     267             :                 beans::PropertyAttribute::BOUND
     268             :                     | beans::PropertyAttribute::READONLY
     269             :             ),
     270             :             ///////////////////////////////////////////////////////////
     271             :             // Optional standard properties
     272             :             ///////////////////////////////////////////////////////////
     273             :             beans::Property(
     274             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
     275             :                     "CreatableContentsInfo" ) ),
     276             :                 -1,
     277             :                 getCppuType( static_cast<
     278           0 :                     const uno::Sequence< ucb::ContentInfo > * >( 0 ) ),
     279             :                 beans::PropertyAttribute::BOUND
     280             :                     | beans::PropertyAttribute::READONLY
     281             :             ),
     282             :             ///////////////////////////////////////////////////////////
     283             :             // New properties
     284             :             ///////////////////////////////////////////////////////////
     285             :             beans::Property(
     286             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DocumentModel" ) ),
     287             :                 -1,
     288             :                 getCppuType( static_cast<
     289           0 :                     const uno::Reference< frame::XModel > * >( 0 ) ),
     290             :                 beans::PropertyAttribute::BOUND
     291             :                     | beans::PropertyAttribute::READONLY
     292             :             )
     293           0 :         };
     294           0 :         return MAKEPROPSEQUENCE( aDocPropertyInfoTable );
     295             :     }
     296             :     else
     297             :     {
     298             :         //=================================================================
     299             :         //
     300             :         // Root: Supported properties
     301             :         //
     302             :         //=================================================================
     303             : 
     304             :         OSL_ENSURE( m_aProps.getType() == ROOT, "Wrong content type!" );
     305             : 
     306             :         static const beans::Property aRootPropertyInfoTable[] =
     307             :         {
     308             :             ///////////////////////////////////////////////////////////////
     309             :             // Mandatory properties
     310             :             ///////////////////////////////////////////////////////////////
     311             :             beans::Property(
     312             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ContentType" ) ),
     313             :                 -1,
     314           0 :                 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
     315             :                 beans::PropertyAttribute::BOUND
     316             :                     | beans::PropertyAttribute::READONLY
     317             :             ),
     318             :             beans::Property(
     319             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsDocument" ) ),
     320             :                 -1,
     321           0 :                 getCppuBooleanType(),
     322             :                 beans::PropertyAttribute::BOUND
     323             :                     | beans::PropertyAttribute::READONLY
     324             :             ),
     325             :             beans::Property(
     326             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ),
     327             :                 -1,
     328           0 :                 getCppuBooleanType(),
     329             :                 beans::PropertyAttribute::BOUND
     330             :                     | beans::PropertyAttribute::READONLY
     331             :             ),
     332             :             beans::Property(
     333             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ),
     334             :                 -1,
     335           0 :                 getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
     336             :                 beans::PropertyAttribute::BOUND
     337             :                     | beans::PropertyAttribute::READONLY
     338             :             ),
     339             :             ///////////////////////////////////////////////////////////////
     340             :             // Optional standard properties
     341             :             ///////////////////////////////////////////////////////////////
     342             :             beans::Property(
     343             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
     344             :                     "CreatableContentsInfo" ) ),
     345             :                 -1,
     346             :                 getCppuType( static_cast<
     347           0 :                     const uno::Sequence< ucb::ContentInfo > * >( 0 ) ),
     348             :                 beans::PropertyAttribute::BOUND
     349             :                     | beans::PropertyAttribute::READONLY
     350             :             )
     351             :             ///////////////////////////////////////////////////////////////
     352             :             // New properties
     353             :             ///////////////////////////////////////////////////////////////
     354           0 :         };
     355           0 :         return MAKEPROPSEQUENCE( aRootPropertyInfoTable );
     356           0 :     }
     357             : }
     358             : 
     359             : //=========================================================================
     360             : // virtual
     361           0 : uno::Sequence< ucb::CommandInfo > Content::getCommands(
     362             :             const uno::Reference< ucb::XCommandEnvironment > & /*xEnv*/ )
     363             : {
     364           0 :     osl::Guard< osl::Mutex > aGuard( m_aMutex );
     365             : 
     366           0 :     if ( m_aProps.getType() == STREAM )
     367             :     {
     368             : #ifdef NO_STREAM_CREATION_WITHIN_DOCUMENT_ROOT
     369           0 :         Uri aUri( m_xIdentifier->getContentIdentifier() );
     370           0 :         Uri aParentUri( aUri.getParentUri() );
     371             : 
     372           0 :         if ( aParentUri.isDocument() )
     373             :         {
     374             :             //=================================================================
     375             :             //
     376             :             // Stream, that is a child of a document: Supported commands
     377             :             //
     378             :             //=================================================================
     379             : 
     380             :             static const ucb::CommandInfo aStreamCommandInfoTable1[] =
     381             :             {
     382             :                 ///////////////////////////////////////////////////////////
     383             :                 // Mandatory commands
     384             :                 ///////////////////////////////////////////////////////////
     385             :                 ucb::CommandInfo(
     386             :                     rtl::OUString(
     387             :                         RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ),
     388             :                     -1,
     389           0 :                     getCppuVoidType()
     390             :                 ),
     391             :                 ucb::CommandInfo(
     392             :                     rtl::OUString(
     393             :                         RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ),
     394             :                     -1,
     395           0 :                     getCppuVoidType()
     396             :                 ),
     397             :                 ucb::CommandInfo(
     398             :                     rtl::OUString(
     399             :                         RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ),
     400             :                     -1,
     401             :                     getCppuType(
     402           0 :                         static_cast< uno::Sequence< beans::Property > * >( 0 ) )
     403             :                 ),
     404             :                 ucb::CommandInfo(
     405             :                     rtl::OUString(
     406             :                         RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ),
     407             :                     -1,
     408             :                     getCppuType(
     409             :                         static_cast<
     410           0 :                             uno::Sequence< beans::PropertyValue > * >( 0 ) )
     411             :                 ),
     412             :                 ///////////////////////////////////////////////////////////
     413             :                 // Optional standard commands
     414             :                 ///////////////////////////////////////////////////////////
     415             :                 ucb::CommandInfo(
     416             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "delete" ) ),
     417             :                     -1,
     418           0 :                     getCppuBooleanType()
     419             :                 ),
     420             :                 ucb::CommandInfo(
     421             :                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ),
     422             :                     -1,
     423             :                     getCppuType(
     424           0 :                         static_cast< ucb::OpenCommandArgument2 * >( 0 ) )
     425             :                 )
     426             :                 ///////////////////////////////////////////////////////////
     427             :                 // New commands
     428             :                 ///////////////////////////////////////////////////////////
     429           0 :             };
     430           0 :             return MAKECMDSEQUENCE( aStreamCommandInfoTable1 );
     431             :         }
     432             : #endif
     433             :         //=================================================================
     434             :         //
     435             :         // Stream: Supported commands
     436             :         //
     437             :         //=================================================================
     438             : 
     439             :         static const ucb::CommandInfo aStreamCommandInfoTable[] =
     440             :         {
     441             :             ///////////////////////////////////////////////////////////
     442             :             // Mandatory commands
     443             :             ///////////////////////////////////////////////////////////
     444             :             ucb::CommandInfo(
     445             :                 rtl::OUString(
     446             :                     RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ),
     447             :                 -1,
     448           0 :                 getCppuVoidType()
     449             :             ),
     450             :             ucb::CommandInfo(
     451             :                 rtl::OUString(
     452             :                     RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ),
     453             :                 -1,
     454           0 :                 getCppuVoidType()
     455             :             ),
     456             :             ucb::CommandInfo(
     457             :                 rtl::OUString(
     458             :                     RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ),
     459             :                 -1,
     460             :                 getCppuType(
     461           0 :                     static_cast< uno::Sequence< beans::Property > * >( 0 ) )
     462             :             ),
     463             :             ucb::CommandInfo(
     464             :                 rtl::OUString(
     465             :                     RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ),
     466             :                 -1,
     467             :                 getCppuType(
     468             :                     static_cast<
     469           0 :                         uno::Sequence< beans::PropertyValue > * >( 0 ) )
     470             :             ),
     471             :             ///////////////////////////////////////////////////////////
     472             :             // Optional standard commands
     473             :             ///////////////////////////////////////////////////////////
     474             :             ucb::CommandInfo(
     475             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "delete" ) ),
     476             :                 -1,
     477           0 :                 getCppuBooleanType()
     478             :             ),
     479             :             ucb::CommandInfo(
     480             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "insert" ) ),
     481             :                 -1,
     482           0 :                 getCppuVoidType()
     483             :             ),
     484             :             ucb::CommandInfo(
     485             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ),
     486             :                 -1,
     487             :                 getCppuType(
     488           0 :                     static_cast< ucb::OpenCommandArgument2 * >( 0 ) )
     489             :             )
     490             :             ///////////////////////////////////////////////////////////
     491             :             // New commands
     492             :             ///////////////////////////////////////////////////////////
     493           0 :         };
     494           0 :         return MAKECMDSEQUENCE( aStreamCommandInfoTable );
     495             :     }
     496           0 :     else if ( m_aProps.getType() == FOLDER )
     497             :     {
     498             :         //=================================================================
     499             :         //
     500             :         // Folder: Supported commands
     501             :         //
     502             :         //=================================================================
     503             : 
     504             :         static const ucb::CommandInfo aFolderCommandInfoTable[] =
     505             :         {
     506             :             ///////////////////////////////////////////////////////////
     507             :             // Mandatory commands
     508             :             ///////////////////////////////////////////////////////////
     509             :             ucb::CommandInfo(
     510             :                 rtl::OUString(
     511             :                     RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ),
     512             :                 -1,
     513           0 :                 getCppuVoidType()
     514             :             ),
     515             :             ucb::CommandInfo(
     516             :                 rtl::OUString(
     517             :                     RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ),
     518             :                 -1,
     519           0 :                 getCppuVoidType()
     520             :             ),
     521             :             ucb::CommandInfo(
     522             :                 rtl::OUString(
     523             :                     RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ),
     524             :                 -1,
     525             :                 getCppuType(
     526           0 :                     static_cast< uno::Sequence< beans::Property > * >( 0 ) )
     527             :             ),
     528             :             ucb::CommandInfo(
     529             :                 rtl::OUString(
     530             :                     RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ),
     531             :                 -1,
     532             :                 getCppuType(
     533             :                     static_cast<
     534           0 :                         uno::Sequence< beans::PropertyValue > * >( 0 ) )
     535             :             ),
     536             :             ///////////////////////////////////////////////////////////
     537             :             // Optional standard commands
     538             :             ///////////////////////////////////////////////////////////
     539             :             ucb::CommandInfo(
     540             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "delete" ) ),
     541             :                 -1,
     542           0 :                 getCppuBooleanType()
     543             :             ),
     544             :             ucb::CommandInfo(
     545             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "insert" ) ),
     546             :                 -1,
     547           0 :                 getCppuVoidType()
     548             :             ),
     549             :             ucb::CommandInfo(
     550             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ),
     551             :                 -1,
     552             :                 getCppuType(
     553           0 :                     static_cast< ucb::OpenCommandArgument2 * >( 0 ) )
     554             :             ),
     555             :             ucb::CommandInfo(
     556             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "transfer" ) ),
     557             :                 -1,
     558           0 :                 getCppuType( static_cast< ucb::TransferInfo * >( 0 ) )
     559             :             ),
     560             :             ucb::CommandInfo(
     561             :                 rtl::OUString(
     562             :                     RTL_CONSTASCII_USTRINGPARAM( "createNewContent" ) ),
     563             :                 -1,
     564           0 :                 getCppuType( static_cast< ucb::ContentInfo * >( 0 ) )
     565             :             )
     566             :             ///////////////////////////////////////////////////////////
     567             :             // New commands
     568             :             ///////////////////////////////////////////////////////////
     569           0 :         };
     570           0 :         return MAKECMDSEQUENCE( aFolderCommandInfoTable );
     571             :     }
     572           0 :     else if ( m_aProps.getType() == DOCUMENT )
     573             :     {
     574             :         //=================================================================
     575             :         //
     576             :         // Document: Supported commands
     577             :         //
     578             :         //=================================================================
     579             : 
     580             :         static const ucb::CommandInfo aDocCommandInfoTable[] =
     581             :         {
     582             :             ///////////////////////////////////////////////////////////
     583             :             // Mandatory commands
     584             :             ///////////////////////////////////////////////////////////
     585             :             ucb::CommandInfo(
     586             :                 rtl::OUString(
     587             :                     RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ),
     588             :                 -1,
     589           0 :                 getCppuVoidType()
     590             :             ),
     591             :             ucb::CommandInfo(
     592             :                 rtl::OUString(
     593             :                     RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ),
     594             :                 -1,
     595           0 :                 getCppuVoidType()
     596             :             ),
     597             :             ucb::CommandInfo(
     598             :                 rtl::OUString(
     599             :                     RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ),
     600             :                 -1,
     601             :                 getCppuType(
     602           0 :                     static_cast< uno::Sequence< beans::Property > * >( 0 ) )
     603             :             ),
     604             :             ucb::CommandInfo(
     605             :                 rtl::OUString(
     606             :                     RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ),
     607             :                 -1,
     608             :                 getCppuType(
     609             :                     static_cast<
     610           0 :                         uno::Sequence< beans::PropertyValue > * >( 0 ) )
     611             :             ),
     612             :             ///////////////////////////////////////////////////////////
     613             :             // Optional standard commands
     614             :             ///////////////////////////////////////////////////////////
     615             :             ucb::CommandInfo(
     616             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ),
     617             :                 -1,
     618             :                 getCppuType(
     619           0 :                     static_cast< ucb::OpenCommandArgument2 * >( 0 ) )
     620             :             ),
     621             :             ucb::CommandInfo(
     622             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "transfer" ) ),
     623             :                 -1,
     624           0 :                 getCppuType( static_cast< ucb::TransferInfo * >( 0 ) )
     625             :             ),
     626             :             ucb::CommandInfo(
     627             :                 rtl::OUString(
     628             :                     RTL_CONSTASCII_USTRINGPARAM( "createNewContent" ) ),
     629             :                 -1,
     630           0 :                 getCppuType( static_cast< ucb::ContentInfo * >( 0 ) )
     631             :             )
     632             :             ///////////////////////////////////////////////////////////
     633             :             // New commands
     634             :             ///////////////////////////////////////////////////////////
     635           0 :         };
     636           0 :         return MAKECMDSEQUENCE( aDocCommandInfoTable );
     637             :     }
     638             :     else
     639             :     {
     640             :         //=================================================================
     641             :         //
     642             :         // Root: Supported commands
     643             :         //
     644             :         //=================================================================
     645             : 
     646             :         OSL_ENSURE( m_aProps.getType() == ROOT, "Wrong content type!" );
     647             : 
     648             :         static const ucb::CommandInfo aRootCommandInfoTable[] =
     649             :         {
     650             :             ///////////////////////////////////////////////////////////
     651             :             // Mandatory commands
     652             :             ///////////////////////////////////////////////////////////
     653             :             ucb::CommandInfo(
     654             :                 rtl::OUString(
     655             :                     RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ),
     656             :                 -1,
     657           0 :                 getCppuVoidType()
     658             :             ),
     659             :             ucb::CommandInfo(
     660             :                 rtl::OUString(
     661             :                     RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ),
     662             :                 -1,
     663           0 :                 getCppuVoidType()
     664             :             ),
     665             :             ucb::CommandInfo(
     666             :                 rtl::OUString(
     667             :                     RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ),
     668             :                 -1,
     669             :                 getCppuType(
     670           0 :                     static_cast< uno::Sequence< beans::Property > * >( 0 ) )
     671             :             ),
     672             :             ucb::CommandInfo(
     673             :                 rtl::OUString(
     674             :                     RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ),
     675             :                 -1,
     676             :                 getCppuType(
     677             :                     static_cast<
     678           0 :                         uno::Sequence< beans::PropertyValue > * >( 0 ) )
     679             :             ),
     680             :             ///////////////////////////////////////////////////////////
     681             :             // Optional standard commands
     682             :             ///////////////////////////////////////////////////////////
     683             :             ucb::CommandInfo(
     684             :                 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ),
     685             :                 -1,
     686             :                 getCppuType(
     687           0 :                     static_cast< ucb::OpenCommandArgument2 * >( 0 ) )
     688             :             )
     689             :             ///////////////////////////////////////////////////////////
     690             :             // New commands
     691             :             ///////////////////////////////////////////////////////////
     692           0 :         };
     693           0 :         return MAKECMDSEQUENCE( aRootCommandInfoTable );
     694           0 :     }
     695             : }
     696             : 
     697             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10