diff options
Diffstat (limited to 'sw/source/core/text/EnhancedPDFExportHelper.cxx')
-rw-r--r-- | sw/source/core/text/EnhancedPDFExportHelper.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index 697e99c96299..09c13b8fb250 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -1392,14 +1392,17 @@ void SwTaggedPDFHelper::BeginInlineStructureElements() case POR_PARA : { SwTxtNode* pNd = (SwTxtNode*)pFrm->GetTxtNode(); - SwIndex aIndex( pNd, rInf.GetIdx() ); - const SwTxtAttr* pInetFmtAttr = pNd->GetTxtAttr( aIndex, RES_TXTATR_INETFMT ); + SwTxtAttr const*const pInetFmtAttr = + pNd->GetTxtAttrAt(rInf.GetIdx(), RES_TXTATR_INETFMT); String sStyleName; if ( !pInetFmtAttr ) { - const SwTxtAttr* pCharFmtAttr = pNd->GetTxtAttr( aIndex, RES_TXTATR_CHARFMT ); - const SwCharFmt* pCharFmt = pCharFmtAttr ? pCharFmtAttr->GetCharFmt().GetCharFmt() : 0; + ::std::vector<SwTxtAttr *> const charAttrs( + pNd->GetTxtAttrsAt(rInf.GetIdx(), RES_TXTATR_CHARFMT)); + // TODO: handle more than 1 char style? + const SwCharFmt* pCharFmt = (charAttrs.size()) + ? (*charAttrs.begin())->GetCharFmt().GetCharFmt() : 0; if ( pCharFmt ) SwStyleNameMapper::FillProgName( pCharFmt->GetName(), sStyleName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, sal_True ); } |