configure.ac                         |    2 +-
 desktop/source/app/cmdlineargs.cxx   |   10 +++++++++-
 sfx2/source/appl/macroloader.cxx     |    9 +++++++--
 sfx2/source/doc/iframe.cxx           |   20 +++++++++++++++-----
 sfx2/source/inc/macroloader.hxx      |    2 ++
 sw/source/filter/html/htmlplug.cxx   |    7 ++++++-
 sw/source/filter/xml/xmltexti.cxx    |    9 +++++++--
 wizards/source/access2base/DoCmd.xba |    2 +-
 xmloff/source/draw/ximpshap.cxx      |    4 ++++
 9 files changed, 52 insertions(+), 13 deletions(-)

New commits:
commit 2d6ce0c3816df76ad31dcc832704cac47fe98297
Author:     Andras Timar <andras.ti...@collabora.com>
AuthorDate: Sun Sep 11 17:25:49 2022 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun Sep 11 17:25:49 2022 +0200

    Bump version to 6.4.7.2.M7
    
    Change-Id: I304416370da61e71c7628dc691f01fcbe7ff2e58

diff --git a/configure.ac b/configure.ac
index ddc8cf8f2bc0..a926a2569623 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice],[6.4.7.2.M6],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[6.4.7.2.M7],[],[],[http://documentfoundation.org/])
 
 dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just 
fine if it is installed
 dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails 
hard
commit 47696ebe66c90c292d0fa1cbf5fdbaff62c456e0
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Sep 6 11:38:55 2022 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun Sep 11 17:25:17 2022 +0200

    check impress/calc IFrame "FrameURL" target
    
    similar to
    
    commit c7450d0b9d02c64ae3da467d329040787039767e
    Date:   Tue Aug 30 17:01:08 2022 +0100
    
        check IFrame "FrameURL" target
    
    Conflicts:
            xmloff/source/draw/ximpshap.cxx
    
    Change-Id: Ibf28c29acb4476830431d02772f3ecd4b23a6a27
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139524
    Tested-by: Thorsten Behrens <thorsten.behr...@allotropia.de>
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>

diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 8bee4b376ba1..a7f2f2f76f1b 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -87,6 +87,7 @@
 #include <basegfx/polygon/b2dpolypolygon.hxx>
 #include <basegfx/polygon/b2dpolypolygontools.hxx>
 #include <basegfx/vector/b2dvector.hxx>
+#include <tools/urlobj.hxx>
 #include <o3tl/safeint.hxx>
 
 using namespace ::com::sun::star;
@@ -3243,6 +3244,9 @@ void SdXMLFloatingFrameShapeContext::StartElement( const 
css::uno::Reference< cs
 
             if( !maHref.isEmpty() )
             {
+                if (INetURLObject(maHref).GetProtocol() == INetProtocol::Macro)
+                    GetImport().NotifyMacroEventRead();
+
                 xProps->setPropertyValue("FrameURL", Any(maHref) );
             }
         }
commit 7d0d3310d887debc8a223702af59b36f7186da1f
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Aug 30 17:01:08 2022 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun Sep 11 17:25:16 2022 +0200

    check IFrame "FrameURL" target
    
    similiar to
    
    commit b3edf85e0fe6ca03dc26e1bf531be82193bc9627
    Date:   Wed Aug 7 17:37:11 2019 +0100
    
        warn on load when a document binds an event to a macro
    
    Conflicts:
            sfx2/source/doc/iframe.cxx
            sw/source/filter/html/htmlplug.cxx
            sw/source/filter/xml/xmltexti.cxx
    
    Change-Id: Iea888b1c083d2dc69ec322309ac9ae8c5e5eb315
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139059
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139246
    Tested-by: Thorsten Behrens <thorsten.behr...@allotropia.de>
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>
    (cherry picked from commit 6ae9c760e7e05e104adf84944b711e99e15bee7e)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139508
    Tested-by: Andras Timar <andras.ti...@collabora.com>
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/sfx2/source/appl/macroloader.cxx b/sfx2/source/appl/macroloader.cxx
index 98e036e0a7ea..b50d1e63c789 100644
--- a/sfx2/source/appl/macroloader.cxx
+++ b/sfx2/source/appl/macroloader.cxx
@@ -76,10 +76,10 @@ css::uno::Sequence<OUString> SAL_CALL 
SfxMacroLoader::getSupportedServiceNames()
     return aSeq;
 }
 
