oox/source/export/vmlexport.cxx | 10 +++++++--- sw/source/filter/ww8/rtfsdrexport.cxx | 9 ++++++++- writerfilter/source/rtftok/rtfsdrimport.cxx | 5 +++-- 3 files changed, 18 insertions(+), 6 deletions(-)
New commits: commit 5da2e40292e420dc48da7ea5aef29c96a1127140 Author: Miklos Vajna <[email protected]> Date: Tue Aug 14 12:04:49 2012 +0200 RTF shape filter: handle custom segment types Change-Id: I320bab34080b401c61efbc5b3383836362f5f43f diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx index c8040e5..a377ef0 100644 --- a/sw/source/filter/ww8/rtfsdrexport.cxx +++ b/sw/source/filter/ww8/rtfsdrexport.cxx @@ -314,7 +314,14 @@ void RtfSdrExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRe case 0x8000: // end break; default: - SAL_INFO("sw.rtf", OSL_THIS_FUNC << ": unhandled segment '" << nSeg << "' in the path"); + // See EscherPropertyContainer::CreateCustomShapeProperties, by default nSeg is simply the number of points. + for (int i = 0; i < nSeg; ++i) + { + sal_Int32 nX = impl_GetPointComponent(pVerticesIt, nPointSize); + sal_Int32 nY = impl_GetPointComponent(pVerticesIt, nPointSize); + aVerticies.append(";(").append(nX).append(",").append(nY).append(")"); + ++nVertices; + } break; } } diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx index 7fe19e5..4eea20b 100644 --- a/writerfilter/source/rtftok/rtfsdrimport.cxx +++ b/writerfilter/source/rtftok/rtfsdrimport.cxx @@ -251,8 +251,9 @@ void RTFSdrImport::resolve(RTFShape& rShape) aSegments[nIndex].Command = drawing::EnhancedCustomShapeSegmentCommand::ENDSUBPATH; aSegments[nIndex].Count = sal_Int32(0); break; - default: - SAL_INFO("writerfilter", OSL_THIS_FUNC << ": unhandled segment '" << hex << nSeg << "' in the path"); + default: // given number of lineto elements + aSegments[nIndex].Command = drawing::EnhancedCustomShapeSegmentCommand::LINETO; + aSegments[nIndex].Count = nSeg; break; } nIndex++; commit 4dd8aa2630074b479b216da8ee7b50ed0bf78511 Author: Miklos Vajna <[email protected]> Date: Tue Aug 14 12:03:57 2012 +0200 fdo#53113 vml export: handle custom segment types It seems that EscherPropertyContainer::CreateCustomShapeProperties() simply sets nSeg to the number of (lineto) point pairs by default. Change-Id: I24bde088f5f2970d53de827e1ca03c5419ac892c diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx index 08aac17..e764d87 100644 --- a/oox/source/export/vmlexport.cxx +++ b/oox/source/export/vmlexport.cxx @@ -466,9 +466,13 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect aPath.append( "e" ); break; default: -#if OSL_DEBUG_LEVEL > 0 - fprintf( stderr, "TODO: unhandled segment '%x' in the path\n", nSeg ); -#endif + // See EscherPropertyContainer::CreateCustomShapeProperties, by default nSeg is simply the number of points. + for (int i = 0; i < nSeg; ++i) + { + sal_Int32 nX = impl_GetPointComponent(pVerticesIt, nPointSize); + sal_Int32 nY = impl_GetPointComponent(pVerticesIt, nPointSize); + aPath.append("l").append(nX).append(",").append(nY); + } break; } } _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
