configure.ac                                               |    2 +-
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |    6 ++++++
 sfx2/source/view/viewfrm.cxx                               |    6 ++++--
 uui/source/iahndl-locking.cxx                              |   11 +++++++----
 uui/source/openlocked.cxx                                  |    3 ++-
 5 files changed, 20 insertions(+), 8 deletions(-)

New commits:
commit 4953968ca5507f487433b421147e9f9ad07178ec
Author:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
AuthorDate: Mon Mar 16 15:27:19 2020 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Mon Mar 16 15:27:19 2020 +0100

    Release 6.2.9.4
    
    Change-Id: Id3fadd12ba951323be1600b3939323bf801637e3

diff --git a/configure.ac b/configure.ac
index b3724fff8595..048e78059163 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.2.9.3],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[6.2.9.4],[],[],[http://documentfoundation.org/])
 
 AC_PREREQ([2.59])
 
commit ce1594ad5fb948449f2beac0a2adeaaa07405b4a
Author:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
AuthorDate: Mon Mar 16 10:40:13 2020 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Mon Mar 16 15:26:50 2020 +0100

    Some more places to check for AllowOverrideLocking option
    
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90554
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
    (cherry picked from commit 10136818b4ef138fc2d5ec3af194beffed009480)
    
    Change-Id: Id09f691ef7e3fbae03771a43af1c7b1d940365bc

diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 814a45f42b6f..f15e0fc670be 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -183,13 +183,15 @@ private:
     std::unique_ptr<weld::MessageDialog> m_xQueryBox;
 public:
     SfxQueryOpenAsTemplate(weld::Window* pParent, bool bAllowIgnoreLock)
-        : m_xQueryBox(Application::CreateMessageDialog(pParent, 
VclMessageType::Question, VclButtonsType::NONE,
-                      SfxResId(bAllowIgnoreLock ? 
STR_QUERY_OPENASTEMPLATE_ALLOW_IGNORE : STR_QUERY_OPENASTEMPLATE)))
+        : m_xQueryBox(Application::CreateMessageDialog(pParent, 
VclMessageType::Question, VclButtonsType::NONE, ""))
     {
         
m_xQueryBox->add_button(SfxResId(STR_QUERY_OPENASTEMPLATE_OPENCOPY_BTN), 
RET_YES);
+        bAllowIgnoreLock
+            = bAllowIgnoreLock && 
officecfg::Office::Common::Misc::AllowOverrideLocking::get();
         if (bAllowIgnoreLock)
             
m_xQueryBox->add_button(SfxResId(STR_QUERY_OPENASTEMPLATE_OPEN_BTN), 
RET_IGNORE);
         m_xQueryBox->add_button(Button::GetStandardText( 
StandardButtonType::Cancel ), RET_CANCEL);
+        m_xQueryBox->set_primary_text(SfxResId(bAllowIgnoreLock ? 
STR_QUERY_OPENASTEMPLATE_ALLOW_IGNORE : STR_QUERY_OPENASTEMPLATE));
         m_xQueryBox->set_default_response(RET_YES);
     }
     short run() { return m_xQueryBox->run(); }
diff --git a/uui/source/iahndl-locking.cxx b/uui/source/iahndl-locking.cxx
index 8a9af9c77b35..5ecdfbfba502 100644
--- a/uui/source/iahndl-locking.cxx
+++ b/uui/source/iahndl-locking.cxx
@@ -81,13 +81,14 @@ handleLockedDocumentRequest_(
     std::vector< OUString > aArguments;
     aArguments.push_back( aDocumentURL );
 
+    bool bAllowOverride = xRetry.is() && 
officecfg::Office::Common::Misc::AllowOverrideLocking::get();
+
     sal_Int32 nResult = RET_CANCEL;
     if ( nMode == UUI_DOC_LOAD_LOCK )
     {
         aArguments.push_back( !aInfo.isEmpty()
                               ? aInfo
                               : Translate::get( STR_UNKNOWNUSER, aResLocale) );
-        bool bAllowOverride = xRetry.is() && 
officecfg::Office::Common::Misc::AllowOverrideLocking::get();
         aArguments.push_back( bAllowOverride
                               ? Translate::get( 
STR_OPENLOCKED_ALLOWIGNORE_MSG, aResLocale )
                               : "" );
@@ -95,7 +96,7 @@ handleLockedDocumentRequest_(
         aMessage = UUIInteractionHelper::replaceMessageWithArguments(
             aMessage, aArguments );
 
-        OpenLockedQueryBox aDialog(pParent, aResLocale, aMessage, xRetry.is());
+        OpenLockedQueryBox aDialog(pParent, aResLocale, aMessage, 
bAllowOverride);
         nResult = aDialog.run();
     }
     else if ( nMode == UUI_DOC_SAVE_LOCK )
@@ -104,12 +105,12 @@ handleLockedDocumentRequest_(
                               ? aInfo
                               : Translate::get( STR_UNKNOWNUSER,
                                            aResLocale ) );
-        aMessage = Translate::get(xRetry.is() ? STR_OVERWRITE_IGNORELOCK_MSG : 
STR_TRYLATER_MSG,
+        aMessage = Translate::get(bAllowOverride ? 
STR_OVERWRITE_IGNORELOCK_MSG : STR_TRYLATER_MSG,
             aResLocale);
         aMessage = UUIInteractionHelper::replaceMessageWithArguments(
             aMessage, aArguments );
 
-        TryLaterQueryBox aDialog(pParent, aResLocale, aMessage, xRetry.is());
+        TryLaterQueryBox aDialog(pParent, aResLocale, aMessage, 
bAllowOverride);
         nResult = aDialog.run();
     }
     else if ( nMode == UUI_DOC_OWN_LOAD_LOCK ||
commit 158884cbe3fd7a760bfc409c895f3b6b56f41e22
Author:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
AuthorDate: Thu Mar 12 16:26:23 2020 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Mon Mar 16 08:53:11 2020 +0100

    Add option to disallow opening files locked by other users
    
    Change-Id: I316b80a56b0d6dcb257fbc805fbac3afc93472ae
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90425
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
    (cherry picked from commit 3621c927b4555cb437fb89d28473228cb5d8e11a)

diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 225567c53a06..31a79ae045a9 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -5370,6 +5370,12 @@
         </info>
         <value>true</value>
       </prop>
+      <prop oor:name="AllowOverrideLocking" oor:type="xs:boolean" 
oor:nillable="false">
+        <info>
+          <desc>Whether the user can open a file for editing although it has 
been locked by another user.</desc>
+        </info>
+        <value>true</value>
+      </prop>
       <prop oor:name="ShowLinkWarningDialog" oor:type="xs:boolean" 
oor:nillable="false">
         <info>
           <desc>Determines if a warning dialog should be
diff --git a/uui/source/iahndl-locking.cxx b/uui/source/iahndl-locking.cxx
index 8df6c85b0608..8a9af9c77b35 100644
--- a/uui/source/iahndl-locking.cxx
+++ b/uui/source/iahndl-locking.cxx
@@ -33,6 +33,7 @@
 
 #include <unotools/resmgr.hxx>
 #include <vcl/svapp.hxx>
+#include <officecfg/Office/Common.hxx>
 
 #include <strings.hrc>
 #include "getcontinuations.hxx"
@@ -86,7 +87,8 @@ handleLockedDocumentRequest_(
         aArguments.push_back( !aInfo.isEmpty()
                               ? aInfo
                               : Translate::get( STR_UNKNOWNUSER, aResLocale) );
-        aArguments.push_back( xRetry.is()
+        bool bAllowOverride = xRetry.is() && 
officecfg::Office::Common::Misc::AllowOverrideLocking::get();
+        aArguments.push_back( bAllowOverride
                               ? Translate::get( 
STR_OPENLOCKED_ALLOWIGNORE_MSG, aResLocale )
                               : "" );
         aMessage = Translate::get(STR_OPENLOCKED_MSG, aResLocale);
diff --git a/uui/source/openlocked.cxx b/uui/source/openlocked.cxx
index 453067f8e3ae..68d7626630a0 100644
--- a/uui/source/openlocked.cxx
+++ b/uui/source/openlocked.cxx
@@ -19,6 +19,7 @@
 
 #include <strings.hrc>
 #include "openlocked.hxx"
+#include <officecfg/Office/Common.hxx>
 #include <unotools/resmgr.hxx>
 #include <vcl/button.hxx>
 #include <vcl/svapp.hxx>
@@ -29,7 +30,7 @@ OpenLockedQueryBox::OpenLockedQueryBox(weld::Window* pParent, 
const std::locale&
     m_xQueryBox->set_title(Translate::get(STR_OPENLOCKED_TITLE, rResLocale));
     m_xQueryBox->add_button(Translate::get(STR_OPENLOCKED_OPENREADONLY_BTN, 
rResLocale), RET_YES);
     m_xQueryBox->add_button(Translate::get(STR_OPENLOCKED_OPENCOPY_BTN, 
rResLocale), RET_NO);
-    if (bEnableOverride)
+    if (bEnableOverride && 
officecfg::Office::Common::Misc::AllowOverrideLocking::get())
     {
         // Present option to ignore the (stale?) lock file and open the 
document
         m_xQueryBox->add_button(Translate::get(STR_ALREADYOPEN_OPEN_BTN, 
rResLocale), RET_IGNORE);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to