summaryrefslogtreecommitdiff
path: root/starmath/qa
diff options
context:
space:
mode:
authordante <dante19031999@gmail.com>2020-11-08 14:32:57 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-11 06:51:22 +0100
commitf3b52717e85621d3b4ee1c6d69700e2a0cca8efc (patch)
treeaa4df032b1ab661ad19b3ebc2e8e2c59babb4b07 /starmath/qa
parent3d90997fb6f232d8008df4d166d7b97b869c200f (diff)
Improved starmath color
Color.hxx has now documentation ( even if it is quite obvious if you know RGB standar ). Color.hxx has been reordered in more coherent order, but kept format. Some changes on Color.hxx dynamics. Color.hxx starmath colors list Now colors are managed by starmathdatabse. The path is open for simple addition of colors, there are no more infinite switches with color tokens here and there. To add a color, just put it in Color.hxx and register it in starmathdatabse.cxx. Do not forget to change array size in starmathdatabase.hxx. Now mathml supports RGB colors in #RRGGBB format ( import and export ). New colors have been added. Only the HTML Css1 are available via UI. New colors will be added. I intend to finish Css2 and dvipsnames ( latex colors ) on posterior patches. RGBA command has been unlocked for compatibility reasons. However will be displayed as RGB. Added color #RRGGBB. Improved qa color test on mathml to test RGB on mathml. TODO for someone on the UI team: - Add a color picker. - If it is a color with name: - It will add in the code "color " + starmathdatabase::Identify_Color_DVIPSNAMES( colorvalue ).pIdent +" " - If not: - It will add in the code "color " + starmathdatabase::Identify_Color_DVIPSNAMES( colorvalue ).pIdent +" "+ colorvalue.getRed() +" "+ colorvalue.getGreen() +" "+ colorvalue.getBlue() +" " - Note that those will habe eType with value TRGB or TRGBA. Change-Id: I47af37bd191b3099e8e6e08e7a5fb1a8a227bbf2 Change-Id: If971473ddcc34739439818dba9a62ca3494a4473 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath/qa')
-rw-r--r--starmath/qa/extras/data/tdf103430.mml4
-rw-r--r--starmath/qa/extras/mmlimport-test.cxx2
2 files changed, 4 insertions, 2 deletions
diff --git a/starmath/qa/extras/data/tdf103430.mml b/starmath/qa/extras/data/tdf103430.mml
index 92fba05dc295..f8ea8f8d2d0c 100644
--- a/starmath/qa/extras/data/tdf103430.mml
+++ b/starmath/qa/extras/data/tdf103430.mml
@@ -8,7 +8,9 @@
<mi mathvariant="normal" mathcolor="blue">y</mi>
</mrow>
<mrow>
- <mo fontstyle="italic" fontweight="bold" mathvariant="normal" form="prefix" rspace="0">d</mo>
+ <mstyle mathcolor="#ffb781">
+ <mo fontstyle="italic" fontweight="bold" mathvariant="normal" form="prefix" rspace="0">d</mo>
+ </mstyle>
<mi fontfamily="serif" mathvariant="sans-serif-bold-italic" mathcolor="red">x</mi>
</mrow>
</mfrac>
diff --git a/starmath/qa/extras/mmlimport-test.cxx b/starmath/qa/extras/mmlimport-test.cxx
index 4b204787a3cb..80b608757618 100644
--- a/starmath/qa/extras/mmlimport-test.cxx
+++ b/starmath/qa/extras/mmlimport-test.cxx
@@ -148,7 +148,7 @@ void Test::testtdf99556()
void Test::testTdf103430()
{
loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/tdf103430.mml"));
- CPPUNIT_ASSERT_EQUAL(OUString("frac { { nitalic d ^ 2 nitalic color blue y } } { { nitalic d font sans bold italic color red x } }"),
+ CPPUNIT_ASSERT_EQUAL(OUString("frac { { nitalic d ^ 2 nitalic color blue y } } { { color apricot nitalic d font sans bold italic color red x } }"),
mxDocShell->GetText());
}