[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - 2 commits - include/sfx2 sfx2/source sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Aug 5 08:54:12 UTC 2019
include/sfx2/objsh.hxx | 2 ++
sfx2/source/doc/objmisc.cxx | 6 +-----
sfx2/source/notify/eventsupplier.cxx | 18 ++++++++++++------
sw/source/core/doc/docedt.cxx | 3 ++-
sw/source/core/txtnode/ndtxt.cxx | 3 ++-
5 files changed, 19 insertions(+), 13 deletions(-)
New commits:
commit 50e63fad6eb047c81f04af727068cc211ee5c4a5
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jul 23 15:31:05 2019 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Mon Aug 5 10:53:46 2019 +0200
expand LibreLogo check to global events
Change-Id: I7f436983ba0eb4b76b02d08ee52626e54b103d5f
Reviewed-on: https://gerrit.libreoffice.org/76195
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
(cherry picked from commit 8f227049a79668b93c5433e6bce7f55cc2c34d43)
Reviewed-on: https://gerrit.libreoffice.org/76944
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 0f2c09aeef82..8f3b43a9ce2d 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -412,6 +412,8 @@ public:
*/
bool AdjustMacroMode();
+ static bool UnTrustedScript(const OUString& rScriptURL);
+
SvKeyValueIterator* GetHeaderAttributes();
void ClearHeaderAttributesForSourceViewHack();
void SetHeaderAttributesForSourceViewHack();
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index beea5170e44d..7411eacd592a 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1340,16 +1340,12 @@ namespace
}
}
-namespace {
-
// don't allow LibreLogo to be used with our mouseover/etc dom-alike events
-bool UnTrustedScript(const OUString& rScriptURL)
+bool SfxObjectShell::UnTrustedScript(const OUString& rScriptURL)
{
return rScriptURL.startsWithIgnoreAsciiCase("vnd.sun.star.script:LibreLogo");
}
-}
-
ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptContext, const OUString& _rScriptURL,
const Sequence< Any >& aParams, Any& aRet, Sequence< sal_Int16 >& aOutParamIndex, Sequence< Any >& aOutParam, bool bRaiseError, const css::uno::Any* pCaller )
{
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index 261ce2db54aa..8ce1d7b9bfa7 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -208,18 +208,24 @@ void SfxEvents_Impl::Execute( uno::Any const & aEventData, const document::Docum
else if (aType == "Service" ||
aType == "Script")
{
- if ( !aScript.isEmpty() )
+ bool bAllowed = false;
+ util::URL aURL;
+ if (!aScript.isEmpty())
{
- SfxViewFrame* pView = pDoc ?
- SfxViewFrame::GetFirst( pDoc ) :
- SfxViewFrame::Current();
-
uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create( ::comphelper::getProcessComponentContext() ) );
- util::URL aURL;
aURL.Complete = aScript;
xTrans->parseStrict( aURL );
+ bAllowed = !SfxObjectShell::UnTrustedScript(aURL.Complete);
+ }
+
+ if (bAllowed)
+ {
+ SfxViewFrame* pView = pDoc ?
+ SfxViewFrame::GetFirst( pDoc ) :
+ SfxViewFrame::Current();
+
uno::Reference
< frame::XDispatchProvider > xProv;
commit 0ca2b02eb91f9473d45ccc400a018397b75152a8
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Mon Jul 22 19:27:11 2019 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Mon Aug 5 10:53:33 2019 +0200
tdf#126340 sw_redlinehide: only move merged frames in JoinPrev
The problem was that the first and second node were not actually merged
by a redline, so moving the frames doesn't make sense.
(regression from 41d8ca9686c7c184f586e99674b443c34bfd4f33)
Change-Id: Ib401e4b0b2b207666f65c038ab5c346807bfea92
Reviewed-on: https://gerrit.libreoffice.org/76125
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit 91b344b0346347ac40d2d6fa03a03e92d2e9f252)
Reviewed-on: https://gerrit.libreoffice.org/76150
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 447d52dffaa2fcc8a78ac87fbd8cf543c52888e5)
Reviewed-on: https://gerrit.libreoffice.org/76943
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 9fceec0533a6..2e4d132a838e 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -413,7 +413,8 @@ bool sw_JoinText( SwPaM& rPam, bool bJoinPrev )
}
// delete the Node, at last!
SwNode::Merge const eOldMergeFlag(pOldTextNd->GetRedlineMergeFlag());
- if (eOldMergeFlag == SwNode::Merge::First)
+ if (eOldMergeFlag == SwNode::Merge::First
+ && !pTextNd->IsCreateFrameWhenHidingRedlines())
{
sw::MoveDeletedPrevFrames(*pOldTextNd, *pTextNd);
}
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index c8719a4316d6..1f804ebbe55e 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1128,7 +1128,8 @@ void SwTextNode::JoinPrev()
pDoc->CorrAbs( aIdx, SwPosition( *this ), nLen, true );
}
SwNode::Merge const eOldMergeFlag(pTextNode->GetRedlineMergeFlag());
- if (eOldMergeFlag == SwNode::Merge::First)
+ if (eOldMergeFlag == SwNode::Merge::First
+ && !IsCreateFrameWhenHidingRedlines())
{
sw::MoveDeletedPrevFrames(*pTextNode, *this);
}
More information about the Libreoffice-commits
mailing list