Commit Graph

327 Commits

Author SHA1 Message Date
ed45c87896 sc: fix temp file leak in ScTableSheetsObj
Change-Id: Iff838c97c1cf633f99e75a169eeb8bb324d4a32a
2014-10-21 15:06:41 +02:00
af5ebbf783 create a macro library for implementing bit-flags types
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>,
changed from a macro- to a template-based solution.  (Unfortunately MSVC 2012
does not support explicit conversion operators.  Worked around that with
explicit #ifs rather than some HAVE_EXPLICIT_CONVERSION_OPERATORS and
SAL_EXPLICIT_CONVERSION_OPERATOR ainticipating we hopefully soon move to a
baseline that requires unconditional support for them.)

Change-Id: I4a89643b218d247e8e4a861faba458ec6dfe1396
2014-10-13 17:45:57 +02:00
7d754a8492 sc: ensure global variables in tests are cleared before shutdown
If the destructors run from exit handlers, they could access already
deleted globals from VCL etc. and crash.

Change-Id: I265046e95998a4384e1ce0f1f205d03c078a40a9
2014-09-30 17:34:26 +02:00
548b360c0e Factor out duplicated code to XmlTestTools::assertXPathNoAttribute()
Change-Id: I1eb3778e6bcdd8c44ffb9a7548add109331fc83b
2014-09-30 12:07:32 +02:00
1da676eb86 Include name of document in CPPUNIT_ASSERT msgs
Change-Id: Ia0d06d1e0951bcc3930d5e059658209a2916405f
2014-09-23 11:19:23 +02:00
60e78fbb80 fdo#82577: Handle Font
Put the VCL Font class in the vcl namespace. Avoids clash with the X11
Font typedef.

Change-Id: I1a84f7cad8b31697b9860a3418f7dff794ff6537
2014-09-18 08:54:37 +02:00
9432b8d400 coverity#1233488 Unchecked dynamic_cast
Change-Id: I9599fb4473a43a4624d64c48e8768761fcbd266f
2014-09-02 12:14:44 +01:00
2fa3aed1cb parseXml should return xmlDocPtr instead of htmlDocPtr
Change-Id: Ia9fb79ea40ca840d7328a078e747ad64a63d18f1
2014-08-28 13:50:47 +02:00
a69f8ea61c vcl: convert push flags to type-safe enum-like class
Change-Id: Ib49a0dd5ecee0225f51bea2ff1c0ab5326595a47
2014-08-21 09:17:32 +02:00
613cc91bb5 Fix another: reference to 'Primitive2DSequence' is ambiguous
Change-Id: I8b78126cab64f023ffcb35c080576148b1eb15f5
2014-08-17 00:54:21 +02:00
ed8c687265 Fix: reference to 'Primitive2DSequence' is ambiguous
Change-Id: Ic6cf4bc6dab4b9e2610aebdc42e3df7b56eda59d
2014-08-17 00:32:03 +02:00
fb1f710d3f loplugin:passstuffbyref (Primitive2DSequence)
Change-Id: I3d9c6daa09d71ca872021fe13405b08050e191d9
2014-08-17 00:32:03 +02:00
4bc6484c59 initial implementation of XML dump for Primitive2DSequence
Change-Id: I6618b18164a26553f81a1c737e009b7187b028c3
2014-08-16 20:49:20 +02:00
d3a59629f7 XmlWriter: simplify and take SvStream* as input
Change-Id: I56b2fa6887f7971604a2dcf34497ecda9cea8937
2014-08-16 20:49:20 +02:00
8a3a2e888b mtfxmldump: move XML writing into its own function
Change-Id: I82954177fe9d4934e69b33c1c985304add09e089
2014-08-16 20:49:19 +02:00
20d8a3474b No need to write '
Change-Id: I0562defc6fc60ee83bc73b901caf46b1283a9df9
2014-08-16 20:49:19 +02:00
454ec6e791 XStyleLoader2 : enhance unit test to PageStyle
and remove duplicate code

Change-Id: Ib9e3568c860fe5cd3f11374a1c61dff101e33a18
Reviewed-on: https://gerrit.libreoffice.org/10832
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2014-08-11 06:37:02 +00:00
932e37abca fix ambiguity in argument
Change-Id: I00146441b1271d7a3c866ad58d1b3c72b845dc0c
2014-08-08 02:29:24 +02:00
949279c801 XStyleLoader2 loadStylesFromDocument - unit tests
Change-Id: Id143689f573e6f8585db9bc48a252e311ff0e721
2014-08-08 00:38:10 +02:00
eacd4c044f Improve test failure output
Change-Id: I4417318988ef70639cbcec9d776c783ad69c3990
2014-08-06 10:09:50 +02:00
5021f29841 Remove some unused code
Change-Id: Ib1fb5108a858c35a5bbe8ba865e15660639725e3
Reviewed-on: https://gerrit.libreoffice.org/10593
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-07-29 14:20:36 +00:00
cd3bffed33 xmlwriter: set indent and always write utf8 xml document
Change-Id: I1477833e696edbac2dc375329e7b26a7105d1593
2014-07-20 21:02:50 +02:00
501f6b050b Support color related MTF actions in mtfxmldump
Change-Id: I5deac7f096866a8f149acfd0d11bbc0963238e88
2014-07-20 21:02:50 +02:00
317f154de7 Extend metafile to xml dump testing tool with more MFT actions
Change-Id: I819de476c6a615b8cf27a6a26d41a6e9ac25ef85
2014-07-20 21:02:49 +02:00
7e3f0824a1 improve test failure message
Change-Id: I71d6b65b046bfc31692ba12423288c55fccb2d02
2014-07-04 15:59:58 +02:00
c103775cd1 correct XSheetAnnotations GetByIndex test for #fdo#80551
the previous testGetCount test already added a note on sheet 2
testGetByIndex now works on sheet 3

