38#include <osl/diagnose.h>
40#include <rtl/ustring.hxx>
41#include <com/sun/star/beans/IllegalTypeException.hpp>
42#include <com/sun/star/beans/PropertyAttribute.hpp>
43#include <com/sun/star/beans/PropertyExistException.hpp>
44#include <com/sun/star/beans/PropertyState.hpp>
45#include <com/sun/star/lang/IllegalAccessException.hpp>
46#include <com/sun/star/ucb/ContentInfoAttribute.hpp>
47#include <com/sun/star/ucb/IllegalIdentifierException.hpp>
48#include <com/sun/star/ucb/InsertCommandArgument.hpp>
49#include <com/sun/star/ucb/InteractiveBadTransferURLException.hpp>
50#include <com/sun/star/ucb/MissingPropertiesException.hpp>
51#include <com/sun/star/ucb/NameClash.hpp>
52#include <com/sun/star/ucb/NameClashException.hpp>
53#include <com/sun/star/ucb/OpenCommandArgument2.hpp>
54#include <com/sun/star/ucb/TransferInfo.hpp>
55#include <com/sun/star/ucb/UnsupportedCommandException.hpp>
56#include <com/sun/star/ucb/UnsupportedNameClashException.hpp>
57#include <com/sun/star/ucb/XCommandInfo.hpp>
58#include <com/sun/star/ucb/XPersistentPropertySet.hpp>
59#include <com/sun/star/uno/Any.hxx>
60#include <com/sun/star/uno/Sequence.hxx>
74#include "../inc/urihelper.hxx"
85 const uno::Reference< uno::XComponentContext >& rxContext,
87 const uno::Reference< ucb::XContentIdentifier >& Identifier )
91 if ( !
loadData( rxContext, pProvider, Identifier, aProps ) )
94 return new HierarchyContent( rxContext, pProvider, Identifier, std::move(aProps) );
100 const uno::Reference< uno::XComponentContext >& rxContext,
102 const uno::Reference< ucb::XContentIdentifier >& Identifier,
103 const ucb::ContentInfo& Info )
105 if (
Info.Type.isEmpty() )
116 const uno::Reference< uno::XComponentContext >& rxContext,
118 const uno::Reference< ucb::XContentIdentifier >& Identifier,
120: ContentImplHelper( rxContext, pProvider,
Identifier ),
122 m_eState( PERSISTENT ),
123 m_pProvider( pProvider ),
124 m_bCheckedReadOnly( false ),
125 m_bIsReadOnly( true )
127 setKind( Identifier );
131HierarchyContent::HierarchyContent(
132 const uno::Reference< uno::XComponentContext >& rxContext,
134 const uno::Reference< ucb::XContentIdentifier >& Identifier,
135 const ucb::ContentInfo& Info )
136 : ContentImplHelper( rxContext, pProvider,
Identifier ),
139 m_pProvider( pProvider ),
140 m_bCheckedReadOnly( false ),
141 m_bIsReadOnly( true )
143 setKind( Identifier );
148HierarchyContent::~HierarchyContent()
160 ContentImplHelper::acquire();
168 ContentImplHelper::release();
175 uno::Any aRet = ContentImplHelper::queryInterface( rType );
182 rType,
static_cast< ucb::XContentCreator *
>(
this ) );
246 return "com.sun.star.comp.ucb.HierarchyContent";
251uno::Sequence< OUString > SAL_CALL
254 uno::Sequence< OUString > aSNS( 1 );
257 aSNS.getArray()[ 0 ] =
"com.sun.star.ucb.HierarchyLinkContent";
259 aSNS.getArray()[ 0 ] =
"com.sun.star.ucb.HierarchyFolderContent";
261 aSNS.getArray()[ 0 ] =
"com.sun.star.ucb.HierarchyRootFolderContent";
278uno::Reference< ucb::XContentIdentifier > SAL_CALL
285 return uno::Reference< ucb::XContentIdentifier >();
288 return ContentImplHelper::getIdentifier();
297 const ucb::Command& aCommand,
299 const uno::Reference< ucb::XCommandEnvironment >& Environment )
303 if (
aCommand.Name ==
"getPropertyValues" )
313 uno::Any( lang::IllegalArgumentException(
314 "Wrong argument type!",
323 else if (
aCommand.Name ==
"setPropertyValues" )
333 uno::Any( lang::IllegalArgumentException(
334 "Wrong argument type!",
344 uno::Any( lang::IllegalArgumentException(
354 else if (
aCommand.Name ==
"getPropertySetInfo" )
362 else if (
aCommand.Name ==
"getCommandInfo" )
376 ucb::OpenCommandArgument2 aOpenCommand;
377 if ( !(
aCommand.Argument >>= aOpenCommand ) )
380 uno::Any( lang::IllegalArgumentException(
381 "Wrong argument type!",
388 uno::Reference< ucb::XDynamicResultSet > xSet
399 ucb::InsertCommandArgument aArg;
400 if ( !(
aCommand.Argument >>= aArg ) )
403 uno::Any( lang::IllegalArgumentException(
404 "Wrong argument type!",
411 sal_Int32 nNameClash = aArg.ReplaceExisting
412 ? ucb::NameClash::OVERWRITE
413 : ucb::NameClash::ERROR;
423 bool bDeletePhysical =
false;
424 aCommand.Argument >>= bDeletePhysical;
435 ucb::IOErrorCode_CANT_WRITE,
438 "Cannot remove persistent data!",
453 ucb::TransferInfo aInfo;
454 if ( !(
aCommand.Argument >>= aInfo ) )
456 OSL_FAIL(
"Wrong argument type!" );
458 uno::Any( lang::IllegalArgumentException(
459 "Wrong argument type!",
475 ucb::ContentInfo aInfo;
476 if ( !(
aCommand.Argument >>= aInfo ) )
478 OSL_FAIL(
"Wrong argument type!" );
480 uno::Any( lang::IllegalArgumentException(
481 "Wrong argument type!",
497 uno::Any( ucb::UnsupportedCommandException(
519uno::Sequence< ucb::ContentInfo > SAL_CALL
527uno::Reference< ucb::XContent > SAL_CALL
532 osl::Guard< osl::Mutex > aGuard(
m_aMutex );
534 if (
Info.Type.isEmpty() )
535 return uno::Reference< ucb::XContent >();
540 return uno::Reference< ucb::XContent >();
544 OSL_ENSURE( !
aURL.isEmpty(),
545 "HierarchyContent::createNewContent - empty identifier!" );
547 if ( (
aURL.lastIndexOf(
'/' ) + 1 ) !=
aURL.getLength() )
551 aURL +=
"New_Folder";
555 uno::Reference< ucb::XContentIdentifier > xId
556 = new ::ucbhelper::ContentIdentifier(
aURL );
562 OSL_FAIL(
"createNewContent called on non-folder object!" );
563 return uno::Reference< ucb::XContent >();
578 const uno::Reference< uno::XComponentContext >& rxContext,
580 const uno::Reference< ucb::XContentIdentifier >& Identifier )
586 if ( aUri.isRootFolder() )
599 const uno::Reference< uno::XComponentContext >& rxContext,
601 const uno::Reference< ucb::XContentIdentifier >& Identifier,
634 const uno::Reference< ucb::XContentIdentifier >& xOldId,
635 const uno::Reference< ucb::XContentIdentifier >& xNewId )
639 aEntry.
move( xNewId->getContentIdentifier(),
653 const uno::Reference< ucb::XContentIdentifier >& Identifier )
673 osl::Guard< osl::Mutex > aGuard(
m_aMutex );
680 uno::Reference< lang::XMultiServiceFactory > xConfigProv
682 if ( xConfigProv.is() )
684 uno::Sequence< OUString > aNames
685 = xConfigProv->getAvailableServiceNames();
695uno::Reference< ucb::XContentIdentifier >
698 osl::Guard< osl::Mutex > aGuard(
m_aMutex );
705 return uno::Reference< ucb::XContentIdentifier >(
706 new ::ucbhelper::ContentIdentifier( aNewURL ) );
720 m_xProvider->queryExistingContents( aAllContents );
723 sal_Int32 nURLPos =
aURL.lastIndexOf(
'/' );
725 if ( nURLPos != (
aURL.getLength() - 1 ) )
731 sal_Int32 nLen =
aURL.getLength();
733 for (
const auto& rContent : aAllContents )
737 = xChild->getIdentifier()->getContentIdentifier();
740 if ( ( aChildURL.getLength() > nLen ) &&
741 ( aChildURL.startsWith(
aURL ) ) )
743 sal_Int32
nPos = aChildURL.indexOf(
'/', nLen );
745 if ( (
nPos == -1 ) ||
746 (
nPos == ( aChildURL.getLength() - 1 ) ) )
749 rChildren.emplace_back(
758 const uno::Reference< ucb::XContentIdentifier >& xNewId )
763 osl::ClearableGuard< osl::Mutex > aGuard(
m_aMutex );
765 uno::Reference< ucb::XContent > xThis =
this;
770 OSL_FAIL(
"HierarchyContent::exchangeIdentity - Not persistent!" );
777 OSL_FAIL(
"HierarchyContent::exchangeIdentity - "
778 "Not supported by root folder!" );
799 for (
const auto& rChild : aChildren )
804 uno::Reference< ucb::XContentIdentifier > xOldChildId
805 = xChild->getIdentifier();
806 OUString aOldChildURL
807 = xOldChildId->getContentIdentifier();
808 OUString aNewChildURL
809 = aOldChildURL.replaceAt(
812 xNewId->getContentIdentifier() );
813 uno::Reference< ucb::XContentIdentifier > xNewChildId
814 = new ::ucbhelper::ContentIdentifier( aNewChildURL );
816 if ( !xChild->exchangeIdentity( xNewChildId ) )
824 OSL_FAIL(
"HierarchyContent::exchangeIdentity - "
825 "Panic! Cannot exchange identity!" );
832 const uno::Reference< uno::XComponentContext >& rxContext,
833 const uno::Sequence< beans::Property >& rProperties,
836 const OUString& rContentId )
841 = new ::ucbhelper::PropertyValueSet( rxContext );
843 if ( rProperties.hasElements() )
845 uno::Reference< beans::XPropertySet > xAdditionalPropSet;
846 bool bTriedToGetAdditionalPropSet =
false;
848 for (
const beans::Property& rProp : rProperties )
852 if ( rProp.Name ==
"ContentType" )
856 else if ( rProp.Name ==
"Title" )
858 xRow->appendString ( rProp, rData.
getTitle() );
860 else if ( rProp.Name ==
"IsDocument" )
864 else if ( rProp.Name ==
"IsFolder" )
868 else if ( rProp.Name ==
"CreatableContentsInfo" )
873 else if ( rProp.Name ==
"TargetURL" )
880 xRow->appendVoid( rProp );
886 if ( !bTriedToGetAdditionalPropSet && !xAdditionalPropSet.is() )
889 pProvider->getAdditionalPropertySet( rContentId,
891 bTriedToGetAdditionalPropSet =
true;
894 if ( xAdditionalPropSet.is() )
896 if ( !xRow->appendPropertySetValue(
901 xRow->appendVoid( rProp );
907 xRow->appendVoid( rProp );
916 beans::Property(
"ContentType",
919 beans::PropertyAttribute::BOUND
920 | beans::PropertyAttribute::READONLY ),
923 beans::Property(
"Title",
927 beans::PropertyAttribute::BOUND ),
930 beans::Property(
"IsDocument",
933 beans::PropertyAttribute::BOUND
934 | beans::PropertyAttribute::READONLY ),
937 beans::Property(
"IsFolder",
940 beans::PropertyAttribute::BOUND
941 | beans::PropertyAttribute::READONLY ),
946 beans::Property(
"TargetURL",
950 beans::PropertyAttribute::BOUND ),
954 "CreatableContentsInfo",
957 beans::PropertyAttribute::BOUND
958 | beans::PropertyAttribute::READONLY ),
963 uno::Reference< beans::XPropertySet > xSet =
964 pProvider->getAdditionalPropertySet( rContentId,
false );
965 xRow->appendPropertySet( xSet );
973 const uno::Sequence< beans::Property >& rProperties )
975 osl::Guard< osl::Mutex > aGuard(
m_aMutex );
985 const uno::Sequence< beans::PropertyValue >& rValues,
986 const uno::Reference< ucb::XCommandEnvironment > & xEnv )
988 osl::ResettableGuard< osl::Mutex > aGuard(
m_aMutex );
990 uno::Sequence< uno::Any > aRet( rValues.getLength() );
991 auto aRetRange = asNonConstRange(aRet);
992 uno::Sequence< beans::PropertyChangeEvent > aChanges( rValues.getLength() );
993 sal_Int32 nChanged = 0;
995 beans::PropertyChangeEvent
aEvent;
996 aEvent.Source = getXWeak();
999 aEvent.PropertyHandle = -1;
1003 const beans::PropertyValue*
pValues = rValues.getConstArray();
1004 sal_Int32
nCount = rValues.getLength();
1006 uno::Reference< ucb::XPersistentPropertySet > xAdditionalPropSet;
1007 bool bTriedToGetAdditionalPropSet =
false;
1009 bool bExchange =
false;
1012 sal_Int32 nTitlePos = -1;
1014 for ( sal_Int32
n = 0;
n <
nCount; ++
n )
1016 const beans::PropertyValue& rValue =
pValues[
n ];
1018 if ( rValue.Name ==
"ContentType" )
1021 aRetRange[
n ] <<= lang::IllegalAccessException(
1022 "Property is read-only!",
1025 else if ( rValue.Name ==
"IsDocument" )
1028 aRetRange[
n ] <<= lang::IllegalAccessException(
1029 "Property is read-only!",
1032 else if ( rValue.Name ==
"IsFolder" )
1035 aRetRange[
n ] <<= lang::IllegalAccessException(
1036 "Property is read-only!",
1039 else if ( rValue.Name ==
"CreatableContentsInfo" )
1042 aRetRange[
n ] <<= lang::IllegalAccessException(
1043 "Property is read-only!",
1046 else if ( rValue.Name ==
"Title" )
1050 aRetRange[
n ] <<= lang::IllegalAccessException(
1051 "Property is read-only!",
1057 if ( rValue.Value >>= aNewValue )
1060 if ( !aNewValue.isEmpty() )
1085 aRetRange[
n ] <<= lang::IllegalArgumentException(
1086 "Empty title not allowed!",
1093 aRetRange[
n ] <<= beans::IllegalTypeException(
1094 "Property value has wrong type!",
1099 else if ( rValue.Name ==
"TargetURL" )
1103 aRetRange[
n ] <<= lang::IllegalAccessException(
1104 "Property is read-only!",
1114 if ( rValue.Value >>= aNewValue )
1117 if ( !aNewValue.isEmpty() )
1121 aEvent.PropertyName = rValue.Name;
1123 aEvent.NewValue <<= aNewValue;
1125 aChanges.getArray()[ nChanged ] =
aEvent;
1133 aRetRange[
n ] <<= lang::IllegalArgumentException(
1134 "Empty target URL not allowed!",
1141 aRetRange[
n ] <<= beans::IllegalTypeException(
1142 "Property value has wrong type!",
1148 aRetRange[
n ] <<= beans::UnknownPropertyException(
1149 "TargetURL only supported by links!",
1158 if ( !bTriedToGetAdditionalPropSet && !xAdditionalPropSet.is() )
1161 bTriedToGetAdditionalPropSet =
true;
1164 if ( xAdditionalPropSet.is() )
1168 uno::Any aOldValue = xAdditionalPropSet->getPropertyValue(
1170 if ( aOldValue != rValue.
Value )
1172 xAdditionalPropSet->setPropertyValue(
1173 rValue.Name, rValue.Value );
1175 aEvent.PropertyName = rValue.Name;
1176 aEvent.OldValue = aOldValue;
1177 aEvent.NewValue = rValue.Value;
1179 aChanges.getArray()[ nChanged ] =
aEvent;
1183 catch ( beans::UnknownPropertyException
const & e )
1185 aRetRange[
n ] <<= e;
1187 catch ( lang::WrappedTargetException
const & e )
1189 aRetRange[
n ] <<= e;
1191 catch ( beans::PropertyVetoException
const & e )
1193 aRetRange[
n ] <<= e;
1195 catch ( lang::IllegalArgumentException
const & e )
1197 aRetRange[
n ] <<= e;
1202 aRetRange[
n ] <<= uno::Exception(
1203 "No property set for storing the value!",
1211 uno::Reference< ucb::XContentIdentifier > xOldId
1213 uno::Reference< ucb::XContentIdentifier > xNewId
1224 xNewId->getContentIdentifier() );
1236 aRetRange[ nTitlePos ] <<= uno::Exception(
1243 if ( !aOldTitle.isEmpty() )
1245 aEvent.PropertyName =
"Title";
1246 aEvent.OldValue <<= aOldTitle;
1249 aChanges.getArray()[ nChanged ] =
aEvent;
1265 ucb::IOErrorCode_CANT_WRITE,
1268 "Cannot store persistent data!",
1274 aChanges.realloc( nChanged );
1285 const uno::Reference<
1286 ucb::XCommandEnvironment > & xEnv )
1288 osl::ClearableGuard< osl::Mutex > aGuard(
m_aMutex );
1294 uno::Any( ucb::UnsupportedCommandException(
1295 "Not supported by root folder!",
1304 uno::Sequence<OUString> aProps {
"Title" };
1306 uno::Any( ucb::MissingPropertiesException(
1316 uno::Reference< ucb::XContentIdentifier > xId
1321 switch ( nNameClashResolve )
1324 case ucb::NameClash::ERROR:
1329 ucb::NameClashException(
1332 task::InteractionClassification_ERROR,
1340 case ucb::NameClash::OVERWRITE:
1344 case ucb::NameClash::RENAME:
1351 OUString aNewId = xId->getContentIdentifier() +
"_" + OUString::number( ++nTry );
1352 xId = new ::ucbhelper::ContentIdentifier( aNewId );
1354 while (
hasData( xId ) && ( nTry < 1000 ) );
1360 ucb::UnsupportedNameClashException(
1361 "Unable to resolve name clash!",
1363 nNameClashResolve ) ),
1369 OUString aNewTitle(
m_aProps.
getTitle() +
"_" + OUString::number( nTry ) );
1375 case ucb::NameClash::KEEP:
1376 case ucb::NameClash::ASK:
1382 ucb::UnsupportedNameClashException(
1385 nNameClashResolve ) ),
1393 bool bNewId = ( xId->getContentIdentifier()
1404 ucb::IOErrorCode_CANT_WRITE,
1407 "Cannot store persistent data!",
1423 const uno::Reference<
1424 ucb::XCommandEnvironment > & xEnv )
1428 osl::ClearableGuard< osl::Mutex > aGuard(
m_aMutex );
1430 uno::Reference< ucb::XContent > xThis =
this;
1436 uno::Any( ucb::UnsupportedCommandException(
1447 uno::Any( ucb::UnsupportedCommandException(
1448 "Not supported by root folder!",
1466 for (
auto & child : aChildren)
1468 child->destroy( bDeletePhysical, xEnv );
1475 const ucb::TransferInfo& rInfo,
1476 const uno::Reference< ucb::XCommandEnvironment > & xEnv )
1478 osl::ClearableGuard< osl::Mutex > aGuard(
m_aMutex );
1484 uno::Any( ucb::UnsupportedCommandException(
1495 uno::Any( ucb::InteractiveBadTransferURLException(
1504 sal_Int32
nPos = aId.lastIndexOf(
'/' );
1505 if (
nPos != ( aId.getLength() - 1 ) )
1511 if ( rInfo.SourceURL.getLength() <= aId.getLength() )
1513 if ( aId.startsWith( rInfo.SourceURL ) )
1520 ucb::IOErrorCode_RECURSIVE,
1523 "Target is equal to or is a child of source!",
1533 uno::Reference< ucb::XContentIdentifier > xId
1534 = new ::ucbhelper::ContentIdentifier( rInfo.SourceURL );
1545 catch ( ucb::IllegalIdentifierException
const & )
1550 if ( !xSource.is() )
1554 {
"Uri",
uno::Any(xId->getContentIdentifier())}
1557 ucb::IOErrorCode_CANT_READ,
1560 "Cannot instantiate source object!",
1569 OUString aType = xSource->isFolder()
1572 ucb::ContentInfo aContentInfo;
1573 aContentInfo.Type = aType;
1574 aContentInfo.Attributes = 0;
1588 ucb::IOErrorCode_CANT_CREATE,
1591 "XContentCreator::createNewContent failed!",
1600 uno::Sequence< beans::Property > aSourceProps
1601 = xSource->getPropertySetInfo( xEnv )->getProperties();
1602 sal_Int32
nCount = aSourceProps.getLength();
1606 bool bHadTitle = rInfo.NewTitle.isEmpty();
1609 uno::Reference< sdbc::XRow > xRow
1610 = xSource->getPropertyValues( aSourceProps );
1612 uno::Sequence< beans::PropertyValue > aValues(
nCount );
1613 beans::PropertyValue*
pValues = aValues.getArray();
1615 const beans::Property* pProps = aSourceProps.getConstArray();
1616 for ( sal_Int32
n = 0;
n <
nCount; ++
n )
1618 const beans::Property& rProp = pProps[
n ];
1619 beans::PropertyValue& rValue =
pValues[
n ];
1621 rValue.Name = rProp.Name;
1622 rValue.Handle = rProp.Handle;
1624 if ( !bHadTitle && rProp.Name ==
"Title" )
1628 rValue.Value <<= rInfo.NewTitle;
1631 rValue.Value = xRow->getObject(
1633 uno::Reference< container::XNameAccess >() );
1635 rValue.State = beans::PropertyState_DIRECT_VALUE;
1637 if ( rProp.Attributes & beans::PropertyAttribute::REMOVABLE )
1642 xTarget->addProperty( rProp.Name,
1646 catch ( beans::PropertyExistException
const & )
1649 catch ( beans::IllegalTypeException
const & )
1652 catch ( lang::IllegalArgumentException
const & )
1659 xTarget->setPropertyValues( aValues, xEnv );
1666 xTarget->insert( rInfo.NameClash, xEnv );
1672 if ( xSource->isFolder() )
1678 while ( aFolder.
next( it ) )
1682 OUString aChildId = xId->getContentIdentifier();
1683 if ( ( aChildId.lastIndexOf(
'/' ) + 1 ) != aChildId.getLength() )
1686 aChildId += rResult.
getName();
1688 ucb::TransferInfo aInfo;
1689 aInfo.MoveData =
false;
1690 aInfo.NewTitle.clear();
1691 aInfo.SourceURL = aChildId;
1692 aInfo.NameClash = rInfo.NameClash;
1695 xTarget->transfer( aInfo, xEnv );
1703 if ( !rInfo.MoveData )
1706 xSource->destroy(
true, xEnv );
1709 if ( !xSource->removeData() )
1713 {
"Uri",
uno::Any(xSource->m_xIdentifier->getContentIdentifier())}
1716 ucb::IOErrorCode_CANT_WRITE,
1719 "Cannot remove persistent data of source object!",
1725 xSource->removeAdditionalPropertySet();
1732uno::Sequence< ucb::ContentInfo >
1737 uno::Sequence< ucb::ContentInfo >
aSeq( 2 );
1741 aSeq.getArray()[ 0 ].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER;
1743 uno::Sequence< beans::Property > aFolderProps( 1 );
1744 aFolderProps.getArray()[ 0 ] = beans::Property(
1748 beans::PropertyAttribute::BOUND );
1749 aSeq.getArray()[ 0 ].Properties = aFolderProps;
1753 aSeq.getArray()[ 1 ].Attributes = ucb::ContentInfoAttribute::KIND_LINK;
1755 uno::Sequence< beans::Property > aLinkProps( 2 );
1756 aLinkProps.getArray()[ 0 ] = beans::Property(
1760 beans::PropertyAttribute::BOUND );
1761 aLinkProps.getArray()[ 1 ] = beans::Property(
1765 beans::PropertyAttribute::BOUND );
1766 aSeq.getArray()[ 1 ].Properties = aLinkProps;
1772 return uno::Sequence< ucb::ContentInfo >( 0 );
const PropertyValue * pValues
PropertiesInfo aProperties
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes()
void setName(const OUString &rName)
css::uno::Sequence< css::ucb::ContentInfo > getCreatableContentsInfo() const
const OUString & getContentType() const
const HierarchyEntryData & getHierarchyEntryData() const
const OUString & getName() const
const OUString & getTitle() const
void setTargetURL(const OUString &rURL)
const OUString & getTargetURL() const
void setTitle(const OUString &rTitle)
bool getIsDocument() const
css::uno::Reference< css::lang::XMultiServiceFactory > getConfigProvider(const OUString &rServiceSpecifier)
css::uno::Sequence< css::uno::Any > setPropertyValues(const css::uno::Sequence< css::beans::PropertyValue > &rValues, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
std::vector< HierarchyContentRef > HierarchyContentRefVector
void destroy(bool bDeletePhysical, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
virtual OUString SAL_CALL getImplementationName() override
HierarchyContentProvider * m_pProvider
void renameData(const css::uno::Reference< css::ucb::XContentIdentifier > &xOldId, const css::uno::Reference< css::ucb::XContentIdentifier > &xNewId)
bool exchangeIdentity(const css::uno::Reference< css::ucb::XContentIdentifier > &xNewId)
virtual void SAL_CALL abort(sal_Int32 CommandId) override
virtual css::uno::Sequence< css::ucb::ContentInfo > SAL_CALL queryCreatableContentsInfo() override
void insert(sal_Int32 nNameClashResolve, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
void setKind(const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier)
void transfer(const css::ucb::TransferInfo &rInfo, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
virtual OUString getParentURL() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
css::uno::Reference< css::sdbc::XRow > getPropertyValues(const css::uno::Sequence< css::beans::Property > &rProperties)
virtual css::uno::Reference< css::ucb::XContent > SAL_CALL createNewContent(const css::ucb::ContentInfo &Info) override
virtual OUString SAL_CALL getContentType() override
static bool loadData(const css::uno::Reference< css::uno::XComponentContext > &rxContext, HierarchyContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier, HierarchyContentProperties &rProps)
virtual css::uno::Any SAL_CALL execute(const css::ucb::Command &aCommand, sal_Int32 CommandId, const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment) override
void queryChildren(HierarchyContentRefVector &rChildren)
virtual void SAL_CALL release() noexcept override
css::uno::Reference< css::ucb::XContentIdentifier > makeNewIdentifier(const OUString &rTitle)
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
HierarchyContent(const css::uno::Reference< css::uno::XComponentContext > &rxContext, HierarchyContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier, HierarchyContentProperties aProps)
HierarchyContentProperties m_aProps
static rtl::Reference< HierarchyContent > create(const css::uno::Reference< css::uno::XComponentContext > &rxContext, HierarchyContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier)
virtual css::uno::Reference< css::ucb::XContentIdentifier > SAL_CALL getIdentifier() override
virtual void SAL_CALL acquire() noexcept override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
static bool hasData(const css::uno::Reference< css::uno::XComponentContext > &rxContext, HierarchyContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier)
const OUString & getName() const
bool move(const OUString &rNewURL, const HierarchyEntryData &rData)
bool setData(const HierarchyEntryData &rData)
bool getData(HierarchyEntryData &rData)
bool isRootFolder() const
const OUString & getService() const
const OUString & getParentUri() const
css::uno::Reference< css::ucb::XPersistentPropertySet > getAdditionalPropertySet(bool bCreate)
css::uno::Reference< css::ucb::XCommandInfo > getCommandInfo(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv, bool bCache=true)
bool renameAdditionalPropertySet(const OUString &rOldKey, const OUString &rNewKey)
rtl::Reference< ContentProviderImplHelper > m_xProvider
bool removeAdditionalPropertySet()
bool exchange(const css::uno::Reference< css::ucb::XContentIdentifier > &rNewId)
css::uno::Reference< css::beans::XPropertySetInfo > getPropertySetInfo(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv, bool bCache=true)
css::uno::Reference< css::ucb::XContentIdentifier > m_xIdentifier
css::uno::Reference< css::uno::XComponentContext > m_xContext
void notifyPropertiesChange(const css::uno::Sequence< css::beans::PropertyChangeEvent > &evt) const
Reference< XInterface > xTarget
XTYPEPROVIDER_COMMON_IMPL(HierarchyContent)
constexpr OUStringLiteral HIERARCHY_URL_SCHEME
#define LINK(Instance, Class, Member)
Sequence< sal_Int8 > aSeq
constexpr OUStringLiteral aData
sal_Int32 findValue(const css::uno::Sequence< T1 > &_rList, const T2 &_rValue)
css::uno::Sequence< css::uno::Any > InitAnyPropertySequence(::std::initializer_list< ::std::pair< OUString, css::uno::Any > > vInit)
css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType, Interface1 *p1)
constexpr OUStringLiteral HIERARCHY_LINK_CONTENT_TYPE
constexpr OUStringLiteral HIERARCHY_FOLDER_CONTENT_TYPE
OUString encodeSegment(const OUString &rSegment)
std::vector< ContentImplHelperRef > ContentRefList
void cancelCommandExecution(const uno::Any &rException, const uno::Reference< ucb::XCommandEnvironment > &xEnv)
uno::Sequence< beans::Property > m_aProps