RTF import patches [Fwd: patche - rtf importni filtr, dalsi info]

Miklos Vajna vmiklos at suse.cz
Mon Jul 2 01:02:25 PDT 2012


Hi Pavel,

Pushed all without modifications, except this one:

> Subject: [PATCH 2/5] implement RTF_DPELLIPSE
> 
> Change-Id: Icb531e05f84c8ce7e79a15113102113be3609f45
> ---
>  writerfilter/source/rtftok/rtfdocumentimpl.cxx |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
> index 2b5606f..bb88c3c 100644
> --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
> +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
> @@ -2080,6 +2080,7 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
>  
>          case RTF_DPLINE:
>          case RTF_DPRECT:
> +        case RTF_DPELLIPSE:
>                  {
>                      sal_Int32 nType = 0;
>                      switch (nKeyword)
> @@ -2090,6 +2091,9 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
>                          case RTF_DPRECT:
>                              nType = ESCHER_ShpInst_Rectangle;
>                              break;
> +                        case RTF_DPELLIPSE:
> +                            m_aStates.top().aDrawingObject.xShape.set(getModelFactory()->createInstance("com.sun.star.drawing.EllipseShape"), uno::UNO_QUERY);
> +                            break;

I tweaked this a bit, we already have a ESCHER_ShpInst_Ellipse, which is
much easier to use and less error-prone (you get a build error when you
mistype it ;-) ).

And thanks for the test doc! It's funny that the ellipse case is
something even Word doesn't import here. :-)

Anything that still bothers you in the RTF filter? There are quite some
bugs here:

https://bugs.freedesktop.org/buglist.cgi?short_desc=RTF&query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&short_desc_type=allwordssubstr&product=LibreOffice

If shape import sounds interesting,
https://bugs.freedesktop.org/show_bug.cgi?id=41109 may be something to
hack on if you want? :-)

Thanks again and keep up the good work!

Miklos


More information about the LibreOffice mailing list