diff options
author | Kai Ahrens <ka@openoffice.org> | 2001-03-22 16:54:49 +0000 |
---|---|---|
committer | Kai Ahrens <ka@openoffice.org> | 2001-03-22 16:54:49 +0000 |
commit | 9de4a25084bcad8eedbc59586cb1afcab96db245 (patch) | |
tree | cdc5ad4a03e344fe1af828d9d666af548bd63383 /sot | |
parent | d657c5e54174866ec14d418c0f56ffadfe89cb93 (diff) |
#85259#: catch exceptions
Diffstat (limited to 'sot')
-rw-r--r-- | sot/source/base/formats.cxx | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/sot/source/base/formats.cxx b/sot/source/base/formats.cxx index 4735d65375c3..6ae1d6bbf4f0 100644 --- a/sot/source/base/formats.cxx +++ b/sot/source/base/formats.cxx @@ -2,9 +2,9 @@ * * $RCSfile: formats.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: ka $ $Date: 2001-03-20 15:55:01 $ + * last change: $Author: ka $ $Date: 2001-03-22 17:54:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1733,29 +1733,35 @@ USHORT SotExchange::GetExchangeAction( if( rxTransferable.is() ) { - const Sequence< DataFlavor > aFlavors( rxTransferable->getTransferDataFlavors() ); - - for( sal_Int32 i = 0; i < aFlavors.getLength(); i++ ) + try { - DataFlavorEx aFlavorEx; - const DataFlavor& rFlavor = aFlavors[ i ]; + const Sequence< DataFlavor > aFlavors( rxTransferable->getTransferDataFlavors() ); + + for( sal_Int32 i = 0; i < aFlavors.getLength(); i++ ) + { + DataFlavorEx aFlavorEx; + const DataFlavor& rFlavor = aFlavors[ i ]; - aFlavorEx.MimeType = rFlavor.MimeType; - aFlavorEx.HumanPresentableName = rFlavor.HumanPresentableName; - aFlavorEx.DataType = rFlavor.DataType; - aFlavorEx.mnSotId = SotExchange::RegisterFormat( rFlavor ); + aFlavorEx.MimeType = rFlavor.MimeType; + aFlavorEx.HumanPresentableName = rFlavor.HumanPresentableName; + aFlavorEx.DataType = rFlavor.DataType; + aFlavorEx.mnSotId = SotExchange::RegisterFormat( rFlavor ); - aVector.push_back( aFlavorEx ); + aVector.push_back( aFlavorEx ); - if( ( SOT_FORMATSTR_ID_WMF == aFlavorEx.mnSotId ) && !HasFormat_Impl( aVector, SOT_FORMAT_GDIMETAFILE ) ) - { - if( SotExchange::GetFormatDataFlavor( SOT_FORMAT_GDIMETAFILE, aFlavorEx ) ) + if( ( SOT_FORMATSTR_ID_WMF == aFlavorEx.mnSotId ) && !HasFormat_Impl( aVector, SOT_FORMAT_GDIMETAFILE ) ) { - aFlavorEx.mnSotId = SOT_FORMAT_GDIMETAFILE; - aVector.push_back( aFlavorEx ); + if( SotExchange::GetFormatDataFlavor( SOT_FORMAT_GDIMETAFILE, aFlavorEx ) ) + { + aFlavorEx.mnSotId = SOT_FORMAT_GDIMETAFILE; + aVector.push_back( aFlavorEx ); + } } } } + catch( const ::com::sun::star::uno::Exception& ) + { + } } return( SotExchange::GetExchangeAction( aVector, nDestination, nSourceOptions, |