summaryrefslogtreecommitdiff
path: root/xmloff
AgeCommit message (Collapse)Author
2022-04-20use more FastAttributeIter::toViewNoel Grandin
Change-Id: I8a8ad5456fea349a45fca0aa468313cb04aa02f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133198 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-19new loplugin:stringviewvar looks for OUString vars that can beNoel Grandin
... that can be string_view Change-Id: I0ddf66725e08b58e866a764f57200dd188b9f639 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133066 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13use more string_view in xmloffNoel Grandin
Change-Id: I0d860fa6e3d3261f3393e912b27930066dd93f7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132972 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13loplugin:stringviewparam whitelist some more functionsNoel Grandin
for which we have o3tl:: equivalents Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-12loplugin:stringview more o3tl conversionNoel Grandin
look for call sequences that can use string_view and the new o3tl functions in o3tl/string_view.hxx Also add a few more wrappers to said #include file Change-Id: I05d8752cc67a7b55b0b57e8eed803bd06bfcd9ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132840 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-11loplugin:stringview add check for getToken().toInt32Noel Grandin
where we can convert that to o3tl::toInt32(o3tl::getToken( and avoid the heap allocation of a temporary string Change-Id: Ib11c19c6e6cdc0de3e551affd3578d181e292de4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132810 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-11sw content controls: add ODT importMiklos Vajna
Map <loext:content-control loext:showing-place-holder="..."> to com.sun.star.text.ContentControl and set its ShowingPlaceHolder property based on the XML attribute. This requires moving XMLImpSpanContext_Impl to txtparai.hxx, otherwise XMLContentControlContext would have to be in txtparai.cxx, which is already large. Change-Id: I9a915868160ebcc0e98ded61bfab72f32864bd76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132804 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-04-10loplugin:stringview check for getToken and trimNoel Grandin
since we now have o3tl versions of those that work on string_view. Also improve those o3tl functions to support both string_view and u16string_view Change-Id: Iacab2996becec62aa78a5597c52d983bb784749a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132755 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-08move comphelper::string::toInt32 to o3tlNoel Grandin
so we can use it in places where we cannot include comphelper Change-Id: Iba0ba3e4c0dcf0f9d1f09092a77c3b2010ec4f6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132732 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-08use more subView when converting to Int32Noel Grandin
Change-Id: I54e3ddf79ba793fd4328bf8bda7f949b65349651 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132693 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-08sw content controls: add ODT exportMiklos Vajna
Wrap the text portions inside the content control in a <loext:content-control> XML element. Also map the (so far) single UNO property of it to <loext:content-control loext:showing-place-holder="...">. This is just initial export for inline text content controls, more properties are to be added in follow-up commits. Change-Id: I5d928255b925ed7e08fb635ba39f546e9a4879de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132717 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-04-04oops, forgot to fix the commentMichael Stahl
Change-Id: Ib9281395087c8b21c2693a233d77236f9353e9c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132529 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-04-04forcepoint#101 sw: fix inserting at-page shapes to not set anchor posMichael Stahl
The problem is that for an at-page anchor SwXDrawPage::add() sets an anchor position, but then a fieldmark is inserted and the node with the anchor position is deleted. The code that sets the surprising anchor position for at-page shape was added in commit cf345e026fc0378c4436173c8064717c7db4d538 "Fix #91289#: Draw objects anchored at page but without page number" and is similar to the code for fly-frames added in commit 2e6d999cf8ceacabb94b11feee6ee0808c2a75bc "If no page number is given for page bound frames, calculate it using cursor" except that it is missing a check for GetPageNum() == 0, for no obvious reason. The matching code to replace the anchor position with a page number is in SwFlyFrameFormat::MakeFrames() and was added in commit 572a48cd16f6ce3a68ffead44a975698954dfe11 "Fix #85019#: Insertion of flyframes without correct pagenumber"; it's not clear if this is only needed for shapes inserted via the above 2 UNO APIs or also for shapes inserted via UI. Then there is the issue that the page number is set in XMLTextShapeImportHelper::addShape() only after the shape is inserted, which was added and commented in commit b5fc47fe5c2892dd712e2bda922656eacbd932f1, earlier than all the above commits; testing shows that if the page number is set before inserting the shape, the shape ends up on the expected page anyway. Let's change this: 1. the page number is set before inserting the shape 2. at-page anchor with page number is left as is 3. at-page anchor without page number gets anchor position and is changed to at-char Change-Id: I2f874bec8424de5eee94cf022e3b49382eaa55f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132479 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-04-04sc: sparkline import/export for ODFTomaž Vajngerl
Change-Id: I0d8293cdd35cc8c7afab98efac0a28a3613d122b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132505 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-04-02loplugin:stringviewparam convert methods using compareToNoel Grandin
which converts to compare Change-Id: If03c790ea113a7caedbe89f926b29055c9ec1e76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132455 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-02loplugin:stringviewparam convert methods using indexOfNoel Grandin
.. and lastIndexOf, which convert to find and rfind Change-Id: I6c4156cf904774c0d867f85a4c2785dba7593f62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132445 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-30Resolves: tdf#117162 ImportDocumentHandler expects data provider to existCaolán McNamara
already in its ctor which changed since... commit 9009663deb8f0862f419fd99bf0b761c7f923eff Date: Sun Feb 26 22:48:06 2017 +0100 tdf#83257 [API-CHANGE] Pivot chart implementation which defers it, take a probably safely backportable approach here to fix it. Change-Id: I1863791af7ae737f337993833a9cf1429a3a8028 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132286 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-18sd theme: add ODP import/export for shape fill colorMiklos Vajna
Refer to the 12 pre-defined colors by name + don't write the attribute for the case when there is no theme. Change-Id: I37c984b3371ec878a0d733977f5c937dce27c440 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131717 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-03-16ODT export: fix fallback svg:width/height for text frames with relative sizesMiklos Vajna
In case <draw:frame> has style:rel-width="..." and style:rel-height="...", then the ODF spec says that: > To support consumers that do not support relative width, producers > should also provide the width in a svg:width 19.575 attribute. If the motivation is to support simple consumers, then it's better if we write the up to date layout size as the fallback value, not what was the layout size at insert time. (But don't ignore this at import time: 80% width and "scale" for height is a valid combination, and then height/width is needed to know the ratio.) Change-Id: Iefeb43cdb141b01a732086c37186201a3fef0952 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131662 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-03-16sw clearing breaks: add ODF importMiklos Vajna
Map <text:line-break loext:clear="..."/> to com.sun.star.text.LineBreak and set its Clear property based on the XML attribute. Change-Id: I76d375de23146592c2327df16aa5066ee2a6598d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131645 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-03-15ofz: Use-of-uninitialized-valueCaolán McNamara
Change-Id: I742132da8fab7168495c7756aaffb1742a1bd973 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131613 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-14Return early if empty ref (xmloff/xmlimp)Julien Nabet
+ fix a comment, the function uses "bool" not old "sal_Bool" Change-Id: I777dc93450a56eb826d15691d56c23cb051a4afb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131561 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-03-13ofz: Use-of-uninitialized-valueCaolán McNamara
Change-Id: I6239ebb640bf248d226979ed17de92930898f9ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131464 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-11sw clearing breaks: add ODF exportMiklos Vajna
Write the clearing break as: <text:line-break loext:clear="..."/> Change-Id: Ieb517b825f2ee162bb70a453a3756ec870fa8aac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131346 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-03-11new loplugin:trivialdestructorNoel Grandin
look for potentially trivial destructors that can then be elided Change-Id: I435c251bd4291b5864c20d68f88676faac7c43fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131318 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-10ODT export: omit unreferenced <text:list xml:id="...">Miklos Vajna
This attribute is needed when a numbering is built using multiple, independent <text:list> elements. In that case the markup to connect these are either: <text:list text:style-name="L1"> </text:list> ... <text:list text:continue-numbering="true" text:style-name="L1"> </text:list> In case there is no other list in-between, or: <text:list xml:id="..." text:style-name="L1"> </text:list> ... <text:list text:continue-list="..." text:style-name="L1"> </text:list> In case there are other lists in-between. This means that at least in case all the text nodes of the numbering are after each other, then the random value in xml:id="..." is never referenced, so it can be omitted. This helps deterministic ODF output when the input is HTML, where there are never text:continue-list="..." attributes that would refer to these xml:id="..." attributes. Change-Id: Ice69422a12d4229879f89f3a4a24ed926c6d43af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131322 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-03-10tdf#116256 sw: fix textbox position in floating tableAttila Bakos (NISZ)
in case of it has to follow the text flow. Change-Id: Ic4f195c2efcc465276faa9a95362933dafa65bee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130077 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-03-01tdf#147126 sw: fix missing as_char anchoring of group textboxesAttila Bakos (NISZ)
which resulted lost (invisible) text content before implementing its support now. Cleanup to SwTextBoxHelper by removing its unneeded functions. testFDO78590 was commented out temporarily because it has a pure VML groupshape inside and it's converted to WPG during the test run resulting crash on reopening, because lack of its support in DocumentContentOperationsManager, trying to convert the content to a text frame inside a text frame. Regression from commit 2951cbdf3a6e2b62461665546b47e1d253fcb834 "tdf#143574 OOXML export/import of textboxes in group shapes". Change-Id: Ic6ce3549d390ae763044f54e991f390677704396 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129627 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-02-26cid#1500663 std::move a sal_uInt16 and then return the original is unorthodoxCaolán McNamara
Change-Id: I7d3dcc6f6e625baab702ea16cd72ec85d213f8eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130546 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-24ODT import: fix MSO-style <text:list text:continue-numbering="true">Miklos Vajna
The ODF spec says that text:continue-numbering="true" should only continue the numbering in case the styles of the previous and the current list match. In contrast, Word continues the numbering even in case there is e.g. numbering, then bullets, then numbering again, in case the list styles of the two numberings are the same. Work this around at import time when the generator confirms that the document is coming from Word. At least Office 2019 and the latest renderer at office.com is affected. (I've mailed dochelp@microsoft, no answer yet.) Change-Id: Ib63e14322e5501a6220f798abd9365d7913dab4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130503 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-02-24tdf#147580 use valid values for extrusion-specularityRegina Henschel
The fix for tdf#145700 has changed the internal handling so, that values larger than 100% from MS binary import are now kept und correctly used. But ODF 1.2 and 1.3 have the range restricted to zeroToHundredPercent. The patch writes values larger than 100% in extended namespace for our 'ODF 1.3 extended'. It writes draw:extrusion-specularity in any case, so that older versions get a meaninful value, but clamps it to [0,100] if necessary to get valid files. Change-Id: I98298d5c3e3367ffe4a45cdc051be23679308119 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130306 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-02-24tdf#72776 Allow text removal in the shapesSzymon Kłos
Previous fix had crafted condition for fixing one specific case but it was braking other cases. (svx/source/unodraw/unoshtxt.cxx) For example it was not possible to remove text inside textbox and save that -> it was not saved in LOK case. Problem is that we had not saved text inside shape and due to calling GetBackgroundTextForwarder() we did reset to empty content. In this patch we force UpdateData() call by releasing lock just before we try to do some final text cursor operations what applies changes in the content and prevents us from losing it. Call which was invoking GetBackgroundTextForwarder() was: file: xmloff/source/draw/ximpshap.cxx method: SdXMLShapeContext::endFastElement line: mxCursor->gotoEnd( false ); After that I found that we had bug which breaks test: sd/qa/unit/import-tests.cxx odp/shapes-test.odp It occurs when using this patch or when not using my code but removing locking functionality for SvxTextEditSourceImpl. NbcSetOutlinerParaObjectForText triggers shape resizing even when no text is present inside. Summary: 1. revert hack from https://git.libreoffice.org/core/+/71b66b0039819f38c935b4eb5d5951ceaf6e8468%5E%21 2. trigger text update by releasing lock for a moment to keep correct state 3. fix bug with resizing empty shape Change-Id: Idf1fc6caf19dfb932ce7caa21034f76fa04ce5f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130474 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-02-17tdf#145700 Improve lighting in extruded custom shapesRegina Henschel
The fix tries to make rendering similar to MS Office. The ODF standard follows closely the extrusion in RTF and MS binary format. Rendering uses the 3D scene engine. The main problem was, that the z-component of the direction was interpreted with opposite sign. As result the maximum of a light was at false position. Especially a direction from the observer to the object has produced a light behind the shape and so looks as if light was off. The wrong z-direction has produced lighting, which was less intensive than in MS Office. To compensate that, a third light source was added as workaround. That part is removed. Second problem was wrong use of 3D-scene D3DMaterialSpecularIntensity and D3DMaterialSpecular (= UI Specular color). That was not only wrong in OOo but in my previous patch too. D3DMaterialSpecularIntensity corresponds to MS property 'c3DShininess'. Relationship is Intensity = 2^c3DShininess. D3DMaterialSpecular is calculated from MS property c3DSpecularAmt and and c3DKeyIntensity. The light source was missing, but needs to be included, because c3DSpecularAmt is 'the ratio of incident to specular light that is reflected on a shape'. The old unit tests are adapted to this change. MS gives no information how it softens a light in case of harsh=false. ODF specifies it as 'implementation-defined'. The patch uses four additional lights, which have directions in 60° angle to the original light. The light intensity is distributed. That comes near to rendering in MS Office. Changing our 3D engine to provide 'soft' lights was not doable for me. The way MS Office renders a 'metal' surface is different from ODF specification. To distinguish the kinds, I have introduced a new property MetalType. I have discussed it with the ODF TC (see minutes from 2022-02-07) and got the advise to use namespaced values. Therefore the datatype is not boolean. The 'Surface' drop-down in the extrusion bar is changed to make the two kinds of rendering 'Metal' available to the user. If a user sets surface 'Metal' in the UI of MS Office, it sets not only fc3DMetallic but reduces the value of c3DDiffuseAmt in addition. Our 3D-scene engine has the corresponding ODF attribute dr3d:diffuse-color not implemented. To get a similar rendering I change the material color of the 3D-objects as workaround. Change-Id: Ia986b9c318b4c79688e0c0e2d858215b9d612fdc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128449 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2022-02-02Fix variable nameAndrea Gelmini
It's just a comment, but so it is the same as in PropertyActionsOASIS.cxx Change-Id: I43b2b3c51f5e2e23dc273e1cf65ad7c5608b9366 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129311 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-20Fix typosAndrea Gelmini
Change-Id: I95ee74b281eb243e5d251bd5a099029ddfcda1e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128662 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2022-01-20WASM --enable-wasm-strip now skips lots of LO codeArmin Le Grand (Allotropia)
... resulting in a stripped-down, Writer-only build to decrease the resulting WASM bytecode size. It removes the following code from the build: * All other major modules: Base, Calc, Chart, Draw, Impress and Math and related writerperfect filters * The premultiply tables * The (auto-)recovery functionality * All accessibility (but not the accessibility document checker) * The LanguageGuess component * EPUB support * The start center / BackingWindow * The TipOfTheDay functionality * The splash screen communication Currently crashs with anything different then soffice --writer. Closing the document also still crashes. FYI: many of these features are now behind ENABLE_WASM_STRIP_* defines, but they normally don't work on their own, globally! That's because we started with stripping the main components. Change-Id: Ib9c0f9452815910c0a2aceaf142ba1ad4a9cb0d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126182 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-05Fix typosAndrea Gelmini
Change-Id: Ie05c44dd3b85f1fd6c592a8cf5482d5954d7a354 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127971 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-05tdf#130076 Fixed flip not working properly from fileDhiraj Holden
Added code to check whether the angles need to be changed when the section is flipped. Change-Id: I9cc3e16db74c6e9616385bc39849e4c73686b56c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127853 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2022-01-04Drop all commented SAL_DEBUG callsJan-Marek Glogowski
Change-Id: I3be7153d27b83766303519e73d1a355ba327871a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127929 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-26Avoid OUStringBuffer::toString where possibleMike Kaganski
Change-Id: I99abbe97a48b2077e28d6221fb70036e5e412657 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127479 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-26can use OUStringLiteral hereNoel Grandin
Change-Id: I1e71a35c2ce6bc7ef3081054e51494411d9a29ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127491 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-21SAL_WARN->SAL_INFONoel Grandin
this method is often speculatively called, so the warnings here are not that useful Change-Id: Idc9460b365dac955d1ced4c1bc2c9d2f49fbe540 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127209 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-21also handle SVG_COMPAT namespace hereNoel Grandin
Noticed an "unknown element" message while doing some unrelated debugging Change-Id: I1c6d4c9cddb340d892ba63d6d209bf8f72e2203d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127210 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-17Fix typosAndrea Gelmini
Change-Id: I7f1636226c4fbe29d9d2ef850318a9d57f1b5450 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127009 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-12-17loplugin:unusedvariablecheck improveNoel Grandin
to find unused smart pointer variables Change-Id: I200bdd8949032a0e061de61f7903a156651793e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127006 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-14sw ODF shape import: improve is-textbox checkMiklos Vajna
This builds on top of commit 28d67b792724a23015dec32fb0278b729f676736 (tdf#107776 sw ODF shape import: make is-textbox check more strict, 2019-08-26). Before that commit, any non-empty parent style name on a shape resulted in an sw textbox. After that commit, we filtered out Writer images by checking for the Frame parent style name. The problem with this approach is that in case two documents are to be merged together, then it's reasonable to rename the Frame style, but then the complex content inside the shape gets lost. Fix the problem by going with a middle ground: require Frame as a prefix, but allow other names as well. This gets e.g. FrameX to work without breaking the "reject Graphics" use-case. Change-Id: Id59ed28a64a9398f2f1620f69b5f148d65e6c95a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126828 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-12-14tdf#62032 xmloff: list-level is positiveInteger, impl is 0-basedJustin Luth
Thanks for catching this Regina. Change-Id: Iaf6a0c9161378934818e392126a4437e55f5ddf8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126743 Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-12-13ODP import/export: refer to theme from shape text color with effectsMiklos Vajna
Handle luminance modulation and offset (i.e. lighter and darker colors). Change-Id: I536bbca1ed994e991c7ceac153d6a47cb6ef35f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126722 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-12-10Generally determine Rdb content from gb_*_set_componentfile callsStephan Bergmann
...instead of by listing the content somewhat redundantly in the Rdb_*.mk files, to avoid duplication of logic for components that are only built conditionally (and thus should only be included conditionally in the corresponding Rdb). To achieve that, add an "rdb" parameter to gb_ComponentTarget_ComponentTarget (and to the gb_*_set_componentfile macros that internally call gb_ComponentTarget_ComponentTarget), which is used to make the appropriate gb_Rdb_add_component call internally from within gb_ComponentTarget_ComponentTarget. (As a special case, gb_CppunitTest_set_componentfile shall not call gb_Rdb_add_component, as that has already been done by the corresponding gb_Library_set_componentfile call, so allow the gb_ComponentTarget_ComponentTarget "rdb" parameter to be empty to support that special case.) Most Rdb_*.mk files are thus mostly empty now. One exception is i18npool/Rdb_saxparser.mk, which duplicates some of the Rdb_services content as needed during the build in CustomTarget_i18npool/localedata. 1c9a40299d328c78c035ca63ccdf22c5c669a03b "gbuild: create services.rdb from built components" had already tried to do something similar (in addition to other things) under a new --enable-services-rdb-from-build option. However, that approach had four drawbacks that this approach here addresses (and which thus partly reverts 1c9a40299d328c78c035ca63ccdf22c5c669a03b): 1 Rdb_services shall not contain the component files of all libraries that are built. While that commit filtered out the component files that go into Rdb_ure/services (ure/Rdb_ure.mk), it failed to filter out the component files that go into others like Rdb_postgresql-sdbc (connectivity/Rdb_postgresql-sdbc.mk). 2 The code added by that commit to Makefile.gbuild codified the knowledge that there is an Rdb_services, which is brittle. 3 The code added by that commit to solenv/gbuild/Rdb.mk codified the knowledge (for gb_Rdb__URECOMPONENTS) that there is an Rdb_ure/services, which is brittle. 4 Introducing an --enable-services-rdb-from-build option needlessly provided two different ways how the content of Rdb_services is assembled. The changes done here would leave --enable-services-rdb-from-build as a misnomer, as it no longer controls how Rdb_services is assembled. I thus renamed it to --enable-customtarget-components, as that is apparently what it still does now. Change-Id: Ia5e8df4b640146c77421fcec6daa11a9cd260265 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126577 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-09ODP import/export: refer to theme from shape text colorMiklos Vajna
Refer to the 12 pre-defined colors by name + don't write the attribute for the case when there is no theme. Change-Id: Ib6ab5b7b34d896a36e04309bf0cb410998acce01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126566 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins