From c81db7d594dbfdc1e8c07540bdd2a5c52ac9bade Mon Sep 17 00:00:00 2001 From: Tino Rachui Date: Thu, 15 Mar 2001 09:13:36 +0000 Subject: *** empty log message *** --- dtrans/source/win32/clipb/WinClipbImpl.cxx | 7 ++++--- dtrans/source/win32/dtobj/DOTransferable.cxx | 6 +++--- dtrans/source/win32/dtobj/DataFmtTransl.cxx | 10 +++++++--- dtrans/source/win32/dtobj/XTDataObject.cxx | 7 +++++-- 4 files changed, 19 insertions(+), 11 deletions(-) (limited to 'dtrans/source/win32') diff --git a/dtrans/source/win32/clipb/WinClipbImpl.cxx b/dtrans/source/win32/clipb/WinClipbImpl.cxx index b749f63b7f74..8755f4f8d844 100644 --- a/dtrans/source/win32/clipb/WinClipbImpl.cxx +++ b/dtrans/source/win32/clipb/WinClipbImpl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: WinClipbImpl.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: tra $ $Date: 2001-03-14 16:29:04 $ + * last change: $Author: tra $ $Date: 2001-03-15 10:12:12 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -137,7 +137,6 @@ CWinClipbImpl::CWinClipbImpl( const OUString& aClipboardName, CWinClipboard* the CWinClipbImpl::~CWinClipbImpl( ) { - unregisterClipboardViewer( ); } //------------------------------------------------------------------------ @@ -262,6 +261,8 @@ void SAL_CALL CWinClipbImpl::unregisterClipboardViewer( ) void SAL_CALL CWinClipbImpl::dispose() throw( RuntimeException ) { + unregisterClipboardViewer( ); + OSL_ENSURE( !m_rOldClipbContent.is( ) && !m_rOldClipbOwner.is( ) && !m_rCurrentClipbContent.is( ) && diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx index a7de353b0645..855c4ee10c23 100644 --- a/dtrans/source/win32/dtobj/DOTransferable.cxx +++ b/dtrans/source/win32/dtobj/DOTransferable.cxx @@ -2,9 +2,9 @@ * * $RCSfile: DOTransferable.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: tra $ $Date: 2001-03-05 13:10:39 $ + * last change: $Author: tra $ $Date: 2001-03-15 10:12:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -249,7 +249,7 @@ void SAL_CALL CDOTransferable::initFlavorList( ) // //------------------------------------------------------------------------ -//inline +inline void SAL_CALL CDOTransferable::addSupportedFlavor( const DataFlavor& aFlavor ) { // we ignore all formats that couldn't be translated diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.cxx b/dtrans/source/win32/dtobj/DataFmtTransl.cxx index e50dc64bcf6c..f6d831345415 100644 --- a/dtrans/source/win32/dtobj/DataFmtTransl.cxx +++ b/dtrans/source/win32/dtobj/DataFmtTransl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: DataFmtTransl.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: tra $ $Date: 2001-03-09 15:21:17 $ + * last change: $Author: tra $ $Date: 2001-03-15 10:13:24 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -187,6 +187,10 @@ DataFlavor CDataFormatTranslator::getDataFlavorFromFormatEtc( const Reference< X { DataFlavor aFlavor; + aFlavor.MimeType = OUString::createFromAscii( "" ); + aFlavor.HumanPresentableName = OUString::createFromAscii( "" ); + aFlavor.DataType = getCppuType( (const Sequence< sal_Int8 >*) 0 ); + try { CLIPFORMAT aClipformat = aFormatEtc.cfFormat; @@ -202,7 +206,7 @@ DataFlavor CDataFormatTranslator::getDataFlavorFromFormatEtc( const Reference< X aFlavor.HumanPresentableName = OUString::createFromAscii( "OEM/ANSI Text" ); aFlavor.DataType = CPPUTYPE_SEQSALINT8; } - else + else if ( CF_INVALID != aClipformat ) { aFlavor = m_XDataFormatTranslator->getDataFlavorFromSystemDataType( aAny ); diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx index dd103916682f..d4549e11467e 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.cxx +++ b/dtrans/source/win32/dtobj/XTDataObject.cxx @@ -2,9 +2,9 @@ * * $RCSfile: XTDataObject.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: tra $ $Date: 2001-03-09 15:21:55 $ + * last change: $Author: tra $ $Date: 2001-03-15 10:13:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -329,7 +329,10 @@ void SAL_CALL CXTDataObject::renderUnicodeAndSetupStgMedium( // spec. an do throw an UnsupportedFlavorException // so we must check the any if ( !aAny.hasValue( ) ) + { + OSL_ENSURE( sal_False, "XTransferable should throw an exception if ask for an unsupported flavor" ); throw UnsupportedFlavorException( ); + } OUString aText; aAny >>= aText; -- cgit