diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-04-10 13:07:54 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-04-10 13:13:06 +0200 |
commit | 92e74798a753b5eb595a5964cc8efe70e3a6e56b (patch) | |
tree | 7f626ad16ed88b4067a58a25f9990596f161692c | |
parent | 9a8306a18998b42b387eb83128c82abbcfdd87a3 (diff) |
RTF import of new-style frames: fix txflTextFlow shape property
Change-Id: If6febeaea00b384ea36d470264c04dfb4c7afd24
-rw-r--r-- | writerfilter/source/rtftok/rtfsdrimport.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx index f8560996532e..15f54f4690d2 100644 --- a/writerfilter/source/rtftok/rtfsdrimport.cxx +++ b/writerfilter/source/rtftok/rtfsdrimport.cxx @@ -136,6 +136,7 @@ void RTFSdrImport::resolve(RTFShape& rShape) uno::Any aLineColor = uno::makeAny(COL_BLACK); // Default line width is 0.75 pt (26 mm100) in Word, 0 in Writer. uno::Any aLineWidth = uno::makeAny(sal_Int32(26)); + text::WritingMode eWritingMode = text::WritingMode_LR_TB; for (std::vector< std::pair<OUString, OUString> >::iterator i = rShape.aProperties.begin(); i != rShape.aProperties.end(); ++i) @@ -206,10 +207,7 @@ void RTFSdrImport::resolve(RTFShape& rShape) else if (i->first == "txflTextFlow" && xPropertySet.is()) { if (i->second.toInt32() == 1) - { - aAny <<= text::WritingMode_TB_RL; - xPropertySet->setPropertyValue("TextWritingMode", aAny); - } + eWritingMode = text::WritingMode_TB_RL; } else if (i->first == "fLine" && xPropertySet.is()) resolveFLine(xPropertySet, i->second.toInt32()); @@ -373,6 +371,11 @@ void RTFSdrImport::resolve(RTFShape& rShape) xPropertySet->setPropertyValue("LineWidth", aLineWidth); if (rShape.oZ) resolveDhgt(xPropertySet, *rShape.oZ); + if (bTextFrame) + // Writer textframes implement text::WritingMode2, which is a different data type. + xPropertySet->setPropertyValue("WritingMode", uno::makeAny(sal_Int16(eWritingMode))); + else + xPropertySet->setPropertyValue("TextWritingMode", uno::makeAny(eWritingMode)); } if (nType == ESCHER_ShpInst_PictureFrame) // picture frame |