summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2013-07-10 17:33:15 +0200
committerLuboš Luňák <l.lunak@suse.cz>2013-07-10 17:35:27 +0200
commita1190c9d2e85c4ccb9db106fe9eb4a48219ac126 (patch)
tree6302a1c48d81d1f8823bba99c5450265076f81b8 /reportdesign
parent0cf9b9ab4bec65055e88517e937d18f751818ff6 (diff)
fix reading fonts from .odp using style::font-name (fdo#65338)
b40bcde076f9fabf24810d2520e878d604d99637 made writing .odp use style:font-name and office:font-face-decls, instead of using fo:font-family . But the reading back was broken, as xFontDecls is not set in XMLTextImportPropertyMapper::handleSpecialItem(), so the font data was ignored. And xFontDecls was not set because it's set while reading office:font-face-decls, which is at the top of the xml document, but even before the xml is parsed, the call to SdXMLImport::setTargetDocument() calls GetShapeImport(), which creates XMLShapeImportHelper instance, which calls XMLTextImportHelper::CreateParaExtPropMapper(), and XMLTextImportPropertyMapper is created with rImport.GetFontDecls() still being NULL at that point. And it actually doesn't seem to make any sense to just pass around all the pointers to XMLFontStylesContext, as eventually it's always just the one from SvXMLImport. So simply dump all that and make the one single place that actually uses it (i.e. XMLTextImportPropertyMapper::handleSpecialItem()) refer directly to SvXMLImport::GetFontDecls(). Change-Id: Ib1b3e4b1bcaf87ca3e4703d1cc1563ad6b3f9ce7
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/filter/xml/xmlStyleImport.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index 4b80bcf1bbea..a79a9c2f5dea 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -213,9 +213,9 @@ UniReference < SvXMLImportPropertyMapper >
if( !m_xCellImpPropMapper.is() )
{
m_xCellImpPropMapper =
- new XMLTextImportPropertyMapper/*OSpecialHanldeXMLImportPropertyMapper*/( rImport.GetCellStylesPropertySetMapper(), m_rImport , const_cast<XMLFontStylesContext*>(m_rImport.GetFontDecls()));
+ new XMLTextImportPropertyMapper/*OSpecialHanldeXMLImportPropertyMapper*/( rImport.GetCellStylesPropertySetMapper(), m_rImport );
- m_xCellImpPropMapper->ChainImportMapper(XMLTextImportHelper::CreateParaExtPropMapper(m_rImport, const_cast<XMLFontStylesContext*>(m_rImport.GetFontDecls())));
+ m_xCellImpPropMapper->ChainImportMapper(XMLTextImportHelper::CreateParaExtPropMapper(m_rImport));
}
xMapper = m_xCellImpPropMapper;
}