summaryrefslogtreecommitdiff
path: root/writerfilter/source/rtftok/rtfdocumentimpl.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-12-08 14:04:16 +0100
committerMiklos Vajna <vmiklos@suse.cz>2012-12-08 14:25:15 +0100
commit257a4090af068085143d71d60e6032ba0b998804 (patch)
tree5680a0495fd4ab3e3fa626af9c8a6dc1a51e2833 /writerfilter/source/rtftok/rtfdocumentimpl.cxx
parent0144c952282a4555b7ab0cfcf9d35bf753e5d8cb (diff)
fdo#49934 fix RTF import of column break in case no columns are defined
It turns out on that case the column break should be parsed as a page break. Change-Id: I5dddc8f334fab35bc2ff03fd8127989ab6a601f3
Diffstat (limited to 'writerfilter/source/rtftok/rtfdocumentimpl.cxx')
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx21
1 files changed, 17 insertions, 4 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index ef3be2ba89f4..da26efdd983c 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1760,10 +1760,23 @@ int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
break;
case RTF_COLUMN:
{
- sal_uInt8 sBreak[] = { 0xe };
- Mapper().startCharacterGroup();
- Mapper().text(sBreak, 1);
- Mapper().endCharacterGroup();
+ bool bColumns = false; // If we have multiple columns
+ RTFValue::Pointer_t pCols = m_aStates.top().aSectionSprms.find(NS_ooxml::LN_EG_SectPrContents_cols);
+ if (pCols.get())
+ {
+ RTFValue::Pointer_t pNum = pCols->getAttributes().find(NS_ooxml::LN_CT_Columns_num);
+ if (pNum.get() && pNum->getInt() > 1)
+ bColumns = true;
+ }
+ if (bColumns)
+ {
+ sal_uInt8 sBreak[] = { 0xe };
+ Mapper().startCharacterGroup();
+ Mapper().text(sBreak, 1);
+ Mapper().endCharacterGroup();
+ }
+ else
+ dispatchSymbol(RTF_PAGE);
}
break;
case RTF_CHFTN: