summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-01-17introduce {Char,Fill}ColorThemeReference which uses XThemeColorTomaž Vajngerl
Adds a unified UNO property for theme colors *ColorTheme (CharColorTheme and FillColorTheme) which uses XThemeColor, that replaces the properties *Theme, *TintOrShade, *LumOff, *LumMod. The properties are still present for backwards compatibility and to keep ODF support working in tests as that needs a bigger change. Reactor the code and tests to accomodate for this change. Change-Id: If7983decb4ba528b49fe7b5968aa9efc696a9efc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144783 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 197e5f81213d14fdcbff40edf73385ecd4cd9815) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145553 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-01-16Bump version to 22.05.9.3cp-22.05.9-3Andras Timar
Change-Id: I0ebd0d6bababb254a7dd8a5906e7634908be7b60
2023-01-16tdf#140666 Make delete reference possible from the NavigatorJim Raykowski
This patch makes it possible to delete a reference without having to do the steps given in the help. "References are fields. To remove a reference, delete the field. If you set a longer text as a reference and you do not want to re-enter it after deleting the reference, select the text and copy it to the clipboard. You can then reinsert it as "unformatted text" at the same position using the command Edit - Paste special. The text remains intact while the reference is deleted." (cherry picked from commit 9d387cc1e7848848c41f29ad91fee44ade79f678) Conflicts: sw/source/uibase/utlui/content.cxx sw/uiconfig/swriter/ui/navigatorcontextmenu.ui Change-Id: If363340288de25aacbc28acd5858ce275f309af6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145559 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-16NSS initialization guardAndras Timar
Change-Id: I61a5886d0d13eaef6a61479e35d52a85937075ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142385 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com>
2023-01-16more detailed NSS error reportAndras Timar
Change-Id: I1b005a331aeed1c00d6bf18a6dff0ffa844ba6f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142286 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
2023-01-16lok: ensure to initialize the security contextHenry Castro
if the backend NSS is used, before load the document ensure the NSS is initialized otherwise NSS next functions calls will fail. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I7ac1d7eeee681995e6c284e2dd4595a33d044af4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142213 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
2023-01-16sw: add a new .uno:DeleteBookmarks UNO commandMiklos Vajna
This is similar to commit c68d06dfa1498f862923eaddf3e5d247650a53d5 (sw: add a new .uno:DeleteTextFormFields UNO command, 2023-01-10), but that was for fieldmarks and this is for bookmarks. The primary use-case is to specify a prefix for the name, so e.g. all Zotero-related bookmarks can be removed, but it can be also used to remove all bookmarks when no prefix is specified. (cherry picked from commit 40753de837b9776dd8b33e830be0cceef83f024a) Change-Id: Ifc1f666f66d9fc3f6cd055f9263f0e4f949c191d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145470 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-16sw: add a new .uno:UpdateField UNO commandMiklos Vajna
This is similar to commit ea208f6004770eb4b81d28e6930cd0c7bd5d8f12 (sw: add a new .uno:UpdateBookmark UNO command, 2023-01-11, but that was for the bookmark under cursor, and this is for fields (refmarks as a start). (cherry picked from commit 402ab3d145a1e8e123caabf4567aef7b6631fc3c) Change-Id: I3e547b668361898b7ed734ea325fdf1d74e5dbb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145459 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-16sw: add a new .uno:UpdateBookmark UNO commandMiklos Vajna
It is possible to update all bookmarks (having a certain name prefix) and their contet, but one can't update the bookmark under the cursor, which is needed for Zotero citation clusters. Fix the problem by adding a new .uno:UpdateBookmark UNO command that can update the (innermost) bookmark under the current cursor. This can be implemented on top of the recently added IDocumentMarkAccess::getBookmarkFor(). The UNO command is intentionally hidden from the customize dialog since it only makes sense to invoke it from a macro / API with parameters, not interactively. (cherry picked from commit ea208f6004770eb4b81d28e6930cd0c7bd5d8f12) Change-Id: I3e750dfb637f50716be1155a94bc986131b84f20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145413 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-16introduce docmodel comp., model::ThemeColor, use it in SvxColorItemTomaž Vajngerl
Added a new component docmodel, that has the document model types, which only depend on other basic components. This is needed so the types can be used in every relevant component - xmloff, oox, svx, editeng,... Introduces model::ThemeColor, which is a class used to store the theme color data, including transformations (svx::Transformation). For UNO use XThemeColor is added, and the implementation UnoThemeColor which wraps svx::ThemeColor, so it can be tranported around. Reactor all the code and tests to accomodate for this change. Change-Id: I7ce6752cdfaf5e4d3b8e4d90314afa469dd65cfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144847 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit bd0f526f2d3e1ffe43a74672485815768eee6e9e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145528 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-01-16sw: add the ColorSet from SdrPage into ColorSets in ThemePanelTomaž Vajngerl
Change-Id: I7c4ef103b2be65a8adbad5d4f00304ee22be668f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143997 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 7c10e3b120ba75a2db75342fdc68040a179404b8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145399 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-16oox: add ThemeExport that exports a svx::Theme into theme.xml fileTomaž Vajngerl
Adds ThemeExport that takes a svx::Theme as input and exports that into a theme.xml file in the OOXML document. Currently supports exporting of color schemes and font schemes. Format schemes are hard-coded for now. The ThemeExport isn't yet used in any actual export functionality. Change-Id: I5ca9c256da65be77e7192be7d66c73d26d78ebd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143996 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 958d4667e361a1d8461889117ca830a5da85d0ee) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145398 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-01-16Introduce FastAttributeList::add(NS) taking std::u16string_viewMike Kaganski
... and simplify some places removing explicit conversions from OUString to OString. Change-Id: I4cdf9f3ee3101b3d00a0bbba53a983ed3bebce4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131445 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit de81df1f3f9b7660db450c638925f90adf9c026b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145547 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-16crashtesting: exception during dtorCaolán McNamara
Change-Id: I9874778ba79540cfde32bf59c3a63ebb72889dc7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141215 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 06423ddc61a378894c91a6a23fb31afb1701d8f2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145546 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-16use std::unique_ptrCaolán McNamara
Change-Id: Ibb3d71c8d50e1ad7236a6fe01ff83d3cd1a866f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141214 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 2241ce64b29e87e0c654ab529b71aa98f71b4a14) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145545 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-16sw: read theme from OOXML file and set it to the draw pageTomaž Vajngerl
This change extends writerfilter to use oox::ThemeFragmentHandler to read the theme properties, and sets that to the one and only draw page of a Writer document. This change also removes ThemeTable and replaces it with the ThemeHandler, which takes theme font data from svx::Theme instead. In addition, a test has been writen, which loads a document with a theme, and asserts the draw page has the theme and the theme properties currently supported. Change-Id: Iff0048cd21ea030ac55287707852acc463ec3cb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143699 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 312100003fc7cae358038aaec853584782c698f8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145388 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-01-15oox: add support for importing font scheme into a svx::ThemeTomaž Vajngerl
Change-Id: I862256a17ce84c85174678f3fd03c8ef6661f2c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143995 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit d5a71bc6a28f8a3d726b2ac4688c7cef9d77ddf0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145387 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-01-15svx: use array for colors in ColorSet, add consts, rename varsTomaž Vajngerl
Use std::array for colors in ColorSet as there are always only 12 colors for a color scheme. Add "const" to getters where appropriate. Rename maColorSetName to maName in ColorSet - long variable name is not needed. Change-Id: Iacb976a22af2d2585d627b0ba65d98cbe1b825c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143994 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 29c2bba1f3ef216d226c97197185066880fc1ab5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145386 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-01-15oox: rename name variables that are imported into oox::ThemeTomaž Vajngerl
Rename names for font scheme and format scheme in oox::Theme so it is easier to know for what they are used for. Change-Id: I83e2978c407ab7f264de4a161575b086bc5efc03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143993 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit cffe7884342f249e82780a46f9aba4213e9dd378) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145385 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-01-14tdf#152425 Synchronize import and export style names mappingMike Kaganski
1. Make the mapping in StyleSheetTable::ConvertStyleName match the opposite direction mapping happening in MSWordStyles::GetWWId and ww::GetEnglishNameFromSti. Add missing styles, provide comments to clarify the process and find respective pool format ids. 2. Instead of appending " (user)" to conflicting style names, which is the method used by SwStyleNameMapper to disambiguate API names, append " (WW)", which allows to avoid unwanted merging conflicting styles. Change-Id: I47b1c7f570da6e6e21155669fdd1b77de5cc17da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145349 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145377 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-01-14tdf#152425 Make Word names unique, and use them for style ids generationMike Kaganski
Before, a style id was generated from LibreOffice name, and then the name was replaced with Word name. Given that Writer's List N maps to Word's List Bullet N, and Word's List N doesn't map to anything in Writer, this led to styles.xml having after roundtrip: <w:style w:type="paragraph" w:styleId="List5"> <w:name w:val="List Bullet 5"/> ... <w:style w:type="paragraph" w:styleId="ListBullet5"> <w:name w:val="List Bullet 5"/> So the idea is to do the following steps: 1. Collect all the exported styles (unchanged); 2. Build unique Word names for collected styles (new): a. Process all the styles that map to special Word styles first, so that their Word names don't get changed when made unique; b. Process the rest of the styles, making sure to append a sequential number after the Writer name, if a clash happens. 3. Build Style Ids from the Word names (previously Writer name could be used), also making sure they are unique. Change-Id: I9f8f254aa6ae713671234f0109b94cc72a588150 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143905 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145376 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-01-14tdf#152425 Fix order in stiName arrayMike Kaganski
Since their introduction in commit 552d05f57175ecdd0736dc257319bc30aa88d696 (INTEGRATION: CWS portlaoisefilterteam16 (1.1.2); FILE ADDED, 2003-12-09) and commit 9ba054a180fe1fcd410a2887351c2ff1fcb30847 (INTEGRATION: CWS portlaoisefilterteam16 (1.1.2); FILE ADDED, 2003-12-09), the enum sti and GetStiNames were accidentally not matching each other. commit 78284714b73a8307174c596295894e8f3951e09a (tdf#76817: fix missing heading styles assigned to outline levels in ooxml, 2016-02-04) introduced a use of ww::GetEnglishNameFromSti, and since then, the unmatched elements started to get written to DOCX styles with wrong names, like <w:style w:type="paragraph" w:styleId="List5"> <w:name w:val="List Number"/> instead of original name "List 5". Change-Id: I8888b3f117e0b7f57c2dbb90565475d529416c60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143828 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145375 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-01-13sw lok: expose name of refmark under cursorMiklos Vajna
This is similar to commit 4bcb66ec7b417fbe113267f2615e78fe47eb55ca (sw lok: expose name of bookmark under cursor, 2023-01-11), but that was for the bookmark under the cursor and this is for refmarks. (cherry picked from commit 81f690ec0cb2a6dc0d6ca0f6de3adcc07eb7bc12) Change-Id: I0acf0181d0acfdc087e1ed737b3c18ab3736031a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145429 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Justin Luth <jluth@mail.com>
2023-01-13lok: add function getDocLanguagesHenry Castro
If the spell checker is disabled to use a remote spelling feature, the getLanguages function is obsolete. In order to not break stable functions, introduce the getDocLanguages for the remote spelling feature. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: Ic210f31eddd3208b29d073ff35ba4fa2d98ea772 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145363 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2023-01-13lok: adjust paint rect for in-place editingSzymon Kłos
This allows to send correct cursor position (at the very end of the cell) when typing numbers in LOK mode. This fixes regression from: commit 9257486636dfe95b73e5690462ba6e8408a12166 lok: sc: render expanded EditEngine when editing in-place Change-Id: I1f6c7ce3de7a2ba7ccbd4f9f9becd49e352cf05e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145260 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2023-01-13Simplify management of id-to-style-to-string-id mappingMike Kaganski
Instead of having three container objects for that, use one vector of appropriate structures. Slots are in sync and unique automatically. Change-Id: Ibb2c48ce42bf98f84df8230439ca98cb5b75051a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143807 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145373 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-01-13lok: support per-user timezoneAshod Nakashian
This adds support for user-specific timezone. When none is provided during loading, the system default is used. Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk> Change-Id: Ie863450687eb82bc475268a09c9112e9fd50020f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144816 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2023-01-13tdf#151384 DOCX export: lost hyperlink format in localized UITünde Tóth
Fix losing color and underline of hyperlinks in localized builds, at least with Russian UI. Regression from commit d57b4480903f700ad7c95e885b9dd0ace5883cfc "tdf#127579 DOCX export: fix losing color and underline of ODT hyperlinks". Change-Id: I1eebcf58a7071226e80df3f84ed1264c5a8baf31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141761 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145397 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-13tdf#132781 DOCX: export interoperable hyperlink style namesTünde Tóth
Similar to the paragraph styles, export default character style names instead of the localized ones to avoid e.g. not interoperable hyperlinks in MSO. Change-Id: I65678a564ae4e73a1d8319df364defd698381256 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136139 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145374 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-13Revert "sw: lok: use redline author for saved author fields"Aron Budea
Causes unit test failures in online: unit-wopi-lock, unit-crash, unit-wopi-fail-upload, unit-wopi-save-on-exit, unit-wopi-documentconflict. This reverts commit c33e60dd5d5aa8dd585afc9498f87d17ab22fb27. Change-Id: Ib2a29ded0d3f7c2c2ba4ba4d192a3a0099b8023c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145424 Tested-by: Aron Budea <aron.budea@collabora.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
2023-01-12sw lok: expose name of bookmark under cursorMiklos Vajna
It was possible to get the names of all bookmarks, but you could not get the name of the (innermost) bookmark under the current cursor. Getting the name of the current bookmark is useful for Zotero: if we already have a citation and want to insert one more, then we should turn the current citation into a citation cluster. Fix the problem by adding an API similar to what commit bb20dee2ef1b0804065e1cda2c834d257fdd90ed (sw lok: expose field type & command of fieldmark under cursor, 2023-01-05) did, but here we deal with bookmarks, not fieldmarks. Handle the actual bookmark lookup in MarkManager, such functionality looks useful outside LOK as well. (cherry picked from commit 4bcb66ec7b417fbe113267f2615e78fe47eb55ca) Change-Id: Ic5b9b36fda243c5d7d360fa03745b3e121b67b06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145348 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-12sw: add a new .uno:DeleteTextFormFields UNO commandMiklos Vajna
Users sometimes want to "unlink" their citations, which means deleting the fieldmarks (if fieldmarks are used to represent citations, e.g. with Zotero), which means keeping the field result as-is, but removing the field metadata and the actual field start/seprator/end characters. Do this similar to .uno:TextFormFields, which can do an update of such fieldmarks, i.e. add the ability to filter for a certain type and field command prefix. This is meant to allow removal af all fieldmark that belongs to one one feature, e.g. Zotero. This is similar to 7765b442e13048f857fd7ee49ced1731caee297e (sw: add a new .uno:TextFormFields UNO command, 2022-11-28), but this is about deleting (the field commands, not the result), while that was about updating. The same for bookmarks & refmarks are not yet supported. (cherry picked from commit c68d06dfa1498f862923eaddf3e5d247650a53d5) Change-Id: I02548b030b1822f7b36d3bc5ff9553d728f065c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145347 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-12sw: lok: use redline author for saved author fieldsDennis Francis
Without the fix author fields will expand to "Unknown author" when loading files which have author fields in them. But only update the fields when the first view joins and not for later view joins. Change-Id: I4ac3b25349b8057812c45dc8148f8b3fc3b7ca1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145192 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-12oox: set svx::Theme directly to a SdrPage when importingTomaž Vajngerl
Bypass the need to set the theme data (svx::Theme) throught UNO as multiple nested properties. Much more properties will be added to the svx::Theme and this will simplify handling a lot. Change-Id: I0b54628ff22c7c823a999de257fd5bb45e736bdb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143992 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit a6253e13e0f3f866ab47e4271db9a80d8cbce708) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145371 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-01-12svx: rename mnPitch to mnPitchFamily, add resolvePitchFamilyTomaž Vajngerl
Rename mnPitch to mnPitchFamily as it contains both. Extract the code to resolve what is pitch and what is family into its own (static) function. Change-Id: I0c17351ea690a85decefb8d73dd07644ce5c78d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143991 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 4ee7e71d850315f5ae4c3b763b0e80e8d83a6454) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145370 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-01-12svx: rename ThemeColorType enum values, use enum instead of indexTomaž Vajngerl
Change-Id: I81c1553205365c4076562474078b3b0aa834b249 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143990 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 1386e26b2d7fc5173266ffbfb94bc82b1d3f7bb9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145369 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-01-12editeng: move "tint or shade" variable into SvxThemeColorTomaž Vajngerl
Change-Id: Ia2094854a8275082cf7444307e17fe5449c43b3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143698 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 6fb682487e355933d79a8ef74560ecf318b4f705) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145368 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-01-12sw: support for reading back theme color from OOXMLTomaž Vajngerl
OOXML supports theme colors and tint/shade value that additionally changed the theme color. Read back which theme color + tint/shade value was applied in the resulting color and add this attributes as properties to be used by writer. In sidebar theme panel the changing the theme colors now doesn't takes this into account and changes the colors correctly. Change-Id: I3a2d49d485fd37a1611483ee0bb5e6034ac5f88e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143697 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit df9f3f3fd81d4f81ee2ff984d1e19999abea2963) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145350 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-01-11sw: rename .uno:UpdateSections command fieldsPranam Lashkari
renamed fields name in JSON to be consistent with section insertion and getter Signed-off-by: Pranam Lashkari <lpranam@collabora.com> Change-Id: Icca0be155542b7dc6df1b29e6c7d4191db8659ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145315 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-11sw: add a new .uno:UpdateSections commandMiklos Vajna
There was LOK API to insert a new section with provided HTML content and to query it, but there was no LOK API to update such created section with new names/contents. This is needed in case Zotero wants to store citations with refmarks, in which case it wants to store the bibliography with sections. Introduce a .uno:UpdateSections UNO command that can do this: the sections will be renamed if necessary & the content will be updated. The content update is reasonably straightforward, because the section always contains at least one empty paragraph, so there is no danger in simply deleting the old content before inserting the new one. This is similar to babba472391d26aed68d7ac31c7a918c08e65256 (sw, UpdateFields: add new TypeName, NamePrefix and Fields parameters, 2023-01-04), but that was for refmarks / citations, this is for sections / bibliography. (cherry picked from commit 71a479afb7e9762de930361e6089e23ab8d4af74) Change-Id: Idde6d5ed1b0f25f40df502bb6b7e7ca590ef9151 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145281 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-11vcl ITiledRenderable: rename supportsCommandValues() to supportsCommand()Miklos Vajna
It gets a single command (to determine if using it with getCommandValues() is OK or not), so the plural was confusing, as mentioned at <https://gerrit.libreoffice.org/c/core/+/145082/5#message-802b1be9194440a3dcee0cad5e54795cbbdea584>. (cherry picked from commit 913b399a73c4d6dfd2c9f5983f56f612f3262fa7) Conflicts: include/vcl/ITiledRenderable.hxx sw/inc/unotxdoc.hxx sw/source/uibase/uno/loktxdoc.cxx Change-Id: Idf3c81aadeaeb3d42a50aba2ac58d5ed4278651f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145278 Tested-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Justin Luth <jluth@mail.com>
2023-01-11sw, lok: implement a getCommandValues(Sections)Miklos Vajna
There was no LOK API to get a list of all sections where the name matches a certain prefix. This is useful in case the API client wants to know what previously inserted sections were deleted by the user as part of deleting text content. Add a new getCommandValues(".uno:Sections") that returns the names of matching sections. Do not return the section text, assuming that would be updated by the API client anyway. In practice this is needed by Zotero in case it wants to model its bibliography items with sections. (cherry picked from commit 2ddd41b420cea7f1b988f0b8acbca564b2811382) Change-Id: If4f02d2a27f2328020934b319d30561aeaaf6612 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145279 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Justin Luth <jluth@mail.com>
2023-01-11sw, UpdateBookmarks: support renaming bookmarksMiklos Vajna
The problem was that the LOK API client wanted to change the name of the bookmark, but nothing happened, because we had a sanity check that made sure the provided vs existing bookmark names match. The intention was that the bookmark name is just an ID (you can store additional properties in per-doc custom properties, those can change), so we can require that bookmarks never get renamed when using this command. Fix the problem by dropping this requirement and rather use renameMark() to adjust the in-doc bookmark name if needed. This also handles undo/redo for us. (cherry picked from commit d2318503d559c3797965da777627e4ee45143043) Change-Id: I7a426c865ddf24f13741c0369fb3991da2e881b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145280 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
2023-01-10sw: return field under cursor inside field nodePranam Lashkari
Having values inside field node makes it easier to detect which commands value is being returned in online. otherwise its impossible to predict the command from "type" and "command" as "command" can be anything and "type" is very generic this also makes output more consistent with "GetTextFormFields" Signed-off-by: Pranam Lashkari <lpranam@collabora.com> Change-Id: I1b8b39bfd0de6d7b19c2944bd42f7031d60518af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145248 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-01-10sw: document FN_UPDATE_TEXT_FORMFIELD and FN_UPDATE_TEXT_FORMFIELDSMiklos Vajna
If you don't read the commit message or the code, it wasn't really obvious that FN_UPDATE_TEXT_FORMFIELD works based on the current cursor. (cherry picked from commit 8336c61ba059551cb74df5ec53d2b45a3cf41814) Change-Id: Icd8bc856e5d50b995fa92559c873a50b48b98ba8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145238 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-10sw, .uno:InsertSection: add a new Content parameter and accept HTML thereMiklos Vajna
When Zotero uses refmarks to represent citations, then a section is used for the bibliography. While it was possible to insert refmarks with a given name & content, inserting a section with a provided HTML content was not possible. A section (and not a refmark) is needed for the bibliography, as a refmark is a text attribute, so it must start and end in the same paragraph. Fix this by adding a new, optional Content parameter to .uno:InsertSection, which allows providing multi-paragraph, formatted text. This is somewhat similar to what commit fa82e151d80d15eeb6dfae434f1dbb3b68907188 (sw, .uno:InsertBookmark: add a new BookmarkText parameter and accept HTML there, 2022-12-06) did for the bookmark case. (cherry picked from commit dd775cd630c907bc7d8bcd6f57ffd3f66115a5ba) Change-Id: I0ccbc8a765fed4e019783d0b743c1cd2d0596093 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145237 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Justin Luth <jluth@mail.com>
2023-01-10lok: sc: avoid the shared spreadsheet dialogHenry Castro
It is not needed the LO core shared spreadsheet because the online has collaborative functionality turns on by default. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I57ab83eae2913522d55704ae5a115e30c9d10034 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145091 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2023-01-10tdf#88484: Show sample text for Abyssinica SIL fontKhaled Hosny
The font sets Arabic Presentation Forms-B bit, probably because it includes U+FEFF (Zero Width Space) which happens to be in that block but it isn’t an Arabic code point. Filter this bit out if we already decided it isn’t an Arabic font. Change-Id: I9935c793b8a7592eb92db59bc75de65b81ab99fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144819 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com> (cherry picked from commit 18b39c8c9b35528c8fb172339126b613827d09aa) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144797 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2023-01-10Get ScViewData through the current doc shell in headless modeParis Oplopoios
When using --convert-to, ScDocShell::GetViewData() would return nullptr so we now get the ScViewData through an alternative route. Change-Id: Ie71a4a1077b3c63c0aadd394fc0d966e679e8803 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142480 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 95cb9a01bfacf7d9f03194b0710ca3c249bb62fb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142442 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2023-01-09sw: add a new .uno:UpdateTextFormField UNO commandMiklos Vajna
It is possible to update all fieldsmarks (of a certion type, of a certain field command prefix), but one can't update the fieldmark under the cursor, which is needed for Zotero citation clusters. To make this more complex, insertion inside an existing fieldmark is explicitly not wanted, see commit a178a2ac6df8dc63a7ab8d4a19b90ae8a17baca4 (sw UI: fix crash on inserting a fieldmark inside a fieldmark, 2023-01-02). Fix the problem by adding a new .uno:UpdateTextFormField UNO command that can update the (innermost) fieldmark under the current cursor. The uno command is intentionally hidden from the customize dialog since it only makes sense to invoke it from a macro / API with parameters, not interactively. (cherry picked from commit 337416dafb66ed8f930d2d69e83fae438fc85f3c) Conflicts: sw/source/uibase/shells/textfld.cxx Change-Id: I46fc4f701a20839945d765eb13aec7362ab83788 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145144 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>