starmath/inc/starmath.hrc | 7 +++++++ starmath/source/ElementsDockingWindow.cxx | 23 ++++++++++++++++++----- starmath/source/commands.src | 7 +++++++ 3 files changed, 32 insertions(+), 5 deletions(-)
New commits: commit c66062aacb521037eb5af9c32c94c33df9cd69a7 Author: Marcos Paulo de Souza <marcos.souza....@gmail.com> Date: Wed Aug 14 10:18:44 2013 -0300 Math: New feature about color selection Now we can choose colors to equations in Elements Dock, in the Attributes section. All colors there can be choosed by clicking in the name of color. Change-Id: I5545b292955072f9f45f31262a511cee3d70c953 Reviewed-on: https://gerrit.libreoffice.org/5414 Reviewed-by: Thorsten Behrens <tbehr...@suse.com> Tested-by: Thorsten Behrens <tbehr...@suse.com> diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc index 0459731..7730067 100644 --- a/starmath/inc/starmath.hrc +++ b/starmath/inc/starmath.hrc @@ -327,6 +327,13 @@ #define RID_WIDEHATX (RID_APP_START + 1722) #define RID_WIDETILDEX (RID_APP_START + 1723) #define RID_WIDEVECX (RID_APP_START + 1724) +#define RID_COLORX_BLACK (RID_APP_START + 1725) +#define RID_COLORX_BLUE (RID_APP_START + 1726) +#define RID_COLORX_GREEN (RID_APP_START + 1727) +#define RID_COLORX_RED (RID_APP_START + 1728) +#define RID_COLORX_CYAN (RID_APP_START + 1729) +#define RID_COLORX_MAGENTA (RID_APP_START + 1730) +#define RID_COLORX_YELLOW (RID_APP_START + 1731) #define RID_LRPARENTX (RID_APP_START + 1801) #define RID_LRBRACKETX (RID_APP_START + 1802) diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx index 893c2a0..111a818 100644 --- a/starmath/source/ElementsDockingWindow.cxx +++ b/starmath/source/ElementsDockingWindow.cxx @@ -48,8 +48,6 @@ SmElementSeparator::SmElementSeparator() : SmElement(SmNodePointer(), OUString()) {} -////////////////////////////////// - const sal_uInt16 SmElementsControl::aUnaryBinaryOperatorsList[] = { RID_PLUSX, RID_MINUSX, RID_PLUSMINUSX, RID_MINUSPLUSX, @@ -130,7 +128,10 @@ const sal_uInt16 SmElementsControl::aAttributes[] = RID_WIDEVECX, RID_WIDETILDEX, RID_WIDEHATX, RID_OVERLINEX, RID_UNDERLINEX, RID_OVERSTRIKEX, 0xFFFF, - RID_PHANTOMX, RID_BOLDX, RID_ITALX, RID_SIZEXY, RID_FONTXY + RID_PHANTOMX, RID_BOLDX, RID_ITALX, RID_SIZEXY, RID_FONTXY, + 0xFFFF, + RID_COLORX_BLACK, RID_COLORX_BLUE, RID_COLORX_GREEN, + RID_COLORX_RED, RID_COLORX_CYAN, RID_COLORX_MAGENTA, RID_COLORX_YELLOW }; const sal_uInt16 SmElementsControl::aBrackets[] = @@ -401,6 +402,20 @@ void SmElementsControl::addElements(const sal_uInt16 aElementsArray[], sal_uInt1 addElement(OUString("\"size\""), SmResId(aElementId)); else if (aElementId == RID_FONTXY) addElement(OUString("\"font\""), SmResId(aElementId)); + else if (aElementId == RID_COLORX_BLACK) + addElement(OUString("color black { \"black\" }"), SmResId(aElementId)); + else if (aElementId == RID_COLORX_BLUE) + addElement(OUString("color blue { \"blue\" }"), SmResId(aElementId)); + else if (aElementId == RID_COLORX_GREEN) + addElement(OUString("color green { \"green\" }"), SmResId(aElementId)); + else if (aElementId == RID_COLORX_RED) + addElement(OUString("color red { \"red\" }"), SmResId(aElementId)); + else if (aElementId == RID_COLORX_CYAN) + addElement(OUString("color cyan { \"cyan\" }"), SmResId(aElementId)); + else if (aElementId == RID_COLORX_MAGENTA) + addElement(OUString("color magenta { \"magenta\" }"), SmResId(aElementId)); + else if (aElementId == RID_COLORX_YELLOW) + addElement(OUString("color yellow { \"yellow\" }"), SmResId(aElementId)); else addElement(SmResId(aElementId), SmResId(aElementId)); } @@ -458,8 +473,6 @@ void SmElementsControl::build() Invalidate(); } -//******************* - const sal_uInt16 SmElementsDockingWindow::aCategories[] = { RID_CATEGORY_UNARY_BINARY_OPERATORS, RID_CATEGORY_RELATIONS, diff --git a/starmath/source/commands.src b/starmath/source/commands.src index e30e3e0..a39d151 100644 --- a/starmath/source/commands.src +++ b/starmath/source/commands.src @@ -173,6 +173,13 @@ String RID_ITALX { Text = "ital <?> " ; }; String RID_SIZEXY { Text = "size <?> {<?>} " ; }; String RID_FONTXY { Text = "font <?> {<?>} " ; }; String RID_COLORX { Text = "color <?> {<?>} " ; }; +String RID_COLORX_BLACK { Text = "color black {<?>} " ; }; +String RID_COLORX_BLUE { Text = "color blue {<?>} " ; }; +String RID_COLORX_GREEN { Text = "color green {<?>} " ; }; +String RID_COLORX_RED { Text = "color red {<?>} " ; }; +String RID_COLORX_CYAN { Text = "color cyan {<?>} " ; }; +String RID_COLORX_MAGENTA { Text = "color magenta {<?>} " ; }; +String RID_COLORX_YELLOW { Text = "color yellow {<?>} " ; }; String RID_LRGROUPX { Text = "{<?>} " ; }; String RID_LRPARENTX { Text = "(<?>) " ; }; String RID_LRBRACKETX { Text = "[<?>] " ; }; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits