summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorOliver Specht <os@openoffice.org>2001-07-26 04:48:21 +0000
committerOliver Specht <os@openoffice.org>2001-07-26 04:48:21 +0000
commitef540bad9e177f3e0f152cbe37a30abb03c2c9a6 (patch)
treea5b8d1935036e798ee296f82240fc66d4af85dae /sfx2
parent126de52ed8a776b8d3311ca7b21f75b6d5252a5e (diff)
#89083# GetEncodingByHttpHeader added
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/bastyp/sfxhtml.cxx31
1 files changed, 17 insertions, 14 deletions
diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx
index d7776ec8cea9..5fef50123452 100644
--- a/sfx2/source/bastyp/sfxhtml.cxx
+++ b/sfx2/source/bastyp/sfxhtml.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: sfxhtml.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: mib $ $Date: 2001-03-06 13:06:55 $
+ * last change: $Author: os $ $Date: 2001-07-26 05:48:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -638,11 +638,9 @@ rtl_TextEncoding SfxHTMLParser::GetEncodingByMIME( const String& rMime )
}
return RTL_TEXTENCODING_DONTKNOW;
}
-
-BOOL SfxHTMLParser::SetEncodingByHTTPHeader(
- SvKeyValueIterator *pHTTPHeader )
+rtl_TextEncoding SfxHTMLParser::GetEncodingByHttpHeader( SvKeyValueIterator *pHTTPHeader )
{
- BOOL bRet = FALSE;
+ rtl_TextEncoding eRet = RTL_TEXTENCODING_DONTKNOW;
if( pHTTPHeader )
{
SvKeyValue aKV;
@@ -653,19 +651,24 @@ BOOL SfxHTMLParser::SetEncodingByHTTPHeader(
{
if( aKV.GetValue().Len() )
{
- rtl_TextEncoding eEnc =
- GetEncodingByMIME( aKV.GetValue() );
- if( RTL_TEXTENCODING_DONTKNOW != eEnc )
- {
- SetSrcEncoding( eEnc );
- bRet = TRUE;
- }
+ eRet = SfxHTMLParser::GetEncodingByMIME( aKV.GetValue() );
}
-// break;
}
}
}
+ return eRet;
+}
+BOOL SfxHTMLParser::SetEncodingByHTTPHeader(
+ SvKeyValueIterator *pHTTPHeader )
+{
+ BOOL bRet = FALSE;
+ rtl_TextEncoding eEnc = SfxHTMLParser::GetEncodingByHttpHeader( pHTTPHeader );
+ if(RTL_TEXTENCODING_DONTKNOW != eEnc)
+ {
+ SetSrcEncoding( eEnc );
+ bRet = TRUE;
+ }
return bRet;
}