[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - 12 commits - cppcanvas/source external/graphite framework/source lotuswordpro/qa lotuswordpro/source sc/qa svx/source sw/source test/source vcl/qa vcl/source

Tomáš Chvátal tchvatal at suse.com
Thu Mar 10 18:33:45 UTC 2016


 cppcanvas/source/mtfrenderer/transparencygroupaction.cxx |   10 ++
 external/graphite/graphite2.win64.patch.1                |   24 ++---
 framework/source/uielement/addonstoolbarmanager.cxx      |    5 +
 lotuswordpro/qa/cppunit/data/pass/loop-1.lwp             |binary
 lotuswordpro/source/filter/lwpframelayout.cxx            |    3 
 sc/qa/unit/copy_paste_test.cxx                           |    4 
 sc/qa/unit/data/xls/chartx2.xls                          |binary
 svx/source/unodraw/UnoGraphicExporter.cxx                |    4 
 sw/source/uibase/shells/grfsh.cxx                        |    2 
 test/source/mtfxmldump.cxx                               |   28 +++++-
 vcl/qa/cppunit/wmf/data/line_styles.emf                  |binary
 vcl/qa/cppunit/wmf/wmfimporttest.cxx                     |   62 +++++++++++++
 vcl/source/filter/wmf/enhwmf.cxx                         |   68 ++++++++++++---
 vcl/source/filter/wmf/winmtf.hxx                         |    9 +
 vcl/source/outdev/polygon.cxx                            |    2 
 15 files changed, 188 insertions(+), 33 deletions(-)

New commits:
commit 8b9a3ddaff776475f331462e3b79d9d1892bd1e7
Author: Tomáš Chvátal <tchvatal at suse.com>
Date:   Tue Dec 22 15:41:25 2015 +0100

    Refresh graphite2.win64.patch.1 to apply using sle11 patch binary.
    
    Reviewed-on: https://gerrit.libreoffice.org/20882
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit 817192b3f55be0b0a4a6e877a3c1ab95d3a4b4cb)
    Reviewed-on: https://gerrit.libreoffice.org/22845
    Tested-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
    (cherry picked from commit 7530abcfa82393e22b21a0d54ce796caaecdc915)
    
    Change-Id: If43ca99631fab5a3a04e7dead9b694cf52944666

diff --git a/external/graphite/graphite2.win64.patch.1 b/external/graphite/graphite2.win64.patch.1
index a766b54..997ed3b 100644
--- a/external/graphite/graphite2.win64.patch.1
+++ b/external/graphite/graphite2.win64.patch.1
@@ -1,6 +1,6 @@
-diff -ur graphite.org/src/inc/json.h graphite/src/inc/json.h
---- graphite.org/src/inc/json.h	2016-02-24 11:22:12.001153846 +0100
-+++ graphite/src/inc/json.h	2016-02-24 11:24:18.981152383 +0100
+diff -urN graphite2-1.3.4.orig/src/inc/json.h graphite2-1.3.4/src/inc/json.h
+--- graphite2-1.3.4.orig/src/inc/json.h	2015-12-22 14:25:46.403566441 +0100
++++ graphite2-1.3.4/src/inc/json.h	2015-12-22 14:26:13.439722846 +0100
 @@ -85,6 +85,9 @@
      json & operator << (string) throw();
      json & operator << (number) throw();
@@ -11,9 +11,9 @@ diff -ur graphite.org/src/inc/json.h graphite/src/inc/json.h
      json & operator << (long unsigned int d) throw();
      json & operator << (boolean) throw();
      json & operator << (_null_t) throw();
-diff -ur graphite.org/src/inc/Main.h graphite/src/inc/Main.h
---- graphite.org/src/inc/Main.h	2016-02-24 11:22:12.001153846 +0100
-+++ graphite/src/inc/Main.h	2016-02-24 11:24:18.981152383 +0100
+diff -urN graphite2-1.3.4.orig/src/inc/Main.h graphite2-1.3.4/src/inc/Main.h
+--- graphite2-1.3.4.orig/src/inc/Main.h	2015-12-22 14:25:46.399566417 +0100
++++ graphite2-1.3.4/src/inc/Main.h	2015-12-22 14:26:13.439722846 +0100
 @@ -25,6 +25,9 @@
  of the License or (at your option) any later version.
  */
@@ -24,9 +24,9 @@ diff -ur graphite.org/src/inc/Main.h graphite/src/inc/Main.h
  
  #include <cstdlib>
  #include "graphite2/Types.h"
-diff -ur graphite.org/src/json.cpp graphite/src/json.cpp
---- graphite.org/src/json.cpp	2016-02-24 11:22:12.001153846 +0100
-+++ graphite/src/json.cpp	2016-02-24 11:24:18.981152383 +0100
+diff -urN graphite2-1.3.4.orig/src/json.cpp graphite2-1.3.4/src/json.cpp
+--- graphite2-1.3.4.orig/src/json.cpp	2015-12-22 14:25:46.399566417 +0100
++++ graphite2-1.3.4/src/json.cpp	2015-12-22 14:26:13.439722846 +0100
 @@ -133,6 +133,9 @@
  }
  json & json::operator << (json::integer d) throw()  { context(seq); fprintf(_stream, "%ld", d); return *this; }
@@ -37,9 +37,9 @@ diff -ur graphite.org/src/json.cpp graphite/src/json.cpp
  json & json::operator << (json::boolean b) throw()  { context(seq); fputs(b ? "true" : "false", _stream); return *this; }
  json & json::operator << (json::_null_t) throw()    { context(seq); fputs("null",_stream); return *this; }
  
-diff -ur graphite.org/src/Pass.cpp graphite/src/Pass.cpp
---- graphite.org/src/Pass.cpp	2016-02-24 11:22:12.001153846 +0100
-+++ graphite/src/Pass.cpp	2016-02-24 11:24:18.981152383 +0100
+diff -urN graphite2-1.3.4.orig/src/Pass.cpp graphite2-1.3.4/src/Pass.cpp
+--- graphite.org/src/Pass.cpp	2015-02-03 14:49:24.413102200 +0100
++++ graphite/src/Pass.cpp	2015-02-03 14:50:37.873303900 +0100
 @@ -554,7 +554,7 @@
          if (r->rule->preContext > fsm.slots.context())
              continue;
commit 50ec0881a0bf2fb70e7bea5344d08962c6e2e0bd
Author: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
Date:   Mon Mar 7 14:43:09 2016 -0600

    Revert "gtktiledviewer needs gtk3 not gtk2"
    
    This reverts commit 9d7e6cd14f82ae8bdb39901ac73999f6c9224307.
    
    (cherry picked from commit 6c5c81dad60d603dbbbf001cd32772602e7bbe2c)

diff --git a/Repository.mk b/Repository.mk
index 080c644..297098c 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -67,13 +67,13 @@ $(eval $(call gb_Helper_register_executables,NONE, \
         svptest \
         svpclient \
         pixelctl ) \
-	$(if $(and $(ENABLE_GTK3), $(filter LINUX,$(OS))), tilebench) \
+	$(if $(and $(ENABLE_GTK), $(filter LINUX,$(OS))), tilebench) \
 	$(if $(filter LINUX MACOSX WNT,$(OS)),icontest \
 	    outdevgrind) \
 	vcldemo \
 	tiledrendering \
     mtfdemo \
-	$(if $(and $(ENABLE_GTK3), $(filter LINUX,$(OS))), gtktiledviewer) \
+	$(if $(and $(ENABLE_GTK), $(filter LINUX,$(OS))), gtktiledviewer) \
 ))
 
 $(eval $(call gb_Helper_register_executables_for_install,SDK,sdk, \
commit ddef09f47afdf3dcc96fd5832ecd12dc8b109930
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 7 13:19:55 2016 +0000

    gtktiledviewer needs gtk3 not gtk2
    
    (cherry picked from commit e451b03e8c21ad23cb1abfd6dd68b6d1e8188121)
    
    Change-Id: Iede2008139cb570ff65202762e92f6694548a065
    Reviewed-on: https://gerrit.libreoffice.org/22983
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    Tested-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    (cherry picked from commit 9d7e6cd14f82ae8bdb39901ac73999f6c9224307)

diff --git a/Repository.mk b/Repository.mk
index 297098c..080c644 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -67,13 +67,13 @@ $(eval $(call gb_Helper_register_executables,NONE, \
         svptest \
         svpclient \
         pixelctl ) \
-	$(if $(and $(ENABLE_GTK), $(filter LINUX,$(OS))), tilebench) \
+	$(if $(and $(ENABLE_GTK3), $(filter LINUX,$(OS))), tilebench) \
 	$(if $(filter LINUX MACOSX WNT,$(OS)),icontest \
 	    outdevgrind) \
 	vcldemo \
 	tiledrendering \
     mtfdemo \
-	$(if $(and $(ENABLE_GTK), $(filter LINUX,$(OS))), gtktiledviewer) \
+	$(if $(and $(ENABLE_GTK3), $(filter LINUX,$(OS))), gtktiledviewer) \
 ))
 
 $(eval $(call gb_Helper_register_executables_for_install,SDK,sdk, \
commit ea31ef72faf89ee49cef4ab9d9b7b386913f5109
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Mar 4 16:45:29 2016 +0000

    Resolves: tdf#98399 RET_USER_CANCEL is non-zero and returned on cancel
    
    Change-Id: Id4231454dfb34cac6ee89d63beb18a83c63a44c1
    (cherry picked from commit cd9a5cf4312a2dc0c1ecbf682c67ca08862cdde0)
    Reviewed-on: https://gerrit.libreoffice.org/22913
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit 40e7a2253a72ee490f97a604bcc94d12d0b84fc8)

diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index 39e18fd..abaa41e 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -354,7 +354,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
             if (nSlot == FN_DRAW_WRAP_DLG)
                 pDlg->SetCurPageId("wrap");
 
-            if( pDlg->Execute() )
+            if (pDlg->Execute() == RET_OK)
             {
                 rSh.StartAllAction();
                 rSh.StartUndo(UNDO_START);
commit 2cc2e1c56b2e51bb54c7e3922824cf096323b656
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 7 09:25:54 2016 +0000

    lwp: fix infinite recurse
    
    Change-Id: Ibd17c0f68a9bac92e591fd2c998de45a84b372aa
    (cherry picked from commit 0c9c5911b6df0226ef5c8d5465fd02a2bb581eb6)
    Reviewed-on: https://gerrit.libreoffice.org/22976
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit 9a618946ececbfb975c6a069b4db407646afb853)

diff --git a/lotuswordpro/qa/cppunit/data/pass/loop-1.lwp b/lotuswordpro/qa/cppunit/data/pass/loop-1.lwp
new file mode 100644
index 0000000..d610a3e
Binary files /dev/null and b/lotuswordpro/qa/cppunit/data/pass/loop-1.lwp differ
diff --git a/lotuswordpro/source/filter/lwpframelayout.cxx b/lotuswordpro/source/filter/lwpframelayout.cxx
index 19944f7..5599e85 100644
--- a/lotuswordpro/source/filter/lwpframelayout.cxx
+++ b/lotuswordpro/source/filter/lwpframelayout.cxx
@@ -1105,7 +1105,8 @@ void LwpGroupLayout::XFConvertFrame(XFContentContainer* pCont, sal_Int32 nStart
 
         //add child frame into group
         LwpVirtualLayout* pLayout = dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get());
-        while(pLayout)
+
+        while (pLayout && pLayout != this)
         {
             pLayout->XFConvert(pXFFrame);
             pLayout = dynamic_cast<LwpVirtualLayout*>(pLayout->GetNext().obj().get());
commit f8921264481a2ec6974c5e254727dafceb967f74
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Mar 6 16:38:37 2016 +0100

    don't use same file in two tests
    
    Change-Id: I853e5390cf5c3f6fe8ac8e00a876ed021c35a766
    Reviewed-on: https://gerrit.libreoffice.org/22954
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Reviewed-on: https://gerrit.libreoffice.org/22960
    Reviewed-by: Chris Sherlock <chris.sherlock79 at gmail.com>
    (cherry picked from commit a202c48c6ceeb45ce1cdaaba02ff76eaa3077c68)

diff --git a/sc/qa/unit/copy_paste_test.cxx b/sc/qa/unit/copy_paste_test.cxx
index 73259e6..70a5b8f 100644
--- a/sc/qa/unit/copy_paste_test.cxx
+++ b/sc/qa/unit/copy_paste_test.cxx
@@ -53,8 +53,8 @@ void ScCopyPasteTest::testCopyPasteXLS()
     CPPUNIT_ASSERT( xTargetFrame.is() );
 
     // 1. Open the document
-    ScDocShellRef xDocSh = loadDoc("chartx.", XLS);
-    CPPUNIT_ASSERT_MESSAGE("Failed to load chartx.xls.", xDocSh.Is());
+    ScDocShellRef xDocSh = loadDoc("chartx2.", XLS);
+    CPPUNIT_ASSERT_MESSAGE("Failed to load chartx2.xls.", xDocSh.Is());
 
     uno::Reference< frame::XModel2 > xModel2 ( xDocSh->GetModel(), UNO_QUERY );
     CPPUNIT_ASSERT( xModel2.is() );
diff --git a/sc/qa/unit/data/xls/chartx2.xls b/sc/qa/unit/data/xls/chartx2.xls
new file mode 100644
index 0000000..2294c15
Binary files /dev/null and b/sc/qa/unit/data/xls/chartx2.xls differ
commit 52865f5e0e63814ad47dc377b807e17e7cd997ee
Author: Stephan van den Akker <stephanv778 at gmail.com>
Date:   Wed Mar 2 00:17:03 2016 +0100

    Fix the import of line joins and caps from EMF files
    
    Backported fix to 5.0. Note that commit 42f771d6e changed from constant
    values for line joins to an enum, but that only got into the 5.1 branch
    so have had to use the old constants.
    
    Change-Id: I976336d35366b661e402db484820b4dd9a7b0228
    Reviewed-on: https://gerrit.libreoffice.org/22821
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
    Tested-by: Tomaž Vajngerl <quikee at gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/22947
    Reviewed-by: Chris Sherlock <chris.sherlock79 at gmail.com>
    Tested-by: Chris Sherlock <chris.sherlock79 at gmail.com>
    (cherry picked from commit 4a17335d608c2954c482734ce4912100cb0e7aff)

diff --git a/test/source/mtfxmldump.cxx b/test/source/mtfxmldump.cxx
index 3df33b9..9ca0603 100644
--- a/test/source/mtfxmldump.cxx
+++ b/test/source/mtfxmldump.cxx
@@ -124,6 +124,29 @@ OUString convertLineStyleToString(LineStyle eAlign)
     return OUString();
 }
 
+OUString convertLineJoinToString(basegfx::B2DLineJoin eJoin)
+{
+    switch (eJoin)
+    {
+        default:
+        case basegfx::B2DLINEJOIN_NONE:    return OUString("none");
+        case basegfx::B2DLINEJOIN_BEVEL:   return OUString("bevel");
+        case basegfx::B2DLINEJOIN_MITER:   return OUString("miter");
+        case basegfx::B2DLINEJOIN_ROUND:   return OUString("round");
+    }
+}
+
+OUString convertLineCapToString(css::drawing::LineCap eCap)
+{
+    switch (eCap)
+    {
+        default:
+        case css::drawing::LineCap_BUTT:   return OUString("butt");
+        case css::drawing::LineCap_ROUND:  return OUString("round");
+        case css::drawing::LineCap_SQUARE: return OUString("square");
+    }
+}
+
 OUString convertFontWeigthToString(FontWeight eFontWeight)
 {
     enum FontWeight { WEIGHT_DONTKNOW, WEIGHT_THIN, WEIGHT_ULTRALIGHT,
@@ -282,9 +305,12 @@ void MetafileXmlDump::writeXml(const GDIMetaFile& rMetaFile, XmlWriter& rWriter)
                 rWriter.attribute("style", convertLineStyleToString(aLineInfo.GetStyle()));
                 rWriter.attribute("width", aLineInfo.GetWidth());
                 rWriter.attribute("dashlen", aLineInfo.GetDashLen());
+                rWriter.attribute("dashcount", aLineInfo.GetDashCount());
                 rWriter.attribute("dotlen", aLineInfo.GetDotLen());
+                rWriter.attribute("dotcount", aLineInfo.GetDotCount());
                 rWriter.attribute("distance", aLineInfo.GetDistance());
-
+                rWriter.attribute("join", convertLineJoinToString(aLineInfo.GetLineJoin()));
+                rWriter.attribute("cap", convertLineCapToString(aLineInfo.GetLineCap()));
                 rWriter.endElement();
             }
             break;
diff --git a/vcl/qa/cppunit/wmf/wmfimporttest.cxx b/vcl/qa/cppunit/wmf/wmfimporttest.cxx
index 2a1a341..32c4d90 100644
--- a/vcl/qa/cppunit/wmf/wmfimporttest.cxx
+++ b/vcl/qa/cppunit/wmf/wmfimporttest.cxx
@@ -147,23 +147,39 @@ void WmfTest::testEmfLineStyles()
 
     assertXPath(pDoc, "/metafile/line[1]", "style", "dash");
     assertXPath(pDoc, "/metafile/line[1]", "dashlen", "225");
+    assertXPath(pDoc, "/metafile/line[1]", "dashcount", "1");
     assertXPath(pDoc, "/metafile/line[1]", "dotlen", "0");
+    assertXPath(pDoc, "/metafile/line[1]", "dotcount", "0");
     assertXPath(pDoc, "/metafile/line[1]", "distance", "100");
+    assertXPath(pDoc, "/metafile/line[1]", "join", "miter");
+    assertXPath(pDoc, "/metafile/line[1]", "cap", "butt");
 
     assertXPath(pDoc, "/metafile/line[2]", "style", "dash");
     assertXPath(pDoc, "/metafile/line[2]", "dashlen", "0");
+    assertXPath(pDoc, "/metafile/line[2]", "dashcount", "0");
     assertXPath(pDoc, "/metafile/line[2]", "dotlen", "30");
+    assertXPath(pDoc, "/metafile/line[2]", "dotcount", "1");
     assertXPath(pDoc, "/metafile/line[2]", "distance", "50");
+    assertXPath(pDoc, "/metafile/line[2]", "join", "miter");
+    assertXPath(pDoc, "/metafile/line[2]", "cap", "butt");
 
     assertXPath(pDoc, "/metafile/line[3]", "style", "dash");
     assertXPath(pDoc, "/metafile/line[3]", "dashlen", "150");
+    assertXPath(pDoc, "/metafile/line[3]", "dashcount", "1");
     assertXPath(pDoc, "/metafile/line[3]", "dotlen", "30");
+    assertXPath(pDoc, "/metafile/line[3]", "dotcount", "1");
     assertXPath(pDoc, "/metafile/line[3]", "distance", "90");
+    assertXPath(pDoc, "/metafile/line[3]", "join", "miter");
+    assertXPath(pDoc, "/metafile/line[3]", "cap", "butt");
 
     assertXPath(pDoc, "/metafile/line[4]", "style", "dash");
     assertXPath(pDoc, "/metafile/line[4]", "dashlen", "150");
+    assertXPath(pDoc, "/metafile/line[4]", "dashcount", "1");
     assertXPath(pDoc, "/metafile/line[4]", "dotlen", "30");
+    assertXPath(pDoc, "/metafile/line[4]", "dotcount", "2");
     assertXPath(pDoc, "/metafile/line[4]", "distance", "50");
+    assertXPath(pDoc, "/metafile/line[4]", "join", "miter");
+    assertXPath(pDoc, "/metafile/line[4]", "cap", "butt");
 };
 
 void WmfTest::testWorldTransformFontSize()
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 470e1b2..5b1099d 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -943,7 +943,7 @@ bool EnhWMFReader::ReadEnhWMF()
                             default :
                                 aLineInfo.SetStyle( LINE_SOLID );
                         }
-                        switch( nStyle & 0xF00 )
+                        switch( nStyle & PS_ENDCAP_STYLE_MASK )
                         {
                             case PS_ENDCAP_ROUND :
                                 if ( aSize.Width() )
@@ -961,7 +961,7 @@ bool EnhWMFReader::ReadEnhWMF()
                             default :
                                 aLineInfo.SetLineCap( com::sun::star::drawing::LineCap_BUTT );
                         }
-                        switch( nStyle & 0xF000 )
+                        switch( nStyle & PS_JOIN_STYLE_MASK )
                         {
                             case PS_JOIN_ROUND :
                                 aLineInfo.SetLineJoin ( basegfx::B2DLINEJOIN_ROUND );
@@ -1041,6 +1041,38 @@ bool EnhWMFReader::ReadEnhWMF()
                             default :
                                 aLineInfo.SetStyle( LINE_SOLID );
                         }
+                        switch( nStyle & PS_ENDCAP_STYLE_MASK )
+                        {
+                            case PS_ENDCAP_ROUND :
+                                if ( aLineInfo.GetWidth() )
+                                {
+                                    aLineInfo.SetLineCap( css::drawing::LineCap_ROUND );
+                                    break;
+                                }
+                            case PS_ENDCAP_SQUARE :
+                                if ( aLineInfo.GetWidth() )
+                                {
+                                    aLineInfo.SetLineCap( css::drawing::LineCap_SQUARE );
+                                    break;
+                                }
+                            case PS_ENDCAP_FLAT :
+                            default :
+                                aLineInfo.SetLineCap( css::drawing::LineCap_BUTT );
+                        }
+                        switch( nStyle & PS_JOIN_STYLE_MASK )
+                        {
+                            case PS_JOIN_ROUND :
+                                aLineInfo.SetLineJoin ( basegfx::B2DLINEJOIN_ROUND );
+                            break;
+                            case PS_JOIN_MITER :
+                                aLineInfo.SetLineJoin ( basegfx::B2DLINEJOIN_MITER );
+                            break;
+                            case PS_JOIN_BEVEL :
+                                aLineInfo.SetLineJoin ( basegfx::B2DLINEJOIN_BEVEL );
+                            break;
+                            default :
+                                aLineInfo.SetLineJoin ( basegfx::B2DLINEJOIN_NONE );
+                        }
                         pOut->CreateObject( nIndex, GDI_PEN, new WinMtfLineStyle( aColorRef, aLineInfo, bTransparent ) );
                     }
                 }
diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx
index dd35561..fcc06a9 100644
--- a/vcl/source/filter/wmf/winmtf.hxx
+++ b/vcl/source/filter/wmf/winmtf.hxx
@@ -148,14 +148,15 @@ struct WMF_EXTERNALHEADER;
 #define PS_INSIDEFRAME          6
 #define PS_STYLE_MASK           15
 
-#define PS_ENDCAP_ROUND     0x000
-#define PS_ENDCAP_SQUARE    0x100
-#define PS_ENDCAP_FLAT      0x200
+#define PS_ENDCAP_ROUND      0x000
+#define PS_ENDCAP_SQUARE     0x100
+#define PS_ENDCAP_FLAT       0x200
+#define PS_ENDCAP_STYLE_MASK 0xF00
 
 #define PS_JOIN_ROUND       0x0000
 #define PS_JOIN_BEVEL       0x1000
 #define PS_JOIN_MITER       0x2000
-
+#define PS_JOIN_STYLE_MASK  0xF000
 
 #define ANSI_CHARSET            0
 #define DEFAULT_CHARSET         1
commit 1a1d704004858edef3a9ac84f2b8f4bc9107b545
Author: Stephan van den Akker <stephanv778 at gmail.com>
Date:   Tue Feb 23 11:13:20 2016 +0100

    Improve the import of pen styles from EMF files
    
    Change-Id: I643c29befeb29b7b1cdd66375f661f4adb0e6cfa
    Reviewed-on: https://gerrit.libreoffice.org/22638
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: David Tardon <dtardon at redhat.com>
    (cherry picked from commit 9db34a7712e277389b2041cfbd77a60476d7f7f1)
    Reviewed-on: https://gerrit.libreoffice.org/22718
    Reviewed-by: Chris Sherlock <chris.sherlock79 at gmail.com>
    (cherry picked from commit 86b1846bbbd0a7ec84ed9d87fed411910b747765)

