diff options
Diffstat (limited to 'ucbhelper/workben')
-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 | ||||
-rw-r--r-- | ucbhelper/workben/ucbexplorer/ucbexplorer.cxx | 75 | ||||
-rw-r--r-- | ucbhelper/workben/ucbexplorer/ucbexplorer.src | 20 |
12 files changed, 98 insertions, 149 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: */ diff --git a/ucbhelper/workben/ucbexplorer/ucbexplorer.cxx b/ucbhelper/workben/ucbexplorer/ucbexplorer.cxx index 4ca6cb71881d..cb2014091dac 100644 --- a/ucbhelper/workben/ucbexplorer/ucbexplorer.cxx +++ b/ucbhelper/workben/ucbexplorer/ucbexplorer.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. @@ -57,9 +58,7 @@ #include <ucbhelper/macros.hxx> #include <ucbhelper/configurationkeys.hxx> -#ifndef _UCBEXPLORER_HRC #include "ucbexplorer.hrc" -#endif using namespace com::sun::star; using namespace com::sun::star::beans; @@ -69,7 +68,8 @@ using namespace com::sun::star::sdbc; using namespace com::sun::star::task; using namespace com::sun::star::ucb; using namespace com::sun::star::uno; -using namespace rtl; + +using ::rtl::OUString; //========================================================================= // @@ -421,7 +421,7 @@ BOOL UcbExplorerListBoxEntry::createNewContent( const ContentInfo& rInfo, else { // See com/sun/star/ucb/ContentInfo.idl - DBG_ERROR( "UcbExplorerListBoxEntry::createNewContent - " + OSL_FAIL( "UcbExplorerListBoxEntry::createNewContent - " "Invlid type for bootstrap property!" ); } } @@ -446,8 +446,8 @@ BOOL UcbExplorerListBoxEntry::createNewContent( const ContentInfo& rInfo, ResMgr::CreateResMgr( CREATEVERSIONRESMGR_NAME( ucbexplorer ) ) ); StringInputDialog* pDlg = new StringInputDialog( *xManager.get(), - OUString::createFromAscii( - "Document Data Source URL" ), + OUString(RTL_CONSTASCII_USTRINGPARAM( + "Document Data Source URL" )), OUString() ); USHORT nRet = pDlg->Execute(); if ( nRet == RET_OK ) @@ -457,7 +457,7 @@ BOOL UcbExplorerListBoxEntry::createNewContent( const ContentInfo& rInfo, OUString aSourceURL( pDlg->GetValue() ); if ( aSourceURL.getLength() == 0 ) { - DBG_ERROR( "UcbExplorerListBoxEntry::createNewContent - " + OSL_FAIL( "UcbExplorerListBoxEntry::createNewContent - " "No document data URL!" ); return FALSE; } @@ -471,8 +471,8 @@ BOOL UcbExplorerListBoxEntry::createNewContent( const ContentInfo& rInfo, { uno::Reference< XInteractionHandler > xInteractionHandler( pBroker->getServiceManager()->createInstance( - OUString::createFromAscii( - "com.sun.star.task.InteractionHandler" ) ), + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.task.InteractionHandler" )) ), UNO_QUERY ); uno::Reference< XProgressHandler > xProgressHandler @@ -491,7 +491,7 @@ BOOL UcbExplorerListBoxEntry::createNewContent( const ContentInfo& rInfo, } catch ( ContentCreationException const & ) { - DBG_ERROR( "UcbExplorerListBoxEntry::createNewContent - " + OSL_FAIL( "UcbExplorerListBoxEntry::createNewContent - " "No content for document data!" ); return FALSE; } @@ -588,7 +588,7 @@ void UcbExplorerTreeListBox::RequestingChilds( SvLBoxEntry* pParent ) { Sequence< OUString > aPropertyNames( 0 ); // OUString* pNames = aPropertyNames.getArray(); -// pNames[ 0 ] = OUString::createFromAscii( "Title" ); +// pNames[ 0 ] = OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); uno::Reference< XResultSet > xResultSet = pEntry->m_aContent.createCursor( @@ -690,7 +690,7 @@ void UcbExplorerTreeListBox::Command( const CommandEvent& rCEvt ) { Property aProp = pEntry->m_aContent.getProperties()->getPropertyByName( - OUString::createFromAscii( "Title" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) ); bEnable = !( aProp.Attributes & PropertyAttribute::READONLY ); } catch( UnknownPropertyException const & ) @@ -720,8 +720,8 @@ void UcbExplorerTreeListBox::Command( const CommandEvent& rCEvt ) pMenu->EnableItem( MENU_DELETE, pEntry->m_aContent .getCommands()->hasCommandByName( - OUString::createFromAscii( - "delete" ) ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "delete" )) ) ); } catch ( CommandAbortedException const & ) { @@ -751,7 +751,7 @@ void UcbExplorerTreeListBox::Command( const CommandEvent& rCEvt ) try { pEntry->m_aContent.getPropertyValue( - OUString::createFromAscii( "Title" ) ) + OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) ) >>= aNewTitle; } catch ( CommandAbortedException const & ) @@ -770,7 +770,7 @@ void UcbExplorerTreeListBox::Command( const CommandEvent& rCEvt ) StringInputDialog* pDlg = new StringInputDialog( *xManager.get(), - OUString::createFromAscii( "Title" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), aNewTitle ); USHORT nRet = pDlg->Execute(); @@ -795,7 +795,7 @@ void UcbExplorerTreeListBox::Command( const CommandEvent& rCEvt ) try { pEntry->m_aContent.setPropertyValue( - OUString::createFromAscii( "Title" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), aValue ); bOK = sal_True; } @@ -819,7 +819,7 @@ void UcbExplorerTreeListBox::Command( const CommandEvent& rCEvt ) try { pEntry->m_aContent.getPropertyValue( - OUString::createFromAscii( "TargetURL" ) ) + OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")) ) >>= aTargetURL; } catch ( CommandAbortedException const & ) @@ -837,7 +837,7 @@ void UcbExplorerTreeListBox::Command( const CommandEvent& rCEvt ) if ( aTargetURL.getLength() > 0 ) { // Insert link. - aText += OUString::createFromAscii( " --> " ); + aText += OUString(RTL_CONSTASCII_USTRINGPARAM(" --> ")); aText += aTargetURL; } @@ -854,7 +854,7 @@ void UcbExplorerTreeListBox::Command( const CommandEvent& rCEvt ) try { pEntry->m_aContent.executeCommand( - OUString::createFromAscii( "delete" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("delete")), makeAny( sal_True ) ); } catch ( CommandAbortedException const & ) @@ -918,9 +918,9 @@ UcbExplorerListBoxEntry* UcbExplorerTreeListBox::InsertEntry( { OUString aTitle; rContent.getPropertyValue( - OUString::createFromAscii( "Title" ) ) >>= aTitle; + OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) ) >>= aTitle; if ( !aTitle.getLength() ) - aTitle = OUString::createFromAscii( "/" ); + aTitle = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); UcbExplorerListBoxEntry* pEntry = 0; @@ -941,7 +941,7 @@ UcbExplorerListBoxEntry* UcbExplorerTreeListBox::InsertEntry( try { rContent.getPropertyValue( - OUString::createFromAscii( "TargetURL" ) ) >>= aTargetURL; + OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")) ) >>= aTargetURL; } catch ( CommandAbortedException const & ) { @@ -958,7 +958,7 @@ UcbExplorerListBoxEntry* UcbExplorerTreeListBox::InsertEntry( if ( aTargetURL.getLength() > 0 ) { // Insert link. - aTitle += OUString::createFromAscii( " --> " ); + aTitle += OUString(RTL_CONSTASCII_USTRINGPARAM(" --> ")); aTitle += aTargetURL; pEntry = static_cast< UcbExplorerListBoxEntry * >( SvTreeListBox::InsertEntry( aTitle, @@ -1008,8 +1008,8 @@ UcbExplorerListBoxEntry* UcbExplorerTreeListBox::InsertEntry( { uno::Reference< XInteractionHandler > xInteractionHandler( pBroker->getServiceManager()->createInstance( - OUString::createFromAscii( - "com.sun.star.task.InteractionHandler" ) ), + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.task.InteractionHandler" )) ), UNO_QUERY ); uno::Reference< XProgressHandler > xProgressHandler @@ -1085,7 +1085,7 @@ void MyApp::Main() cppu::defaultBootstrap_InitialComponentContext() ); if ( !xCtx.is() ) { - DBG_ERROR( "Error creating initial component context!" ); + OSL_FAIL( "Error creating initial component context!" ); return; } @@ -1094,13 +1094,13 @@ void MyApp::Main() if ( !xFac.is() ) { - DBG_ERROR( "No service manager!" ); + OSL_FAIL( "No service manager!" ); return; } } catch ( com::sun::star::uno::Exception const & ) { - DBG_ERROR( "Exception during creation of initial component context!" ); + OSL_FAIL( "Exception during creation of initial component context!" ); return; } @@ -1115,23 +1115,23 @@ void MyApp::Main() #if 1 // Init UCB (Read configuration from registry) Sequence< Any > aArgs( 2 ); - aArgs[ 0 ] <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY1_LOCAL ); - aArgs[ 1 ] <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY2_OFFICE ); + aArgs[ 0 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY1_LOCAL )); + aArgs[ 1 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY2_OFFICE )); sal_Bool bSuccess = ::ucbhelper::ContentBroker::initialize( xFac, aArgs ); #else // Init UCB (Use provided configuration data) ::ucbhelper::ContentProviderDataList aProviders; aProviders.push_back( ::ucbhelper::ContentProviderData( - OUString::createFromAscii( "com.sun.star.ucb.FileContentProvider" ), - OUString::createFromAscii( "file" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.FileContentProvider")), + OUString(RTL_CONSTASCII_USTRINGPARAM("file")), OUString() ) ); sal_Bool bSuccess = ::ucbhelper::ContentBroker::initialize( xFac, aProviders ); #endif if ( !bSuccess ) { - DBG_ERROR( "Error creating UCB!" ); + OSL_FAIL( "Error creating UCB!" ); return; } @@ -1147,12 +1147,6 @@ void MyApp::Main() MenuBar aMBMain( ResId( MENU_MAIN, *xManager.get() ) ); // Check for command line params -#if 0 - for ( int i = 0; i < GetCommandLineParamCount(); ++i ) - { - String aPara = GetCommandLineParam( i ); - } -#endif String aRootURL = GetCommandLineParam( 0 ); if ( aRootURL.Len() == 0 ) @@ -1198,3 +1192,4 @@ void MyApp::Main() MyApp aMyApp; +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucbhelper/workben/ucbexplorer/ucbexplorer.src b/ucbhelper/workben/ucbexplorer/ucbexplorer.src index 523813324710..aac9b6ac8571 100644 --- a/ucbhelper/workben/ucbexplorer/ucbexplorer.src +++ b/ucbhelper/workben/ucbexplorer/ucbexplorer.src @@ -79,25 +79,6 @@ Menu MENU_POPUP }; }; -/* -Bitmap BMP_FOLDER_CLOSED -{ - File = "bmp/fldclose.bmp" ; -}; -Bitmap BMP_FOLDER_OPENED -{ - File = "bmp/fldopen.bmp" ; -}; -Bitmap BMP_DOCUMENT -{ - File = "bmp/document.bmp" ; -}; -Bitmap BMP_LINK -{ - File = "bmp/link.bmp" ; -}; -*/ - ModalDialog DLG_STRINGINPUT { HelpID = "ucbhelper:ModalDialog:DLG_STRINGINPUT"; @@ -148,4 +129,3 @@ String TEXT_TITLEBAR { Text [ en-US ] = "UCB Explorer" ; }; - |