summaryrefslogtreecommitdiff
path: root/svx/source/theme
AgeCommit message (Collapse)Author
2024-03-11Document Colors do not show any color in the PaletteCaolán McNamara
same is true for "Theme Colors", a problem since: commit 4ccc2f0e3f45c9d78f74b1848851bedf71f7382d Date: Fri Mar 1 22:11:14 2024 +0200 cool#8327 use tools::JsonWriter for theme colors Change-Id: Ibaab5df197bd8005037e066181e8a50bdda5ceda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164658 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164669 Tested-by: Jenkins
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-01-21editeng: change EditEngine getter to ref in {Imp}EditViewTomaž Vajngerl
{Imp}EditView always needs to have EditEngine set (or it would crash otherwise), so we can change the getter to return a referece instead of a pointer. This simplifies things a bit because we get rid of all the nullptr checks and makes the interface more clear. Also change direct access to mpEditEngine in {Imp}EditView to use getEditEngine() and getImpEditEngine() (returning a reference) instead. Change-Id: Ib8f9c565b8364144bb9c35c3093c4975af1970c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162333 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
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-12-30tdf#146619 Recheck svx/ with IWYUGabor Kelemen
Change-Id: I99650b50587294c20b1e92270e541140d9ec9cae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161240 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
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-09-01sd: set the theme for all master pagesTomaž Vajngerl
It can be annoying for the user to set the theme one by one for each master page. The reason for this is that in MSO the master slide (which contains the theme) has multiple layouts, which are converted to master pages in LO. As LO doesn't group master pages together the theme is defined on each master page, so it is needed to change each master page one by one. Change-Id: I94d75246ca012bbbb005ab376446c0941b8f57ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156361 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-08-31cid#1542447 Explicit null dereferencedCaolán McNamara
Change-Id: I1de10a8a459175f79bb2b8f796cde287be1945c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156326 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-26Remove duplicated includeAndrea Gelmini
Change-Id: Ife90baef2ceff442f51c03805eda945b2b2baf34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156118 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
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-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-06-09fix wrong transform type, error handling when JSON parsingTomaž Vajngerl
also fix theme export - change scheme enum type name "hlink" to "hyperlink" and "folHlink" to "followedHyperlink" Change-Id: Id5435d59cd51352efc4a4a8e333ec1ff45847a6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152782 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.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-05-12use ComplexColor instead of ThemeColor for better OOXML compat.Tomaž Vajngerl
In OOXML a color definition includes more represenations, one of which is scheme color (which is what is implemented in ThemeColor currently), but it supports other representations too (RGB, HSL, System,..). ComplexColor includes all the representations, so to have a better compatibility with OOXML, this changes all uses of ThemeColor to ComplexColor. In many cases the usage of ComplexColor isn't the same as the usage of ThemeColors, but this cases will need to be changed in a later commit. Change-Id: I9cc8acee2ac0a1998fe9b98247bcf4a96273149a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151492 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-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>