diff --git a/vcl/qa/cppunit/wmf/data/line_styles.emf b/vcl/qa/cppunit/wmf/data/line_styles.emf
new file mode 100644
index 0000000..07b7832
Binary files /dev/null and b/vcl/qa/cppunit/wmf/data/line_styles.emf differ
diff --git a/vcl/qa/cppunit/wmf/wmfimporttest.cxx b/vcl/qa/cppunit/wmf/wmfimporttest.cxx
index 6e595c0..2a1a341 100644
--- a/vcl/qa/cppunit/wmf/wmfimporttest.cxx
+++ b/vcl/qa/cppunit/wmf/wmfimporttest.cxx
@@ -43,6 +43,7 @@ public:
     void testNonPlaceableWmf();
     void testSine();
     void testEmfProblem();
+    void testEmfLineStyles();
     void testWorldTransformFontSize();
     void testTdf93750();
 
@@ -50,6 +51,7 @@ public:
     CPPUNIT_TEST(testNonPlaceableWmf);
     CPPUNIT_TEST(testSine);
     CPPUNIT_TEST(testEmfProblem);
+    CPPUNIT_TEST(testEmfLineStyles);
     CPPUNIT_TEST(testWorldTransformFontSize);
     CPPUNIT_TEST(testTdf93750);
 
