This is an automated email from the ASF dual-hosted git repository.

ardovm pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 349d485d9bbf3c3048ac4bdfa46925c00fded709
Author: Arrigo Marchiori <[email protected]>
AuthorDate: Sat May 10 14:38:01 2025 +0200

    DDE links are subject to authorization
    
    (cherry picked from commit 80e8b488c0f103f95b5c0cb9bd8ff9ad850bc08e)
---
 main/sc/source/core/tool/ddelink.cxx | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/main/sc/source/core/tool/ddelink.cxx 
b/main/sc/source/core/tool/ddelink.cxx
index 0e3e12180a..eafcdf3979 100644
--- a/main/sc/source/core/tool/ddelink.cxx
+++ b/main/sc/source/core/tool/ddelink.cxx
@@ -27,9 +27,11 @@
 
 
 // INCLUDE ---------------------------------------------------------------
+#include <com/sun/star/document/XLinkAuthorizer.hpp>
 #include <tools/list.hxx>
 #include <sfx2/linkmgr.hxx>
 #include <sfx2/bindings.hxx>
+#include <sfx2/objsh.hxx>
 #include <svl/zforlist.hxx>
 
 #include "ddelink.hxx"
@@ -258,6 +260,12 @@ void __EXPORT ScDdeLink::ListenersGone()
 
 void ScDdeLink::TryUpdate()
 {
+       ::com::sun::star::uno::Reference< 
::com::sun::star::document::XLinkAuthorizer > xLinkAuthorizer( 
pDoc->GetDocumentShell()->GetModel(), ::com::sun::star::uno::UNO_QUERY );
+       if ( xLinkAuthorizer.is() ) {
+               if ( !xLinkAuthorizer->authorizeLinks( aTopic ) ) {
+                       return;
+               }
+       }
        if (bIsInUpdate)
                bNeedUpdate = sal_True;                 // kann jetzt nicht 
ausgefuehrt werden
        else

Reply via email to