Kaydet (Commit) c66062aa authored tarafından Marcos Paulo de Souza's avatar Marcos Paulo de Souza Kaydeden (comit) Thorsten Behrens

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/5414Reviewed-by: 's avatarThorsten Behrens <tbehrens@suse.com>
Tested-by: 's avatarThorsten Behrens <tbehrens@suse.com>
üst d626fa2e
......@@ -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)
......
......@@ -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,
......
......@@ -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 = "[<?>] " ; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment