sw/source/filter/html/css1atr.cxx  |   24 +++++++++++++-----------
 sw/source/filter/html/htmlfldw.cxx |   10 +++++-----
 2 files changed, 18 insertions(+), 16 deletions(-)

New commits:
commit 13fe193ae9f03c4bcc2fa22993470b8c37cc3c6d
Author: Caolán McNamara <caol...@redhat.com>
Date:   Fri Nov 23 12:46:34 2012 +0000

    Resolves: fdo#57236 crash on export to html
    
    SfxItemSet takes a sequence of (start, end) property ranges
    not a sequence of isolated properties
    
    reading 1b0f7ee1e04d7b0fe81f7458ae2116615e0f6889 it appears that the 
properties
    the new code wanted to query are included in the original ranges already
    
    Change-Id: Ifecdf23270d7f3d875d1c0cd942bab659bbabf29

diff --git a/sw/source/filter/html/css1atr.cxx 
b/sw/source/filter/html/css1atr.cxx
index e973a64..2876912 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -1356,11 +1356,16 @@ sal_Bool SwHTMLWriter::HasScriptDependentItems( const 
SfxItemSet& rItemSet,
         const SwCharFmt *pDCCharFmt = pDrop->GetCharFmt();
         if( pDCCharFmt )
         {
-            //Some items occured twice, and I have no idea why.
+            //sequence of (start, end) property ranges we want to
+            //query
             SfxItemSet aTstItemSet( *pDCCharFmt->GetAttrSet().GetPool(),
-                RES_CHRATR_FONT,        RES_CHRATR_POSTURE,     
RES_CHRATR_WEIGHT,
-                RES_CHRATR_CJK_FONT,    RES_CHRATR_CJK_POSTURE, 
RES_CHRATR_CJK_WEIGHT,
-                RES_CHRATR_CTL_FONT,    RES_CHRATR_CTL_POSTURE, 
RES_CHRATR_CTL_WEIGHT,
+                RES_CHRATR_FONT,        RES_CHRATR_FONT,
+                RES_CHRATR_POSTURE,     RES_CHRATR_POSTURE,
+                RES_CHRATR_WEIGHT,      RES_CHRATR_WEIGHT,
+                RES_CHRATR_CJK_FONT,    RES_CHRATR_CJK_FONT,
+                RES_CHRATR_CJK_POSTURE, RES_CHRATR_CJK_WEIGHT,
+                RES_CHRATR_CTL_FONT,    RES_CHRATR_CTL_FONT,
+                RES_CHRATR_CTL_POSTURE, RES_CHRATR_CTL_WEIGHT,
                 0 );
             aTstItemSet.Set( pDCCharFmt->GetAttrSet(), sal_True );
             return HasScriptDependentItems( aTstItemSet, sal_False );
@@ -1402,16 +1407,13 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, 
const String& rSelector,
                 rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, sal_False );
             }
 
+            //sequence of (start, end) property ranges we want to
+            //query
             SfxItemSet aScriptItemSet( *rItemSet.GetPool(),
                                        RES_CHRATR_FONT, RES_CHRATR_FONTSIZE,
                                        RES_CHRATR_LANGUAGE, RES_CHRATR_POSTURE,
-                                       RES_CHRATR_WEIGHT,
-                                       RES_CHRATR_CJK_FONT, 
RES_CHRATR_CJK_FONTSIZE,
-                                       RES_CHRATR_CJK_LANGUAGE, 
RES_CHRATR_CJK_POSTURE,
-                                       RES_CHRATR_CJK_WEIGHT,
-                                       RES_CHRATR_CTL_FONT, 
RES_CHRATR_CTL_FONTSIZE,
-                                       RES_CHRATR_CTL_LANGUAGE, 
RES_CHRATR_CTL_POSTURE,
-                                       RES_CHRATR_CTL_WEIGHT,
+                                       RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT,
+                                       RES_CHRATR_CJK_FONT, 
RES_CHRATR_CTL_WEIGHT,
                                        0 );
             aScriptItemSet.Put( rItemSet );
 
diff --git a/sw/source/filter/html/htmlfldw.cxx 
b/sw/source/filter/html/htmlfldw.cxx
index 36e5b42..48fccdc 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -333,13 +333,13 @@ static Writer& OutHTML_SwField( Writer& rWrt, const 
SwField* pFld,
 
     if( bNeedsCJKProcessing )
     {
+        //sequence of (start, end) property ranges we want to
+        //query
         SfxItemSet aScriptItemSet( rWrt.pDoc->GetAttrPool(),
                                    RES_CHRATR_FONT, RES_CHRATR_FONTSIZE,
-                                   RES_CHRATR_POSTURE, RES_CHRATR_WEIGHT,
-                                   RES_CHRATR_CJK_FONT, 
RES_CHRATR_CJK_FONTSIZE,
-                                   RES_CHRATR_CJK_POSTURE, 
RES_CHRATR_CJK_WEIGHT,
-                                   RES_CHRATR_CTL_FONT, 
RES_CHRATR_CTL_FONTSIZE,
-                                   RES_CHRATR_CTL_POSTURE, 
RES_CHRATR_CTL_WEIGHT,
+                                   RES_CHRATR_POSTURE, RES_CHRATR_POSTURE,
+                                   RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT,
+                                   RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_WEIGHT,
                                    0 );
         rTxtNd.GetAttr( aScriptItemSet, nFldPos, nFldPos+1 );
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to