summaryrefslogtreecommitdiff
path: root/sc/qa
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2018-05-17 11:12:56 -0400
committerEike Rathke <erack@redhat.com>2018-07-04 21:43:05 +0200
commit3ec1c27bf30d9b91a90220793147838cbf726a0d (patch)
treee290ece5208315777b3d28c3cbcde693a2958059 /sc/qa
parent85ba2c3193d83c84e584ea8c008fdd4019cb8e2b (diff)
sc: release XTransferable2 when used with VBA compatibility helpers
Copy, Cut, PasteSpecial and Insert is used by Range excel object, so after finishing executing the VBA script ensure to release XTransferable2 interface Change-Id: I967a7ba1a1d101282f7a1b9d4b2e2ac3004f1c07 Reviewed-on: https://gerrit.libreoffice.org/54497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/56648 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/qa')
-rw-r--r--sc/qa/unit/tiledrendering/data/RangeCopyPaste.odsbin0 -> 10034 bytes
-rw-r--r--sc/qa/unit/tiledrendering/tiledrendering.cxx24
2 files changed, 24 insertions, 0 deletions
diff --git a/sc/qa/unit/tiledrendering/data/RangeCopyPaste.ods b/sc/qa/unit/tiledrendering/data/RangeCopyPaste.ods
new file mode 100644
index 000000000000..9d5e2495a22b
--- /dev/null
+++ b/sc/qa/unit/tiledrendering/data/RangeCopyPaste.ods
Binary files differ
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index cdd9af6df92f..84c8ed3b7ed0 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -94,6 +94,7 @@ public:
void testMultiViewCopyPaste();
void testIMESupport();
void testFilterDlg();
+ void testVbaRangeCopyPaste();
CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
CPPUNIT_TEST(testRowColumnSelections);
@@ -126,6 +127,7 @@ public:
CPPUNIT_TEST(testMultiViewCopyPaste);
CPPUNIT_TEST(testIMESupport);
CPPUNIT_TEST(testFilterDlg);
+ CPPUNIT_TEST(testVbaRangeCopyPaste);
CPPUNIT_TEST_SUITE_END();
private:
@@ -1651,6 +1653,28 @@ void ScTiledRenderingTest::testFilterDlg()
comphelper::LibreOfficeKit::setActive(false);
}
+void ScTiledRenderingTest::testVbaRangeCopyPaste()
+{
+ comphelper::LibreOfficeKit::setActive();
+ ScModelObj* pModelObj = createDoc("RangeCopyPaste.ods");
+ ScDocShell* pDocShell = dynamic_cast< ScDocShell* >( pModelObj->GetEmbeddedObject() );
+ CPPUNIT_ASSERT(pDocShell);
+
+ uno::Any aRet;
+ uno::Sequence< uno::Any > aOutParam;
+ uno::Sequence< uno::Any > aParams;
+ uno::Sequence< sal_Int16 > aOutParamIndex;
+
+ SfxObjectShell::CallXScript(
+ mxComponent,
+ "vnd.sun.Star.script:Standard.Module1.Test_RangeCopyPaste?language=Basic&location=document",
+ aParams, aRet, aOutParamIndex, aOutParam);
+
+ CPPUNIT_ASSERT(!pDocShell->GetClipData().is());
+
+ comphelper::LibreOfficeKit::setActive(false);
+}
+
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScTiledRenderingTest);