summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorCarsten Driesner <cd@openoffice.org>2010-07-28 13:54:38 +0200
committerCarsten Driesner <cd@openoffice.org>2010-07-28 13:54:38 +0200
commit9951e7b7804b3643b9bf7e837e5cd0f09373a8fc (patch)
tree5768f3a044af6ebb17e20322bc55adc1ea2d81ce /editeng
parent827100404f29853108a0a1fb8c329c2bb0410de4 (diff)
fwk152: #i113249# Fix broken HTML clipboard
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/eehtml.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index 87bf077bb2..651b232848 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -43,7 +43,7 @@
#include <editeng/wghtitem.hxx>
#include <svtools/htmltokn.h>
#include <svtools/htmlkywd.hxx>
-
+#include <tools/tenccvt.hxx>
#define ACTION_INSERTTEXT 1
#define ACTION_INSERTPARABRK 2
@@ -66,6 +66,16 @@ EditHTMLParser::EditHTMLParser( SvStream& rIn, const String& rBaseURL, SvKeyValu
nNumberingLevel = 0;
bFieldsInserted = FALSE;
+ DBG_ASSERT( RTL_TEXTENCODING_DONTKNOW == GetSrcEncoding( ), "EditHTMLParser::EditHTMLParser: Where does the encoding come from?" );
+ DBG_ASSERT( !IsSwitchToUCS2(), "EditHTMLParser::::EditHTMLParser: Switch to UCS2?" );
+
+ // Altough the real default encoding is ISO8859-1, we use MS-1252
+ // als default encoding.
+ SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) );
+
+ // If the file starts with a BOM, switch to UCS2.
+ SetSwitchToUCS2( TRUE );
+
if ( pHTTPHeaderAttrs )
SetEncodingByHTTPHeader( pHTTPHeaderAttrs );
}