-SfxObjectShell* SfxMacroLoader::GetObjectShell_Impl()
+SfxObjectShell* SfxMacroLoader::GetObjectShell(const Reference <XFrame>& 
xFrame)
 {
     SfxObjectShell* pDocShell = nullptr;
-    Reference < XFrame > xFrame( m_xFrame.get(), UNO_QUERY );
+
     if ( xFrame.is() )
     {
         SfxFrame* pFrame=nullptr;
@@ -96,6 +96,11 @@ SfxObjectShell* SfxMacroLoader::GetObjectShell_Impl()
     return pDocShell;
 }
 
+SfxObjectShell* SfxMacroLoader::GetObjectShell_Impl()
+{
+    Reference < XFrame > xFrame( m_xFrame.get(), UNO_QUERY );
+    return SfxMacroLoader::GetObjectShell(xFrame);
+}
 
 uno::Reference<frame::XDispatch> SAL_CALL SfxMacroLoader::queryDispatch(
     const util::URL&   aURL            ,
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 8b1271545dfb..aea851894286 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -39,11 +39,13 @@
 #include <svl/ownlist.hxx>
 #include <svl/itemprop.hxx>
 #include <sfx2/frmdescr.hxx>
+#include <sfx2/objsh.hxx>
 #include <sfx2/sfxdlg.hxx>
 #include <sfx2/sfxsids.hrc>
 #include <toolkit/helper/vclunohelper.hxx>
 #include <vcl/window.hxx>
 #include <tools/debug.hxx>
+#include <macroloader.hxx>
 
 using namespace ::com::sun::star;
 
@@ -159,6 +161,19 @@ sal_Bool SAL_CALL IFrameObject::load(
 {
     if ( SvtMiscOptions().IsPluginsEnabled() )
     {
+        util::URL aTargetURL;
+        aTargetURL.Complete = maFrmDescr.GetURL().GetMainURL( 
INetURLObject::DecodeMechanism::NONE );
+        uno::Reference < util::XURLTransformer > xTrans( 
util::URLTransformer::create( mxContext ) );
+        xTrans->parseStrict( aTargetURL );
+
+        if (INetURLObject(aTargetURL.Complete).GetProtocol() == 
INetProtocol::Macro)
+        {
+            uno::Reference<frame::XFramesSupplier> xParentFrame = 
xFrame->getCreator();
+            SfxObjectShell* pDoc = 
SfxMacroLoader::GetObjectShell(xParentFrame);
+            if (pDoc && !pDoc->AdjustMacroMode())
+                return false;
+        }
+
         DBG_ASSERT( !mxFrame.is(), "Frame already existing!" );
         VclPtr<vcl::Window> pParent = VCLUnoHelper::GetWindow( 
xFrame->getContainerWindow() );
         VclPtr<IFrameWindow_Impl> pWin = VclPtr<IFrameWindow_Impl>::Create( 
pParent, maFrmDescr.IsFrameBorderOn() );
@@ -181,11 +196,6 @@ sal_Bool SAL_CALL IFrameObject::load(
         if ( xFramesSupplier.is() )
             mxFrame->setCreator( xFramesSupplier );
 
-        util::URL aTargetURL;
-        aTargetURL.Complete = maFrmDescr.GetURL().GetMainURL( 
INetURLObject::DecodeMechanism::NONE );
-        uno::Reference < util::XURLTransformer > xTrans( 
util::URLTransformer::create( mxContext ) );
-        xTrans->parseStrict( aTargetURL );
-
         uno::Sequence < beans::PropertyValue > aProps(2);
         aProps[0].Name = "PluginMode";
         aProps[0].Value <<= sal_Int16(2);
diff --git a/sfx2/source/inc/macroloader.hxx b/sfx2/source/inc/macroloader.hxx
index 9e1dfba18ed0..b3e7a5ec1abc 100644
--- a/sfx2/source/inc/macroloader.hxx
+++ b/sfx2/source/inc/macroloader.hxx
@@ -82,6 +82,8 @@ public:
     virtual void SAL_CALL addStatusListener( const css::uno::Reference< 
css::frame::XStatusListener >& xControl, const css::util::URL& aURL ) override;
 
     virtual void SAL_CALL removeStatusListener( const css::uno::Reference< 
css::frame::XStatusListener >& xControl, const css::util::URL& aURL ) override;
+
+    static SfxObjectShell* GetObjectShell(const 
css::uno::Reference<css::frame::XFrame>& xFrame);
 };
 
 #endif
diff --git a/sw/source/filter/html/htmlplug.cxx 
b/sw/source/filter/html/htmlplug.cxx
index a0da671de733..eb707040adb2 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -1087,7 +1087,12 @@ void SwHTMLParser::InsertFloatingFrame()
                 bool bHasBorder = aFrameDesc.HasFrameBorder();
                 Size aMargin = aFrameDesc.GetMargin();
 
-                xSet->setPropertyValue("FrameURL", uno::makeAny( 
aFrameDesc.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) );
+                OUString sHRef = aFrameDesc.GetURL().GetMainURL( 
INetURLObject::DecodeMechanism::NONE );
+
+                if (INetURLObject(sHRef).GetProtocol() == INetProtocol::Macro)
+                    NotifyMacroEventRead();
+
+                xSet->setPropertyValue("FrameURL", uno::makeAny( sHRef ) );
                 xSet->setPropertyValue("FrameName", uno::makeAny( aName ) );
 
                 if ( eScroll == ScrollingMode::Auto )
diff --git a/sw/source/filter/xml/xmltexti.cxx 
b/sw/source/filter/xml/xmltexti.cxx
index 788bec5c2d47..169cbdc1534d 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -853,9 +853,14 @@ uno::Reference< XPropertySet > 
SwXMLTextImportHelper::createAndInsertFloatingFra
             uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), 
uno::UNO_QUERY );
             if ( xSet.is() )
             {
+                OUString sHRef = URIHelper::SmartRel2Abs(
+                            INetURLObject( GetXMLImport().GetBaseURL() ), 
rHRef );
+
+                if (INetURLObject(sHRef).GetProtocol() == INetProtocol::Macro)
+                    GetXMLImport().NotifyMacroEventRead();
+
                 xSet->setPropertyValue("FrameURL",
-                    makeAny( URIHelper::SmartRel2Abs(
-                            INetURLObject( GetXMLImport().GetBaseURL() ), 
rHRef ) ) );
+                    makeAny( sHRef ) );
 
                 xSet->setPropertyValue("FrameName",
                     makeAny( rName ) );
commit 41c93bb9d3dc07ab89a85103441eed2870999fe5
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Thu Sep 1 17:33:51 2022 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun Sep 11 17:25:16 2022 +0200

    Filter out unwanted command URIs
    
    Conflicts:
            desktop/source/app/cmdlineargs.cxx
    
    Change-Id: I0b7e5329af8cc053d14d5c60ec14fe7f364ef993
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139225
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139247
    Tested-by: Thorsten Behrens <thorsten.behr...@allotropia.de>
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>
    (cherry picked from commit 79e7b374e7650758dbbbe91d9b36725e3d13a0ae)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139509
    Tested-by: Andras Timar <andras.ti...@collabora.com>
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/desktop/source/app/cmdlineargs.cxx 
b/desktop/source/app/cmdlineargs.cxx
index 381147cd534e..846714158e25 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -29,6 +29,7 @@
 #include <tools/stream.hxx>
 #include <vcl/svapp.hxx>
 #include <rtl/uri.hxx>
+#include <tools/urlobj.hxx>
 #include <rtl/ustring.hxx>
 #include <rtl/process.h>
 #include <comphelper/lok.hxx>
@@ -169,7 +170,14 @@ CommandLineEvent CheckOfficeURI(/* in,out */ OUString& 
arg, CommandLineEvent cur
     }
     if (nURIlen < 0)
         nURIlen = rest2.getLength();
-    arg = rest2.copy(0, nURIlen);
+    auto const uri = rest2.copy(0, nURIlen);
+    if (INetURLObject(uri).GetProtocol() == INetProtocol::Macro) {
+        // Let the "Open" machinery process the full command URI (leading to 
failure, by intention,
+        // as the "Open" machinery does not know about those command URI 
schemes):
+        curEvt = CommandLineEvent::Open;
+    } else {
+        arg = uri;
+    }
     return curEvt;
 }
 
commit 38f8e14428967dfdfefe573756a2a778e55f79da
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Tue Aug 30 14:04:52 2022 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun Sep 11 17:25:16 2022 +0200

    These commands are always URLs already
    
    Conflicts:
            wizards/source/scriptforge/SF_Session.xba
    
    Change-Id: I5083765c879689d7f933bbe00ad70bb68e635a21
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139042
    Tested-by: Jean-Pierre Ledure <j...@ledure.be>
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139245
    Tested-by: Thorsten Behrens <thorsten.behr...@allotropia.de>
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>
    (cherry picked from commit 8e11376b0964451b1132c094dbc98a828b0ede4b)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139507
    Tested-by: Andras Timar <andras.ti...@collabora.com>
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/wizards/source/access2base/DoCmd.xba 
b/wizards/source/access2base/DoCmd.xba
index 27b0d74be34f..26755a8d901d 100644
--- a/wizards/source/access2base/DoCmd.xba
+++ b/wizards/source/access2base/DoCmd.xba
@@ -2655,7 +2655,7 @@ Private Sub _ShellExecute(sCommand As String)
 
 Dim oShell As Object
        Set oShell = 
createUnoService(&quot;com.sun.star.system.SystemShellExecute&quot;)
-       oShell.execute(sCommand, &quot;&quot; , 
com.sun.star.system.SystemShellExecuteFlags.DEFAULTS)
+       oShell.execute(sCommand, &quot;&quot; , 
com.sun.star.system.SystemShellExecuteFlags.URIS_ONLY)
 
 End Sub                                &apos;  _ShellExecute                   
V0.8.5
 

Reply via email to