summaryrefslogtreecommitdiff
path: root/svtools/source/misc/transfer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/misc/transfer.cxx')
-rw-r--r--svtools/source/misc/transfer.cxx128
1 files changed, 64 insertions, 64 deletions
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index 50ad17317955..567a47d7ed84 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -394,14 +394,14 @@ Any SAL_CALL TransferableHelper::getTransferData( const DataFlavor& rFlavor ) th
if( maAny >>= aSeq )
{
- SvMemoryStream* pSrcStm = new SvMemoryStream( (char*) aSeq.getConstArray(), aSeq.getLength(), STREAM_WRITE | STREAM_TRUNC );
- GDIMetaFile aMtf;
+ SvMemoryStream* pSrcStm = new SvMemoryStream( (char*) aSeq.getConstArray(), aSeq.getLength(), STREAM_WRITE | STREAM_TRUNC );
+ GDIMetaFile aMtf;
*pSrcStm >> aMtf;
delete pSrcStm;
- Graphic aGraphic( aMtf );
- SvMemoryStream aDstStm( 65535, 65535 );
+ Graphic aGraphic( aMtf );
+ SvMemoryStream aDstStm( 65535, 65535 );
if( GraphicConverter::Export( aDstStm, aGraphic, CVT_EMF ) == ERRCODE_NONE )
{
@@ -424,14 +424,14 @@ Any SAL_CALL TransferableHelper::getTransferData( const DataFlavor& rFlavor ) th
if( maAny >>= aSeq )
{
- SvMemoryStream* pSrcStm = new SvMemoryStream( (char*) aSeq.getConstArray(), aSeq.getLength(), STREAM_WRITE | STREAM_TRUNC );
- GDIMetaFile aMtf;
+ SvMemoryStream* pSrcStm = new SvMemoryStream( (char*) aSeq.getConstArray(), aSeq.getLength(), STREAM_WRITE | STREAM_TRUNC );
+ GDIMetaFile aMtf;
*pSrcStm >> aMtf;
delete pSrcStm;
- SvMemoryStream aDstStm( 65535, 65535 );
-
+ SvMemoryStream aDstStm( 65535, 65535 );
+
// taking wmf without file header
if ( ConvertGDIMetaFileToWMF( aMtf, aDstStm, NULL, FALSE ) )
{
@@ -482,9 +482,9 @@ Sequence< DataFlavor > SAL_CALL TransferableHelper::getTransferDataFlavors() thr
{
}
- Sequence< DataFlavor > aRet( mpFormats->size() );
- DataFlavorExVector::iterator aIter( mpFormats->begin() ), aEnd( mpFormats->end() );
- sal_uInt32 nCurPos = 0;
+ Sequence< DataFlavor > aRet( mpFormats->size() );
+ DataFlavorExVector::iterator aIter( mpFormats->begin() ), aEnd( mpFormats->end() );
+ sal_uInt32 nCurPos = 0;
while( aIter != aEnd )
{
@@ -499,7 +499,7 @@ Sequence< DataFlavor > SAL_CALL TransferableHelper::getTransferDataFlavors() thr
sal_Bool SAL_CALL TransferableHelper::isDataFlavorSupported( const DataFlavor& rFlavor ) throw( RuntimeException )
{
const SolarMutexGuard aGuard;
- sal_Bool bRet = sal_False;
+ sal_Bool bRet = sal_False;
try
{
@@ -625,8 +625,8 @@ void TransferableHelper::ImplFlush()
{
if( mxClipboard.is() )
{
- Reference< XFlushableClipboard > xFlushableClipboard( mxClipboard, UNO_QUERY );
- const sal_uInt32 nRef = Application::ReleaseSolarMutex();
+ Reference< XFlushableClipboard > xFlushableClipboard( mxClipboard, UNO_QUERY );
+ const sal_uInt32 nRef = Application::ReleaseSolarMutex();
try
{
@@ -744,8 +744,8 @@ void TransferableHelper::RemoveFormat( const DataFlavor& rFlavor )
sal_Bool TransferableHelper::HasFormat( SotFormatStringId nFormat )
{
- DataFlavorExVector::iterator aIter( mpFormats->begin() ), aEnd( mpFormats->end() );
- sal_Bool bRet = sal_False;
+ DataFlavorExVector::iterator aIter( mpFormats->begin() ), aEnd( mpFormats->end() );
+ sal_Bool bRet = sal_False;
while( aIter != aEnd )
{
@@ -787,9 +787,9 @@ sal_Bool TransferableHelper::SetString( const ::rtl::OUString& rString, const Da
SotExchange::GetFormatDataFlavor( FORMAT_FILE, aFileFlavor ) &&
TransferableDataHelper::IsEqual( aFileFlavor, rFlavor ) )
{
- const String aString( rString );
- const ByteString aByteStr( aString, gsl_getSystemTextEncoding() );
- Sequence< sal_Int8 > aSeq( aByteStr.Len() + 1 );
+ const String aString( rString );
+ const ByteString aByteStr( aString, gsl_getSystemTextEncoding() );
+ Sequence< sal_Int8 > aSeq( aByteStr.Len() + 1 );
rtl_copyMemory( aSeq.getArray(), aByteStr.GetBuffer(), aByteStr.Len() );
aSeq[ aByteStr.Len() ] = 0;
@@ -928,9 +928,9 @@ sal_Bool TransferableHelper::SetINetBookmark( const INetBookmark& rBmk,
#ifdef WNT
case SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR:
{
- Sequence< sal_Int8 > aSeq( sizeof( FILEGROUPDESCRIPTOR ) );
- FILEGROUPDESCRIPTOR* pFDesc = (FILEGROUPDESCRIPTOR*) aSeq.getArray();
- FILEDESCRIPTOR& rFDesc1 = pFDesc->fgd[ 0 ];
+ Sequence< sal_Int8 > aSeq( sizeof( FILEGROUPDESCRIPTOR ) );
+ FILEGROUPDESCRIPTOR* pFDesc = (FILEGROUPDESCRIPTOR*) aSeq.getArray();
+ FILEDESCRIPTOR& rFDesc1 = pFDesc->fgd[ 0 ];
pFDesc->cItems = 1;
memset( &rFDesc1, 0, sizeof( FILEDESCRIPTOR ) );
@@ -1005,8 +1005,8 @@ sal_Bool TransferableHelper::SetObject( void* pUserObject, sal_uInt32 nUserObjec
if( pUserObject && WriteObject( xStm, pUserObject, nUserObjectId, rFlavor ) )
{
- const sal_uInt32 nLen = xStm->Seek( STREAM_SEEK_TO_END );
- Sequence< sal_Int8 > aSeq( nLen );
+ const sal_uInt32 nLen = xStm->Seek( STREAM_SEEK_TO_END );
+ Sequence< sal_Int8 > aSeq( nLen );
xStm->Seek( STREAM_SEEK_TO_BEGIN );
xStm->Read( aSeq.getArray(), nLen );
@@ -1014,9 +1014,9 @@ sal_Bool TransferableHelper::SetObject( void* pUserObject, sal_uInt32 nUserObjec
if( nLen && ( SotExchange::GetFormat( rFlavor ) == SOT_FORMAT_STRING ) )
{
//JP 24.7.2001: as I know was this only for the writer application and this
- // writes now UTF16 format into the stream
+ // writes now UTF16 format into the stream
//JP 6.8.2001: and now it writes UTF8 because then exist no problem with
- // little / big endians! - Bug 88121
+ // little / big endians! - Bug 88121
maAny <<= ::rtl::OUString( reinterpret_cast< const sal_Char* >( aSeq.getConstArray() ), nLen - 1, RTL_TEXTENCODING_UTF8 );
}
else
@@ -1161,19 +1161,19 @@ void TransferableHelper::StartDrag( Window* pWindow, sal_Int8 nDnDSourceActions,
if( pWindow->IsMouseCaptured() )
pWindow->ReleaseMouse();
- const Point aPt( pWindow->GetPointerPosPixel() );
+ const Point aPt( pWindow->GetPointerPosPixel() );
// On Mac OS X we are forced to execute 'startDrag' synchronously
// contrary to the XDragSource interface specification because
- // we can receive drag events from the system only in the main
+ // we can receive drag events from the system only in the main
// thread
#if !defined(QUARTZ)
const sal_uInt32 nRef = Application::ReleaseSolarMutex();
-#endif
+#endif
try
{
- DragGestureEvent aEvt;
+ DragGestureEvent aEvt;
aEvt.DragAction = DNDConstants::ACTION_COPY;
aEvt.DragOriginX = aPt.X();
aEvt.DragOriginY = aPt.Y();
@@ -1188,7 +1188,7 @@ void TransferableHelper::StartDrag( Window* pWindow, sal_Int8 nDnDSourceActions,
// See above for the reason of this define
#if !defined(QUARTZ)
Application::AcquireSolarMutex( nRef );
-#endif
+#endif
}
}
@@ -1212,7 +1212,7 @@ Reference< XClipboard> TransferableHelper::GetSystemClipboard()
if( pFocusWindow )
return pFocusWindow->GetClipboard();
- return Reference< XClipboard > ();
+ return Reference< XClipboard > ();
}
// -----------------------------------------------------------------------------
@@ -1243,7 +1243,7 @@ class TransferableClipboardNotifier : public ::cppu::WeakImplHelper1< XClipboard
private:
::osl::Mutex& mrMutex;
Reference< XClipboardNotifier > mxNotifier;
- TransferableDataHelper* mpListener;
+ TransferableDataHelper* mpListener;
protected:
// XClipboardListener
@@ -1415,7 +1415,7 @@ void TransferableDataHelper::FillDataFlavorExVector( const Sequence< DataFlavor
{
Reference< XMultiServiceFactory > xFact( ::comphelper::getProcessServiceFactory() );
Reference< XMimeContentTypeFactory > xMimeFact;
- DataFlavorEx aFlavorEx;
+ DataFlavorEx aFlavorEx;
const ::rtl::OUString aCharsetStr( ::rtl::OUString::createFromAscii( "charset" ) );
if( xFact.is() )
@@ -1425,7 +1425,7 @@ void TransferableDataHelper::FillDataFlavorExVector( const Sequence< DataFlavor
for( sal_Int32 i = 0; i < rDataFlavorSeq.getLength(); i++ )
{
- const DataFlavor& rFlavor = rDataFlavorSeq[ i ];
+ const DataFlavor& rFlavor = rDataFlavorSeq[ i ];
Reference< XMimeContentType > xMimeType;
try
@@ -1542,8 +1542,8 @@ sal_Bool TransferableDataHelper::HasFormat( SotFormatStringId nFormat ) const
{
::osl::MutexGuard aGuard( mpImpl->maMutex );
- DataFlavorExVector::iterator aIter( mpFormats->begin() ), aEnd( mpFormats->end() );
- sal_Bool bRet = sal_False;
+ DataFlavorExVector::iterator aIter( mpFormats->begin() ), aEnd( mpFormats->end() );
+ sal_Bool bRet = sal_False;
while( aIter != aEnd )
{
@@ -1563,8 +1563,8 @@ sal_Bool TransferableDataHelper::HasFormat( const DataFlavor& rFlavor ) const
{
::osl::MutexGuard aGuard( mpImpl->maMutex );
- DataFlavorExVector::iterator aIter( mpFormats->begin() ), aEnd( mpFormats->end() );
- sal_Bool bRet = sal_False;
+ DataFlavorExVector::iterator aIter( mpFormats->begin() ), aEnd( mpFormats->end() );
+ sal_Bool bRet = sal_False;
while( aIter != aEnd )
{
@@ -1638,7 +1638,7 @@ Reference< XTransferable > TransferableDataHelper::GetXTransferable() const
// -----------------------------------------------------------------------------
-Any TransferableDataHelper::GetAny( SotFormatStringId nFormat ) const
+Any TransferableDataHelper::GetAny( SotFormatStringId nFormat ) const
{
Any aReturn;
@@ -1771,8 +1771,8 @@ sal_Bool TransferableDataHelper::GetBitmap( SotFormatStringId nFormat, Bitmap& r
sal_Bool TransferableDataHelper::GetBitmap( const DataFlavor& rFlavor, Bitmap& rBmp )
{
SotStorageStreamRef xStm;
- DataFlavor aSubstFlavor;
- sal_Bool bRet = GetSotStorageStream( rFlavor, xStm );
+ DataFlavor aSubstFlavor;
+ sal_Bool bRet = GetSotStorageStream( rFlavor, xStm );
if( bRet )
{
@@ -1826,8 +1826,8 @@ sal_Bool TransferableDataHelper::GetGDIMetaFile( SotFormatStringId nFormat, GDIM
sal_Bool TransferableDataHelper::GetGDIMetaFile( const DataFlavor& rFlavor, GDIMetaFile& rMtf )
{
SotStorageStreamRef xStm;
- DataFlavor aSubstFlavor;
- sal_Bool bRet = sal_False;
+ DataFlavor aSubstFlavor;
+ sal_Bool bRet = sal_False;
if( GetSotStorageStream( rFlavor, xStm ) )
{
@@ -1878,10 +1878,10 @@ sal_Bool TransferableDataHelper::GetGraphic( SotFormatStringId nFormat, Graphic&
sal_Bool TransferableDataHelper::GetGraphic( const ::com::sun::star::datatransfer::DataFlavor& rFlavor, Graphic& rGraphic )
{
- DataFlavor aFlavor;
- sal_Bool bRet = sal_False;
+ DataFlavor aFlavor;
+ sal_Bool bRet = sal_False;
- if( SotExchange::GetFormatDataFlavor( SOT_FORMAT_BITMAP, aFlavor ) &&
+ if( SotExchange::GetFormatDataFlavor( SOT_FORMAT_BITMAP, aFlavor ) &&
TransferableDataHelper::IsEqual( aFlavor, rFlavor ) )
{
Bitmap aBmp;
@@ -1924,7 +1924,7 @@ sal_Bool TransferableDataHelper::GetImageMap( SotFormatStringId nFormat, ImageMa
sal_Bool TransferableDataHelper::GetImageMap( const ::com::sun::star::datatransfer::DataFlavor& rFlavor, ImageMap& rIMap )
{
SotStorageStreamRef xStm;
- sal_Bool bRet = GetSotStorageStream( rFlavor, xStm );
+ sal_Bool bRet = GetSotStorageStream( rFlavor, xStm );
if( bRet )
{
@@ -1982,8 +1982,8 @@ sal_Bool TransferableDataHelper::GetINetBookmark( const ::com::sun::star::datatr
}
else
{
- String aURL, aDesc;
- sal_uInt16 nStart = aString.Search( '@' ), nLen = (sal_uInt16) aString.ToInt32();
+ String aURL, aDesc;
+ sal_uInt16 nStart = aString.Search( '@' ), nLen = (sal_uInt16) aString.ToInt32();
if( !nLen && aString.GetChar( 0 ) != '0' )
{
@@ -2040,8 +2040,8 @@ sal_Bool TransferableDataHelper::GetINetBookmark( const ::com::sun::star::datatr
if( pFDesc->cItems )
{
- ByteString aDesc( pFDesc->fgd[ 0 ].cFileName );
- rtl_TextEncoding eTextEncoding = gsl_getSystemTextEncoding();
+ ByteString aDesc( pFDesc->fgd[ 0 ].cFileName );
+ rtl_TextEncoding eTextEncoding = gsl_getSystemTextEncoding();
if( ( aDesc.Len() > 4 ) && aDesc.Copy( aDesc.Len() - 4 ).EqualsIgnoreCaseAscii( ".URL" ) )
{
@@ -2066,8 +2066,8 @@ sal_Bool TransferableDataHelper::GetINetBookmark( const ::com::sun::star::datatr
if( pStream )
{
- ByteString aLine;
- sal_Bool bSttFnd = sal_False;
+ ByteString aLine;
+ sal_Bool bSttFnd = sal_False;
while( pStream->ReadLine( aLine ) )
{
@@ -2196,8 +2196,8 @@ sal_Bool TransferableDataHelper::GetSotStorageStream( SotFormatStringId nFormat,
sal_Bool TransferableDataHelper::GetSotStorageStream( const DataFlavor& rFlavor, SotStorageStreamRef& rxStream )
{
- Sequence< sal_Int8 > aSeq;
- sal_Bool bRet = GetSequence( rFlavor, aSeq );
+ Sequence< sal_Int8 > aSeq;
+ sal_Bool bRet = GetSequence( rFlavor, aSeq );
if( bRet )
{
@@ -2219,8 +2219,8 @@ sal_Bool TransferableDataHelper::GetInputStream( SotFormatStringId nFormat, Refe
sal_Bool TransferableDataHelper::GetInputStream( const DataFlavor& rFlavor, Reference < XInputStream >& rxStream )
{
- Sequence< sal_Int8 > aSeq;
- sal_Bool bRet = GetSequence( rFlavor, aSeq );
+ Sequence< sal_Int8 > aSeq;
+ sal_Bool bRet = GetSequence( rFlavor, aSeq );
if( bRet )
rxStream = new ::comphelper::SequenceInputStream( aSeq );
@@ -2286,8 +2286,8 @@ TransferableDataHelper TransferableDataHelper::CreateFromSystemClipboard( Window
{
DBG_ASSERT( pWindow, "Window pointer is NULL" );
- Reference< XClipboard > xClipboard;
- TransferableDataHelper aRet;
+ Reference< XClipboard > xClipboard;
+ TransferableDataHelper aRet;
if( pWindow )
xClipboard = pWindow->GetClipboard();
@@ -2321,8 +2321,8 @@ TransferableDataHelper TransferableDataHelper::CreateFromSelection( Window* pWin
{
DBG_ASSERT( pWindow, "Window pointer is NULL" );
- Reference< XClipboard > xSelection;
- TransferableDataHelper aRet;
+ Reference< XClipboard > xSelection;
+ TransferableDataHelper aRet;
if( pWindow )
xSelection = pWindow->GetPrimarySelection();
@@ -2358,7 +2358,7 @@ sal_Bool TransferableDataHelper::IsEqual( const ::com::sun::star::datatransfer::
{
Reference< XMultiServiceFactory > xFact( ::comphelper::getProcessServiceFactory() );
Reference< XMimeContentTypeFactory > xMimeFact;
- sal_Bool bRet = sal_False;
+ sal_Bool bRet = sal_False;
try
{