[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - sfx2/source

2023-06-28 Thread Michael Stahl (via logerrit)
 sfx2/source/view/viewfrm.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 61b0c6605932873ccf8ef321cbb41464d366cb70
Author: Michael Stahl 
AuthorDate: Tue Jun 27 19:50:51 2023 +0200
Commit: Michael Stahl 
CommitDate: Wed Jun 28 12:52:48 2023 +0200

tdf#146547 sfx2: preserve modified state from read-only to editable

SfxViewFrame::ExecReload_Impl() calls DoSaveCompleted() which resets the
modified state, but in this case the document wasn't actually saved.

Change-Id: I54f6508a652cc42a127bc59058c5b435dd1a25a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153676
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 79241a1fd32ab03cd2bb34fb303ce7f2fa93e57e)

diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 2b39c4b1ef3c..bbfb37e5291d 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -330,9 +330,12 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
 m_pFrame->RemoveInfoBar("readonly");
 if (m_pMed)
 {
+bool const 
isEnableSetModified(m_pSh->IsEnableSetModified());
+m_pSh->EnableSetModified(false);
 // tdf#116066: DoSaveCompleted should be called 
after SetReadOnlyUI
 m_pSh->DoSaveCompleted(m_pMed);
 m_pSh->Broadcast(SfxHint(SfxHintId::ModeChanged));
+m_pSh->EnableSetModified(isEnableSetModified);
 }
 }
 }


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - sfx2/source starmath/qa

2023-05-24 Thread Samuel Mehrbrodt (via logerrit)
 sfx2/source/doc/objmisc.cxx |3 ++-
 starmath/qa/cppunit/test_cursor.cxx |1 +
 starmath/qa/cppunit/test_node.cxx   |1 +
 starmath/qa/cppunit/test_nodetotextvisitors.cxx |1 +
 4 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit cb46fe877fd000ad74eb167a3a6127e89c8990f9
Author: Samuel Mehrbrodt 
AuthorDate: Mon May 8 15:41:27 2023 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Wed May 24 22:28:04 2023 +0200

tdf#146547 Mark read-only docs as modified

when an editable section is changed.

Change-Id: I588b09f160974d3a3833bfa011fd07f2ee496616
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151535
Tested-by: Samuel Mehrbrodt 
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit e7e9991fd06ba2e0484ae5e6b6acc323ab8bf66b)

diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index ff31ce956bbc..50f92ee65ac6 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -262,7 +262,8 @@ void SfxObjectShell::EnableSetModified( bool bEnable )
 
 bool SfxObjectShell::IsEnableSetModified() const
 {
-return pImpl->m_bEnableSetModified && !IsReadOnly();
+// Don't allow when user explicitly requested read only (IsLoadReadonly() 
or IsOriginallyLoadedReadOnlyMedium())
+return pImpl->m_bEnableSetModified && ! (IsLoadReadonly() || 
IsOriginallyLoadedReadOnlyMedium());
 }
 
 
diff --git a/starmath/qa/cppunit/test_cursor.cxx 
b/starmath/qa/cppunit/test_cursor.cxx
index 080e7a274c4d..b85b5ceef37a 100644
--- a/starmath/qa/cppunit/test_cursor.cxx
+++ b/starmath/qa/cppunit/test_cursor.cxx
@@ -57,6 +57,7 @@ void Test::setUp()
 SmGlobals::ensure();
 
 xDocShRef = new SmDocShell(SfxModelFlags::EMBEDDED_OBJECT);
+xDocShRef->DoInitNew();
 }
 
 void Test::tearDown()
diff --git a/starmath/qa/cppunit/test_node.cxx 
b/starmath/qa/cppunit/test_node.cxx
index dba0b9ff3c40..570cab00d062 100644
--- a/starmath/qa/cppunit/test_node.cxx
+++ b/starmath/qa/cppunit/test_node.cxx
@@ -53,6 +53,7 @@ void NodeTest::setUp()
 mxDocShell = new SmDocShell(SfxModelFlags::EMBEDDED_OBJECT |
 SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS |
 SfxModelFlags::DISABLE_DOCUMENT_RECOVERY);
+mxDocShell->DoInitNew();
 }
 
 void NodeTest::tearDown()
diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx 
b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
index c3172ab60126..e738351a8d23 100644
--- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx
+++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
@@ -90,6 +90,7 @@ void Test::setUp()
 SmGlobals::ensure();
 
 xDocShRef = new SmDocShell(SfxModelFlags::EMBEDDED_OBJECT);
+xDocShRef->DoInitNew();
 }
 
 void Test::tearDown()


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - sfx2/source

2023-03-15 Thread Samuel Mehrbrodt (via logerrit)
 sfx2/source/doc/iframe.cxx|4 
 sfx2/source/inc/eventsupplier.hxx |1 -
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 6ce7620a163e9f03c3b4f43162a84e0347ae5b10
Author: Samuel Mehrbrodt 
AuthorDate: Mon Feb 27 15:27:24 2023 +0100
Commit: Thorsten Behrens 
CommitDate: Thu Mar 16 01:52:20 2023 +

Check iframe target for allowed document URLs

Change-Id: I00e4192becbc160282a43ab89dcd269f3d1012d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147919
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 288c0920a8475f9f2c537212e04aa7649192ad8c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148230
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index aea851894286..c8c0c76357e7 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -46,6 +46,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -174,6 +175,9 @@ sal_Bool SAL_CALL IFrameObject::load(
 return false;
 }
 
+if (!SfxEvents_Impl::isScriptURLAllowed(aTargetURL.Complete))
+return false;
+
 DBG_ASSERT( !mxFrame.is(), "Frame already existing!" );
 VclPtr pParent = VCLUnoHelper::GetWindow( 
xFrame->getContainerWindow() );
 VclPtr pWin = VclPtr::Create( 
pParent, maFrmDescr.IsFrameBorderOn() );
diff --git a/sfx2/source/inc/eventsupplier.hxx 
b/sfx2/source/inc/eventsupplier.hxx
index 4624ed8b4907..d24345dba1c5 100644
--- a/sfx2/source/inc/eventsupplier.hxx
+++ b/sfx2/source/inc/eventsupplier.hxx
@@ -87,7 +87,6 @@ public:
 SfxObjectShell* i_document );
 static void Execute( css::uno::Any const & aEventData, const 
css::document::DocumentEvent& aTrigger, SfxObjectShell* pDoc );
 
-private:
 /// Check if script URL whitelist exists, and if so, if current script url 
is part of it
 static bool isScriptURLAllowed(const OUString& aScriptURL);
 };


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - sfx2/source

2022-10-21 Thread Michael Stahl (via logerrit)
 sfx2/source/doc/docfile.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 48fa1f49d97ce04c9d3749ae02b2874af6477e82
Author: Michael Stahl 
AuthorDate: Fri Oct 21 11:52:00 2022 +0200
Commit: Michael Stahl 
CommitDate: Fri Oct 21 12:01:11 2022 +0200

sfx2: avoid showing 2 dialogs in case WebDAV LOCK request fails

... with 403, also for the initial load of the document.

There is an Infobar anyway that the user can click to try again to
edit the document, and if that fails there will be a dialog that offers
opening a copy.

If opening a file:// document writable fails and it is opened read-only,
there is also no extra error dialog, just the Infobar, so this is making
WebDAV more consistent.

Change-Id: Ice62d167199f384b246b9d60dab4eed456a62288

diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 6d10e2f6948d..8c0d101c4ea9 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -1204,7 +1204,10 @@ SfxMedium::LockFileResult 
SfxMedium::LockOrigFileOnDemand(bool bLoading, bool bN
 if( !bResult )
 {
 uno::Reference< task::XInteractionHandler > xCHandler 
= GetInteractionHandler( true );
-if (bNoUI)
+// Dialog with error is superfluous:
+// on loading, will result in read-only with infobar.
+// bNoUI case for Reload failing, will open dialog 
later.
+if (bLoading || bNoUI)
 {
 xCHandler = new LockInteractionHandler(xCHandler);
 }


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - sfx2/source

2022-04-14 Thread Samuel Mehrbrodt (via logerrit)
 sfx2/source/doc/objmisc.cxx |   14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

New commits:
commit 6520d6f9b09085af9c63d3c35108fb8083abbefa
Author: Samuel Mehrbrodt 
AuthorDate: Wed Apr 13 08:01:29 2022 +0200
Commit: Thorsten Behrens 
CommitDate: Thu Apr 14 19:31:51 2022 +0200

Prevent save interception when sharing Calc doc

Using the dispatch mechanism means that this can be caught by the dispatch 
interceptor
which we don't want in this place.

Change-Id: Ie7e5f92e6043e2aff98d4887829a3573c12c6d08
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132946
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 4afaf1cc5d7b..04ff6ecd5314 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -113,6 +113,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include "objstor.hxx"
@@ -521,9 +522,16 @@ bool SfxObjectShell::SwitchToShared( bool bShared, bool 
bSave )
 {
 // TODO/LATER: currently the application guards against the 
reentrance problem
 SetModified(); // the modified flag has to be set to let the 
document be stored with the shared flag
-const SfxPoolItem* pItem = 
pViewFrame->GetBindings().ExecuteSynchron( HasName() ? SID_SAVEDOC : 
SID_SAVEASDOC );
-const SfxBoolItem* pResult = dynamic_cast( 
pItem  );
-bResult = ( pResult && pResult->GetValue() );
+try
+{
+// Do *not* use dispatch mechanism in this place - we 
don't want others (extensions etc.) to intercept this.
+pImpl->pBaseModel->store();
+bResult = true;
+}
+catch (...)
+{
+bResult = false;
+}
 }
 }
 


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - sfx2/source svx/source

2022-01-31 Thread Samuel Mehrbrodt (via logerrit)
 sfx2/source/appl/appserv.cxx |5 +
 svx/source/dialog/SafeModeDialog.cxx |2 +-
 2 files changed, 2 insertions(+), 5 deletions(-)

New commits:
commit fcd156bd3a0e393ad3a546b8d3c16dcca832e2ed
Author: Samuel Mehrbrodt 
AuthorDate: Tue Feb 1 07:54:43 2022 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Tue Feb 1 07:54:43 2022 +0100

Fix support links

Change-Id: I000a8be2915005587e9e9d40f0da5d6834ef99f0

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 91fd8d941b58..400833f9dc79 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -549,10 +549,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
 
 case SID_SEND_FEEDBACK:
 {
-OUString lang = 
Application::GetSettings().GetUILanguageTag().getLanguage();
-OUString sURL("https://libreoffice.cib.de/support_%1.html;);
-sURL = sURL.replaceFirst("%1", lang);
-sfx2::openUriExternally(sURL, false);
+sfx2::openUriExternally("https://libreoffice.cib.de;, false);
 break;
 }
 case SID_DOCUMENTATION:
diff --git a/svx/source/dialog/SafeModeDialog.cxx 
b/svx/source/dialog/SafeModeDialog.cxx
index da8dbd94fa59..981e7dfe5bab 100644
--- a/svx/source/dialog/SafeModeDialog.cxx
+++ b/svx/source/dialog/SafeModeDialog.cxx
@@ -92,7 +92,7 @@ SafeModeDialog::SafeModeDialog(weld::Window* pParent)
 
 // Set URL for help button (module=safemode)
 OUString lang = 
Application::GetSettings().GetUILanguageTag().getLanguage();
-OUString 
sURL("https://libreoffice.cib.de/support_%1.html=safemode;);
+OUString sURL("https://libreoffice.cib.de;);
 sURL = sURL.replaceFirst("%1", lang);
 mxBugLink->set_uri(sURL);
 


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - sfx2/source

2022-01-24 Thread Vasily Melenchuk (via logerrit)
 sfx2/source/appl/appserv.cxx |   13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 6c2ec06c264f9c8d2e8eab011e82c3bebfe26815
Author: Vasily Melenchuk 
AuthorDate: Mon Jan 24 19:49:30 2022 +0300
Commit: Vasily Melenchuk 
CommitDate: Mon Jan 24 19:49:30 2022 +0300

tdf#140020: fix patch for 6.4 version

Since 6.4 does not have 65404e2c72ea2 commit, we need another
implementation for isSaveLocked()

Change-Id: I76d68d57fe8af297bb7e57f86916aa52d531c783

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 0ddff776ff86..91fd8d941b58 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -236,6 +236,15 @@ namespace
 TOOLS_INFO_EXCEPTION( "sfx.appl", "trying to load bibliography 
database");
 }
 }
+bool lcl_isSaveLocked(SfxObjectShell * pShell)
+{
+assert(pShell);
+Reference xModel = pShell->GetModel();
+if (!xModel.is())
+return false;
+comphelper::NamedValueCollection aArgs(xModel->getArgs());
+return aArgs.getOrDefault("LockSave", false);
+}
 }
 /// Find the correct location of the document (CREDITS.fodt, etc.), and return
 /// it in rURL if found.
@@ -524,7 +533,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
   pObjSh = SfxObjectShell::GetNext( *pObjSh ) )
 {
 SfxRequest aReq( SID_SAVEDOC, SfxCallMode::SLOT, 
pObjSh->GetPool() );
-if ( pObjSh->IsModified() && !pObjSh->isSaveLocked())
+if ( pObjSh->IsModified() && !lcl_isSaveLocked(pObjSh) )
 {
 pObjSh->ExecuteSlot( aReq );
 const SfxBoolItem *pItem = dynamic_cast( aReq.GetReturnValue()  );
@@ -1094,7 +1103,7 @@ void SfxApplication::MiscState_Impl(SfxItemSet )
   pObjSh;
   pObjSh = SfxObjectShell::GetNext( *pObjSh ) )
 {
-if ( pObjSh->IsModified() && !pObjSh->isSaveLocked() )
+if ( pObjSh->IsModified() && !lcl_isSaveLocked(pObjSh) 
)
 {
 bModified = true;
 break;


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - sfx2/source sfx2/uiconfig

2022-01-24 Thread Samuel Mehrbrodt (via logerrit)
 sfx2/source/dialog/backingwindow.cxx |   50 ---
 sfx2/source/dialog/backingwindow.hxx |1 
 sfx2/uiconfig/ui/startcenter.ui  |   16 ---
 3 files changed, 67 deletions(-)

New commits:
commit ad8d4ad6a60d596f865f158ad53dee617a0a1b48
Author: Samuel Mehrbrodt 
AuthorDate: Thu Jan 20 17:24:06 2022 +0100
Commit: Thorsten Behrens 
CommitDate: Mon Jan 24 10:22:26 2022 +0100

Remove external link from start center

Change-Id: I8deae6c5ea9af566d392a2f11830a0231d50aac9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128696
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/sfx2/source/dialog/backingwindow.cxx 
b/sfx2/source/dialog/backingwindow.cxx
index f9a11830e925..e4059d50c275 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -96,7 +96,6 @@ BackingWindow::BackingWindow( vcl::Window* i_pParent ) :
 get(mpHelpButton, "help");
 //set an alternative help label that doesn't hotkey the H of the Help menu
 mpHelpButton->SetText(get("althelplabel")->GetText());
-get(mpExtensionsButton, "extensions");
 
 //Containers are invisible to cursor traversal
 //So on pressing "right" when in Help the
@@ -111,12 +110,7 @@ BackingWindow::BackingWindow( vcl::Window* i_pParent ) :
 //of a group, i.e. allow it to be grouped with the preceding
 //PushButton so when seen as a candidate by cursor travelling
 //it will be accepted as a continuation of the group.
-WinBits nBits = mpExtensionsButton->GetStyle();
-nBits &= ~WB_GROUP;
-nBits |= WB_NOGROUP;
-mpExtensionsButton->SetStyle(nBits);
 assert(mpHelpButton->GetStyle() & WB_GROUP);
-assert(!(mpExtensionsButton->GetStyle() & WB_GROUP));
 
 get(mpAllButtonsBox, "all_buttons_box");
 get(mpButtonsBox, "buttons_box");
@@ -188,7 +182,6 @@ void BackingWindow::dispose()
 mpDBAllButton.clear();
 mpMathAllButton.clear();
 mpHelpButton.clear();
-mpExtensionsButton.clear();
 mpAllButtonsBox.clear();
 mpButtonsBox.clear();
 mpSmallButtonsBox.clear();
@@ -258,8 +251,6 @@ void BackingWindow::initControls()
 
 checkInstalledModules();
 
-mpExtensionsButton->SetClickHdl(LINK(this, BackingWindow, 
ExtLinkClickHdl));
-
 // setup nice colors
 mpCreateLabel->SetControlForeground(maButtonsTextColor);
 vcl::Font 
aFont(mpCreateLabel->GetSettings().GetStyleSettings().GetLabelFont());
@@ -267,7 +258,6 @@ void BackingWindow::initControls()
 mpCreateLabel->SetControlFont(aFont);
 
 mpHelpButton->SetControlForeground(maButtonsTextColor);
-mpExtensionsButton->SetControlForeground(maButtonsTextColor);
 
 const Color 
aButtonsBackground(officecfg::Office::Common::Help::StartCenter::StartCenterBackgroundColor::get());
 
@@ -498,46 +488,6 @@ void BackingWindow::Resize()
 Invalidate();
 }
 
-IMPL_LINK(BackingWindow, ExtLinkClickHdl, Button*, pButton, void)
-{
-OUString aNode;
-
-if (pButton == mpExtensionsButton)
-aNode = "AddFeatureURL";
-
-if (aNode.isEmpty())
-return;
-
-try
-{
-uno::Sequence args(comphelper::InitAnyPropertySequence(
-{
-{"nodepath", 
uno::Any(OUString("/org.openoffice.Office.Common/Help/StartCenter"))}
-}));
-
-Reference xConfig = 
configuration::theDefaultProvider::get( 
comphelper::getProcessComponentContext() );
-Reference 
xNameAccess(xConfig->createInstanceWithArguments(SERVICENAME_CFGREADACCESS, 
args), UNO_QUERY);
-if (xNameAccess.is())
-{
-OUString sURL;
-Any value(xNameAccess->getByName(aNode));
-
-sURL = value.get();
-localizeWebserviceURI(sURL);
-
-Reference const
-xSystemShellExecute(
-css::system::SystemShellExecute::create(
-::comphelper::getProcessComponentContext()));
-xSystemShellExecute->execute(sURL, OUString(),
-css::system::SystemShellExecuteFlags::URIS_ONLY);
-}
-}
-catch (const Exception&)
-{
-}
-}
-
 IMPL_LINK( BackingWindow, ClickHdl, Button*, pButton, void )
 {
 // dispatch the appropriate URL and end the dialog
diff --git a/sfx2/source/dialog/backingwindow.hxx 
b/sfx2/source/dialog/backingwindow.hxx
index a4a5803a4804..9f12d29d1efc 100644
--- a/sfx2/source/dialog/backingwindow.hxx
+++ b/sfx2/source/dialog/backingwindow.hxx
@@ -70,7 +70,6 @@ class BackingWindow : public vcl::Window, public 
VclBuilderContainer
 VclPtr mpMathAllButton;
 
 VclPtr mpHelpButton;
-VclPtr mpExtensionsButton;
 
 VclPtr mpAllButtonsBox;
 VclPtr mpButtonsBox;
diff --git a/sfx2/uiconfig/ui/startcenter.ui b/sfx2/uiconfig/ui/startcenter.ui
index 4d2a328bd20d..2ece5a27b95f 100644
--- a/sfx2/uiconfig/ui/startcenter.ui
+++ b/sfx2/uiconfig/ui/startcenter.ui
@@ -449,22 +449,6 @@
 0
 

[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - sfx2/source

2022-01-24 Thread Vasily Melenchuk (via logerrit)
 sfx2/source/appl/appserv.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d6d3716fdccf2a0484b2c4b1425c3bb223893c8d
Author: Vasily Melenchuk 
AuthorDate: Thu Jan 20 14:16:40 2022 +0300
Commit: Samuel Mehrbrodt 
CommitDate: Mon Jan 24 09:51:10 2022 +0100

tdf#140020: Disable also menu File->SaveAll for docs with LockSave

If LockSave attribute is applied, docs with it are not affecting
File->Save All menu item: these documents are not enabling this menu
and also not saved during this process.

Change-Id: I00bcd251fccfab3f13cb42c20ccb61b54ab49346
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128650
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
Reviewed-by: Vasily Melenchuk 
(cherry picked from commit 87fe449c4c1ed46003e9d5fdaf1919f11a53b959)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128675
Tested-by: Samuel Mehrbrodt 

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 31f090bc3ee6..0ddff776ff86 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -524,7 +524,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
   pObjSh = SfxObjectShell::GetNext( *pObjSh ) )
 {
 SfxRequest aReq( SID_SAVEDOC, SfxCallMode::SLOT, 
pObjSh->GetPool() );
-if ( pObjSh->IsModified() )
+if ( pObjSh->IsModified() && !pObjSh->isSaveLocked())
 {
 pObjSh->ExecuteSlot( aReq );
 const SfxBoolItem *pItem = dynamic_cast( aReq.GetReturnValue()  );
@@ -1094,7 +1094,7 @@ void SfxApplication::MiscState_Impl(SfxItemSet )
   pObjSh;
   pObjSh = SfxObjectShell::GetNext( *pObjSh ) )
 {
-if ( pObjSh->IsModified() )
+if ( pObjSh->IsModified() && !pObjSh->isSaveLocked() )
 {
 bModified = true;
 break;


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - sfx2/source

2022-01-20 Thread Vasily Melenchuk (via logerrit)
 sfx2/source/view/viewsh.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e4f77638cd44cb1d59a8ce670b3c23462d147839
Author: Vasily Melenchuk 
AuthorDate: Tue Jan 18 12:50:01 2022 +0300
Commit: Samuel Mehrbrodt 
CommitDate: Thu Jan 20 17:14:10 2022 +0100

tdf#140019: Revert "Don't disable "Send doc via email" ..."

Locked export should also disable ability to send document.

This reverts commit b9930d0d05db39a8466b18dccf626bc3d8ae5c4e.

Change-Id: I3b7b423c0e17a59872065ec7ceadbaf1cda45ccc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128550
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
Reviewed-by: Vasily Melenchuk 
(cherry picked from commit f4559274154324e132f82ba9c21676326f6db7e5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128664
Tested-by: Samuel Mehrbrodt 

diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 8a199623fa58..80cd8a122d07 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -684,7 +684,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet  )
 #if HAVE_FEATURE_MACOSX_SANDBOX
 rSet.DisableItem(nSID);
 #endif
-if (isExportLocked() && nSID != SID_MAIL_SENDDOC)
+if (isExportLocked())
 rSet.DisableItem(nSID);
 break;
 }


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - sfx2/source

2022-01-18 Thread Samuel Mehrbrodt (via logerrit)
 sfx2/source/doc/objstor.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 46e48a45cd9251df12feee30a194708bcb3ba8bb
Author: Samuel Mehrbrodt 
AuthorDate: Tue Feb 4 10:36:09 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Tue Jan 18 15:44:35 2022 +0100

Allow opt-out from document events check

Commit b3edf85e0fe6ca03dc26e1bf531be82193bc9627 added a warning on load
when a document binds events to a macro.

This adds an option to restore the old behavior, so that the warning only
appears when a document actually has Macros.

Change-Id: I5ad398d3d503a0954a746f4cba150f68630b820c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87961
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 
(cherry picked from commit c161478ed50f6ee8878335db113f8850a136615b)

diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index ab3dee35e5c2..b232a286900d 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -3623,7 +3623,9 @@ void SfxObjectShell::SetMacroCallsSeenWhileLoading()
 
 bool SfxObjectShell::GetMacroCallsSeenWhileLoading() const
 {
-return pImpl->m_bMacroCallsSeenWhileLoading;
+if 
(officecfg::Office::Common::Security::Scripting::CheckDocumentEvents::get())
+return pImpl->m_bMacroCallsSeenWhileLoading;
+return false;
 }
 
 bool SfxObjectShell::QuerySaveSizeExceededModules_Impl( const uno::Reference< 
task::XInteractionHandler >& xHandler )


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - sfx2/source

2020-12-11 Thread Samuel Mehrbrodt (via logerrit)
 sfx2/source/appl/appserv.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit c103dfb9923e2ddb0bd85e21f2f31d5267a93a66
Author: Samuel Mehrbrodt 
AuthorDate: Thu Dec 10 17:24:53 2020 +0100
Commit: Vasily Melenchuk 
CommitDate: Fri Dec 11 09:16:46 2020 +0100

Fix Linux build

Change-Id: Ic6ba805b8920316f0a549678e10f7fe71bf46d04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107567
Tested-by: Vasily Melenchuk 
Reviewed-by: Vasily Melenchuk 

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 9577fc4d4d6f..f15e39282682 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -61,6 +61,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits