summaryrefslogtreecommitdiff
path: root/xmloff/qa
AgeCommit message (Collapse)Author
2024-10-02qa: use SetODFDefaultVersion everywhereXisco Fauli
Change-Id: I4a08abea9a6c61a0365d238abf1021806ae6df29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174375 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-02Add ODF 1.3 Extended / ODF 1.4 versions to configuration and UIXisco Fauli
The new default is ODF 1.4 Extended Change-Id: I50f60cccde81b5ea320478314482cc67a7bcc2e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174343 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-09-26tdf#162687: ODF 1.4: fix importXisco Fauli
Change-Id: Ic728c1c92ff5815c0780ba18e1a473d26e13e63f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173993 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-09-26CppunitTest_xmloff_draw: simplify a bitXisco Fauli
Change-Id: Ic36e2c50953e99d7509c1d16ffef2f9f5f3a7bf4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173992 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-09-26CppunitTest_xmloff_draw: remove leftoverXisco Fauli
after 146dac7d30823678b9e87f8128904f5815c1a2ed "tdf#162690, tdf#162687: Adapt to ODF 1.4" Change-Id: I1236b89186e51e594610272a2ea490274ddc41e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173979 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-09-25tdf#162690, tdf#162687: Adapt to ODF 1.4Xisco Fauli
After this, the workaround introduced to OpenDocument-v1.4+libreoffice-schema.rng in afa4965e4df6f1f0c43c0a059f216e7f8a21ba82 "schema: update to ODF 1.4 OS" can be removed Change-Id: Iecf31cec0bf187155a97e5b6ccf8173b6aba82fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173940 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-09-24tdf#162686: Adapt to ODF 1.4Xisco Fauli
Change-Id: I47f29a88eb0e98dc0fd312a3895d3a578fa04d46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172768 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-09-12Optimize TokenMap and AttributeList in oox and xoMike Kaganski
Shaves lots of string allocations, and uses optimized code paths Change-Id: I8e33e2aecdc7e0d2f2c31b774daa36304b3973ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173179 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-06-25tdf#161483 enable LO to read ODF angle unitsRegina Henschel
ODF uses in several places data type 'angle' (18.3.1, ODF 1.3). That is a double followed by unit identifier 'deg', 'grad' or 'rad' or a unit less value in degrees. LO uses in the API angles in degrees, 1/10 of degrees and 1/100 of degrees in data types 'double', 'short' and 'long'. Without the fix LO does not interpret the units, but takes only the number part. Change-Id: Ib3f2a518a25199e3cf7a7a8572e169785f75c427 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169360 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2024-06-11tdf#161327 Interpret angle units in dr3d:end-angle ..Regina Henschel
.. and draw:rotation in <draw:hatch> element. ODF 1.1 has not specified the syntax of datatype 'angle'. Since ODF 1.2 it is specified as double with unit "deg", "grad" or "rad", or without unit. The unit-less value is specified to be in degrees. But OOo, AOO and all LO versions had written the value unit-less in 1/10th of a degree in some cases. To fix it, LibreOffic will be enabled to read units. When then the active versions are able to read units, starting with the then actual version, LibreOffice will write angles with unit 'deg'. This has already be done for gradients, see tdf#89475. This patch starts the first step to make LibreOffice able to read units for dr3d:end-angle (UNO D3DEndAngle) and for draw:rotation (UNO FillHatch.Angle). I have not found further cases of writing 1/10deg. The patch still writes unit-less 1/10th of a degree for export to ODF 1.3 and earlier. When it is time to write unit degree or when LibreOffice supports the next ODF versions, some places need to be adapted. They are marked. The converter convertAngle is renamed to convert10thDegAngle() to indicate, that it is special. The parts, which were specific to gradients are moved to the gradients, so that it is now usable for dr3d:angle and draw:rotation too. I intend to write next a patch that enables LibreOffice to read angle units for cases where LibreOffice already writes unit-less values in degree. That is not so urgent, but to bring LibreOffice nearer to ODF, reading angle units should be implemented nevertheless. The file xmlbahdl.hxx is moved from xmloff/source/style to xmloff/inc to have access to it from xmloff/source/draw. Change-Id: I8ffc2735f8bcfefb86efa80eb05f900c32403f31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168336 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2024-05-22Related: tdf#145972 sw images: fix rounding error in relative size calculationMiklos Vajna
Open the bugdoc, see that the image is roughly half of the page width, right click, properties, UI shows that the width of the image is 5% of the width of the entire page. This only happens if tools -> options -> writer -> general sets the UI units to points, the default cm case is fine. This went wrong with commit 9e8712ed6f9fb5dbd971e352a5709bd45fadc74f (sw image dialog: fix fallback width/height for images with relative sizes, 2022-03-17), because the layout size started to matter more after that commit. This lead to the nWidth != m_xWidthED->get_value(FieldUnit::TWIP) check in SwFramePage::Init() to be true, because 11906 * 0.48 is 5714.88, so you got 5714 in the layout, but got 5715 with rounding in SwFramePage::Reset() (which tries to calc the page width based on the 48% and the fly width). And once we had that mismatch, we went down the wrong path. Fix the problem by using rtl::math::round() in SwFlyFrame::CalcRel(), so the relative width twips value is 5715 everywhere: once we have consisteny, the UI value is correct, too. Note that the original bugdoc needs more fixing, this just fixes the bugdoc where KeepRatio is false. Change-Id: I1e8782c95a0cf9d97375c36d41134735c01f3e46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167916 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-05-15loplugin:ostr in xmloffNoel Grandin
Change-Id: I24f5626e57e03217e4bcf77289c785e255b9f904 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167667 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-03-18Clamp extrusion light level to allowed range for ODFRegina Henschel
With import of shapes in 3D-mode from pptx files, the internal values for light level might be outside the range 0..100 and thus not allowed in ODF. These high levels are needed to get a similar rendering to MS Office. The export to ODF clamps them now to the allowed range. I do not intend to change the export to loext namespace, because the extrusion mode of custom shapes needs a totally new handling. But that will not be possible timely for version 24.8. Change-Id: I839903cbaf1b304c1e0c4374080963bc70352e61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164948 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2024-03-14tdf#141908 - CppUnittests: replace usage of sal_Int32 with colorsRafał Dobrakowski
Conversion of hex/dec colour notation (example entry Color( 255, 255, 255), Color(0xFFFFFF) - COL_WHITE) For the other available colour definitions. Change-Id: I9eed0cd64adcbc8d25e1c22143a000906a457586 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163729 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-03-13tdf#141908 - CppUnittests: replace usage of sal_Int32 with colorsRafał Dobrakowski
Conversion of only one colour, Color(0, 0, 0), Color(0x000000) - COL_BLACK Change-Id: I4ba2412929522532d32304734b0269c70d75e5ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163460 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-03-12tdf#146619 Recheck xmloff/*cxx with IWYUGabor Kelemen
Change-Id: I6e39a223fd567d70254998e55de5110db87ab4fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164486 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-02-14tdf#141908 replace usage of sal_Int32 with colors in xmloffIlmari Lauhakangas
Change-Id: Ia2661fa0f6864d6553e5cca7469e1d351bb06d17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163305 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-01-27Drop std::as_const from css::uno::Sequence iterationsMike Kaganski
Obsoleted by commit 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code, 2021-11-05). Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-03UnoApiTest::loadFromURL -> UnoApiTest::loadFromFileMike Kaganski
The old name was misleading (it doesn't take an URL, but a filename); also, now it's easier to grep for it - doesn't get mixed with vcl::graphic::loadFromURL. Change-Id: Ib88d2194200a6a54d2326971e0306ba39f0c7025 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161578 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-28sw floattable, per-frame wrap-on-all-pages mode: add ODT filterMiklos Vajna
See <https://issues.oasis-open.org/browse/OFFICE-4150>, map SwFormatWrapTextAtFlyStart to <style:graphic-properties loext:wrap-text-at-frame-start="..."> on export, and the opposite on import. Change-Id: I43ee4c014fbcef8e883ff08ea061cfd395399a98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160010 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-11-19Extended loplugin:ostr: xmloffStephan Bergmann
Change-Id: I87e53216693f2d6489a1dd80e62141ca5621a87f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159662 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-16comphelper: use c++20 contains() instead of find() and end()Miklos Vajna
Whether an element is contained inside a container is better to be checked with contains() instead of find() because contains() conveys the intent more clearly. Change-Id: I267d915c95fcf9c98b2e11daa89c8fe801e59a75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159484 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-10-20Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: xmloffStephan Bergmann
Change-Id: I2d58bbea770c4dd188cae13e11218a29f4cd5d05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158294 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-07loplugin:ostr: automatic rewriteStephan Bergmann
Change-Id: I2d09b2b83e1b50493ec88d0b2c323a83c0c86395 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157647 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2023-09-12Added parent / child relationship to comments.Gökay Şatır
Adding parent name of a comment into odf file when there is a parent. Also includes: Added test case to comment property test. Change-Id: I033f6574b4875fcb76b16c8b5b9d9f7d55b52cbe Also includes: Add parent / child relations to replied comments. Change-Id: Ia7d95c4e6020b501798a89cbdcae64dc5691437c Change-Id: I08b5ab6eb11adcafcbf3559896d79d41b449b26a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156824 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-08-31tdf#157018 Enable import of color theme for DrawRegina Henschel
Use the color theme import in Draw too, otherwise we will not be able to detect theme colors. Change-Id: I8f01ba69848a6265193407a952144b31e3a7fdb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156313 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-30tdf#156975 Save a Theme in Draw too not only in ImpressRegina Henschel
Draw and Impress have many things in common and should therefore be treated equally where possible. Only if the theme colors are present in the document, colors can be recognized as theme colors during import. Change-Id: Ia1fae2aff989ae305c210efa3f925a80898880e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156267 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-25xmloff: support stroke/line complex color import/export + testTomaž Vajngerl
Change-Id: I4ed901fd5b23e58aafa781e2b07f460f034fbba3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155685 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-21Tests with color stops to assert Color and not BColor valuesTomaž Vajngerl
For testing color stops of a gradient we don't need to assert super precise values (doubls to the n-th decimal point) as long the end results in the same (8-bit) Color value. So change the tests to convert the BColor that is in gradient color stops to Color and assert the Color value. Change-Id: Ibd7661e2f72955a0778e822df1fae568973be357 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155360 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-15ComplexColor various clean-up and (trivial) refactoringsTomaž Vajngerl
Don't allow access to member variables of ComplexColor and makes them private. Needs a lot of changes. Change "scheme" to "theme" to be more consistent. In LO we usually call the "theme color" what is usually refered to as "scheme color" in OOXML, where it is sometimes refered to as "scheme" and other times as theme color. Remove ThemeColor class which was replaced with CmplexColor some time ago. Remove un-needed includes and un-needed components. Use isValidThemeColor in many places where we check that the ComplexColor is of "Theme" type and that ThemeColorType is set to a valid value. Change-Id: I325595fa65b8e56a4707e9d22acc6330aac28961 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155359 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-14tdf#156321 ODT import: fix lost char format on outer span elementsMiklos Vajna
Regression from commit 209dce614c43f63f63f5b42a746665c0ec1cbfe3 (sw: fix ODT import of paragraph marker formatting, 2022-12-20), the bugdoc has a first paragraph with nested spans (the outer sets the boldness) and the text does not appear as bold in Writer anymore. What appears to be the problem is that our model is just a list of spans for a paragraph, so nesting is converted to a list of spans, but now the outer span char format is lost. Fix the problem by making the condition of the 'no upgrade from char format to para format' more strict: do this in case we have empty spans. That fixes this new use-case and leaves the original one fixed. Note that in the long run it may make sense to always disable the upgrade from char format to para format, but that has to be done in a way that does not break the import of nested spans. Change-Id: Ie6fafb3e9649e50790c7ecae8e136e6600f3341e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155648 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-06-28xmloff: ODF import: adapt generator parsing to 2-digit major versionsMichael Stahl
DocumentInfo currently assumes that a LO version encoded in "BuildId" property has only 1 digit major version, which is now wrong and would start to give incorrect results when major version "30" will be detected as LO_3x. Add the dots as separators into the BuildId because it's not going to work without. Change-Id: I8918afe3642cbefa8488c57658f1505c9a20eddd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153649 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-06-15ODF export: simplify restart handling to skip list id where possibleMike Kaganski
This continues to minimize cases where random ids are written, helping to make the output more deterministic; it builds upon commits 8f48f91009caa86d896f247059874242ed18bf39 (ODT export: omit unreferenced <text:list xml:id="...">, 2022-03-10), and 82bbf63582bdf28e7918e58ebf6657a9144bc9f3 (tdf#155823: Improve the check if the list id is not required, 2023-06-14). The previous code used to write 'text:continue-list' when the list is restarted. It is unnecessary when there is no other condition requiring such a reference (like style change, or interleaving lists); so relax the conditions allowing to put simple 'text:continue-numbering="true"'. This also allows to simplify a bit the code around 'ShouldSkipListId'. Change-Id: Idf8be455953d08fd578266bda22f3a55d7b9ee23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153104 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-14tdf#155823: Improve the check if the list id is not requiredMike Kaganski
The implementation introduced in commit 8f48f91009caa86d896f247059874242ed18bf39 (SwNumRule::HasContinueList) was a bit naive: it assumed that maTextNodeList is sorted (it is not, and so, valid cases to avoid the id were missed); it assumed that a given list can only consist of items of a single numbering style, and so only tested the list of nodes referenced from maTextNodeList of given SwNumRule. I.e., this implementation targeted a special case of a list style fully covering a single continuous list. This skipped ids for list items with list styles, in which maTextNodeList passed the check in HasContinueList, but which were followed by items with a different list style, continuing the same list. This constellation outputs continue-list attribute in the following items (see XMLTextParagraphExport::exportListChange), which references the skipped id. The resulting ODF is an invalid XML (an xml:id is missing that is referenced), and also does not allow to continue such a list. The change tries to fix this, using a list of nodes in XMLTextParagraphExport, and analyzing if the list of the current paragraph has a continuation that needs to reference this list id. Two new hidden properties introduced in SwXParagraph and SwXTextDocument: "ODFExport_NodeIndex" and "ODFExport_ListNodes", resp. They allow to pipe the data to the export. The previous special casing of property state for "ListId", used in SwNumRule::HasContinueList, is removed together with the mentioned function. The intention is to have a logic allowing to detect 100% cases where the list id is required, and where it's not required. A related unit test for tdf#149668 was fixed to not rely on the mentioned ListId property state workaround, and moved from sw/qa/core/unocore to xmloff/qa/unit. Change-Id: If6a6ac7a3dfe0b2ea143229678a603875153eedb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153044 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-05tdf#155549 MCGR: Recreate 'axial' from symmetric 'linear'Regina Henschel
When exporting a shape with an axial gradient fill to OOXML, it is converted to a linear gradient with multiple color stops. Versions before MCGR had recreated it as axial gradient on import from OOXML. But now LO is able to handle multiple color stops and so the linear gradient from OOXML is imported as linear gradient in LO. When such file is then written as ODF, the multiple color stops are in elements in extended namespace and versions before MCGR do not understand them. They show only the first and last color (which are equal) and the gradient is lost. With this patch LO converts the linear gradient back to an axial gradient on export to ODF. The exported axial gradient is rendered in a version with MCGR same as the linear gradient when opening the OOXML file. The difference is, that versions without MCGR now render an axial gradient with two colors. Change-Id: I2b416b4cdca75d8327107a4f259d63c2e6e97ac3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152574 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2023-06-02tdf#145538,tdf#147021: qa: range based loopsDr. David Alan Gilbert
A bunch of range based loop changes in various qa sections that also take out about 1% of SAL_N_ELEMENTS Change-Id: I8ef000e9aa400cd8363b48f6175f6ab258cefbd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152422 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-02MCGR: Use tryToRecreateBorder too for transparencyRegina Henschel
This is similar to 'Use tryToRecreateBorder for better BW comp with LO' (see commit 8259a99f41367a1d8326c9157fe1902915715879), but now for transparency gradients. Change-Id: I1c2e11562fa998c364896d517f4ed3bfe92f6c15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152508 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2023-06-01MCGR: Unit test for 'Use tryToRecreateBorder for...'Regina Henschel
Unit test for commit 8259a99f41367a1d8326c9157fe1902915715879. Change-Id: Iba3367fe42b5014b98cf575f53006fc09a79d6ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152428 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2023-05-27xmloff: add color-type attribute to complex colorTomaž Vajngerl
We need to identify what the color type of the complex color is. For now we mostly use "theme", but in the future we can also have other types like "rgb",... when the infrastructure for that is built. Change-Id: I38c91d294a191ca3124be4e99050977c9815d23e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152253 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-05-25xmloff: rename theme color names and color-table to theme-colorsTomaž Vajngerl
For ODF it's not needed to abbreviate names and we prefer to use full names. The theme color names in OOXML are abbreviated and the same names were used also for ODF - this was changed now. "color-table" used in "theme" element has reused the already existing "color-table" element name in ODF, but they don't relate to each other. The name was changed to "theme-colors", which makes more sense anyway. Change-Id: I61ec91895d301ad4343f2b977d5cbcf38e360b99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152252 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-05-25xmloff: rename *-color-theme-reference to *-complex-colorTomaž Vajngerl
Change-Id: I63dd83522da7699162eb06a019a679d4b8750d10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152053 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-05-12use ComplexColor instead of ThemeColor for better OOXML compat.Tomaž Vajngerl
In OOXML a color definition includes more represenations, one of which is scheme color (which is what is implemented in ThemeColor currently), but it supports other representations too (RGB, HSL, System,..). ComplexColor includes all the representations, so to have a better compatibility with OOXML, this changes all uses of ThemeColor to ComplexColor. In many cases the usage of ComplexColor isn't the same as the usage of ThemeColors, but this cases will need to be changed in a later commit. Change-Id: I9cc8acee2ac0a1998fe9b98247bcf4a96273149a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151492 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-05-09change model::ColorSet to be stored in a shared_ptr in model::ThemeTomaž Vajngerl
Change-Id: Ic3067f1681c047cd944e64179c568f4e972e0c95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151447 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-05-05Reworked bibliography mark link target to have user-selectable typeVojtěch Doležal
Without this change, havign no link is not possible, if the bibliography entry has URL. This commit adds a select box for user to choose between target types (Entry URL, specific Target URL, None, bibliography table row) The main features are that it also makes it more obvious to the user and makes it possible to easily extend target types in the future. As for compatibility, files from before 7b99871635 are fully compatible without any hurdles, as missing property maps to the old behaviour. Bibliography marks saved after 7b99871635 will also revert to the old behaviour, however no actual data (such as target URLs) will be lost. Change-Id: Iad61dd8b4df337fa202f45d117313ee47ec20c05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150708 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-05-04Fix typoAndrea Gelmini
Change-Id: I95d5aff29a500ef171f198b28e8b5a4b43b61fe2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151361 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-05-04WIP ODF import and export for MCGRRegina Henschel
Current state uses: Element loext:gradient-stop with the attributes svg:offset, loext:color-type with value 'rgb', and loext:color-value with values of kind #rrggbb. Element loext:opacity-stop with the attributes svg:offset and svg:stop-opacity, both with datatype double. With MCGR enabled testColorGradientWithTransparencyDOCX in CppunitTest_chart_export3 has the value 90000 instead of 90196. That is same value as in original file. Thus I have adapted the test. Change-Id: I976934f9b8fb79be4f74adb180b3285486dce31f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150060 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-04-17Remove some unused includesMiklos Vajna
Mostly com/sun/star/frame/Desktop.hpp is unused after inheriting from UnoApiTest. Change-Id: I71b75fa5c880337ff294583b96af09c90b5059c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150514 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-04-08use shared_ptr for model::Theme instead of unique_ptrTomaž Vajngerl
Also change other cases to use the shared_ptr so there is no need to do copies and replace some of docmodel/theme/Theme.hxximports with forward declarations. Change-Id: I4588cb25e05e5f3e535011fffb68a8075b05aecc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147691 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-03-24related tdf#102261: xmloff: ODF import/export for ParaTabStopDefaultDistanceSarper Akdemir
Introduces ODF import/export for ParaTabStopDefaultDistance (loext:tab-stop-distance). Also adds a unit test that covers import & export of the property. Change-Id: I8a69a9e2b73e8f1172f92dc35fada901f4b887f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148540 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-16XmlTestTools: factor out common codeXisco Fauli
Change-Id: Ie212c86c6c0ac20878be88d88ade5eb1c989942d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148935 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>