Kaydet (Commit) 18cd0184 authored tarafından Andrea Pescetti's avatar Andrea Pescetti

#i126572# Use correct priority when updating links.

üst ea92e14d
......@@ -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& rReq )
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),
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment