summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-11-23 12:46:34 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-11-23 12:59:07 +0000
commit13fe193ae9f03c4bcc2fa22993470b8c37cc3c6d (patch)
tree0f70c5a6f1117a66f313d6808634dc0c1f45e62e /sw
parent10ffbbd269ae14677e7fced9da0268146faae919 (diff)
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
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/html/css1atr.cxx24
-rw-r--r--sw/source/filter/html/htmlfldw.cxx10
2 files changed, 18 insertions, 16 deletions
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index e973a647c461..2876912036dc 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 36e5b4215200..48fccdc732dd 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 );