summaryrefslogtreecommitdiff
path: root/include/svx/theme
AgeCommit message (Collapse)Author
2024-03-04cool#8327 use tools::JsonWriter for theme colorsNoel Grandin
Change-Id: Iebca3781910f9e28100258da8266d51f673f31d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164232 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-02-12use more UNLESS_MERGELIBSNoel Grandin
Change-Id: I351a9127fb26369d8f598b6d6519d7e490fa476b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163190 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-01-12Send document colors with lok callbackSzymon Kłos
First step for publishing any palette for LOK. Let's start with Document colors (colors used in the document) which can be extracted similar to theme colors from SfxViewShell. Modify generateJSON function so it appends palette into existing ptree/JSON. In the next step we can make it more generic so it will be able to send any palette managed by PaletteManager. Change-Id: Ibb56690af6dfd59ee232e88b28e7a3d312d0e16c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161798 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 0460be8848b0ce02c07183e41dd7137ac3b94164) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161941 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2024-01-12sc: announce theme colors with lok callbackSzymon Kłos
As it is done already for Writer. Unfortunately cannot move the code from afterCallbackRegistered to base class in sfx2 as it is not linked to svx which is needed to generate JSON. So at least share generation and sending part in ThemeColorChangerCommon. Signed-off-by: Szymon Kłos <szymon.klos@collabora.com> Change-Id: Icbf681230bd4c49698c47d852a0862620d93bcec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161771 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161927 Tested-by: Jenkins
2023-10-02tdf#146619 Recheck include/s* with IWYUGabor Kelemen
Change-Id: Ia0a6330278b044f448c9928362308aadc8fc9a20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156989 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-08-25svx: refactor text color theme changing and add undo supportTomaž Vajngerl
This refactors text theme color changing to use editeng directly and also makes it possible to add undo support. Some refactoring changes were also needed in Writer and Calc ThemeColorChanger implementations. Change-Id: I5cc21205aa3866f65f5b2132ecaa760292401263 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155819 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-23sd: add ThemeDialog to Impress/Draw, refactor ThemeColorChangerTomaž Vajngerl
Add "Theme" menu action, which starts the common ThemeDialog. Add Impress/Draw specific ThemeColorChanger and remove the one in svx, so that only the interface and common function remain. Rename the svx ThemeColorChanger files to THemeColorChangerCommon. Change-Id: Ibf07a443cadf0452747ab6685f65df37b145c984 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155682 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-06-12cid#1532370 Uninitialized scalar variableCaolán McNamara
Change-Id: I5673443c75f5698884d5fc7ccfec1c82b8ca88ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152860 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-06-08lok: send theme palette after the change in ThemeDialogTomaž Vajngerl
For some reason the SdrPage is constructed in Online after every change (cursor, selection) so can't use that to send theme change callback. Instead of that send it after the theme is changed with the ThemeDialog. in addition this requires that we transport model::ColorSet in a shared_ptr more, to prevent doing constant copies. This requires that the IThemeColorChanger interface is changed and the signature of apply() method. Change-Id: Iac951fce57a8e9dff467bd27b2f9c64ec65ea30c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152635 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 6c40e4d1796bcb6418dcb5ec17f46f576c171796) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152728 Tested-by: Jenkins
2023-06-05lok: callback to send the updated theme palette when theme changesTomaž Vajngerl
The callback sends the updated theme color palette when the theme changes or initially when the view is registered, so the client should always have the up-to-date theme color palette stored, so it can just show the color picker with the theme at any time without the need to call the server. Change-Id: I7cceccc46c2fad23ba89e6d3f3643e37f8dab292 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152589 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-06-05svx: extract theme color generation into ThemeColorPaletteManagerTomaž Vajngerl
The generation of theme colors generation code is moved to the ThemeColorPaletteManager class, so it can be reused. Also change the GetThemeColors return type from std::vector<Color> to std::shared_ptr<theme::ColorSet> as we can now safely do that and simplifies things. Change-Id: I4a54bff889a1f97cb1e30467188dc69e07e8c518 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152588 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-27move ColorSet class to own file inside docmodelTomaž Vajngerl
Also move ColorSet from svx to model namespace so it is consistent with other classes in docmodel. Change-Id: Iacbdbdf5ece4015c628a0e45adf6a732b2d27777 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146220 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-27use ThemeColorChanger also in svx, when changing theme for SdrPageTomaž Vajngerl
This refactors the code in the Theme class to remove code that is responsible for changing the color for the SdrPage and adds an implementation of IThemeColorChanger - svx::ThemeColorChanger, that is performing the same task from now on. The svx::ThemeColorChanger is also partially used in Writer by sw::ThemeColorChanger, when it needs to change the colors in the common (Sdr) objects. Change-Id: I39cfa278d31bdd802a5bf36eeaf6d472c8013dba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146173 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-14ThemeDialog added which allows to change the theme used by the doc.Tomaž Vajngerl
ThemeDialog is a common dialog that can be used to select the theme used by the document. Currently it only implements colors but in the future also the fonts and formats (for shapes) will be adde. The IThemeColorChanger interface is used by the dialog to change the actual color values inside the document. For the writer the existing ThemeColorChanger is now implementing the interface. The dialog is accessible in Writer at Format -> Theme... in the main menu. Change-Id: I23c7dc9668cdc5427f36d604a76c433d6dbef497 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145264 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>