sc/qa/uitest/calc_tests7/save_readonly_with_password.py |5 +++--
sc/qa/uitest/calc_tests8/tdf147086.py |3 ++-
sc/qa/uitest/calc_tests9/tdf115933.py |3 ++-
sc/qa/uitest/calc_tests9/tdf118938.py |3 ++-
sc/qa/uitest/calc_tests9/tdf144996.py |6 +++---
sfx2/source/doc/objmisc.cxx |8 +++-
6 files changed, 19 insertions(+), 9 deletions(-)
New commits:
commit 861028593d7351d5ae8a0b8840ef8018b467f5de
Author: Henry Castro
AuthorDate: Mon Sep 18 17:05:56 2023 -0400
Commit: Henry Castro
CommitDate: Thu Sep 21 16:03:19 2023 +0200
uitest: add "Silent" property parameter
add option to not popup the read-only dialog when
load and excel file.
Signed-off-by: Henry Castro
Change-Id: I5e0ac06e3e872f156f6150f4b8bead61e7986c25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157036
Tested-by: Jenkins CollaboraOffice
diff --git a/sc/qa/uitest/calc_tests7/save_readonly_with_password.py
b/sc/qa/uitest/calc_tests7/save_readonly_with_password.py
index 02f125e3008f..0e4e75785bea 100644
--- a/sc/qa/uitest/calc_tests7/save_readonly_with_password.py
+++ b/sc/qa/uitest/calc_tests7/save_readonly_with_password.py
@@ -8,6 +8,7 @@
#
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
+from com.sun.star.beans import PropertyValue
from org.libreoffice.unotest import systemPathToFileUrl
from uitest.uihelper.common import select_by_text
from tempfile import TemporaryDirectory
@@ -48,7 +49,7 @@ class save_readonly_with_password(UITestCase):
self.ui_test.wait_until_file_is_available(xFilePath)
-with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as
document:
+with self.ui_test.load_file(systemPathToFileUrl(xFilePath),
[PropertyValue(Name="Silent", Value=True)]) as document:
self.assertTrue(document.isReadonly())
@@ -84,7 +85,7 @@ class save_readonly_with_password(UITestCase):
self.ui_test.wait_until_file_is_available(xFilePath)
-with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as
document:
+with self.ui_test.load_file(systemPathToFileUrl(xFilePath),
[PropertyValue(Name="Silent", Value=True)]) as document:
self.assertTrue(document.isReadonly())
diff --git a/sc/qa/uitest/calc_tests8/tdf147086.py
b/sc/qa/uitest/calc_tests8/tdf147086.py
index f594edb696f6..4decfa3dd3b3 100755
--- a/sc/qa/uitest/calc_tests8/tdf147086.py
+++ b/sc/qa/uitest/calc_tests8/tdf147086.py
@@ -8,6 +8,7 @@
#
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
+from com.sun.star.beans import PropertyValue
from org.libreoffice.unotest import systemPathToFileUrl
from uitest.uihelper.common import select_by_text
from tempfile import TemporaryDirectory
@@ -46,7 +47,7 @@ class tdf147086(UITestCase):
self.ui_test.wait_until_file_is_available(xFilePath)
-with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as
document:
+with self.ui_test.load_file(systemPathToFileUrl(xFilePath),
[PropertyValue(Name="Silent", Value=True)]) as document:
self.assertTrue(document.isReadonly())
diff --git a/sc/qa/uitest/calc_tests9/tdf115933.py
b/sc/qa/uitest/calc_tests9/tdf115933.py
index 0fe7fec06758..128b80652e47 100644
--- a/sc/qa/uitest/calc_tests9/tdf115933.py
+++ b/sc/qa/uitest/calc_tests9/tdf115933.py
@@ -8,6 +8,7 @@
#
from uitest.framework import UITestCase
from uitest.uihelper.common import get_url_for_data_file
+from com.sun.star.beans import PropertyValue
from libreoffice.uno.propertyvalue import mkPropertyValues
#Bug 115933 - XLSX password protected with algorithmName,
hashValue, saltValue and spinCount
@@ -15,7 +16,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues
class tdf115933(UITestCase):
def test_tdf115933(self):
-with self.ui_test.load_file(get_url_for_data_file("tdf115933.xlsx")):
+with self.ui_test.load_file(get_url_for_data_file("tdf115933.xlsx"),
[PropertyValue(Name="Silent", Value=True)]):
#The document was created in Excel.
calcDoc = self.xUITest.getTopFocusWindow()
gridwin = calcDoc.getChild("grid_window")
diff --git a/sc/qa/uitest/calc_tests9/tdf118938.py
b/sc/qa/uitest/calc_tests9/tdf118938.py
index eede90451e67..33f8cde75d82 100644
--- a/sc/qa/uitest/calc_tests9/tdf118938.py
+++ b/sc/qa/uitest/calc_tests9/tdf118938.py
@@ -9,6 +9,7 @@
from uitest.framework import UITestCase
from uitest.uihelper.common import get_url_for_data_file
from libreoffice.uno.propertyvalue import mkPropertyValues
+from com.sun.star.beans import PropertyValue
#Bug 118938 - FILESAVE to Microsoft Excel 2007-2013 XML (.xlsx) files as
read-only
# with additional password protection for editing