summaryrefslogtreecommitdiff
path: root/xmloff
AgeCommit message (Collapse)AuthorFilesLines
2019-04-18tdf#113289: Default value for footnote separatorDavid Vogt1-1/+4
In old versions of LO/AOO, separator style was defaulting to a solid line. When you have an old document that doesn't have the style set explicitly, the line would disappear. Since newer versions explicitly set the style, we should set the default to what it was before. Change-Id: I8dacea75fcf2f95f9bc145442b22ab0d173e7c5a Reviewed-on: https://gerrit.libreoffice.org/69167 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 4aa8a6ab08b755e3d82860e8dbc294f854336477) Reviewed-on: https://gerrit.libreoffice.org/70892 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-02-06tdf#122625: Use solution for tdf#118879 in a more general caseXisco Fauli2-9/+7
Partially revert commit 36aa3f4d6f9e9da7289ed760cfb1e87600cb6459 Change-Id: Ia554d3e64da2ee620c69bc66b33a6cd305502c64 Reviewed-on: https://gerrit.libreoffice.org/67418 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit a7da594593eb2d63004a91dc471683713ce9742a) Reviewed-on: https://gerrit.libreoffice.org/67422 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-02-05tdf#118879 don't embed base64 image data if we have an origin URLTomaž Vajngerl1-1/+7
If an Graphic has an OriginURL it means it was created from an external source. We want to preserve this so we don't want to add the image base64 data - used in Flat ODF format. Change-Id: I2782ec53cf8dc78b0c360365d3eed3e5c54bf271 Reviewed-on: https://gerrit.libreoffice.org/67338 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 36aa3f4d6f9e9da7289ed760cfb1e87600cb6459) Reviewed-on: https://gerrit.libreoffice.org/67346 Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-08tdf#112782: data-pilot-source is invalid in odf1.2 strictJulien Nabet1-1/+1
Change-Id: Ie24c416cb9ba8de904bf6e725a60b62ce7787596 Reviewed-on: https://gerrit.libreoffice.org/65742 (cherry picked from commit 18b9f23f13fd503e94d669ab80b5d2354d1817a1) Reviewed-on: https://gerrit.libreoffice.org/65884 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-31tdf#122335: sub-view-size can only be used with ODF ver > 1.2Julien Nabet1-0/+5
Change-Id: I7dd767fddd11319017a215c240684dcc17238c4e Reviewed-on: https://gerrit.libreoffice.org/65626 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-12-18sw_redlinehide_4b: xmloff: destroy TextImportHelper before ModelMichael Stahl1-0/+1
nullpointer in ~XMLRedlineImportHelper in SwUiWriterTest::testThreadedException() Change-Id: Ic4a79ceffa831aced4db47836333a15a13773887 (cherry picked from commit 68d77adb2d8242588b416240e6f7d47940099aaa)
2018-12-13address forward incompatibility of InputRequired default changeLionel Elie Mamane1-1/+1
commit fec8c14e960fbcd639a04d6c3354caff2d0bd365 changed the default value of InputRequired as read from the file; that is the value InputRequired has when it is set to neither false nor true in the file This is to mitigate the fact that InputRequired was not property enforced and now suddenly is, but its default value was "true"! So lots of past forms have InputRequired==true everywhere, users did not pay attention to it because it was not enforced, and now it is enforced, which suddenly is a huge PITA for users because they have to update most controls in all forms. Since older versions of LibreOffice omitted the input-required attribute in the file (the XML stream) when it had its then-default value (namely "true"), we changed that to now mean "false". As a side-effect, newer LibreOffice omits the attribute in the XML stream when InputRequired has its new default value, namely "false". So the situation is that any file saved with an older LibreOffice will have all its form controls with InputRequired==false when opened with a newer LibreOffice, and any file saved with a newer LibreOffice will have all its form controls with InputRequired==true when opened with an older LibreOffice. This commit makes LibreOffice always write the XML attribute. So that any file saved with a newer LibreOffice will have the same InputRequired values when opened in an older LibreOffice. This enhances forward compatibility, because InputRequired was enforced in older versions when the underlying database field was marked NOT NULL. So the current situation leads to unwanted enforcement in older LibreOffice versions, with a file that is saved from newer LibreOffice with a control having InputRequired==false and bound to a database field marked NOT NULL. This commit fixes that, by ensuring that any form control with InputRequired==false in newer LibreOffice will also have InputRequired==false in older LibreOffice. Change-Id: I92ef48ad99c4e2ead43e95376282cc861c181ab3 Reviewed-on: https://gerrit.libreoffice.org/65109 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2018-11-16loplugin:staticmethods improvementNoel Grandin2-9/+9
Change-Id: I8889ce8a7d2309b54454cfe4c6421282e1c6e755 Reviewed-on: https://gerrit.libreoffice.org/63434 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-13loplugin singlevalfields improvementNoel Grandin1-8/+1
checking for casting to void* turns out to mask useful stuff, so remove that and just deal with a few extra false+ Change-Id: Id9700d7ceda90ba8fdb38aa870f13a7ca3acb668 Reviewed-on: https://gerrit.libreoffice.org/63145 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-11cppCheck redundantAssignmentZdibák Zoltán1-3/+1
Change-Id: I829c660c6c73868ac6a0f74e554d99c54d9f0ea8 Reviewed-on: https://gerrit.libreoffice.org/63245 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-11-11cppCheck redundantAssignment variable pContextZdibák Zoltán1-3/+1
Change-Id: Ic7c97853eeeaa87e7ed7ecfad638f516f2be2969 Reviewed-on: https://gerrit.libreoffice.org/63246 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-11-10tdf#120703 PVS: V547 Expression is always true/falseMike Kaganski1-11/+2
Change-Id: I0b3c407331bfa1fa0c5003250d327d4f26de3643 Reviewed-on: https://gerrit.libreoffice.org/63235 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-09Revert "Fix some layout values"Julien Nabet1-2/+2
Nothing proves this is ok since no feedback. Moreover, since it's only of the assumption that setWidth and setHeight should have value >= 0 or -1, let's revert this one. This reverts commit d467214ac24e22818ff933d76148f3f0987c65ca. Change-Id: Ia030706d150afaebaedc0ec201814cca80db248a Reviewed-on: https://gerrit.libreoffice.org/63171 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-11-09Simplify and fix Java UNO API test makefilesJan-Marek Glogowski1-18/+1
Originally I just wanted to add the juh.jar to the list of jars of the UNO API tests, but this became tedious work, so after the first few files I decided to replace the similiar makefiles with a common define for the *_unoapi* tests. This patch adds two new make defines to be used used by Java UNO and UNO API tests: - gb_JunitTest_set_unoapi_test_defaults - gb_JunitTest_set_unoapi_test_class_and_jars The first one will deduce most defaults from the test name, but still allows to optionally override most settings. If a test doesn't match the default at all, the 2nd define still shares the common jar files and the main Java UNO class, so the second define adds these to your makefile. The real fix is to add juh.jar to gb_JunitTest_use_jars. Change-Id: I4342fdac5e31f85ea18fb4268e13c287a7adc2b7 Reviewed-on: https://gerrit.libreoffice.org/63118 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-11-08Convert FieldUnit to scoped enumMike Kaganski1-9/+9
Change-Id: Id2df31daa596a18c79af5fc6ea162deb6e24d5af Reviewed-on: https://gerrit.libreoffice.org/62958 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-08loplugin:collapseif in tools..xmloffNoel Grandin5-41/+23
Change-Id: Iea1227a9f13a0a618d9bb6b0bbedaa5ce8d1a4f5 Reviewed-on: https://gerrit.libreoffice.org/62732 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-08Fix some layout valuesJulien Nabet1-2/+2
Cases indicated here correspond to portrait layout so use else cases from sd/source/core/sdpage.cxx:3013 switch: case 24/AUTOLAYOUT_HANDOUT3 nColCnt = 2; nRowCnt = 3; case 26/AUTOLAYOUT_HANDOUT6 nColCnt = 2; nRowCnt = 3; break; and so avoid some negative values for param given to setHeight in xmloff/source/draw/sdxmlexp.cxx during sd tests Change-Id: I5ffd9581c19f31b648775f57e270ab55f330dad5 Reviewed-on: https://gerrit.libreoffice.org/62978 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-11-06tdf#121188 form controls should have InputRequired false by defaultLionel Elie Mamane1-1/+1
Unless the underlying column is not nullable and has no default value this is only a guess, form designer can change it Change-Id: Ifa403e00b21fdaf86aef383503d54879b25ac62b Reviewed-on: https://gerrit.libreoffice.org/62969 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2018-11-06tdf#118582 Disable signature line signing once it is signedSamuel Mehrbrodt1-0/+3
Change-Id: I720d7d4920ae9c2f5d74ad827e1e214a62fe81a9 Reviewed-on: https://gerrit.libreoffice.org/62947 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-11-06convert some macros to local functionsNoel Grandin2-4/+8
Change-Id: If2c89f0f53615f6200b6cd1fb6267cc9b47df927 Reviewed-on: https://gerrit.libreoffice.org/62884 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-05-Werror=unused-parameterStephan Bergmann1-3/+3
follow-up to b5d5032ce9b40cdca233f6f8951fa056262ec041 "Fix for --enable-debug --disable-assert-always-abort", found by <https://ci.libreoffice.org//job/lo_tb_random_config_linux/1579/> Change-Id: Ie0ef4c0cb0f69d951bec24a2a40218cdfdf61edf Reviewed-on: https://gerrit.libreoffice.org/62874 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-05tdf#121172: use first polygonMike Kaganski1-2/+2
This was a code reading mistake of me when preparing commit 3040d328c944d91b0cd612d86d358823b5c5b883. Change-Id: I321f1f39e5600fcd786ba6d2e7a4b9444021bcff Reviewed-on: https://gerrit.libreoffice.org/62886 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-05ofz#11261 null-derefCaolán McNamara1-0/+5
Change-Id: I2a6b17feb500be9b76f89ed3ae177f44f4c164ec Reviewed-on: https://gerrit.libreoffice.org/62896 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-04replace double-checked locking patterns with thread safe local staticsMike Kaganski1-16/+4
Change-Id: I1bf67196e97411aeecc13ed4f91d1088a315e323 Reviewed-on: https://gerrit.libreoffice.org/62839 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-29tdf#120703 PVS: V547 Expression is always true/falseMike Kaganski1-18/+7
Change-Id: I0516dc68cf7d451eafc044be8e50a66d2bddf15f Reviewed-on: https://gerrit.libreoffice.org/62484 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-28tdf#120703 PVS: V547 Expression is always true/falseMike Kaganski2-36/+21
Change-Id: Iaa1a1811b638aadfe6b06b3465a182cb675031b5 Reviewed-on: https://gerrit.libreoffice.org/62476 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-27tdf#120703 (PVS): V519 The variable is assigned values twice successivelyMike Kaganski1-2/+1
Change-Id: I9265425a215609ef6bf4298ba39c8399f215ce27 Reviewed-on: https://gerrit.libreoffice.org/62406 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-26tdf#42949 Fix IWYU warnings in include/unotools/*Gabor Kelemen20-0/+20
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I444c43b9d549977039f25bec2b5bf666c3e15e0e Reviewed-on: https://gerrit.libreoffice.org/62041 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-24remove more rtl::OUString and OString prefixesNoel Grandin7-18/+18
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 Grandin7-12/+9
Change-Id: I1ae16467a8e58e8a50f59b7a140e9f8b68bde07e Reviewed-on: https://gerrit.libreoffice.org/62254 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-22pvs-studio: V728 An excessive check can be simplifiedCaolán McNamara1-1/+1
for... "The '(A && !B) || (!A && B)' expression is equivalent to the 'bool(A) != bool(B)' expression" subcases, where the args are already bool Change-Id: Ica8b5c4974c513f7f7ad8acf17ca931e85ebc8af Reviewed-on: https://gerrit.libreoffice.org/62146 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-21pvs-studio: A part of conditional expression is always true: bDisplayOKCaolán McNamara1-1/+1
Change-Id: If01f2d3b02219194cbeaeffbb0fd8242320432a8 Reviewed-on: https://gerrit.libreoffice.org/62056 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-20pvs-studio: loop-variable-too-smallCaolán McNamara5-39/+22
Change-Id: Ie4aafecd17cf53ab3cbab2003b59da374d06e06b Reviewed-on: https://gerrit.libreoffice.org/62058 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-20pvs-studio: Expression '!bWasSetTypeAttribute' is always true.Caolán McNamara1-10/+4
Change-Id: I605bbc117426bba3dae9a8ec3ffc45967edbf7c4 Reviewed-on: https://gerrit.libreoffice.org/62060 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-20pvs-studio: An excessive check can be simplifiedCaolán McNamara1-1/+1
Change-Id: Idaa511d4ccf3d8542bdf6a1dcee4fa54c6d2315f Reviewed-on: https://gerrit.libreoffice.org/62059 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-20pvs-studio: rework expressionCaolán McNamara1-2/+2
Change-Id: Ibcbeef3eba53df790c1860e6e4066de67bdda0bc Reviewed-on: https://gerrit.libreoffice.org/62057 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-19clang-tidy readability-container-size-emptyNoel Grandin6-8/+8
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422 Reviewed-on: https://gerrit.libreoffice.org/61967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19clang-tidy readability-misleading-indentationNoel Grandin1-1/+1
Change-Id: I4673fc7c694924b41d048a1918ddb8b0e0af1f79 Reviewed-on: https://gerrit.libreoffice.org/61935 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19loplugin:staticvar in xmloffNoel Grandin22-210/+196
Change-Id: I283d162807a906334627613be7c340af566144f1 Reviewed-on: https://gerrit.libreoffice.org/61921 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-18clang-tidy readability-simplify-boolean-exprNoel Grandin1-6/+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-17clang-tidy readability-redundant-smartptr-getNoel Grandin10-78/+62
redundant get() call on smart pointer Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd Reviewed-on: https://gerrit.libreoffice.org/61837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-15tdf#42949 Fix IWYU warnings in include/basegfx/*Gabor Kelemen2-0/+2
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ifd59a5d93cfe7dc232891a681002014cd825035a Reviewed-on: https://gerrit.libreoffice.org/61546 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-09Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann3-21/+21
...where "inline" (in its meaning of "this function can be defined in multiple translation units") thus doesn't make much sense. (As discussed in compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions in include files for now.) All the rewriting has been done automatically by the plugin, except for one instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus some subsequent solenv/clang-format/reformat-formatted-files. Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224 Reviewed-on: https://gerrit.libreoffice.org/61573 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-08tdf#42949 Fix IWYU warnings in include/comphelper/[m-z]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I04c5ba277d5b3398c07de6ae66713d977636088d Reviewed-on: https://gerrit.libreoffice.org/61347 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-08Fix for --enable-debug --disable-assert-always-abortStephan Bergmann1-8/+8
...found by <https://ci.libreoffice.org//job/lo_tb_random_config_linux/1522/> Change-Id: I9087d54f783e1ab51029704aa34eed16dc14605d Reviewed-on: https://gerrit.libreoffice.org/61513 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-04pass SvXMLNamespaceMap around using std::unique_ptrNoel Grandin2-5/+5
Change-Id: Ia5ae67678a508e3df81e72cb84993491e222c528 Reviewed-on: https://gerrit.libreoffice.org/61307 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-25Simplify containers iterations in xmloff/source/[c-d]*Arkadiy Illarionov21-294/+191
Use range-based loop or replace with STL functions. Change-Id: I2af2d739d55a0bf480bb6e9d57b49dd16806af30 Reviewed-on: https://gerrit.libreoffice.org/60734 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-24tdf#42949 Fix IWYU warnings in include/comphelper/[a-l]*Gabor Kelemen3-0/+3
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I22ba2c8aec235e34cd7835b8a0a716bf3057db7a Reviewed-on: https://gerrit.libreoffice.org/60837 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-20loplugin:useuniqueptr in XMLEventExportNoel Grandin2-12/+6
Change-Id: I29a7c565db576afa4dbd0e0fbd1dfd99f9c989fc Reviewed-on: https://gerrit.libreoffice.org/60618 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-20Replace SAL_OVERRIDE with override in internal codeStephan Bergmann1-4/+4
Change-Id: Ifa446647b11fd1f1b0dc6a991b752480545634db Reviewed-on: https://gerrit.libreoffice.org/60788 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>