@@ -120,6 +122,50 @@ void WmfTest::testEmfProblem()
     assertXPath(pDoc, "/metafile/sectrectclipregion[1]", "right", "1876");
 }
 
+void WmfTest::testEmfLineStyles()
+{
+    SvFileStream aFileStream(getFullUrl("line_styles.emf"), StreamMode::READ);
+    GDIMetaFile aGDIMetaFile;
+    ReadWindowMetafile(aFileStream, aGDIMetaFile);
+
+    MetafileXmlDump dumper;
+    dumper.filterAllActionTypes();
+    dumper.filterActionType(MetaActionType::LINE, false);
+    dumper.filterActionType(MetaActionType::LINECOLOR, false);
+    xmlDocPtr pDoc = dumper.dumpAndParse(aGDIMetaFile);
+
+    CPPUNIT_ASSERT (pDoc);
+
+    assertXPath(pDoc, "/metafile/line", 4);
+    assertXPath(pDoc, "/metafile/linecolor", 5);
+
+    assertXPath(pDoc, "/metafile/linecolor[1]", "color", "#ffffff");
+    assertXPath(pDoc, "/metafile/linecolor[2]", "color", "#00ff00");
+    assertXPath(pDoc, "/metafile/linecolor[3]", "color", "#408080");
+    assertXPath(pDoc, "/metafile/linecolor[4]", "color", "#ff0000");
+    assertXPath(pDoc, "/metafile/linecolor[5]", "color", "#0000ff");
+
+    assertXPath(pDoc, "/metafile/line[1]", "style", "dash");
+    assertXPath(pDoc, "/metafile/line[1]", "dashlen", "225");
+    assertXPath(pDoc, "/metafile/line[1]", "dotlen", "0");
+    assertXPath(pDoc, "/metafile/line[1]", "distance", "100");
+
+    assertXPath(pDoc, "/metafile/line[2]", "style", "dash");
+    assertXPath(pDoc, "/metafile/line[2]", "dashlen", "0");
+    assertXPath(pDoc, "/metafile/line[2]", "dotlen", "30");
+    assertXPath(pDoc, "/metafile/line[2]", "distance", "50");
+
+    assertXPath(pDoc, "/metafile/line[3]", "style", "dash");
+    assertXPath(pDoc, "/metafile/line[3]", "dashlen", "150");
+    assertXPath(pDoc, "/metafile/line[3]", "dotlen", "30");
+    assertXPath(pDoc, "/metafile/line[3]", "distance", "90");
+
+    assertXPath(pDoc, "/metafile/line[4]", "style", "dash");
+    assertXPath(pDoc, "/metafile/line[4]", "dashlen", "150");
+    assertXPath(pDoc, "/metafile/line[4]", "dotlen", "30");
+    assertXPath(pDoc, "/metafile/line[4]", "distance", "50");
+};
+
 void WmfTest::testWorldTransformFontSize()
 {
     SvFileStream aFileStream(getFullUrl("image1.emf"), StreamMode::READ);
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index f130fad..470e1b2 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -998,20 +998,38 @@ bool EnhWMFReader::ReadEnhWMF()
                             aLineInfo.SetWidth( nWidth );
 
                         bool bTransparent = false;
-                        sal_uInt16 nDashCount = 0;
-                        sal_uInt16 nDotCount = 0;
 
                         switch( nStyle & PS_STYLE_MASK )
                         {
                             case PS_DASHDOTDOT :
-                                nDotCount++;
+                                aLineInfo.SetStyle( LINE_DASH );
+                                aLineInfo.SetDashCount( 1 );
+                                aLineInfo.SetDotCount( 2 );
+                                aLineInfo.SetDashLen( 150 );
+                                aLineInfo.SetDotLen( 30 );
+                                aLineInfo.SetDistance( 50 );
+                            break;
                             case PS_DASHDOT :
-                                nDashCount++;
+                                aLineInfo.SetStyle( LINE_DASH );
+                                aLineInfo.SetDashCount( 1 );
+                                aLineInfo.SetDotCount( 1 );
+                                aLineInfo.SetDashLen( 150 );
+                                aLineInfo.SetDotLen( 30 );
+                                aLineInfo.SetDistance( 90 );
+                            break;
                             case PS_DOT :
-                                nDotCount++;
+                                aLineInfo.SetStyle( LINE_DASH );
+                                aLineInfo.SetDashCount( 0 );
+                                aLineInfo.SetDotCount( 1 );
+                                aLineInfo.SetDotLen( 30 );
+                                aLineInfo.SetDistance( 50 );
                             break;
                             case PS_DASH :
-                                nDashCount++;
+                                aLineInfo.SetStyle( LINE_DASH );
+                                aLineInfo.SetDashCount( 1 );
+                                aLineInfo.SetDotCount( 0 );
+                                aLineInfo.SetDashLen( 225 );
+                                aLineInfo.SetDistance( 100 );
                             break;
                             case PS_NULL :
                                 bTransparent = true;
@@ -1023,12 +1041,6 @@ bool EnhWMFReader::ReadEnhWMF()
                             default :
                                 aLineInfo.SetStyle( LINE_SOLID );
                         }
-                        if ( nDashCount | nDotCount )
-                        {
-                            aLineInfo.SetStyle( LINE_DASH );
-                            aLineInfo.SetDashCount( nDashCount );
-                            aLineInfo.SetDotCount( nDotCount );
-                        }
                         pOut->CreateObject( nIndex, GDI_PEN, new WinMtfLineStyle( aColorRef, aLineInfo, bTransparent ) );
                     }
                 }
