summaryrefslogtreecommitdiff
path: root/sfx2/source/bastyp/helper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/bastyp/helper.cxx')
-rw-r--r--sfx2/source/bastyp/helper.cxx212
1 files changed, 113 insertions, 99 deletions
diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx
index 3493981e5a25..b7ecb65a06fb 100644
--- a/sfx2/source/bastyp/helper.cxx
+++ b/sfx2/source/bastyp/helper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,13 +57,19 @@
#include <ucbhelper/commandenvironment.hxx>
#include <comphelper/processfactory.hxx>
#include <osl/file.hxx>
+#include <vector>
using namespace com::sun::star;
-using namespace rtl;
using namespace comphelper;
using namespace osl;
-DECLARE_LIST( StringList_Impl, OUString* )
+using ::std::vector;
+
+using ::rtl::OUString;
+using ::rtl::OStringBuffer;
+using ::rtl::OStringToOUString;
+
+typedef vector< OUString* > StringList_Impl;
#define CONVERT_DATETIME( aUnoDT, aToolsDT ) \
aToolsDT = DateTime( Date( aUnoDT.Day, aUnoDT.Month, aUnoDT.Year ), \
@@ -102,7 +109,7 @@ sal_Bool SfxContentHelper::Transfer_Impl( const String& rSource, const String& r
{
::ucbhelper::Content aDestPath( aDestObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () );
uno::Reference< ucb::XCommandInfo > xInfo = aDestPath.getCommands();
- OUString aTransferName = OUString::createFromAscii( "transfer" );
+ OUString aTransferName(RTL_CONSTASCII_USTRINGPARAM("transfer"));
if ( xInfo->hasCommandByName( aTransferName ) )
{
aDestPath.executeCommand( aTransferName, uno::makeAny(
@@ -113,11 +120,11 @@ sal_Bool SfxContentHelper::Transfer_Impl( const String& rSource, const String& r
DBG_ERRORFILE( "transfer command not available" );
}
}
- catch( ucb::CommandAbortedException& )
+ catch( const ucb::CommandAbortedException& )
{
bRet = sal_False;
}
- catch( uno::Exception& )
+ catch( const uno::Exception& )
{
DBG_ERRORFILE( "Any other exception" );
bRet = sal_False;
@@ -142,19 +149,19 @@ sal_Bool SfxContentHelper::IsDocument( const String& rContent )
::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () );
bRet = aCnt.isDocument();
}
- catch( ucb::CommandAbortedException& )
+ catch( const ucb::CommandAbortedException& )
{
DBG_WARNING( "CommandAbortedException" );
}
- catch( ucb::IllegalIdentifierException& )
+ catch( const ucb::IllegalIdentifierException& )
{
DBG_WARNING( "IllegalIdentifierException" );
}
- catch( ucb::ContentCreationException& )
+ catch( const ucb::ContentCreationException& )
{
DBG_WARNING( "IllegalIdentifierException" );
}
- catch( uno::Exception& )
+ catch( const uno::Exception& )
{
DBG_ERRORFILE( "Any other exception" );
}
@@ -174,19 +181,19 @@ sal_Bool SfxContentHelper::IsFolder( const String& rContent )
::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () );
bRet = aCnt.isFolder();
}
- catch( ucb::CommandAbortedException& )
+ catch( const ucb::CommandAbortedException& )
{
DBG_WARNING( "CommandAbortedException" );
}
- catch( ucb::IllegalIdentifierException& )
+ catch( const ucb::IllegalIdentifierException& )
{
DBG_WARNING( "IllegalIdentifierException" );
}
- catch( ucb::ContentCreationException& )
+ catch( const ucb::ContentCreationException& )
{
DBG_WARNING( "IllegalIdentifierException" );
}
- catch( uno::Exception& )
+ catch( const uno::Exception& )
{
DBG_ERRORFILE( "Any other exception" );
}
@@ -205,15 +212,15 @@ sal_Bool SfxContentHelper::GetTitle( const String& rContent, String& rTitle )
{
::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () );
OUString aTemp;
- aCnt.getPropertyValue( OUString::createFromAscii( "Title" ) ) >>= aTemp;
+ aCnt.getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) ) >>= aTemp;
rTitle = String( aTemp );
bRet = sal_True;
}
- catch( ucb::CommandAbortedException& )
+ catch( const ucb::CommandAbortedException& )
{
DBG_ERRORFILE( "CommandAbortedException" );
}
- catch( uno::Exception& )
+ catch( const uno::Exception& )
{
DBG_ERRORFILE( "Any other exception" );
}
@@ -231,14 +238,14 @@ sal_Bool SfxContentHelper::Kill( const String& rContent )
try
{
::ucbhelper::Content aCnt( aDeleteObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () );
- aCnt.executeCommand( OUString::createFromAscii( "delete" ), uno::makeAny( sal_Bool( sal_True ) ) );
+ aCnt.executeCommand( OUString(RTL_CONSTASCII_USTRINGPARAM("delete")), uno::makeAny( sal_Bool( sal_True ) ) );
}
- catch( ucb::CommandAbortedException& )
+ catch( const ucb::CommandAbortedException& )
{
DBG_WARNING( "CommandAbortedException" );
bRet = sal_False;
}
- catch( uno::Exception& )
+ catch( const uno::Exception& )
{
DBG_ERRORFILE( "Any other exception" );
bRet = sal_False;
@@ -260,8 +267,8 @@ uno::Sequence < OUString > SfxContentHelper::GetFolderContents( const String& rF
uno::Reference< sdbc::XResultSet > xResultSet;
uno::Sequence< OUString > aProps(2);
OUString* pProps = aProps.getArray();
- pProps[0] = OUString::createFromAscii( "Title" );
- pProps[1] = OUString::createFromAscii( "IsFolder" );
+ pProps[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("Title"));
+ pProps[1] = OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder"));
try
{
@@ -278,7 +285,7 @@ uno::Sequence < OUString > SfxContentHelper::GetFolderContents( const String& rF
uno::Reference < ucb::XAnyCompareFactory > xFactory;
uno::Reference < lang::XMultiServiceFactory > xMgr = getProcessServiceFactory();
uno::Reference < ucb::XSortedDynamicResultSetFactory > xSRSFac(
- xMgr->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.ucb.SortedDynamicResultSetFactory") ), uno::UNO_QUERY );
+ xMgr->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SortedDynamicResultSetFactory")) ), uno::UNO_QUERY );
uno::Sequence< ucb::NumberedSortingInfo > aSortInfo( 2 );
ucb::NumberedSortingInfo* pInfo = aSortInfo.getArray();
@@ -296,18 +303,18 @@ uno::Sequence < OUString > SfxContentHelper::GetFolderContents( const String& rF
}
}
}
- catch( ucb::CommandAbortedException& )
+ catch( const ucb::CommandAbortedException& )
{
DBG_ERRORFILE( "createCursor: CommandAbortedException" );
}
- catch( uno::Exception& )
+ catch( const uno::Exception& )
{
DBG_ERRORFILE( "createCursor: Any other exception" );
}
if ( xResultSet.is() )
{
- pFiles = new StringList_Impl;
+ pFiles = new StringList_Impl();
uno::Reference< ucb::XContentAccess > xContentAccess( xResultSet, uno::UNO_QUERY );
try
{
@@ -315,35 +322,36 @@ uno::Sequence < OUString > SfxContentHelper::GetFolderContents( const String& rF
{
OUString aId = xContentAccess->queryContentIdentifierString();
OUString* pFile = new OUString( aId );
- pFiles->Insert( pFile, LIST_APPEND );
+ pFiles->push_back( pFile );
}
}
- catch( ucb::CommandAbortedException& )
+ catch( const ucb::CommandAbortedException& )
{
DBG_ERRORFILE( "XContentAccess::next(): CommandAbortedException" );
}
- catch( uno::Exception& )
+ catch( const uno::Exception& )
{
DBG_ERRORFILE( "XContentAccess::next(): Any other exception" );
}
}
}
- catch( uno::Exception& )
+ catch( const uno::Exception& )
{
DBG_ERRORFILE( "GetFolderContents: Any other exception" );
}
if ( pFiles )
{
- sal_uIntPtr nCount = pFiles->Count();
+ size_t nCount = pFiles->size();
uno::Sequence < OUString > aRet( nCount );
OUString* pRet = aRet.getArray();
- for ( sal_uIntPtr i = 0; i < nCount; ++i )
+ for ( size_t i = 0; i < nCount; ++i )
{
- OUString* pFile = pFiles->GetObject(i);
+ OUString* pFile = pFiles->at( i );
pRet[i] = *( pFile );
delete pFile;
}
+ pFiles->clear();
delete pFiles;
return aRet;
}
@@ -368,11 +376,11 @@ uno::Sequence < OUString > SfxContentHelper::GetFolderContentProperties( const S
uno::Reference< sdbc::XResultSet > xResultSet;
uno::Sequence< OUString > aProps(5);
OUString* pProps = aProps.getArray();
- pProps[0] = OUString::createFromAscii( "Title" );
- pProps[1] = OUString::createFromAscii( "ContentType" );
- pProps[2] = OUString::createFromAscii( "Size" );
- pProps[3] = OUString::createFromAscii( "DateModified" );
- pProps[4] = OUString::createFromAscii( "IsFolder" );
+ pProps[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("Title"));
+ pProps[1] = OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType"));
+ pProps[2] = OUString(RTL_CONSTASCII_USTRINGPARAM("Size"));
+ pProps[3] = OUString(RTL_CONSTASCII_USTRINGPARAM("DateModified"));
+ pProps[4] = OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder"));
try
{
@@ -383,7 +391,7 @@ uno::Sequence < OUString > SfxContentHelper::GetFolderContentProperties( const S
uno::Reference < ucb::XAnyCompareFactory > xCmpFactory;
uno::Reference < lang::XMultiServiceFactory > xMgr = getProcessServiceFactory();
uno::Reference < ucb::XSortedDynamicResultSetFactory > xSRSFac(
- xMgr->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.ucb.SortedDynamicResultSetFactory") ), uno::UNO_QUERY );
+ xMgr->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SortedDynamicResultSetFactory")) ), uno::UNO_QUERY );
uno::Sequence< ucb::NumberedSortingInfo > aSortInfo( 2 );
ucb::NumberedSortingInfo* pInfo = aSortInfo.getArray();
@@ -399,15 +407,12 @@ uno::Sequence < OUString > SfxContentHelper::GetFolderContentProperties( const S
{
xResultSet = xDynamicResultSet->getStaticResultSet();
}
-
-// if ( xDynResultSet.is() )
-// xResultSet = xDynResultSet->getStaticResultSet();
}
- catch( ucb::CommandAbortedException& )
+ catch( const ucb::CommandAbortedException& )
{
DBG_ERRORFILE( "createCursor: CommandAbortedException" );
}
- catch( uno::Exception& )
+ catch( const uno::Exception& )
{
DBG_ERRORFILE( "createCursor: Any other exception" );
}
@@ -415,10 +420,10 @@ uno::Sequence < OUString > SfxContentHelper::GetFolderContentProperties( const S
if ( xResultSet.is() )
{
LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
- pProperties = new StringList_Impl;
+ pProperties = new StringList_Impl();
uno::Reference< sdbc::XRow > xRow( xResultSet, uno::UNO_QUERY );
uno::Reference< ucb::XContentAccess > xContentAccess( xResultSet, uno::UNO_QUERY );
- sal_uIntPtr nFolderPos = LIST_APPEND;
+ size_t nFolderPos = size_t(-1);
try
{
@@ -428,12 +433,10 @@ uno::Sequence < OUString > SfxContentHelper::GetFolderContentProperties( const S
String aType( xRow->getString(2) );
sal_Int64 nSize = xRow->getLong(3);
util::DateTime aDT = xRow->getTimestamp(4);
- sal_Bool bFolder = xRow->getBoolean(5);
+ sal_Bool bFolder = xRow->getBoolean(5); // true = directory, else file
String aRow = aTitle;
aRow += '\t';
-//! aRow += aType;
-//! aRow += '\t';
aRow += String::CreateFromInt64( nSize );
aRow += '\t';
AppendDateTime_Impl( aDT, aRow, aLocaleWrapper );
@@ -442,44 +445,52 @@ uno::Sequence < OUString > SfxContentHelper::GetFolderContentProperties( const S
aRow += '\t';
aRow += bFolder ? '1' : '0';
OUString* pRow = new OUString( aRow );
- sal_uIntPtr nPos = LIST_APPEND;
- if ( bFolder )
+ size_t nPos = size_t(-1);
+ if ( bFolder ) // place the directories at the top of the listing
{
- if ( LIST_APPEND == nFolderPos )
+ if ( nFolderPos == size_t(-1) )
nFolderPos = 0;
else
nFolderPos++;
nPos = nFolderPos;
}
- pProperties->Insert( pRow, nPos );
+ if ( nPos >= pProperties->size() )
+ pProperties->push_back( pRow );
+ else
+ {
+ StringList_Impl::iterator it = pProperties->begin();
+ ::std::advance( it, nPos );
+ it = pProperties->insert( it, pRow );
+ }
}
}
- catch( ucb::CommandAbortedException& )
+ catch( const ucb::CommandAbortedException& )
{
DBG_ERRORFILE( "XContentAccess::next(): CommandAbortedException" );
}
- catch( uno::Exception& )
+ catch( const uno::Exception& )
{
DBG_ERRORFILE( "XContentAccess::next(): Any other exception" );
}
}
}
- catch( uno::Exception& )
+ catch( const uno::Exception& )
{
DBG_ERRORFILE( "GetFolderContents: Any other exception" );
}
if ( pProperties )
{
- sal_uIntPtr nCount = pProperties->Count();
+ size_t nCount = pProperties->size();
uno::Sequence < OUString > aRet( nCount );
OUString* pRet = aRet.getArray();
- for ( sal_uIntPtr i = 0; i < nCount; ++i )
+ for ( size_t i = 0; i < nCount; ++i )
{
- OUString* pProperty = pProperties->GetObject(i);
+ OUString* pProperty = pProperties->at(i);
pRet[i] = *( pProperty );
delete pProperty;
}
+ pProperties->clear();
delete pProperties;
return aRet;
}
@@ -499,9 +510,9 @@ uno::Sequence < OUString > SfxContentHelper::GetResultSet( const String& rURL )
uno::Reference< ucb::XDynamicResultSet > xDynResultSet;
uno::Sequence< OUString > aProps(3);
OUString* pProps = aProps.getArray();
- pProps[0] = OUString::createFromAscii( "Title" );
- pProps[1] = OUString::createFromAscii( "ContentType" );
- pProps[2] = OUString::createFromAscii( "IsFolder" );
+ pProps[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("Title"));
+ pProps[1] = OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType"));
+ pProps[2] = OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder"));
try
{
@@ -509,18 +520,18 @@ uno::Sequence < OUString > SfxContentHelper::GetResultSet( const String& rURL )
if ( xDynResultSet.is() )
xResultSet = xDynResultSet->getStaticResultSet();
}
- catch( ucb::CommandAbortedException& )
+ catch( const ucb::CommandAbortedException& )
{
DBG_ERRORFILE( "createCursor: CommandAbortedException" );
}
- catch( uno::Exception& )
+ catch( const uno::Exception& )
{
DBG_ERRORFILE( "createCursor: Any other exception" );
}
if ( xResultSet.is() )
{
- pList = new StringList_Impl;
+ pList = new StringList_Impl();
uno::Reference< sdbc::XRow > xRow( xResultSet, uno::UNO_QUERY );
uno::Reference< ucb::XContentAccess > xContentAccess( xResultSet, uno::UNO_QUERY );
@@ -536,20 +547,20 @@ uno::Sequence < OUString > SfxContentHelper::GetResultSet( const String& rURL )
aRow += '\t';
aRow += String( xContentAccess->queryContentIdentifierString() );
OUString* pRow = new OUString( aRow );
- pList->Insert( pRow, LIST_APPEND );
+ pList->push_back( pRow );
}
}
- catch( ucb::CommandAbortedException& )
+ catch( const ucb::CommandAbortedException& )
{
DBG_ERRORFILE( "XContentAccess::next(): CommandAbortedException" );
}
- catch( uno::Exception& )
+ catch( const uno::Exception& )
{
DBG_ERRORFILE( "XContentAccess::next(): Any other exception" );
}
}
}
- catch( uno::Exception& e )
+ catch( const uno::Exception& e )
{
(void) e;
DBG_ERRORFILE(
@@ -564,15 +575,16 @@ uno::Sequence < OUString > SfxContentHelper::GetResultSet( const String& rURL )
if ( pList )
{
- sal_uIntPtr nCount = pList->Count();
+ size_t nCount = pList->size();
uno::Sequence < OUString > aRet( nCount );
OUString* pRet = aRet.getArray();
- for ( sal_uIntPtr i = 0; i < nCount; ++i )
+ for ( size_t i = 0; i < nCount; ++i )
{
- OUString* pEntry = pList->GetObject(i);
+ OUString* pEntry = pList->at(i);
pRet[i] = *( pEntry );
delete pEntry;
}
+ pList->clear();
delete pList;
return aRet;
}
@@ -595,8 +607,8 @@ uno::Sequence< OUString > SfxContentHelper::GetHelpTreeViewContents( const Strin
uno::Reference< sdbc::XResultSet > xResultSet;
uno::Sequence< OUString > aProps(2);
OUString* pProps = aProps.getArray();
- pProps[0] = OUString::createFromAscii( "Title" );
- pProps[1] = OUString::createFromAscii( "IsFolder" );
+ pProps[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("Title"));
+ pProps[1] = OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder"));
try
{
@@ -605,16 +617,16 @@ uno::Sequence< OUString > SfxContentHelper::GetHelpTreeViewContents( const Strin
if ( xDynResultSet.is() )
xResultSet = xDynResultSet->getStaticResultSet();
}
- catch( ucb::CommandAbortedException& )
+ catch( const ucb::CommandAbortedException& )
{
}
- catch( uno::Exception& )
+ catch( const uno::Exception& )
{
}
if ( xResultSet.is() )
{
- pProperties = new StringList_Impl;
+ pProperties = new StringList_Impl();
uno::Reference< sdbc::XRow > xRow( xResultSet, uno::UNO_QUERY );
uno::Reference< ucb::XContentAccess > xContentAccess( xResultSet, uno::UNO_QUERY );
@@ -630,32 +642,33 @@ uno::Sequence< OUString > SfxContentHelper::GetHelpTreeViewContents( const Strin
aRow += '\t';
aRow += bFolder ? '1' : '0';
OUString* pRow = new OUString( aRow );
- pProperties->Insert( pRow, LIST_APPEND );
+ pProperties->push_back( pRow );
}
}
- catch( ucb::CommandAbortedException& )
+ catch( const ucb::CommandAbortedException& )
{
}
- catch( uno::Exception& )
+ catch( const uno::Exception& )
{
}
}
}
- catch( uno::Exception& )
+ catch( const uno::Exception& )
{
}
if ( pProperties )
{
- sal_uIntPtr nCount = pProperties->Count();
+ size_t nCount = pProperties->size();
uno::Sequence < OUString > aRet( nCount );
OUString* pRet = aRet.getArray();
- for ( sal_uIntPtr i = 0; i < nCount; ++i )
+ for ( size_t i = 0; i < nCount; ++i )
{
- OUString* pProperty = pProperties->GetObject(i);
+ OUString* pProperty = pProperties->at(i);
pRet[i] = *( pProperty );
delete pProperty;
}
+ pProperties->clear();
delete pProperties;
return aRet;
}
@@ -690,7 +703,7 @@ String SfxContentHelper::GetActiveHelpString( const String& rURL )
nRead = xStream->readBytes( lData, 1024 );
}
}
- catch( uno::Exception& )
+ catch( const uno::Exception& )
{
}
@@ -706,12 +719,12 @@ sal_Bool SfxContentHelper::IsHelpErrorDocument( const String& rURL )
{
::ucbhelper::Content aCnt( INetURLObject( rURL ).GetMainURL( INetURLObject::NO_DECODE ),
uno::Reference< ucb::XCommandEnvironment > () );
- if ( !( aCnt.getPropertyValue( OUString::createFromAscii( "IsErrorDocument" ) ) >>= bRet ) )
+ if ( !( aCnt.getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("IsErrorDocument")) ) >>= bRet ) )
{
DBG_ERRORFILE( "Property 'IsErrorDocument' is missing" );
}
}
- catch( uno::Exception& )
+ catch( const uno::Exception& )
{
}
@@ -757,15 +770,15 @@ sal_Bool SfxContentHelper::MakeFolder( const String& rFolder )
OUString aType( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.staroffice.fsys-folder" ) );
bRet = aCnt.insertNewContent( aType, aNames, aValues, aNewFolder );
}
- catch( ucb::CommandAbortedException& )
+ catch( const ucb::CommandAbortedException& )
{
// double name?
}
- catch( ucb::IllegalIdentifierException& )
+ catch( const ucb::IllegalIdentifierException& )
{
DBG_ERRORFILE( "Illegal identifier" );
}
- catch( uno::Exception& )
+ catch( const uno::Exception& )
{
DBG_ERRORFILE( "Any other exception" );
}
@@ -784,14 +797,14 @@ ErrCode SfxContentHelper::QueryDiskSpace( const String& rPath, sal_Int64& rFreeB
try
{
::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () );
- aCnt.getPropertyValue( OUString::createFromAscii( "FreeSpace" ) ) >>= rFreeBytes;
+ aCnt.getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FreeSpace")) ) >>= rFreeBytes;
}
- catch( ucb::CommandAbortedException& )
+ catch( const ucb::CommandAbortedException& )
{
DBG_ERRORFILE( "CommandAbortedException" );
nErr = ERRCODE_IO_GENERAL;
}
- catch( uno::Exception& )
+ catch( const uno::Exception& )
{
DBG_ERRORFILE( "Any other exception" );
nErr = ERRCODE_IO_GENERAL;
@@ -810,13 +823,13 @@ sal_uIntPtr SfxContentHelper::GetSize( const String& rContent )
try
{
::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () );
- aCnt.getPropertyValue( OUString::createFromAscii( "Size" ) ) >>= nTemp;
+ aCnt.getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Size")) ) >>= nTemp;
}
- catch( ucb::CommandAbortedException& )
+ catch( const ucb::CommandAbortedException& )
{
DBG_ERRORFILE( "CommandAbortedException" );
}
- catch( uno::Exception& )
+ catch( const uno::Exception& )
{
DBG_ERRORFILE( "Any other exception" );
}
@@ -839,19 +852,19 @@ sal_Bool SfxContentHelper::Exists( const String& rContent )
aCnt.isDocument();
bRet = sal_True;
}
- catch( ucb::CommandAbortedException& )
+ catch( const ucb::CommandAbortedException& )
{
DBG_WARNING( "CommandAbortedException" );
}
- catch( ucb::IllegalIdentifierException& )
+ catch( const ucb::IllegalIdentifierException& )
{
DBG_WARNING( "IllegalIdentifierException" );
}
- catch( ucb::ContentCreationException& )
+ catch( const ucb::ContentCreationException& )
{
DBG_WARNING( "IllegalIdentifierException" );
}
- catch( uno::Exception& )
+ catch( const uno::Exception& )
{
DBG_ERRORFILE( "Any other exception" );
}
@@ -877,3 +890,4 @@ sal_Bool SfxContentHelper::Find( const String& rFolder, const String& rName, Str
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */