diff options
author | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2011-07-08 14:49:14 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2011-07-11 11:46:25 +0100 |
commit | 1ad6f20a1f646e0d400d34bfd1e7527dcd2d17cb (patch) | |
tree | bd5da67f70b3a2c0b49342bd258283e6e384549a | |
parent | 4489d43e884b6e6cbc40c9b34989a4698c5143e3 (diff) |
n#695479: basic handling of lines in RTF import
Signed-off-by: Michael Meeks <michael.meeks@novell.com>
-rw-r--r-- | sw/source/filter/rtf/swparrtf.cxx | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index 56df822e16dd..81ab404cd353 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -1173,7 +1173,7 @@ void SwRTFParser::ReadShpTxt(String& s) } /* - * Very basic support for the "Buchhalternase". + * Very basic support for the Z-line. */ void SwRTFParser::ReadDrawingObject() { @@ -1185,6 +1185,9 @@ void SwRTFParser::ReadDrawingObject() ::basegfx::B2DPoint aPoint; bool bPolygonActive(false); + SwFmtHoriOrient aHori( 0, text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME ); + SwFmtVertOrient aVert( 0, text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME ); + while (level>0 && IsParserWorking()) { nToken = GetNextToken(); @@ -1196,6 +1199,12 @@ void SwRTFParser::ReadDrawingObject() case '{': level++; break; + case RTF_DOBXMARGIN: + aHori.SetRelationOrient( text::RelOrientation::PAGE_PRINT_AREA ); + break; + case RTF_DOBYMARGIN: + aVert.SetRelationOrient( text::RelOrientation::PAGE_PRINT_AREA ); + break; case RTF_DPX: aRect.setX(nTokenValue); break; @@ -1208,6 +1217,7 @@ void SwRTFParser::ReadDrawingObject() case RTF_DPYSIZE: aRect.setHeight(nTokenValue); break; + case RTF_DPLINE: case RTF_DPPOLYCOUNT: bPolygonActive = true; break; @@ -1244,9 +1254,7 @@ void SwRTFParser::ReadDrawingObject() aAnchor.SetAnchor( pPam->GetPoint() ); aFlySet.Put( aAnchor ); - SwFmtHoriOrient aHori( 0, text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME ); aFlySet.Put( aHori ); - SwFmtVertOrient aVert( 0, text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME ); aFlySet.Put( aVert ); pDoc->GetOrCreateDrawModel(); |