Commit Graph
52 Commits
Author SHA1 Message Date
Stephan Bergmann 106ea87205 Remove _TYPED suffix from tools/link.hxx macros
...which was introduced with 3ead3ad52f "Gradually
typed Link" to distinguish the new, typed versions from the old, untyped ones,
but is no longer necessary since 382eb1a23c
"remove untyped Link<>" removed the old versions.

Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-05 07:56:12 +02:00
Stephan Bergmann 4714083279 Remove duplication of "set up VCL" code
The "this is called from pyuno" version in test/source/bootstrapfixture.cxx had
had an empty deinitHook, but it appears to not hurt to give it the same
deinitHook as the version in test/source/vclbootstrapprotector.cxx had had.

Make test::setUpVcl accessible from outside module test for an upcoming use in
<https://gerrit.libreoffice.org/#/c/28322/16> "tdf#99402: fix Metafile Font
handling".

Change-Id: I1d609445690b6ee5e331aa322cd4bf434a3de78e
2016-08-29 17:54:04 +02:00
Noel Grandin 6e72f0251b new loplugin unnecessary override
Change-Id: I88d3e33823d68745b98625050a8a274f9ef04bcb
Reviewed-on: https://gerrit.libreoffice.org/27135
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-15 14:05:41 +00:00
Vasily Melenchuk c3453ea246 Add MS binary format validator support in test fixture
bffvalidator (Microsoft Office Binary File Format Validator) can now be
used for verification of MS binary export tests

Change-Id: Ibc65e64726a454cdd33946006b36427b9cc6fbd2
Reviewed-on: https://gerrit.libreoffice.org/26405
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2016-06-17 11:20:06 +00:00
Stephan Bergmann c838f2ed9f loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: Ie66903c2aae5535a507e1549b58d892b80237842
2016-04-20 17:27:27 +02:00
Stephan Bergmann 5d353ff608 loplugin:nullptr (automatic rewrite)
Change-Id: I31e61fc91dff70f32143d84ccf308f2bbc9c740e
2015-11-10 10:31:53 +01:00
Noel Grandin 74ce05b940 convert Link<> to typed
Change-Id: I280473a7a9069a86388f608bddc8e48879771bc9
Reviewed-on: https://gerrit.libreoffice.org/18815
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-24 16:20:51 +00:00
Noel Grandin 55dda8e8d0 convert Link<> to typed
Change-Id: I92df586295c11bc9e9276770656901c2e4e714b9
2015-09-22 20:21:55 +02:00
Noel Grandin 9ea0390f17 convert Link<> to typed
Change-Id: Iaca21344f6a38f508f79e6d5983e515162a6dca3
2015-09-10 08:30:11 +02:00
Michael Stahl 013efe75eb test: hack to avoid VCLXToolkit calling CreateMainLoopThread
... for the PythonTest, similar to what vclbootstrapprotector does for
CppunitTest; actually no idea if this is a good idea or a bad idea.

Change-Id: Ia4e2e50fdc9c8deb9faf580a2f3f3308533265eb
Reviewed-on: https://gerrit.libreoffice.org/17540
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-08-19 19:35:46 +00:00
Takeshi Abe 0980095619 Replace boost::scoped_array<T> with std::unique_ptr<T[]>
This may reduce some degree of dependency on boost.
Done by running a script like:

git grep -l '#include  *.boost/scoped_array.hpp.' \
 | xargs sed -i -e 's@#include  *.boost/scoped_array.hpp.@#include <memory>@'
git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \
 | xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/'

... and then killing duplicate or unnecessary includes,
while changing manually
m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx,
extensions/source/ole/unoconversionutilities.hxx, and
extensions/source/ole/oleobjw.cxx.

Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd
Reviewed-on: https://gerrit.libreoffice.org/16289
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-17 15:50:45 +00:00
Stephan Bergmann 9bb254fc85 NOINSTANCE is implied now in IMPL_STATIC_LINK...
Change-Id: Ifb032457d6c1b279c4183282ef2b271c706dd71a
2015-05-10 11:25:47 +02:00
Stephan Bergmann e6c08b6b30 Remove unnecessary STATIC_LINK macro
Change-Id: I4788824667c8e0d1d4e0717b7ae7737bb0fd2c90
2015-04-29 18:29:59 +02:00
Stephan Bergmann a40d0bdf72 Use OFFICEOTRON/ODFVALIDATOR determined by configure
Change-Id: I456669f15a659e144fc6ecad053cd0b929859424
2015-04-20 16:48:32 +02:00
Stephan Bergmann 11f2099904 test: Use appropriate OUString functions on string constants
Change-Id: Idbdc5c9aab8fa65df39d66da2461337db6350e52
2014-12-18 17:57:46 +01:00
Stephan Bergmann e3ce885504 CppunitTest --headless is not the same as soffice --headless
...they just "happen" to have the same name

