[Libreoffice-commits] core.git: Branch 'feature/cib_contract138c' - 2 commits - configure.ac include/sfx2 sfx2/source

Samuel Mehrbrodt (via logerrit) logerrit at kemper.freedesktop.org
Wed Apr 8 06:52:21 UTC 2020


 configure.ac                 |    2 +-
 include/sfx2/objsh.hxx       |    2 ++
 include/sfx2/viewsh.hxx      |    2 --
 sfx2/source/doc/objmisc.cxx  |    9 +++++++++
 sfx2/source/view/viewfrm.cxx |    8 +++-----
 sfx2/source/view/viewsh.cxx  |    7 -------
 6 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 3af811c768eabd775c4c7777a33a1ac1e0ccd448
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Wed Apr 8 08:51:38 2020 +0200
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Wed Apr 8 08:51:38 2020 +0200

    Release 6.2.9.6
    
    Change-Id: Ief9b61b825a7460ce91fb4aa3ec6331b66fa623f

diff --git a/configure.ac b/configure.ac
index 7120703cfeb8..e9c6a8b04fa8 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.5],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[6.2.9.6],[],[],[http://documentfoundation.org/])
 
 AC_PREREQ([2.59])
 
commit e24e780f18830218666514e4e4b83243acf153e8
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Tue Apr 7 16:21:08 2020 +0200
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Wed Apr 8 07:42:16 2020 +0200

    Fix edit button still appearing in Calc
    
    ... even when editing readonly docs was disabled.
    
    Viewshell was not yet available at this point, so
    move the code where it belongs, into the object shell.
    
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91832
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit 523922ee9d033fd304d2b50a72b76853ddcfbcdf)
    
    Change-Id: I71cbaf9c912beeeb0b8177538999049f7f8b4e03

diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 7f14bce2f0c8..50112062cf90 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -598,6 +598,8 @@ public:
                                     const css::uno::Reference<css::embed::XStorage>& xTarget,
                                     const css::uno::Sequence<OUString>& rExceptions = css::uno::Sequence<OUString>());
 
+    bool isEditDocLocked();
+
     // The functions from SvPersist
     void            EnableSetModified( bool bEnable = true );
     bool            IsEnableSetModified() const;
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index a88fe07c58dd..cb185bb7b058 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -295,8 +295,6 @@ public:
     void                        AddRemoveClipboardListener( const css::uno::Reference < css::datatransfer::clipboard::XClipboardListener>&, bool );
     css::uno::Reference< css::datatransfer::clipboard::XClipboardNotifier > GetClipboardNotifier();
 
-    bool isEditDocLocked();
-
     SAL_DLLPRIVATE SfxInPlaceClient* GetUIActiveIPClient_Impl() const;
     SAL_DLLPRIVATE void AddContextMenuInterceptor_Impl( const css::uno::Reference < css::ui::XContextMenuInterceptor >& xInterceptor );
     SAL_DLLPRIVATE void RemoveContextMenuInterceptor_Impl( const css::uno::Reference < css::ui::XContextMenuInterceptor >& xInterceptor );
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 0aad46e02258..f6b1e16c54df 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -84,6 +84,8 @@
 #include <comphelper/interaction.hxx>
 #include <comphelper/storagehelper.hxx>
 #include <comphelper/documentconstants.hxx>
+#include <comphelper/namedvaluecollection.hxx>
+#include <officecfg/Office/Common.hxx>
 
 #include <sfx2/signaturestate.hxx>
 #include <sfx2/app.hxx>
@@ -1860,4 +1862,11 @@ bool SfxObjectShell::IsContinueImportOnFilterExceptions(const OUString& aErrMess
     return mbContinueImportOnFilterExceptions == yes;
 }
 
+bool SfxObjectShell::isEditDocLocked()
+{
+    if (!officecfg::Office::Common::Misc::AllowEditReadonlyDocs::get())
+        return true;
+    return false;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index b1d29d0f09fa..b14a16bfa335 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -278,9 +278,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
             if( !pSh || !pSh->HasName() || !(pSh->Get_Impl()->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ))
                 break;
 
-
-            SfxViewShell* pViewSh = GetViewShell();
-            if (pViewSh && pViewSh->isEditDocLocked())
+            if (pSh->isEditDocLocked())
                 break;
 
             // Only change read-only UI and remove info bar when we succeed
@@ -868,7 +866,7 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet )
                 const SfxShell *pFSh;
                 if ( !pSh->HasName() ||
                      !( pSh->Get_Impl()->nLoadedFlags &  SfxLoadedFlags::MAINDOCUMENT ) ||
-                     (GetViewShell() && GetViewShell()->isEditDocLocked()) ||
+                     (pSh->isEditDocLocked()) ||
                      ( pSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED &&
                        ( !(pVSh = pSh->GetViewShell())  ||
                          !(pFSh = pVSh->GetFormShell()) ||
@@ -1307,7 +1305,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
                         }
 
                         bool showEditDocumentButton = true;
-                        if (m_xObjSh->GetViewShell() && m_xObjSh->GetViewShell()->isEditDocLocked())
+                        if (m_xObjSh->isEditDocLocked())
                             showEditDocumentButton = false;
 
                         if (showEditDocumentButton)
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 81cc04a222f4..62a79d6555e0 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1755,13 +1755,6 @@ void SfxViewShell::SetController( SfxBaseController* pController )
     pImpl->xClipboardListener = new SfxClipboardChangeListener( this, GetClipboardNotifier() );
 }
 
-bool SfxViewShell::isEditDocLocked()
-{
-    if (!officecfg::Office::Common::Misc::AllowEditReadonlyDocs::get())
-        return true;
-    return false;
-}
-
 Reference < XController > SfxViewShell::GetController()
 {
     return pImpl->m_pController.get();


More information about the Libreoffice-commits mailing list