summaryrefslogtreecommitdiff
path: root/xmloff
AgeCommit message (Collapse)Author
2023-10-29tdf#157663 SW: Tracked change improve moveAttila Szűcs
Made accept/reject handle move redlines other pair, (moveto-movefrom) and handle the whole move redline, even if it is split into small pieces that separated from each other. Added unique ID to every move redline to help find their other parts. This move ID is generated in case of: move recognition moveing a paragraph. (directly create move redline with unique id without calling the recognition it is faster and more stable) (there are other cases that could be improved to not use recognition, but generate ID directly, like moveing selected partial text with mouse) Implemented the odt export/import of this move ID. it is a tag like this: "<loext:move-id>4</loext:move-id>" next to creator/date Improved the docx import to generate this move ID, so move redlines can find their other parts (Not changed Docx export... it works a bit, but far from perfect) Improved move reckognition: It can find them even if they are split into multiple parts differently. (like "ab"+"cd" == "a"+"bcd") Disabled this because of probably performance issue. made a complex unit test for it. Note: Left the move recognition on every place, to avoid as much regressions as possible.. but in the future, we may can disable it in some cases. Note2: We will have to keep move recognitnion, because there are documents from past, saved without any move informations in the file, and users expect to see move redlines there. (generated by the recognition.) Change-Id: If968d4235b676c5e538cfaf4187a4482a86eae9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157740 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158611 Tested-by: Jenkins
2023-10-24xmloff: document the GutterAtTop Writer settingMiklos Vajna
Change-Id: Ic56d7b3333e50bd6cf0d32d19995b09bf612384c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158381 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-10-23Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]StringStephan Bergmann
...in include files. This is a mix of automatic rewriting in include files and manual fixups (mostly addressing loplugin:redundantfcast) in source files that include those. Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.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-20tdf#86790: Add support for a word-style stylerefSkyler Grey
STYLEREF is a field type in Word which changes its content based on nearby paragraphs. For example, upon creating a styleref referencing "Heading 1" you will see the text of the nearest "Heading 1"-styled paragraph that is above the field. This patch implements STYLEREF in Writer as a cross-reference. By using "insert>cross-reference>styles" you'll be presented with a list of styles. Selecting one and clicking "insert" will create a field which has text from the "most relevant" instance of the style. To find the most relevant instance we first search up for paragraphs with the style, and if there are any we take the closest. If there weren't any, we search down for paragraphs with the style. This patch also updates our use of STYLEREF for chapters exported to docx by using it for all chapters not only those in headers and footers. This allows us to approximate more chapter field functionality even when moving between Writer and Word. Finally, this patch adds some tests for STYLEREF: - testTdf86790 tests that the "sample file with STYLEREF" document from tdf#86790 has the correct fields - testStyleRefSearchUp tests that the STYLEREF searches up when there are bits of text both above and below it - testStyleRefSearchDown tests that the STYLEREF searches down when there are bits of text below it only - testMarginalStyleRef tests that the STYLEREF searches from the page top when it is placed in a footer - testFootnotetyleRef tests that the STYLEREF searches from the reference mark when it is placed in a footnote Still TODO: - [ ] Update documentation - [ ] Implement reverse-searching (\l) and nondelimiter suppression (\t) - Probably these 2 will be in a followup patch Change-Id: I25dd7a6940abee5651a784b9059fe23b32547d6c Signed-off-by: Skyler Grey <skyler.grey@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157456 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-10-19SAL_WARN->SAL_INFO in XMLShapeImportHelper::CreateGroupChildContextNoel Grandin
Change-Id: Ia4bdbfdf6d85999e4cf8fa78131aec2dc776f41a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158175 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-19tdf#157484 UI: Add UI controls for personal information to be keptBalazs Varga
or removed upon save. With the new options button we can keep the security infos upon save such as (even if we set the remove personal infos): - RedLine Info - Document User Info - Author and date of notes - Document version infos Also on the infobar, if we have a warning, clicking on the infobar button the security option dialog will open where we can set/modify these options. follow-up of: 1f440348eb0892fd2c9597806d87b5fe9d60d49a (tdf#157482 UI: Turn Security Warnings popup windows into infobars) Change-Id: I8d5d944d76dbdd31653401246113de097ca6d57b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158112 Tested-by: Jenkins Tested-by: Gabor Kelemen <kelemeng@ubuntu.com> Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
2023-10-19tdf#143148 Use pragma once instead of include guardsAml-Hassan-Abd-El-hamid
Change-Id: I6f6f69cc97fada3ca3bbdead24c10f9099ff28b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158068 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2023-10-18Clean up the remaining uses of OUStringConstExpr, and drop itStephan Bergmann
Change-Id: I30b2ac77b58e2ae1d1e997a0c830c513542b973d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158101 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-16tdf#141892: Set chart view to dirty state after loadingMike Kaganski
Previously, ChartViewHelper::setViewToDirtyState was only called in ChartModel::impl_notifyModifiedListeners during the load process of inline charts; after commit 574eec9036c5f185b3572ba1e0ca9d111eb361dc, the chart doesn't set its modified state when loading, and thus the view did not get notified about the necessary updates. This change introduces a hidden property in ChartDocumentWrapper, named 'ODFImport_UpdateView', which is set in SchXMLImport dtor to force the notification after the loading. Change-Id: Id9d82f16d233d2172cd6808a8498822e13b21b21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158051 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-16Resolves: tdf#157726 missing chart from Base reportCaolán McNamara
since: commit c9b5c627ccb5b70c103c559b1df38c1175efc2d1 Author: Caolán McNamara <caolan.mcnamara@collabora.com> Date: Wed Sep 6 10:05:23 2023 +0100 add referer to ole objects Change-Id: I9ef18bf0d734dd900bdbcac475ca15af7b15456e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158027 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-16xmloff: document the ContinuousEndnotes Writer settingMiklos Vajna
Change-Id: I37d223092cc2ff5ccfdaf39424ba9dca2b9b1ef4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157941 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-10-15Repurpose loplugin:stringstatic for O[U]String vars that can be constexprStephan Bergmann
...now that warning about O[U]String vars that could be O[U]StringLiteral is no longer useful Change-Id: I389e72038171f28482049b41f6224257dd11f452 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157992 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-13add LibreOffice_settings.xml_config-items.fods to document settings.xmlMichael Stahl
Change-Id: Idede15529ed60e49e08e6e9f986cd198ca4a68a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157930 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-10-11Drop o3tl::span, can use C++20 std::span directly nowStephan Bergmann
Change-Id: Ic21ff7bf48f07f7277979d52e99d2c5c268de83f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157825 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-10-04tdf#145834 Consistency for "Fontwork"Bogdan B
Change-Id: I5f660fac8576d96bf2d2363106be56a4d4fb4f64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157545 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2023-09-28tdf#156146 xmloff: ODF import: add backward compatibility hackMichael Stahl
As a follow-up to ade0a153f453500f15343380ac937252992733e0 "tdf#114287 xmloff: ODF import: fix text:list override of list style", add some ugly compatibility hack to preserve the visual layout of documents produced by LO versions before 7.6. Override the left/first-line margin of the applied numbering rules with what is in the paragraph or paragraph style, and try to do this only in the specific situation where the list style is the same. Change-Id: I1f4520c9bf9d2257d2e3864e4ddb2d28451bbd2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157284 Tested-by: Jenkins Tested-by: Gabor Kelemen <kelemeng@ubuntu.com> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
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-09-10PropertySetMergerImpl does not need to implement XAggreggationNoel Grandin
Checked on jenkins using 'make check' and +void SAL_CALL setDelegator(css::uno::Reference<css::uno::XInterface> const &) final { assert(false); } Change-Id: I40f4906723ab040b95a8db5c34e81b09a5ede38c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156772 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-10OMergedPropertySetInfo does not need to implement XAggreggationNoel Grandin
Checked on jenkins using 'make check' and +void SAL_CALL setDelegator(css::uno::Reference<css::uno::XInterface> const &) final { assert(false); } Change-Id: I8623da7e9962df1dbb09327933fccbddd82a4562 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156773 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-08WARN->INFO in XMLIndexSimpleEntryContextNoel Grandin
This is not generally a problem Change-Id: If7957da45e5ad00f881ef3a7c5c676b09494ec77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156713 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-07Fix typoAndrea Gelmini
Change-Id: I4f2f281c12fefe6f69ceacb715faf2b8644abeaa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156635 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-09-07Fix typoAndrea Gelmini
Change-Id: I330ff642b93e07c402f8dbb2fa0cefb1af1a7671 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156634 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-09-07Fix typoAndrea Gelmini
Change-Id: I8902bfb3c779471d4aff80ca7e94a9848b9ece51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156636 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-09-06add referer to ole objectsCaolán McNamara
so we can identify what document is requesting their contents extends: commit 5668e73beb30b95abc6520b7432c54972ca3ab2c Date: Wed Nov 20 14:43:45 2013 +0100 avmedia: Implement "block untrusted referer links" feature See f0a9ca24fd4bf79cac908bf0d6fdb8905dc504db "rhbz#887420 Implement 'block untrusted referer links' feature" for details. This adds some further /*TODO?*/ comments, and one known problem (marked /*TODO!*/) is that movies/sounds are not blocked during a slideshow presentation. to these objects too, namely OLE2Shape and derivatives AppletShape, FrameShape and PluginShape so in paranoid mode we won't load the contents of such objects from documents considered "untrusted". Change-Id: I6d988035d0cd09fd3fade5f6885fe336c95579ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156612 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-09-06improve debug logging in SdXMLShapeContext::AddShapeNoel Grandin
so we get source info for the exception Change-Id: Icd54a4d1388c7a48ab3e0c8bd17c21f6004a470b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156589 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-05drop a stray printfCaolán McNamara
Change-Id: Ie9b48ab2db03c7c45aa4ffc24ca4532522bb60a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156571 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-09-05SAL_WARN->SAL_INFO in XMLShapeImportHelperNoel Grandin
these attributes are typically processed elsewhere, so this warning is not useful Change-Id: I2ebfe87e81e2959fbf25b17ed93a3bc80e1c6ab5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156560 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-05xmloff: rename m_aObject in XMLThemeContext and clarifyTomaž Vajngerl
Clarify what m_aObject is in the theme import (XMLThemeContext) and rename to a better name. It is refering to an object that has the "Theme" property, which is usually found in on XPage (master page) or XModel, but technically could be any object that has the property (for getting and setting the XTheme type). Change-Id: If15a8c42a0c516cd0566f4ee9e81f7315ef1651e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156511 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-09-04tdf#138792: PDF export: add batch of dublin core attributesSarper Akdemir
Adds support for exporting, editing in the UI and storage in ODF for the dublin core attributes listed below. Contributor (http://purl.org/dc/elements/1.1/contributor) Coverage (http://purl.org/dc/elements/1.1/coverage) Identifier (http://purl.org/dc/elements/1.1/identifier) Publisher (http://purl.org/dc/elements/1.1/publisher) Relation (http://purl.org/dc/elements/1.1/relation) Rights (http://purl.org/dc/elements/1.1/rights) Source (http://purl.org/dc/elements/1.1/source) Type (http://purl.org/dc/elements/1.1/type) Introduces XDocumentProperties2 to extend XDocumentProperties interface. Change-Id: Ie2e0b1fbbbd00b66aef477ba1bf4e4f61c03a3b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156330 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-09-02replace set(nullptr) with clear()Noel Grandin
It's a little easier to read, but mostly it makes an upcoming loplugin easier to implement Change-Id: I4ae7db8eda77795dab3255d1afd8ba4f20a8de76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156451 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-01sc: add ODF import/export of the Theme + testsTomaž Vajngerl
One missing thing is the support in calc to save the Theme into the ODS document and read that back. The theme element is added as a child element to the office:styles - the same as it already is added in Writer. Also adds "Theme" property as a top level document property so it is possible to get and set the theme in xmloff. Also tests have been added to cover this usecases. Change-Id: Ic214ff5e945b77d50e6c881def9d49509560a0e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156363 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-09-01move theme element export to xmloff to remove code duplicationTomaž Vajngerl
Both Impress/Draw and Writer export the model::Theme in a similar way, but the code is duplicated. Remove duplication and move the code to a common place (on the SwXMLExport class) so it can be reused at both places. Change-Id: Id93acfafb0dd4ab0168b3228079f6ce6f64e6b55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156362 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.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-25tdf#152724 Extend ODF for blank width "_x"Laurent Balland
Number format code "_x" is currently saved as a text string containing a number of spaces corresponding to the width of character "x". It may be confusing for user if its format code is modified. This change introduces a new XML tag XML_BLANK_WIDTH_CHAR to replace the previous text string if ODF version is extended <number:text> and <number:embedded-text>: the attribute is composed of a string containing the used character and its position in the text string (if position is 0, it is omitted). Several blank code characters are separated by '_'. Replacement blanks in the text string are preserved to enable compatibility. Example: format code "foo"_M_I_N"!"???,???.000_.000"!"_) is saved as: <number:number-style style:name="N173"> <number:text loext:blank-width-char="M3_I6_N7">foo !</number:text> <number:number number:decimal-places="6" number:min-decimal-places="6" number:min-integer-digits="6" loext:max-blank-integer-digits="6" number:grouping="true"> <number:embedded-text number:position="-4" loext:blank-width-char="."> </number:embedded-text> </number:number> <number:text loext:blank-width-char=")1">! </number:text> </number:number-style> Add QA test Change-Id: I785e1a14ecccc900e9fd5af88dd7b743fefcc48c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146582 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2023-08-25Revert "use more Reference::query instead of UNO_QUERY_THROW"Noel Grandin
This reverts commit 7fc6063914432d58d86cfcbd728d967e7c86ebfd. sberg noticed that there is a difference now: there's a subtle difference now, in that if y was null originally, it would have thrown a (caught) exception, whereas now it will crash in the y.query<X>() call. Change-Id: Idbb5a08d635d15b5ca63f4822eddf05fb0a5afa0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156002 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-21move BGradient to awt::Gradient2 UNO conversion into docmodelTomaž Vajngerl
This is needed because the module dependencies are an issues if the conversion is done in basegfx. The bigger issue will come when the ComplexColor conversion will be done as basegfx can't depend on docmodel because of circular dependencies. The BGradient is also more suitable for docmodel anyway as the previously it was part of the model and is not a basic (gfx) type - however this doesn't move the whole BGradient into docmodel yet. Change-Id: Id91ce52232f89f00e09b451c13da36e2854ae14b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155674 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-18use more Reference::query instead of UNO_QUERY_THROWNoel Grandin
since querying with exceptions is consideably more expensive Change-Id: I968a9a40766b2abb0d3058549b0ed44011fd5716 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155791 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-08-02sc: theme color support for sparklines + ODF & OOXML import/exportTomaž Vajngerl
This changes Sparkline colors to use complex colors instead and adds Sparkline theme color import and export support for ODF and OOXML. Change-Id: I58edd525d50f95199bd4fe7825afb51aaa7fc091 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155113 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-01sc: Add import/export ODF support for border complex colorsTomaž Vajngerl
ODF Import and export support for border {left,right,top,bottom} complex colors. In addition round-trip test was extended with the border use case. Change-Id: I1d14690272c06e8ffcfcd483eb7f688ca5bb1e5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155014 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-01xmloff: fix import of CharComplexColor - add StylePropertiesContextTomaž Vajngerl
Import of CharComplexColor in Calc didn't work because the class XMLComplexColorContext wasn't used. This introduces a new class StylePropertiesContext, because the plain SvXMLPropertySetContext is not enough as we can't define to use XMLComplexColorContext when XML_CHAR_COMPLEX_COLOR is used on that class. Also adds a import/export test for CharComplexColor. Change-Id: I765ac71a801a5e9bcb105aaea73637df5e601b85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155008 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-07-31use more tools::Rectangle::Adjust*Noel Grandin
Change-Id: I6fb9e838f493149c52936932ef3b977db034ec1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-18sc: ODF import/export of background cell complex colorTomaž Vajngerl
Change-Id: Idf526aea21ccfeda9b03d1fb69588f120b6e161d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154571 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-07-18xmloff: move XMLComplexColor* import/export classes to public includeTomaž Vajngerl
Change-Id: I52aad31f63858eba905481812cbf971493252642 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154570 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>