DOCX import: fix import of font size in table styles
Change-Id: I2c7ea83fb910b57d78fda620bc42b90e55de3719
This commit is contained in:
@@ -117,6 +117,7 @@ public:
|
||||
*/
|
||||
void processDeferredCharacterProperties(
|
||||
const std::map< sal_Int32, com::sun::star::uno::Any >& deferredCharacterProperties );
|
||||
void setInTableStyleRunProps(bool bInTableStyleRunProps);
|
||||
|
||||
private:
|
||||
// Stream
|
||||
|
@@ -2136,7 +2136,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
|
||||
{
|
||||
rContext->Insert( PROP_CHAR_HEIGHT_COMPLEX, true, aVal );
|
||||
}
|
||||
else
|
||||
else if (!m_pImpl->m_bInTableStyleRunProps)
|
||||
{
|
||||
//Asian get the same value as Western
|
||||
rContext->Insert( PROP_CHAR_HEIGHT, true, aVal );
|
||||
@@ -3294,6 +3294,10 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
|
||||
}
|
||||
}
|
||||
|
||||
void DomainMapper::setInTableStyleRunProps(bool bInTableStyleRunProps)
|
||||
{
|
||||
m_pImpl->m_bInTableStyleRunProps = bInTableStyleRunProps;
|
||||
}
|
||||
|
||||
void DomainMapper::processDeferredCharacterProperties( const std::map< sal_Int32, uno::Any >& deferredCharacterProperties )
|
||||
{
|
||||
|
@@ -186,7 +186,8 @@ DomainMapper_Impl::DomainMapper_Impl(
|
||||
m_bUsingEnhancedFields( false ),
|
||||
m_bSdt(false),
|
||||
m_xInsertTextRange(xInsertTextRange),
|
||||
m_bIsNewDoc(bIsNewDoc)
|
||||
m_bIsNewDoc(bIsNewDoc),
|
||||
m_bInTableStyleRunProps(false)
|
||||
{
|
||||
appendTableManager( );
|
||||
GetBodyText();
|
||||
|
@@ -670,6 +670,9 @@ public:
|
||||
|
||||
/// If we're importing into a new document, or just pasting to an existing one.
|
||||
bool IsNewDoc();
|
||||
|
||||
/// If we're inside <w:rPr>, inside <w:style w:type="table">
|
||||
bool m_bInTableStyleRunProps;
|
||||
};
|
||||
} //namespace dmapper
|
||||
} //namespace writerfilter
|
||||
|
@@ -594,7 +594,12 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
|
||||
m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pCurrentEntry->pProperties );
|
||||
|
||||
PropertyMapPtr pProps(new PropertyMap());
|
||||
bool bTableStyleRunProps = m_pImpl->m_pCurrentEntry->nStyleTypeCode == STYLE_TYPE_TABLE && nSprmId == NS_ooxml::LN_CT_Style_rPr;
|
||||
if (bTableStyleRunProps)
|
||||
m_pImpl->m_rDMapper.setInTableStyleRunProps(true);
|
||||
m_pImpl->m_rDMapper.sprmWithProps( rSprm, pProps );
|
||||
if (bTableStyleRunProps)
|
||||
m_pImpl->m_rDMapper.setInTableStyleRunProps(false);
|
||||
|
||||
m_pImpl->m_pCurrentEntry->pProperties->InsertProps(pProps);
|
||||
|
||||
|
Reference in New Issue
Block a user