Change-Id: Ia602f9a62e07c3af6fba2ffb84a858e1fb4b09ce
2014-12-10 16:17:15 +01:00
Stephan Bergmann fc0d57b7af Revert "use the new OUString::fromUtf8 method"
This reverts commit 05050cdb23,
not all places that use e.g. OStringToOUString to convert potential UTF-8
are guaranteed to fulfil the prerequisites necessary to use fromUtf8 (and
some places like e.g. in codemaker are happy with the best-effort effect
of OStringToOUString's OSTRING_TO_OUSTRING_CVTFLAGS).
2014-11-06 17:24:13 +01:00
Noel Grandin 05050cdb23 use the new OUString::fromUtf8 method
Change-Id: I771004b7ccab3344a67e827e45bc34c22ffa5f77
2014-11-06 13:51:10 +02:00
Markus Mohrhard 7e3f0824a1 improve test failure message
Change-Id: I71d6b65b046bfc31692ba12423288c55fccb2d02
2014-07-04 15:59:58 +02:00
Stephan Bergmann 369d95931f DeInitVCL at end of tests
This required some changes to the framework:

* Init-/DeInitVCL is no longer done per individual test in BootstrapFixture, but
  once per CppunitTest invocation in a new vclbootstrapprotector (similarly to
  the exisiting unobootstrapprotector).  CppunitTests that need VCL now need to
  declare gb_CppunitTest_use_vcl.

* For things to work properly, the UNO component context needs to be disposed
  from within DeInitVCL (cf. Desktop's Application::DeInit called from
  DeInitVCL).  The easiest solution was to introduce an
  Application::setDeInitHook (where the hook is called from DeInitVCL)
  specifically for vclbootstrapprotector to call.

* PythonTests don't (yet) call DeInitVCL; they still hook into
  BootstrapFixture's original test_init functionality (to call InitVCL), and do
  not make use of the vclbootstrapprotector.

Change-Id: I4f3a3c75db30b58c1cd49d81c51db14902ed68b2
2014-06-04 08:55:12 +02:00
Tor Lillqvist b56c9aaa80 Avoid including <config_features.h> in <vcl/svapp.hxx>
Change-Id: I711621c89e8f75d4450867e303ccdc8017bcd9d7
2014-05-22 11:57:57 +03:00
Stephan Bergmann 969df2a069 -Werror,-Wunused-function
Change-Id: I894ca2eb865405a9991f921997cc22c5a34c4da2
2014-05-14 21:12:23 +02:00
Stephan Bergmann d226c4726f Fail the test if executing the validator fails
Change-Id: I15aac53a817ca309697cba8a962e788aea1619d0
2014-05-14 15:28:29 +02:00
Markus Mohrhard 9051160004 fix spelling error
Change-Id: If6c318f1a1f74a39083bf83eed2f80aca1e27bc5
2014-05-01 02:31:58 +02:00
Thomas Arnhold fa801a69a2 -Werror,-Wunused-result
Change-Id: I8ec20e6a391bd835097af9be44a174e8e7b19cce
2014-04-19 11:10:13 +02:00
Caolán McNamara e6e4474aae set what system locale should resolve to for languagetag
normally this happens in desktop/source/app/langselect.cxx for
the fat app case

Change-Id: I4772172aa6f071ac03d74e2abe7a9e197f0dc964
2014-04-11 17:05:20 +01:00
Caolán McNamara f9f7b70bd0 coverity#1194929 String not null terminated
Change-Id: I749f4cb8340b4642040baed7f3363e2f1e4b65ad
2014-03-30 21:21:30 +01:00
Markus Mohrhard eaeaf871f1 improve validation failure message
Change-Id: I1a613899d18a004149d3e637d796bc2f6687e6c4
2014-03-26 23:58:44 +01:00
Markus Mohrhard 50532e3f63 enable ODF export validation
Change-Id: I09f517a49507a2eb31118f88f31dc2ff8b03de6a
2014-03-08 18:31:13 +01:00
Markus Mohrhard 9a7ca779cd move the export validation code to test
Change-Id: Iaafe30a1095bd5b6dac3637c394818ba8bd848ce
2014-03-05 11:14:55 +01:00
Michael Meeks 62badf3828 Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-22 09:37:38 +01:00
Michael Stahl ebeae438db move Python tests in-process
This is nice to make them more easily debuggable.
A series of crude hacks are employed to bootstrap enough services from
python so the current tests run.
This is only tested with system python3 on Fedora.

Change-Id: I5e06741e55ead7fddec41ff776ff8ca5d2399469
Reviewed-on: https://gerrit.libreoffice.org/3215
Reviewed-by: David Ostrovsky <David.Ostrovsky@gmx.de>
Tested-by: David Ostrovsky <David.Ostrovsky@gmx.de>
2013-04-09 05:52:49 +00:00
Eike Rathke 5be14df244 ResMgr with LanguageTag
Change-Id: Ie5ce9157a7ea59db7b0509fbaec61d07f8f9edf0
2013-03-29 14:09:01 +01:00
Jan Holesovsky 0c22f3eadd Make LO buildable again after the GraphicFilter move.
Change-Id: I3455a7294b136400f32163626d5a7a7f2bfa898c
2013-01-04 22:02:51 +01:00
Eike Rathke 715957c39a we really don't need lang-conversion here
Change-Id: I1f72ca29b2f5b286bfae906dc3ee16581a2b1c36
2012-11-17 01:16:22 +01:00
Stephan Bergmann ced1151a1a Get rid of vcl::unohelper::GetMultiServiceFactory
...which effectively is just a glorious wrapper around
comphelper::getProcessServiceFactory.

In turn gets also rid of ImplSVAppData's mxMSF and mpMSFTempFileName and the
rSMgr parameter to InitVCL.

All the VCL users "soffice", "spadmin", and "unopkg gui" appear to still work
fine.

Change-Id: I797d48f7d0d8c35bb82124c9ab0ee63850c4d863
2012-10-31 09:22:53 +01:00
Noel Grandin 58528348fa String->OUString in tools::ErrorContext
Change-Id: Ibd0cd3e8d7281b5abde420df5cc1d51e9354069c
Reviewed-on: https://gerrit.libreoffice.org/769
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2012-10-09 21:15:07 +00:00
Stephan Bergmann 9ac86f484b Improvement on previous commit, UCB clean up
* As UCB is only ever initialized with "Local"/"Office", remove this
  configuration vector completely.  The "create" ctor creates an instance
  internally initialized with those "Local"/"Office" keys.  Special (test) code
  can still instantiate an uninitialized one via plain createInstance.  And for
  backwards compatilibity process startup still ensures to create an initialized
  instance early, in case there is still code out there (in extensions) that
  later calls plain createInstance and expects to get the already-initialized
  (single) instance.

* XInitialization is an "implementation detail" of the UniversalContentBroker
  service, do not expose in XUniversalContentBroker.

* ucbhelper/configurationkeys.hxx is no longer needed and is removed.

* ucbhelper/contentbroker.hxx is an empty wrapper and is removed; however, that
  requires ucbhelper::Content constructors to take explicit XComponentContext
  arguments now.

* The only remaining code in ucbhelper/source/client/contentbroker.cxx is
  Android-only InitUCBHelper.  Is that relevant still?

Change-Id: I3f7bddd0456bffbcd13590c66d9011915c760f28
2012-09-14 18:24:49 +02:00
Miklos Vajna 8a59191c15 test: string cleanup in BootstrapFixture
Change-Id: I468c295713fc34b64403a1c31f802820e6608b07
2012-08-02 09:21:26 +02:00
Miklos Vajna f5a98e08e7 test::BootstrapFixture: make GraphicConverter work
Change-Id: I566448db441eaa324cf619630a2e87cb8cbaeb99
2012-08-01 10:57:10 +02:00
Caolán McNamara 8d7e8a0a3b setup/teardown default component context once before/after all tests
avoids the problems of dangling uno singletons invalidated after the first
dispose and the chain of other singletons that don't expect to need to
re-initialize, etc.

reenable editeng cppunit test

inherit i18npool cppunit test from unotest base

drop LibreOfficeProtector, do "throwable" work in setUp/tearDown not
in ctors/dtors
2012-04-13 13:15:25 +01:00
Caolán McNamara 43aabb908e partially revert the editeng singleton stuff to get build to complete 2012-04-12 13:28:06 +01:00
Kohei Yoshida 5b14929dd4 Handle the correct deletion order of EditDLL in the base class.
Turns out that this change affected all cppunit runs.
2012-04-12 00:53:55 -04:00
Stephan Bergmann 2a9c1d1a75 Make dialogs fail with an exception in headless tests. 2011-12-06 20:28:56 +01:00
Stephan Bergmann 465c34f6e9 ucbhelper::ContentBroker::deinitialize is static. 2011-12-06 20:28:55 +01:00
Caolán McNamara db5a5ffa82 split bootstrapfixture and move test-filters class for sot test
sot is below vcl, but is a filters test, we can split bootstrapfixture
into a vcl needing bit and and non-vcl bit and filters test api
can be standalone and combined with whichever bit in order to form
pre and post vcl filters test
2011-10-15 12:18:44 +01:00
Michael Meeks 8a0d0457a7 test fix: use setUp and tearDown not constructors to init LibreOffice
It turns out the constructors are all run back-to-back one per filter,
and we need to init and de-init in a sensible order to make multiple
tests that otherwise share the ContentBroker work properly.
2011-10-05 16:02:28 +01:00
Michael Meeks 6f1dbfbe71 set the core locale as well as the UI one to English 2011-09-30 14:57:41 +01:00
Caolán McNamara 4a5745503c merge filters-test code 2011-09-30 12:39:35 +01:00
Markus Mohrhard 3581e9df56 init the unit test for vba unit tests correctly 2011-09-29 18:35:16 +02:00