summaryrefslogtreecommitdiff
path: root/sfx2/qa
AgeCommit message (Collapse)Author
2021-02-23tdf#139039 sfx2 store: fix export to PDF when dir name is URL-encodedMiklos Vajna
Regression from commit 5259ab8104cfba60c40748ed0cd59d93df038c5b (sfx2 store: create temp files next to local files, 2018-01-08), the problem was that the directory hosting the input ODT file was called "Bugzilla%C3%BF" (URL-encoded from "ÿ"), we got this as "Bugzilla%25C3%25BF" (encoded from directory name), but we forgot to decode it before passing this URL to the utl::TempFile ctor as a parent directory, which resulted in failing to save as PDF, and crashing on DOCX export. Note that in practice this only caused a problem on Windows. (cherry picked from commit aaf7fe0326b3be088a5440525363317fb3d0f158) Change-Id: I5fc8a356b63efc2f16405a14ee59a061b52c5205 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111372 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-02-11tdf#140280 sfx2: fix crash on double-clicking a no-sign shape in read-only modeMiklos Vajna
Don't assume that all shapes provide an InteropGrabBag UNO property, check for it. (cherry picked from commit c76e6307b6cf33bda0cfa12647ed0342aecc1b29) Change-Id: I6347c54b0631c37154424babbfbd52f802af57d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110751 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-22tdf#123936 Formatting files in module sfx2 with clang-formatPhilipp Hofer
Change-Id: I0ddd7b531cbf9aed6a3834e3cd15c7fe3644736e (cherry picked from commit 92daf140419e4539f6843e30428e786c3e655dcc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105706 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Jenkins
2020-11-05clean up some temp files after running testsAndras Timar
Change-Id: Ia28e96cf1f6ec476f202e99877fa80e93d691278 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105314 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-09-10Remove some unused includesMiklos Vajna
Change-Id: I296597faa21c995c02f68726abd507d0d46c7f86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102335 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-08-19sd signature line: preserve current page after signingMiklos Vajna
Once the user adds a visible signature to a PDF file, we reload the document, so what you see on the screen matches what's in the file (and you can add a next signature). Make sure that in case the signature is not on the first page, the current page state is preserved. Change-Id: Ia1780ce5602ee350855b6dec8340a65e63bf2d4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100999 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-07-01Upcoming improved loplugin:staticanonymous -> redundantstatic: sfx2Stephan Bergmann
Change-Id: I67ac4f4ed5ddd488c3fd5bae83d1fce18d6213d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97662 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-16vcl: namespace PDFWriterImpl consistentlyMiklos Vajna
We had a mix of 'using namespace vcl;' and 'namespace vcl {', standardize on the later. Change-Id: I088bb0e0c03f712242427bf6a0b31dd17755b9dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96475 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-06-16sfx2: add uitest for pdf signingMiklos Vajna
Fails with 058caeef45f9abf12e4e243aafbbb1c2ebcbc057 (tdf#130354 sfx2: make PDF signing UI work again, 2020-06-02) reverted. Change-Id: I4f4ffaeed4b93c033bc2fdaa76ff817d172c8853 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96469 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-06-05Upcoming loplugin:elidestringvar: sfx2Stephan Bergmann
Change-Id: I58b77dd04fb0de28fcbf34a22ed73fe248f0c6b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95547 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-07fix memory leak of xmlDoc objectsNoel Grandin
in unit tests Change-Id: Id16731bbbe2f1b0e3642722d77aba04fc98db4cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93508 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-01improve loplugin:makesharedNoel Grandin
to find places where we are converting stuff to unique_ptr instead of using std::make_shared. As a bonus, this tends to find places where we are using shared_ptr where we can instead be using unique_ptr avoiding the locking overhead. Change-Id: I1b57bbc4a6c766b48bba8e25a55161800e149f62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93207 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-12Revert "loplugin:constfields in sfx2"Noel Grandin
This reverts commit 8411b80d46765f1ddd4e37aa634ec963dcf4b04f. Change-Id: Ibf3aa3ce4bfedf9d47001ad824db7c48ff093a21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90416 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-07test: move component context from subclasses to BootstrapFixtureMiklos Vajna
To avoid duplication. Change-Id: I0ee7c26d5d55bd868ead04c77e7f4ef2582f90e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88138 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-21tdf#42949 Fix IWYU warnings in sfx2/source/[s-v]*/*cxx and sfx2/qaGabor Kelemen
Also quickly recheck other parts of sfx2 after recent welding there Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Iff847f142557b5b253887add12c005821554ef65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86891 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-08Grammar fixesAndrea Gelmini
Change-Id: I6ac6f6abb601aa254e94612e6826488393de8e3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86383 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2019-10-09this text -> this testCaolán McNamara
Change-Id: Ibcbd9efb72b0081a3eb6da6df41b9b9fac0584ea Reviewed-on: https://gerrit.libreoffice.org/80519 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-20Fix typosAndrea Gelmini
Change-Id: I2b21ba71cd555a88e015871e4f6f5a7747615520 Reviewed-on: https://gerrit.libreoffice.org/77763 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-21Fix typoAndrea Gelmini
"an OLE", to complete: https://gerrit.libreoffice.org/#/c/75983/ Change-Id: Idd5b9286348b4fa1e3382983c72b010654a1f4c2 Reviewed-on: https://gerrit.libreoffice.org/76038 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-07-11Fix typoAndrea Gelmini
Change-Id: If83573ab4b427b84f5c125d1fc2509996ed8bdfc Reviewed-on: https://gerrit.libreoffice.org/75398 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-19Small fixes on autoredactdialog.uiMuhammet Kara
Change-Id: I14d8883d8a0bcba02327395a17bc56978649de4b Reviewed-on: https://gerrit.libreoffice.org/74374 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2019-05-13Handle *link return value in sfx2 testJan-Marek Glogowski
Change-Id: I63008858558312b5fb7378249c56fbc3729c9a19 Reviewed-on: https://gerrit.libreoffice.org/72180 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-03-25new loplugin:unoqueryNoel Grandin
look for places we are doing code like: Reference<XProperty>(model, css::uno::UNO_QUERY)->getAsProperty() which might result in a SIGSEGV is the query fails Change-Id: I5cbdbc9e64bd0bed588297c512bf60cbacb9442e Reviewed-on: https://gerrit.libreoffice.org/69044 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-13tdf#123293 Add testSamuel Mehrbrodt
Test for commit 0a5ca5768f56db481dd3b947b3dddaab7ed96450 Change-Id: I53b72c385d9ef4d51cefa687f07a75c9520d3e71 Reviewed-on: https://gerrit.libreoffice.org/69165 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-11-07CppunitTest_sfx2_misc: use CPPUNIT_TEST_FIXTURE()Miklos Vajna
Allows not spelling out the test names 3 times. Change-Id: I394bd4c796cb2bc65cacd9f61bd37162db48a810 Reviewed-on: https://gerrit.libreoffice.org/62976 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-09loplugin:constfields in sfx2Noel Grandin
and we find that bSplitable in SfxDockingWindow is always true, ever since commit 4bd28a2fee0d36c67911019eeb7d934838e27cad Date: Tue Jan 29 15:27:40 2008 +0000 INTEGRATION: CWS fwk82_SRC680 (1.45.138); FILE MERGED so we can remove all of the non-splittable code there. ` Change-Id: Ia7fe607ed02d1a7c69a92bab57e220b19f0e6e87 Reviewed-on: https://gerrit.libreoffice.org/61550 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-26Fix typoAndrea Gelmini
Change-Id: Ic0727720b1df3a26273e8dbe2a1a9f872f2a3e41 Reviewed-on: https://gerrit.libreoffice.org/61007 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-09-22try other markupCaolán McNamara
Change-Id: I1d2ff100023ac6d94ea6ec65844cf509988ac90b Reviewed-on: https://gerrit.libreoffice.org/60894 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-21coverity#1439338 silence Time of check time of useCaolán McNamara
Change-Id: I69d17f9190c165ed787b68febd2cdb37c4e16b9e Reviewed-on: https://gerrit.libreoffice.org/60852 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-15coverity#1439340 Unchecked return value from libraryCaolán McNamara
Change-Id: I62caea8487d620d09f5aefad585afa3e5b37e182 Reviewed-on: https://gerrit.libreoffice.org/60519 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-07DeInitVCL in PythonTestStephan Bergmann
After b9757f5cfdb62b24e79eeb4c0ef0c8b98056cecf "loplugin:useuniqueptr in vcl/svdata" ASan/UBSan builds started to fail (like <https://ci.libreoffice.org//job/lo_ubsan/1025/>) at the end of PythonTest_dbaccess_python (and probably other PythonTests), when during exit the static utl::ConfigManager instance already happens to be destroyed by the time the static ImplSVData's mpSettingsConfigItem is destroyed (which would normally be cleared during DeInitVCL, if PythonTests would call that, and which in the past had thus simply been leaked in PythonTests when that mpSettingsConfigItem was a plain pointer instead of std::unique_ptr). So ensure that PythonTests that initialize VCL also call DeInitVCL, via a new private_deinitTestEnvironment, complementing the existing private_initTestEnvironment. However, while private_initTestEnvironment is called once (typically via UnoInProcess.setUp, which internally makes sure to only call it once) as soon as the first executed test needs it, private_deinitTestEnvironment must be called once after the lasts test needing it has executed. The only way that I found to do that is to override unittest.TextTestResult's stopTestRun method, which is called once after all tests have been executed. Hence a new test runner setup in unotest/source/python/org/libreoffice/unittest.py that is now called from solenv/gbuild/PythonTest.mk. That revealed a few places in PythonTests that didn't yet close/delete documents that they had opened, which has now been added. One remaining problem then is that classes like SwXTextDocument and friends call Application::GetSolarMutex from their dtors, via sw::UnoImplPtrDeleter (a "Smart pointer class ensuring that the pointed object is deleted with a locked SolarMutex", sw/inc/unobaseclass.hxx). That means that any PyUNO proxies to such C++ objects that remain alive after private_deinitTestEnvironment will cause issues at exit, when Python does a final garbage collection of those objects. The ultimate fix will be to remove that unhelpful UnoImplPtrDeleter and its locking of SolarMutex from the dtors of UNO objects; until then, the Python code is now sprinkled with some HACKs to make sure all those PyUNO proxies are released in a timely fashion (see the comment in unotest/source/python/org/libreoffice/unittest.py for details). (Also, it would probably help if UnoInProcess didn't keep a local self.xDoc around referencing (just) the last result of calling one of its open* methods, confusingly making it the responsibility of UnoInProcess to close that one document while making it the responsibility of the test code making the other UnoInProcess.open* calls to close any other documents.) Change-Id: Ief27c81e2b763e9be20cbf3234b68924315f13be Reviewed-on: https://gerrit.libreoffice.org/60100 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-04tdf#119381 sfx2 store: don't break symlink targetsMiklos Vajna
osl::File::move() would not follow symlinks for the target, so don't move the file in that case. Change-Id: I907e1ba8db04dad670c884ea0283947f953117da Reviewed-on: https://gerrit.libreoffice.org/59949 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-28tdf#119050 sfx2 store: don't inherit temp file permissions when overwritingMiklos Vajna
The too aggressive error handling in commit fb04780cf8523ad4e900ae8b9cecbe7a2697a12a (tdf#116117 sfx2 store: don't inherit temp file permissions when renaming, 2018-03-12) means that if the file is already there, then we don't try to stat() it; even if there is no problem with that. Change-Id: Ie0b9084064834e339bcae3ad7b4a35c54cb9d3c2 Reviewed-on: https://gerrit.libreoffice.org/59684 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-08-09Set umask /before/ using itStephan Bergmann
The test used to fail when umask originally was e.g. 077. Change-Id: I21d346532698feebccc8bb3f6cb9a9dd3002a20e Reviewed-on: https://gerrit.libreoffice.org/58757 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-09Improve wording of commentStephan Bergmann
...as discussed on #libreoffice-dev Change-Id: I5314bdcaf0e023db615c68785b76f4ee6144b079 Reviewed-on: https://gerrit.libreoffice.org/58758 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-06-01loplugin: look for CPPUNIT_ASSERT_EQUALS with params swappedNoel Grandin
idea originally from either tml or moggi, can't remember which Change-Id: Id78d75035036d3aa1666e33469c6eeb38f9e624d Reviewed-on: https://gerrit.libreoffice.org/55126 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-16Fix typosAndrea Gelmini
Change-Id: Ife28cd9399cfcb375bad764dac7424eda50d430d Reviewed-on: https://gerrit.libreoffice.org/52198 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-04-01fix some openoffice bugzilla linksdennisroczek
* remove redirects * use https links * replace old attchment links with working ones Change-Id: Ic9a154f46e142138f0adea7d7b8be3b6cfe8af18 Reviewed-on: https://gerrit.libreoffice.org/52224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-29coverity#1433647 Unchecked return value from libraryCaolán McNamara
Change-Id: I05c91dc21ddcef0f64f712f4fe9a5736b0cee0f9 Reviewed-on: https://gerrit.libreoffice.org/52059 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-26sfx2 store: avoid rename() for files with >1 hard link countMiklos Vajna
Rename would break the hard link; in practice e.g. Online's 'make run' debug feature depends on not breaking hardlinks. Change-Id: Id3ac19493b6b473274b7ed53a4ca06fc34bc1668 Reviewed-on: https://gerrit.libreoffice.org/51858 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-03-13tdf#116117 sfx2 store: don't inherit temp file permissions when renamingMiklos Vajna
This has to be handled explicitly, otherwise the tempfile permissions (which intentionally don't respect umask()) would be preserved on rename(). Change-Id: I0a2681dbf06986e73f6e12d294e35e87b93b4f8a Reviewed-on: https://gerrit.libreoffice.org/51169 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-01-16Fix typosAndrea Gelmini
Change-Id: I078626eaa3155cc429320cc8c1532003b382b22a Reviewed-on: https://gerrit.libreoffice.org/47855 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-12sfx2 store: add API to allow disabling thumbnails only for a single saveMiklos Vajna
This is similar to the officecfg::Office::Common::Save::Document::GenerateThumbnail config setting, but here we allow configuring this at a per-save basis, not persistently. Change-Id: Ieb5bd57f1d8fc9e211011f2647276d985cf53131 Reviewed-on: https://gerrit.libreoffice.org/47812 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-24sfx2: finally resolve FIXME and test custom metadataMichael Stahl
Yay, we have assertXPath now! Change-Id: I74dedf535f5f0997dc94b3654558ccd451db813a
2017-09-21Fix creation of array cloneStephan Bergmann
The original code caused ClassCastException when the return value of toArray() was actually of type Object[] instead of Statement[]. Change-Id: I6cd451404b7bd22a9a0c3490b6982cc38e79d1b2
2017-06-26Fix typosAndrea Gelmini
Change-Id: I2ce725f87ee6f8ebcffbac268cc7e7f8850023e5 Reviewed-on: https://gerrit.libreoffice.org/39232 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-26loplugin:oncevar in sfx2Noel Grandin
Change-Id: I9aadcb9a12ef9b0c3f93ea255f2542e51d31fbf7 Reviewed-on: https://gerrit.libreoffice.org/39242 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-04Fix spellingTor Lillqvist
Alternatively, we could build a higher wall. Change-Id: Id2ba91c85557ed6ac9e45ba2d9f51ca0e019cd32
2017-02-06Add missing #includesStephan Bergmann
...and remove some unncessary using directives/declarations, in preparation of removing now-unnecessary #includes from cppumaker-generated files, post e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception specifications". Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-01-12sfx2: fix race in JunitTest UndoManager.checkBrokenScripts()Michael Stahl
1) checkBrokenScripts(complex.sfx2.UndoManager) java.lang.NullPointerException at complex.sfx2.UndoManager.impl_clickButton(UndoManager.java:432) at complex.sfx2.UndoManager.checkBrokenScripts(UndoManager.java:188) impl_clickButton() gets the wrong accessible object and throws. The .uno:SwitchControlDesignMode is dispatched async, so make sure it's processesed before trying to click the button. See UnoControl::getAccessibleContext() "in design mode, use a fallback". This was running in "rr record --chaos". Change-Id: Iee9f25c2fff56d32e6b579b5d44ee6df9870fd8b