summaryrefslogtreecommitdiff
path: root/ucb/source/ucp/file/bc.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'ucb/source/ucp/file/bc.cxx')
-rwxr-xr-x[-rw-r--r--]ucb/source/ucp/file/bc.cxx59
1 files changed, 29 insertions, 30 deletions
diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx
index b78e5d6e4890..444ba7055881 100644..100755
--- a/ucb/source/ucp/file/bc.cxx
+++ b/ucb/source/ucp/file/bc.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.
@@ -33,9 +34,7 @@
#include "osl/diagnose.h"
#include <com/sun/star/ucb/OpenMode.hpp>
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
#include <com/sun/star/ucb/XProgressHandler.hpp>
#include <com/sun/star/task/XInteractionHandler.hpp>
#include <com/sun/star/io/XActiveDataStreamer.hpp>
@@ -51,9 +50,7 @@
#include "filrow.hxx"
#include "bc.hxx"
#include "prov.hxx"
-#ifndef _FILERROR_HXX_
#include "filerror.hxx"
-#endif
#include "filinsreq.hxx"
@@ -270,7 +267,7 @@ rtl::OUString SAL_CALL
BaseContent::getImplementationName()
throw( RuntimeException)
{
- return rtl::OUString::createFromAscii( "com.sun.star.comp.ucb.FileContent" );
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ucb.FileContent"));
}
@@ -279,7 +276,7 @@ sal_Bool SAL_CALL
BaseContent::supportsService( const rtl::OUString& ServiceName )
throw( RuntimeException)
{
- if( ServiceName.compareToAscii( "com.sun.star.ucb.FileContent" ) == 0 )
+ if (ServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.ucb.FileContent")))
return true;
else
return false;
@@ -292,7 +289,7 @@ BaseContent::getSupportedServiceNames()
throw( RuntimeException )
{
Sequence< rtl::OUString > ret( 1 );
- ret[0] = rtl::OUString::createFromAscii( "com.sun.star.ucb.FileContent" );
+ ret[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.FileContent"));
return ret;
}
@@ -352,15 +349,15 @@ BaseContent::execute( const Command& aCommand,
Any aAny;
- if( ! aCommand.Name.compareToAscii( "getPropertySetInfo" ) ) // No exceptions
+ if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getPropertySetInfo"))) // No exceptions
{
aAny <<= getPropertySetInfo( CommandId );
}
- else if( ! aCommand.Name.compareToAscii( "getCommandInfo" ) ) // no exceptions
+ else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getCommandInfo"))) // no exceptions
{
aAny <<= getCommandInfo();
}
- else if( ! aCommand.Name.compareToAscii( "setPropertyValues" ) )
+ else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("setPropertyValues")))
{
Sequence< beans::PropertyValue > sPropertyValues;
@@ -370,7 +367,7 @@ BaseContent::execute( const Command& aCommand,
else
aAny <<= setPropertyValues( CommandId,sPropertyValues ); // calls endTask by itself
}
- else if( ! aCommand.Name.compareToAscii( "getPropertyValues" ) )
+ else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getPropertyValues")))
{
Sequence< beans::Property > ListOfRequestedProperties;
@@ -381,7 +378,7 @@ BaseContent::execute( const Command& aCommand,
aAny <<= getPropertyValues( CommandId,
ListOfRequestedProperties );
}
- else if( ! aCommand.Name.compareToAscii( "open" ) )
+ else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("open")))
{
OpenCommandArgument2 aOpenArgument;
if( ! ( aCommand.Argument >>= aOpenArgument ) )
@@ -394,7 +391,7 @@ BaseContent::execute( const Command& aCommand,
aAny <<= result;
}
}
- else if( ! aCommand.Name.compareToAscii( "delete" ) )
+ else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("delete")))
{
if( ! aCommand.Argument.has< sal_Bool >() )
m_pMyShell->installError( CommandId,
@@ -402,7 +399,7 @@ BaseContent::execute( const Command& aCommand,
else
deleteContent( CommandId );
}
- else if( ! aCommand.Name.compareToAscii( "transfer" ) )
+ else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("transfer")))
{
TransferInfo aTransferInfo;
if( ! ( aCommand.Argument >>= aTransferInfo ) )
@@ -411,7 +408,7 @@ BaseContent::execute( const Command& aCommand,
else
transfer( CommandId, aTransferInfo );
}
- else if( ! aCommand.Name.compareToAscii( "insert" ) )
+ else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("insert")))
{
InsertCommandArgument aInsertArgument;
if( ! ( aCommand.Argument >>= aInsertArgument ) )
@@ -420,11 +417,11 @@ BaseContent::execute( const Command& aCommand,
else
insert( CommandId,aInsertArgument );
}
- else if( ! aCommand.Name.compareToAscii( "getCasePreservingURL" ) )
+ else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getCasePreservingURL")))
{
Sequence< beans::Property > seq(1);
seq[0] = beans::Property(
- rtl::OUString::createFromAscii("CasePreservingURL"),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CasePreservingURL")),
-1,
getCppuType( static_cast< sal_Bool* >(0) ),
0 );
@@ -433,7 +430,7 @@ BaseContent::execute( const Command& aCommand,
if(!xRow->wasNull())
aAny <<= CasePreservingURL;
}
- else if( ! aCommand.Name.compareToAscii( "createNewContent" ) )
+ else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("createNewContent")))
{
ucb::ContentInfo aArg;
if ( !( aCommand.Argument >>= aArg ) )
@@ -533,7 +530,7 @@ BaseContent::getContentType()
{
// Who am I ?
Sequence< beans::Property > seq(1);
- seq[0] = beans::Property( rtl::OUString::createFromAscii("IsDocument"),
+ seq[0] = beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")),
-1,
getCppuType( static_cast< sal_Bool* >(0) ),
0 );
@@ -672,7 +669,7 @@ BaseContent::createNewContent(
try
{
Sequence< beans::Property > seq(1);
- seq[0] = beans::Property( rtl::OUString::createFromAscii("IsDocument"),
+ seq[0] = beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")),
-1,
getCppuType( static_cast< sal_Bool* >(0) ),
0 );
@@ -839,16 +836,16 @@ BaseContent::getPropertyValues(
const beans::Property& rProp = pProps[ n ];
Any& rValue = pValues[ n ];
- if( rProp.Name.compareToAscii( "ContentType" ) == 0 )
+ if (rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ContentType")))
{
rValue <<= m_bFolder ? m_pMyShell->FolderContentType
: m_pMyShell->FileContentType;
}
- else if( rProp.Name.compareToAscii( "IsFolder" ) == 0 )
+ else if (rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsFolder")))
{
rValue <<= m_bFolder;
}
- else if( rProp.Name.compareToAscii( "IsDocument" ) == 0 )
+ else if (rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsDocument")))
{
rValue <<= sal_Bool( !m_bFolder );
}
@@ -875,7 +872,7 @@ BaseContent::setPropertyValues(
return Sequence< Any >( Values.getLength() );
}
- const rtl::OUString Title = rtl::OUString::createFromAscii( "Title" );
+ const rtl::OUString Title(RTL_CONSTASCII_USTRINGPARAM("Title"));
// Special handling for files which have to be inserted
if( m_nState & JustInserted )
@@ -929,7 +926,7 @@ BaseContent::setPropertyValues(
// m_aUncPath contains parent's URI.
if( m_aUncPath.lastIndexOf( sal_Unicode('/') ) != m_aUncPath.getLength() - 1 )
- m_aUncPath += rtl::OUString::createFromAscii("/");
+ m_aUncPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
m_aUncPath += rtl::Uri::encode( NewTitle,
rtl_UriCharClassPchar,
@@ -970,7 +967,7 @@ BaseContent::setPropertyValues(
rtl::OUString aDstName = getParentName( m_aUncPath );
if( aDstName.lastIndexOf( sal_Unicode('/') ) != aDstName.getLength() - 1 )
- aDstName += rtl::OUString::createFromAscii("/");
+ aDstName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
aDstName += rtl::Uri::encode( NewTitle,
rtl_UriCharClassPchar,
@@ -1132,7 +1129,7 @@ BaseContent::transfer( sal_Int32 nMyCommandIdentifier,
// Is destination a document or a folder ?
Sequence< beans::Property > seq(1);
- seq[0] = beans::Property( rtl::OUString::createFromAscii("IsDocument"),
+ seq[0] = beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")),
-1,
getCppuType( static_cast< sal_Bool* >(0) ),
0 );
@@ -1155,7 +1152,7 @@ BaseContent::transfer( sal_Int32 nMyCommandIdentifier,
// as child
dstUncPath = m_aUncPath;
- dstUncPath += ( rtl::OUString::createFromAscii( "/" ) + NewTitle );
+ dstUncPath += ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + NewTitle );
sal_Int32 NameClash = aTransferInfo.NameClash;
@@ -1201,7 +1198,7 @@ void SAL_CALL BaseContent::insert( sal_Int32 nMyCommandIdentifier,
sal_Bool bDocument = false;
Sequence< beans::Property > seq(1);
- seq[0] = beans::Property( rtl::OUString::createFromAscii("IsDocument"),
+ seq[0] = beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")),
-1,
getCppuType( static_cast< sal_Bool* >(0) ),
0 );
@@ -1267,7 +1264,7 @@ void SAL_CALL BaseContent::insert( sal_Int32 nMyCommandIdentifier,
m_pMyShell->clearError( nMyCommandIdentifier );
m_aUncPath = getParentName( m_aUncPath );
if( m_aUncPath.lastIndexOf( sal_Unicode('/') ) != m_aUncPath.getLength() - 1 )
- m_aUncPath += rtl::OUString::createFromAscii("/");
+ m_aUncPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
m_aUncPath += rtl::Uri::encode( aRequestImpl->newName(),
rtl_UriCharClassPchar,
@@ -1407,3 +1404,5 @@ rtl::OUString BaseContent::getKey( void )
{
return m_aUncPath;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */