summaryrefslogtreecommitdiff
path: root/schema/libreoffice
AgeCommit message (Collapse)Author
2024-01-20tdf#105844 add test for ODF wholesome encryption with macro signatureMichael Stahl
... plus manifest schema extension. Change-Id: I73721db8620e97bd58556f9a71afcb0a33f6c7e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161898 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 4d6e9d5e155da1dde05233eb87691e2a454162f6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161866 Reviewed-by: Caolán McNamara <caolan.mcnamara@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-14sw floattable: link ODF proposalMiklos Vajna
Change-Id: Ie0b94b8830f9d2f196effc4a9f7d9fa5839f0d97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159421 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-11-01tdf#156449 Preserve '0' or '?' in exponentLaurent Balland
Exponent in scientific number may use '?' as blank like in format "0.00E+?0" This change: - adds interpreatation of '0' and '?' in exponent - adds "blank-exponent-digits" attribute to scientific number for import and export to ODF - prevents using exponent with only '?'. There must be at least one '0' in exponent - adds QA test of such format and test import/export/import to ODF and OOXML - corrects one basic test Change-Id: If52edc632a161f842270bb2fd77af535e2b978d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154986 Tested-by: Jenkins Reviewed-by: Laurent Balland <laurent.balland@mailo.fr>
2023-11-01tdf#153993 Extend ODF: lowercase for exponent charLaurent Balland
In scientific format, user may want to have clearer format such as: 0.000" "000" "e+" "0 This change - adds "exponent-lowercase" boolean attribute to scientific-number format to preserve "e" or "E" char - includes all positions up to exponent for embedded text of scientific number Add QA test Change-Id: Ie263f4ecf30a1a8dcd8046e1e048767020e54dc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153824 Tested-by: Jenkins Reviewed-by: Laurent Balland <laurent.balland@mailo.fr>
2023-10-30Enable STYLEREF flag export/import with ODFSkyler Grey
This commit enables exporting the following STYLEREF flags with ODF - Search from bottom to top - Hide non numerical After this commit, the following steps have been implemented - The document model (I7d8f455ffe90cface4f3b1acf6b9bef6a045ed19) - The layout (I7d8f455ffe90cface4f3b1acf6b9bef6a045ed19) - The UI (I7d8f455ffe90cface4f3b1acf6b9bef6a045ed19) - UNO (Ib664fec059aa1f7f130acc76c253d5d298fa59f7) - DOCX/ODF filters (here and Ib664fec059aa1f7f130acc76c253d5d298fa59f7) Change-Id: Iad8e8001807f5ceeaedc9665838672695174a936 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158351 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
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-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-01tdf#154449 Add support for hidden named rangesRafael Lima
This patch adds the possibility of having "hidden" named ranges in Calc, in a way similar to what MS Excel has (i.e. they're not visible in the UI and can only be hidden/shown via scripting). This is done by creating a new HIDDEN flag in com.sun.star.sheet.NamedRangeFlag. Hence thia patch makes it so that named ranges can be made hidden/visible via scripting. For instance, consider a Calc document with a named range "NamedRange1". The following scripts hides "NamedRange1" from the UI (i.e. it's no longer visible in the Manage Names dialog): Sub SetHidden Dim eFlags : eFlags = com.sun.star.sheet.NamedRangeFlag aNamedRange = ThisComponent.NamedRanges.getByName("NamedRange1") nType = aNamedRange.getType() Or eFlags.HIDDEN aNamedRange.setType(nType) End Sub To make the named range visible again: Sub RemoveHidden Dim eFlags : eFlags = com.sun.star.sheet.NamedRangeFlag aNamedRange = ThisComponent.NamedRanges.getByName("NamedRange1") nType = aNamedRange.getType() nType = nType - (aNamedRange.getType() And eFlags.HIDDEN) aNamedRange.setType(nType) End Sub This patch also implements ODS and OOX import/export, as well as QA tests. Change-Id: I10efe46938fe772b87dc17fc597cb83648b5efb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155599 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
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-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-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-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-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-11tdf#150408: Implement "Legal" numbering (all levels using Arabic numbers)Mike Kaganski
Enabling this feature on a list level makes all numbered sublevels, that constitute the number of this level, to use Arabic numerals. This doesn't change the labels of other levels: e.g., if level 1 uses A,B,C; level 2 uses i,ii,iii; level 3 uses a,b,c, and is "Legal"; and level 4 uses 1,2,3; then a list may look like A. Something A.i. Some subitem A.ii. Another subitem 1.2.1. This is a "Legal" sub-subitem A.ii.a.1. And its child This improves interoperability with Word. This change introduces document model, ODF and OOXML import and export. In ODF, a new boolean attribute of 'text:outline-level-style' element, 'loext:is-legal', is introduced; its default value is "false". Change-Id: I5ae9f970864854c7e84c4b2f7ce46634b3ef104e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154288 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-07-06xmloff: ODF export: stop producing decorative on draw:frame etc.Michael Stahl
The attribute was moved to the style graphic-properties in commit 2721520ca37654056c3d509657c50ee42e3dcae4, which is in 7.5.2 so users likely have upgraded from 7.5.0/7.5.1 and this can be removed now. Change-Id: I69ef3e2e501af21f04df440bf176e46f651d671b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154074 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-06-27related tdf#153993 Embedded text in scientific numbersLaurent Balland
Embedded text was limited to number:number. But scientific notation may require embedded text like 0.000" "000E+00 This change extend ODF format to support embedded text in number:scientific-number also Change-Id: I4e3220b06efbd9228d722bf518e137d7707ccf4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150804 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
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-22tdf#155271 add drawooo:display to libreoffice-schemaRegina Henschel
Commit 33ef17ed had introduced attribute drawooo:display at 2010-03-02. The entry in libreoffice-schema.rng was missing and therefore validation in unit tests fails, when this attribute occures. The attribute is written in case an object in Calc is hidden by hiding the cell to which it is anchored, for example. The attribute belongs to properties 'Visibile' and 'Printable' in 'Shape Service' in API. Change-Id: Id3d2e7984aed146fca9e2819eb183d7d7bfaf701 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152119 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2023-05-11tdf#155238: Reimplement how ListAutoFormat is stored to ODFMike Kaganski
This reimplements commits 6249858a8972aef077e0249bd93cfe8f01bce4d6 (sw: ODT import/export of DOCX's paragraph marker formatting, 2022-12-19) and 209dce614c43f63f63f5b42a746665c0ec1cbfe3 (sw: fix ODT import of paragraph marker formatting, 2022-12-20). Instead of using an empty trailing span for the ListAutoFormat data, introduce a new loext:marker-style-name attribute for text:p element, referencing a text autostyle. The problems with the previous implementation were that (1) it was impossible (or very difficult) to disambiguate several empty trailing spans, in case it was needed; and (2) this was incompatible change, with other ODF implementations treating the trailing span normally. I couldn't manage to incorporate the attribute to paragraph autostyle, because of problems referencing different autostyles one from another, so put it directly to the paragraph attributes. Change-Id: I33473147f1f774c24cbbc57bf0c4f3a1d83ce5bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151645 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-05-11tdf#150673 sw xmloff: import/export tracked table columnLászló Németh
to OpenDocument format using <style:table-cell-properties loext:text-changes-only="false"/> Follow-up to commit 05366b8e6683363688de8708a3d88cf144c7a2bf "tdf#60382 sw offapi: add change tracking of table/row deletion" and commit 48898a72066ff9982feafebb26708c4e779fd460 "tdf#60382 sw xmloff: import/export tracked table/row deletion". Change-Id: I6fb37322056a42a6746db0e4144b0848b0754b0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151606 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
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-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-27sc: pivot table compact layoutDennis Francis
This implements compact layout for pivot tables. In ooxml each row field can have a compact layout setting. Support for any such "mixed" layout of tabular/outline/compact per field is also implemented. This also implements expand/collpse toggle buttons to field labels to make pivot tables with compact layout more usable. Such buttons are also available if other layouts are used. Conflicts: sc/qa/unit/pivottable_filters_test.cxx sc/source/ui/cctrl/checklistmenu.cxx sc/source/ui/inc/checklistmenu.hxx Change-Id: Ieaa1f3bd282ebdec804d0b45a0af7b3d95a2027f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151057 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.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-10Moved target-url and use-target-url into loext namespaceVojtěch Doležal
Change-Id: I4307a20f34543d4a187b5e59f117b43371f6f6fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148559 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-08Bibliography Marks: Added tests for target-url and use-target-urlVojtěch Doležal
Change-Id: Iaebc9224beac1705bc2399358e414f526ad46e13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148392 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-03tdf#153925 xmloff,sw: decorative flag on frame stylesMichael Stahl
* sw API SwXStyle property "Decorative" * UI checkbox "Decorative" - split up the GtkFrame to always show it * ODF import/export as loext:decorative on style:graphic-properties * test for ODF filters Change-Id: If124cb50ee7776b5807720e65f41a07e7b9f4cf9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148143 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-02-23sw floattable: teach the ODT filter about SwFormatFlySplitMiklos Vajna
Map the IsSplitAllowed text frame property to <draw:frame loext:may-break-between-pages="...">. This is meant to be always a direct formatting, so doesn't go to the style / autostyle. Change-Id: I439fe372271e4b7db511b5e2150e2a3c2e0acf25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147499 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-02-01schema: properly extend office-styles instead of style-style "hack"Tomaž Vajngerl
With the 32a8095eb2c22f7de4bce14f1b5c08dc701deaea I extended the schema in an odd way, which worked by luck. This change fixes this by properly extending the loext schema in a conventional way. Change-Id: I4229145dc2a6ce2f0d5d115b3972121ed2379b9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146453 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-30tdf#118324 Treat blank ? in integerLaurent Balland
Restore and update change 56352 Test of https://cgit.freedesktop.org/libreoffice/core/commit/?id=8ca6468f0f4900d4d3bb45e0e938fe35c308512c is now ok Add disambiguation between '0' and '?' in integer part XML_MAX_BLANK_INTEGER_DIGITS is added for the number of '?' XML_MIN_INTEGER_DIGITS is the number of '?' and '0' This preserve compatibility with previous versions: in previous versions '?' will be transformed in '0' It also applies to scientific and fraction numbers. Integer part for number, scientific and fraction are treated the same way Include QA unit test Change-Id: Iab3127bf07223caac60e409306a1bee2edc37428 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145932 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2023-01-27xmloff: export Theme for ODT (Writer) documentsTomaž Vajngerl
Exports the Theme set on the one and only SdrPage for ODT (Writer) documents. The theme is exported as a sub-element of "style". This differs to ODP (Impress) documents, which export the Theme as part of the master-page element. Currently the code is duplicated, because the theme can't yet be accessed inside xmloff in a non-conflicting way (creating conflicts between modules), which will be fixed in the future. Change-Id: I0e440d14724b49e7d86e9deabc6615a91e8cd31a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146172 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-24tdf#153090 xmloff: ODF import/export of source style on ToXMichael Stahl
For Table of Figures/Objects/Tables. Make this similar to DOCX: only one source style is possible, so omit the intermediate text:index-source-styles element. Also a boolean attribute like text:use-index-source-styles appears as unnecessary complexity, so try to do without. Change-Id: I7cb599c7ec1261ddedc196a25c3eafe35f35fbe9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146013 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-01-13xmloff: use XThemeColor in ODF, change the format for themesTomaž Vajngerl
Change the xmloff filter to use XThemeColor and the associated proprties (CharColorThemeReference and FillColorThemeReference). Change the ODF format for referencing a theme color - make it an element instead a series of attributes on the *-properties style element. Change-Id: I0fa7d8ebffecc02897b7fe9824d6f1776ef36380 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144923 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-12-16sw content controls: enhance preserve idJustin Luth
Follow-up to 100c914d44ae8f362924fe567d7d41d0033ae8ad which added the initial id preservation for DOCX. adding DOCX block SDT grabbaging, ODF import/export [content controls can't exist in DOC format] The ID field is CRITICAL to preserve for VBA purposes. This patch adjusts BlockSDT to also round-trip the id instead of just creating a random one. m_nRunSdtPrToken <never equals> FSNS(XML_w, XML_id) since 2021 with 5f3af56b2c0ef6c628a7cfe5ce6e86f8e1765f5f, so I removed that part of the clause. I had thought about changing the ID to use a string instead of an int, but then the integer version was adopted to fix a regression in the commit mentioned earlier. I think it is AWFUL to have a number as the identifier when it will be used in StarBASIC. The VBA guys have to deal with it, but it would be nice to do something reasonable for LO native access to content controls. However, the concern would be if we allow VBA macro content created in LO to be exported to DOCX format - that would cause problems converting from a string ID to a number ID. VBA editing already is happening to some extent, and mmeeks seems interested in enabling it. So over-all it seems best to just stick with an integer ID. I used the commits for <w:alias> and <w:tag> to compose this patch. XML_ID already existed in include/xmloff/xmltoken.hxx and "id" already exists in xmloff/source/token/tokens.txt The ID can be used in VBA to select a specific control. The id (which is a positive or negative integer in DOCX) specifies a unique control - either by passing the number as a string (of the UNSIGNED value) or by passing as a float (specified with #). For example: msgbox ActiveDocument.ContentControls(2587720202#).ID msgbox ActiveDocument.ContentControls("2587720202").ID but not as an integer since that is used for index access. dim index as integer index = 1 msgbox ActiveDocument.ContentControls(index).ID make CppunitTest_writerfilter_dmapper CPPUNIT_TEST_NAME=testSdtRunRichText make CppunitTest_sw_ooxmlexport17 CPPUNIT_TEST_NAME=testDateContentControlExport make CppunitTest_sw_ooxmlexport18 CPPUNIT_TEST_NAME=testTdf151912 make CppunitTest_sw_core_unocore CPPUNIT_TEST_NAME=testContentControlDate make CppunitTest_xmloff_text CPPUNIT_TEST_NAME=testAliasContentControlExport make CppunitTest_xmloff_text CPPUNIT_TEST_NAME=testAliasContentControlImport Change-Id: I5c4022dc932d941fad9da6d75ce899ee1ff66ff5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142818 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-12-14tdf#151548 sw content controls: preserve tabIndexJustin Luth
This has to be vital to keyboard navigation. Certainly it is good to have it imported before we start to consider tab-movements for form controls. All tabIndex 1's are processed (in placement order) and then the 2's etc. 0's are to be done last. XML_TAB_INDEX already existed in include/xmloff/xmltoken.hxx and "tab-index" already exists in xmloff/source/token/tokens.txt make CppunitTest_writerfilter_dmapper CPPUNIT_TEST_NAME=testSdtRunRichText make CppunitTest_sw_ooxmlexport17 CPPUNIT_TEST_NAME=testDateContentControlExport make CppunitTest_sw_core_unocore CPPUNIT_TEST_NAME=testContentControlDate make CppunitTest_xmloff_text CPPUNIT_TEST_NAME=testAliasContentControlExport make CppunitTest_xmloff_text CPPUNIT_TEST_NAME=testAliasContentControlImport No existing unit test found containing blockSDT with tabIndex. Change-Id: I8a958844e6192b079a2b22a62dedfd8739021f4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143603 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-12-13tdf#151548 sw content controls: preserve lockJustin Luth
DOCX SdtControls can be locked in two ways: -Content Control cannot be deleted (sdtLocked) -Contents cannot be edited (contentLocked) or both (sdtContentLocked) make CppunitTest_writerfilter_dmapper CPPUNIT_TEST_NAME=testSdtRunRichText make CppunitTest_sw_ooxmlexport4 CPPUNIT_TEST_NAME=testSimpleSdts make CppunitTest_sw_ooxmlexport17 CPPUNIT_TEST_NAME=testDateContentControlExport make CppunitTest_sw_core_unocore CPPUNIT_TEST_NAME=testContentControlDate make CppunitTest_sw_macros_test CPPUNIT_TEST_NAME=testVba make CppunitTest_xmloff_text CPPUNIT_TEST_NAME=testAliasContentControlExport make CppunitTest_xmloff_text CPPUNIT_TEST_NAME=testAliasContentControlImport Change-Id: I5a82d9f6b5103a4902f59af66cd8a99addd4e690 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143542 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-12-12schema: add link for decorative proposalMichael Stahl
Change-Id: Ib655795cf407bc833964c43dae6017364e5d6fc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143883 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-12-09tdf#143311 offapi,oox,writerfilter,xmloff,sw: decorative flag on flysMichael Stahl
* sw core RES_DECORATIVE as a FRMATR * sw API SwXFrame property "Decorative" * UI checkbox "Decorative" * ODF import/export as loext:decorative on draw:frame * DOCX export * DOCX import - very non-obvious how to get it from model.xml to dmapper * PDF/UA export: tag flys with this flag as Artifact * test for DOCX filters, ODF filters, PDF export Change-Id: I1ceb67fdd4e1cfa212aafdeb1c5f4ccd873d433e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143815 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-11-09sw content controls: allow no list items in a dropdownMiklos Vajna
- Replace SwContentControl::HasListItems(), which assumed that the type is dropdown if we have list items. This is not valid, it's OK to have a dropdown with no list items. Add a GetDropDown() instead to check for the type, explicitly. - UNO API sets the dropdown bit when list items are set and the type is not expilcitly combo box or drop down, to keep backwards compatibility with existing documents. - No change to the edit shell, SwDropDownContentControlButton already checked if items are empty and used STR_DROP_DOWN_EMPTY_LIST in that case, but that was dead code previously. - ODT & DOCX filters are now updated, ODF has a new <loext:content-control loext:dropdown="..."> attribute to specify that the type is a dropdown, explicitly. Change-Id: Id577ba9639151549a8f953aab31685a73a898504 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142491 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-10-18sw content controls, alias and tag: add ODT filterMiklos Vajna
Map the Alias/Tag UNO properties to: <loext:content-control loext:alias="..." loext:tag="..."> on export, and do the opposite on import. Change-Id: Icecbe9037ede0bf8d72d52f2db44328a8db1d83a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141492 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-09-22sw content controls, combo box: add ODT filterMiklos Vajna
Map the ComboBox UNO property to: <loext:content-control loext:combbobox="..."> on export, and do the opposite on import. Change-Id: I33c162ace15025c8031eb678ba5a43ac085c4b6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140364 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-09-14tdf#149551 use 'WritingMode' instead of TextPreRotateAngleRegina Henschel
Commit 7e23cbdbb6ec0247a29ed8a8f744c01e10963ea0 changed the code so, that TextPreRotateAngle is used to track ooxml vert attribute. This patch changes it so, that the style attribute WritingMode is used. Now text direction can be written in 'writing-mode' attribute in the graphic properties in ODF, same for shapes as for frames. The needed conversion from WritingMode BT-LR and TB_LR90 to TextPreRotateAngle for rendering of text in custom shapes is now in one place in class SdrObjectCustomshape. The shape edit engine cannot yet render it itself. Some unit tests are adapted to use WritingMode property instead of TextPreRotateAngle. The value text::WritingMode2::TB_RL90 is introduced, corresponding to vert='vert' and textDirection='tbRl' or ='rl' in OOXML. It is used for frames too, so that the original text direction is preserved and vert='eaVert' can be distinguished from vert='vert'. TextPreRotateAngle is currently still used in SmartArt import for 'upr' and 'grav' and in emulating 'upright' but no longer to emulate text direction. Change-Id: Idc4339bbfc3592fe90b154d75e2c404a1fa30856 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138813 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-08-18Fix typoAndrea Gelmini
Change-Id: Ie0757b332f4ddb0e9d9d6e2c97b7497766221dec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138310 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-08-15xmloff: import and export for the chart data tableTomaž Vajngerl
This change adds import and export code for the the chart's data table properties to the ODF format for chart documents. The data table properties are exported to a new element "data-table", which then references a auto style with all the properties of a data table + new data table specific properties: HBorder, VBorder, Outline, Keys which are mapped to "show-horizontal-border", "show-vertical-border", "show-outline" and "show-keys" chart attributes. Also adds a test for the import and export: imports xlsx -> exports to ods -> imports ods Change-Id: Id45d9369fd619959e4d6eba7ca51c8ddce9c8f56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138260 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-22sw content controls, date: add ODT filterMiklos Vajna
Map the PlainText UNO property to: <loext:content-control loext:plain-text="..."> on export, and do the opposite on import. Change-Id: Icec0c35b2b9fca53104e6526c98083db52df5d42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137340 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-07-08xmloff, sw: ODF import/export of fieldmark separatorMichael Stahl
Previously there were only the fieldmark-start and fieldmark-end elements; now add a fieldmark-separator, so that the field command can be stored as character data (and elements if there is any formatting) instead of attribute value. The import is a bit more complicated because there are already existing documents that are missing the separator; it's not possible to predict if there will be a separator at the time when the start element is seen, so add some hack to toggle inserting the SwXFieldmark with separator at the end (when the document contains a separator, i.e. after the command) or separator at the start (when the document is missing a separator, i.e. after the result). Change-Id: I14d2f50f57d690e75643df5d14fd881ebc759a41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136513 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>