diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2011-02-11 17:26:38 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2011-02-11 17:26:38 -0600 |
commit | a763c1a8e32bcb03424aab1fe59be1c42538c5b0 (patch) | |
tree | 17455120afb234de0c1bb6ab99292b69d4a976cf | |
parent | 028aaeb7f810dbfc98a2b3bc573029dbc67b7a58 (diff) |
merge non-conflicting changes to embeddedobj, eventattacher and fileaccess
58 files changed, 533 insertions, 620 deletions
diff --git a/embeddedobj/inc/pch/precompiled_embeddedobj.cxx b/embeddedobj/inc/pch/precompiled_embeddedobj.cxx index aef2e4e3a9..8ff0bded12 100644 --- a/embeddedobj/inc/pch/precompiled_embeddedobj.cxx +++ b/embeddedobj/inc/pch/precompiled_embeddedobj.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. @@ -27,3 +28,4 @@ #include "precompiled_embeddedobj.hxx" +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/inc/pch/precompiled_embeddedobj.hxx b/embeddedobj/inc/pch/precompiled_embeddedobj.hxx index 883dcf44f5..eacc88bf09 100644 --- a/embeddedobj/inc/pch/precompiled_embeddedobj.hxx +++ b/embeddedobj/inc/pch/precompiled_embeddedobj.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. @@ -30,3 +31,4 @@ #ifdef PRECOMPILED_HEADERS #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx index b4b1be4b15..3c4cfc9846 100644 --- a/embeddedobj/source/commonembedding/embedobj.cxx +++ b/embeddedobj/source/commonembedding/embedobj.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. @@ -112,7 +113,7 @@ void OCommonEmbeddedObject::Deactivate() catch( uno::Exception& e ) { throw embed::StorageWrappedTargetException( - ::rtl::OUString::createFromAscii( "The client could not store the object!" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The client could not store the object!" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ), uno::makeAny( e ) ); } @@ -396,7 +397,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) } } else - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object is in unacceptable state!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is in unacceptable state!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -409,7 +410,7 @@ uno::Sequence< sal_Int32 > OCommonEmbeddedObject::GetIntermediateStatesSequence_ break; if ( nCurInd == m_aAcceptedStates.getLength() ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object is in unacceptable state!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is in unacceptable state!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); sal_Int32 nDestInd = 0; @@ -419,7 +420,7 @@ uno::Sequence< sal_Int32 > OCommonEmbeddedObject::GetIntermediateStatesSequence_ if ( nDestInd == m_aAcceptedStates.getLength() ) throw embed::UnreachableStateException( - ::rtl::OUString::createFromAscii( "The state either not reachable, or the object allows the state only as an intermediate one!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The state either not reachable, or the object allows the state only as an intermediate one!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), m_nObjectState, nNewState ); @@ -443,7 +444,7 @@ void SAL_CALL OCommonEmbeddedObject::changeState( sal_Int32 nNewState ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); sal_Int32 nOldState = m_nObjectState; @@ -510,7 +511,7 @@ uno::Sequence< sal_Int32 > SAL_CALL OCommonEmbeddedObject::getReachableStates() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_aAcceptedStates; @@ -525,7 +526,7 @@ sal_Int32 SAL_CALL OCommonEmbeddedObject::getCurrentState() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_nObjectState; @@ -546,7 +547,7 @@ void SAL_CALL OCommonEmbeddedObject::doVerb( sal_Int32 nVerbID ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // for internal documents this call is just a duplicate of changeState @@ -579,7 +580,7 @@ uno::Sequence< embed::VerbDescriptor > SAL_CALL OCommonEmbeddedObject::getSuppor throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_aObjectVerbs; @@ -599,7 +600,7 @@ void SAL_CALL OCommonEmbeddedObject::setClientSite( { if ( m_nObjectState != embed::EmbedStates::LOADED && m_nObjectState != embed::EmbedStates::RUNNING ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The client site can not be set currently!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The client site can not be set currently!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); m_xClientSite = xClient; @@ -615,7 +616,7 @@ uno::Reference< embed::XEmbeddedClient > SAL_CALL OCommonEmbeddedObject::getClie throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_xClientSite; @@ -632,7 +633,7 @@ void SAL_CALL OCommonEmbeddedObject::update() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); PostEvent_Impl( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnVisAreaChanged" ) ), @@ -649,7 +650,7 @@ void SAL_CALL OCommonEmbeddedObject::setUpdateMode( sal_Int32 nMode ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); OSL_ENSURE( nMode == embed::EmbedUpdateModes::ALWAYS_UPDATE @@ -702,3 +703,5 @@ void SAL_CALL OCommonEmbeddedObject::setDefaultSize( const ::com::sun::star::awt //#i103460# charts do not necessaryly have an own size within ODF files, in this case they need to use the size settings from the surrounding frame, which is made available with this method m_aDefaultSizeForChart_In_100TH_MM = rSize_100TH_MM; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/commonembedding/inplaceobj.cxx b/embeddedobj/source/commonembedding/inplaceobj.cxx index 9409c02a7b..bec36d34a0 100644 --- a/embeddedobj/source/commonembedding/inplaceobj.cxx +++ b/embeddedobj/source/commonembedding/inplaceobj.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,7 +57,7 @@ void SAL_CALL OCommonEmbeddedObject::setObjectRectangles( const awt::Rectangle& if ( m_nObjectState != embed::EmbedStates::INPLACE_ACTIVE && m_nObjectState != embed::EmbedStates::UI_ACTIVE ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object is not activated inplace!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not activated inplace!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); awt::Rectangle aNewRectToShow = GetRectangleInterception( aPosRect, aClipRect ); @@ -87,3 +88,4 @@ void SAL_CALL OCommonEmbeddedObject::translateAccelerators( // TODO: UI activation related } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx index 3e0ba1c600..2396854bb7 100644 --- a/embeddedobj/source/commonembedding/miscobj.cxx +++ b/embeddedobj/source/commonembedding/miscobj.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. @@ -116,15 +117,15 @@ void OCommonEmbeddedObject::CommonInit_Impl( const uno::Sequence< beans::NamedVa // TODO/LATER: in future UI names can be also provided here for ( sal_Int32 nInd = 0; nInd < aObjectProps.getLength(); nInd++ ) { - if ( aObjectProps[nInd].Name.equalsAscii( "ClassID" ) ) + if ( aObjectProps[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ClassID" ) ) ) aObjectProps[nInd].Value >>= m_aClassID; - else if ( aObjectProps[nInd].Name.equalsAscii( "ObjectDocumentServiceName" ) ) + else if ( aObjectProps[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ObjectDocumentServiceName" ) ) ) aObjectProps[nInd].Value >>= m_aDocServiceName; - else if ( aObjectProps[nInd].Name.equalsAscii( "ObjectDocumentFilterName" ) ) + else if ( aObjectProps[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ObjectDocumentFilterName" ) ) ) aObjectProps[nInd].Value >>= m_aPresetFilterName; - else if ( aObjectProps[nInd].Name.equalsAscii( "ObjectMiscStatus" ) ) + else if ( aObjectProps[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ObjectMiscStatus" ) ) ) aObjectProps[nInd].Value >>= m_nMiscStatus; - else if ( aObjectProps[nInd].Name.equalsAscii( "ObjectVerbs" ) ) + else if ( aObjectProps[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ObjectVerbs" ) ) ) aObjectProps[nInd].Value >>= m_aObjectVerbs; } @@ -234,9 +235,9 @@ void OCommonEmbeddedObject::LinkInit_Impl( // setPersistance has no effect on own links, so the complete initialization must be done here for ( sal_Int32 nInd = 0; nInd < aMediaDescr.getLength(); nInd++ ) - if ( aMediaDescr[nInd].Name.equalsAscii( "URL" ) ) + if ( aMediaDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) ) aMediaDescr[nInd].Value >>= m_aLinkURL; - else if ( aMediaDescr[nInd].Name.equalsAscii( "FilterName" ) ) + else if ( aMediaDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterName" ) ) ) aMediaDescr[nInd].Value >>= m_aLinkFilterName; OSL_ENSURE( m_aLinkURL.getLength() && m_aLinkFilterName.getLength(), "Filter and URL must be provided!\n" ); @@ -253,12 +254,12 @@ void OCommonEmbeddedObject::LinkInit_Impl( uno::Reference< frame::XDispatchProviderInterceptor > xDispatchInterceptor; for ( sal_Int32 nObjInd = 0; nObjInd < aObjectDescr.getLength(); nObjInd++ ) - if ( aObjectDescr[nObjInd].Name.equalsAscii( "OutplaceDispatchInterceptor" ) ) + if ( aObjectDescr[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OutplaceDispatchInterceptor" ) ) ) { aObjectDescr[nObjInd].Value >>= xDispatchInterceptor; break; } - else if ( aObjectDescr[nObjInd].Name.equalsAscii( "Parent" ) ) + else if ( aObjectDescr[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Parent" ) ) ) { aObjectDescr[nObjInd].Value >>= m_xParent; } @@ -514,7 +515,7 @@ uno::Reference< util::XCloseable > SAL_CALL OCommonEmbeddedObject::getComponent( if ( m_nObjectState == -1 ) { // the object is still not loaded - throw uno::RuntimeException( ::rtl::OUString::createFromAscii( "Can't store object without persistence!\n" ), + throw uno::RuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -705,3 +706,4 @@ void SAL_CALL OCommonEmbeddedObject::removeEventListener( const uno::Reference< xListener ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx index 578874bd1f..894bb46adb 100644 --- a/embeddedobj/source/commonembedding/persistence.cxx +++ b/embeddedobj/source/commonembedding/persistence.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. @@ -48,9 +49,7 @@ #include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/util/XModifiable.hpp> -#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCEESS_HPP_ #include <com/sun/star/container/XNameAccess.hpp> -#endif #include <com/sun/star/container/XChild.hpp> #include <com/sun/star/util/XCloseable.hpp> #include <com/sun/star/beans/XPropertySet.hpp> @@ -80,21 +79,21 @@ uno::Sequence< beans::PropertyValue > GetValuableArgs_Impl( const uno::Sequence< for ( sal_Int32 nInd = 0; nInd < aMedDescr.getLength(); nInd++ ) { - if ( aMedDescr[nInd].Name.equalsAscii( "ComponentData" ) - || aMedDescr[nInd].Name.equalsAscii( "DocumentTitle" ) - || aMedDescr[nInd].Name.equalsAscii( "InteractionHandler" ) - || aMedDescr[nInd].Name.equalsAscii( "JumpMark" ) - // || aMedDescr[nInd].Name.equalsAscii( "Password" ) makes no sence for embedded objects - || aMedDescr[nInd].Name.equalsAscii( "Preview" ) - || aMedDescr[nInd].Name.equalsAscii( "ReadOnly" ) - || aMedDescr[nInd].Name.equalsAscii( "StartPresentation" ) - || aMedDescr[nInd].Name.equalsAscii( "RepairPackage" ) - || aMedDescr[nInd].Name.equalsAscii( "StatusIndicator" ) - || aMedDescr[nInd].Name.equalsAscii( "ViewData" ) - || aMedDescr[nInd].Name.equalsAscii( "ViewId" ) - || aMedDescr[nInd].Name.equalsAscii( "MacroExecutionMode" ) - || aMedDescr[nInd].Name.equalsAscii( "UpdateDocMode" ) - || (aMedDescr[nInd].Name.equalsAscii( "DocumentBaseURL" ) && bCanUseDocumentBaseURL) ) + if ( aMedDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ComponentData" ) ) + || aMedDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DocumentTitle" ) ) + || aMedDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InteractionHandler" ) ) + || aMedDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "JumpMark" ) ) + // || aMedDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Password" ) ) makes no sence for embedded objects + || aMedDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Preview" ) ) + || aMedDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ReadOnly" ) ) + || aMedDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StartPresentation" ) ) + || aMedDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RepairPackage" ) ) + || aMedDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StatusIndicator" ) ) + || aMedDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ViewData" ) ) + || aMedDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ViewId" ) ) + || aMedDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MacroExecutionMode" ) ) + || aMedDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UpdateDocMode" ) ) + || (aMedDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DocumentBaseURL" ) ) && bCanUseDocumentBaseURL) ) { aResult.realloc( ++nResLen ); aResult[nResLen-1] = aMedDescr[nInd]; @@ -114,7 +113,7 @@ uno::Sequence< beans::PropertyValue > addAsTemplate( const uno::Sequence< beans: for ( sal_Int32 nInd = 0; nInd < nLength; nInd++ ) { aResult[nInd].Name = aOrig[nInd].Name; - if ( aResult[nInd].Name.equalsAscii( "AsTemplate" ) ) + if ( aResult[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "AsTemplate" ) ) ) { aResult[nInd].Value <<= sal_True; bAsTemplateSet = sal_True; @@ -126,7 +125,7 @@ uno::Sequence< beans::PropertyValue > addAsTemplate( const uno::Sequence< beans: if ( !bAsTemplateSet ) { aResult.realloc( nLength + 1 ); - aResult[nLength].Name = ::rtl::OUString::createFromAscii( "AsTemplate" ); + aResult[nLength].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "AsTemplate" )); aResult[nLength].Value <<= sal_True; } @@ -149,7 +148,7 @@ uno::Reference< io::XInputStream > createTempInpStreamFromStor( if ( xTempStream.is() ) { uno::Reference < lang::XSingleServiceFactory > xStorageFactory( - xFactory->createInstance ( ::rtl::OUString::createFromAscii( "com.sun.star.embed.StorageFactory" ) ), + xFactory->createInstance ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.StorageFactory" )) ), uno::UNO_QUERY ); uno::Sequence< uno::Any > aArgs( 2 ); @@ -166,7 +165,7 @@ uno::Reference< io::XInputStream > createTempInpStreamFromStor( } catch( uno::Exception& e ) { throw embed::StorageWrappedTargetException( - ::rtl::OUString::createFromAscii( "Can't copy storage!" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't copy storage!" )), uno::Reference< uno::XInterface >(), uno::makeAny( e ) ); } @@ -246,7 +245,7 @@ static void SetDocToEmbedded( const uno::Reference< frame::XModel > xDocument, c if ( xDocument.is() ) { uno::Sequence< beans::PropertyValue > aSeq( 1 ); - aSeq[0].Name = ::rtl::OUString::createFromAscii( "SetEmbedded" ); + aSeq[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "SetEmbedded" )); aSeq[0].Value <<= sal_True; xDocument->attachResource( ::rtl::OUString(), aSeq ); @@ -404,9 +403,9 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::LoadLink_Impl() sal_Int32 nLen = 2; uno::Sequence< beans::PropertyValue > aArgs( nLen ); - aArgs[0].Name = ::rtl::OUString::createFromAscii( "URL" ); + aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "URL" )); aArgs[0].Value <<= m_aLinkURL; - aArgs[1].Name = ::rtl::OUString::createFromAscii( "FilterName" ); + aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); aArgs[1].Value <<= m_aLinkFilterName; if ( m_bLinkHasPassword ) { @@ -541,7 +540,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::LoadDocumentFromStorag // no need to let the file stay after the stream is removed since the embedded document // can not be stored directly uno::Reference< beans::XPropertySet > xTempStreamProps( xTempInpStream, uno::UNO_QUERY_THROW ); - xTempStreamProps->getPropertyValue( ::rtl::OUString::createFromAscii( "Uri" ) ) >>= aTempFileURL; + xTempStreamProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri" )) ) >>= aTempFileURL; } catch( uno::Exception& ) { @@ -599,7 +598,7 @@ uno::Reference< io::XInputStream > OCommonEmbeddedObject::StoreDocumentToTempStr const ::rtl::OUString& aHierarchName ) { uno::Reference < io::XOutputStream > xTempOut( - m_xFactory->createInstance ( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ) ), + m_xFactory->createInstance ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.TempFile" )) ), uno::UNO_QUERY ); uno::Reference< io::XInputStream > aResult( xTempOut, uno::UNO_QUERY ); @@ -623,16 +622,16 @@ uno::Reference< io::XInputStream > OCommonEmbeddedObject::StoreDocumentToTempStr throw io::IOException(); // TODO: uno::Sequence< beans::PropertyValue > aArgs( 4 ); - aArgs[0].Name = ::rtl::OUString::createFromAscii( "FilterName" ); + aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); aArgs[0].Value <<= aFilterName; - aArgs[1].Name = ::rtl::OUString::createFromAscii( "OutputStream" ); + aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OutputStream" )); aArgs[1].Value <<= xTempOut; - aArgs[2].Name = ::rtl::OUString::createFromAscii( "DocumentBaseURL" ); + aArgs[2].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DocumentBaseURL" )); aArgs[2].Value <<= aBaseURL; - aArgs[3].Name = ::rtl::OUString::createFromAscii( "HierarchicalDocumentName" ); + aArgs[3].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HierarchicalDocumentName" )); aArgs[3].Value <<= aHierarchName; - xStorable->storeToURL( ::rtl::OUString::createFromAscii( "private:stream" ), aArgs ); + xStorable->storeToURL( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "private:stream" )), aArgs ); try { xTempOut->closeOutput(); @@ -785,11 +784,11 @@ void OCommonEmbeddedObject::StoreDocToStorage_Impl( const uno::Reference< embed: throw io::IOException(); // TODO: uno::Sequence< beans::PropertyValue > aArgs( 3 ); - aArgs[0].Name = ::rtl::OUString::createFromAscii( "FilterName" ); + aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); aArgs[0].Value <<= aFilterName; - aArgs[2].Name = ::rtl::OUString::createFromAscii( "DocumentBaseURL" ); + aArgs[2].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DocumentBaseURL" )); aArgs[2].Value <<= aBaseURL; - aArgs[1].Name = ::rtl::OUString::createFromAscii( "HierarchicalDocumentName" ); + aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HierarchicalDocumentName" )); aArgs[1].Value <<= aHierarchName; xDoc->storeToStorage( xStorage, aArgs ); @@ -806,7 +805,7 @@ void OCommonEmbeddedObject::StoreDocToStorage_Impl( const uno::Reference< embed: // open storage based on document temporary file for reading uno::Reference < lang::XSingleServiceFactory > xStorageFactory( - m_xFactory->createInstance ( ::rtl::OUString::createFromAscii( "com.sun.star.embed.StorageFactory" ) ), + m_xFactory->createInstance ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.StorageFactory" )) ), uno::UNO_QUERY ); uno::Sequence< uno::Any > aArgs(1); @@ -895,7 +894,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::CreateTempDocFromLink_ // no need to let the file stay after the stream is removed since the embedded document // can not be stored directly uno::Reference< beans::XPropertySet > xTempStreamProps( xTempStream, uno::UNO_QUERY_THROW ); - xTempStreamProps->getPropertyValue( ::rtl::OUString::createFromAscii( "Uri" ) ) >>= aTempFileURL; + xTempStreamProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri" )) ) >>= aTempFileURL; } catch( uno::Exception& ) { @@ -903,24 +902,22 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::CreateTempDocFromLink_ OSL_ENSURE( aTempFileURL.getLength(), "Coudn't retrieve temporary file URL!\n" ); - aTempMediaDescr[0].Name = ::rtl::OUString::createFromAscii( "URL" ); + aTempMediaDescr[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "URL" )); aTempMediaDescr[0].Value <<= aTempFileURL; - aTempMediaDescr[1].Name = ::rtl::OUString::createFromAscii( "InputStream" ); + aTempMediaDescr[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "InputStream" )); aTempMediaDescr[1].Value <<= xTempStream; - aTempMediaDescr[2].Name = ::rtl::OUString::createFromAscii( "FilterName" ); + aTempMediaDescr[2].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); aTempMediaDescr[2].Value <<= GetFilterName( nStorageFormat ); - aTempMediaDescr[3].Name = ::rtl::OUString::createFromAscii( "AsTemplate" ); + aTempMediaDescr[3].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "AsTemplate" )); aTempMediaDescr[3].Value <<= sal_True; } else { aTempMediaDescr.realloc( 2 ); - aTempMediaDescr[0].Name = ::rtl::OUString::createFromAscii( "URL" ); + aTempMediaDescr[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "URL" )); aTempMediaDescr[0].Value <<= m_aLinkURL; - aTempMediaDescr[1].Name = ::rtl::OUString::createFromAscii( "FilterName" ); + aTempMediaDescr[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); aTempMediaDescr[1].Value <<= m_aLinkFilterName; - // aTempMediaDescr[2].Name = ::rtl::OUString::createFromAscii( "AsTemplate" ); - // aTempMediaDescr[2].Value <<= sal_True; } xResult = CreateDocFromMediaDescr_Impl( aTempMediaDescr ); @@ -951,12 +948,12 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( throw lang::DisposedException(); // TODO if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -971,7 +968,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( // it can switch persistant representation only without initialization throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "Can't change persistant representation of activated object!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't change persistant representation of activated object!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -995,7 +992,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( } else throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1020,32 +1017,32 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( m_bReadOnly = sal_False; for ( sal_Int32 nInd = 0; nInd < lArguments.getLength(); nInd++ ) - if ( lArguments[nInd].Name.equalsAscii( "ReadOnly" ) ) + if ( lArguments[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ReadOnly" ) ) ) lArguments[nInd].Value >>= m_bReadOnly; // TODO: use lObjArgs for StoreVisualReplacement for ( sal_Int32 nObjInd = 0; nObjInd < lObjArgs.getLength(); nObjInd++ ) - if ( lObjArgs[nObjInd].Name.equalsAscii( "OutplaceDispatchInterceptor" ) ) + if ( lObjArgs[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OutplaceDispatchInterceptor" ) ) ) { uno::Reference< frame::XDispatchProviderInterceptor > xDispatchInterceptor; if ( lObjArgs[nObjInd].Value >>= xDispatchInterceptor ) m_pDocHolder->SetOutplaceDispatchInterceptor( xDispatchInterceptor ); } - else if ( lObjArgs[nObjInd].Name.equalsAscii( "DefaultParentBaseURL" ) ) + else if ( lObjArgs[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DefaultParentBaseURL" ) ) ) { lObjArgs[nObjInd].Value >>= m_aDefaultParentBaseURL; } - else if ( lObjArgs[nObjInd].Name.equalsAscii( "Parent" ) ) + else if ( lObjArgs[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Parent" ) ) ) { lObjArgs[nObjInd].Value >>= m_xParent; } - else if ( lObjArgs[nObjInd].Name.equalsAscii( "IndividualMiscStatus" ) ) + else if ( lObjArgs[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IndividualMiscStatus" ) ) ) { sal_Int64 nMiscStatus=0; lObjArgs[nObjInd].Value >>= nMiscStatus; m_nMiscStatus |= nMiscStatus; } - else if ( lObjArgs[nObjInd].Name.equalsAscii( "CloneFrom" ) ) + else if ( lObjArgs[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CloneFrom" ) ) ) { uno::Reference < embed::XEmbeddedObject > xObj; lObjArgs[nObjInd].Value >>= xObj; @@ -1056,7 +1053,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( m_nClonedMapUnit = xObj->getMapUnit( embed::Aspects::MSOLE_CONTENT ); } } - else if ( lObjArgs[nObjInd].Name.equalsAscii( "OutplaceFrameProperties" ) ) + else if ( lObjArgs[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OutplaceFrameProperties" ) ) ) { uno::Sequence< uno::Any > aOutFrameProps; uno::Sequence< beans::NamedValue > aOutFramePropsTyped; @@ -1080,11 +1077,11 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( else OSL_ENSURE( false, "OCommonEmbeddedObject::setPersistentEntry: illegal type for argument 'OutplaceFrameProperties'!" ); } - else if ( lObjArgs[nObjInd].Name.equalsAscii( "ModuleName" ) ) + else if ( lObjArgs[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ModuleName" ) ) ) { lObjArgs[nObjInd].Value >>= m_aModuleName; } - else if ( lObjArgs[nObjInd].Name.equalsAscii( "EmbeddedScriptSupport" ) ) + else if ( lObjArgs[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "EmbeddedScriptSupport" ) ) ) { OSL_VERIFY( lObjArgs[nObjInd].Value >>= m_bEmbeddedScriptSupport ); } @@ -1152,7 +1149,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( //TODO: //} else - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Wrong connection mode is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Wrong connection mode is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); } @@ -1178,13 +1175,13 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed:: if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Can't store object without persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // for now support of this interface is required to allow breaking of links and converting them to normal embedded @@ -1226,7 +1223,7 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed:: for ( sal_Int32 nInd = 0; nInd < lObjArgs.getLength(); nInd++ ) { // StoreVisualReplacement and VisualReplacement args have no sence here - if ( lObjArgs[nInd].Name.equalsAscii( "CanTryOptimization" ) ) + if ( lObjArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CanTryOptimization" ) ) ) lObjArgs[nInd].Value >>= bTryOptimization; } @@ -1306,13 +1303,13 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed:: if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Can't store object without persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // for now support of this interface is required to allow breaking of links and converting them to normal embedded @@ -1353,13 +1350,13 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed:: OSL_ENSURE( sal_False, "Can not retrieve own storage media type!\n" ); } - PostEvent_Impl( ::rtl::OUString::createFromAscii( "OnSaveAs" ) ); + PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveAs" )) ); sal_Bool bTryOptimization = sal_False; for ( sal_Int32 nInd = 0; nInd < lObjArgs.getLength(); nInd++ ) { // StoreVisualReplacement and VisualReplacement args have no sence here - if ( lObjArgs[nInd].Name.equalsAscii( "CanTryOptimization" ) ) + if ( lObjArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CanTryOptimization" ) ) ) lObjArgs[nInd].Value >>= bTryOptimization; } @@ -1441,7 +1438,7 @@ void SAL_CALL OCommonEmbeddedObject::saveCompleted( sal_Bool bUseNew ) if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Can't store object without persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1477,7 +1474,7 @@ void SAL_CALL OCommonEmbeddedObject::saveCompleted( sal_Bool bUseNew ) if ( xModif.is() ) xModif->setModified( sal_False ); - PostEvent_Impl( ::rtl::OUString::createFromAscii( "OnSaveAsDone" ) ); + PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveAsDone" ) )); } else { @@ -1520,7 +1517,7 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::hasEntry() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_xObjectStorage.is() ) @@ -1541,13 +1538,13 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::hasEntry() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object persistence is not initialized!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object persistence is not initialized!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_aEntryName; @@ -1573,13 +1570,13 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Can't store object without persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_bReadOnly ) @@ -1589,7 +1586,7 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn() if ( m_nObjectState == embed::EmbedStates::LOADED ) return; - PostEvent_Impl( ::rtl::OUString::createFromAscii( "OnSave" ) ); + PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSave" )) ); OSL_ENSURE( m_pDocHolder->GetComponent().is(), "If an object is activated or in running state it must have a document!\n" ); if ( !m_pDocHolder->GetComponent().is() ) @@ -1638,7 +1635,7 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn() if ( xModif.is() ) xModif->setModified( sal_False ); - PostEvent_Impl( ::rtl::OUString::createFromAscii( "OnSaveDone" ) ); + PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveDone" )) ); } //------------------------------------------------------ @@ -1653,13 +1650,13 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::isReadonly() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object persistence is not initialized!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object persistence is not initialized!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_bReadOnly; @@ -1685,7 +1682,7 @@ void SAL_CALL OCommonEmbeddedObject::reload( if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object persistence is not initialized!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object persistence is not initialized!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1693,13 +1690,13 @@ void SAL_CALL OCommonEmbeddedObject::reload( { // the object is still not loaded throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object must be in loaded state to be reloaded!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object must be in loaded state to be reloaded!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_bIsLink ) @@ -1710,13 +1707,13 @@ void SAL_CALL OCommonEmbeddedObject::reload( ::rtl::OUString aNewLinkFilter; for ( sal_Int32 nInd = 0; nInd < lArguments.getLength(); nInd++ ) { - if ( lArguments[nInd].Name.equalsAscii( "URL" ) ) + if ( lArguments[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) ) { // the new URL lArguments[nInd].Value >>= m_aLinkURL; m_aLinkFilterName = ::rtl::OUString(); } - else if ( lArguments[nInd].Name.equalsAscii( "FilterName" ) ) + else if ( lArguments[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterName" ) ) ) { lArguments[nInd].Value >>= aNewLinkFilter; m_aLinkFilterName = ::rtl::OUString(); @@ -1753,7 +1750,7 @@ void SAL_CALL OCommonEmbeddedObject::reload( // TODO: use lObjArgs for StoreVisualReplacement for ( sal_Int32 nObjInd = 0; nObjInd < lObjArgs.getLength(); nObjInd++ ) - if ( lObjArgs[nObjInd].Name.equalsAscii( "OutplaceDispatchInterceptor" ) ) + if ( lObjArgs[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OutplaceDispatchInterceptor" ) ) ) { uno::Reference< frame::XDispatchProviderInterceptor > xDispatchInterceptor; if ( lObjArgs[nObjInd].Value >>= xDispatchInterceptor ) @@ -1769,7 +1766,7 @@ void SAL_CALL OCommonEmbeddedObject::reload( m_bReadOnly = sal_False; for ( sal_Int32 nInd = 0; nInd < lArguments.getLength(); nInd++ ) - if ( lArguments[nInd].Name.equalsAscii( "ReadOnly" ) ) + if ( lArguments[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ReadOnly" ) ) ) lArguments[nInd].Value >>= m_bReadOnly; if ( bOldReadOnlyValue != m_bReadOnly && !m_bIsLink ) @@ -1807,25 +1804,22 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt { // it must be a linked initialized object throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object is not a valid linked object!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not a valid linked object!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } -#if 0 else { // the current implementation of OOo links does not implement this method since it does not implement // all the set of interfaces required for OOo embedded object ( XEmbedPersist is not supported ). - throw io::IOException(); // TODO: } -#endif if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -1833,13 +1827,13 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt { // it must be a linked initialized object throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object is not a valid linked object!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not a valid linked object!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); uno::Reference< container::XNameAccess > xNameAccess( xStorage, uno::UNO_QUERY ); @@ -1897,12 +1891,6 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::isLink() if ( m_bDisposed ) throw lang::DisposedException(); // TODO - // Actually this information is clear even in case object is wayting for saveCompleted - // if ( m_bWaitSaveCompleted ) - // throw embed::WrongStateException( - // ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), - // uno::Reference< uno::XInterface >( reinterpret_cast< ::cppu::OWeakObject* >(this) ) ); - return m_bIsLink; } @@ -1916,17 +1904,12 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::isLink() if ( m_bDisposed ) throw lang::DisposedException(); // TODO - // Actually this information is clear even in case object is wayting for saveCompleted - // if ( m_bWaitSaveCompleted ) - // throw embed::WrongStateException( - // ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), - // uno::Reference< uno::XInterface >( reinterpret_cast< ::cppu::OWeakObject* >(this) ) ); - if ( !m_bIsLink ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object is not a link object!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not a link object!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_aLinkURL; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/commonembedding/register.cxx b/embeddedobj/source/commonembedding/register.cxx index ba6eadb25b..8fc269617b 100644 --- a/embeddedobj/source/commonembedding/register.cxx +++ b/embeddedobj/source/commonembedding/register.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. @@ -89,3 +90,4 @@ void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServic } // extern "C" +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/commonembedding/specialobject.cxx b/embeddedobj/source/commonembedding/specialobject.cxx index 46466dbc40..cb54cc48b9 100644 --- a/embeddedobj/source/commonembedding/specialobject.cxx +++ b/embeddedobj/source/commonembedding/specialobject.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. @@ -117,13 +118,13 @@ embed::VisualRepresentation SAL_CALL OSpecialEmbeddedObject::getPreferredVisualR // TODO: if object is in loaded state it should switch itself to the running state if ( m_nObjectState == -1 || m_nObjectState == embed::EmbedStates::LOADED ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The own object has no model!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The own object has no model!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // TODO: return for the aspect of the document @@ -135,8 +136,8 @@ embed::VisualRepresentation SAL_CALL OSpecialEmbeddedObject::getPreferredVisualR throw uno::RuntimeException(); datatransfer::DataFlavor aDataFlavor( - ::rtl::OUString::createFromAscii( "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"" ), - ::rtl::OUString::createFromAscii( "GDIMetaFile" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"" )), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "GDIMetaFile" )), ::getCppuType( (const uno::Sequence< sal_Int8 >*) NULL ) ); aVisualRepresentation.Data = xTransferable->getTransferData( aDataFlavor ); @@ -157,7 +158,7 @@ void SAL_CALL OSpecialEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, cons OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); maSize = aSize; @@ -176,11 +177,11 @@ awt::Size SAL_CALL OSpecialEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The own object has no model!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The own object has no model!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); awt::Size aResult; @@ -198,7 +199,7 @@ sal_Int32 SAL_CALL OSpecialEmbeddedObject::getMapUnit( sal_Int64 nAspect ) OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return embed::EmbedMapUnits::ONE_100TH_MM; @@ -227,7 +228,7 @@ void SAL_CALL OSpecialEmbeddedObject::doVerb( sal_Int32 nVerbID ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( nVerbID == -7 ) @@ -243,3 +244,4 @@ void SAL_CALL OSpecialEmbeddedObject::doVerb( sal_Int32 nVerbID ) OCommonEmbeddedObject::doVerb( nVerbID ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/commonembedding/visobj.cxx b/embeddedobj/source/commonembedding/visobj.cxx index 5b5c2479f2..3403c81614 100644 --- a/embeddedobj/source/commonembedding/visobj.cxx +++ b/embeddedobj/source/commonembedding/visobj.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,11 +57,11 @@ void SAL_CALL OCommonEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The own object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The own object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); m_bHasClonedSize = sal_False; @@ -96,7 +97,7 @@ awt::Size SAL_CALL OCommonEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The own object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The own object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); @@ -136,11 +137,11 @@ sal_Int32 SAL_CALL OCommonEmbeddedObject::getMapUnit( sal_Int64 nAspect ) OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The own object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The own object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_bHasClonedSize ) @@ -179,14 +180,14 @@ embed::VisualRepresentation SAL_CALL OCommonEmbeddedObject::getPreferredVisualRe throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The own object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The own object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); sal_Bool bBackToLoaded = sal_False; @@ -215,8 +216,8 @@ embed::VisualRepresentation SAL_CALL OCommonEmbeddedObject::getPreferredVisualRe throw uno::RuntimeException(); datatransfer::DataFlavor aDataFlavor( - ::rtl::OUString::createFromAscii( "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"" ), - ::rtl::OUString::createFromAscii( "GDIMetaFile" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"" )), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "GDIMetaFile" )), ::getCppuType( (const uno::Sequence< sal_Int8 >*) NULL ) ); if( xTransferable->isDataFlavorSupported( aDataFlavor )) @@ -234,3 +235,4 @@ embed::VisualRepresentation SAL_CALL OCommonEmbeddedObject::getPreferredVisualRe return aVisualRepresentation; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx index 4a7e5f8911..3fa388d9eb 100644 --- a/embeddedobj/source/commonembedding/xfactory.cxx +++ b/embeddedobj/source/commonembedding/xfactory.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. @@ -49,15 +50,15 @@ using namespace ::com::sun::star; uno::Sequence< ::rtl::OUString > SAL_CALL OOoEmbeddedObjectFactory::impl_staticGetSupportedServiceNames() { uno::Sequence< ::rtl::OUString > aRet(2); - aRet[0] = ::rtl::OUString::createFromAscii("com.sun.star.embed.OOoEmbeddedObjectFactory"); - aRet[1] = ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.OOoEmbeddedObjectFactory"); + aRet[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.OOoEmbeddedObjectFactory")); + aRet[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.OOoEmbeddedObjectFactory")); return aRet; } //------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OOoEmbeddedObjectFactory::impl_staticGetImplementationName() { - return ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.OOoEmbeddedObjectFactory"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.OOoEmbeddedObjectFactory")); } //------------------------------------------------------------------------- @@ -82,12 +83,12 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceInitFromEntry" ); if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -112,7 +113,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta ::rtl::OUString aMediaType; try { - uno::Any aAny = xPropSet->getPropertyValue( ::rtl::OUString::createFromAscii( "MediaType" ) ); + uno::Any aAny = xPropSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MediaType" )) ); aAny >>= aMediaType; } catch ( uno::Exception& ) @@ -129,18 +130,6 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta } xSubStorage = uno::Reference< embed::XStorage >(); -#if 0 - ::rtl::OUString aDocServiceName = m_aConfigHelper.GetDocumentServiceFromMediaType( aMediaType ); - if ( !aDocServiceName.getLength() ) - { - // only own document can be based on storage - // in case it is not possible to find related - // document service name the storage entry is invalid - - throw io::IOException(); // unexpected mimetype of the storage - } -#endif - uno::Sequence< beans::NamedValue > aObject = m_aConfigHelper.GetObjectPropsByMediaType( aMediaType ); if ( !aObject.getLength() ) throw io::IOException(); // unexpected mimetype of the storage @@ -149,11 +138,6 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta static_cast< ::cppu::OWeakObject* > ( new OCommonEmbeddedObject( m_xFactory, aObject ) ), -#if 0 - GetClassIDFromServName( aDocServiceName ), - GetClassNameFromServName( aDocServiceName ), - aDocServiceName ) ), -#endif uno::UNO_QUERY ); } else @@ -190,12 +174,12 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceInitFromMediaDescriptor" ); if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -257,12 +241,12 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta uno::Reference< uno::XInterface > xResult; if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); @@ -309,12 +293,12 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta // the initialization is completelly controlled by user if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -374,11 +358,11 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta // check if there is URL, URL must exist ::rtl::OUString aURL; for ( sal_Int32 nInd = 0; nInd < aTempMedDescr.getLength(); nInd++ ) - if ( aTempMedDescr[nInd].Name.equalsAscii( "URL" ) ) + if ( aTempMedDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) ) aTempMedDescr[nInd].Value >>= aURL; if ( !aURL.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No URL for the link is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No URL for the link is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); @@ -427,12 +411,12 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta // the initialization is completelly controlled by user if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -440,11 +424,11 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta ::rtl::OUString aURL; for ( sal_Int32 nInd = 0; nInd < aTempMedDescr.getLength(); nInd++ ) - if ( aTempMedDescr[nInd].Name.equalsAscii( "URL" ) ) + if ( aTempMedDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) ) aTempMedDescr[nInd].Value >>= aURL; if ( !aURL.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No URL for the link is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No URL for the link is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); @@ -505,15 +489,15 @@ uno::Sequence< ::rtl::OUString > SAL_CALL OOoEmbeddedObjectFactory::getSupported uno::Sequence< ::rtl::OUString > SAL_CALL OOoSpecialEmbeddedObjectFactory::impl_staticGetSupportedServiceNames() { uno::Sequence< ::rtl::OUString > aRet(2); - aRet[0] = ::rtl::OUString::createFromAscii("com.sun.star.embed.OOoSpecialEmbeddedObjectFactory"); - aRet[1] = ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory"); + aRet[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.OOoSpecialEmbeddedObjectFactory")); + aRet[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory")); return aRet; } //------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OOoSpecialEmbeddedObjectFactory::impl_staticGetImplementationName() { - return ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory")); } //------------------------------------------------------------------------- @@ -577,3 +561,4 @@ uno::Sequence< ::rtl::OUString > SAL_CALL OOoSpecialEmbeddedObjectFactory::getSu } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/commonembedding/xfactory.hxx b/embeddedobj/source/commonembedding/xfactory.hxx index 538aa667e0..3faeb71cb1 100644 --- a/embeddedobj/source/commonembedding/xfactory.hxx +++ b/embeddedobj/source/commonembedding/xfactory.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. @@ -123,3 +124,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index bb4010a29b..6bc2074837 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.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. @@ -36,9 +37,7 @@ #include <com/sun/star/lang/XSingleComponentFactory.hpp> #include <com/sun/star/util/XCloseBroadcaster.hpp> #include <com/sun/star/util/XCloseable.hpp> -#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACESS_HPP_ #include <com/sun/star/container/XNameAccess.hpp> -#endif #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/beans/XPropertySet.hpp> @@ -66,9 +65,7 @@ #include <com/sun/star/frame/XModuleManager.hpp> #include <com/sun/star/ui/XDockingAreaAcceptor.hpp> #include <com/sun/star/ui/XUIElementSettings.hpp> -#ifndef _COM_SUN_STAR_UI_XCONFIGURATIONMANAGER_HPP_ #include <com/sun/star/ui/XUIConfigurationManager.hpp> -#endif #include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp> #include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> @@ -87,9 +84,6 @@ #include "intercept.hxx" -// #include <toolkit/helper/vclunohelper.hxx> -// #include <vcl/window.hxx> - #define HATCH_BORDER_WIDTH (((m_pEmbedObj->getStatus(embed::Aspects::MSOLE_CONTENT)&embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE) && \ m_pEmbedObj->getCurrentState()!=embed::EmbedStates::UI_ACTIVE) ? 0 : 4 ) @@ -181,11 +175,11 @@ DocumentHolder::DocumentHolder( const uno::Reference< lang::XMultiServiceFactory m_aOutplaceFrameProps.realloc( 3 ); beans::NamedValue aArg; - aArg.Name = ::rtl::OUString::createFromAscii("TopWindow"); + aArg.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TopWindow")); aArg.Value <<= sal_True; m_aOutplaceFrameProps[0] <<= aArg; - aArg.Name = ::rtl::OUString::createFromAscii("MakeVisible"); + aArg.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MakeVisible")); aArg.Value <<= sal_False; m_aOutplaceFrameProps[1] <<= aArg; @@ -203,7 +197,7 @@ DocumentHolder::DocumentHolder( const uno::Reference< lang::XMultiServiceFactory } m_refCount--; - aArg.Name = ::rtl::OUString::createFromAscii("ParentFrame"); + aArg.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentFrame")); aArg.Value <<= xDesktop; //TODO/LATER: should use parent document frame m_aOutplaceFrameProps[2] <<= aArg; } @@ -439,7 +433,7 @@ sal_Bool DocumentHolder::ShowInplace( const uno::Reference< awt::XWindowPeer >& uno::Reference< embed::XHatchWindowFactory > xHatchFactory( m_xFactory->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.HatchWindowFactory" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.HatchWindowFactory" )) ), uno::UNO_QUERY ); if ( !xHatchFactory.is() ) @@ -474,7 +468,7 @@ sal_Bool DocumentHolder::ShowInplace( const uno::Reference< awt::XWindowPeer >& awt::WindowAttribute::SHOW | awt::VclWindowPeerAttribute::CLIPCHILDREN ); uno::Reference< awt::XToolkit > xToolkit( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.awt.Toolkit" ) ), + m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.Toolkit" )) ), uno::UNO_QUERY ); if ( !xToolkit.is() ) throw uno::RuntimeException(); @@ -486,20 +480,20 @@ sal_Bool DocumentHolder::ShowInplace( const uno::Reference< awt::XWindowPeer >& // create a frame based on the specified window uno::Reference< lang::XSingleServiceFactory > xFrameFact( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.frame.TaskCreator" ) ), + m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.TaskCreator" )) ), uno::UNO_QUERY_THROW ); uno::Sequence< uno::Any > aArgs( 2 ); beans::NamedValue aArg; - aArg.Name = ::rtl::OUString::createFromAscii("ContainerWindow"); + aArg.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContainerWindow")); aArg.Value <<= xOwnWindow; aArgs[0] <<= aArg; uno::Reference< frame::XFrame > xContFrame( xContDisp, uno::UNO_QUERY ); if ( xContFrame.is() ) { - aArg.Name = ::rtl::OUString::createFromAscii("ParentFrame"); + aArg.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentFrame")); aArg.Value <<= xContFrame; aArgs[1] <<= aArg; } @@ -626,7 +620,7 @@ void DocumentHolder::FindConnectPoints( xMenu->getByIndex( nInd ) >>= aProps; rtl::OUString aCommand; for ( sal_Int32 nSeqInd = 0; nSeqInd < aProps.getLength(); nSeqInd++ ) - if ( aProps[nSeqInd].Name.equalsAscii( "CommandURL" ) ) + if ( aProps[nSeqInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CommandURL" ) ) ) { aProps[nSeqInd].Value >>= aCommand; break; @@ -635,9 +629,9 @@ void DocumentHolder::FindConnectPoints( if ( !aCommand.getLength() ) throw uno::RuntimeException(); - if ( aCommand.equalsAscii( ".uno:PickList" ) ) + if ( aCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:PickList" ) ) ) nConnectPoints[0] = nInd; - else if ( aCommand.equalsAscii( ".uno:WindowList" ) ) + else if ( aCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:WindowList" ) ) ) nConnectPoints[1] = nInd; } } @@ -877,7 +871,7 @@ uno::Reference< frame::XFrame > DocumentHolder::GetDocFrame() if ( !m_xFrame.is() ) { uno::Reference< lang::XSingleServiceFactory > xFrameFact( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.frame.TaskCreator" ) ), + m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.TaskCreator" ) )), uno::UNO_QUERY_THROW ); m_xFrame.set(xFrameFact->createInstanceWithArguments( m_aOutplaceFrameProps ), uno::UNO_QUERY_THROW); @@ -1039,13 +1033,13 @@ sal_Bool DocumentHolder::LoadDocToFrame( sal_Bool bInPlace ) sUrl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".component:DB/ReportDesign")); } else if( xServiceInfo.is() - && xServiceInfo->supportsService( ::rtl::OUString::createFromAscii("com.sun.star.chart2.ChartDocument")) ) + && xServiceInfo->supportsService( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.ChartDocument")) )) sUrl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:factory/schart")); else sUrl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:object")); xComponentLoader->loadComponentFromURL( sUrl, - rtl::OUString::createFromAscii( "_self" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "_self" )), 0, aArgs.getPropertyValues() ); @@ -1245,11 +1239,11 @@ void SAL_CALL DocumentHolder::notifyEvent( const document::EventObject& Event ) if( m_pEmbedObj && Event.Source == m_xComponent ) { // for now the ignored events are not forwarded, but sent by the object itself - if ( !Event.EventName.equalsAscii( "OnSave" ) - && !Event.EventName.equalsAscii( "OnSaveDone" ) - && !Event.EventName.equalsAscii( "OnSaveAs" ) - && !Event.EventName.equalsAscii( "OnSaveAsDone" ) - && !( Event.EventName.equalsAscii( "OnVisAreaChanged" ) && m_nNoResizeReact ) ) + if ( !Event.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnSave" ) ) + && !Event.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnSaveDone" ) ) + && !Event.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnSaveAs" ) ) + && !Event.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnSaveAsDone" ) ) + && !( Event.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnVisAreaChanged" ) ) && m_nNoResizeReact ) ) m_pEmbedObj->PostEvent_Impl( Event.EventName, Event.Source ); } } @@ -1358,3 +1352,5 @@ void SAL_CALL DocumentHolder::deactivated( ) throw (::com::sun::star::uno::Runt // deactivation is too unspecific to be useful; usually we only trigger code from activation // so UIDeactivation is actively triggered by the container } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/general/dummyobject.cxx b/embeddedobj/source/general/dummyobject.cxx index a7e23af262..e2a5fbde0e 100644 --- a/embeddedobj/source/general/dummyobject.cxx +++ b/embeddedobj/source/general/dummyobject.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. @@ -54,7 +55,7 @@ void ODummyEmbeddedObject::CheckInit() throw lang::DisposedException(); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -239,7 +240,7 @@ void SAL_CALL ODummyEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); m_nCachedAspect = nAspect; @@ -260,7 +261,7 @@ awt::Size SAL_CALL ODummyEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( !m_bHasCachedSize || m_nCachedAspect != nAspect ) @@ -282,7 +283,7 @@ sal_Int32 SAL_CALL ODummyEmbeddedObject::getMapUnit( sal_Int64 nAspect ) OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return embed::EmbedMapUnits::ONE_100TH_MM; @@ -299,7 +300,7 @@ embed::VisualRepresentation SAL_CALL ODummyEmbeddedObject::getPreferredVisualRep CheckInit(); // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -321,12 +322,12 @@ void SAL_CALL ODummyEmbeddedObject::setPersistentEntry( throw lang::DisposedException(); // TODO if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -334,7 +335,7 @@ void SAL_CALL ODummyEmbeddedObject::setPersistentEntry( && ( m_nObjectState == -1 || nEntryConnectionMode != embed::EntryInitModes::NO_INIT ) ) { throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "Can't change persistant representation of activated object!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't change persistant representation of activated object!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -344,7 +345,7 @@ void SAL_CALL ODummyEmbeddedObject::setPersistentEntry( saveCompleted( ( m_xParentStorage != xStorage || !m_aEntryName.equals( sEntName ) ) ); else throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -359,13 +360,13 @@ void SAL_CALL ODummyEmbeddedObject::setPersistentEntry( m_nObjectState = embed::EmbedStates::LOADED; } else - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Wrong entry is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Wrong entry is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); } else - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Wrong connection mode is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Wrong connection mode is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); } @@ -386,7 +387,7 @@ void SAL_CALL ODummyEmbeddedObject::storeToEntry( const uno::Reference< embed::X if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); m_xParentStorage->copyElementTo( m_aEntryName, xStorage, sEntName ); @@ -408,10 +409,10 @@ void SAL_CALL ODummyEmbeddedObject::storeAsEntry( const uno::Reference< embed::X if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); - PostEvent_Impl( ::rtl::OUString::createFromAscii( "OnSaveAs" ), + PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveAs" )), uno::Reference< uno::XInterface >( static_cast< cppu::OWeakObject* >( this ) ) ); m_xParentStorage->copyElementTo( m_aEntryName, xStorage, sEntName ); @@ -447,7 +448,7 @@ void SAL_CALL ODummyEmbeddedObject::saveCompleted( sal_Bool bUseNew ) m_xParentStorage = m_xNewParentStorage; m_aEntryName = m_aNewEntryName; - PostEvent_Impl( ::rtl::OUString::createFromAscii( "OnSaveAsDone" ), + PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveAsDone" )), uno::Reference< uno::XInterface >( static_cast< cppu::OWeakObject* >( this ) ) ); } @@ -466,7 +467,7 @@ sal_Bool SAL_CALL ODummyEmbeddedObject::hasEntry() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_aEntryName.getLength() ) @@ -485,7 +486,7 @@ sal_Bool SAL_CALL ODummyEmbeddedObject::hasEntry() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_aEntryName; @@ -503,7 +504,7 @@ void SAL_CALL ODummyEmbeddedObject::storeOwn() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // the object can not be activated or changed @@ -520,7 +521,7 @@ sal_Bool SAL_CALL ODummyEmbeddedObject::isReadonly() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // this object can not be changed @@ -542,7 +543,7 @@ void SAL_CALL ODummyEmbeddedObject::reload( if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // nothing to reload @@ -720,3 +721,4 @@ void SAL_CALL ODummyEmbeddedObject::removeEventListener( const uno::Reference< d xListener ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/general/intercept.cxx b/embeddedobj/source/general/intercept.cxx index f14f8159ff..6877691321 100644 --- a/embeddedobj/source/general/intercept.cxx +++ b/embeddedobj/source/general/intercept.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. @@ -172,7 +173,7 @@ Interceptor::dispatch( while( nInd < aNewArgs.getLength() ) { - if ( aNewArgs[nInd].Name.equalsAscii( "SaveTo" ) ) + if ( aNewArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "SaveTo" ) ) ) { aNewArgs[nInd].Value <<= sal_True; break; @@ -183,12 +184,12 @@ Interceptor::dispatch( if ( nInd == aNewArgs.getLength() ) { aNewArgs.realloc( nInd + 1 ); - aNewArgs[nInd].Name = ::rtl::OUString::createFromAscii( "SaveTo" ); + aNewArgs[nInd].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "SaveTo" )); aNewArgs[nInd].Value <<= sal_True; } uno::Reference< frame::XDispatch > xDispatch = m_xSlaveDispatchProvider->queryDispatch( - URL, ::rtl::OUString::createFromAscii( "_self" ), 0 ); + URL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "_self" )), 0 ); if ( xDispatch.is() ) xDispatch->dispatch( URL, aNewArgs ); } @@ -424,3 +425,4 @@ Interceptor::setMasterDispatchProvider( m_xMasterDispatchProvider = NewSupplier; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx index e72f9ae1e3..f91d345501 100644 --- a/embeddedobj/source/general/xcreator.cxx +++ b/embeddedobj/source/general/xcreator.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. @@ -51,15 +52,15 @@ using namespace ::com::sun::star; uno::Sequence< ::rtl::OUString > SAL_CALL UNOEmbeddedObjectCreator::impl_staticGetSupportedServiceNames() { uno::Sequence< ::rtl::OUString > aRet(2); - aRet[0] = ::rtl::OUString::createFromAscii("com.sun.star.embed.EmbeddedObjectCreator"); - aRet[1] = ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.EmbeddedObjectCreator"); + aRet[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.EmbeddedObjectCreator")); + aRet[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.EmbeddedObjectCreator")); return aRet; } //------------------------------------------------------------------------- ::rtl::OUString SAL_CALL UNOEmbeddedObjectCreator::impl_staticGetImplementationName() { - return ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.EmbeddedObjectCreator"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.EmbeddedObjectCreator")); } //------------------------------------------------------------------------- @@ -86,12 +87,12 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta uno::Reference< uno::XInterface > xResult; if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); @@ -100,7 +101,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta { // use system fallback // TODO: in future users factories can be tested - aEmbedFactory = ::rtl::OUString::createFromAscii( "com.sun.star.embed.OLEEmbeddedObjectFactory" ); + aEmbedFactory = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLEEmbeddedObjectFactory" )); } uno::Reference < uno::XInterface > xFact( m_xFactory->createInstance( aEmbedFactory ) ); @@ -129,12 +130,12 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) UNOEmbeddedObjectCreator::createInstanceInitFromEntry" ); if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -159,7 +160,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta throw uno::RuntimeException(); try { - uno::Any aAny = xPropSet->getPropertyValue( ::rtl::OUString::createFromAscii( "MediaType" ) ); + uno::Any aAny = xPropSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) )); aAny >>= aMediaType; } catch ( uno::Exception& ) @@ -191,7 +192,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta throw uno::RuntimeException(); try { - uno::Any aAny = xPropSet->getPropertyValue( ::rtl::OUString::createFromAscii( "MediaType" ) ); + uno::Any aAny = xPropSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) )); aAny >>= aMediaType; if ( aMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.star.oleobject" ) ) ) ) aEmbedFactory = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLEEmbeddedObjectFactory" ) ); @@ -250,12 +251,12 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta // TODO: use lObjArgs if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -270,7 +271,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta // the object can be loaded by one of the office application uno::Reference< embed::XEmbedObjectCreator > xOOoEmbCreator( m_xFactory->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.OOoEmbeddedObjectFactory" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OOoEmbeddedObjectFactory" ) )), uno::UNO_QUERY ); if ( !xOOoEmbCreator.is() ) throw uno::RuntimeException(); // TODO: @@ -293,7 +294,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta uno::Reference< embed::XEmbedObjectCreator > xOleEmbCreator( m_xFactory->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.OLEEmbeddedObjectFactory" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLEEmbeddedObjectFactory" ) )), uno::UNO_QUERY ); if ( !xOleEmbCreator.is() ) throw uno::RuntimeException(); // TODO: @@ -323,12 +324,12 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta uno::Reference< uno::XInterface > xResult; if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); @@ -368,11 +369,11 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta // check if there is URL, URL must exist ::rtl::OUString aURL; for ( sal_Int32 nInd = 0; nInd < aTempMedDescr.getLength(); nInd++ ) - if ( aTempMedDescr[nInd].Name.equalsAscii( "URL" ) ) + if ( aTempMedDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) ) aTempMedDescr[nInd].Value >>= aURL; if ( !aURL.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No URL for the link is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No URL for the link is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); @@ -383,7 +384,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta // the object can be loaded by one of the office application uno::Reference< embed::XLinkCreator > xOOoLinkCreator( m_xFactory->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.OOoEmbeddedObjectFactory" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OOoEmbeddedObjectFactory" ) )), uno::UNO_QUERY ); if ( !xOOoLinkCreator.is() ) throw uno::RuntimeException(); // TODO: @@ -405,20 +406,20 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta // was also extended. if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); uno::Reference< embed::XLinkCreator > xLinkCreator( m_xFactory->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.OLEEmbeddedObjectFactory" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLEEmbeddedObjectFactory" ) )), uno::UNO_QUERY ); if ( !xLinkCreator.is() ) throw uno::RuntimeException(); // TODO: @@ -489,3 +490,4 @@ uno::Sequence< ::rtl::OUString > SAL_CALL UNOEmbeddedObjectCreator::getSupported return impl_staticGetSupportedServiceNames(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/inc/closepreventer.hxx b/embeddedobj/source/inc/closepreventer.hxx index d676e65e36..22908596f7 100644 --- a/embeddedobj/source/inc/closepreventer.hxx +++ b/embeddedobj/source/inc/closepreventer.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. @@ -36,3 +37,4 @@ class OClosePreventer : public ::cppu::WeakImplHelper1 < ::com::sun::star::util: virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException); }; +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/inc/commonembobj.hxx b/embeddedobj/source/inc/commonembobj.hxx index 1ccf79c660..a7c8964c4f 100644 --- a/embeddedobj/source/inc/commonembobj.hxx +++ b/embeddedobj/source/inc/commonembobj.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. @@ -519,3 +520,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/inc/docholder.hxx b/embeddedobj/source/inc/docholder.hxx index 38b601c01c..8d26ef29bf 100644 --- a/embeddedobj/source/inc/docholder.hxx +++ b/embeddedobj/source/inc/docholder.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. @@ -36,9 +37,7 @@ #include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/frame/XDispatchProviderInterceptor.hpp> #include <com/sun/star/frame/XBorderResizeListener.hpp> -#ifndef _COM_SUN_STAR_FRAME_XBORDERWIDTHS_HPP_ #include <com/sun/star/frame/BorderWidths.hpp> -#endif #include <com/sun/star/awt/XWindowPeer.hpp> #include <com/sun/star/awt/Size.hpp> #include <com/sun/star/awt/Rectangle.hpp> @@ -140,7 +139,7 @@ public: rtl::OUString GetTitle() const { - return m_aContainerName + ::rtl::OUString::createFromAscii( " - " ) + m_aDocumentNamePart; + return m_aContainerName + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( " - " )) + m_aDocumentNamePart; } rtl::OUString GetContainerName() const { return m_aContainerName; } @@ -211,3 +210,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/inc/dummyobject.hxx b/embeddedobj/source/inc/dummyobject.hxx index 8ee1d489c9..c288deaede 100644 --- a/embeddedobj/source/inc/dummyobject.hxx +++ b/embeddedobj/source/inc/dummyobject.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. @@ -295,3 +296,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/inc/intercept.hxx b/embeddedobj/source/inc/intercept.hxx index c8fc280394..6201f65b11 100644 --- a/embeddedobj/source/inc/intercept.hxx +++ b/embeddedobj/source/inc/intercept.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. @@ -165,3 +166,4 @@ private: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/inc/oleembobj.hxx b/embeddedobj/source/inc/oleembobj.hxx index 106e1cc6a5..bdf175e4a7 100644 --- a/embeddedobj/source/inc/oleembobj.hxx +++ b/embeddedobj/source/inc/oleembobj.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. @@ -544,3 +545,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/inc/specialobject.hxx b/embeddedobj/source/inc/specialobject.hxx index 40bcc1c1cb..e181fe8ccf 100644 --- a/embeddedobj/source/inc/specialobject.hxx +++ b/embeddedobj/source/inc/specialobject.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. @@ -88,3 +89,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/inc/targetstatecontrol.hxx b/embeddedobj/source/inc/targetstatecontrol.hxx index dba9c4c9bf..4361b78410 100644 --- a/embeddedobj/source/inc/targetstatecontrol.hxx +++ b/embeddedobj/source/inc/targetstatecontrol.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. @@ -46,3 +47,4 @@ public: }; +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/inc/xcreator.hxx b/embeddedobj/source/inc/xcreator.hxx index d59029d664..ae9a4a361b 100644 --- a/embeddedobj/source/inc/xcreator.hxx +++ b/embeddedobj/source/inc/xcreator.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. @@ -89,3 +90,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/msole/advisesink.cxx b/embeddedobj/source/msole/advisesink.cxx index 485e4e3e57..f8027bf854 100644 --- a/embeddedobj/source/msole/advisesink.cxx +++ b/embeddedobj/source/msole/advisesink.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. @@ -132,3 +133,4 @@ STDMETHODIMP_(void) OleWrapperAdviseSink::OnClose(void) // TODO: sometimes it can be necessary to simulate OnShowWindow( False ) here } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/msole/advisesink.hxx b/embeddedobj/source/msole/advisesink.hxx index f2101826b9..83fac1e920 100644 --- a/embeddedobj/source/msole/advisesink.hxx +++ b/embeddedobj/source/msole/advisesink.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. @@ -54,3 +55,4 @@ public: STDMETHODIMP_(void) OnClose(void); }; +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/msole/closepreventer.cxx b/embeddedobj/source/msole/closepreventer.cxx index 42bc7b86d5..f2368cf43b 100644 --- a/embeddedobj/source/msole/closepreventer.cxx +++ b/embeddedobj/source/msole/closepreventer.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. @@ -50,3 +51,4 @@ void SAL_CALL OClosePreventer::disposing( const com::sun::star::lang::EventObjec OSL_ENSURE( sal_False, "The object can not be prevented from closing!\n" ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/msole/graphconvert.cxx b/embeddedobj/source/msole/graphconvert.cxx index 9b2e649484..5f0de22833 100644 --- a/embeddedobj/source/msole/graphconvert.cxx +++ b/embeddedobj/source/msole/graphconvert.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. diff --git a/embeddedobj/source/msole/mtnotification.hxx b/embeddedobj/source/msole/mtnotification.hxx index 4e8820ef3f..d64a9bd28b 100644 --- a/embeddedobj/source/msole/mtnotification.hxx +++ b/embeddedobj/source/msole/mtnotification.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. @@ -53,3 +54,4 @@ public: }; +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx index bbbef5ae8e..81640c9cb6 100644 --- a/embeddedobj/source/msole/olecomponent.cxx +++ b/embeddedobj/source/msole/olecomponent.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. @@ -197,28 +198,28 @@ struct OleComponentNative_Impl { m_aSupportedGraphFormats.realloc( 5 ); m_aSupportedGraphFormats[0] = datatransfer::DataFlavor( - ::rtl::OUString::createFromAscii( "application/x-openoffice-emf;windows_formatname=\"Image EMF\"" ), - ::rtl::OUString::createFromAscii( "Windows Enhanced Metafile" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-emf;windows_formatname=\"Image EMF\"" )), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Windows Enhanced Metafile" )), getCppuType( (const uno::Sequence< sal_Int8 >*) 0 ) ); m_aSupportedGraphFormats[1] = datatransfer::DataFlavor( - ::rtl::OUString::createFromAscii( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" ), - ::rtl::OUString::createFromAscii( "Windows Metafile" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" )), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Windows Metafile" )), getCppuType( (const uno::Sequence< sal_Int8 >*) 0 ) ); m_aSupportedGraphFormats[2] = datatransfer::DataFlavor( - ::rtl::OUString::createFromAscii( "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" ), - ::rtl::OUString::createFromAscii( "Bitmap" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" )), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Bitmap" )), getCppuType( (const uno::Sequence< sal_Int8 >*) 0 ) ); m_aSupportedGraphFormats[3] = datatransfer::DataFlavor( - ::rtl::OUString::createFromAscii( "image/png" ), - ::rtl::OUString::createFromAscii( "PNG" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "image/png" )), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "PNG" )), getCppuType( (const uno::Sequence< sal_Int8 >*) 0 ) ); m_aSupportedGraphFormats[0] = datatransfer::DataFlavor( - ::rtl::OUString::createFromAscii( "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"" ), - ::rtl::OUString::createFromAscii( "GDIMetafile" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"" )), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "GDIMetafile" )), getCppuType( (const uno::Sequence< sal_Int8 >*) 0 ) ); } @@ -238,11 +239,11 @@ struct OleComponentNative_Impl { //---------------------------------------------- DWORD GetAspectFromFlavor( const datatransfer::DataFlavor& aFlavor ) { - if ( aFlavor.MimeType.indexOf( ::rtl::OUString::createFromAscii( ";Aspect=THUMBNAIL" ) ) != -1 ) + if ( aFlavor.MimeType.indexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ";Aspect=THUMBNAIL" )) ) != -1 ) return DVASPECT_THUMBNAIL; - else if ( aFlavor.MimeType.indexOf( ::rtl::OUString::createFromAscii( ";Aspect=ICON" ) ) != -1 ) + else if ( aFlavor.MimeType.indexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ";Aspect=ICON" )) ) != -1 ) return DVASPECT_ICON; - else if ( aFlavor.MimeType.indexOf( ::rtl::OUString::createFromAscii( ";Aspect=DOCPRINT" ) ) != -1 ) + else if ( aFlavor.MimeType.indexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ";Aspect=DOCPRINT" )) ) != -1 ) return DVASPECT_DOCPRINT; else return DVASPECT_CONTENT; @@ -254,11 +255,11 @@ DWORD GetAspectFromFlavor( const datatransfer::DataFlavor& aFlavor ) ::rtl::OUString aResult; if ( nAsp == DVASPECT_THUMBNAIL ) - aResult = ::rtl::OUString::createFromAscii( ";Aspect=THUMBNAIL" ); + aResult = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ";Aspect=THUMBNAIL" )); else if ( nAsp == DVASPECT_ICON ) - aResult = ::rtl::OUString::createFromAscii( ";Aspect=ICON" ); + aResult = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ";Aspect=ICON" )); else if ( nAsp == DVASPECT_DOCPRINT ) - aResult = ::rtl::OUString::createFromAscii( ";Aspect=DOCPRINT" ); + aResult = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ";Aspect=DOCPRINT" )); // no suffix for DVASPECT_CONTENT @@ -416,7 +417,7 @@ sal_Bool GetClassIDFromSequence_Impl( uno::Sequence< sal_Int8 > aSeq, CLSID& aRe { if ( *pStr == '&' ) { - aResult += ::rtl::OUString::createFromAscii( "~" ); + aResult += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "~" )); while( *( ++pStr ) == '&' ); } else @@ -1598,12 +1599,12 @@ uno::Any SAL_CALL OleComponent::getTransferData( const datatransfer::DataFlavor& // TODO: Investigate if there is already the format name // and whether this format is really required else if ( aFlavor.DataType == getCppuType( ( const uno::Reference< io::XInputStream >* ) 0 ) - && aFlavor.MimeType.equalsAscii( "application/x-openoffice-contentstream" ) ) + && aFlavor.MimeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/x-openoffice-contentstream" ) ) ) { // allow to retrieve stream-representation of the object persistence bSupportedFlavor = sal_True; uno::Reference < io::XStream > xTempFileStream( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ) ), + m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.TempFile" ) )), uno::UNO_QUERY ); if ( !xTempFileStream.is() ) @@ -1799,3 +1800,4 @@ void SAL_CALL OleComponent::removeModifyListener( const com::sun::star::uno::Ref xListener ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/msole/olecomponent.hxx b/embeddedobj/source/msole/olecomponent.hxx index 9da64a0b48..cddfaea2ce 100644 --- a/embeddedobj/source/msole/olecomponent.hxx +++ b/embeddedobj/source/msole/olecomponent.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. @@ -192,3 +193,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index c3dfd00271..2ea4751dee 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.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. @@ -286,7 +287,7 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo() || aFilterName.equals( ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM( "MS Word 2007 XML" ) ) ) ) ) { uno::Reference< container::XNameAccess > xFilterFactory( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" ) ), + m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" ) )), uno::UNO_QUERY_THROW ); ::rtl::OUString aDocServiceName; @@ -295,7 +296,7 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo() if ( aFilterAnyData >>= aFilterData ) { for ( sal_Int32 nInd = 0; nInd < aFilterData.getLength(); nInd++ ) - if ( aFilterData[nInd].Name.equalsAscii( "DocumentService" ) ) + if ( aFilterData[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DocumentService" ) ) ) aFilterData[nInd].Value >>= aDocServiceName; } @@ -312,21 +313,21 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo() // let the model behave as embedded one uno::Reference< frame::XModel > xModel( xDocument, uno::UNO_QUERY_THROW ); uno::Sequence< beans::PropertyValue > aSeq( 1 ); - aSeq[0].Name = ::rtl::OUString::createFromAscii( "SetEmbedded" ); + aSeq[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "SetEmbedded" )); aSeq[0].Value <<= sal_True; xModel->attachResource( ::rtl::OUString(), aSeq ); // load the model from the stream uno::Sequence< beans::PropertyValue > aArgs( 5 ); - aArgs[0].Name = ::rtl::OUString::createFromAscii( "HierarchicalDocumentName" ); + aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HierarchicalDocumentName" )); aArgs[0].Value <<= m_aEntryName; - aArgs[1].Name = ::rtl::OUString::createFromAscii( "ReadOnly" ); + aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ReadOnly" )); aArgs[1].Value <<= sal_True; - aArgs[2].Name = ::rtl::OUString::createFromAscii( "FilterName" ); + aArgs[2].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); aArgs[2].Value <<= aFilterName; - aArgs[3].Name = ::rtl::OUString::createFromAscii( "URL" ); - aArgs[3].Value <<= ::rtl::OUString::createFromAscii( "private:stream" ); - aArgs[4].Name = ::rtl::OUString::createFromAscii( "InputStream" ); + aArgs[3].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "URL" )); + aArgs[3].Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "private:stream" )); + aArgs[4].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "InputStream" )); aArgs[4].Value <<= m_xObjectStream->getInputStream(); xSeekable->seek( 0 ); @@ -338,7 +339,7 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo() xDocument->close( sal_True ); uno::Reference< beans::XPropertySet > xStorProps( xTmpStorage, uno::UNO_QUERY_THROW ); ::rtl::OUString aMediaType; - xStorProps->getPropertyValue( ::rtl::OUString::createFromAscii( "MediaType" ) ) >>= aMediaType; + xStorProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MediaType" )) ) >>= aMediaType; xTmpStorage->dispose(); // look for the related embedded object factory @@ -474,7 +475,7 @@ void SAL_CALL OleEmbeddedObject::changeState( sal_Int32 nNewState ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // in case the object is already in requested state @@ -631,7 +632,7 @@ uno::Sequence< sal_Int32 > SAL_CALL OleEmbeddedObject::getReachableStates() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); #ifdef WNT @@ -673,7 +674,7 @@ sal_Int32 SAL_CALL OleEmbeddedObject::getCurrentState() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // TODO: Shouldn't we ask object? ( I guess no ) @@ -784,7 +785,7 @@ void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); #ifdef WNT @@ -920,7 +921,7 @@ uno::Sequence< embed::VerbDescriptor > SAL_CALL OleEmbeddedObject::getSupportedV throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); #ifdef WNT if ( m_pOleComponent ) @@ -965,7 +966,7 @@ void SAL_CALL OleEmbeddedObject::setClientSite( { if ( m_nObjectState != embed::EmbedStates::LOADED && m_nObjectState != embed::EmbedStates::RUNNING ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The client site can not be set currently!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The client site can not be set currently!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); m_xClientSite = xClient; @@ -991,7 +992,7 @@ uno::Reference< embed::XEmbeddedClient > SAL_CALL OleEmbeddedObject::getClientSi throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_xClientSite; @@ -1018,7 +1019,7 @@ void SAL_CALL OleEmbeddedObject::update() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nUpdateMode == embed::EmbedUpdateModes::EXPLICIT_UPDATE ) @@ -1052,7 +1053,7 @@ void SAL_CALL OleEmbeddedObject::setUpdateMode( sal_Int32 nMode ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object has no persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); OSL_ENSURE( nMode == embed::EmbedUpdateModes::ALWAYS_UPDATE @@ -1082,7 +1083,7 @@ sal_Int64 SAL_CALL OleEmbeddedObject::getStatus( sal_Int64 throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object must be in running state!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object must be in running state!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); sal_Int64 nResult = 0; @@ -1129,3 +1130,4 @@ void SAL_CALL OleEmbeddedObject::setContainerName( const ::rtl::OUString& sName } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/msole/olemisc.cxx b/embeddedobj/source/msole/olemisc.cxx index abb47f2a26..bf53a25c4f 100644 --- a/embeddedobj/source/msole/olemisc.cxx +++ b/embeddedobj/source/msole/olemisc.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. @@ -386,15 +387,10 @@ uno::Reference< util::XCloseable > SAL_CALL OleEmbeddedObject::getComponent() if ( m_nObjectState == -1 ) // || m_nObjectState == embed::EmbedStates::LOADED ) { // the object is still not running - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object is not loaded!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not loaded!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } - // if ( m_bWaitSaveCompleted ) - // throw embed::WrongStateException( - // ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), - // uno::Reference< uno::XInterface >( reinterpret_cast< ::cppu::OWeakObject* >(this) ) ); - if ( !m_pOleComponent ) { // TODO/LATER: Is it correct??? @@ -702,3 +698,4 @@ void SAL_CALL OleEmbeddedObject::setParent( const com::sun::star::uno::Reference m_xParent = xParent; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx index f35e1acb0f..61e6e4df6d 100644 --- a/embeddedobj/source/msole/olepersist.cxx +++ b/embeddedobj/source/msole/olepersist.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. @@ -72,7 +73,7 @@ sal_Bool KillFile_Impl( const ::rtl::OUString& aURL, const uno::Reference< lang: { uno::Reference < ucb::XSimpleFileAccess > xAccess( xFactory->createInstance ( - ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" ) )), uno::UNO_QUERY ); if ( xAccess.is() ) @@ -96,15 +97,15 @@ sal_Bool KillFile_Impl( const ::rtl::OUString& aURL, const uno::Reference< lang: ::rtl::OUString aResult; uno::Reference < beans::XPropertySet > xTempFile( - xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ) ), + xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.TempFile" ) )), uno::UNO_QUERY ); if ( !xTempFile.is() ) throw uno::RuntimeException(); // TODO try { - xTempFile->setPropertyValue( ::rtl::OUString::createFromAscii( "RemoveFile" ), uno::makeAny( sal_False ) ); - uno::Any aUrl = xTempFile->getPropertyValue( ::rtl::OUString::createFromAscii( "Uri" ) ); + xTempFile->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RemoveFile" )), uno::makeAny( sal_False ) ); + uno::Any aUrl = xTempFile->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri" ) )); aUrl >>= aResult; } catch ( uno::Exception& ) @@ -132,7 +133,7 @@ sal_Bool KillFile_Impl( const ::rtl::OUString& aURL, const uno::Reference< lang: try { uno::Reference < ucb::XSimpleFileAccess > xTempAccess( xFactory->createInstance ( - ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" ) )), uno::UNO_QUERY ); if ( !xTempAccess.is() ) @@ -182,14 +183,14 @@ sal_Bool KillFile_Impl( const ::rtl::OUString& aURL, const uno::Reference< lang: try { uno::Reference < beans::XPropertySet > xTempFile( - xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ) ), + xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.TempFile" ) )), uno::UNO_QUERY ); uno::Reference < io::XStream > xTempStream( xTempFile, uno::UNO_QUERY_THROW ); xParentStorage->copyStreamElementData( aEntryName, xTempStream ); - xTempFile->setPropertyValue( ::rtl::OUString::createFromAscii( "RemoveFile" ), uno::makeAny( sal_False ) ); - uno::Any aUrl = xTempFile->getPropertyValue( ::rtl::OUString::createFromAscii( "Uri" ) ); + xTempFile->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RemoveFile" )), uno::makeAny( sal_False ) ); + uno::Any aUrl = xTempFile->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri" ) )); aUrl >>= aResult; } catch( uno::RuntimeException& ) @@ -213,7 +214,7 @@ void SetStreamMediaType_Impl( const uno::Reference< io::XStream >& xStream, cons if ( !xPropSet.is() ) throw uno::RuntimeException(); // TODO: all the storage streams must support XPropertySet - xPropSet->setPropertyValue( ::rtl::OUString::createFromAscii( "MediaType" ), uno::makeAny( aMediaType ) ); + xPropSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MediaType" )), uno::makeAny( aMediaType ) ); } #endif //------------------------------------------------------ @@ -223,7 +224,7 @@ void LetCommonStoragePassBeUsed_Impl( const uno::Reference< io::XStream >& xStre if ( !xPropSet.is() ) throw uno::RuntimeException(); // Only StorageStreams must be provided here, they must implement the interface - xPropSet->setPropertyValue( ::rtl::OUString::createFromAscii( "UseCommonStoragePasswordEncryption" ), + xPropSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "UseCommonStoragePasswordEncryption" )), uno::makeAny( (sal_Bool)sal_True ) ); } #ifdef WNT @@ -288,7 +289,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::GetNewFilledTempStream_Impl( co OSL_ENSURE( xInStream.is(), "Wrong parameter is provided!\n" ); uno::Reference < io::XStream > xTempFile( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ) ), + m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.TempFile" ) )), uno::UNO_QUERY_THROW ); uno::Reference< io::XOutputStream > xTempOutStream = xTempFile->getOutputStream(); @@ -380,7 +381,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToGetAcceptableFormat_Impl( { // this is either a bitmap or a metafile clipboard format, retrieve the pure stream uno::Reference < io::XStream > xResult( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ) ), + m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.TempFile" ) )), uno::UNO_QUERY_THROW ); uno::Reference < io::XSeekable > xResultSeek( xResult, uno::UNO_QUERY_THROW ); uno::Reference < io::XOutputStream > xResultOut = xResult->getOutputStream(); @@ -388,48 +389,6 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToGetAcceptableFormat_Impl( if ( !xResultOut.is() || !xResultIn.is() ) throw uno::RuntimeException(); - // if it is windows metafile the size must be provided - // the solution is not used currently -// if ( bSetSizeToRepl && abs( aSizeToSet.Width ) < 0xFFFF && abs( aSizeToSet.Height ) < 0xFFFF ) -// { -// uno::Sequence< sal_Int8 > aHeader(22); -// sal_uInt8* pBuffer = (sal_uInt8*)aHeader.getArray(); -// -// // write 0x9ac6cdd7L -// pBuffer[0] = 0xd7; -// pBuffer[1] = 0xcd; -// pBuffer[2] = 0xc6; -// pBuffer[3] = 0x9a; -// -// // following data seems to have no value -// pBuffer[4] = 0; -// pBuffer[5] = 0; -// -// // must be set to 0 -// pBuffer[6] = 0; -// pBuffer[7] = 0; -// pBuffer[8] = 0; -// pBuffer[9] = 0; -// -// // width of the picture -// pBuffer[10] = abs( aSizeToSet.Width ) % 0x100; -// pBuffer[11] = ( abs( aSizeToSet.Width ) / 0x100 ) % 0x100; -// -// // height of the picture -// pBuffer[12] = abs( aSizeToSet.Height ) % 0x100; -// pBuffer[13] = ( abs( aSizeToSet.Height ) / 0x100 ) % 0x100; -// -// // write 2540 -// pBuffer[14] = 0x6c; //0xec; -// pBuffer[15] = 0x01; //0x09; -// -// // fill with 0 -// for ( sal_Int32 nInd = 16; nInd < 22; nInd++ ) -// pBuffer[nInd] = 0; -// -// xResultOut->writeBytes( aHeader ); -// } - xSeek->seek( nHeaderOffset ); // header size for these formats ::comphelper::OStorageHelper::CopyInputToOutput( xInStream, xResultOut ); xResultOut->closeOutput(); @@ -458,7 +417,7 @@ void OleEmbeddedObject::InsertVisualCache_Impl( const uno::Reference< io::XStrea uno::Reference< container::XNameContainer > xNameContainer( m_xFactory->createInstanceWithArguments( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.OLESimpleStorage" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLESimpleStorage" )), aArgs ), uno::UNO_QUERY ); @@ -470,7 +429,7 @@ void OleEmbeddedObject::InsertVisualCache_Impl( const uno::Reference< io::XStrea xCachedSeek->seek( 0 ); uno::Reference < io::XStream > xTempFile( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ) ), + m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.TempFile" ) )), uno::UNO_QUERY_THROW ); uno::Reference< io::XSeekable > xTempSeek( xTempFile, uno::UNO_QUERY_THROW ); @@ -581,7 +540,7 @@ void OleEmbeddedObject::InsertVisualCache_Impl( const uno::Reference< io::XStrea throw io::IOException(); // TODO: // insert the result file as replacement image - ::rtl::OUString aCacheName = ::rtl::OUString::createFromAscii( "\002OlePres000" ); + ::rtl::OUString aCacheName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "\002OlePres000" )); if ( xNameContainer->hasByName( aCacheName ) ) xNameContainer->replaceByName( aCacheName, uno::makeAny( xTempFile ) ); else @@ -607,7 +566,7 @@ void OleEmbeddedObject::RemoveVisualCache_Impl( const uno::Reference< io::XStrea aArgs[1] <<= (sal_Bool)sal_True; // do not create copy uno::Reference< container::XNameContainer > xNameContainer( m_xFactory->createInstanceWithArguments( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.OLESimpleStorage" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLESimpleStorage" )), aArgs ), uno::UNO_QUERY ); @@ -616,7 +575,7 @@ void OleEmbeddedObject::RemoveVisualCache_Impl( const uno::Reference< io::XStrea for ( sal_uInt8 nInd = 0; nInd < 10; nInd++ ) { - ::rtl::OUString aStreamName = ::rtl::OUString::createFromAscii( "\002OlePres00" ); + ::rtl::OUString aStreamName(RTL_CONSTASCII_USTRINGPARAM( "\002OlePres00" )); aStreamName += ::rtl::OUString::valueOf( (sal_Int32)nInd ); if ( xNameContainer->hasByName( aStreamName ) ) xNameContainer->removeByName( aStreamName ); @@ -657,7 +616,7 @@ sal_Bool OleEmbeddedObject::HasVisReplInStream() // open temporary file for reading uno::Reference < ucb::XSimpleFileAccess > xTempAccess( m_xFactory->createInstance ( - ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" ) )), uno::UNO_QUERY ); if ( !xTempAccess.is() ) @@ -681,7 +640,7 @@ sal_Bool OleEmbeddedObject::HasVisReplInStream() aArgs[1] <<= (sal_Bool)sal_True; // do not create copy uno::Reference< container::XNameContainer > xNameContainer( m_xFactory->createInstanceWithArguments( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.OLESimpleStorage" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLESimpleStorage" )), aArgs ), uno::UNO_QUERY ); @@ -689,7 +648,7 @@ sal_Bool OleEmbeddedObject::HasVisReplInStream() { for ( sal_uInt8 nInd = 0; nInd < 10 && !bExists; nInd++ ) { - ::rtl::OUString aStreamName = ::rtl::OUString::createFromAscii( "\002OlePres00" ); + ::rtl::OUString aStreamName(RTL_CONSTASCII_USTRINGPARAM( "\002OlePres00" )); aStreamName += ::rtl::OUString::valueOf( (sal_Int32)nInd ); try { @@ -728,7 +687,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToRetrieveCachedVisualRepres { xNameContainer = uno::Reference< container::XNameContainer >( m_xFactory->createInstanceWithArguments( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.OLESimpleStorage" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLESimpleStorage" )), aArgs ), uno::UNO_QUERY ); } @@ -739,7 +698,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToRetrieveCachedVisualRepres { for ( sal_uInt8 nInd = 0; nInd < 10; nInd++ ) { - ::rtl::OUString aStreamName = ::rtl::OUString::createFromAscii( "\002OlePres00" ); + ::rtl::OUString aStreamName(RTL_CONSTASCII_USTRINGPARAM( "\002OlePres00" )); aStreamName += ::rtl::OUString::valueOf( (sal_Int32)nInd ); uno::Reference< io::XStream > xCachedCopyStream; try @@ -955,7 +914,7 @@ sal_Bool OleEmbeddedObject::OnShowWindow_Impl( sal_Bool bShow ) void OleEmbeddedObject::OnIconChanged_Impl() { // TODO/LATER: currently this notification seems to be impossible - // MakeEventListenerNotification_Impl( ::rtl::OUString::createFromAscii( "OnIconChanged" ) ); + // MakeEventListenerNotification_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnIconChanged" )) ); } //------------------------------------------------------ @@ -985,7 +944,7 @@ void OleEmbeddedObject::OnViewChanged_Impl() // The view is changed while the object is in running state, save the new object m_xCachedVisualRepresentation = uno::Reference< io::XStream >(); SaveObject_Impl(); - MakeEventListenerNotification_Impl( ::rtl::OUString::createFromAscii( "OnVisAreaChanged" ) ); + MakeEventListenerNotification_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnVisAreaChanged" )) ); } // =============================================================== } @@ -1128,7 +1087,7 @@ void OleEmbeddedObject::StoreObjectToStream( uno::Reference< io::XOutputStream > // open temporary file for reading uno::Reference < ucb::XSimpleFileAccess > xTempAccess( m_xFactory->createInstance ( - ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" ) )), uno::UNO_QUERY ); if ( !xTempAccess.is() ) @@ -1172,13 +1131,13 @@ void OleEmbeddedObject::StoreToLocation_Impl( if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Can't store object without persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); OSL_ENSURE( m_xParentStorage.is() && m_xObjectStream.is(), "The object has no valid persistence!\n" ); @@ -1190,11 +1149,11 @@ void OleEmbeddedObject::StoreToLocation_Impl( uno::Reference< io::XStream > xCachedVisualRepresentation; for ( sal_Int32 nInd = 0; nInd < lObjArgs.getLength(); nInd++ ) { - if ( lObjArgs[nInd].Name.equalsAscii( "StoreVisualReplacement" ) ) + if ( lObjArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StoreVisualReplacement" ) ) ) lObjArgs[nInd].Value >>= bStoreVis; - else if ( lObjArgs[nInd].Name.equalsAscii( "VisualReplacement" ) ) + else if ( lObjArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VisualReplacement" ) ) ) lObjArgs[nInd].Value >>= xCachedVisualRepresentation; - else if ( lObjArgs[nInd].Name.equalsAscii( "CanTryOptimization" ) ) + else if ( lObjArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CanTryOptimization" ) ) ) lObjArgs[nInd].Value >>= bTryOptimization; } @@ -1260,7 +1219,7 @@ void OleEmbeddedObject::StoreToLocation_Impl( if ( !xTargetStream.is() ) throw io::IOException(); //TODO: access denied - SetStreamMediaType_Impl( xTargetStream, ::rtl::OUString::createFromAscii( "application/vnd.sun.star.oleobject" ) ); + SetStreamMediaType_Impl( xTargetStream, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.star.oleobject" ) )); uno::Reference< io::XOutputStream > xOutStream = xTargetStream->getOutputStream(); if ( !xOutStream.is() ) throw io::IOException(); //TODO: access denied @@ -1407,12 +1366,12 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( throw lang::DisposedException(); // TODO if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -1427,7 +1386,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( // it can switch persistant representation only without initialization throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "Can't change persistant representation of activated object!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't change persistant representation of activated object!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1437,7 +1396,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( saveCompleted( ( m_xParentStorage != xStorage || !m_aEntryName.equals( sEntName ) ) ); else throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1451,7 +1410,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( m_bReadOnly = sal_False; sal_Int32 nInd = 0; for ( nInd = 0; nInd < lArguments.getLength(); nInd++ ) - if ( lArguments[nInd].Name.equalsAscii( "ReadOnly" ) ) + if ( lArguments[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ReadOnly" ) ) ) lArguments[nInd].Value >>= m_bReadOnly; #ifdef WNT @@ -1461,7 +1420,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( SwitchOwnPersistence( xStorage, sEntName ); for ( nInd = 0; nInd < lObjArgs.getLength(); nInd++ ) - if ( lObjArgs[nInd].Name.equalsAscii( "StoreVisualReplacement" ) ) + if ( lObjArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StoreVisualReplacement" ) ) ) lObjArgs[nInd].Value >>= m_bStoreVisRepl; #ifdef WNT @@ -1529,12 +1488,12 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( // use URL ( may be content or stream later ) from MediaDescriptor to initialize object ::rtl::OUString aURL; for ( sal_Int32 nInd = 0; nInd < lArguments.getLength(); nInd++ ) - if ( lArguments[nInd].Name.equalsAscii( "URL" ) ) + if ( lArguments[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) ) lArguments[nInd].Value >>= aURL; if ( !aURL.getLength() ) throw lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii( "Empty URL is provided in the media descriptor!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty URL is provided in the media descriptor!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); @@ -1556,7 +1515,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( //TODO: //} else - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Wrong connection mode is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Wrong connection mode is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); } @@ -1574,7 +1533,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( // do nothing, the object has already switched it's persistence } else - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Wrong connection mode is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Wrong connection mode is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); @@ -1674,7 +1633,7 @@ void SAL_CALL OleEmbeddedObject::saveCompleted( sal_Bool bUseNew ) if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Can't store object without persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1739,13 +1698,13 @@ void SAL_CALL OleEmbeddedObject::saveCompleted( sal_Bool bUseNew ) aGuard.clear(); if ( bUseNew ) { - MakeEventListenerNotification_Impl( ::rtl::OUString::createFromAscii( "OnSaveAsDone" ) ); + MakeEventListenerNotification_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveAsDone" ) )); // the object can be changed only on windows // the notification should be done only if the object is not in loaded state if ( m_pOleComponent && m_nUpdateMode == embed::EmbedUpdateModes::ALWAYS_UPDATE && !bStoreLoaded ) { - MakeEventListenerNotification_Impl( ::rtl::OUString::createFromAscii( "OnVisAreaChanged" ) ); + MakeEventListenerNotification_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnVisAreaChanged" ) )); } } } @@ -1770,7 +1729,7 @@ sal_Bool SAL_CALL OleEmbeddedObject::hasEntry() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_xObjectStream.is() ) @@ -1800,13 +1759,13 @@ sal_Bool SAL_CALL OleEmbeddedObject::hasEntry() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object persistence is not initialized!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object persistence is not initialized!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_aEntryName; @@ -1845,13 +1804,13 @@ void SAL_CALL OleEmbeddedObject::storeOwn() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Can't store object without persistence!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Can't store object without persistence!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_bReadOnly ) @@ -1871,7 +1830,7 @@ void SAL_CALL OleEmbeddedObject::storeOwn() if ( !m_xObjectStream.is() ) throw io::IOException(); //TODO: access denied - SetStreamMediaType_Impl( m_xObjectStream, ::rtl::OUString::createFromAscii( "application/vnd.sun.star.oleobject" ) ); + SetStreamMediaType_Impl( m_xObjectStream, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.star.oleobject" ) )); uno::Reference< io::XOutputStream > xOutStream = m_xObjectStream->getOutputStream(); if ( !xOutStream.is() ) throw io::IOException(); //TODO: access denied @@ -1939,12 +1898,12 @@ void SAL_CALL OleEmbeddedObject::storeOwn() aGuard.clear(); - MakeEventListenerNotification_Impl( ::rtl::OUString::createFromAscii( "OnSaveDone" ) ); + MakeEventListenerNotification_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveDone" ) )); // the object can be changed only on Windows // the notification should be done only if the object is not in loaded state if ( m_pOleComponent && m_nUpdateMode == embed::EmbedUpdateModes::ALWAYS_UPDATE && !bStoreLoaded ) - MakeEventListenerNotification_Impl( ::rtl::OUString::createFromAscii( "OnVisAreaChanged" ) ); + MakeEventListenerNotification_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnVisAreaChanged" ) )); } //------------------------------------------------------ @@ -1968,13 +1927,13 @@ sal_Bool SAL_CALL OleEmbeddedObject::isReadonly() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object persistence is not initialized!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object persistence is not initialized!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_bReadOnly; @@ -2009,13 +1968,13 @@ void SAL_CALL OleEmbeddedObject::reload( if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object persistence is not initialized!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object persistence is not initialized!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // TODO: @@ -2048,12 +2007,12 @@ void SAL_CALL OleEmbeddedObject::breakLink( const uno::Reference< embed::XStorag throw lang::DisposedException(); // TODO if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -2062,7 +2021,7 @@ void SAL_CALL OleEmbeddedObject::breakLink( const uno::Reference< embed::XStorag { // it must be a linked initialized object throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object is not a valid linked object!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not a valid linked object!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -2071,7 +2030,7 @@ void SAL_CALL OleEmbeddedObject::breakLink( const uno::Reference< embed::XStorag if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); @@ -2186,12 +2145,12 @@ sal_Bool SAL_CALL OleEmbeddedObject::isLink() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( !m_bIsLink ) throw embed::WrongStateException( - ::rtl::OUString::createFromAscii( "The object is not a link object!\n" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not a link object!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // TODO: probably the link URL can be retrieved from OLE @@ -2199,3 +2158,4 @@ sal_Bool SAL_CALL OleEmbeddedObject::isLink() return m_aLinkURL; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/msole/oleregister.cxx b/embeddedobj/source/msole/oleregister.cxx index 1baa773963..fe49cb1ecb 100644 --- a/embeddedobj/source/msole/oleregister.cxx +++ b/embeddedobj/source/msole/oleregister.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. @@ -121,3 +122,4 @@ sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegis } // extern "C" +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/msole/olevisual.cxx b/embeddedobj/source/msole/olevisual.cxx index 810f40a015..2e7c796a88 100644 --- a/embeddedobj/source/msole/olevisual.cxx +++ b/embeddedobj/source/msole/olevisual.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. @@ -64,16 +65,16 @@ embed::VisualRepresentation OleEmbeddedObject::GetVisualRepresentationInNativeFo { // it's a bitmap aVisualRepr.Flavor = datatransfer::DataFlavor( - ::rtl::OUString::createFromAscii( "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" ), - ::rtl::OUString::createFromAscii( "Bitmap" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" )), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Bitmap" )), ::getCppuType( (const uno::Sequence< sal_Int8 >*) NULL ) ); } else { // it's a metafile aVisualRepr.Flavor = datatransfer::DataFlavor( - ::rtl::OUString::createFromAscii( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" ), - ::rtl::OUString::createFromAscii( "Windows Metafile" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" )), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Windows Metafile" )), ::getCppuType( (const uno::Sequence< sal_Int8 >*) NULL ) ); } @@ -110,11 +111,11 @@ void SAL_CALL OleEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const awt OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object is not loaded!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not loaded!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); #ifdef WNT @@ -190,11 +191,11 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object is not loaded!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not loaded!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); awt::Size aResult; @@ -338,13 +339,13 @@ embed::VisualRepresentation SAL_CALL OleEmbeddedObject::getPreferredVisualRepres OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // TODO: if the object has cached representation then it should be returned // TODO: if the object has no cached representation and is in loaded state it should switch itself to the running state if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object is not loaded!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not loaded!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); embed::VisualRepresentation aVisualRepr; @@ -371,8 +372,8 @@ embed::VisualRepresentation SAL_CALL OleEmbeddedObject::getPreferredVisualRepres changeState( embed::EmbedStates::RUNNING ); datatransfer::DataFlavor aDataFlavor( - ::rtl::OUString::createFromAscii( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" ), - ::rtl::OUString::createFromAscii( "Windows Metafile" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" )), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Windows Metafile" )), ::getCppuType( (const uno::Sequence< sal_Int8 >*) NULL ) ); aVisualRepr.Data = m_pOleComponent->getTransferData( aDataFlavor ); @@ -404,7 +405,7 @@ embed::VisualRepresentation SAL_CALL OleEmbeddedObject::getPreferredVisualRepres if ( !m_xCachedVisualRepresentation.is() ) { // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -431,14 +432,15 @@ sal_Int32 SAL_CALL OleEmbeddedObject::getMapUnit( sal_Int64 nAspect ) OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Illegal call!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Illegal call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object is not loaded!\n" ), + throw embed::WrongStateException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object is not loaded!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return embed::EmbedMapUnits::ONE_100TH_MM; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/msole/olewrapclient.cxx b/embeddedobj/source/msole/olewrapclient.cxx index fa9b055417..57b66baaf5 100644 --- a/embeddedobj/source/msole/olewrapclient.cxx +++ b/embeddedobj/source/msole/olewrapclient.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. @@ -156,3 +157,4 @@ STDMETHODIMP OleWrapperClientSite::RequestNewObjectLayout(void) return E_NOTIMPL; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/msole/olewrapclient.hxx b/embeddedobj/source/msole/olewrapclient.hxx index d53ab38d1e..e054b0b12d 100644 --- a/embeddedobj/source/msole/olewrapclient.hxx +++ b/embeddedobj/source/msole/olewrapclient.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. @@ -54,3 +55,4 @@ public: STDMETHODIMP RequestNewObjectLayout(void); }; +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/msole/ownview.cxx b/embeddedobj/source/msole/ownview.cxx index 923a2fe353..7924e69787 100644 --- a/embeddedobj/source/msole/ownview.cxx +++ b/embeddedobj/source/msole/ownview.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. @@ -41,9 +42,7 @@ #include <com/sun/star/util/XCloseable.hpp> #include <com/sun/star/beans/XPropertySet.hpp> -#ifndef _COM_SUN_STAR_DOCUMENT_XEVENTBRODCASTER_HPP_ #include <com/sun/star/document/XEventBroadcaster.hpp> -#endif #include <com/sun/star/document/XEventListener.hpp> #include <com/sun/star/document/XTypeDetection.hpp> #include <com/sun/star/container/XNameAccess.hpp> @@ -127,35 +126,35 @@ sal_Bool OwnView_Impl::CreateModelFromURL( const ::rtl::OUString& aFileURL ) try { uno::Reference < frame::XComponentLoader > xDocumentLoader( m_xFactory->createInstance ( - ::rtl::OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ) )), uno::UNO_QUERY ); if ( xDocumentLoader.is() ) { uno::Sequence< beans::PropertyValue > aArgs( m_aFilterName.getLength() ? 5 : 4 ); - aArgs[0].Name = ::rtl::OUString::createFromAscii( "URL" ); + aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "URL" )); aArgs[0].Value <<= aFileURL; - aArgs[1].Name = ::rtl::OUString::createFromAscii( "ReadOnly" ); + aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ReadOnly" )); aArgs[1].Value <<= sal_True; - aArgs[2].Name = ::rtl::OUString::createFromAscii( "InteractionHandler" ); + aArgs[2].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" )); aArgs[2].Value <<= uno::Reference< task::XInteractionHandler >( static_cast< ::cppu::OWeakObject* >( new DummyHandler_Impl() ), uno::UNO_QUERY ); - aArgs[3].Name = ::rtl::OUString::createFromAscii( "DontEdit" ); + aArgs[3].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DontEdit" )); aArgs[3].Value <<= sal_True; if ( m_aFilterName.getLength() ) { - aArgs[4].Name = ::rtl::OUString::createFromAscii( "FilterName" ); + aArgs[4].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); aArgs[4].Value <<= m_aFilterName; } uno::Reference< frame::XModel > xModel( xDocumentLoader->loadComponentFromURL( aFileURL, - ::rtl::OUString::createFromAscii( "_blank" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "_blank" )), 0, aArgs ), uno::UNO_QUERY ); @@ -215,7 +214,7 @@ sal_Bool OwnView_Impl::CreateModel( sal_Bool bUseNative ) throw uno::RuntimeException(); uno::Reference< document::XTypeDetection > xTypeDetection( - xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.TypeDetection" ) ), + xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.TypeDetection" ) )), uno::UNO_QUERY_THROW ); ::rtl::OUString aTypeName; @@ -242,7 +241,7 @@ sal_Bool OwnView_Impl::CreateModel( sal_Bool bUseNative ) ::rtl::OUString aFilterName; for ( sal_Int32 nInd = 0; nInd < aArgs.getLength(); nInd++ ) - if ( aArgs[nInd].Name.equalsAscii( "FilterName" ) ) + if ( aArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterName" ) ) ) aArgs[nInd].Value >>= aFilterName; if ( !aFilterName.getLength() && aTypeName.getLength() ) @@ -255,7 +254,7 @@ sal_Bool OwnView_Impl::CreateModel( sal_Bool bUseNative ) { for ( sal_Int32 nInd = 0; nInd < aTypes.getLength(); nInd++ ) { - if ( aTypes[nInd].Name.equalsAscii( "PreferredFilter" ) && ( aTypes[nInd].Value >>= aFilterName ) ) + if ( aTypes[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PreferredFilter" ) ) && ( aTypes[nInd].Value >>= aFilterName ) ) { aTypes[nInd].Value >>= aFilterName; break; @@ -277,7 +276,7 @@ sal_Bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io // create m_aNativeTempURL ::rtl::OUString aNativeTempURL; uno::Reference < beans::XPropertySet > xNativeTempFile( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.io.TempFile" ) ), + m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.TempFile" ) )), uno::UNO_QUERY_THROW ); uno::Reference < io::XStream > xNativeTempStream( xNativeTempFile, uno::UNO_QUERY_THROW ); uno::Reference < io::XOutputStream > xNativeOutTemp = xNativeTempStream->getOutputStream(); @@ -286,8 +285,8 @@ sal_Bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io throw uno::RuntimeException(); try { - xNativeTempFile->setPropertyValue( ::rtl::OUString::createFromAscii( "RemoveFile" ), uno::makeAny( sal_False ) ); - uno::Any aUrl = xNativeTempFile->getPropertyValue( ::rtl::OUString::createFromAscii( "Uri" ) ); + xNativeTempFile->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RemoveFile" )), uno::makeAny( sal_False ) ); + uno::Any aUrl = xNativeTempFile->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Uri" ) )); aUrl >>= aNativeTempURL; } catch ( uno::Exception& ) @@ -431,7 +430,7 @@ void OwnView_Impl::CreateNative() { uno::Reference < ucb::XSimpleFileAccess > xAccess( m_xFactory->createInstance ( - ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" ) )), uno::UNO_QUERY_THROW ); uno::Reference< io::XInputStream > xInStream = xAccess->openFileRead( m_aTempFileURL ); @@ -442,11 +441,11 @@ void OwnView_Impl::CreateNative() aArgs[0] <<= xInStream; uno::Reference< container::XNameAccess > xNameAccess( m_xFactory->createInstanceWithArguments( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.OLESimpleStorage" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLESimpleStorage" )), aArgs ), uno::UNO_QUERY_THROW ); - ::rtl::OUString aSubStreamName = ::rtl::OUString::createFromAscii( "\1Ole10Native" ); + ::rtl::OUString aSubStreamName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "\1Ole10Native" )); uno::Reference< embed::XClassifiedObject > xStor( xNameAccess, uno::UNO_QUERY_THROW ); uno::Sequence< sal_Int8 > aStorClassID = xStor->getClassID(); @@ -610,7 +609,7 @@ void SAL_CALL OwnView_Impl::notifyEvent( const document::EventObject& aEvent ) { ::osl::MutexGuard aGuard( m_aMutex ); - if ( aEvent.Source == m_xModel && aEvent.EventName.equalsAscii( "OnSaveAsDone" ) ) + if ( aEvent.Source == m_xModel && aEvent.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnSaveAsDone" ) ) ) { // SaveAs operation took place, so just forget the model and deregister listeners xModel = m_xModel; @@ -663,3 +662,4 @@ void SAL_CALL OwnView_Impl::disposing( const lang::EventObject& Source ) m_xModel = uno::Reference< frame::XModel >(); }; +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/msole/ownview.hxx b/embeddedobj/source/msole/ownview.hxx index 023f0dacd3..1768ca61cd 100644 --- a/embeddedobj/source/msole/ownview.hxx +++ b/embeddedobj/source/msole/ownview.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. @@ -88,3 +89,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/msole/platform.h b/embeddedobj/source/msole/platform.h index 26f9029c5e..20ffb3f305 100644 --- a/embeddedobj/source/msole/platform.h +++ b/embeddedobj/source/msole/platform.h @@ -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. @@ -47,3 +48,4 @@ #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/msole/xdialogcreator.cxx b/embeddedobj/source/msole/xdialogcreator.cxx index 312b7ede44..4bcc7836c3 100644 --- a/embeddedobj/source/msole/xdialogcreator.cxx +++ b/embeddedobj/source/msole/xdialogcreator.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. @@ -37,7 +38,7 @@ #include <osl/thread.h> #include <osl/file.hxx> -#include <vos/module.hxx> +#include <osl/module.hxx> #include <comphelper/classids.hxx> #include "platform.h" @@ -45,8 +46,6 @@ #include "xdialogcreator.hxx" #include "oleembobj.hxx" -// LLA: tip from FS -// #include <confighelper.hxx> #include <xdialogcreator.hxx> #include <oleembobj.hxx> @@ -119,15 +118,15 @@ uno::Sequence< sal_Int8 > GetRelatedInternalID_Impl( const uno::Sequence< sal_In uno::Sequence< ::rtl::OUString > SAL_CALL MSOLEDialogObjectCreator::impl_staticGetSupportedServiceNames() { uno::Sequence< ::rtl::OUString > aRet(2); - aRet[0] = ::rtl::OUString::createFromAscii("com.sun.star.embed.MSOLEObjectSystemCreator"); - aRet[1] = ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.MSOLEObjectSystemCreator"); + aRet[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.MSOLEObjectSystemCreator")); + aRet[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.MSOLEObjectSystemCreator")); return aRet; } //------------------------------------------------------------------------- ::rtl::OUString SAL_CALL MSOLEDialogObjectCreator::impl_staticGetImplementationName() { - return ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.MSOLEObjectSystemCreator"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.MSOLEObjectSystemCreator")); } //------------------------------------------------------------------------- @@ -153,12 +152,12 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia #ifdef WNT if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -180,12 +179,12 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia io.dwFlags = IOF_SELECTCREATENEW | IOF_DISABLELINK; - ::vos::OModule aOleDlgLib; - if( !aOleDlgLib.load( ::rtl::OUString::createFromAscii( "oledlg" ) ) ) + ::osl::Module aOleDlgLib; + if( !aOleDlgLib.load( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "oledlg" ) ) )) throw uno::RuntimeException(); OleUIInsertObjectA_Type * pInsertFct = (OleUIInsertObjectA_Type *) - aOleDlgLib.getSymbol( ::rtl::OUString::createFromAscii( "OleUIInsertObjectA" ) ); + aOleDlgLib.getSymbol( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OleUIInsertObjectA" ) )); if( !pInsertFct ) throw uno::RuntimeException(); @@ -197,7 +196,7 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia { uno::Reference< embed::XEmbedObjectCreator > xEmbCreator( m_xFactory->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.EmbeddedObjectCreator" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.EmbeddedObjectCreator" ) )), uno::UNO_QUERY ); if ( !xEmbCreator.is() ) throw uno::RuntimeException(); @@ -230,7 +229,7 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia throw uno::RuntimeException(); uno::Sequence< beans::PropertyValue > aMediaDescr( 1 ); - aMediaDescr[0].Name = ::rtl::OUString::createFromAscii( "URL" ); + aMediaDescr[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "URL" )); aMediaDescr[0].Value <<= aFileURL; // TODO: use config helper for type detection @@ -240,12 +239,12 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia if ( aHelper.AddFilterNameCheckOwnFile( aMediaDescr ) ) xEmbCreator = uno::Reference< embed::XEmbedObjectCreator >( m_xFactory->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.EmbeddedObjectCreator" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.EmbeddedObjectCreator" ) )), uno::UNO_QUERY ); else xEmbCreator = uno::Reference< embed::XEmbedObjectCreator >( m_xFactory->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.embed.OLEEmbeddedObjectFactory" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.OLEEmbeddedObjectFactory" ) )), uno::UNO_QUERY ); if ( !xEmbCreator.is() ) @@ -274,14 +273,14 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia if ( nBufSize && nBufSize == GetMetaFileBitsEx( pMF->hMF, nBufSize, pBuf+22 ) ) { datatransfer::DataFlavor aFlavor( - ::rtl::OUString::createFromAscii( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" ), - ::rtl::OUString::createFromAscii( "Image WMF" ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" )), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Image WMF" )), getCppuType( ( const uno::Sequence< sal_Int8 >* ) 0 ) ); aObjectInfo.Options.realloc( 2 ); - aObjectInfo.Options[0].Name = ::rtl::OUString::createFromAscii( "Icon" ); + aObjectInfo.Options[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Icon" )); aObjectInfo.Options[0].Value <<= aMetafile; - aObjectInfo.Options[1].Name = ::rtl::OUString::createFromAscii( "IconFormat" ); + aObjectInfo.Options[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "IconFormat" )); aObjectInfo.Options[1].Value <<= aFlavor; } @@ -318,12 +317,12 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceInitF #ifdef WNT if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntryName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -383,3 +382,4 @@ uno::Sequence< ::rtl::OUString > SAL_CALL MSOLEDialogObjectCreator::getSupported return impl_staticGetSupportedServiceNames(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/msole/xdialogcreator.hxx b/embeddedobj/source/msole/xdialogcreator.hxx index 910c58208c..7d20ad0388 100644 --- a/embeddedobj/source/msole/xdialogcreator.hxx +++ b/embeddedobj/source/msole/xdialogcreator.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,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/msole/xolefactory.cxx b/embeddedobj/source/msole/xolefactory.cxx index f5eab2f205..64339daf36 100644 --- a/embeddedobj/source/msole/xolefactory.cxx +++ b/embeddedobj/source/msole/xolefactory.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. @@ -49,15 +50,15 @@ using namespace ::com::sun::star; uno::Sequence< ::rtl::OUString > SAL_CALL OleEmbeddedObjectFactory::impl_staticGetSupportedServiceNames() { uno::Sequence< ::rtl::OUString > aRet(2); - aRet[0] = ::rtl::OUString::createFromAscii("com.sun.star.embed.OLEEmbeddedObjectFactory"); - aRet[1] = ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.OLEEmbeddedObjectFactory"); + aRet[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.OLEEmbeddedObjectFactory")); + aRet[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.OLEEmbeddedObjectFactory")); return aRet; } //------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OleEmbeddedObjectFactory::impl_staticGetImplementationName() { - return ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.OLEEmbeddedObjectFactory"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.OLEEmbeddedObjectFactory")); } //------------------------------------------------------------------------- @@ -82,12 +83,12 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObjectFactory::createInstanceInitFromEntry" ); if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -122,7 +123,7 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta for ( sal_Int32 nInd = 0; nInd < lObjArgs.getLength(); nInd++ ) { - if ( lObjArgs[nInd].Name.equalsAscii( "CloneFrom" ) ) + if ( lObjArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CloneFrom" ) ) ) { try { @@ -154,12 +155,12 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObjectFactory::createInstanceInitFromMediaDescriptor" ); if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -196,12 +197,12 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObjectFactory::createInstanceInitNew" ); if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); @@ -237,13 +238,13 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObjectFactory::createInstanceLink" ); if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -284,12 +285,12 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta // the initialization is completelly controlled by user if ( !xStorage.is() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No parent storage is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -340,3 +341,4 @@ uno::Sequence< ::rtl::OUString > SAL_CALL OleEmbeddedObjectFactory::getSupported return impl_staticGetSupportedServiceNames(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/msole/xolefactory.hxx b/embeddedobj/source/msole/xolefactory.hxx index 97bd9f7cca..4fea7d3065 100644 --- a/embeddedobj/source/msole/xolefactory.hxx +++ b/embeddedobj/source/msole/xolefactory.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. @@ -82,3 +83,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/test/Container1/nativelib/nativeview.c b/embeddedobj/test/Container1/nativelib/nativeview.c index bb9a795434..fada23a76d 100644 --- a/embeddedobj/test/Container1/nativelib/nativeview.c +++ b/embeddedobj/test/Container1/nativelib/nativeview.c @@ -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. @@ -79,10 +80,6 @@ JNIEXPORT jlong JNICALL Java_embeddedobj_test_NativeView_getNativeWindow JAWT_Win32DrawingSurfaceInfo* dsi_win ; jlong drawable; -#if 0 - LONG hFuncPtr; -#endif - /* Get the AWT */ awt.version = JAWT_VERSION_1_3; result = JAWT_GetAWT(env, &awt); @@ -115,72 +112,7 @@ JNIEXPORT jlong JNICALL Java_embeddedobj_test_NativeView_getNativeWindow /* Free the drawing surface */ awt.FreeDrawingSurface(ds); -#if 0 - /* Register own window procedure - Do it one times only! Otherwhise - multiple instances will be registered - and calls on such construct produce - a stack overflow. - */ - - if (GetProp( (HWND)drawable, OLD_PROC_KEY )==0) - { - hFuncPtr = SetWindowLong( (HWND)drawable, GWL_WNDPROC, (DWORD)NativeViewWndProc ); - SetProp( (HWND)drawable, OLD_PROC_KEY, (HANDLE)hFuncPtr ); - } -#endif - return drawable; } -#if 0 -/***************************************************************************** - * - * Class : - - * Method : NativeViewWndProc - * Signature : - - * Description: registered window handler to intercept window messages between - * java and office process - */ -static LRESULT APIENTRY NativeViewWndProc( - HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - HANDLE hFuncPtr; - - /* resize new created child window to fill out the java window complete */ - if (uMsg==WM_PARENTNOTIFY) - { - if (wParam == WM_CREATE) - { - RECT rect; - HWND hChild = (HWND) lParam; - - GetClientRect(hWnd, &rect); - - SetWindowPos(hChild, - NULL, - rect.left, - rect.top, - rect.right - rect.left, - rect.bottom - rect.top, - SWP_NOZORDER); - } - } - /* handle normal resize events */ - else if(uMsg==WM_SIZE) - { - WORD newHeight = HIWORD(lParam); - WORD newWidth = LOWORD(lParam); - HWND hChild = GetWindow(hWnd, GW_CHILD); - - if (hChild != NULL) - SetWindowPos(hChild, NULL, 0, 0, newWidth, newHeight, SWP_NOZORDER); - } - - /* forward request to original handler which is intercepted by this window procedure */ - hFuncPtr = GetProp(hWnd, OLD_PROC_KEY); - MY_ASSERT(hFuncPtr,"lost original window proc handler"); - return CallWindowProc( hFuncPtr, hWnd, uMsg, wParam, lParam); -} -#endif - +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/test/Container1/nativelib/nativeview.h b/embeddedobj/test/Container1/nativelib/nativeview.h index 1a3f320087..0cbb1a28d6 100644 --- a/embeddedobj/test/Container1/nativelib/nativeview.h +++ b/embeddedobj/test/Container1/nativelib/nativeview.h @@ -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. @@ -55,3 +56,4 @@ JNIEXPORT jlong JNICALL Java_embeddedobj_test_NativeView_getNativeWindow #endif #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/test/MainThreadExecutor/register.cxx b/embeddedobj/test/MainThreadExecutor/register.cxx index 84daf9585c..f65d5d6274 100644 --- a/embeddedobj/test/MainThreadExecutor/register.cxx +++ b/embeddedobj/test/MainThreadExecutor/register.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. @@ -99,3 +100,4 @@ sal_Bool SAL_CALL component_writeInfo( void * pServiceManager, void * pRegistryK } // extern "C" +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/test/MainThreadExecutor/xexecutor.cxx b/embeddedobj/test/MainThreadExecutor/xexecutor.cxx index 54648c4fc6..aa00502b45 100644 --- a/embeddedobj/test/MainThreadExecutor/xexecutor.cxx +++ b/embeddedobj/test/MainThreadExecutor/xexecutor.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. @@ -70,7 +71,7 @@ uno::Any SAL_CALL UNOMainThreadExecutor::execute( const uno::Sequence< beans::Na { uno::Reference< task::XJob > xJob; - if ( aArguments.getLength() > 0 && aArguments[0].Name.equalsAscii( "JobToExecute" ) ) + if ( aArguments.getLength() > 0 && aArguments[0].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "JobToExecute" ) ) ) aArguments[0].Value >>= xJob; if ( !xJob.is() ) @@ -96,14 +97,14 @@ uno::Any SAL_CALL UNOMainThreadExecutor::execute( const uno::Sequence< beans::Na uno::Sequence< ::rtl::OUString > SAL_CALL UNOMainThreadExecutor::impl_staticGetSupportedServiceNames() { uno::Sequence< ::rtl::OUString > aRet(1); - aRet[0] = ::rtl::OUString::createFromAscii( "com.sun.star.comp.thread.MainThreadExecutor" ); + aRet[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.thread.MainThreadExecutor")); return aRet; } //------------------------------------------------------------------------- ::rtl::OUString SAL_CALL UNOMainThreadExecutor::impl_staticGetImplementationName() { - return ::rtl::OUString::createFromAscii( "com.sun.star.comp.thread.MainThreadExecutor" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.thread.MainThreadExecutor")); } //------------------------------------------------------------------------- @@ -140,3 +141,4 @@ uno::Sequence< ::rtl::OUString > SAL_CALL UNOMainThreadExecutor::getSupportedSer return impl_staticGetSupportedServiceNames(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/test/MainThreadExecutor/xexecutor.hxx b/embeddedobj/test/MainThreadExecutor/xexecutor.hxx index 1a60bfeaee..c3da32dda9 100644 --- a/embeddedobj/test/MainThreadExecutor/xexecutor.hxx +++ b/embeddedobj/test/MainThreadExecutor/xexecutor.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. @@ -85,3 +86,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/test/mtexecutor/bitmapcreator.cxx b/embeddedobj/test/mtexecutor/bitmapcreator.cxx index aadd528d1a..6741d774ab 100644 --- a/embeddedobj/test/mtexecutor/bitmapcreator.cxx +++ b/embeddedobj/test/mtexecutor/bitmapcreator.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. @@ -40,15 +41,15 @@ using namespace ::com::sun::star; uno::Sequence< ::rtl::OUString > SAL_CALL VCLBitmapCreator::impl_staticGetSupportedServiceNames() { uno::Sequence< ::rtl::OUString > aRet(2); - aRet[0] = ::rtl::OUString::createFromAscii("com.sun.star.embed.BitmapCreator"); - aRet[1] = ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.BitmapCreator"); + aRet[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.BitmapCreator")); + aRet[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.BitmapCreator")); return aRet; } //------------------------------------------------------------------------- ::rtl::OUString SAL_CALL VCLBitmapCreator::impl_staticGetImplementationName() { - return ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.BitmapCreator"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.BitmapCreator")); } //------------------------------------------------------------------------- @@ -121,3 +122,4 @@ uno::Sequence< ::rtl::OUString > SAL_CALL VCLBitmapCreator::getSupportedServiceN return impl_staticGetSupportedServiceNames(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/test/mtexecutor/bitmapcreator.hxx b/embeddedobj/test/mtexecutor/bitmapcreator.hxx index bcabc4f69b..0a824bc1e7 100644 --- a/embeddedobj/test/mtexecutor/bitmapcreator.hxx +++ b/embeddedobj/test/mtexecutor/bitmapcreator.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. @@ -67,3 +68,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx b/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx index b84748bc75..63628cbdb7 100644 --- a/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx +++ b/embeddedobj/test/mtexecutor/mainthreadexecutor.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. @@ -38,15 +39,15 @@ using namespace ::com::sun::star; uno::Sequence< ::rtl::OUString > SAL_CALL MainThreadExecutor::impl_staticGetSupportedServiceNames() { uno::Sequence< ::rtl::OUString > aRet(2); - aRet[0] = ::rtl::OUString::createFromAscii("com.sun.star.thread.MainThreadExecutor"); - aRet[1] = ::rtl::OUString::createFromAscii("com.sun.star.comp.thread.MainThreadExecutor"); + aRet[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.thread.MainThreadExecutor")); + aRet[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.thread.MainThreadExecutor")); return aRet; } //------------------------------------------------------------------------- ::rtl::OUString SAL_CALL MainThreadExecutor::impl_staticGetImplementationName() { - return ::rtl::OUString::createFromAscii("com.sun.star.comp.thread.MainThreadExecutor"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.thread.MainThreadExecutor")); } //------------------------------------------------------------------------- @@ -67,7 +68,7 @@ uno::Any SAL_CALL MainThreadExecutor::execute( const uno::Sequence< beans::Named sal_Int32 nValuesSize = 0; for ( sal_Int32 nInd = 0; nInd < aArguments.getLength(); nInd++ ) - if ( aArguments[nInd].Name.equalsAscii( "JobToExecute" ) ) + if ( aArguments[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "JobToExecute" ) ) ) aArguments[nInd].Value >>= xJob; else { @@ -137,3 +138,4 @@ void MainThreadExecutorRequest::doIt() m_xJob->execute( m_aValues ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/test/mtexecutor/mainthreadexecutor.hxx b/embeddedobj/test/mtexecutor/mainthreadexecutor.hxx index 1a5421cf1e..61ef478406 100644 --- a/embeddedobj/test/mtexecutor/mainthreadexecutor.hxx +++ b/embeddedobj/test/mtexecutor/mainthreadexecutor.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. @@ -81,3 +82,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/test/mtexecutor/mteregister.cxx b/embeddedobj/test/mtexecutor/mteregister.cxx index 44ac1a022f..94c7df9d27 100644 --- a/embeddedobj/test/mtexecutor/mteregister.cxx +++ b/embeddedobj/test/mtexecutor/mteregister.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. @@ -121,3 +122,4 @@ sal_Bool SAL_CALL component_writeInfo( void * pServiceManager, void * pRegistryK } // extern "C" +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/eventattacher/source/eventattacher.cxx b/eventattacher/source/eventattacher.cxx index 2100cbb615..fd8155a5b7 100644 --- a/eventattacher/source/eventattacher.cxx +++ b/eventattacher/source/eventattacher.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. @@ -380,7 +381,7 @@ Reference< XIntrospection > EventAttacherImpl::getIntrospection() throw( Excepti // Haben wir den Service schon? Sonst anlegen if( !m_xIntrospection.is() ) { - Reference< XInterface > xIFace( m_xSMgr->createInstance( rtl::OUString::createFromAscii("com.sun.star.beans.Introspection") ) ); + Reference< XInterface > xIFace( m_xSMgr->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.beans.Introspection")) ) ); m_xIntrospection = Reference< XIntrospection >( xIFace, UNO_QUERY ); } return m_xIntrospection; @@ -394,7 +395,7 @@ Reference< XIdlReflection > EventAttacherImpl::getReflection() throw( Exception // Haben wir den Service schon? Sonst anlegen if( !m_xReflection.is() ) { - Reference< XInterface > xIFace( m_xSMgr->createInstance( rtl::OUString::createFromAscii("com.sun.star.reflection.CoreReflection") ) ); + Reference< XInterface > xIFace( m_xSMgr->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.reflection.CoreReflection")) ) ); m_xReflection = Reference< XIdlReflection >( xIFace, UNO_QUERY); } return m_xReflection; @@ -408,7 +409,7 @@ Reference< XInvocationAdapterFactory > EventAttacherImpl::getInvocationAdapterSe // Haben wir den Service schon? Sonst anlegen if( !m_xInvocationAdapterFactory.is() ) { - Reference< XInterface > xIFace( m_xSMgr->createInstance( rtl::OUString::createFromAscii("com.sun.star.script.InvocationAdapterFactory") ) ); + Reference< XInterface > xIFace( m_xSMgr->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.InvocationAdapterFactory")) ) ); m_xInvocationAdapterFactory = Reference< XInvocationAdapterFactory >( xIFace, UNO_QUERY ); } return m_xInvocationAdapterFactory; @@ -423,7 +424,7 @@ Reference< XTypeConverter > EventAttacherImpl::getConverter() throw( Exception ) // Haben wir den Service schon? Sonst anlegen if( !m_xConverter.is() ) { - Reference< XInterface > xIFace( m_xSMgr->createInstance( rtl::OUString::createFromAscii("com.sun.star.script.Converter") ) ); + Reference< XInterface > xIFace( m_xSMgr->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Converter")) ) ); m_xConverter = Reference< XTypeConverter >( xIFace, UNO_QUERY ); } return m_xConverter; @@ -868,3 +869,4 @@ void * SAL_CALL component_getFactory( +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/fileaccess/source/FileAccess.cxx b/fileaccess/source/FileAccess.cxx index 77de990a71..9e4e6c7ede 100644 --- a/fileaccess/source/FileAccess.cxx +++ b/fileaccess/source/FileAccess.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. @@ -61,6 +62,8 @@ #include <com/sun/star/ucb/XSimpleFileAccess3.hpp> #include <com/sun/star/util/XMacroExpander.hpp> +#include <vector> + #define IMPLEMENTATION_NAME "com.sun.star.comp.ucb.SimpleFileAccess" #define SERVICE_NAME "com.sun.star.ucb.SimpleFileAccess" @@ -75,6 +78,8 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::registry; using namespace ::com::sun::star::container; +using ::std::vector; + namespace io_FileAccess { @@ -281,42 +286,7 @@ void OFileAccess::transferImpl( const rtl::OUString& rSource, // #i29648# // -#if 0 - // Note: A hierachical UCB content implements interface XChild, which - // has a method getParent(). Unfortunately this does not always help - // here, because it is not guaranteed that a content object for a - // non-existing resource can be created. Thus, it will happen that an - // exception is thrown when trying to create a UCB content for the - // destination URL. - try - { - ucbhelper::Content aFullDest( - aDestObj.GetMainURL( - INetURLObject::NO_DECODE ), mxEnvironment ); - - Reference< XChild > xChild( aFullDest.get(), UNO_QUERY_THROW ); - Reference< com::sun::star::ucb::XContent > - xParent( xChild->getParent(), UNO_QUERY_THROW ); - ucbhelper::Content aParent( xParent, mxEnvironment ); - - aDestURL = aParent.getURL(); - - rtl::OUString aNameTmp; - aFullDest.getPropertyValue( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ) ) - >>= aNameTmp; - aName = aNameTmp; - } - catch ( Exception const & ) - { - throw RuntimeException( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "OFileAccess::transferrImpl - Unable to " - "obtain destination folder URL!" ) ), - static_cast< cppu::OWeakObject * >( this ) ); - } -#else if ( aDestObj.GetProtocol() == INET_PROT_VND_SUN_STAR_EXPAND ) { // Hack: Expand destination URL using Macro Expander and try again @@ -367,7 +337,7 @@ void OFileAccess::transferImpl( const rtl::OUString& rSource, "OFileAccess::transferrImpl - Unable to obtain " "destination folder URL!" ) ), static_cast< cppu::OWeakObject * >( this ) ); -#endif + } ucbhelper::Content aDestPath( aDestURL, mxEnvironment ); @@ -384,7 +354,7 @@ void OFileAccess::transferImpl( const rtl::OUString& rSource, } catch ( ::com::sun::star::ucb::CommandFailedException const & ) { - // Interaction Handler already handled the error that has occured... + // Interaction Handler already handled the error that has occurred... } } @@ -408,11 +378,11 @@ void OFileAccess::kill( const rtl::OUString& FileURL ) ucbhelper::Content aCnt( aDeleteObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment ); try { - aCnt.executeCommand( rtl::OUString::createFromAscii( "delete" ), makeAny( sal_Bool( sal_True ) ) ); + aCnt.executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "delete" )), makeAny( sal_Bool( sal_True ) ) ); } catch ( ::com::sun::star::ucb::CommandFailedException const & ) { - // Interaction Handler already handled the error that has occured... + // Interaction Handler already handled the error that has occurred... } } @@ -514,7 +484,7 @@ void OFileAccess::createFolder( const rtl::OUString& NewFolderURL ) } catch ( ::com::sun::star::ucb::CommandFailedException const & ) { - // Interaction Handler already handled the error that has occured... + // Interaction Handler already handled the error that has occurred... continue; } } @@ -529,7 +499,7 @@ sal_Int32 OFileAccess::getSize( const rtl::OUString& FileURL ) sal_Int64 nTemp = 0; INetURLObject aObj( FileURL, INET_PROT_FILE ); ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment ); - aCnt.getPropertyValue( rtl::OUString::createFromAscii( "Size" ) ) >>= nTemp; + aCnt.getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Size" )) ) >>= nTemp; nSize = (sal_Int32)nTemp; return nSize; } @@ -553,12 +523,11 @@ DateTime OFileAccess::getDateTimeModified( const rtl::OUString& FileURL ) Reference< XCommandEnvironment > aCmdEnv; ucbhelper::Content aYoung( aFileObj.GetMainURL( INetURLObject::NO_DECODE ), aCmdEnv ); - aYoung.getPropertyValue( rtl::OUString::createFromAscii( "DateModified" ) ) >>= aDateTime; + aYoung.getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DateModified" )) ) >>= aDateTime; return aDateTime; } - -DECLARE_LIST( StringList_Impl, rtl::OUString* ) +typedef vector< rtl::OUString* > StringList_Impl; Sequence< rtl::OUString > OFileAccess::getFolderContents( const rtl::OUString& FolderURL, sal_Bool bIncludeFolders ) throw(CommandAbortedException, Exception, RuntimeException) @@ -571,9 +540,6 @@ Sequence< rtl::OUString > OFileAccess::getFolderContents( const rtl::OUString& F ucbhelper::Content aCnt( aFolderObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment ); Reference< XResultSet > xResultSet; Sequence< rtl::OUString > aProps(0); - //Sequence< rtl::OUString > aProps(1); - //rtl::OUString* pProps = aProps.getArray(); - //pProps[0] == rtl::OUString::createFromAscii( "Url" ); ucbhelper::ResultSetInclude eInclude = bIncludeFolders ? ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS : ucbhelper::INCLUDE_DOCUMENTS_ONLY; @@ -583,12 +549,12 @@ Sequence< rtl::OUString > OFileAccess::getFolderContents( const rtl::OUString& F } catch ( ::com::sun::star::ucb::CommandFailedException const & ) { - // Interaction Handler already handled the error that has occured... + // Interaction Handler already handled the error that has occurred... } if ( xResultSet.is() ) { - pFiles = new StringList_Impl; + pFiles = new StringList_Impl(); Reference< com::sun::star::ucb::XContentAccess > xContentAccess( xResultSet, UNO_QUERY ); while ( xResultSet->next() ) @@ -596,21 +562,22 @@ Sequence< rtl::OUString > OFileAccess::getFolderContents( const rtl::OUString& F rtl::OUString aId = xContentAccess->queryContentIdentifierString(); INetURLObject aURL( aId, INET_PROT_FILE ); rtl::OUString* pFile = new rtl::OUString( aURL.GetMainURL( INetURLObject::NO_DECODE ) ); - pFiles->Insert( pFile, LIST_APPEND ); + pFiles->push_back( pFile ); } } if ( pFiles ) { - ULONG nCount = pFiles->Count(); + size_t nCount = pFiles->size(); Sequence < rtl::OUString > aRet( nCount ); rtl::OUString* pRet = aRet.getArray(); - for ( USHORT i = 0; i < nCount; ++i ) + for ( size_t i = 0; i < nCount; ++i ) { - rtl::OUString* pFile = pFiles->GetObject(i); + rtl::OUString* pFile = pFiles->at( i ); pRet[i] = *( pFile ); delete pFile; } + pFiles->clear(); delete pFiles; return aRet; } @@ -654,7 +621,7 @@ Reference< XInputStream > OFileAccess::openFileRead( const rtl::OUString& FileUR } catch ( ::com::sun::star::ucb::CommandFailedException const & ) { - // Interaction Handler already handled the error that has occured... + // Interaction Handler already handled the error that has occurred... } return xRet; @@ -698,7 +665,7 @@ Reference< XStream > OFileAccess::openFileReadWrite( const rtl::OUString& FileUR try { - aCnt.executeCommand( rtl::OUString::createFromAscii( "open" ), aCmdArg ); + aCnt.executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "open" )), aCmdArg ); } catch ( InteractiveIOException const & e ) { @@ -716,7 +683,7 @@ Reference< XStream > OFileAccess::openFileReadWrite( const rtl::OUString& FileUR aInsertArg.ReplaceExisting = sal_False; aCmdArg <<= aInsertArg; - aCnt.executeCommand( rtl::OUString::createFromAscii( "insert" ), aCmdArg ); + aCnt.executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "insert" )), aCmdArg ); // Retry... return openFileReadWrite( FileURL ); @@ -818,7 +785,7 @@ void SAL_CALL OFileAccess::writeFile( const rtl::OUString& FileURL, } catch ( CommandFailedException const & ) { - // Interaction Handler already handled the error that has occured... + // Interaction Handler already handled the error that has occurred... } } catch ( ContentCreationException const & e ) @@ -892,7 +859,7 @@ Sequence< rtl::OUString > FileAccess_getSupportedServiceNames() if( !pNames ) { static Sequence< rtl::OUString > seqNames(1); - seqNames.getArray()[0] = rtl::OUString::createFromAscii( SERVICE_NAME ); + seqNames.getArray()[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SERVICE_NAME )); pNames = &seqNames; } } @@ -939,3 +906,4 @@ void * SAL_CALL component_getFactory( } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/fileaccess/source/fileacc.xml b/fileaccess/source/fileacc.xml index 82f731f3e5..c87ed30b33 100644 --- a/fileaccess/source/fileacc.xml +++ b/fileaccess/source/fileacc.xml @@ -50,13 +50,11 @@ <project-build-dependency> ucbhelper </project-build-dependency> <project-build-dependency> tools </project-build-dependency> <project-build-dependency> cppu </project-build-dependency> - <project-build-dependency> vos </project-build-dependency> <project-build-dependency> sal </project-build-dependency> <runtime-module-dependency> cppuhelper$(COM) </runtime-module-dependency> <runtime-module-dependency> ucbhelper1MSC </runtime-module-dependency> <runtime-module-dependency> cppu3 </runtime-module-dependency> - <runtime-module-dependency> vos2$(COM) </runtime-module-dependency> <runtime-module-dependency> sal3 </runtime-module-dependency> <runtime-module-dependency> tl </runtime-module-dependency> </module-description> |