summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-02 15:58:06 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-02 16:30:34 +0200
commit44b3e56bb4a4df59f53447c4ca4d8e02fe926206 (patch)
tree71a9efde3a6a2a00688e8feb8e3086cb32eceb4f /ucb
parent0b4965bcd7ec911951e7ca3a4cd48062843b2634 (diff)
Change INetProtocol to scoped enumeration
...and fix o3tl::enumarray::operator [] const overload Change-Id: I749b1b9d68686b03a97074253478d9d2d9d32b0b
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/core/FileAccess.cxx36
-rw-r--r--ucb/source/ucp/cmis/cmis_content.cxx2
2 files changed, 19 insertions, 19 deletions
diff --git a/ucb/source/core/FileAccess.cxx b/ucb/source/core/FileAccess.cxx
index 1632cfd9d83a..fb8fcf58312c 100644
--- a/ucb/source/core/FileAccess.cxx
+++ b/ucb/source/core/FileAccess.cxx
@@ -225,8 +225,8 @@ void OFileAccess::transferImpl( const OUString& rSource,
throw(CommandAbortedException, Exception, RuntimeException)
{
// SfxContentHelper::Transfer_Impl
- INetURLObject aSourceObj( rSource, INET_PROT_FILE );
- INetURLObject aDestObj( rDest, INET_PROT_FILE );
+ INetURLObject aSourceObj( rSource, INetProtocol::FILE );
+ INetURLObject aDestObj( rDest, INetProtocol::FILE );
OUString aName = aDestObj.getName(
INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
OUString aDestURL;
@@ -245,7 +245,7 @@ void OFileAccess::transferImpl( const OUString& rSource,
// #i29648#
- if ( aDestObj.GetProtocol() == INET_PROT_VND_SUN_STAR_EXPAND )
+ if ( aDestObj.GetProtocol() == INetProtocol::VND_SUN_STAR_EXPAND )
{
// Hack: Expand destination URL using Macro Expander and try again
// with the hopefully hierarchical expanded URL...
@@ -308,7 +308,7 @@ void OFileAccess::kill( const OUString& FileURL )
throw(CommandAbortedException, Exception, RuntimeException, std::exception)
{
// SfxContentHelper::Kill
- INetURLObject aDeleteObj( FileURL, INET_PROT_FILE );
+ INetURLObject aDeleteObj( FileURL, INetProtocol::FILE );
ucbhelper::Content aCnt( aDeleteObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
try
{
@@ -326,7 +326,7 @@ sal_Bool OFileAccess::isFolder( const OUString& FileURL )
bool bRet = false;
try
{
- INetURLObject aURLObj( FileURL, INET_PROT_FILE );
+ INetURLObject aURLObj( FileURL, INetProtocol::FILE );
ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
bRet = aCnt.isFolder();
}
@@ -337,7 +337,7 @@ sal_Bool OFileAccess::isFolder( const OUString& FileURL )
sal_Bool OFileAccess::isReadOnly( const OUString& FileURL )
throw(CommandAbortedException, Exception, RuntimeException, std::exception)
{
- INetURLObject aURLObj( FileURL, INET_PROT_FILE );
+ INetURLObject aURLObj( FileURL, INetProtocol::FILE );
ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
Any aRetAny = aCnt.getPropertyValue("IsReadOnly");
bool bRet = false;
@@ -348,7 +348,7 @@ sal_Bool OFileAccess::isReadOnly( const OUString& FileURL )
void OFileAccess::setReadOnly( const OUString& FileURL, sal_Bool bReadOnly )
throw(CommandAbortedException, Exception, RuntimeException, std::exception)
{
- INetURLObject aURLObj( FileURL, INET_PROT_FILE );
+ INetURLObject aURLObj( FileURL, INetProtocol::FILE );
ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
Any aAny;
aAny <<= bReadOnly;
@@ -363,7 +363,7 @@ void OFileAccess::createFolder( const OUString& NewFolderURL )
return;
// SfxContentHelper::MakeFolder
- INetURLObject aURL( NewFolderURL, INET_PROT_FILE );
+ INetURLObject aURL( NewFolderURL, INetProtocol::FILE );
OUString aTitle = aURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
if ( !aTitle.isEmpty() )
{
@@ -429,7 +429,7 @@ sal_Int32 OFileAccess::getSize( const OUString& FileURL )
// SfxContentHelper::GetSize
sal_Int32 nSize = 0;
sal_Int64 nTemp = 0;
- INetURLObject aObj( FileURL, INET_PROT_FILE );
+ INetURLObject aObj( FileURL, INetProtocol::FILE );
ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
aCnt.getPropertyValue( "Size" ) >>= nTemp;
nSize = (sal_Int32)nTemp;
@@ -439,7 +439,7 @@ sal_Int32 OFileAccess::getSize( const OUString& FileURL )
OUString OFileAccess::getContentType( const OUString& FileURL )
throw(CommandAbortedException, Exception, RuntimeException, std::exception)
{
- INetURLObject aObj( FileURL, INET_PROT_FILE );
+ INetURLObject aObj( FileURL, INetProtocol::FILE );
ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
Reference< XContent > xContent = aCnt.get();
@@ -450,7 +450,7 @@ OUString OFileAccess::getContentType( const OUString& FileURL )
::com::sun::star::util::DateTime OFileAccess::getDateTimeModified( const OUString& FileURL )
throw(CommandAbortedException, Exception, RuntimeException, std::exception)
{
- INetURLObject aFileObj( FileURL, INET_PROT_FILE );
+ INetURLObject aFileObj( FileURL, INetProtocol::FILE );
::com::sun::star::util::DateTime aDateTime;
Reference< XCommandEnvironment > aCmdEnv;
@@ -467,7 +467,7 @@ Sequence< OUString > OFileAccess::getFolderContents( const OUString& FolderURL,
// SfxContentHelper::GetFolderContents
StringList_Impl* pFiles = NULL;
- INetURLObject aFolderObj( FolderURL, INET_PROT_FILE );
+ INetURLObject aFolderObj( FolderURL, INetProtocol::FILE );
ucbhelper::Content aCnt( aFolderObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
Reference< XResultSet > xResultSet;
@@ -492,7 +492,7 @@ Sequence< OUString > OFileAccess::getFolderContents( const OUString& FolderURL,
while ( xResultSet->next() )
{
OUString aId = xContentAccess->queryContentIdentifierString();
- INetURLObject aURL( aId, INET_PROT_FILE );
+ INetURLObject aURL( aId, INetProtocol::FILE );
OUString* pFile = new OUString( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
pFiles->push_back( pFile );
}
@@ -540,7 +540,7 @@ Reference< XInputStream > OFileAccess::openFileRead( const OUString& FileURL )
throw(CommandAbortedException, Exception, RuntimeException, std::exception)
{
Reference< XInputStream > xRet;
- INetURLObject aObj( FileURL, INET_PROT_FILE );
+ INetURLObject aObj( FileURL, INetProtocol::FILE );
ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
Reference< XActiveDataSink > xSink = (XActiveDataSink*)(new OActiveDataSink());
@@ -584,7 +584,7 @@ Reference< XStream > OFileAccess::openFileReadWrite( const OUString& FileURL )
Any aCmdArg;
aCmdArg <<= aArg;
- INetURLObject aFileObj( FileURL, INET_PROT_FILE );
+ INetURLObject aFileObj( FileURL, INetProtocol::FILE );
ucbhelper::Content aCnt( aFileObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
// Be silent...
@@ -703,7 +703,7 @@ void SAL_CALL OFileAccess::writeFile( const OUString& FileURL,
const Reference< XInputStream >& data )
throw ( Exception, RuntimeException, std::exception )
{
- INetURLObject aURL( FileURL, INET_PROT_FILE );
+ INetURLObject aURL( FileURL, INetProtocol::FILE );
try
{
ucbhelper::Content aCnt(
@@ -753,7 +753,7 @@ void SAL_CALL OFileAccess::writeFile( const OUString& FileURL,
sal_Bool OFileAccess::isHidden( const OUString& FileURL )
throw(CommandAbortedException, Exception, RuntimeException, std::exception)
{
- INetURLObject aURLObj( FileURL, INET_PROT_FILE );
+ INetURLObject aURLObj( FileURL, INetProtocol::FILE );
ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
Any aRetAny = aCnt.getPropertyValue("IsHidden");
bool bRet = false;
@@ -764,7 +764,7 @@ sal_Bool OFileAccess::isHidden( const OUString& FileURL )
void OFileAccess::setHidden( const OUString& FileURL, sal_Bool bHidden )
throw(CommandAbortedException, Exception, RuntimeException, std::exception)
{
- INetURLObject aURLObj( FileURL, INET_PROT_FILE );
+ INetURLObject aURLObj( FileURL, INetProtocol::FILE );
ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
Any aAny;
aAny <<= bHidden;
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index 6b542e6d47eb..5ab655ddb35c 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -1183,7 +1183,7 @@ namespace cmis
{
// If the source isn't on the same CMIS repository, then simply copy
INetURLObject aSourceUrl( rTransferInfo.SourceURL );
- if ( aSourceUrl.GetProtocol() != INET_PROT_CMIS )
+ if ( aSourceUrl.GetProtocol() != INetProtocol::CMIS )
{
OUString sSrcBindingUrl = URL( rTransferInfo.SourceURL ).getBindingUrl( );
if ( sSrcBindingUrl != m_aURL.getBindingUrl( ) )