diff options
Diffstat (limited to 'ucbhelper/workben/myucp')
-rw-r--r-- | ucbhelper/workben/myucp/myucp_content.cxx | 93 | ||||
-rw-r--r-- | ucbhelper/workben/myucp/myucp_content.hxx | 3 | ||||
-rw-r--r-- | ucbhelper/workben/myucp/myucp_contentcaps.cxx | 2 | ||||
-rw-r--r-- | ucbhelper/workben/myucp/myucp_datasupplier.cxx | 5 | ||||
-rw-r--r-- | ucbhelper/workben/myucp/myucp_datasupplier.hxx | 3 | ||||
-rw-r--r-- | ucbhelper/workben/myucp/myucp_provider.cxx | 27 | ||||
-rw-r--r-- | ucbhelper/workben/myucp/myucp_provider.hxx | 3 | ||||
-rw-r--r-- | ucbhelper/workben/myucp/myucp_resultset.cxx | 3 | ||||
-rw-r--r-- | ucbhelper/workben/myucp/myucp_resultset.hxx | 3 | ||||
-rw-r--r-- | ucbhelper/workben/myucp/myucp_services.cxx | 10 |
10 files changed, 63 insertions, 89 deletions
diff --git a/ucbhelper/workben/myucp/myucp_content.cxx b/ucbhelper/workben/myucp/myucp_content.cxx index bea998b60f28..0d24daa3d795 100644 --- a/ucbhelper/workben/myucp/myucp_content.cxx +++ b/ucbhelper/workben/myucp/myucp_content.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. @@ -123,12 +124,6 @@ uno::Any SAL_CALL Content::queryInterface( const uno::Type & rType ) { uno::Any aRet; - // @@@ Add support for additional interfaces. -#if 0 - aRet = cppu::queryInterface( rType, - static_cast< yyy::Xxxxxxxxx * >( this ) ); -#endif - return aRet.hasValue() ? aRet : ContentImplHelper::queryInterface( rType ); } @@ -184,7 +179,7 @@ rtl::OUString SAL_CALL Content::getImplementationName() { // @@@ Adjust implementation name. // Prefix with reversed company domain name. - return rtl::OUString::createFromAscii( "com.sun.star.comp.myucp.Content" ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.myucp.Content")); } //========================================================================= @@ -195,7 +190,7 @@ uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames() // @@@ Adjust macro name. uno::Sequence< rtl::OUString > aSNS( 1 ); aSNS.getArray()[ 0 ] - = rtl::OUString::createFromAscii( MYUCP_CONTENT_SERVICE_NAME ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( MYUCP_CONTENT_SERVICE_NAME )); return aSNS; } @@ -210,7 +205,7 @@ rtl::OUString SAL_CALL Content::getContentType() throw( uno::RuntimeException ) { // @@@ Adjust macro name ( def in myucp_provider.hxx ). - return rtl::OUString::createFromAscii( MYUCP_CONTENT_TYPE ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( MYUCP_CONTENT_TYPE )); } //========================================================================= @@ -240,7 +235,7 @@ uno::Any SAL_CALL Content::execute( uno::Sequence< beans::Property > Properties; if ( !( aCommand.Argument >>= Properties ) ) { - OSL_ENSURE( sal_False, "Wrong argument type!" ); + OSL_FAIL( "Wrong argument type!" ); ::ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( rtl::OUString(), @@ -262,7 +257,7 @@ uno::Any SAL_CALL Content::execute( uno::Sequence< beans::PropertyValue > aProperties; if ( !( aCommand.Argument >>= aProperties ) ) { - OSL_ENSURE( sal_False, "Wrong argument type!" ); + OSL_FAIL( "Wrong argument type!" ); ::ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( rtl::OUString(), @@ -274,7 +269,7 @@ uno::Any SAL_CALL Content::execute( if ( !aProperties.getLength() ) { - OSL_ENSURE( sal_False, "No properties!" ); + OSL_FAIL( "No properties!" ); ::ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( rtl::OUString(), @@ -313,7 +308,7 @@ uno::Any SAL_CALL Content::execute( ucb::OpenCommandArgument2 aOpenCommand; if ( !( aCommand.Argument >>= aOpenCommand ) ) { - OSL_ENSURE( sal_False, "Wrong argument type!" ); + OSL_FAIL( "Wrong argument type!" ); ::ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( rtl::OUString(), @@ -408,7 +403,7 @@ uno::Any SAL_CALL Content::execute( ucb::InsertCommandArgument arg; if ( !( aCommand.Argument >>= arg ) ) { - OSL_ENSURE( sal_False, "Wrong argument type!" ); + OSL_FAIL( "Wrong argument type!" ); ::ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( rtl::OUString(), @@ -447,7 +442,7 @@ uno::Any SAL_CALL Content::execute( // Unsupported command ////////////////////////////////////////////////////////////////// - OSL_ENSURE( sal_False, "Content::execute - unsupported command!" ); + OSL_FAIL( "Content::execute - unsupported command!" ); ::ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( @@ -533,14 +528,6 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( { xRow->appendBoolean( rProp, rData.bIsFolder ); } - - // @@@ Process other properties supported directly. -#if 0 - else if ( rProp.Name.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM( "xxxxxx" ) ) ) - { - } -#endif else { // @@@ Note: If your data source supports adding/removing @@ -584,27 +571,27 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( { // Append all Core Properties. xRow->appendString ( - beans::Property( rtl::OUString::createFromAscii( "ContentType" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData.aContentType ); xRow->appendString ( - beans::Property( rtl::OUString::createFromAscii( "Title" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ), rData.aTitle ); xRow->appendBoolean( - beans::Property( rtl::OUString::createFromAscii( "IsDocument" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData.bIsDocument ); xRow->appendBoolean( - beans::Property( rtl::OUString::createFromAscii( "IsFolder" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND @@ -680,8 +667,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -689,8 +676,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -698,8 +685,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -727,19 +714,12 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString::createFromAscii( - "Property value has wrong type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property value has wrong type!" )), static_cast< cppu::OWeakObject * >( this ) ); } } - // @@@ Process other properties supported directly. -#if 0 - else if ( rValue.Name.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM( "xxxxxx" ) ) ) - { - } -#endif else { // @@@ Note: If your data source supports adding/removing @@ -800,8 +780,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= uno::Exception( - rtl::OUString::createFromAscii( - "No property set for storing the value!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "No property set for storing the value!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -840,7 +820,7 @@ void Content::queryChildren( ContentRefList& rChildren ) if ( nPos != ( aURL.getLength() - 1 ) ) { // No trailing slash found. Append. - aURL += ::rtl::OUString::createFromAscii( "/" ); + aURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); } sal_Int32 nLen = aURL.getLength(); @@ -884,28 +864,10 @@ void Content::insert( // Check, if all required properties were set. -#if 0 - // @@@ add checks for property presence - if ( m_aProps.xxxx == yyyyy ) - { - OSL_ENSURE( sal_False, "Content::insert - property value missing!" ); - - uno::Sequence< rtl::OUString > aProps( 1 ); - aProps[ 0 ] = rtl::OUString::createFromAscii( "zzzz" ); - ::ucbhelper::cancelCommandExecution( - uno::makeAny( ucb::MissingPropertiesException( - rtl::OUString(), - static_cast< cppu::OWeakObject * >( this ), - aProps ) ), - Environment ); - // Unreachable - } -#endif - bool bNeedInputStream = true; // @@@ adjust to real requirements if ( bNeedInputStream && !xInputStream.is() ) { - OSL_ENSURE( sal_False, "Content::insert - No data stream!" ); + OSL_FAIL( "Content::insert - No data stream!" ); ::ucbhelper::cancelCommandExecution( uno::makeAny( ucb::MissingInputStreamException( @@ -933,7 +895,7 @@ void Content::insert( ucb::IOErrorCode_ALREADY_EXISTING, uno::Sequence< uno::Any >(&aProps, 1), Environment, - rtl::OUString::createFromAscii( "content already existing!!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("content already existing!!")), this ); // Unreachable } @@ -981,3 +943,4 @@ void Content::destroy( sal_Bool bDeletePhysical ) #endif // IMPLEMENT_COMMAND_DELETE +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucbhelper/workben/myucp/myucp_content.hxx b/ucbhelper/workben/myucp/myucp_content.hxx index 0645b0262683..d2a4668fbe98 100644 --- a/ucbhelper/workben/myucp/myucp_content.hxx +++ b/ucbhelper/workben/myucp/myucp_content.hxx @@ -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. @@ -189,3 +190,5 @@ public: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucbhelper/workben/myucp/myucp_contentcaps.cxx b/ucbhelper/workben/myucp/myucp_contentcaps.cxx index d6981fd2f598..4b5916077dbb 100644 --- a/ucbhelper/workben/myucp/myucp_contentcaps.cxx +++ b/ucbhelper/workben/myucp/myucp_contentcaps.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. @@ -221,3 +222,4 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( ucb::CommandInfo >( aCommandInfoTable, nCommandCount ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucbhelper/workben/myucp/myucp_datasupplier.cxx b/ucbhelper/workben/myucp/myucp_datasupplier.cxx index 467d7ec0c505..24c813f7e86a 100644 --- a/ucbhelper/workben/myucp/myucp_datasupplier.cxx +++ b/ucbhelper/workben/myucp/myucp_datasupplier.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. @@ -109,7 +110,7 @@ DataSupplier_Impl::~DataSupplier_Impl() while ( it != end ) { delete (*it); - it++; + ++it; } } @@ -396,3 +397,5 @@ void DataSupplier::validate() } } // namespace + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucbhelper/workben/myucp/myucp_datasupplier.hxx b/ucbhelper/workben/myucp/myucp_datasupplier.hxx index 7d4cea7ec09e..a4bafb8e4480 100644 --- a/ucbhelper/workben/myucp/myucp_datasupplier.hxx +++ b/ucbhelper/workben/myucp/myucp_datasupplier.hxx @@ -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. @@ -75,3 +76,5 @@ public: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucbhelper/workben/myucp/myucp_provider.cxx b/ucbhelper/workben/myucp/myucp_provider.cxx index 9fa3c1625fc2..7a82de0152f9 100644 --- a/ucbhelper/workben/myucp/myucp_provider.cxx +++ b/ucbhelper/workben/myucp/myucp_provider.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. @@ -100,10 +101,10 @@ XTYPEPROVIDER_IMPL_3( ContentProvider, // @@@ Adjust implementation name. Keep the prefix "com.sun.star.comp."! // @@@ Adjust service name. XSERVICEINFO_IMPL_1( ContentProvider, - rtl::OUString::createFromAscii( - "com.sun.star.comp.myucp.ContentProvider" ), - rtl::OUString::createFromAscii( - MYUCP_CONTENT_PROVIDER_SERVICE_NAME ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.myucp.ContentProvider" )), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + MYUCP_CONTENT_PROVIDER_SERVICE_NAME )) ); //========================================================================= // @@ -126,25 +127,11 @@ uno::Reference< ucb::XContent > SAL_CALL ContentProvider::queryContent( { // Check URL scheme... - rtl::OUString aScheme( rtl::OUString::createFromAscii( MYUCP_URL_SCHEME ) ); + rtl::OUString aScheme( RTL_CONSTASCII_USTRINGPARAM( MYUCP_URL_SCHEME ) ); if ( !Identifier->getContentProviderScheme().equalsIgnoreAsciiCase( aScheme ) ) throw ucb::IllegalIdentifierException(); - // @@@ Further id checks may go here... -#if 0 - if ( id-check-failes ) - throw ucb::IllegalIdentifierException(); -#endif - - // @@@ Id normalization may go here... -#if 0 - // Normalize URL and create new Id. - rtl::OUString aCanonicURL = xxxxx( Identifier->getContentIdentifier() ); - uno::Reference< ucb::XContentIdentifier > xCanonicId - = new ::ucbhelper::ContentIdentifier( m_xSMgr, aCanonicURL ); -#else uno::Reference< ucb::XContentIdentifier > xCanonicId = Identifier; -#endif osl::MutexGuard aGuard( m_aMutex ); @@ -169,3 +156,5 @@ uno::Reference< ucb::XContent > SAL_CALL ContentProvider::queryContent( } } // namespace + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucbhelper/workben/myucp/myucp_provider.hxx b/ucbhelper/workben/myucp/myucp_provider.hxx index 5fd9fe31ffad..729cb5a36687 100644 --- a/ucbhelper/workben/myucp/myucp_provider.hxx +++ b/ucbhelper/workben/myucp/myucp_provider.hxx @@ -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. @@ -93,3 +94,5 @@ public: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucbhelper/workben/myucp/myucp_resultset.cxx b/ucbhelper/workben/myucp/myucp_resultset.cxx index d5d45ddfb97c..370ed3e68a96 100644 --- a/ucbhelper/workben/myucp/myucp_resultset.cxx +++ b/ucbhelper/workben/myucp/myucp_resultset.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. @@ -95,3 +96,5 @@ void DynamicResultSet::initDynamic() } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucbhelper/workben/myucp/myucp_resultset.hxx b/ucbhelper/workben/myucp/myucp_resultset.hxx index 3430e944cb13..a36509f961ff 100644 --- a/ucbhelper/workben/myucp/myucp_resultset.hxx +++ b/ucbhelper/workben/myucp/myucp_resultset.hxx @@ -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. @@ -60,3 +61,5 @@ public: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucbhelper/workben/myucp/myucp_services.cxx b/ucbhelper/workben/myucp/myucp_services.cxx index a0cd8a00925b..6551ca755a12 100644 --- a/ucbhelper/workben/myucp/myucp_services.cxx +++ b/ucbhelper/workben/myucp/myucp_services.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. @@ -43,9 +44,9 @@ sal_Bool writeInfo( void * pRegistryKey, const rtl::OUString & rImplementationName, uno::Sequence< rtl::OUString > const & rServiceNames ) { - rtl::OUString aKeyName( rtl::OUString::createFromAscii( "/" ) ); + rtl::OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM("/") ); aKeyName += rImplementationName; - aKeyName += rtl::OUString::createFromAscii( "/UNO/SERVICES" ); + aKeyName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); uno::Reference< registry::XRegistryKey > xKey; try @@ -80,7 +81,7 @@ sal_Bool writeInfo( void * pRegistryKey, } //========================================================================= -extern "C" void SAL_CALL component_getImplementationEnvironment( +extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; @@ -103,7 +104,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( } //========================================================================= -extern "C" void * SAL_CALL component_getFactory( +extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { void * pRet = 0; @@ -134,3 +135,4 @@ extern "C" void * SAL_CALL component_getFactory( return pRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |