rpms/openoffice.org/devel openoffice.org-2.3.0.ooo76649.httpencoding.patch, 1.3, 1.4 openoffice.org.spec, 1.2284, 1.2285

Caolan McNamara caolanm at fedoraproject.org
Wed Jul 14 10:22:11 UTC 2010


Author: caolanm

Update of /cvs/pkgs/rpms/openoffice.org/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv6003

Modified Files:
	openoffice.org-2.3.0.ooo76649.httpencoding.patch 
	openoffice.org.spec 
Log Message:
update html encoding patch

openoffice.org-2.3.0.ooo76649.httpencoding.patch:
 parhtml.cxx |    3 +++
 1 file changed, 3 insertions(+)

Index: openoffice.org-2.3.0.ooo76649.httpencoding.patch
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/openoffice.org-2.3.0.ooo76649.httpencoding.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- openoffice.org-2.3.0.ooo76649.httpencoding.patch	10 Oct 2009 19:40:01 -0000	1.3
+++ openoffice.org-2.3.0.ooo76649.httpencoding.patch	14 Jul 2010 10:22:10 -0000	1.4
@@ -1,161 +1,13 @@
-Index: source/filter/html/htmlpars.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/filter/html/htmlpars.cxx,v
-retrieving revision 1.29
-diff -u -r1.29 htmlpars.cxx
---- openoffice.org.orig/sc/source/filter/html/htmlpars.cxx	3 Aug 2006 14:54:12 -0000	1.29
-+++ openoffice.org/sc/source/filter/html/htmlpars.cxx	24 Apr 2007 09:47:29 -0000
-@@ -157,27 +157,7 @@
-     SfxObjectShell* pObjSh = mpDoc->GetDocumentShell();
-     BOOL bLoading = pObjSh && pObjSh->IsLoading();
- 
--    SvKeyValueIteratorRef xValues;
--    SvKeyValueIterator* pAttributes = NULL;
--    if ( bLoading )
--        pAttributes = pObjSh->GetHeaderAttributes();
--    else
--    {
--        //  When not loading, set up fake http headers to force the SfxHTMLParser to use UTF8
--        //  (used when pasting from clipboard)
--
--        const sal_Char* pCharSet = rtl_getBestMimeCharsetFromTextEncoding( RTL_TEXTENCODING_UTF8 );
--        if( pCharSet )
--        {
--            String aContentType = String::CreateFromAscii( "text/html; charset=" );
--            aContentType.AppendAscii( pCharSet );
--
--            xValues = new SvKeyValueIterator;
--            xValues->Append( SvKeyValue( String::CreateFromAscii( OOO_STRING_SVTOOLS_HTML_META_content_type ), aContentType ) );
--            pAttributes = xValues;
--        }
--    }
--
-+    SvKeyValueIterator* pAttributes = bLoading ? pObjSh->GetHeaderAttributes() : 0;
-     ULONG nErr = pEdit->Read( rStream, rBaseURL, EE_FORMAT_HTML, pAttributes );
- 
-     pEdit->SetImportHdl( aOldLink );
-@@ -2796,30 +2776,8 @@
- 
- ULONG ScHTMLQueryParser::Read( SvStream& rStrm, const String& rBaseURL  )
- {
--    SvKeyValueIteratorRef xValues;
--    SvKeyValueIterator* pAttributes = 0;
--
-     SfxObjectShell* pObjSh = mpDoc->GetDocumentShell();
--    if( pObjSh && pObjSh->IsLoading() )
--    {
--        pAttributes = pObjSh->GetHeaderAttributes();
--    }
--    else
--    {
--        /*  When not loading, set up fake HTTP headers to force the SfxHTMLParser
--            to use UTF8 (used when pasting from clipboard) */
--        const sal_Char* pCharSet = rtl_getBestMimeCharsetFromTextEncoding( RTL_TEXTENCODING_UTF8 );
--        if( pCharSet )
--        {
--            String aContentType = String::CreateFromAscii( "text/html; charset=" );
--            aContentType.AppendAscii( pCharSet );
--
--            xValues = new SvKeyValueIterator;
--            xValues->Append( SvKeyValue( String::CreateFromAscii( OOO_STRING_SVTOOLS_HTML_META_content_type ), aContentType ) );
--            pAttributes = xValues;
--        }
--    }
--
-+    SvKeyValueIterator* pAttributes = (pObjSh && pObjSh->IsLoading()) ? pObjSh->GetHeaderAttributes() : 0;
-     Link aOldLink = pEdit->GetImportHdl();
-     pEdit->SetImportHdl( LINK( this, ScHTMLQueryParser, HTMLImportHdl ) );
-     ULONG nErr = pEdit->Read( rStrm, rBaseURL, EE_FORMAT_HTML, pAttributes );
-Index: source/filter/html/swhtml.cxx
-===================================================================
-RCS file: /cvs/sw/sw/source/filter/html/swhtml.cxx,v
-retrieving revision 1.40
-diff -u -r1.40 swhtml.cxx
---- openoffice.org.orig/sw/source/filter/html/swhtml.cxx	1 Dec 2006 15:54:00 -0000	1.40
-+++ openoffice.org/sw/source/filter/html/swhtml.cxx	24 Apr 2007 09:45:06 -0000
-@@ -491,7 +491,7 @@
- 	bOldIsHTMLMode = pDoc->get(IDocumentSettingAccess::HTML_MODE);
- 	pDoc->set(IDocumentSettingAccess::HTML_MODE, true);
- 
--    pCSS1Parser = new SwCSS1Parser( pDoc, aFontHeights, sBaseURL, IsNewDoc() );
-+	pCSS1Parser = new SwCSS1Parser( pDoc, aFontHeights, sBaseURL, IsNewDoc() );
- 	pCSS1Parser->SetIgnoreFontFamily( pHtmlOptions->IsIgnoreFontFamily() );
- 
- 	if( bReadUTF8 )
-@@ -501,10 +501,8 @@
- 	else
- 	{
- 		SwDocShell *pDocSh = pDoc->GetDocShell();
--		SvKeyValueIterator *pHeaderAttrs =
--			pDocSh->GetHeaderAttributes();
--		if( pHeaderAttrs )
--			SetEncodingByHTTPHeader( pHeaderAttrs );
-+		SvKeyValueIterator *pHeaderAttrs = (pDocSh && pDocSh->IsLoading()) ? pDocSh->GetHeaderAttributes() : 0;
-+		SetEncodingByHTTPHeader( pHeaderAttrs );
- 	}
- 	pCSS1Parser->SetDfltEncoding( gsl_getSystemTextEncoding() );
- 
-Index: source/bastyp/sfxhtml.cxx
-===================================================================
-RCS file: /cvs/framework/sfx2/source/bastyp/sfxhtml.cxx,v
-retrieving revision 1.17
-diff -u -r1.17 sfxhtml.cxx
---- openoffice.org.orig/sfx2/source/bastyp/sfxhtml.cxx	17 Sep 2006 16:25:00 -0000	1.17
-+++ openoffice.org/sfx2/source/bastyp/sfxhtml.cxx	24 Apr 2007 09:35:50 -0000
-@@ -53,10 +53,11 @@
- #include <tools/tenccvt.hxx>
- 
- #include <sfx2/sfxhtml.hxx>
-+#include <sfx2/objsh.hxx>
-+#include <sfx2/docfile.hxx>
- 
- #include <com/sun/star/beans/XPropertyContainer.hpp>
- 
--
- using namespace ::com::sun::star;
- 
- 
-@@ -381,6 +382,26 @@
- BOOL SfxHTMLParser::SetEncodingByHTTPHeader(
- 								SvKeyValueIterator *pHTTPHeader )
- {
-+	SvKeyValueIteratorRef xValues;
-+    /*  
-+	 *  When not loading, set up fake HTTP headers to force the
-+	 *  SfxHTMLParser to use UTF8 (used when pasting from clipboard) 
-+	 */
-+	SfxObjectShell* pObjSh = !pHTTPHeader ? SfxObjectShell::Current() : 0;
-+	if( pObjSh && !pObjSh->IsLoading() )
-+	{
-+		const sal_Char* pCharSet = rtl_getBestMimeCharsetFromTextEncoding( RTL_TEXTENCODING_UTF8 );
-+		if( pCharSet )
-+		{
-+			String aContentType = String::CreateFromAscii( "text/html; charset=" );
-+			aContentType.AppendAscii( pCharSet );
-+
-+			xValues = new SvKeyValueIterator;
-+			xValues->Append( SvKeyValue( String::CreateFromAscii( OOO_STRING_SVTOOLS_HTML_META_content_type ), aContentType ) );
-+			pHTTPHeader = xValues;
-+		}
-+	}
+diff -ru svtools.orig/source/svhtml/parhtml.cxx svtools/source/svhtml/parhtml.cxx
+--- svtools.orig/source/svhtml/parhtml.cxx	2010-07-14 11:11:17.000000000 +0100
++++ svtools/source/svhtml/parhtml.cxx	2010-07-14 11:16:29.000000000 +0100
+@@ -323,6 +323,9 @@
+ 		bReadComment = FALSE;
+ 	bIsInHeader = TRUE;
+ 	pOptions = new HTMLOptions;
 +
- 	BOOL bRet = FALSE;
-     rtl_TextEncoding eEnc = SfxHTMLParser::GetEncodingByHttpHeader( pHTTPHeader );
-     if(RTL_TEXTENCODING_DONTKNOW != eEnc)
-Index: source/editeng/eehtml.cxx
-===================================================================
-RCS file: /cvs/graphics/svx/source/editeng/eehtml.cxx,v
-retrieving revision 1.16
-diff -u -r1.16 eehtml.cxx
---- openoffice.org.orig/svx/source/editeng/eehtml.cxx	12 Oct 2006 12:37:40 -0000	1.16
-+++ openoffice.org/svx/source/editeng/eehtml.cxx	18 May 2007 11:00:09 -0000
-@@ -72,8 +72,7 @@
- 	nNumberingLevel = 0;
- 	bFieldsInserted = FALSE;
- 
--    if ( pHTTPHeaderAttrs )
--		SetEncodingByHTTPHeader( pHTTPHeaderAttrs );
-+	SetEncodingByHTTPHeader( pHTTPHeaderAttrs );
++	//#i76649, default to UTF-8 for HTML unless we know differently
++	SetSrcEncoding(RTL_TEXTENCODING_UTF8);
  }
  
- EditHTMLParser::~EditHTMLParser()
+ HTMLParser::~HTMLParser()


Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.2284
retrieving revision 1.2285
diff -u -p -r1.2284 -r1.2285
--- openoffice.org.spec	14 Jul 2010 09:51:02 -0000	1.2284
+++ openoffice.org.spec	14 Jul 2010 10:22:10 -0000	1.2285
@@ -1614,7 +1614,7 @@ cp -p %{SOURCE5} external/unowinreg/unow
 %patch3  -p1
 %patch4  -p0 -b .ooo68717.gstreamer.video.patch
 %patch5  -p1 -b .ooo7065.sw.titlepagedialog.patch
-#%patch6  -p1 -b .ooo76649.httpencoding.patch FIXME
+%patch6  -p0 -b .ooo76649.httpencoding.patch
 %patch7  -p1 -b .ooo86080.unopkg.bodge.patch
 %patch8  -p1 -b .ooo88341.sc.verticalboxes.patch
 %patch9  -p1 -b .oooXXXXX.fpicker.allformatsonsave.patch



More information about the scm-commits mailing list