include/sfx2/objsh.hxx               |    2 ++
 sfx2/source/doc/objmisc.cxx          |    6 +-----
 sfx2/source/notify/eventsupplier.cxx |   18 ++++++++++++------
 vcl/headless/svpgdi.cxx              |    8 +++++---
 4 files changed, 20 insertions(+), 14 deletions(-)

New commits:
commit 4a66c7eda6ccde26a42c4e31725248c59940255d
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Jul 23 15:31:05 2019 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Wed Jul 24 09:18:30 2019 +0200

    expand LibreLogo check to global events
    
    Change-Id: I7f436983ba0eb4b76b02d08ee52626e54b103d5f
    Reviewed-on: https://gerrit.libreoffice.org/76189
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 1658f6db6b26..5b32dfc67eae 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -391,6 +391,8 @@ public:
     */
     bool                        AdjustMacroMode();
 
+    static bool                 UnTrustedScript(const OUString& rScriptURL);
+
     SvKeyValueIterator*         GetHeaderAttributes();
     void                        ClearHeaderAttributesForSourceViewHack();
     void                        SetHeaderAttributesForSourceViewHack();
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 4462547bf349..3bbf59ccb91a 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1344,16 +1344,12 @@ namespace
     }
 }
 
-namespace {
-
 // don't allow LibreLogo to be used with our mouseover/etc dom-alike events
-bool UnTrustedScript(const OUString& rScriptURL)
+bool SfxObjectShell::UnTrustedScript(const OUString& rScriptURL)
 {
     return 
rScriptURL.startsWithIgnoreAsciiCase("vnd.sun.star.script:LibreLogo");
 }
 
-}
-
 ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& 
_rxScriptContext, const OUString& _rScriptURL,
     const Sequence< Any >& aParams, Any& aRet, Sequence< sal_Int16 >& 
aOutParamIndex, Sequence< Any >& aOutParam, bool bRaiseError, const 
css::uno::Any* pCaller )
 {
diff --git a/sfx2/source/notify/eventsupplier.cxx 
b/sfx2/source/notify/eventsupplier.cxx
index 2ea3e86fd89d..4e619d954c93 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -206,18 +206,24 @@ void SfxEvents_Impl::Execute( uno::Any const & 
aEventData, const document::Docum
     else if (aType == "Service" ||
               aType == "Script")
     {
-        if ( !aScript.isEmpty() )
+        bool bAllowed = false;
+        util::URL aURL;
+        if (!aScript.isEmpty())
         {
-            SfxViewFrame* pView = pDoc ?
-                SfxViewFrame::GetFirst( pDoc ) :
-                SfxViewFrame::Current();
-
             uno::Reference < util::XURLTransformer > xTrans( 
util::URLTransformer::create( ::comphelper::getProcessComponentContext() ) );
 
-            util::URL aURL;
             aURL.Complete = aScript;
             xTrans->parseStrict( aURL );
 
+            bAllowed = !SfxObjectShell::UnTrustedScript(aURL.Complete);
+        }
+
+        if (bAllowed)
+        {
+            SfxViewFrame* pView = pDoc ?
+                SfxViewFrame::GetFirst( pDoc ) :
+                SfxViewFrame::Current();
+
             uno::Reference
                 < frame::XDispatchProvider > xProv;
 
commit 81c7df3a618dead46dc192ae91d25a72de4132fd
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Jul 23 17:40:14 2019 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Wed Jul 24 09:18:06 2019 +0200

    Related: tdf#126227 follow the same pattern as drawPolyPolygon
    
    in drawAlphaRect so the rect path is set after the matrix
    
    Change-Id: I3ded9383f6f16f77902c5ad576e520f37326e8af
    Reviewed-on: https://gerrit.libreoffice.org/76199
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 3b59fac40169..9eb040b46eee 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -554,16 +554,16 @@ bool SvpSalGraphics::drawAlphaRect(long nX, long nY, long 
nWidth, long nHeight,
     // To make releaseCairoContext work, use empty extents
     basegfx::B2DRange extents;
 
-    cairo_rectangle(cr, nX, nY, nWidth, nHeight);
-
     if (bHasFill)
     {
+        cairo_rectangle(cr, nX, nY, nWidth, nHeight);
+
         applyColor(cr, m_aFillColor, fTransparency);
 
         // set FillDamage
         extents = getClippedFillDamage(cr);
 
-        cairo_fill_preserve(cr);
+        cairo_fill(cr);
     }
 
     if (bHasLine)
@@ -574,6 +574,8 @@ bool SvpSalGraphics::drawAlphaRect(long nX, long nY, long 
nWidth, long nHeight,
         cairo_matrix_init_translate(&aMatrix, 0.5, 0.5);
         cairo_set_matrix(cr, &aMatrix);
 
+        cairo_rectangle(cr, nX, nY, nWidth, nHeight);
+
         applyColor(cr, m_aLineColor, fTransparency);
 
         // expand with possible StrokeDamage
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to