Change-Id: I2cd49aa2bbf5c1b707287518e0f15088f3ee5ec0
Reviewed-on: https://gerrit.libreoffice.org/9938
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-07-02 13:02:20 +00:00
17d0d12b8d unit test XSheetAnnotations GetByIndex for #fdo80551
Change-Id: I89ebc3d5ac257f3c754a050caf3776959b81d8b3
Reviewed-on: https://gerrit.libreoffice.org/9933
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-07-02 12:21:34 +00:00
ca4f1929ce xmlChildElementCount is only available in libxml2 >= 2.7.3
fixes build error Undefined symbols: _xmlChildElementCount

Change-Id: I9687971912b4d0ae55bf1d9ad987fd339fcbec7e
Reviewed-on: https://gerrit.libreoffice.org/9788
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-06-16 12:29:35 +00:00
798f410a94 Fix vclplug_* dependencies for gb_CppunitTest_use_vcl
...and replace gb_CppunitTest_unset_headless with
gb_CppunitTest_use_vcl_non_headless.

Change-Id: Ibd859f98ed8df09988ca26ffcee26e06e25d8313
2014-06-12 13:49:45 +02:00
ce90fa3032 MetafileXmlDump: Add dumping of META_CLIPREGION_ACTION's.
Change-Id: I4b51abf6193c33367edebc82772054875b5b9bba
2014-06-10 19:33:12 +02:00
2a649539b7 MetafileXmlDump: No need to specify the stream, simplify the API.
Change-Id: Ia08f67e359bbd26cefdba8661f0b0c4ae2147382
2014-06-10 19:33:12 +02:00
7a90f7748f Missing new files from previous commit
Change-Id: Ic8d7c13602c8831e411181c802eb825124578b19
2014-06-04 08:57:32 +02:00
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
f87859b88f Fix memory leaks in test code
Change-Id: Ifa756a5da636e0b37654ad83900115872bc40f0e
2014-06-02 15:45:28 +02:00
3b24dcc8a8 Remove unnecessary semicolons
A simplified version of the semantic match that finds this problem is
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r1@
statement S;
position p,p1;
@@
S@p1;@p

@script:python r2@
p << r1.p;
p1 << r1.p1;
@@
if p[0].line != p1[0].line_end:
    cocci.include_match(False)
@@
position r1.p;
@@
-;@p
// </smpl>

Change-Id: Ib9708d37fbb4c6060f88d5dae3814a2d37b2091e
Reviewed-on: https://gerrit.libreoffice.org/9493
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-27 01:19:00 -05:00
94bc78d2d4 cppcheck: unreadVariable
Change-Id: Ifbcae35c0cf3bdb9ba5c680b1627117c47d6c9a0
2014-05-24 21:20:18 +02:00
b56c9aaa80 Avoid including <config_features.h> in <vcl/svapp.hxx>
Change-Id: I711621c89e8f75d4450867e303ccdc8017bcd9d7
2014-05-22 11:57:57 +03:00
46297bb421 test: write to stream directly in MetafileXmlDump
Change-Id: If62a29af473f602f89e6e0e4a06772a320a23b9a
2014-05-19 00:01:14 +02:00
fb1e810553 test: don't create root element in startDocument() in xmlwriter
Change-Id: Ia08e9f8caf2a2fb42855dcb2245e013e1a181216
2014-05-15 23:50:58 +02:00
fb688d6446 test: dump staroffice metafile to XML & XML writer interface
Change-Id: Ie42f72e0fc281d1f51e1729be408c2b0042f4174
2014-05-15 19:51:08 +02:00
780cedb2cf test: parseXmlStream & parseHtmlStream added to test tools
Change-Id: Iff8af5e9ffefb4c3cecf387b16473d45e8b4a65a
2014-05-15 19:51:08 +02:00
969df2a069 -Werror,-Wunused-function
Change-Id: I894ca2eb865405a9991f921997cc22c5a34c4da2
2014-05-14 21:12:23 +02:00
d226c4726f Fail the test if executing the validator fails
Change-Id: I15aac53a817ca309697cba8a962e788aea1619d0
2014-05-14 15:28:29 +02:00
248145f99e Find places where uno::Sequence is passed by value.
Implement a clang plugin to find them, and clean up existing code
to pass them by reference.

Change-Id: If642d87407c73346d9c0164b9fc77c5c3c4354b8
Reviewed-on: https://gerrit.libreoffice.org/9351
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-14 08:10:22 +00:00
f21c57c2bc WaE: -Werror=maybe-uninitialized
Change-Id: Iec05633cf1716079eee54c376bd0736b638673dd
2014-05-08 16:21:41 +01:00
78b9537b6a various: sal_Bool->bool
Change-Id: I30fa5227f30373f95060148f269450d2945c1bb9
2014-05-08 11:48:14 +02:00
9051160004 fix spelling error
Change-Id: If6c318f1a1f74a39083bf83eed2f80aca1e27bc5
2014-05-01 02:31:58 +02:00
76715b105f test: move XmlTestTools API documentation to the header
Change-Id: Iae56b1fb68fde0cbc44f6b9e37ba1a66194b25e0
2014-04-30 09:38:38 +02:00
dde833575e tests: add XML and HTML test tools to test module
XML and HTML parsing and XPath asserts are used by many test in
sw, sc and sd modules. This commit moves this functionallity to
test module, where it is available to all modules.

Change-Id: I53ad9c45b24f4c9bf106cb58ea619002968bfeda
2014-04-29 23:57:33 +02:00
fa801a69a2 -Werror,-Wunused-result
Change-Id: I8ec20e6a391bd835097af9be44a174e8e7b19cce
2014-04-19 11:10:13 +02:00