summaryrefslogtreecommitdiff
path: root/dtrans/source/win32/ftransl/ftransl.cxx
diff options
context:
space:
mode:
authorTino Rachui <tra@openoffice.org>2001-03-09 07:48:02 +0000
committerTino Rachui <tra@openoffice.org>2001-03-09 07:48:02 +0000
commitd31f1064a5c100c650202fd994bcb70d0ecde67e (patch)
treec02bb92a40fa6e983e008486701376bcc551ac00 /dtrans/source/win32/ftransl/ftransl.cxx
parent1803f5ab54a309fbea9004bfe0d3944e3ddbf854 (diff)
now accepting text/plain contentype without charset
Diffstat (limited to 'dtrans/source/win32/ftransl/ftransl.cxx')
-rw-r--r--dtrans/source/win32/ftransl/ftransl.cxx19
1 files changed, 11 insertions, 8 deletions
diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx
index 482ee744fd0a..67abd9183492 100644
--- a/dtrans/source/win32/ftransl/ftransl.cxx
+++ b/dtrans/source/win32/ftransl/ftransl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ftransl.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: tra $ $Date: 2001-03-01 15:39:41 $
+ * last change: $Author: tra $ $Date: 2001-03-09 08:48:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -162,9 +162,12 @@ Any SAL_CALL CDataFormatTranslator::getSystemDataTypeFromDataFlavor( const DataF
// default is CF_TEXT
aAny <<= static_cast< sal_Int32 >( CF_TEXT );
- // but maybe it is unicode text or oem text
- OUString charset = refXMimeCntType->getParameterValue( OUSTR( charset ) );
- findStandardFormatIdForCharset( charset, aAny );
+ if ( refXMimeCntType->hasParameter( OUSTR( charset ) ) )
+ {
+ // but maybe it is unicode text or oem text
+ OUString charset = refXMimeCntType->getParameterValue( OUSTR( charset ) );
+ findStandardFormatIdForCharset( charset, aAny );
+ }
}
else
{
@@ -181,11 +184,11 @@ Any SAL_CALL CDataFormatTranslator::getSystemDataTypeFromDataFlavor( const DataF
}
catch( IllegalArgumentException& )
{
- OSL_ENSURE( sal_False, "Invalid content type detected!" );
+ OSL_ENSURE( sal_False, "Invalid content-type detected!" );
}
catch( NoSuchElementException& )
{
- OSL_ENSURE( sal_False, "text/plain Contenttype without charset parameter detected" );
+ OSL_ENSURE( sal_False, "Illegal content-type parameter" );
}
catch( ... )
{
@@ -447,7 +450,7 @@ void SAL_CALL CDataFormatTranslator::findStandardFormatIdForCharset( const OUStr
aAny <<= static_cast< sal_Int32 >( CF_UNICODETEXT );
else
{
- sal_Int32 wincp = getWinCodePageFromMimeCharset( aCharset );
+ sal_Int32 wincp = getWinCPFromMimeCharset( aCharset );
if ( IsOEMCP ( wincp ) )
aAny <<= static_cast< sal_Int32 >( CF_OEMTEXT );
}