Author: pescetti
Date: Tue Oct  6 23:51:45 2015
New Revision: 1707169

URL: http://svn.apache.org/viewvc?rev=1707169&view=rev
Log:
#i126572# Use correct priority when updating links.

Modified:
    openoffice/trunk/main/sc/source/ui/docshell/docsh4.cxx
    openoffice/trunk/main/sw/source/core/doc/docnew.cxx

Modified: openoffice/trunk/main/sc/source/ui/docshell/docsh4.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sc/source/ui/docshell/docsh4.cxx?rev=1707169&r1=1707168&r2=1707169&view=diff
==============================================================================
--- openoffice/trunk/main/sc/source/ui/docshell/docsh4.cxx (original)
+++ openoffice/trunk/main/sc/source/ui/docshell/docsh4.cxx Tue Oct  6 23:51:45 
2015
@@ -67,6 +67,7 @@ using namespace ::com::sun::star;
 #include <svl/PasswordHelper.hxx>
 #include <svl/documentlockfile.hxx>
 #include <svl/sharecontrolfile.hxx>
+#include <unotools/securityoptions.hxx>
 
 #include <comphelper/processfactory.hxx>
 #include "docuno.hxx"
@@ -452,12 +453,15 @@ void ScDocShell::Execute( SfxRequest& rR
 
                 if (nCanUpdate == 
com::sun::star::document::UpdateDocMode::NO_UPDATE)
                     nSet = LM_NEVER;
-                else if (nCanUpdate == 
com::sun::star::document::UpdateDocMode::QUIET_UPDATE &&
-                    nSet == LM_ON_DEMAND)
-                    nSet = LM_NEVER;
                 else if (nCanUpdate == 
com::sun::star::document::UpdateDocMode::FULL_UPDATE)
                     nSet = LM_ALWAYS;
 
+                if (nSet == LM_ALWAYS && 
!(SvtSecurityOptions().GetMacroSecurityLevel() == 0))
+                    nSet = LM_ON_DEMAND;
+                if (nCanUpdate == 
com::sun::star::document::UpdateDocMode::QUIET_UPDATE &&
+                   nSet == LM_ON_DEMAND)
+                   nSet = LM_NEVER;
+
                                if(nSet==LM_ON_DEMAND)
                                {
                                        QueryBox aBox( GetActiveDialogParent(), 
WinBits(WB_YES_NO | WB_DEF_YES),

Modified: openoffice/trunk/main/sw/source/core/doc/docnew.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/doc/docnew.cxx?rev=1707169&r1=1707168&r2=1707169&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/doc/docnew.cxx (original)
+++ openoffice/trunk/main/sw/source/core/doc/docnew.cxx Tue Oct  6 23:51:45 2015
@@ -118,6 +118,7 @@
 
 #include <sfx2/Metadatable.hxx>
 #include <fmtmeta.hxx> // MetaFieldManager
+#include <unotools/securityoptions.hxx>
 
 //UUUU
 #include <svx/xfillit0.hxx>
@@ -1017,6 +1018,13 @@ void SwDoc::UpdateLinks( sal_Bool bUI )
             case document::UpdateDocMode::QUIET_UPDATE:bAskUpdate = sal_False; 
break;
             case document::UpdateDocMode::FULL_UPDATE: bAskUpdate = sal_True; 
break;
         }
+        if (nLinkMode == AUTOMATIC && !bAskUpdate)
+        {
+            if (!(SvtSecurityOptions().GetMacroSecurityLevel() == 0))
+            {
+                bAskUpdate = true;
+            }
+        }
         if( bUpdate && (bUI || !bAskUpdate) )
         {
             SfxMedium* pMedium = GetDocShell()->GetMedium();


Reply via email to