commit 1d6f89ff94ff3e0ee5f6f48d43ba15bc5bc750c4
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
Date:   Fri Mar 4 11:17:47 2016 +0100

    tdf#98052 - polypolygons were not drawn on the alpha device
    
    In OutputDevice::DrawPolyPolygon when b2dpolygon are used for drawing
    the source polygon is not drawn on the alpha device.
    
    Change-Id: I54f4e5a13469d9844866cea61b074420219b836d
    Reviewed-on: https://gerrit.libreoffice.org/22893
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Jenkins <ci at libreoffice.org>
    (cherry picked from commit 5bdbf99c3ec6e5e0793c52c34ff4f3a17afab107)
    Reviewed-on: https://gerrit.libreoffice.org/22902
    (cherry picked from commit da2f91b5ceef6d7c6a7b833b25a48f12f58643f5)

diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx
index 9008acd..369551e 100644
--- a/vcl/source/outdev/polygon.cxx
+++ b/vcl/source/outdev/polygon.cxx
@@ -103,6 +103,8 @@ void OutputDevice::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly )
 
         if(bSuccess)
         {
+            if( mpAlphaVDev )
+                mpAlphaVDev->DrawPolyPolygon( rPolyPoly );
             return;
         }
     }
commit 67abbe5d9a3df037c67adf29db065293d8898d16
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date:   Fri Feb 26 16:37:32 2016 +0100

    tdf#95709 adapt clip polygon for transparence groups
    
    For presentation transparence groups are rendered by the canvas
    using VirtualDevices and Bitmaps. To adapt for then painting
    the Bitnmap to the canvas the RenderState needs to be adapted
    to e.g. reflect the already applied scaling. Missing was to adapt
    a set clip polyPolygon to be synchronized with the new RenderState
    transformation.
    
    Change-Id: If760a8076e016a6dcf306db71971f1fd2fef7017
    Reviewed-on: https://gerrit.libreoffice.org/22720
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit 1c85800345239754d5c4ec71c2aad526d0439eea)
    Reviewed-on: https://gerrit.libreoffice.org/22890
    Tested-by: Jenkins <ci at libreoffice.org>
    (cherry picked from commit dd37ff21753afe37dc7185fddf34adf33dc9291f)

diff --git a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
index cd274b3..4dc23f2 100644
--- a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
+++ b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
@@ -48,6 +48,7 @@
 #include <basegfx/matrix/b2dhommatrix.hxx>
 #include <basegfx/tuple/b2dtuple.hxx>
 #include <basegfx/tools/canvastools.hxx>
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
 
 #include <boost/utility.hpp>
 
@@ -383,6 +384,15 @@ namespace cppcanvas
                 rendering::RenderState aLocalState( maState );
                 ::canvas::tools::setRenderStateTransform(aLocalState, aTransform);
 
+                if(aLocalState.Clip.is())
+                {
+                    // tdf#95709
+                    // Adjust renderstate clip to modified scale from above
+                    ::basegfx::B2DPolyPolygon aClip = ::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(aLocalState.Clip);
+                    aClip.transform(basegfx::tools::createScaleB2DHomMatrix(aScale));
+                    aLocalState.Clip = ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon(mpCanvas->getUNOCanvas()->getDevice(), aClip);
+                }
+
 #if OSL_DEBUG_LEVEL > 2
                 aLocalState.Clip.clear();
                 aLocalState.DeviceColor =
commit 53d9f28b70bc1a51a9c8a8bd5e111c67ba42de60
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date:   Mon Feb 29 17:46:30 2016 +0100

    tdf#98277 Extensions: Display shortcut in toolbar tooltip
    
    (cherry picked from commits 3ff17bda5ba3e627e9b996506dc72b68cf67483b and 398fadca9a82917ed865e328ba454d8015803b66)
    This patch differs from the one in master since CommandInfoProvider is not available before 5.1.
    
    Change-Id: Icc16860d8b47a3724838fdb3dcb72dfb4398167d
    Reviewed-on: https://gerrit.libreoffice.org/22806
    Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit 4a8a051e1a29c86d29d5064455226c4f11f69f52)

diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx
index f895630..77e68c8 100644
--- a/framework/source/uielement/addonstoolbarmanager.cxx
+++ b/framework/source/uielement/addonstoolbarmanager.cxx
@@ -260,6 +260,11 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue
 
                 m_pToolBar->InsertItem( nId, aTitle );
 
+                OUString aShortcut;
+                GetPropsForCommand(aURL); // Need to call this method to identify the Module so that we can use RetrieveShortcut()
+                if (RetrieveShortcut(aURL, aShortcut))
+                    m_pToolBar->SetQuickHelpText( nId, aTitle + " (" + aShortcut + ")" );
+
                 // don't setup images yet, AddonsToolbarWrapper::populateImages does that.
 
                 // Create TbRuntimeItemData to hold additional information we will need in the future
commit a50518b96aec4b148b527879197298d2f689cdcf
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date:   Wed Mar 2 17:21:10 2016 +0100

    tdf#96922 Suppress EditView PageVisuailsation in GraphicExporter
    
    PageBackground is due to old constraints in exporters not completely
    hindered when IsPageVisible() is already set for signalling that
    all EditView-specific Page visualisations should be suppressed.
    As long as these exporters are not adapted, use the setting of
    SetPagePaintingAllowed() which consequently achieves this.
    
    Change-Id: I2222a799533f763b54b2210a46c24aa8ae92d7a2
    Reviewed-on: https://gerrit.libreoffice.org/22837
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit f3ff67d3c3047de3ad43f8bb3f805d82eaef0479)
    Signed-off-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit 79288ac239ebf1916ffbf3c386482d00e6060f8d)

diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 166b989..08210d3 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -748,6 +748,10 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic,
                 pView->SetPageVisible( false );
                 pView->ShowSdrPage( pPage );
 
+                // tdf#96922 completely deactivate EditView PageVisualization, including
+                // PageBackground (formally 'wiese').
+                pView->SetPagePaintingAllowed(false);
+
                 const Point aNewOrg( pPage->GetLftBorder(), pPage->GetUppBorder() );
                 aNewSize = Size( aSize.Width() - pPage->GetLftBorder() - pPage->GetRgtBorder(),
                                  aSize.Height() - pPage->GetUppBorder() - pPage->GetLwrBorder() );


More information about the Libreoffice-commits mailing list