diff options
Diffstat (limited to 'dtrans')
89 files changed, 376 insertions, 269 deletions
diff --git a/dtrans/inc/pch/precompiled_dtrans.cxx b/dtrans/inc/pch/precompiled_dtrans.cxx index 97ae0d1450c1..9808c6ef2b49 100644 --- a/dtrans/inc/pch/precompiled_dtrans.cxx +++ b/dtrans/inc/pch/precompiled_dtrans.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_dtrans.hxx" +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/inc/pch/precompiled_dtrans.hxx b/dtrans/inc/pch/precompiled_dtrans.hxx index fe3362638432..085e7c646780 100644 --- a/dtrans/inc/pch/precompiled_dtrans.hxx +++ b/dtrans/inc/pch/precompiled_dtrans.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/dtrans/prj/build.lst b/dtrans/prj/build.lst index e30eccd59d7e..6ee2b47d53af 100644 --- a/dtrans/prj/build.lst +++ b/dtrans/prj/build.lst @@ -1,4 +1,4 @@ -dr dtrans : unotools offapi offuh rdbmaker vos stoc LIBXSLT:libxslt NULL +dr dtrans : unotools offapi offuh rdbmaker stoc LIBXSLT:libxslt NULL dr dtrans usr1 - all dr_mkout NULL dr dtrans\inc nmake - all dr_inc NULL dr dtrans\source\cnttype nmake - all dr_cnttype dr_generic dr_inc NULL diff --git a/dtrans/source/cnttype/mcnttfactory.cxx b/dtrans/source/cnttype/mcnttfactory.cxx index 07b557350bc0..58cadbebdb64 100644 --- a/dtrans/source/cnttype/mcnttfactory.cxx +++ b/dtrans/source/cnttype/mcnttfactory.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,7 +62,7 @@ namespace Sequence< OUString > SAL_CALL MimeContentTypeFactory_getSupportedServiceNames( ) { Sequence< OUString > aRet(1); - aRet[0] = OUString::createFromAscii("com.sun.star.datatransfer.MimeContentTypeFactory"); + aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.MimeContentTypeFactory")); return aRet; } } @@ -93,7 +94,7 @@ Reference< XMimeContentType > CMimeContentTypeFactory::createMimeContentType( co OUString SAL_CALL CMimeContentTypeFactory::getImplementationName( ) throw( RuntimeException ) { - return OUString::createFromAscii( MIMECONTENTTYPEFACTORY_IMPL_NAME ); + return OUString(RTL_CONSTASCII_USTRINGPARAM( MIMECONTENTTYPEFACTORY_IMPL_NAME )); } // ------------------------------------------------- @@ -121,3 +122,5 @@ Sequence< OUString > SAL_CALL CMimeContentTypeFactory::getSupportedServiceNames( { return MimeContentTypeFactory_getSupportedServiceNames( ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/cnttype/mcnttfactory.hxx b/dtrans/source/cnttype/mcnttfactory.hxx index 608a6a5b4e19..99f40828910d 100644 --- a/dtrans/source/cnttype/mcnttfactory.hxx +++ b/dtrans/source/cnttype/mcnttfactory.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. @@ -83,3 +84,4 @@ private: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/cnttype/mcnttype.cxx b/dtrans/source/cnttype/mcnttype.cxx index bc5a52920bfb..952e4eab93a7 100644 --- a/dtrans/source/cnttype/mcnttype.cxx +++ b/dtrans/source/cnttype/mcnttype.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,18 +41,19 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::container; -using namespace rtl; using namespace std; using namespace osl; +using ::rtl::OUString; + //------------------------------------------------------------------------ // constants //------------------------------------------------------------------------ -const OUString TSPECIALS = OUString::createFromAscii( "()<>@,;:\\\"/[]?=" ); -const OUString TOKEN = OUString::createFromAscii( "!#$%&'*+-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`abcdefghijklmnopqrstuvwxyz{|}~." ); -const OUString SPACE = OUString::createFromAscii( " " ); -const OUString SEMICOLON = OUString::createFromAscii( ";" ); +const OUString TSPECIALS (RTL_CONSTASCII_USTRINGPARAM( "()<>@,;:\\\"/[]?=" )); +const OUString TOKEN (RTL_CONSTASCII_USTRINGPARAM("!#$%&'*+-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`abcdefghijklmnopqrstuvwxyz{|}~.")); +const OUString SPACE (RTL_CONSTASCII_USTRINGPARAM(" ")); +const OUString SEMICOLON (RTL_CONSTASCII_USTRINGPARAM(";")); //------------------------------------------------------------------------ // ctor @@ -86,7 +88,7 @@ OUString SAL_CALL CMimeContentType::getMediaSubtype( ) throw(RuntimeException) OUString SAL_CALL CMimeContentType::getFullMediaType( ) throw(RuntimeException) { - return m_MediaType + OUString::createFromAscii( "/" ) + m_MediaSubtype; + return m_MediaType + OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + m_MediaSubtype; } //------------------------------------------------------------------------ @@ -205,7 +207,7 @@ void SAL_CALL CMimeContentType::type( void ) { if ( isInRange( m_nxtSym, TOKEN ) ) m_MediaType += m_nxtSym; - else if ( isInRange( m_nxtSym, OUString::createFromAscii( "/ " ) ) ) + else if ( isInRange( m_nxtSym, OUString(RTL_CONSTASCII_USTRINGPARAM("/ ")) ) ) break; else throw IllegalArgumentException( ); @@ -214,7 +216,7 @@ void SAL_CALL CMimeContentType::type( void ) // check FOLLOW( type ) skipSpaces( ); - acceptSym( OUString::createFromAscii( "/" ) ); + acceptSym( OUString(RTL_CONSTASCII_USTRINGPARAM("/")) ); subtype( ); } @@ -235,7 +237,7 @@ void SAL_CALL CMimeContentType::subtype( void ) { if ( isInRange( m_nxtSym, TOKEN ) ) m_MediaSubtype += m_nxtSym; - else if ( isInRange( m_nxtSym, OUString::createFromAscii( "; " ) ) ) + else if ( isInRange( m_nxtSym, OUString(RTL_CONSTASCII_USTRINGPARAM("; ")) ) ) break; else throw IllegalArgumentException( ); @@ -255,13 +257,13 @@ void SAL_CALL CMimeContentType::trailer( void ) { while( m_nxtSym.getLength( ) ) { - if ( m_nxtSym == OUString::createFromAscii( "(" ) ) + if ( m_nxtSym == OUString(RTL_CONSTASCII_USTRINGPARAM("(")) ) { getSym( ); comment( ); - acceptSym( OUString::createFromAscii( ")" ) ); + acceptSym( OUString(RTL_CONSTASCII_USTRINGPARAM(")")) ); } - else if ( m_nxtSym == OUString::createFromAscii( ";" ) ) + else if ( m_nxtSym == OUString(RTL_CONSTASCII_USTRINGPARAM(";")) ) { // get the parameter name getSym( ); @@ -273,7 +275,7 @@ void SAL_CALL CMimeContentType::trailer( void ) OUString pname = pName( ); skipSpaces(); - acceptSym( OUString::createFromAscii( "=" ) ); + acceptSym( OUString(RTL_CONSTASCII_USTRINGPARAM("=")) ); // get the parameter value skipSpaces( ); @@ -303,7 +305,7 @@ OUString SAL_CALL CMimeContentType::pName( ) { if ( isInRange( m_nxtSym, TOKEN ) ) pname += m_nxtSym; - else if ( isInRange( m_nxtSym, OUString::createFromAscii( "= " ) ) ) + else if ( isInRange( m_nxtSym, OUString(RTL_CONSTASCII_USTRINGPARAM("= ")) ) ) break; else throw IllegalArgumentException( ); @@ -322,12 +324,12 @@ OUString SAL_CALL CMimeContentType::pValue( ) OUString pvalue; // quoted pvalue - if ( m_nxtSym == OUString::createFromAscii( "\"" ) ) + if ( m_nxtSym == OUString(RTL_CONSTASCII_USTRINGPARAM( "\"" )) ) { getSym( ); pvalue = quotedPValue( ); - if ( OUString( &pvalue[pvalue.getLength() - 1], 1 ) != OUString::createFromAscii( "\"" ) ) + if ( OUString( &pvalue[pvalue.getLength() - 1], 1 ) != OUString(RTL_CONSTASCII_USTRINGPARAM( "\"" )) ) throw IllegalArgumentException( ); // remove the last quote-sign @@ -365,7 +367,7 @@ OUString SAL_CALL CMimeContentType::quotedPValue( ) else if ( isInRange( m_nxtSym, TOKEN + TSPECIALS + SPACE ) ) { pvalue += m_nxtSym; - if ( m_nxtSym == OUString::createFromAscii( "\"" ) ) + if ( m_nxtSym == OUString(RTL_CONSTASCII_USTRINGPARAM( "\"" )) ) bAfterQuoteSign = sal_True; else bAfterQuoteSign = sal_False; @@ -390,7 +392,7 @@ OUString SAL_CALL CMimeContentType::nonquotedPValue( ) { if ( isInRange( m_nxtSym, TOKEN ) ) pvalue += m_nxtSym; - else if ( isInRange( m_nxtSym, OUString::createFromAscii( "; " ) ) ) + else if ( isInRange( m_nxtSym, OUString(RTL_CONSTASCII_USTRINGPARAM("; ")) ) ) break; else throw IllegalArgumentException( ); @@ -410,7 +412,7 @@ void SAL_CALL CMimeContentType::comment( void ) { if ( isInRange( m_nxtSym, TOKEN + SPACE ) ) getSym( ); - else if ( m_nxtSym == OUString::createFromAscii( ")" ) ) + else if ( m_nxtSym == OUString(RTL_CONSTASCII_USTRINGPARAM(")")) ) break; else throw IllegalArgumentException( ); @@ -425,3 +427,5 @@ sal_Bool SAL_CALL CMimeContentType::isInRange( const rtl::OUString& aChr, const { return ( aRange.indexOf( aChr ) > -1 ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/cnttype/mcnttype.hxx b/dtrans/source/cnttype/mcnttype.hxx index f9b416b51de4..9b5f7a6a43c3 100644 --- a/dtrans/source/cnttype/mcnttype.hxx +++ b/dtrans/source/cnttype/mcnttype.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. @@ -95,3 +96,4 @@ private: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/cnttype/mctfentry.cxx b/dtrans/source/cnttype/mctfentry.cxx index 3d2e41201887..9aa350590bf0 100644 --- a/dtrans/source/cnttype/mctfentry.cxx +++ b/dtrans/source/cnttype/mctfentry.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. @@ -129,3 +130,5 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* p } } // extern "C" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/cnttype/wbench/testcnttype.cxx b/dtrans/source/cnttype/wbench/testcnttype.cxx index ff3587ee22e6..517d84a8ce79 100644 --- a/dtrans/source/cnttype/wbench/testcnttype.cxx +++ b/dtrans/source/cnttype/wbench/testcnttype.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. @@ -96,7 +97,7 @@ void CheckMimeContentType( const OUString& aCntType, const OUString& aType, cons pvalue = xMimeCntType->getParameterValue( param ); } - pvalue = xMimeCntType->getParameterValue( OUString::createFromAscii( "aparam" ) ); + pvalue = xMimeCntType->getParameterValue( OUString(RTL_CONSTASCII_USTRINGPARAM("aparam")) ); } catch( IllegalArgumentException& ) { @@ -180,32 +181,32 @@ sal_Bool processCntTypesAndWriteResultIntoFile( char* fname, vector< string >& v Reference< XMimeContentType > xMCntTyp = cnttypeFactory->createMimeContentType( OUString::createFromAscii( iter->c_str( ) ) ); - fwprintf( fstream, OUString::createFromAscii( "Type: %s\n" ), xMCntTyp->getMediaType( ).getStr( ) ); - fwprintf( fstream, OUString::createFromAscii( "Subtype: %s\n" ), xMCntTyp->getMediaSubtype( ).getStr( ) ); + fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("Type: %s\n")), xMCntTyp->getMediaType( ).getStr( ) ); + fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("Subtype: %s\n")), xMCntTyp->getMediaSubtype( ).getStr( ) ); Sequence< OUString > seqParam = xMCntTyp->getParameters( ); sal_Int32 nParams = seqParam.getLength( ); for ( sal_Int32 i = 0; i < nParams; i++ ) { - fwprintf( fstream, OUString::createFromAscii("PName: %s\n" ), seqParam[i].getStr( ) ); - fwprintf( fstream, OUString::createFromAscii("PValue: %s\n" ), xMCntTyp->getParameterValue( seqParam[i] ).getStr( ) ); + fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("PName: %s\n")), seqParam[i].getStr( ) ); + fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("PValue: %s\n")), xMCntTyp->getParameterValue( seqParam[i] ).getStr( ) ); } } catch( IllegalArgumentException& ex ) { - fwprintf( fstream, OUString::createFromAscii( "Fehlerhafter Content-Type gelesen!!!\n\n" ) ); + fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("Fehlerhafter Content-Type gelesen!!!\n\n")) ); } catch( NoSuchElementException& ) { - fwprintf( fstream, OUString::createFromAscii( "Parameterwert nicht vorhanden\n" ) ); + fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("Parameterwert nicht vorhanden\n")) ); } catch( ... ) { - fwprintf( fstream, OUString::createFromAscii( "Unbekannter Fehler!!!\n\n" ) ); + fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("Unbekannter Fehler!!!\n\n")) ); } - fwprintf( fstream, OUString::createFromAscii( "\n#############################################\n\n" ) ); + fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("\n#############################################\n\n")) ); } fclose( fstream ); @@ -228,7 +229,7 @@ int SAL_CALL main( int nArgc, char* argv[] ) OUString rdbName = OUString( RTL_CONSTASCII_USTRINGPARAM( RDB_SYSPATH ) ); Reference< XMultiServiceFactory > g_xFactory( createRegistryServiceFactory( rdbName ) ); - // Print a message if an error occured. + // Print a message if an error occurred. if ( !g_xFactory.is( ) ) { OSL_ENSURE(sal_False, "Can't create RegistryServiceFactory"); @@ -245,7 +246,7 @@ int SAL_CALL main( int nArgc, char* argv[] ) } Reference< XMimeContentTypeFactory > - xMCntTypeFactory( g_xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.MimeContentTypeFactory" ) ), UNO_QUERY ); + xMCntTypeFactory( g_xFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.MimeContentTypeFactory")) ), UNO_QUERY ); if ( !xMCntTypeFactory.is( ) ) { @@ -267,3 +268,5 @@ int SAL_CALL main( int nArgc, char* argv[] ) return 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/generic/clipboardmanager.cxx b/dtrans/source/generic/clipboardmanager.cxx index 49b5cde947f7..5fdc78b19f4a 100644 --- a/dtrans/source/generic/clipboardmanager.cxx +++ b/dtrans/source/generic/clipboardmanager.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. @@ -47,7 +48,7 @@ using ::rtl::OUString; ClipboardManager::ClipboardManager(): WeakComponentImplHelper3< XClipboardManager, XEventListener, XServiceInfo > (m_aMutex), - m_aDefaultName(OUString::createFromAscii("default")) + m_aDefaultName(OUString(RTL_CONSTASCII_USTRINGPARAM("default"))) { } @@ -62,7 +63,7 @@ ClipboardManager::~ClipboardManager() OUString SAL_CALL ClipboardManager::getImplementationName( ) throw(RuntimeException) { - return OUString::createFromAscii(CLIPBOARDMANAGER_IMPLEMENTATION_NAME); + return OUString(RTL_CONSTASCII_USTRINGPARAM(CLIPBOARDMANAGER_IMPLEMENTATION_NAME)); } // ------------------------------------------------------------------------ @@ -96,7 +97,7 @@ Reference< XClipboard > SAL_CALL ClipboardManager::getClipboard( const OUString& // object is disposed already if (rBHelper.bDisposed) - throw DisposedException(OUString::createFromAscii("object is disposed."), + throw DisposedException(OUString(RTL_CONSTASCII_USTRINGPARAM("object is disposed.")), static_cast < XClipboardManager * > (this)); ClipboardMap::iterator iter = @@ -117,13 +118,13 @@ void SAL_CALL ClipboardManager::addClipboard( const Reference< XClipboard >& xCl // check parameter if (!xClipboard.is()) - throw IllegalArgumentException(OUString::createFromAscii("empty reference"), + throw IllegalArgumentException(OUString(RTL_CONSTASCII_USTRINGPARAM("empty reference")), static_cast < XClipboardManager * > (this), 1); // the name "default" is reserved for internal use OUString aName = xClipboard->getName(); if (m_aDefaultName.compareTo(aName) == 0) - throw IllegalArgumentException(OUString::createFromAscii("name reserved"), + throw IllegalArgumentException(OUString(RTL_CONSTASCII_USTRINGPARAM("name reserved")), static_cast < XClipboardManager * > (this), 1); // try to add new clipboard to the list @@ -166,7 +167,7 @@ Sequence< OUString > SAL_CALL ClipboardManager::listClipboardNames() MutexGuard aGuard(m_aMutex); if (rBHelper.bDisposed) - throw DisposedException(OUString::createFromAscii("object is disposed."), + throw DisposedException(OUString(RTL_CONSTASCII_USTRINGPARAM("object is disposed.")), static_cast < XClipboardManager * > (this)); if (rBHelper.bInDispose) @@ -176,7 +177,7 @@ Sequence< OUString > SAL_CALL ClipboardManager::listClipboardNames() ClipboardMap::iterator iter = m_aClipboardMap.begin(); ClipboardMap::iterator imax = m_aClipboardMap.end(); - for (sal_Int32 n = 0; iter != imax; iter++) + for (sal_Int32 n = 0; iter != imax; ++iter) aRet[n++] = iter->first; return aRet; @@ -208,7 +209,7 @@ void SAL_CALL ClipboardManager::dispose() ClipboardMap::iterator iter = aCopy.begin(); ClipboardMap::iterator imax = aCopy.end(); - for (; iter != imax; iter++) + for (; iter != imax; ++iter) { Reference< XComponent > xComponent(iter->second, UNO_QUERY); if (xComponent.is()) @@ -256,7 +257,7 @@ Sequence< OUString > SAL_CALL ClipboardManager_getSupportedServiceNames() { Sequence < OUString > SupportedServicesNames( 1 ); SupportedServicesNames[0] = - OUString::createFromAscii("com.sun.star.datatransfer.clipboard.ClipboardManager"); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.ClipboardManager")); return SupportedServicesNames; } @@ -264,3 +265,4 @@ Sequence< OUString > SAL_CALL ClipboardManager_getSupportedServiceNames() +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/generic/clipboardmanager.hxx b/dtrans/source/generic/clipboardmanager.hxx index 0429c7640ed7..54ac5941728b 100644 --- a/dtrans/source/generic/clipboardmanager.hxx +++ b/dtrans/source/generic/clipboardmanager.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,9 +31,7 @@ #include <cppuhelper/compbase3.hxx> -#ifndef _COM_SUN_STAR_DATATRANSFER_CLIPBAORD_XCLIPBOARDMANAGER_HPP_ #include <com/sun/star/datatransfer/clipboard/XClipboardManager.hpp> -#endif #include <com/sun/star/lang/XServiceInfo.hpp> #include <map> @@ -125,3 +124,5 @@ namespace dtrans const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xMultiServiceFactory); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/generic/dtrans.cxx b/dtrans/source/generic/dtrans.cxx index 4b39298f97c2..4cf2f73d4c8e 100644 --- a/dtrans/source/generic/dtrans.cxx +++ b/dtrans/source/generic/dtrans.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,8 @@ using namespace com::sun::star::lang; using namespace com::sun::star::registry; using namespace com::sun::star::uno; using namespace cppu; -using namespace rtl; + +using ::rtl::OUString; extern "C" { @@ -92,3 +94,5 @@ void * SAL_CALL component_getFactory( } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/generic/generic_clipboard.cxx b/dtrans/source/generic/generic_clipboard.cxx index 046632d82bf8..57160e32785e 100644 --- a/dtrans/source/generic/generic_clipboard.cxx +++ b/dtrans/source/generic/generic_clipboard.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. @@ -75,7 +76,7 @@ void SAL_CALL GenericClipboard::initialize( const Sequence< Any >& aArguments ) OUString SAL_CALL GenericClipboard::getImplementationName( ) throw(RuntimeException) { - return OUString::createFromAscii(GENERIC_CLIPBOARD_IMPLEMENTATION_NAME); + return OUString(RTL_CONSTASCII_USTRINGPARAM(GENERIC_CLIPBOARD_IMPLEMENTATION_NAME)); } // ------------------------------------------------------------------------ @@ -192,7 +193,7 @@ void SAL_CALL GenericClipboard::removeClipboardListener( const Reference< XClipb Sequence< OUString > SAL_CALL GenericClipboard_getSupportedServiceNames() { Sequence< OUString > aRet(1); - aRet[0] = OUString::createFromAscii("com.sun.star.datatransfer.clipboard.GenericClipboard"); + aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.GenericClipboard")); return aRet; } @@ -203,3 +204,5 @@ Reference< XInterface > SAL_CALL GenericClipboard_createInstance( { return Reference < XInterface >( ( OWeakObject * ) new GenericClipboard()); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/generic/generic_clipboard.hxx b/dtrans/source/generic/generic_clipboard.hxx index 54308b0a1bdd..f0576933d59e 100644 --- a/dtrans/source/generic/generic_clipboard.hxx +++ b/dtrans/source/generic/generic_clipboard.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,13 +31,9 @@ #include <cppuhelper/compbase4.hxx> -#ifndef _COM_SUN_STAR_DATATRANSFER_CLIPBAORD_XCLIPBOARDEX_HPP_ #include <com/sun/star/datatransfer/clipboard/XClipboardEx.hpp> -#endif -#ifndef _COM_SUN_STAR_DATATRANSFER_CLIPBAORD_XCLIPBOARDNOTIFIER_HPP_ #include <com/sun/star/datatransfer/clipboard/XClipboardNotifier.hpp> -#endif #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XInitialization.hpp> @@ -133,3 +130,5 @@ namespace dtrans const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xMultiServiceFactory); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/inc/DtObjFactory.hxx b/dtrans/source/inc/DtObjFactory.hxx index fc217e6d5982..1b4eabd56c35 100644 --- a/dtrans/source/inc/DtObjFactory.hxx +++ b/dtrans/source/inc/DtObjFactory.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. @@ -52,3 +53,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/inc/MtaOleClipb.hxx b/dtrans/source/inc/MtaOleClipb.hxx index 03facb73d18f..dd4d079ceddf 100644 --- a/dtrans/source/inc/MtaOleClipb.hxx +++ b/dtrans/source/inc/MtaOleClipb.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. @@ -132,3 +133,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/os2/clipb/OS2Bitmap.cxx b/dtrans/source/os2/clipb/OS2Bitmap.cxx index 53b78c7afaef..0f7b46bca31c 100644 --- a/dtrans/source/os2/clipb/OS2Bitmap.cxx +++ b/dtrans/source/os2/clipb/OS2Bitmap.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * This code is property of Serenity Systems Intl @@ -8,9 +9,7 @@ #define INCL_WIN #include <svpm.h> -#ifndef _OS2CLIPBOARD_HXX_ #include "Os2Clipboard.hxx" -#endif // same typedefs from win32 sdk typedef unsigned short WORD; @@ -246,3 +245,4 @@ int main( void) #endif //TESTBMP +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/os2/clipb/Os2Clipboard.cxx b/dtrans/source/os2/clipb/Os2Clipboard.cxx index 494df04b640a..260c58f0d46f 100644 --- a/dtrans/source/os2/clipb/Os2Clipboard.cxx +++ b/dtrans/source/os2/clipb/Os2Clipboard.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. @@ -42,9 +43,10 @@ using namespace com::sun::star::lang; using namespace com::sun::star::uno; using namespace cppu; using namespace osl; -using namespace rtl; using namespace os2; +using ::rtl::OUString; + const Type CPPUTYPE_SEQINT8 = getCppuType( ( Sequence< sal_Int8 >* )0 ); const Type CPPUTYPE_OUSTRING = getCppuType( (OUString*)0 ); @@ -74,7 +76,6 @@ MRESULT EXPENTRY DtransObjWndProc( HWND hWnd, ULONG nMsg, MPARAM nMP1, MPARAM nM Os2Clipboard* os2Clipboard = GetWindowPtr( hWnd); if (os2Clipboard) { - //MutexGuard aGuard(os2Clipboard->m_aMutex); debug_printf("WM_DRAWCLIPBOARD os2Clipboard %08x\n", os2Clipboard); if (os2Clipboard->m_bInSetClipboardData) { @@ -109,26 +110,6 @@ Os2Clipboard::Os2Clipboard() : hText = 0; hBitmap = 0; -#if 0 - // register object class - if ( WinRegisterClass( hAB, (PSZ)DTRANS_OBJ_CLASSNAME, - (PFNWP)DtransObjWndProc, 0, sizeof(ULONG) )) - { - APIRET rc; - // create object window to get clip viewer messages - hObjWnd = WinCreateWindow( HWND_OBJECT, (PCSZ)DTRANS_OBJ_CLASSNAME, - (PCSZ)"", 0, 0, 0, 0, 0, - HWND_OBJECT, HWND_TOP, - 222, NULL, NULL); - // store pointer - SetWindowPtr( hObjWnd, this); - // register the viewer window - rc = WinOpenClipbrd(hAB); - rc = WinSetClipbrdViewer(hAB, hObjWnd); - rc = WinCloseClipbrd(hAB); - } -#endif - } Os2Clipboard::~Os2Clipboard() @@ -153,7 +134,7 @@ void SAL_CALL Os2Clipboard::initialize( const Sequence< Any >& aArguments ) OUString SAL_CALL Os2Clipboard::getImplementationName() throw( RuntimeException ) { debug_printf("Os2Clipboard::getImplementationName\n"); - return OUString::createFromAscii( OS2_CLIPBOARD_IMPL_NAME ); + return OUString(RTL_CONSTASCII_USTRINGPARAM( OS2_CLIPBOARD_IMPL_NAME )); } sal_Bool SAL_CALL Os2Clipboard::supportsService( const OUString& ServiceName ) throw( RuntimeException ) @@ -247,7 +228,7 @@ void SAL_CALL Os2Clipboard::setContents( const Reference< XTransferable >& xTran } } -#if OSL_DEBUG_LEVEL>0 +#if OSL_DEBUG_LEVEL > 0 // dump list of available mimetypes Sequence< DataFlavor > aFlavors( m_aContents->getTransferDataFlavors() ); for( int i = 0; i < aFlavors.getLength(); i++ ) @@ -256,10 +237,10 @@ void SAL_CALL Os2Clipboard::setContents( const Reference< XTransferable >& xTran #endif // we can only export text or bitmap - DataFlavor nFlavorText( OUString::createFromAscii( "text/plain;charset=utf-16" ), - OUString::createFromAscii( "Unicode-Text" ), CPPUTYPE_OUSTRING); - DataFlavor nFlavorBitmap( OUString::createFromAscii( "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" ), - OUString::createFromAscii( "Bitmap" ), CPPUTYPE_DEFAULT); + DataFlavor nFlavorText( OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain;charset=utf-16")), + OUString(RTL_CONSTASCII_USTRINGPARAM("Unicode-Text")), CPPUTYPE_OUSTRING); + DataFlavor nFlavorBitmap( OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" )), + OUString(RTL_CONSTASCII_USTRINGPARAM("Bitmap")), CPPUTYPE_DEFAULT); // try text transfer data (if any) PSZ pSharedText = NULL; @@ -433,7 +414,7 @@ void SAL_CALL Os2Clipboard::notifyAllClipboardListener( ) Sequence< OUString > SAL_CALL Os2Clipboard_getSupportedServiceNames() { Sequence< OUString > aRet(1); - aRet[0] = OUString::createFromAscii( OS2_CLIPBOARD_SERVICE_NAME ); + aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( OS2_CLIPBOARD_SERVICE_NAME )); return aRet; } @@ -445,3 +426,4 @@ Reference< XInterface > SAL_CALL Os2Clipboard_createInstance( return Reference < XInterface >( ( OWeakObject * ) new Os2Clipboard()); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/os2/clipb/Os2Clipboard.hxx b/dtrans/source/os2/clipb/Os2Clipboard.hxx index 0a9f4d117464..03ddc6cc93c7 100644 --- a/dtrans/source/os2/clipb/Os2Clipboard.hxx +++ b/dtrans/source/os2/clipb/Os2Clipboard.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. @@ -134,3 +135,4 @@ private: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/os2/clipb/Os2Service.cxx b/dtrans/source/os2/clipb/Os2Service.cxx index 0c3e299f0299..264d4230f237 100644 --- a/dtrans/source/os2/clipb/Os2Service.cxx +++ b/dtrans/source/os2/clipb/Os2Service.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. @@ -30,7 +31,6 @@ #include <com/sun/star/container/XSet.hpp> #include <osl/diagnose.h> -using namespace rtl; using namespace com::sun::star::uno; using namespace com::sun::star::registry; using namespace cppu; @@ -38,6 +38,8 @@ using namespace com::sun::star::lang; using namespace com::sun::star::datatransfer::clipboard; using namespace os2; +using ::rtl::OUString; + namespace os2 { Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& rServiceManager ) @@ -82,3 +84,5 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* p } } // extern "C" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/os2/clipb/Os2Transferable.cxx b/dtrans/source/os2/clipb/Os2Transferable.cxx index fe8c77105e90..908a2f00ace4 100644 --- a/dtrans/source/os2/clipb/Os2Transferable.cxx +++ b/dtrans/source/os2/clipb/Os2Transferable.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. @@ -42,9 +43,10 @@ using namespace com::sun::star::io; using namespace com::sun::star::uno; using namespace cppu; using namespace osl; -using namespace rtl; using namespace os2; +using ::rtl::OUString; + // ======================================================================= Os2Transferable::Os2Transferable( @@ -59,13 +61,13 @@ Os2Transferable::Os2Transferable( { ULONG handle = UWinQueryClipbrdData( hAB, UCLIP_CF_UNICODETEXT); if (handle) { - aFlavor.MimeType = OUString::createFromAscii( "text/plain;charset=utf-16" ); + aFlavor.MimeType = OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain;charset=utf-16")); aFlavor.DataType = getCppuType( (OUString*)0 ); //debug_printf("Os2Transferable::Os2Transferable pszText %s\n", pszText); } handle = UWinQueryClipbrdData( hAB, UCLIP_CF_BITMAP); if (handle) { - aFlavor.MimeType = OUString::createFromAscii( "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" ); + aFlavor.MimeType = OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" )); aFlavor.DataType = getCppuType( (OUString*)0 ); //debug_printf("Os2Transferable::Os2Transferable pszText %s\n", pszText); } @@ -96,7 +98,7 @@ Any SAL_CALL Os2Transferable::getTransferData( const DataFlavor& rFlavor ) Sequence< sal_Int8 > aData; // retrieve unicode text - if( rFlavor.MimeType.equalsIgnoreAsciiCase( OUString::createFromAscii( "text/plain;charset=utf-16" ) ) ) + if( rFlavor.MimeType.equalsIgnoreAsciiCase( OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain;charset=utf-16")) ) ) { if( UWinOpenClipbrd( hAB ) ) { @@ -114,7 +116,7 @@ Any SAL_CALL Os2Transferable::getTransferData( const DataFlavor& rFlavor ) } // retrieve bitmap - if( rFlavor.MimeType.equalsIgnoreAsciiCase( OUString::createFromAscii( "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" ) ) ) + if( rFlavor.MimeType.equalsIgnoreAsciiCase( OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" )) ) ) { if( UWinOpenClipbrd( hAB ) ) { @@ -160,7 +162,7 @@ sal_Bool SAL_CALL Os2Transferable::isDataFlavorSupported( const DataFlavor& aFla if( aFlavor.DataType != getCppuType( (Sequence< sal_Int8 >*)0 ) ) { - if( ! aFlavor.MimeType.equalsIgnoreAsciiCase( OUString::createFromAscii( "text/plain;charset=utf-16" ) ) && + if( ! aFlavor.MimeType.equalsIgnoreAsciiCase( OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain;charset=utf-16")) ) && aFlavor.DataType == getCppuType( (OUString*)0 ) ) return false; } @@ -174,3 +176,4 @@ sal_Bool SAL_CALL Os2Transferable::isDataFlavorSupported( const DataFlavor& aFla return sal_False; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/os2/clipb/Os2Transferable.hxx b/dtrans/source/os2/clipb/Os2Transferable.hxx index 833aa2680a8a..39126e522280 100644 --- a/dtrans/source/os2/clipb/Os2Transferable.hxx +++ b/dtrans/source/os2/clipb/Os2Transferable.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,9 +31,7 @@ #include <com/sun/star/datatransfer/XTransferable.hpp> -#ifndef _COM_SUN_STAR_LANG_XEVENTLISTENER_HDL_ #include <com/sun/star/lang/XEventListener.hpp> -#endif #include <cppuhelper/implbase1.hxx> #include <osl/thread.h> @@ -42,8 +41,7 @@ #define CHAR_POINTER(THE_OUSTRING) ::rtl::OUStringToOString (THE_OUSTRING, RTL_TEXTENCODING_UTF8).pData->buffer -#if OSL_DEBUG_LEVEL>1 -//extern "C" int debug_printf(const char *f, ...); +#if OSL_DEBUG_LEVEL > 1 #define debug_printf( ...) { 1; } #else #define debug_printf( ...) { 1; } @@ -97,3 +95,4 @@ namespace os2 { #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/test/test_dtrans.cxx b/dtrans/source/test/test_dtrans.cxx index 41d5bfb4f32f..3bb0966e286d 100644 --- a/dtrans/source/test/test_dtrans.cxx +++ b/dtrans/source/test/test_dtrans.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,10 +55,6 @@ #include <stdio.h> #include <string.h> -//#include <memory> - -//#include <process.h> - //------------------------------------------------------------------------ // my defines //------------------------------------------------------------------------ @@ -239,7 +236,7 @@ private: StringTransferable::StringTransferable( ) : m_seqDFlv( 1 ), m_receivedLostOwnership( sal_False ), - m_Data( OUString::createFromAscii("clipboard test content") ) + m_Data( OUString(RTL_CONSTASCII_USTRINGPARAM("clipboard test content")) ) { DataFlavor df; @@ -251,7 +248,7 @@ StringTransferable::StringTransferable( ) : */ //df.MimeType = L"text/plain; charset=windows1252"; - df.MimeType = OUString::createFromAscii( "text/html" ); + df.MimeType = OUString(RTL_CONSTASCII_USTRINGPARAM("text/html")); df.DataType = getCppuType( ( Sequence< sal_Int8 >* )0 ); m_seqDFlv[0] = df; @@ -270,19 +267,6 @@ Any SAL_CALL StringTransferable::getTransferData( const DataFlavor& aFlavor ) { anyData = makeAny( m_Data ); } */ -#if 0 - else if ( aFlavor == m_seqDFlv[0] ) - { - OString aStr( m_Data.getStr( ), m_Data.getLength( ), 1252 ); - Sequence< sal_Int8 > sOfChars( aStr.getLength( ) ); - sal_Int32 lenStr = aStr.getLength( ); - - for ( sal_Int32 i = 0; i < lenStr; ++i ) - sOfChars[i] = aStr[i]; - - anyData = makeAny( sOfChars ); - } -#endif return anyData; } @@ -375,10 +359,10 @@ int SAL_CALL main( int argc, const char* argv[] ) //-------------------------------------------------------------- Sequence< Any > arguments(1); - arguments[0] = makeAny( OUString::createFromAscii( "generic" ) ); + arguments[0] = makeAny( OUString(RTL_CONSTASCII_USTRINGPARAM("generic")) ); Reference< XClipboard > xClipboard( xServiceManager->createInstanceWithArguments( - OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.GenericClipboard" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.GenericClipboard")), arguments ), UNO_QUERY ); ENSURE( xClipboard.is(), "*** ERROR *** generic clipboard service could not be created." ); @@ -458,7 +442,7 @@ int SAL_CALL main( int argc, const char* argv[] ) //-------------------------------------------------------------- Reference< XClipboardManager > xClipboardManager( xServiceManager->createInstance( - OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.ClipboardManager" ) ), UNO_QUERY ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.ClipboardManager")) ), UNO_QUERY ); ENSURE( xClipboardManager.is(), "*** ERROR *** clipboard manager service could not be created." ); @@ -471,14 +455,14 @@ int SAL_CALL main( int argc, const char* argv[] ) TEST( "initial number of clipboards (0): ", xClipboardManager->listClipboardNames().getLength() == 0 ); PERFORM( "insertion of generic clipboard: ", xClipboardManager->addClipboard( xClipboard ) ); TEST( "number of inserted clipboards (1): ", xClipboardManager->listClipboardNames().getLength() == 1 ); - TEST( "name of inserted clipboard (generic): ", xClipboardManager->listClipboardNames()[0] == OUString::createFromAscii( "generic" ) ); - TEST( "inserted clipboard instance: ", xClipboardManager->getClipboard( OUString::createFromAscii( "generic" ) ) == xClipboard ); - PERFORM( "removal of generic clipboard: ", xClipboardManager->removeClipboard( OUString::createFromAscii( "generic" ) ) ); + TEST( "name of inserted clipboard (generic): ", xClipboardManager->listClipboardNames()[0] == OUString(RTL_CONSTASCII_USTRINGPARAM("generic")) ); + TEST( "inserted clipboard instance: ", xClipboardManager->getClipboard( OUString(RTL_CONSTASCII_USTRINGPARAM("generic")) ) == xClipboard ); + PERFORM( "removal of generic clipboard: ", xClipboardManager->removeClipboard( OUString(RTL_CONSTASCII_USTRINGPARAM("generic")) ) ); TEST( "number of inserted clipboards (0): ", xClipboardManager->listClipboardNames().getLength() == 0 ); TRACE( "Testing inserted clipboard instance (none): " ); try { - xClipboardManager->getClipboard( OUString::createFromAscii( "generic" ) ); + xClipboardManager->getClipboard( OUString(RTL_CONSTASCII_USTRINGPARAM("generic")) ); TRACE( "FAILED\n" ); } catch( NoSuchElementException e ) @@ -510,3 +494,4 @@ int SAL_CALL main( int argc, const char* argv[] ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/clipb/APNDataObject.hxx b/dtrans/source/win32/clipb/APNDataObject.hxx index 5a5bf1fa3547..81ea56fd0df7 100644 --- a/dtrans/source/win32/clipb/APNDataObject.hxx +++ b/dtrans/source/win32/clipb/APNDataObject.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,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/clipb/WinClipbImpl.cxx b/dtrans/source/win32/clipb/WinClipbImpl.cxx index 30b35a48d391..e2755bcd8123 100644 --- a/dtrans/source/win32/clipb/WinClipbImpl.cxx +++ b/dtrans/source/win32/clipb/WinClipbImpl.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. @@ -55,7 +56,6 @@ // namespace directives //------------------------------------------------------------------------ -using namespace rtl; using namespace osl; using namespace std; using namespace cppu; @@ -65,6 +65,8 @@ using namespace com::sun::star::datatransfer; using namespace com::sun::star::datatransfer::clipboard; using namespace com::sun::star::datatransfer::clipboard::RenderingCapabilities; +using ::rtl::OUString; + //------------------------------------------------------------------------ // deklarations //------------------------------------------------------------------------ @@ -271,3 +273,5 @@ void SAL_CALL CWinClipbImpl::onReleaseDataObject( CXNotifyingDataObject* theCall if ( m_pCurrentClipContent == theCaller ) m_pCurrentClipContent = NULL; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/clipb/WinClipbImpl.hxx b/dtrans/source/win32/clipb/WinClipbImpl.hxx index c7b0a55a064a..97e7919ea174 100644 --- a/dtrans/source/win32/clipb/WinClipbImpl.hxx +++ b/dtrans/source/win32/clipb/WinClipbImpl.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,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/clipb/WinClipboard.cxx b/dtrans/source/win32/clipb/WinClipboard.cxx index 0454460887e7..76cf9bc2711b 100644 --- a/dtrans/source/win32/clipb/WinClipboard.cxx +++ b/dtrans/source/win32/clipb/WinClipboard.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. @@ -42,7 +43,6 @@ // namespace directives //------------------------------------------------------------------------ -using namespace rtl; using namespace osl; using namespace std; using namespace cppu; @@ -52,6 +52,8 @@ using namespace com::sun::star::datatransfer; using namespace com::sun::star::datatransfer::clipboard; using namespace com::sun::star::lang; +using ::rtl::OUString; + //------------------------------------------------------------------------ // defines //------------------------------------------------------------------------ @@ -67,7 +69,7 @@ namespace Sequence< OUString > SAL_CALL WinClipboard_getSupportedServiceNames() { Sequence< OUString > aRet(1); - aRet[0] = OUString::createFromAscii("com.sun.star.datatransfer.clipboard.SystemClipboard"); + aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.SystemClipboard")); return aRet; } } @@ -101,7 +103,7 @@ Reference< XTransferable > SAL_CALL CWinClipboard::getContents( ) throw( Runtime MutexGuard aGuard( m_aMutex ); if ( rBHelper.bDisposed ) - throw DisposedException( OUString::createFromAscii( "object is already disposed" ), + throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")), static_cast< XClipboardEx* >( this ) ); if ( NULL != m_pImpl.get( ) ) @@ -121,7 +123,7 @@ void SAL_CALL CWinClipboard::setContents( const Reference< XTransferable >& xTra MutexGuard aGuard( m_aMutex ); if ( rBHelper.bDisposed ) - throw DisposedException( OUString::createFromAscii( "object is already disposed" ), + throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")), static_cast< XClipboardEx* >( this ) ); if ( NULL != m_pImpl.get( ) ) @@ -135,13 +137,13 @@ void SAL_CALL CWinClipboard::setContents( const Reference< XTransferable >& xTra OUString SAL_CALL CWinClipboard::getName( ) throw( RuntimeException ) { if ( rBHelper.bDisposed ) - throw DisposedException( OUString::createFromAscii( "object is already disposed" ), + throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")), static_cast< XClipboardEx* >( this ) ); if ( NULL != m_pImpl.get( ) ) return m_pImpl->getName( ); - return OUString::createFromAscii( "" ); + return OUString(RTL_CONSTASCII_USTRINGPARAM("")); } //======================================================================== @@ -153,7 +155,7 @@ void SAL_CALL CWinClipboard::flushClipboard( ) throw( RuntimeException ) MutexGuard aGuard( m_aMutex ); if ( rBHelper.bDisposed ) - throw DisposedException( OUString::createFromAscii( "object is already disposed" ), + throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")), static_cast< XClipboardEx* >( this ) ); if ( NULL != m_pImpl.get( ) ) @@ -167,7 +169,7 @@ void SAL_CALL CWinClipboard::flushClipboard( ) throw( RuntimeException ) sal_Int8 SAL_CALL CWinClipboard::getRenderingCapabilities( ) throw( RuntimeException ) { if ( rBHelper.bDisposed ) - throw DisposedException( OUString::createFromAscii( "object is already disposed" ), + throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")), static_cast< XClipboardEx* >( this ) ); if ( NULL != m_pImpl.get( ) ) @@ -188,12 +190,12 @@ void SAL_CALL CWinClipboard::addClipboardListener( const Reference< XClipboardLi throw( RuntimeException ) { if ( rBHelper.bDisposed ) - throw DisposedException( OUString::createFromAscii( "object is already disposed" ), + throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")), static_cast< XClipboardEx* >( this ) ); // check input parameter if ( !listener.is( ) ) - throw IllegalArgumentException( OUString::createFromAscii( "empty reference" ), + throw IllegalArgumentException( OUString(RTL_CONSTASCII_USTRINGPARAM("empty reference")), static_cast< XClipboardEx* >( this ), 1 ); @@ -208,12 +210,12 @@ void SAL_CALL CWinClipboard::removeClipboardListener( const Reference< XClipboar throw( RuntimeException ) { if ( rBHelper.bDisposed ) - throw DisposedException( OUString::createFromAscii( "object is already disposed" ), + throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")), static_cast< XClipboardEx* >( this ) ); // check input parameter if ( !listener.is( ) ) - throw IllegalArgumentException( OUString::createFromAscii( "empty reference" ), + throw IllegalArgumentException( OUString(RTL_CONSTASCII_USTRINGPARAM("empty reference")), static_cast< XClipboardEx* >( this ), 1 ); @@ -292,7 +294,7 @@ void SAL_CALL CWinClipboard::disposing() OUString SAL_CALL CWinClipboard::getImplementationName( ) throw(RuntimeException) { - return OUString::createFromAscii( WINCLIPBOARD_IMPL_NAME ); + return OUString(RTL_CONSTASCII_USTRINGPARAM( WINCLIPBOARD_IMPL_NAME )); } // ------------------------------------------------- @@ -320,3 +322,5 @@ Sequence< OUString > SAL_CALL CWinClipboard::getSupportedServiceNames( ) { return WinClipboard_getSupportedServiceNames(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/clipb/WinClipboard.hxx b/dtrans/source/win32/clipb/WinClipboard.hxx index a8b48a246eb2..81bdeca7653f 100644 --- a/dtrans/source/win32/clipb/WinClipboard.hxx +++ b/dtrans/source/win32/clipb/WinClipboard.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. @@ -155,3 +156,5 @@ private: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/clipb/wcbentry.cxx b/dtrans/source/win32/clipb/wcbentry.cxx index 653d97194efc..16c6bba65c94 100644 --- a/dtrans/source/win32/clipb/wcbentry.cxx +++ b/dtrans/source/win32/clipb/wcbentry.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. @@ -128,3 +129,5 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* p } } // extern "C" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dnd/dndentry.cxx b/dtrans/source/win32/dnd/dndentry.cxx index d37fa07ba3bd..05de69261094 100644 --- a/dtrans/source/win32/dnd/dndentry.cxx +++ b/dtrans/source/win32/dnd/dndentry.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. @@ -118,3 +119,5 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* p } } // extern "C" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dnd/globals.cxx b/dtrans/source/win32/dnd/globals.cxx index 9c6bdba5c024..f8160de03639 100644 --- a/dtrans/source/win32/dnd/globals.cxx +++ b/dtrans/source/win32/dnd/globals.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. @@ -137,3 +138,5 @@ DWORD dndActionsToSingleDropEffect( sal_Int8 actions) DWORD retVal= countEffect > 1 ? DROPEFFECT_MOVE : effects; return retVal; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dnd/globals.hxx b/dtrans/source/win32/dnd/globals.hxx index 0f21d00d7371..d9ff77dd731d 100644 --- a/dtrans/source/win32/dnd/globals.hxx +++ b/dtrans/source/win32/dnd/globals.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. @@ -27,9 +28,7 @@ #ifndef _GLOBALS_HXX_ #define _GLOBALS_HXX_ -#ifndef _OSL_MUTEX_H_ #include <osl/mutex.hxx> -#endif #if defined _MSC_VER #pragma warning(push,1) @@ -92,3 +91,5 @@ struct MutexDummy #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dnd/idroptarget.cxx b/dtrans/source/win32/dnd/idroptarget.cxx index 702c9a3e567e..5fa45b935391 100644 --- a/dtrans/source/win32/dnd/idroptarget.cxx +++ b/dtrans/source/win32/dnd/idroptarget.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,3 +113,5 @@ STDMETHODIMP IDropTargetImpl::Drop( IDataObject *pDataObj, return m_rDropTarget.Drop( pDataObj, grfKeyState, pt, pdwEffect); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dnd/idroptarget.hxx b/dtrans/source/win32/dnd/idroptarget.hxx index dd3cbed3d893..8fafd98f01db 100644 --- a/dtrans/source/win32/dnd/idroptarget.hxx +++ b/dtrans/source/win32/dnd/idroptarget.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. @@ -72,3 +73,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dnd/makefile.mk b/dtrans/source/win32/dnd/makefile.mk index 54fd748a0889..4dda72007d15 100644 --- a/dtrans/source/win32/dnd/makefile.mk +++ b/dtrans/source/win32/dnd/makefile.mk @@ -44,13 +44,6 @@ stoponerror=tr # ------------------------------------------------------------------ -#CFLAGS+=-GR -DUNICODE -D_UNICODE - -#DBG_CONSOLE_OUT: when IDropTarget or IDropSource are called we write to a console -#DBG_CLIPBOARD_DATA: To provide DoDragDrop with an data object we call OleGetClipboard -#CFLAGS+= -DDBG_CONSOLE_OUT -DDBG_CLIPBOARD_DATA - - SLOFILES= $(SLO)$/dndentry.obj \ $(SLO)$/target.obj \ $(SLO)$/idroptarget.obj \ diff --git a/dtrans/source/win32/dnd/source.cxx b/dtrans/source/win32/dnd/source.cxx index 8c05d8806601..6e1f9f5b1bb5 100644 --- a/dtrans/source/win32/dnd/source.cxx +++ b/dtrans/source/win32/dnd/source.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,7 +50,6 @@ #define __uuidof(I) IID_##I #endif -using namespace rtl; using namespace cppu; using namespace osl; using namespace com::sun::star::datatransfer; @@ -60,6 +60,8 @@ using namespace com::sun::star::awt::MouseButton; using namespace com::sun::star::awt; using namespace com::sun::star::lang; +using ::rtl::OUString; + extern rtl_StandardModuleCount g_moduleCount; //--> TRA @@ -429,3 +431,4 @@ unsigned __stdcall DndOleSTAFunc(LPVOID pParams) +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dnd/source.hxx b/dtrans/source/win32/dnd/source.hxx index decf3f61368f..4efa573e0e25 100644 --- a/dtrans/source/win32/dnd/source.hxx +++ b/dtrans/source/win32/dnd/source.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. @@ -31,12 +32,8 @@ #include <com/sun/star/datatransfer/dnd/XDragSource.hpp> #include <com/sun/star/datatransfer/dnd/XDragSourceContext.hpp> #include <com/sun/star/lang/XInitialization.hpp> -#ifndef _OSL_MUTEX_H_ #include <osl/mutex.hxx> -#endif -#ifndef _CPPUHELPER_COMPBASE2_HXX_ #include <cppuhelper/compbase3.hxx> -#endif #include <com/sun/star/lang/XServiceInfo.hpp> #include "../../inc/DtObjFactory.hxx" #include "globals.hxx" @@ -48,10 +45,10 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; using namespace cppu; using namespace osl; -using namespace rtl; using namespace ::com::sun::star::datatransfer; using namespace ::com::sun::star::datatransfer::dnd; +using ::rtl::OUString; class SourceContext; @@ -149,3 +146,5 @@ public: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dnd/sourcecontext.cxx b/dtrans/source/win32/dnd/sourcecontext.cxx index da4d5c06eefb..d4d59f4d736c 100644 --- a/dtrans/source/win32/dnd/sourcecontext.cxx +++ b/dtrans/source/win32/dnd/sourcecontext.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. @@ -154,3 +155,5 @@ void SourceContext::fire_dropActionChanged( sal_Int8 dropAction, sal_Int8 userAc } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dnd/sourcecontext.hxx b/dtrans/source/win32/dnd/sourcecontext.hxx index db3f093b21a9..a73159abe258 100644 --- a/dtrans/source/win32/dnd/sourcecontext.hxx +++ b/dtrans/source/win32/dnd/sourcecontext.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. @@ -87,3 +88,5 @@ public: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dnd/target.cxx b/dtrans/source/win32/dnd/target.cxx index 6e2e28bcfc39..b501f7454bd4 100644 --- a/dtrans/source/win32/dnd/target.cxx +++ b/dtrans/source/win32/dnd/target.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,13 +39,14 @@ #include "targetdropcontext.hxx" #include "targetdragcontext.hxx" #include <rtl/ustring.h> -using namespace rtl; using namespace cppu; using namespace osl; using namespace com::sun::star::datatransfer; using namespace com::sun::star::datatransfer::dnd; using namespace com::sun::star::datatransfer::dnd::DNDConstants; +using ::rtl::OUString; + #define WM_REGISTERDRAGDROP WM_USER + 1 #define WM_REVOKEDRAGDROP WM_USER + 2 //--> TRA @@ -659,3 +661,4 @@ inline sal_Int8 DropTarget::getFilteredActions( DWORD grfKeyState, DWORD dwEffec } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dnd/target.hxx b/dtrans/source/win32/dnd/target.hxx index 94982b54818f..375dfbc018bf 100644 --- a/dtrans/source/win32/dnd/target.hxx +++ b/dtrans/source/win32/dnd/target.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. @@ -32,13 +33,9 @@ #include <com/sun/star/datatransfer/dnd/DropTargetDragEnterEvent.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> -#ifndef _CPPUHELPER_COMPBASE2_HXX_ #include <cppuhelper/compbase3.hxx> -#endif #include <cppuhelper/interfacecontainer.hxx> -#ifndef _OSL_MUTEX_H_ #include <osl/mutex.hxx> -#endif #if defined _MSC_VER #pragma warning(push,1) @@ -55,10 +52,11 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; using namespace cppu; using namespace osl; -using namespace rtl; using namespace ::com::sun::star::datatransfer; using namespace ::com::sun::star::datatransfer::dnd; +using ::rtl::OUString; + // The client // has to call XComponent::dispose. The thread that calls initialize @@ -211,3 +209,5 @@ protected: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dnd/targetdragcontext.cxx b/dtrans/source/win32/dnd/targetdragcontext.cxx index 15f7ea32a1ef..2f0d7fd9510b 100644 --- a/dtrans/source/win32/dnd/targetdragcontext.cxx +++ b/dtrans/source/win32/dnd/targetdragcontext.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -57,3 +58,4 @@ void SAL_CALL TargetDragContext::rejectDrag( ) m_pDropTarget->_rejectDrag( static_cast<XDropTargetDragContext*>( this) ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dnd/targetdragcontext.hxx b/dtrans/source/win32/dnd/targetdragcontext.hxx index e4b24b95b0a0..fcb2efe3c920 100644 --- a/dtrans/source/win32/dnd/targetdragcontext.hxx +++ b/dtrans/source/win32/dnd/targetdragcontext.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -60,3 +61,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dnd/targetdropcontext.cxx b/dtrans/source/win32/dnd/targetdropcontext.cxx index a009b8df7527..87bcddb87498 100644 --- a/dtrans/source/win32/dnd/targetdropcontext.cxx +++ b/dtrans/source/win32/dnd/targetdropcontext.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. @@ -67,3 +68,5 @@ void SAL_CALL TargetDropContext::dropComplete( sal_Bool success ) { m_pDropTarget->_dropComplete( success, static_cast<XDropTargetDropContext*>( this) ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dnd/targetdropcontext.hxx b/dtrans/source/win32/dnd/targetdropcontext.hxx index 6ae6f0182a36..f5cc4670a824 100644 --- a/dtrans/source/win32/dnd/targetdropcontext.hxx +++ b/dtrans/source/win32/dnd/targetdropcontext.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. @@ -70,3 +71,5 @@ public: throw( RuntimeException); }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dtobj/APNDataObject.cxx b/dtrans/source/win32/dtobj/APNDataObject.cxx index 775e952ac885..80a8c1e737e6 100644 --- a/dtrans/source/win32/dtobj/APNDataObject.cxx +++ b/dtrans/source/win32/dtobj/APNDataObject.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. @@ -376,3 +377,5 @@ HRESULT CAPNDataObject::MarshalIDataObjectIntoCurrentApartment( IDataObject** pp } return hr; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dtobj/APNDataObject.hxx b/dtrans/source/win32/dtobj/APNDataObject.hxx index 990e38236e66..cd9bd2f9a5b0 100644 --- a/dtrans/source/win32/dtobj/APNDataObject.hxx +++ b/dtrans/source/win32/dtobj/APNDataObject.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. @@ -87,3 +88,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx index c590bf0e6a80..bdbf09546a9c 100755 --- a/dtrans/source/win32/dtobj/DOTransferable.cxx +++ b/dtrans/source/win32/dtobj/DOTransferable.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. @@ -34,9 +35,7 @@ #include <sal/types.h> #include <rtl/process.h> -#ifndef _DOWRAPPERTRANSFERABLE_HXX_ #include "DOTransferable.hxx" -#endif #include "..\misc\ImplHelper.hxx" #include "..\misc\WinClip.hxx" #include "DTransHelper.hxx" @@ -59,7 +58,6 @@ // namespace directives //------------------------------------------------------------------------ -using namespace rtl; using namespace std; using namespace osl; using namespace cppu; @@ -69,6 +67,8 @@ using namespace com::sun::star::io; using namespace com::sun::star::lang; using namespace com::sun::star::container; +using ::rtl::OUString; + //------------------------------------------------------------------------ // //------------------------------------------------------------------------ @@ -512,7 +512,7 @@ sal_Bool SAL_CALL CDOTransferable::compareDataFlavors( if ( !m_rXMimeCntFactory.is( ) ) { m_rXMimeCntFactory = Reference< XMimeContentTypeFactory >( m_SrvMgr->createInstance( - OUString::createFromAscii( "com.sun.star.datatransfer.MimeContentTypeFactory" ) ), UNO_QUERY ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.MimeContentTypeFactory")) ), UNO_QUERY ); } OSL_ASSERT( m_rXMimeCntFactory.is( ) ); @@ -612,3 +612,5 @@ sal_Bool SAL_CALL CDOTransferable::cmpAllContentTypeParameter( return retVal; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dtobj/DOTransferable.hxx b/dtrans/source/win32/dtobj/DOTransferable.hxx index dd99e857b908..eec3c5bb34cd 100644 --- a/dtrans/source/win32/dtobj/DOTransferable.hxx +++ b/dtrans/source/win32/dtobj/DOTransferable.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. @@ -35,9 +36,7 @@ #include <com/sun/star/datatransfer/XTransferable.hpp> -#ifndef _CPPUHELPER_IMPLBASE1_HXX_ #include <cppuhelper/implbase2.hxx> -#endif #include "DataFmtTransl.hxx" #include <com/sun/star/datatransfer/XMimeContentTypeFactory.hpp> #include <com/sun/star/datatransfer/XMimeContentType.hpp> @@ -131,3 +130,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dtobj/DTransHelper.cxx b/dtrans/source/win32/dtobj/DTransHelper.cxx index 30370fdaf3c8..34db85ffeed9 100644 --- a/dtrans/source/win32/dtobj/DTransHelper.cxx +++ b/dtrans/source/win32/dtobj/DTransHelper.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. @@ -237,3 +238,4 @@ sal_uInt32 SAL_CALL CStgTransferHelper::memSize( CLIPFORMAT cf ) const return dwSize; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dtobj/DTransHelper.hxx b/dtrans/source/win32/dtobj/DTransHelper.hxx index 7975b84eec57..0e6003211f90 100644 --- a/dtrans/source/win32/dtobj/DTransHelper.hxx +++ b/dtrans/source/win32/dtobj/DTransHelper.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. @@ -212,3 +213,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.cxx b/dtrans/source/win32/dtobj/DataFmtTransl.cxx index f72e8bb714a7..c3171c91d0ee 100644 --- a/dtrans/source/win32/dtobj/DataFmtTransl.cxx +++ b/dtrans/source/win32/dtobj/DataFmtTransl.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. @@ -60,12 +61,13 @@ // namespace directives //------------------------------------------------------------------------ -using namespace rtl; using namespace std; using namespace com::sun::star::uno; using namespace com::sun::star::datatransfer; using namespace com::sun::star::lang; +using ::rtl::OUString; + //------------------------------------------------------------------------ // const //------------------------------------------------------------------------ @@ -76,11 +78,11 @@ const Type CPPUTYPE_OUSTRING = getCppuType((OUString*)0); const Type CPPUTYPE_SEQSALINT8 = getCppuType((Sequence< sal_Int8>*)0); const sal_Int32 MAX_CLIPFORMAT_NAME = 256; -const OUString TEXT_PLAIN_CHARSET = OUString::createFromAscii( "text/plain;charset=" ); -const OUString HPNAME_OEM_ANSI_TEXT = OUString::createFromAscii( "OEM/ANSI Text" ); +const OUString TEXT_PLAIN_CHARSET (RTL_CONSTASCII_USTRINGPARAM("text/plain;charset=")); +const OUString HPNAME_OEM_ANSI_TEXT (RTL_CONSTASCII_USTRINGPARAM("OEM/ANSI Text")); -const OUString HTML_FORMAT_NAME_WINDOWS = OUString::createFromAscii( "HTML Format" ); -const OUString HTML_FORMAT_NAME_SOFFICE = OUString::createFromAscii( "HTML (HyperText Markup Language)" ); +const OUString HTML_FORMAT_NAME_WINDOWS (RTL_CONSTASCII_USTRINGPARAM("HTML Format")); +const OUString HTML_FORMAT_NAME_SOFFICE (RTL_CONSTASCII_USTRINGPARAM("HTML (HyperText Markup Language)")); //------------------------------------------------------------------------ // @@ -90,7 +92,7 @@ CDataFormatTranslator::CDataFormatTranslator( const Reference< XMultiServiceFact m_SrvMgr( aServiceManager ) { m_XDataFormatTranslator = Reference< XDataFormatTranslator >( - m_SrvMgr->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.DataFormatTranslator" ) ), UNO_QUERY ); + m_SrvMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.DataFormatTranslator")) ), UNO_QUERY ); } //------------------------------------------------------------------------ @@ -174,7 +176,7 @@ DataFlavor CDataFormatTranslator::getDataFlavorFromFormatEtc( const FORMATETC& a OUString clipFormatName = getClipboardFormatName( aClipformat ); // if we could not get a clipboard format name an - // error must have occured or it is a standard + // error must have occurred or it is a standard // clipboard format that we don't translate, e.g. // CF_BITMAP (the office only uses CF_DIB) if ( clipFormatName.getLength( ) ) @@ -334,3 +336,5 @@ OUString SAL_CALL CDataFormatTranslator::getTextCharsetFromLCID( LCID lcid, CLIP return charset; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.hxx b/dtrans/source/win32/dtobj/DataFmtTransl.hxx index 70982ccaf6b9..58cf51a89f63 100644 --- a/dtrans/source/win32/dtobj/DataFmtTransl.hxx +++ b/dtrans/source/win32/dtobj/DataFmtTransl.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,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dtobj/DtObjFactory.cxx b/dtrans/source/win32/dtobj/DtObjFactory.cxx index e6cadec92983..0f69b389e8ce 100644 --- a/dtrans/source/win32/dtobj/DtObjFactory.cxx +++ b/dtrans/source/win32/dtobj/DtObjFactory.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,13 +34,9 @@ //------------------------------------------------------------------------ #include "..\..\inc\DtObjFactory.hxx" -#ifndef _TWRAPPERDATAOBJECT_HXX_ #include "XTDataObject.hxx" -#endif -#ifndef _DOWRAPPERTRANSFERABLE_HXX_ #include "DOTransferable.hxx" -#endif //------------------------------------------------------------------------ // namespace directives @@ -72,3 +69,4 @@ Reference< XTransferable > SAL_CALL CDTransObjFactory::createTransferableFromDat return refDOTransf; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dtobj/Fetc.cxx b/dtrans/source/win32/dtobj/Fetc.cxx index 525bfd58be4d..f9bbe856436e 100644 --- a/dtrans/source/win32/dtobj/Fetc.cxx +++ b/dtrans/source/win32/dtobj/Fetc.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. @@ -257,3 +258,4 @@ sal_Int32 operator!=( const CFormatEtc& lhs, const CFormatEtc& rhs ) return ( ( lhs == rhs ) != 1 ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dtobj/Fetc.hxx b/dtrans/source/win32/dtobj/Fetc.hxx index a0af6dead8c1..8dfba3672ac9 100644 --- a/dtrans/source/win32/dtobj/Fetc.hxx +++ b/dtrans/source/win32/dtobj/Fetc.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. @@ -91,3 +92,5 @@ sal_Int32 operator!=( const CFormatEtc& lhs, const CFormatEtc& rhs ); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dtobj/FetcList.cxx b/dtrans/source/win32/dtobj/FetcList.cxx index 8deb2296ad80..b7e556445fdb 100644 --- a/dtrans/source/win32/dtobj/FetcList.cxx +++ b/dtrans/source/win32/dtobj/FetcList.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,9 +38,7 @@ #include <com/sun/star/datatransfer/XMimeContentTypeFactory.hpp> #include <com/sun/star/datatransfer/XMimeContentType.hpp> -#ifndef _DATAFORMATTRANSLATOR_HXX_ #include "DataFmtTransl.hxx" -#endif #include "..\misc\ImplHelper.hxx" #include "..\misc\WinClip.hxx" @@ -55,9 +54,10 @@ using namespace com::sun::star::uno; using namespace com::sun::star::datatransfer; using namespace com::sun::star::lang; using namespace com::sun::star::container; -using namespace rtl; using namespace std; +using ::rtl::OUString; + //------------------------------------------------------------------------ // //------------------------------------------------------------------------ @@ -284,7 +284,7 @@ void SAL_CALL CFormatRegistrar::RegisterFormats( aFormatEtcContainer.addFormatEtc( fetc ); // and HTML Format - OUString htmlFormat( OUString::createFromAscii( "HTML Format" ) ); + OUString htmlFormat( RTL_CONSTASCII_USTRINGPARAM("HTML Format") ); aFormatEtcContainer.addFormatEtc( m_DataFormatTranslator.getFormatEtcForClipformatName( htmlFormat ) ); } @@ -362,8 +362,8 @@ OUString SAL_CALL CFormatRegistrar::getCharsetFromDataFlavor( const DataFlavor& try { Reference< XMimeContentTypeFactory > xMimeFac( - m_SrvMgr->createInstance( OUString::createFromAscii( \ - "com.sun.star.datatransfer.MimeContentTypeFactory" ) ), UNO_QUERY ); + m_SrvMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM( \ + "com.sun.star.datatransfer.MimeContentTypeFactory" )) ), UNO_QUERY ); if( xMimeFac.is( ) ) { @@ -478,3 +478,4 @@ BOOL CALLBACK CFormatRegistrar::EnumLocalesProc( LPSTR lpLocaleStr ) return sal_True; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dtobj/FetcList.hxx b/dtrans/source/win32/dtobj/FetcList.hxx index c5105a8662b6..de5e00fa9c3a 100644 --- a/dtrans/source/win32/dtobj/FetcList.hxx +++ b/dtrans/source/win32/dtobj/FetcList.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. @@ -154,3 +155,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx index c4f73977d92d..5c7cc51485cb 100755 --- a/dtrans/source/win32/dtobj/FmtFilter.cxx +++ b/dtrans/source/win32/dtobj/FmtFilter.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. @@ -577,3 +578,4 @@ Sequence< sal_Int8 > SAL_CALL WinBITMAPToOOBMP( HBITMAP aHBMP ) return ooBmpStream; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dtobj/FmtFilter.hxx b/dtrans/source/win32/dtobj/FmtFilter.hxx index 84f764c9769b..a484a4d3df65 100755 --- a/dtrans/source/win32/dtobj/FmtFilter.hxx +++ b/dtrans/source/win32/dtobj/FmtFilter.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. @@ -31,9 +32,7 @@ #include <sal/types.h> -#ifndef _COM_SUN_STAR_UNO_SEQUENCE_H_ #include <com/sun/star/uno/Sequence.hxx> -#endif #if defined _MSC_VER #pragma warning(push,1) @@ -94,3 +93,5 @@ com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL TextHtmlToHTMLFormat( com::su com::sun::star::uno::Sequence< sal_Int8 > CF_HDROPToFileList(HGLOBAL hGlobal); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dtobj/MimeAttrib.hxx b/dtrans/source/win32/dtobj/MimeAttrib.hxx index 7bd631cc79d5..fd62793f1478 100644 --- a/dtrans/source/win32/dtobj/MimeAttrib.hxx +++ b/dtrans/source/win32/dtobj/MimeAttrib.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. @@ -39,12 +40,14 @@ // deklarations //------------------------------------------------------------------------ -const rtl::OUString TEXTPLAIN_PARAM_CHARSET = rtl::OUString::createFromAscii( "charset" ); +const rtl::OUString TEXTPLAIN_PARAM_CHARSET = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("charset")); -const rtl::OUString PRE_WINDOWS_CODEPAGE = rtl::OUString::createFromAscii( "windows" ); -const rtl::OUString PRE_OEM_CODEPAGE = rtl::OUString::createFromAscii( "cp" ); -const rtl::OUString CHARSET_UTF16 = rtl::OUString::createFromAscii( "utf-16" ); -const rtl::OUString CHARSET_UNICODE = rtl::OUString::createFromAscii( "unicode" ); +const rtl::OUString PRE_WINDOWS_CODEPAGE (RTL_CONSTASCII_USTRINGPARAM("windows")); +const rtl::OUString PRE_OEM_CODEPAGE (RTL_CONSTASCII_USTRINGPARAM("cp")); +const rtl::OUString CHARSET_UTF16 (RTL_CONSTASCII_USTRINGPARAM("utf-16")); +const rtl::OUString CHARSET_UNICODE (RTL_CONSTASCII_USTRINGPARAM("unicode")); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx b/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx index 3eecad271567..669ee78eff6d 100644 --- a/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx +++ b/dtrans/source/win32/dtobj/TxtCnvtHlp.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. @@ -143,3 +144,4 @@ int WideCharToMultiByteEx( UINT cp_dest, NULL ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dtobj/TxtCnvtHlp.hxx b/dtrans/source/win32/dtobj/TxtCnvtHlp.hxx index a4d59a69284e..5f37e19ce4d6 100644 --- a/dtrans/source/win32/dtobj/TxtCnvtHlp.hxx +++ b/dtrans/source/win32/dtobj/TxtCnvtHlp.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. @@ -31,9 +32,7 @@ #include <com/sun/star/datatransfer/DataFlavor.hpp> -#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HPP_ #include <com/sun/star/uno/Sequence.h> -#endif #include "DTransHelper.hxx" #if defined _MSC_VER @@ -61,3 +60,5 @@ int WideCharToMultiByteEx( UINT cp_dest, BOOL bEnsureTrailingZero = TRUE ); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dtobj/XNotifyingDataObject.cxx b/dtrans/source/win32/dtobj/XNotifyingDataObject.cxx index 25e3fab3a702..fd12b6583626 100644 --- a/dtrans/source/win32/dtobj/XNotifyingDataObject.cxx +++ b/dtrans/source/win32/dtobj/XNotifyingDataObject.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. @@ -161,3 +162,5 @@ void SAL_CALL CXNotifyingDataObject::lostOwnership( ) OSL_ENSURE( sal_False, "RuntimeException caught" ); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dtobj/XNotifyingDataObject.hxx b/dtrans/source/win32/dtobj/XNotifyingDataObject.hxx index 394b835c3612..20b12f7009cd 100644 --- a/dtrans/source/win32/dtobj/XNotifyingDataObject.hxx +++ b/dtrans/source/win32/dtobj/XNotifyingDataObject.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. @@ -103,3 +104,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx index e17a931d7380..514669cfe15c 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.cxx +++ b/dtrans/source/win32/dtobj/XTDataObject.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,9 +34,7 @@ //------------------------------------------------------------------------ #include <osl/diagnose.h> -#ifndef _TXDATAOBJECT_HXX_ #include "XTDataObject.hxx" -#endif #include <com/sun/star/datatransfer/dataflavor.hpp> #include "..\misc\ImplHelper.hxx" #include "DTransHelper.hxx" @@ -65,7 +64,8 @@ using namespace com::sun::star::datatransfer; using namespace com::sun::star::datatransfer::clipboard; using namespace com::sun::star::uno; using namespace com::sun::star::lang; -using namespace rtl; + +using ::rtl::OUString; //------------------------------------------------------------------------ // a helper class that will be thrown by the function validateFormatEtc @@ -455,7 +455,7 @@ void SAL_CALL CXTDataObject::renderSynthesizedHtmlAndSetupStgMedium( FORMATETC& DataFlavor aFlavor; // creating a DataFlavor on the fly - aFlavor.MimeType = OUString::createFromAscii( "text/html" ); + aFlavor.MimeType = OUString(RTL_CONSTASCII_USTRINGPARAM("text/html")); aFlavor.DataType = getCppuType( (Sequence< sal_Int8 >*)0 ); Any aAny = m_XTransferable->getTransferData( aFlavor ); @@ -846,3 +846,5 @@ STDMETHODIMP CEnumFormatEtc::Clone( IEnumFORMATETC** ppenum ) return ( NULL != *ppenum ) ? S_OK : E_OUTOFMEMORY; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/dtobj/XTDataObject.hxx b/dtrans/source/win32/dtobj/XTDataObject.hxx index b7b20af56ac7..1958be4afcbe 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.hxx +++ b/dtrans/source/win32/dtobj/XTDataObject.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. @@ -37,13 +38,9 @@ #include <com/sun/star/datatransfer/XTransferable.hpp> #include <com/sun/star/datatransfer/clipboard/XClipboardOwner.hpp> -#ifndef _DATAFORMATTRANSLATOR_HXX_ #include "DataFmtTransl.hxx" -#endif -#ifndef _FETCLIST_HXX_ #include "FEtcList.hxx" -#endif #if defined _MSC_VER #pragma warning(push,1) @@ -175,3 +172,5 @@ private: typedef CEnumFormatEtc *PCEnumFormatEtc; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx index 98c6625bb33e..456510145ab5 100755 --- a/dtrans/source/win32/ftransl/ftransl.cxx +++ b/dtrans/source/win32/ftransl/ftransl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,9 +34,7 @@ //------------------------------------------------------------------------ #include <osl/diagnose.h> -#ifndef _DFLVCONT_HXX_ #include "ftransl.hxx" -#endif #include <com/sun/star/datatransfer/XMimeContentType.hpp> #include "..\misc\ImplHelper.hxx" @@ -59,12 +58,10 @@ #define CPPUTYPE_DEFAULT CPPUTYPE_SEQSALINT8 #define CPPUTYPE_OUSTR getCppuType( (const ::rtl::OUString*) 0 ) #define CPPUTYPE_SALINT32 getCppuType( ( sal_Int32 * ) 0 ) -#define OUSTR( str ) OUString::createFromAscii( #str ) -#define OUSTR_( str ) OUString::createFromAscii( str ) -#define EMPTY_OUSTR OUString::createFromAscii( "" ) -//#define PRIVATE_OO OUString::createFromAscii( "application/x-openoffice;" "windows_formatname=" ) +#define OUSTR( str ) OUString(RTL_CONSTASCII_USTRINGPARAM( #str )) +#define EMPTY_OUSTR OUString() -const rtl::OUString Windows_FormatName = rtl::OUString::createFromAscii("windows_formatname"); +const rtl::OUString Windows_FormatName (RTL_CONSTASCII_USTRINGPARAM("windows_formatname")); const com::sun::star::uno::Type CppuType_ByteSequence = ::getCppuType((const com::sun::star::uno::Sequence<sal_Int8>*)0); const com::sun::star::uno::Type CppuType_String = ::getCppuType((const ::rtl::OUString*)0); @@ -72,7 +69,7 @@ const com::sun::star::uno::Type CppuType_String = ::getCppuType((const ::r // namespace directives //------------------------------------------------------------------------ -using namespace rtl; +using ::rtl::OUString; using namespace osl; using namespace cppu; using namespace std; @@ -90,7 +87,7 @@ namespace MODULE_PRIVATE Sequence< OUString > SAL_CALL DataFormatTranslator_getSupportedServiceNames( ) { Sequence< OUString > aRet(1); - aRet[0] = OUString::createFromAscii("com.sun.star.datatransfer.DataFormatTranslator"); + aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.DataFormatTranslator")); return aRet; } } @@ -237,7 +234,7 @@ DataFlavor SAL_CALL CDataFormatTranslator::getDataFlavorFromSystemDataType( cons OUString SAL_CALL CDataFormatTranslator::getImplementationName( ) throw( RuntimeException ) { - return OUString::createFromAscii( IMPL_NAME ); + return OUString(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME )); } // ------------------------------------------------- @@ -647,3 +644,5 @@ DataFlavor SAL_CALL CDataFormatTranslator::mkDataFlv(const OUString& cnttype, co dflv.DataType = dtype; return dflv; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/ftransl/ftransl.hxx b/dtrans/source/win32/ftransl/ftransl.hxx index 631ae89cc388..7adbfdae61a2 100644 --- a/dtrans/source/win32/ftransl/ftransl.hxx +++ b/dtrans/source/win32/ftransl/ftransl.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. @@ -130,3 +131,4 @@ private: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/ftransl/ftranslentry.cxx b/dtrans/source/win32/ftransl/ftranslentry.cxx index abdd27ffcdae..b8491fbb0481 100644 --- a/dtrans/source/win32/ftransl/ftranslentry.cxx +++ b/dtrans/source/win32/ftransl/ftranslentry.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. @@ -35,9 +36,7 @@ #include <com/sun/star/container/XSet.hpp> #include <osl/diagnose.h> -#ifndef _COM_SUN_STAR_DATATRANSFER_XDATAFLAVORCONTAINER_HPP_ #include <com/sun/star/datatransfer/XDataFormatTranslator.hpp> -#endif #include "ftransl.hxx" //----------------------------------------------------------------- @@ -132,3 +131,5 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* p } } // extern "C" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/misc/ImplHelper.cxx b/dtrans/source/win32/misc/ImplHelper.cxx index 4bfb7f462fc2..a04c588977d1 100644 --- a/dtrans/source/win32/misc/ImplHelper.cxx +++ b/dtrans/source/win32/misc/ImplHelper.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. @@ -487,3 +488,5 @@ sal_Bool SAL_CALL CompareTargetDevice( DVTARGETDEVICE* ptdLeft, DVTARGETDEVICE* return bRet; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/misc/ImplHelper.hxx b/dtrans/source/win32/misc/ImplHelper.hxx index f410424c947f..9255eb195561 100644 --- a/dtrans/source/win32/misc/ImplHelper.hxx +++ b/dtrans/source/win32/misc/ImplHelper.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. @@ -104,3 +105,5 @@ sal_Bool SAL_CALL IsOEMCP( sal_uInt32 codepage ); rtl::OUString SAL_CALL cptostr( sal_uInt32 codepage ); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/misc/WinClip.hxx b/dtrans/source/win32/misc/WinClip.hxx index 670fd70d97d6..139eac50cfff 100644 --- a/dtrans/source/win32/misc/WinClip.hxx +++ b/dtrans/source/win32/misc/WinClip.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. @@ -43,3 +44,5 @@ const sal_Int32 CF_INVALID = 0; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/mtaole/MtaOleClipb.cxx b/dtrans/source/win32/mtaole/MtaOleClipb.cxx index 3d083b9e5735..9faa9a0435fb 100644 --- a/dtrans/source/win32/mtaole/MtaOleClipb.cxx +++ b/dtrans/source/win32/mtaole/MtaOleClipb.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. @@ -589,7 +590,7 @@ LRESULT CMtaOleClipboard::onChangeCBChain( HWND hWndRemove, HWND hWndNext ) else if ( IsWindow( m_hwndNextClipViewer ) ) { // forward the message to the next one - DWORD dwResult; + DWORD_PTR dwpResult; SendMessageTimeoutA( m_hwndNextClipViewer, WM_CHANGECBCHAIN, @@ -597,7 +598,7 @@ LRESULT CMtaOleClipboard::onChangeCBChain( HWND hWndRemove, HWND hWndNext ) reinterpret_cast<LPARAM>(hWndNext), SMTO_BLOCK, MAX_CLIPEVENT_PROCESSING_TIME, - &dwResult ); + &dwpResult ); } return 0; @@ -624,7 +625,7 @@ LRESULT CMtaOleClipboard::onDrawClipboard( ) // foward the message to the next viewer in the chain if ( IsWindow( m_hwndNextClipViewer ) ) { - DWORD dwResult; + DWORD_PTR dwpResult; SendMessageTimeoutA( m_hwndNextClipViewer, WM_DRAWCLIPBOARD, @@ -632,7 +633,7 @@ LRESULT CMtaOleClipboard::onDrawClipboard( ) static_cast< LPARAM >( 0 ), SMTO_BLOCK, MAX_CLIPEVENT_PROCESSING_TIME, - &dwResult ); + &dwpResult ); } return 0; @@ -891,3 +892,4 @@ sal_Bool CMtaOleClipboard::WaitForThreadReady( ) const return bRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/workbench/XTDo.cxx b/dtrans/source/win32/workbench/XTDo.cxx index c3209429cf21..050cc349a41d 100644 --- a/dtrans/source/win32/workbench/XTDo.cxx +++ b/dtrans/source/win32/workbench/XTDo.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. @@ -35,9 +36,7 @@ #include "..\DTransHelper.hxx" -#ifndef _TWRAPPERDATAOBJECT_HXX_ #include "XTDo.hxx" -#endif #if defined _MSC_VER #pragma warning(push,1) @@ -429,3 +428,5 @@ STDMETHODIMP CEnumFormatEtc::Clone( IEnumFORMATETC** ppenum ) return hr; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/workbench/XTDo.hxx b/dtrans/source/win32/workbench/XTDo.hxx index e34a931380f8..e37b4beefc2f 100644 --- a/dtrans/source/win32/workbench/XTDo.hxx +++ b/dtrans/source/win32/workbench/XTDo.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. @@ -132,3 +133,5 @@ private: typedef CEnumFormatEtc *PCEnumFormatEtc; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/workbench/makefile.mk b/dtrans/source/win32/workbench/makefile.mk index be85525016c9..7432d2512df2 100644 --- a/dtrans/source/win32/workbench/makefile.mk +++ b/dtrans/source/win32/workbench/makefile.mk @@ -41,7 +41,6 @@ stoponerror=tr .ENDIF # --- Settings ----------------------------------------------------- -#.INCLUDE : $(PRJ)$/util$/makefile.pmk .INCLUDE : settings.mk @@ -54,8 +53,7 @@ CFLAGS+=-D_WIN32_DCOM -EHsc -Ob0 OBJFILES= $(OBJ)$/test_wincb.obj APP1TARGET= $(TARGET) APP1OBJS= $(OBJ)$/test_wincb.obj - - + APP1STDLIBS= $(SALLIB) \ $(CPPULIB) \ $(CPPUHELPERLIB) \ @@ -65,7 +63,6 @@ APP1STDLIBS= $(SALLIB) \ $(COMDLG32LIB) APP1LIBS= $(SLB)$/dtutils.lib - APP1NOSAL= TRUE @@ -86,11 +83,9 @@ APP1STDLIBS= $(SALLIB)\ $(OLEAUT32LIB) APP1LIBS= - APP1NOSAL= TRUE .ENDIF # --- Targets ------------------------------------------------------ .INCLUDE : target.mk -#.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/dtrans/source/win32/workbench/test_wincb.cxx b/dtrans/source/win32/workbench/test_wincb.cxx index b3f1a2ef95ee..90325de665e5 100644 --- a/dtrans/source/win32/workbench/test_wincb.cxx +++ b/dtrans/source/win32/workbench/test_wincb.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. @@ -167,7 +168,7 @@ private: CTransferable::CTransferable( ) : m_FlavorList( 1 ), - m_Data( OUString::createFromAscii( "Ich habe mir ein neues Fahrrad gekauft!" ) ) + m_Data( OUString(RTL_CONSTASCII_USTRINGPARAM("Ich habe mir ein neues Fahrrad gekauft!")) ) { DataFlavor df; @@ -276,7 +277,7 @@ int SAL_CALL main( int nArgc, char* Argv[] ) OUString rdbName = OUString( RTL_CONSTASCII_USTRINGPARAM( RDB_SYSPATH ) ); Reference< XMultiServiceFactory > g_xFactory( createRegistryServiceFactory( rdbName ) ); - // Print a message if an error occured. + // Print a message if an error occurred. if ( !g_xFactory.is( ) ) { OSL_ENSURE(sal_False, "Can't create RegistryServiceFactory"); @@ -346,3 +347,5 @@ int SAL_CALL main( int nArgc, char* Argv[] ) return 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/win32/workbench/testmarshal.cxx b/dtrans/source/win32/workbench/testmarshal.cxx index 3927a1dcf449..a07d7fb4401e 100644 --- a/dtrans/source/win32/workbench/testmarshal.cxx +++ b/dtrans/source/win32/workbench/testmarshal.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. @@ -241,3 +242,5 @@ int SAL_CALL main( int nArgc, char* Argv[] ) return 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/test/win32/dnd/atlwindow.cxx b/dtrans/test/win32/dnd/atlwindow.cxx index 2ed1b1b956bb..2295a7ddf2e5 100644 --- a/dtrans/test/win32/dnd/atlwindow.cxx +++ b/dtrans/test/win32/dnd/atlwindow.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,7 +41,6 @@ #include "atlwindow.hxx" #include "targetlistener.hxx" #include "sourcelistener.hxx" -//#include "transferable.hxx" #include <map> #include <winbase.h> @@ -48,9 +48,10 @@ using namespace com::sun::star::lang; using namespace com::sun::star::datatransfer::dnd; using namespace com::sun::star::datatransfer::dnd::DNDConstants; using namespace cppu; -using namespace rtl; using namespace std; +using ::rtl::OUString; + LRESULT APIENTRY EditSubclassProc( HWND hwnd, UINT uMsg,WPARAM wParam, LPARAM lParam) ; @@ -260,3 +261,5 @@ LRESULT APIENTRY EditSubclassProc( HWND hwnd, UINT uMsg,WPARAM wParam, LPARAM lP wParam, lParam); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/test/win32/dnd/atlwindow.hxx b/dtrans/test/win32/dnd/atlwindow.hxx index 7befe05bbb4e..f18ac08af1da 100644 --- a/dtrans/test/win32/dnd/atlwindow.hxx +++ b/dtrans/test/win32/dnd/atlwindow.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. @@ -98,3 +99,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/test/win32/dnd/dndTest.cxx b/dtrans/test/win32/dnd/dndTest.cxx index e1a96598da62..511a66cdf8a5 100644 --- a/dtrans/test/win32/dnd/dndTest.cxx +++ b/dtrans/test/win32/dnd/dndTest.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,10 +51,8 @@ CComModule _Module; #include <com/sun/star/lang/XComponent.hpp> #include <rtl/process.h> #include <cppuhelper/servicefactory.hxx> -//#include "transferable.hxx" #include "sourcelistener.hxx" - #include "atlwindow.hxx" BEGIN_OBJECT_MAP(ObjectMap) END_OBJECT_MAP() @@ -63,22 +62,16 @@ using namespace com::sun::star::datatransfer; using namespace com::sun::star::uno; using namespace com::sun::star::datatransfer::dnd; using namespace com::sun::star::datatransfer::dnd::DNDConstants; -using namespace rtl; -// defined in atlwindow.hxx -// #define WM_SOURCE_INIT WM_APP+100 -// #define WM_SOURCE_STARTDRAG WM_APP+101 +using ::rtl::OUString; + #define WM_CREATE_MTA_WND HRESULT doTest(); DWORD WINAPI MTAFunc( void* threadData); Reference< XMultiServiceFactory > MultiServiceFactory; -//int APIENTRY WinMain(HINSTANCE hInstance, -// HINSTANCE hPrevInstance, -// LPSTR lpCmdLine, -// int nCmdShow) -//int _tmain( int argc, TCHAR *argv[ ], TCHAR *envp[ ] ) + int main( int argc, char *argv[ ], char *envp[ ] ) { HRESULT hr; @@ -94,8 +87,6 @@ int main( int argc, char *argv[ ], char *envp[ ] ) if( FAILED(hr=doTest())) { _com_error err( hr); - const TCHAR * errMsg= err.ErrorMessage(); -// MessageBox( NULL, errMsg, "Test failed", MB_ICONERROR); } @@ -161,8 +152,7 @@ DWORD WINAPI MTAFunc( void* threadData) RECT pos={0, 406, 300, 605}; AWindow win(_T("DnD, full MTA"), GetCurrentThreadId(), pos, false, true); -// ThreadData data= *( ThreadData*)pParams; -// SetEvent(data.evtThreadReady); + while( GetMessage(&msg, (HWND)NULL, 0, 0) ) { switch( msg.message) @@ -208,3 +198,5 @@ DWORD WINAPI MTAFunc( void* threadData) CoUninitialize(); return 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/test/win32/dnd/makefile.mk b/dtrans/test/win32/dnd/makefile.mk index 3744e6135806..93ac89b0d35c 100644 --- a/dtrans/test/win32/dnd/makefile.mk +++ b/dtrans/test/win32/dnd/makefile.mk @@ -32,7 +32,6 @@ TARGET=dndTest TARGETTYPE=CUI LIBTARGET=NO -#USE_DEFFILE= TRUE ENABLE_EXCEPTIONS=TRUE # --- Settings --- @@ -41,7 +40,6 @@ ENABLE_EXCEPTIONS=TRUE # --- Files --- -# CFLAGS+=-GR -DUNICODE -D_UNICODE CFLAGS+= -D_WIN32_DCOM INCPRE+= -I$(ATL_INCLUDE) @@ -73,8 +71,6 @@ APP1LIBS= \ $(SLB)$/dtobjfact.lib \ $(SLB)$/dtutils.lib -# $(SOLARLIBDIR)$/imtaolecb.lib\ - APP1DEF= $(MISC)\$(APP1TARGET).def # --- Targets --- diff --git a/dtrans/test/win32/dnd/sourcelistener.cxx b/dtrans/test/win32/dnd/sourcelistener.cxx index 377157b5512e..a3a0a6f441bd 100644 --- a/dtrans/test/win32/dnd/sourcelistener.cxx +++ b/dtrans/test/win32/dnd/sourcelistener.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. @@ -71,3 +72,4 @@ void SAL_CALL DragSourceListener::dropActionChanged( const DragSourceDragEvent& { } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/test/win32/dnd/sourcelistener.hxx b/dtrans/test/win32/dnd/sourcelistener.hxx index 0480102d7e00..dbe9f0308914 100644 --- a/dtrans/test/win32/dnd/sourcelistener.hxx +++ b/dtrans/test/win32/dnd/sourcelistener.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. @@ -63,3 +64,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/test/win32/dnd/targetlistener.cxx b/dtrans/test/win32/dnd/targetlistener.cxx index cb4a5ac72664..1a1339833cc1 100644 --- a/dtrans/test/win32/dnd/targetlistener.cxx +++ b/dtrans/test/win32/dnd/targetlistener.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. @@ -28,15 +29,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dtrans.hxx" - #include "targetlistener.hxx" #include <com/sun/star/datatransfer/dnd/DNDConstants.hpp> #include <com/sun/star/datatransfer/DataFlavor.hpp> -//using namespace com::sun::star::datatransfer::dnd; using namespace com::sun::star::datatransfer::dnd::DNDConstants; using namespace com::sun::star::datatransfer; -using namespace rtl; + +using ::rtl::OUString; DropTargetListener::DropTargetListener(HWND hEdit):m_hEdit( hEdit) { @@ -51,22 +51,12 @@ void SAL_CALL DropTargetListener::disposing( const EventObject& Source ) } - - void SAL_CALL DropTargetListener::drop( const DropTargetDropEvent& e ) throw(RuntimeException) { -// e.Context->dropComplete( sal_True); -// e.Context->acceptDrop( ACTION_COPY); e.Context->rejectDrop(); - // if the Transferable contains text, then we send it to the edit window -// Sequence<DataFlavor> flavors= e.Transferable->getTransferDataFlavors(); -// DataFlavor aFlavor; -// for( int i=0; i < flavors.getLength(); i++) -// aFlavor= flavors[4]; - - DataFlavor flavor( OUString(OUString::createFromAscii("text/plain;charset=windows-1252")), + DataFlavor flavor( OUString(OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain;charset=windows-1252"))), OUString(L"Text plain"), getCppuType( ( Sequence<sal_Int8>*)0 ) ); Any anyData= e.Transferable->getTransferData( flavor); @@ -80,9 +70,6 @@ void SAL_CALL DropTargetListener::dragEnter( const DropTargetDragEnterEvent& dtd //If one drags something that is not moveable if( !(dtde.SourceActions & dtde.DropAction) ) dtde.Context->acceptDrag( ACTION_COPY); - -// dtde.Context->rejectDrag( ); - } void SAL_CALL DropTargetListener::dragExit( const DropTargetEvent& dte ) @@ -101,3 +88,5 @@ void SAL_CALL DropTargetListener::dropActionChanged( const DropTargetDragEvent& throw(RuntimeException) { } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/test/win32/dnd/targetlistener.hxx b/dtrans/test/win32/dnd/targetlistener.hxx index 9c3402e961da..b5543fdc9e41 100644 --- a/dtrans/test/win32/dnd/targetlistener.hxx +++ b/dtrans/test/win32/dnd/targetlistener.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. @@ -72,3 +73,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/test/win32/dnd/transferable.cxx b/dtrans/test/win32/dnd/transferable.cxx index 4c76ec2fee73..c20514f93b4b 100644 --- a/dtrans/test/win32/dnd/transferable.cxx +++ b/dtrans/test/win32/dnd/transferable.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. @@ -124,3 +125,5 @@ void SAL_CALL CTransferable::lostOwnership( const Reference< XClipboard >& xClip throw(RuntimeException) { } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/test/win32/dnd/transferable.hxx b/dtrans/test/win32/dnd/transferable.hxx index a9509f497ab1..315b3f55c9b2 100644 --- a/dtrans/test/win32/dnd/transferable.hxx +++ b/dtrans/test/win32/dnd/transferable.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. @@ -27,17 +28,6 @@ #ifndef _TRANSFERABLE_HXX_ #define _TRANSFERABLE_HXX_ -//_________________________________________________________________________________________________________________________ -// interface includes -//_________________________________________________________________________________________________________________________ - - -//#include "..\ImplHelper.hxx" - -//_________________________________________________________________________________________________________________________ -// other includes -//_________________________________________________________________________________________________________________________ - #include <cppuhelper/servicefactory.hxx> #include <com/sun/star/datatransfer/XTransferable.hpp> #include <com/sun/star/datatransfer/clipboard/XClipboardOwner.hpp> @@ -122,3 +112,5 @@ private: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |