[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - sal/inc sc/source sw/source ucb/source

Andrea Pescetti pescetti at apache.org
Tue Oct 6 17:08:16 PDT 2015


 sal/inc/osl/file.h                      |    4 ++--
 sc/source/ui/docshell/docsh4.cxx        |   10 +++++++---
 sw/source/core/doc/docnew.cxx           |    8 ++++++++
 ucb/source/ucp/webdav/webdavcontent.cxx |   18 +++++++++++-------
 4 files changed, 28 insertions(+), 12 deletions(-)

New commits:
commit 5c4bdb1716f4535b01bc7a6a44ea5c1677d1fba5
Author: Andrea Pescetti <pescetti at apache.org>
Date:   Tue Oct 6 23:58:35 2015 +0000

    #i126305# Fix access to standard websites (e.g., no WebDAV).
    
    Patch by: Giuseppe Castagno

diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index 13c2597..5f66416 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -3091,17 +3091,15 @@ void Content::lock(
                       aOwner ));
         }
         break;
+        case SC_FORBIDDEN:
+        case SC_NOT_IMPLEMENTED:
         case SC_METHOD_NOT_ALLOWED:
             // this it's not always received, but the RFC4918 (which supersed RFC2518)
             // tells about this in:
             // http://tools.ietf.org/html/rfc4918#appendix-D.1
             // throw exception, will be interpreted by the lock requester (framework)
             // it is actually a info, not an error
-            throw ucb::InteractiveLockingLockNotAvailableException( e.getData(),
-                                                                    static_cast< cppu::OWeakObject * >( this ),
-                                                                    task::InteractionClassification_INFO,
-                                                                    aURL,
-                                                                    e.getExtendedError() );
+            return;
             break;
             //i126305 TODO
             //see http://tools.ietf.org/html/rfc4918#section-9.10.6
@@ -3579,12 +3577,18 @@ const Content::ResourceType & Content::getResourceType(
         catch ( DAVException const & e )
         {
             rResAccess->resetUri();
-
-            if ( e.getStatus() == SC_METHOD_NOT_ALLOWED )
+            switch(  e.getStatus() )
             {
+                // returned errors are part of base http 1.1 RFCs:
+            case SC_FORBIDDEN:          // https://tools.ietf.org/html/rfc7231#section-6.5.3
+            case SC_NOT_IMPLEMENTED:    // http://tools.ietf.org/html/rfc7231#section-6.6.2
+            case SC_METHOD_NOT_ALLOWED: // http://tools.ietf.org/html/rfc7231#section-6.5.5
                 // Status SC_METHOD_NOT_ALLOWED is a safe indicator that the
                 // resource is NON_DAV
                 eResourceType = NON_DAV;
+                break;
+            default:
+                ;
             }
             // cancel command execution is case that no user authentication data has been provided.
             if ( e.getError() == DAVException::DAV_HTTP_NOAUTH )
commit 18cd0184b143409f65a393be4b46da15e0ab2589
Author: Andrea Pescetti <pescetti at apache.org>
Date:   Tue Oct 6 23:51:45 2015 +0000

    #i126572# Use correct priority when updating links.

diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 84acf00..1dcbd34 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -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),
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index d0847fc..a3399f9 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -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();
commit ea92e14dfe94cfd8ee7353c4769dec5fe69e17af
Author: Andrea Pescetti <pescetti at apache.org>
Date:   Tue Oct 6 23:33:03 2015 +0000

    #i125194# #i126305# Move new enum to last position.
    
    Patch by: Giuseppe Castagno.

diff --git a/sal/inc/osl/file.h b/sal/inc/osl/file.h
index faade8b..ef318b2 100644
--- a/sal/inc/osl/file.h
+++ b/sal/inc/osl/file.h
@@ -132,11 +132,11 @@ typedef enum {
     osl_File_E_USERS,
     osl_File_E_OVERFLOW,
     osl_File_E_NOTREADY,
-    osl_File_E_LOCKED,
     osl_File_E_invalidError,        /* unmapped error: always last entry in enum! */
     osl_File_E_TIMEDOUT,
     osl_File_E_NETWORK,
-    osl_File_E_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
+    osl_File_E_FORCE_EQUAL_SIZE,
+    osl_File_E_LOCKED = SAL_MAX_ENUM
 } oslFileError;
 
 typedef void *oslDirectory;


More information about the Libreoffice-commits mailing list