diff options
author | Mihaela Kedikova <misheto@openoffice.org> | 2010-03-23 15:28:55 +0100 |
---|---|---|
committer | Mihaela Kedikova <misheto@openoffice.org> | 2010-03-23 15:28:55 +0100 |
commit | d979d618f87a06795d8138eaaacc85f4852db0fd (patch) | |
tree | e45f7937f92ef0cdb9a5f8dc9702288e12441828 /svtools/source/svhtml | |
parent | 0f1df8f471390de177610ee2bb9cc2f424d740c2 (diff) | |
parent | f099cd4586bf41f30dea8190dbd2bd7b4234cf60 (diff) |
gridcontrol_03: merge with DEV300_m75
Diffstat (limited to 'svtools/source/svhtml')
-rw-r--r-- | svtools/source/svhtml/htmlkywd.cxx | 5 | ||||
-rw-r--r-- | svtools/source/svhtml/htmlout.cxx | 5 | ||||
-rw-r--r-- | svtools/source/svhtml/htmlsupp.cxx | 5 | ||||
-rw-r--r-- | svtools/source/svhtml/makefile.mk | 6 | ||||
-rw-r--r-- | svtools/source/svhtml/parhtml.cxx | 40 |
5 files changed, 40 insertions, 21 deletions
diff --git a/svtools/source/svhtml/htmlkywd.cxx b/svtools/source/svhtml/htmlkywd.cxx index 052b10d2c564..96377a1b7efb 100644 --- a/svtools/source/svhtml/htmlkywd.cxx +++ b/svtools/source/svhtml/htmlkywd.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmlkywd.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx index 5bb26367075e..af0d0dff9667 100644 --- a/svtools/source/svhtml/htmlout.cxx +++ b/svtools/source/svhtml/htmlout.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmlout.cxx,v $ - * $Revision: 1.25 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/svtools/source/svhtml/htmlsupp.cxx b/svtools/source/svhtml/htmlsupp.cxx index 9103161afb51..4c08d9c41ec9 100644 --- a/svtools/source/svhtml/htmlsupp.cxx +++ b/svtools/source/svhtml/htmlsupp.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: htmlsupp.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/svtools/source/svhtml/makefile.mk b/svtools/source/svhtml/makefile.mk index b597763ac390..7a8552f2b672 100644 --- a/svtools/source/svhtml/makefile.mk +++ b/svtools/source/svhtml/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.5 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index b4eb6c05cffd..67fc5f619fdf 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: parhtml.cxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -2341,3 +2338,38 @@ rtl_TextEncoding HTMLParser::GetEncodingByMIME( const String& rMime ) return RTL_TEXTENCODING_DONTKNOW; } +rtl_TextEncoding HTMLParser::GetEncodingByHttpHeader( SvKeyValueIterator *pHTTPHeader ) +{ + rtl_TextEncoding eRet = RTL_TEXTENCODING_DONTKNOW; + if( pHTTPHeader ) + { + SvKeyValue aKV; + for( BOOL bCont = pHTTPHeader->GetFirst( aKV ); bCont; + bCont = pHTTPHeader->GetNext( aKV ) ) + { + if( aKV.GetKey().EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_META_content_type ) ) + { + if( aKV.GetValue().Len() ) + { + eRet = HTMLParser::GetEncodingByMIME( aKV.GetValue() ); + } + } + } + } + return eRet; +} + +BOOL HTMLParser::SetEncodingByHTTPHeader( + SvKeyValueIterator *pHTTPHeader ) +{ + BOOL bRet = FALSE; + rtl_TextEncoding eEnc = HTMLParser::GetEncodingByHttpHeader( pHTTPHeader ); + if(RTL_TEXTENCODING_DONTKNOW != eEnc) + { + SetSrcEncoding( eEnc ); + bRet = TRUE; + } + return bRet; +} + + |