[Libreoffice-commits] core.git: Branch 'libreoffice-4-0-1' - vcl/source

Michael Stahl mstahl at redhat.com
Tue Feb 26 02:13:52 PST 2013


 vcl/source/filter/wmf/emfwr.cxx |   15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

New commits:
commit 7c5b8e0d5c1af03270a29d6144e192d69cb06de5
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Feb 25 13:22:07 2013 +0100

    fdo#59405 fdo#60638: EMFWriter::ImplWrite: write EMF_PLUS "comments"
    
    When editing the Visio OLE object, there is a "preview" file generated,
    which is apparently an EMF file (strangely initially inserting the Visio
    object seems to result in a totally unproblematic WMF file).
    The EMF file apparently has almost its entire content stored in
    MetaCommentAction of type "EMF_PLUS", which is thrown away when writing
    the file again.
    
    Change-Id: I77a08454da673c1825aaa8421606737e7e8bc82c
    (cherry picked from commit bf8450cfa2e9e899c716fbddadd7d5485aefe520)
    Reviewed-on: https://gerrit.libreoffice.org/2396
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    (cherry picked from commit 4536979e19d6a9a913f677225a122c13a51da1fa)
    Reviewed-on: https://gerrit.libreoffice.org/2400
    Reviewed-by: Muthu Subramanian K <muthusuba at gmail.com>
    Tested-by: Muthu Subramanian K <muthusuba at gmail.com>
    Reviewed-by: Michael Meeks <michael.meeks at suse.com>
    Reviewed-by: Radek Doulík <rodo at novell.com>
    Tested-by: Radek Doulík <rodo at novell.com>

diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index c4caf02..80d4573 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -1388,12 +1388,25 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
                 break;
             }
 
+            case( META_COMMENT_ACTION ):
+            {
+                MetaCommentAction const*const pCommentAction(
+                        static_cast<MetaCommentAction const*>(pAction));
+                if (pCommentAction->GetComment() == "EMF_PLUS")
+                {
+                    ImplBeginCommentRecord(WIN_EMR_COMMENT_EMFPLUS);
+                    m_rStm.Write(pCommentAction->GetData(),
+                                 pCommentAction->GetDataSize());
+                    ImplEndCommentRecord();
+                }
+            }
+            break;
+
             case( META_MASK_ACTION ):
             case( META_MASKSCALE_ACTION ):
             case( META_MASKSCALEPART_ACTION ):
             case( META_WALLPAPER_ACTION ):
             case( META_TEXTLINE_ACTION ):
-            case( META_COMMENT_ACTION ):
             case( META_GRADIENTEX_ACTION ):
             {
                 // !!! >>> we don't want to support these actions


More information about the Libreoffice-commits mailing list