[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sc/qa sfx2/source

2023-09-21 Thread Henry Castro (via logerrit)
 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 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sc/qa sfx2/source

2023-06-11 Thread Caolán McNamara (via logerrit)
 sc/qa/unit/tiledrendering/tiledrendering.cxx |3 ++-
 sfx2/source/appl/appserv.cxx |4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit f1633dc0e06b046a9ca0f2fa53e7858be1584ffb
Author: Caolán McNamara 
AuthorDate: Fri Jun 9 15:27:12 2023 +0100
Commit: Andras Timar 
CommitDate: Sun Jun 11 14:54:48 2023 +0200

Related: tdf#155507 don't broadcast UI Theme change unless it did change

a problem since:

https://github.com/CollaboraOnline/online/commit/b6d4c88f9011845acae5c8537c0826055c8327a2

Change-Id: Iac1189ba7b892324b5f000f5f6240787b3209892
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152817
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 8e42f5c29a53..039cffe5ab0e 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -3231,9 +3231,10 @@ void ScTiledRenderingTest::testUndoReorderingMulti()
 
 void ScTiledRenderingTest::testGetViewRenderState()
 {
-// Add an empty dark scheme to avoid a warning
+// Add a pair of schemes, last added is the default
 svtools::EditableColorConfig aColorConfig;
 aColorConfig.AddScheme(u"Dark");
+aColorConfig.AddScheme(u"Light");
 
 ScModelObj* pModelObj = createDoc("empty.ods");
 int nFirstViewId = SfxLokHelper::getView();
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index f2dfca480c5d..418bcb88430b 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -602,8 +602,10 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
 SAL_WARN("sfx.appl", "FN_CHANGE_THEME: no theme name");
 break;
 }
+const OUString& rSchemeName = pNewThemeArg->GetValue();
 svtools::EditableColorConfig aEditableConfig;
-aEditableConfig.LoadScheme(pNewThemeArg->GetValue());
+if (aEditableConfig.GetCurrentSchemeName() != rSchemeName)
+aEditableConfig.LoadScheme(rSchemeName);
 break;
 }