summaryrefslogtreecommitdiff
path: root/svx/source/styles
AgeCommit message (Collapse)Author
2024-05-11loplugin:ostr in svxNoel Grandin
Change-Id: Ia765a03e033acb82e367873380d289587ea87d6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167449 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-02-18ITEM: Rename for more control over SlotID usagesArmin Le Grand (allotropia)
Change-Id: I51585f1c15984a066262023184f668662853d20f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163556 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
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-24tdf#157067: Fix missing background color in style previewKhaled Hosny
Set the colors after setting the font not before as otherwise they seem to get overridden. Change-Id: I258cb762fd2328369bd8adae63e94ec87c666bb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157208 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-04-25svx: rework the theme dialog to allow editing theme colorsTomaž Vajngerl
In addition to editing of theme colors, this also changes the way how theme colors are represented in the theme dialog and the behaviour when changing applying a theme color change. Previously a theme colors were applied with double-click, now a double-click still applies, but automatically exits the dialog. The selected theme is applied also when OK button is pressed. Change-Id: Ic0f8399ede180d6ab0001a7f8b5dda0e7c49fa3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150975 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-03-16tdf#153704: Make sure the last script segment is also addedKhaled Hosny
Change-Id: Id6381d77cdf05c24a1b557206f530f4e004e8e52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148986 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2023-03-01create a default theme when SdrPage and SdrModel are createdTomaž Vajngerl
For a document it is expected that it always has a theme available so we need to create a theme with some default attributes set (a default color scheme for now) when we create a SdrModel and SdrPage (only for Writer currently). This also changes some ColorSets, SdrPage, SdrModel methods, to use better return types (cost& instead of raw pointers and vice versa depending on the use case). Change-Id: I874247784b845109e42567e3f45647dda46ccf3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146816 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-27move Theme class to own file inside docmodelTomaž Vajngerl
Also move Theme from svx to model namespace so it is consistent with other classes in docmodel. Theme header also includes ThemeSupplementalFont, ThemeFont, FontScheme classes that are used by the Theme and were also moved to docmodel. These may be moved to its own file in the future when they are used in more places. Change-Id: Ic409bea8e5298adc2b039b529c4f7b01cf64f03e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146221 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-15Typo in "code"Andrea Gelmini
Not sure about this... Change-Id: I8aebfdf48dc7dc2bdbce180fa2f1bd3305489a24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145516 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-14svx: add UX defined theme color setsTomaž Vajngerl
Change-Id: I82cbe16fcfaa8367dacda7ff977e18b0ed39ec2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145086 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-14svx: add resolveColor that resolves the color for input themeTomaž Vajngerl
resolveColor added to ColorSet resolves the color for the input ThemeColor, which contains the index for the color in the ColorSet and applies all the additional tranformations defined in the ThemeColor. Change-Id: I5c6d53d5e1d2c61bdb22b0e58c034ec91fbeb2d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145085 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-14svx: change ColorSet add method to use ThemeColorTyp enumTomaž Vajngerl
Change-Id: I2034a7e915d41c6b55c8344d44be4f6a60e8287e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145072 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-13introduce {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>
2023-01-12introduce 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>
2023-01-05sw: 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>
2022-12-30tdf#152737: Fix off-by-one errorsKhaled Hosny
Regressions from: commit 718af940435ae9d2ac90374e5880ecb38e96252c Author: Khaled Hosny <khaled@aliftype.com> Date: Fri Dec 16 00:10:34 2022 +0200 tdf#152533: Improve script handling in font preview and: commit bfecacb2487ba9470600e6f64056d9b1816ee96b Author: Khaled Hosny <khaled@aliftype.com> Date: Thu Dec 15 22:51:54 2022 +0200 tdf#152460: Improve script handling in style previews Change-Id: I7b12f5accbd65459d724676efb7bec947a7faaa0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144880 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-12-26svx: 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>
2022-12-26svx: 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>
2022-12-16tdf#152460: Improve script handling in style previewsKhaled Hosny
Use Edit Engine to get the script types instead of trying to duplicate (poorly) its behaviour. This has the advantage of handling weak characters and digits properly and is closer to what would happen in the document itself. We probably should go further and render the preview entirely using Edit Engine (since the current code fails short of proper bidi handling), but this is a bigger change. Change-Id: I79b28067d80f66087e1d5e9399ba1a513de96c8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144283 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-11-12cid#1516789 Division or modulo by float zeroCaolán McNamara
Change-Id: I191d475df5d1937e80fe6844de618a9ce315aee8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142585 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-01tdf#151114: Improve styles preview alignmentKhaled Hosny
Change-Id: Iefe265584d710bd6cfc9e7ed0a656dd83d91c84c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140811 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-24tdf#151114: Fix swapped width and heightKhaled Hosny
Regression from: commit 0483fbd1d05d74c394d9274bdee77b3b2aebb495 Author: Khaled Hosny <khaled@aliftype.com> Date: Sun Aug 21 01:49:57 2022 +0200 tdf#87535: Preview styles using CTL/CJK fonts in the sidebar Change-Id: I9108e2efa75eafe56c3ccc8ec2fff81b8cf7dc4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140551 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-08-24cid#1510131 Uninitialized scalar fieldCaolán McNamara
Change-Id: Iff08a3dbbfc7ac14606061c66c81519e780d846c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138761 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-22tdf#87535: Preview styles using CTL/CJK fonts in the sidebarKhaled Hosny
Code is similar to code in svx/source/dialog/fntctrl.cxx and source/ui/chrdlg/drpcps.cxx, etc. Instead of using only the “western” font, it splits the text based on script type and uses the appropriate font for each script type. Change-Id: Iacdf92829d4568f2d580b39ca14ffe1218ceaa9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138600 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-07-21clang-tidy modernize-pass-by-value in svxNoel Grandin
Change-Id: Iedd87d321f4d161574df87629fdd6c7714ff31c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137248 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-20sd theme: consider accent1 color when inserting shape with solid fillMiklos Vajna
Once a theme is defined for the master page of the current slide, PowerPoint inserts a shapes with their fill color & line color set based on that theme (so this color is master-page-specific), while Impress sets the fill & line color based on the default shape style. The Impress behavior has the benefit of doing the usual style-based formatting, but now a document-level style overwrites a (master-)slide-specific theme, which is inconsistent. Fix the problem by extending sd::FuConstruct::SetStyleSheet(): if we construct a shape with fill, then not only apply the style sheet, but also set the fill & line color based on the theme (if there is any). Note that this works both in case the shape is instantly created on click (LOK case) or when the user first draws a top-left -> bottom-right point pair to define the position / size of the shape. At the same time line colors don't support themes yet, so that color is just a plain value for now. Change-Id: Ic6ae8f91bd719bd80f2b56f12b001d29b0961e6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136138 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-06-05no need to allocate this separatelyNoel Grandin
Change-Id: I30df477cd708d021fc5b6fcfa9925e1c99be6650 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135429 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-04tdf#149304 Stylist does not show upper/lower case font effectsNoel Grandin
SvxFont has code to handle these extra features, we just need to call that Change-Id: I45691efeeead3ea60ab838eeb081fa5f19a76b90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135428 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-03Just use Any ctor instead of makeAny in svxStephan Bergmann
Change-Id: I59b1b3f817a9028f132456ea5094f38f88674d00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133768 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-22sd theme: add rendering for shape fill color effectsMiklos Vajna
Only the no-effects variant was working previously. Change-Id: I50811a4c49d19dc801f0d1c841cbbdb2fae1ad60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133297 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-03-11loplugin:constparamsNoel Grandin
Change-Id: I5f184f93dbdb414514855c85c9dc1624e7ec8636 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131337 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-03Recheck modules sv* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I25779cbfb1aa93c31d6e12ac95e136b3bdbbc058 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130403 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-03-03sd theme: add rendering for shape fill colorMiklos Vajna
I.e. update the shape fill color when the theme of the master page changes if the color is a theme color. Change-Id: Ia1ed566230a8547334aa4a7d69627882aa690546 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130894 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-01-10sd theme: fix applying new colors after theme change for group shapesMiklos Vajna
UpdateSdrObject() is called for both group and non-group shapes, so don't assume that they always have text, otherwise we would crash. Change-Id: I3672673176f0cb462a8b8d61a68466f541e9ce06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128248 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-12-17sd theme: add a "theme" palette to the color pickerMiklos Vajna
This implements listing the current theme colors (which depend on what is the master page of the current slide) in the color picker and also allows picking those colors. The colors are picked as-is for now, not yet setting the color theme index in the document model. Change-Id: I2553725c29c2a9f9de80f86b38d22a06bf9c0364 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126994 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-12-03svx: consider color effects when updating objects for theme changesMiklos Vajna
This builds on top of commit 48f0c5f73f99c919ec24deadc96c3cf5483c9314 (svx: update objects of pages of a master page when the theme changes, 2021-11-30), but now not only plain colors with colors with effects are also considered. The luminance modulation / offset is what PowerPoint uses the generate lighter / darker variants, tinting / shading is what Word uses. Change-Id: Ibfafb9be9986645117015bf3b05491daec8914be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126270 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-11-30svx: update objects of pages of a master page when the theme changesMiklos Vajna
Only text color as a start, and without effects. Change-Id: I52b1c110870605134c414bcc94b50871cd49975b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126082 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-11-22PPTX: implement native handling of <a:clrScheme> childrenMiklos Vajna
This was already handled by converting them to raw colors at import time. This commit imports the color scheme contents (the 12 colors) into the doc model. This is a dependency to export them back to PPTX and to be able to update these colors on the UI by picking a different theme. Change-Id: I177de4f15d5f0e628669998d1cda7db24220b2eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125651 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-11-19PPTX import: handle <a:clrScheme name="...">Miklos Vajna
We had doc model for this, but the UNO API and the PPTX import was missing. Change-Id: I199e9cc235a783d91700ce74f17d442f41d3c3f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125532 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-11-18introduce XColorSetsManager interfaceSarper Akdemir
[ Miklos: rather go with a beans::PropertyValues-based interface to allow extending this incrementally, without an API change. This allows getting / setting a per-document theme via the UNO API, but the concept from the original commit is unchanged. ] (cherry picked from commit 3f1bca8b4f451fa30bf341116390738c456d651f, from the feature/themesupport2 branch) Change-Id: I24be34a5a7b68549b21a6cd55144901d4fe2c5f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125436 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-11-17make colorsets work outside of styles and with direct formattingSarper Akdemir
[ Miklos: picked only the document model bits, now in SdrModel, next to styles. ] (cherry picked from commit 1647d34d8573f4940c0cbb7fb6cd9c6b4e5a4a15, from the feature/themesupport2 branch) Change-Id: I80f9e0b205b8b4a6914f851bdc63e3e0ca6706e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125313 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-09-28vcl: rename OutDevState to StackChris Sherlock
I have moved the header file to include/vcl/rendercontext as this will eventually be part of the RenderContext split from OutputDevice. State and associated enums have also been moved to the vcl namespace. I have also moved ComplexTextLayoutFlags into the vcl::text namespace. Change-Id: I0abbf560e75b45a272854b267e948c240cd69091 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121524 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-09-03clang-tidy:readability-redundant-member-initNoel Grandin
Change-Id: I47cc5416e853260d92b8b2c57b1c223d1f21df0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121544 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-02no need to allocate return val on heap for GetItemSetForPreviewNoel Grandin
Change-Id: I261182ec2348df045171c5e1beb33579e2c0c766 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118284 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-30swap text and background colors in colorsetsTomaž Vajngerl
Change-Id: I1e1da85d6c58e3ed5ab4c44c2ab0ae7c3b080251 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118149 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-19SetPhysFont always dereferences its OutputDevice* argCaolán McNamara
which is also the case for ChgPhysFont and GetTextSize Change-Id: I7e6a1a7eaa77646c53506a73d8946f8df7593e72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115768 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>