[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Mon Apr 1 13:15:47 UTC 2019
sc/source/ui/view/viewfun5.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit c502cfeb4ce3fe5f679666c825eb105ef249fe7d
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Mon Apr 1 15:50:53 2019 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Apr 1 16:14:10 2019 +0300
Avoid "Text Import" dialog if invoking Paste() from OLE Automation
Change-Id: Ib12b628eee25273aa489dbbd86004167ca105c0b
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 1590baee2f97..affdaa4a0076 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -44,6 +44,7 @@
#include <svtools/transfer.hxx>
#include <vcl/graph.hxx>
+#include <comphelper/automationinvokedzone.hxx>
#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
@@ -334,9 +335,10 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
else if ((nFormatId == SotClipboardFormatId::STRING || nFormatId == SotClipboardFormatId::STRING_TSVC)
&& aDataHelper.GetString( nFormatId, *pStrBuffer ))
{
- // Do CSV dialog if more than one line.
+ // Do CSV dialog if more than one line. But not if invoked from Automation.
sal_Int32 nDelim = pStrBuffer->indexOf('\n');
- if (nDelim >= 0 && nDelim != pStrBuffer->getLength () - 1)
+ if (!comphelper::Automation::AutomationInvokedZone::isActive()
+ && nDelim >= 0 && nDelim != pStrBuffer->getLength () - 1)
{
vcl::Window* pParent = comphelper::LibreOfficeKit::isActive() ? GetActiveWin() : nullptr;
More information about the Libreoffice-commits
mailing list