Kaydet (Commit) 34138417 authored tarafından Luboš Luňák's avatar Luboš Luňák

probably a rather ugly hack for inline text frame in a table (bnc#780851)

Change-Id: I2bd76799cf0a5da09664d0e1b1a9adb466633be1
üst ecb252af
......@@ -1273,8 +1273,22 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
case NS_ooxml::LN_Value_wordprocessingml_ST_YAlign_center :nIntValue = text::VertOrientation::CENTER;break;
case NS_ooxml::LN_Value_wordprocessingml_ST_YAlign_bottom :
case NS_ooxml::LN_Value_wordprocessingml_ST_YAlign_outside :nIntValue = text::VertOrientation::BOTTOM;break;
case NS_ooxml::LN_Value_wordprocessingml_ST_YAlign_inline ://todo: what to do with inline - no avail. in WW97 and WW2007
//no break;
case NS_ooxml::LN_Value_wordprocessingml_ST_YAlign_inline :
{
// HACK: This is for bnc#780851, where a table has one cell that has w:framePr,
// which causes that paragraph to be converted to a text frame, and the original
// paragraph object no longer exists, which makes table creation fail and futhermore
// it would be missing in the table layout anyway. So actually no letting that paragraph
// be a text frame "fixes" it. I'm not sure what "inline" is supposed to mean in practice
// anyway, so as long as this doesn't cause trouble elsewhere ...
PropertyMapPtr pContext = m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH);
if( pContext.get() )
{
ParagraphPropertyMap* pParaContext = dynamic_cast< ParagraphPropertyMap* >( pContext.get() );
pParaContext->SetFrameMode(false);
}
nIntValue = text::VertOrientation::NONE;
}
default:nIntValue = text::VertOrientation::NONE;
}
pParaProperties->SetyAlign( nIntValue );
......
......@@ -305,7 +305,7 @@ public:
int operator==(const ParagraphProperties&); //does not compare the starting/ending range, m_sParaStyleName and m_nDropCapLength
void SetFrameMode() { m_bFrameMode = true; }
void SetFrameMode( bool set = true ) { m_bFrameMode = set; }
bool IsFrameMode()const { return m_bFrameMode; }
void SetDropCap( sal_Int32 nSet ) { m_nDropCap = nSet; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment