[Libreoffice-commits] core.git: sc/qa sfx2/source
sc/qa/unit/tiledrendering/tiledrendering.cxx |3 ++- sfx2/source/appl/appserv.cxx |4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) New commits: commit d5a973fee90820b529e5fbafbef35917625ffd19 Author: Caolán McNamara AuthorDate: Fri Jun 9 15:27:12 2023 +0100 Commit: Caolán McNamara CommitDate: Sun Jun 11 22:16:30 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/+/152799 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx index 6eb2aa134e69..fd2413e9f0af 100644 --- a/sc/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx @@ -3058,9 +3058,10 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testUndoReorderingMulti) CPPUNIT_TEST_FIXTURE(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 7b233434dc57..2d57c7e562dc 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -583,8 +583,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; }
[Libreoffice-commits] core.git: sc/qa sfx2/source
sc/qa/uitest/calc_tests7/tdf150044.py | 69 ++ sfx2/source/doc/docfile.cxx | 13 +++--- 2 files changed, 76 insertions(+), 6 deletions(-) New commits: commit c7b6c9407ce109ab27257f4c1ec66b86b48622df Author: Balazs Varga AuthorDate: Thu Jul 21 08:27:47 2022 +0200 Commit: Balazs Varga CommitDate: Thu Jul 21 17:30:40 2022 +0200 tdf#150044 sc import: fix editing password in shared mode Set the readonly state back after we create the tempfile for shared files. It is necessary for later, when we checking the file is readonly or not and we need to give the editing password. TODO: filesave IO error is another bug Change-Id: Iafc4dc6e7ce825fc3b7fe18abaee65c014c49a0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137281 Tested-by: Jenkins Reviewed-by: Tünde Tóth Tested-by: Gabor Kelemen Tested-by: Balazs Varga Reviewed-by: Balazs Varga diff --git a/sc/qa/uitest/calc_tests7/tdf150044.py b/sc/qa/uitest/calc_tests7/tdf150044.py new file mode 100644 index ..6e42358d7b81 --- /dev/null +++ b/sc/qa/uitest/calc_tests7/tdf150044.py @@ -0,0 +1,69 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +from uitest.framework import UITestCase +from libreoffice.uno.propertyvalue import mkPropertyValues +from org.libreoffice.unotest import systemPathToFileUrl +from uitest.uihelper.common import select_by_text +from tempfile import TemporaryDirectory +import os.path + +class save_shared_readonly_with_password(UITestCase): + + def test_save_to_shared_ods(self): + +with TemporaryDirectory() as tempdir: +xFilePath = os.path.join(tempdir, "shared_readonly_with_password_tmp.ods") + +with self.ui_test.create_doc_in_start_center("calc"): +with self.ui_test.execute_dialog_through_command(".uno:ShareDocument", close_button="") as xShareDocumentDialog: +xShareCheckButton = xShareDocumentDialog.getChild("share") +xShareCheckButton.executeAction("CLICK", tuple()) +xOk = xShareDocumentDialog.getChild("ok") +# Save the document +with self.ui_test.execute_dialog_through_action(xOk, "CLICK", close_button="") as xSaveDialog: +xFileName = xSaveDialog.getChild("file_name") +xFileName.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xFileName.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) +xFileName.executeAction("TYPE", mkPropertyValues({"TEXT": xFilePath})) +xPasswordCheckButton = xSaveDialog.getChild("password") +xPasswordCheckButton.executeAction("CLICK", tuple()) +xOpen = xSaveDialog.getChild("open") + +with self.ui_test.execute_dialog_through_action(xOpen, "CLICK") as xPasswordDialog: +xReadonly = xPasswordDialog.getChild("readonly") +xReadonly.executeAction("CLICK", tuple()) +xNewPassword = xPasswordDialog.getChild("newpassroEntry") +xNewPassword.executeAction("TYPE", mkPropertyValues({"TEXT": "password"})) +xConfirmPassword = xPasswordDialog.getChild("confirmropassEntry") +xConfirmPassword.executeAction("TYPE", mkPropertyValues({"TEXT": "password"})) + +self.ui_test.wait_until_file_is_available(xFilePath) + +with self.ui_test.execute_dialog_through_command(".uno:Open", close_button="") as xOpenDialog: +# Open document +xFileName = xOpenDialog.getChild("file_name") +xFileName.executeAction("TYPE", mkPropertyValues({"TEXT": xFilePath})) +xOpenBtn = xOpenDialog.getChild("open") +xOpenBtn.executeAction("CLICK", tuple()) + +xDialog = self.ui_test.wait_for_top_focus_window('SharedWarningDialog') +xOk = xDialog.getChild("ok") +xOk.executeAction("CLICK", tuple()) + +document = self.ui_test.get_component() +self.assertTrue(document.isReadonly()) + +with self.ui_test.execute_dialog_through_command(".uno:EditDoc") as xDialog: +# check that we have a password dialog for editing the shared document +xPassword = xDialog.getChild("newpassEntry") +xPassword.executeAction("TYPE", mkPropertyValues({"TEXT": "password"})) + +
[Libreoffice-commits] core.git: sc/qa sfx2/source slideshow/source starmath/source svx/source
sc/qa/unit/subsequent_export-test.cxx| 24 +++ sfx2/source/bastyp/bitset.cxx|6 +-- slideshow/source/engine/shapes/drawinglayeranimation.cxx |8 ++--- starmath/source/rect.cxx |8 ++--- svx/source/gallery2/galtheme.cxx |2 - 5 files changed, 24 insertions(+), 24 deletions(-) New commits: commit 022b1b2a40fcaf8d201081dead44c1d3346d1972 Author: udareechkDate: Thu Sep 21 01:30:46 2017 +0530 tdf#96505 Get rid of cargo cult long integer literals Removed 0L, 1L and 2L Change-Id: Icb38de1cdd8e1215a86118b0c8af993025fd790e Reviewed-on: https://gerrit.libreoffice.org/42567 Reviewed-by: Michael Stahl Tested-by: Michael Stahl diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index ee8e33433bab..43faffb75127 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -2299,18 +2299,18 @@ void ScExportTest::testExcelCellBorders( sal_uLong nFormatType ) SvxBorderLineStyle mnStyle; long mnWidth; } aChecks[] = { -{ 1, SvxBorderLineStyle::SOLID, 1L }, // hair -{ 3, SvxBorderLineStyle::DOTTED, 15L }, // dotted -{ 5, SvxBorderLineStyle::DASH_DOT_DOT, 15L }, // dash dot dot -{ 7, SvxBorderLineStyle::DASH_DOT, 15L }, // dash dot -{ 9, SvxBorderLineStyle::FINE_DASHED, 15L }, // dashed -{ 11, SvxBorderLineStyle::SOLID,15L }, // thin -{ 13, SvxBorderLineStyle::DASH_DOT_DOT, 35L }, // medium dash dot dot -{ 17, SvxBorderLineStyle::DASH_DOT, 35L }, // medium dash dot -{ 19, SvxBorderLineStyle::DASHED, 35L }, // medium dashed -{ 21, SvxBorderLineStyle::SOLID,35L }, // medium -{ 23, SvxBorderLineStyle::SOLID,50L }, // thick -{ 25, SvxBorderLineStyle::DOUBLE_THIN, -1L }, // double (don't check width) +{ 1, SvxBorderLineStyle::SOLID, 1 }, // hair +{ 3, SvxBorderLineStyle::DOTTED, 15 }, // dotted +{ 5, SvxBorderLineStyle::DASH_DOT_DOT, 15 }, // dash dot dot +{ 7, SvxBorderLineStyle::DASH_DOT, 15 }, // dash dot +{ 9, SvxBorderLineStyle::FINE_DASHED, 15 }, // dashed +{ 11, SvxBorderLineStyle::SOLID,15 }, // thin +{ 13, SvxBorderLineStyle::DASH_DOT_DOT, 35 }, // medium dash dot dot +{ 17, SvxBorderLineStyle::DASH_DOT, 35 }, // medium dash dot +{ 19, SvxBorderLineStyle::DASHED, 35 }, // medium dashed +{ 21, SvxBorderLineStyle::SOLID,35 }, // medium +{ 23, SvxBorderLineStyle::SOLID,50 }, // thick +{ 25, SvxBorderLineStyle::DOUBLE_THIN, -1 }, // double (don't check width) }; ScDocShellRef xDocSh = loadDoc("cell-borders.", nFormatType); diff --git a/sfx2/source/bastyp/bitset.cxx b/sfx2/source/bastyp/bitset.cxx index 66dbcf2b7db3..49a6a75dac0f 100644 --- a/sfx2/source/bastyp/bitset.cxx +++ b/sfx2/source/bastyp/bitset.cxx @@ -29,7 +29,7 @@ IndexBitSet& IndexBitSet::operator-=(sal_uInt16 nBit) { sal_uInt16 nBlock = nBit / 32; -sal_uInt32 nBitVal = 1L << (nBit % 32); +sal_uInt32 nBitVal = 1 << (nBit % 32); if ( nBlock >= nBlocks ) return *this; @@ -48,7 +48,7 @@ IndexBitSet& IndexBitSet::operator-=(sal_uInt16 nBit) IndexBitSet& IndexBitSet::operator|=( sal_uInt16 nBit ) { sal_uInt16 nBlock = nBit / 32; -sal_uInt32 nBitVal = 1L << (nBit % 32); +sal_uInt32 nBitVal = 1 << (nBit % 32); if ( nBlock >= nBlocks ) { @@ -78,7 +78,7 @@ IndexBitSet& IndexBitSet::operator|=( sal_uInt16 nBit ) bool IndexBitSet::Contains( sal_uInt16 nBit ) const { sal_uInt16 nBlock = nBit / 32; -sal_uInt32 nBitVal = 1L << (nBit % 32); +sal_uInt32 nBitVal = 1 << (nBit % 32); if ( nBlock >= nBlocks ) return false; diff --git a/slideshow/source/engine/shapes/drawinglayeranimation.cxx b/slideshow/source/engine/shapes/drawinglayeranimation.cxx index bff671de8804..63006b5af07a 100644 --- a/slideshow/source/engine/shapes/drawinglayeranimation.cxx +++ b/slideshow/source/engine/shapes/drawinglayeranimation.cxx @@ -435,7 +435,7 @@ void ActivityImpl::ImpForceScrollTextAnimNodes() // init loop ScrollTextAnimNode aInitNode( -nLoopTime, 1L, +nLoopTime, 1, fRelativeStartValue, fRelativeEndValue, mnFrequency, false); maVector.push_back(aInitNode); @@ -468,7 +468,7 @@ void ActivityImpl::ImpForceScrollTextAnimNodes() { // endless main loop ScrollTextAnimNode aMainNode( -nLoopTime, 0L, +nLoopTime, 0, fRelativeStartValue,