summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2018-11-08tdf#113624 EMF+ Fix shift of DrawString without StringFormatBartosz Kosiorek1-3/+3
While we are drawing DrawString record, in most cases optional StringFormat information is available. If StringFromat information is available then we should use default values. For LeadingMargin for String the default value is 1/6 inch. Change-Id: I4a0a68df5ebe74e810f8b5864232b477b3aac255 Reviewed-on: https://gerrit.libreoffice.org/62927 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2018-11-02tdf#45904 Move _XEnumerationAccess Java Tests to C++Rahul Gurung2-0/+33
Change-Id: Id0aa9f3587fc6427bdbd938293eb3cc564c52bb1 Reviewed-on: https://gerrit.libreoffice.org/61731 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-11-01Clean up file by sorting entriesJens Carl1-19/+19
Change-Id: If24bcf1a3c6aaa6929230e379e364507a5d5fe9b Reviewed-on: https://gerrit.libreoffice.org/62713 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-10-30tdf#116989: add unit testMike Kaganski1-13/+38
Change-Id: Ia8b5478b0d2a15f91add4ee76455e73c2c970392 Reviewed-on: https://gerrit.libreoffice.org/62544 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-24Simplify containers iterations in test..toolsArkadiy Illarionov2-6/+5
Use range-based loop or replace with STL functions. Change-Id: If8fac9236a4696c8e56c0e81c60c429782581b96 Reviewed-on: https://gerrit.libreoffice.org/62262 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-24remove more rtl::OUString and OString prefixesNoel Grandin1-1/+1
which seem to have snuck back in since the great rounds of removals. Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1 Reviewed-on: https://gerrit.libreoffice.org/62229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-24clang-tidy performance-unnecessary-copy-init in test..xmlscriptNoel Grandin3-5/+4
Change-Id: I1ae16467a8e58e8a50f59b7a140e9f8b68bde07e Reviewed-on: https://gerrit.libreoffice.org/62254 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-22Let CppuniTest's unoexceptionprotector handle uncaught exceptionsStephan Bergmann1-25/+22
(it nicely prints exceptions' messages, too) Change-Id: I66bb4fd856d0249a7dc5bc58975b6ea322f9a9ca Reviewed-on: https://gerrit.libreoffice.org/62165 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-19clang-tidy readability-container-size-emptyNoel Grandin1-2/+2
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422 Reviewed-on: https://gerrit.libreoffice.org/61967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-18clang-tidy readability-simplify-boolean-exprNoel Grandin1-4/+1
Change-Id: I78fa01a6c803dec782488490b730af3a11814d64 Reviewed-on: https://gerrit.libreoffice.org/61902 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-16tdf#45904 Move _XTableChartsSupplier Java Tests to C++Rahul Gurung2-0/+32
Change-Id: I4cd0b25cefce60e8253df65d5136d15d690dbc38 Reviewed-on: https://gerrit.libreoffice.org/61540 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-10-12clang-tidy misc-throw-by-value-catch-by-referenceNoel Grandin1-2/+2
Change-Id: I04750771b63551fd3df522753a4ed21b8d5c42f3 Reviewed-on: https://gerrit.libreoffice.org/61680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-03loplugin:constfields in swNoel Grandin3-16/+19
Change-Id: I1eb6583bb9ec815bc0564b0d7c676f5b1fb9045f Reviewed-on: https://gerrit.libreoffice.org/61177 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-28Added base as a data providerVikas4-0/+3
Change-Id: Iaf23b70f303cd05bcf6450fed1246de894285526 Reviewed-on: https://gerrit.libreoffice.org/57447 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-09-25screenshots: add better diagnostics for failing CIThorsten Behrens1-16/+25
Output current UI file being processed, in case any random exception pops up. Change-Id: If6937f70718cc801494f424f7e09e9cb8c8758f0 (cherry picked from commit fb5d849cdeebe5299da399efc9d0ca36b6fc192b) Reviewed-on: https://gerrit.libreoffice.org/60964 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-09-22tdf#45904 Move _XIndent Java Tests to C++Rahul Gurung2-0/+56
Change-Id: I65b594db595f0e08a50a9ea18baf44c496cf18e3 Reviewed-on: https://gerrit.libreoffice.org/60218 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-09-17New loplugin:externalStephan Bergmann2-3/+3
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-10tdf#45904 Move _XMergeable Java Tests to C++Rahul Gurung2-0/+35
Change-Id: I37dc759a64301810a7d32a3f160b9bcbf546dd01 Reviewed-on: https://gerrit.libreoffice.org/60211 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-09-10tdf#45904 Move _XChild Java tests to C++Rahul Gurung2-0/+41
Change-Id: Idaf883eadb95792bdb333dea487be084b1722194 Reviewed-on: https://gerrit.libreoffice.org/60146 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-09-07DeInitVCL in PythonTestStephan Bergmann1-0/+6
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-06clang-tidy performance-unnecessary-value-paramNoel Grandin1-2/+2
Change-Id: I69247498e13331f6ef84afeb242479f8fb1178a8 Reviewed-on: https://gerrit.libreoffice.org/60068 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-06tdf#45904 Move _XColumnRowRange Java tests to C++Rahul Gurung2-0/+38
Change-Id: I35b5fc2f18867c386c8c92d1d7a3a0823bd07b78 Reviewed-on: https://gerrit.libreoffice.org/59863 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-09-05fix CppunitTest_cui_dialogs_test assertCaolán McNamara1-1/+1
Change-Id: I72bc0067cb0f0ecc648f216aad1c7e196749daff Reviewed-on: https://gerrit.libreoffice.org/60019 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-05tdf#45904 Move _XCell Java tests to C++Rahul Gurung2-0/+81
Change-Id: I79d8f42932f81bf8a2eb38fbd3eabbdf56c09111 Reviewed-on: https://gerrit.libreoffice.org/59901 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-08-30Fix typoAndrea Gelmini1-1/+1
Change-Id: Ib7d79f9ea2192e798891ea1c2a9d547c8ddf3574 Reviewed-on: https://gerrit.libreoffice.org/59790 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-08-30tdf#45904 Move _XCellCursor Java tests to C++Rahul Gurung2-0/+129
Change-Id: Iebada370e4fa58c5e21dd724789b5f05357a0faa Reviewed-on: https://gerrit.libreoffice.org/59610 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-08-13loplugin:returnconstant in hwpfilter,testNoel Grandin1-2/+1
Change-Id: I7c7c450f1da4ac3205148d2de8b344f0735f92ba Reviewed-on: https://gerrit.libreoffice.org/58881 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-02Add missing sal/log.hxx headersGabor Kelemen2-0/+2
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from test to vbahelper Change-Id: Ia7f773511624099505d6a36a8d6e23c0cde4a737 Reviewed-on: https://gerrit.libreoffice.org/58225 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-29loplugin:stringloop in variousNoel Grandin1-4/+4
Change-Id: Ic2436c6d94729211cd5bc72fee18af228381e4a3 Reviewed-on: https://gerrit.libreoffice.org/58250 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-29cppcheck: useInitializationList in test to xmloffJochen Nitschke1-4/+3
Change-Id: I50545784c5412ab7767f401c6e40058a1d0bfab0 Reviewed-on: https://gerrit.libreoffice.org/58262 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-09Fix typoTor Lillqvist1-1/+1
Change-Id: I73b808f7dc34f1bdd4b84086b79cf56541e5072c
2018-07-08tdf#45904 Move _XSheetCellCursor Java tests to C++Jens Carl2-2/+141
Change-Id: I9d12f9a13d3e0c59b7a28ff91563878efde22b68 Reviewed-on: https://gerrit.libreoffice.org/45067 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-07-08loplugin:passstuffbyrefNoel Grandin1-2/+1
Change-Id: I6e6c47020073ec183c6c8ff9cd026a0bec23b177 Reviewed-on: https://gerrit.libreoffice.org/57088 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-02tdf#117923: handle direct formatting for numbering in .docMike Kaganski1-1/+6
Since commit df07d6cb9f62c0a2c4b29bd850d4efb4fcd4790b, we do for DOCX. DOC also has this problem, so set the relevant compatibility flag on import for this format, too. Change-Id: I3aef593341edffa878a06566da815cb72aa38004 Reviewed-on: https://gerrit.libreoffice.org/56812 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-06-29schema: ODF 1.3 + libreoffice extensions schemaMichael Stahl1-1/+3
Build this with RelaxNG <include> feature instead of a complete schema. This isn't bad but could work better if the schema were a little more modular... In order to track down all the uses of extension namespaces like loext, invoke the validator without "-e". Change-Id: I92a666fc54c25d66cea38decdc188d60de2a0b74 Reviewed-on: https://gerrit.libreoffice.org/56488 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-06-29test: invoke ODF validator with custom schemasMichael Stahl1-3/+14
This requires a new validator jar for the -m flag to specify MathML schema. Change-Id: If99cf70f386a16a90ba676f8f5ff65a537c9ce56 Reviewed-on: https://gerrit.libreoffice.org/56487 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-06-29tdf#45904 Move _XDocumentAuditing Java test to C++Jens Carl2-0/+142
Change-Id: Ic03e42c9c2ff27579b442dc8d1408deaea839ec4 Reviewed-on: https://gerrit.libreoffice.org/56644 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-06-14tdf#45904 Move _XFormulaQuery Java tests to C++Jens Carl2-0/+67
Enable tests for ScTableSheetObj and fixes #i86793. Change-Id: Ic9914fd74a70034e4adc7e55203c92935a472f9d Reviewed-on: https://gerrit.libreoffice.org/55782 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-06-13tdf#45904 Move remaining _XCellRangeReferrer Java tests to C++Jens Carl1-6/+4
Move remaining _XCellRangeReferrer tests to C++ and partly fix #i84656. Change-Id: I77cc8550888f460a6ae265816907a19a81cbe871 Reviewed-on: https://gerrit.libreoffice.org/55732 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-06-12tdf#45904 Move _XCellRangeData Java test to C++Jens Carl1-11/+34
Move the remaining tests to C++ and also enable/fix #i84671 by creating test cases for ScTableSheetObj. Change-Id: I9412fe7a1947b9afb4343a8f5726eccf9ea371a3 Reviewed-on: https://gerrit.libreoffice.org/55657 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-06-08look for unnecessary calls to Reference::is() after an UNO_QUERY_THROWNoel Grandin13-23/+0
Since the previous call would throw if there was nothing to be assigned to the value. Idea from tml. Used the following script to find places: git grep -A3 -n UNO_QUERY_THROW | grep -B3 -F 'is()' Change-Id: I36ba7b00bcd014bdf16c0455ab91056f82194969 Reviewed-on: https://gerrit.libreoffice.org/55417 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-06-01loplugin: look for CPPUNIT_ASSERT_EQUALS with params swappedNoel Grandin2-6/+6
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-05-30use BitmapEx in the screenshot stuffNoel Grandin1-3/+3
part of the process of moving Bitmap usage to BitmapEx Change-Id: I4f02f8aa60d19a3639d623a998491447adf79e15 Reviewed-on: https://gerrit.libreoffice.org/55031 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-12make Bitmap/BitmapEx constructors explicitNoel Grandin1-1/+1
and add BitmapEx::operator=(Bitmap const &) Image::Image(Bitmap const &) to lessen the fallout Change-Id: Iff5fab88d167a7be739c370c9933d36c297bc61c Reviewed-on: https://gerrit.libreoffice.org/54162 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-11test: force EnableHeadlessMode() for PythonTestMichael Stahl2-3/+3
Clearly this should be on, but we can't easily pass in a command line argument like is done in CppunitTest because that doesn't end up in rtl_getAppCommandArg(), which is empty since it's the python.bin process, so we'd have to find a way to get the argv from python first... Change-Id: I9321a9f933f388a659643898e0dc38f295f2068c Reviewed-on: https://gerrit.libreoffice.org/54083 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-05-09extend property tester - add optional variants and colorTomaž Vajngerl1-3/+47
Change-Id: Iad72470b5f1fc5405673d2d7781bc59002a3a44a Reviewed-on: https://gerrit.libreoffice.org/53988 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-05-09move unoapi_property_tester to include so it can be used outsideTomaž Vajngerl6-126/+4
Change-Id: Id6eebba7d80aa287274e921fdd872d37d0e09ef0 Reviewed-on: https://gerrit.libreoffice.org/53986 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-05-08fix make screenshotCaolán McNamara1-1/+6
Change-Id: I781dfbc7bb09afd0c2325bcc9fd98e31ec5c4f39 Reviewed-on: https://gerrit.libreoffice.org/53983 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-05-07Make screenshot folders = ALL_LANGSOlivier Hallot1-3/+1
Makes it easier to copy to help media files. Change-Id: I0f0c9272fbc0f8df826af74ff79bfbb171a17a65 Reviewed-on: https://gerrit.libreoffice.org/53903 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2018-05-05Fix typosAndrea Gelmini2-2/+2
Change-Id: I92078fdece135754744d85424956dbb071f3899e Reviewed-on: https://gerrit.libreoffice.org/53638 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>