Apache OpenOffice (AOO) Bugzilla – Issue 121733
make colored smart tags possible
Last modified: 2017-05-20 09:32:02 UTC
Created attachment 80226 [details] patch file Modify SwWrongArea so that it holds the color and line-style that are used in order to paint the corresponding marking line. Add functionality to SwWrongArea that evaluates the XStringKeyMap parameter of its constructor. The SmartTagRecognizer can explicitly specify the color of the markings by adding entries "Red", "Green", "Blue" to the string key map where the content of these keys is a hexadecimal string representation of the color component values. The default color of all other wrong list types has not been changed. If one adds a smart tag without specification of the color, it would get the default smart tag color. Furthermore, the SmartTagRecognizer can specify the line type of the smart tag by addition of an entry "LineStyle" that can have the values "WAVE", "WAVE_NORMAL", "WAVE_SMALL", "WAVE_FLAT". The default line style is dashed. Modify the drawing function lcl_DrawWrongListData so that it uses the color and style information contained in the SwWrongArea elements rather than determining the color and style of each marking within this function each time it is called. I send a more detailed explanation of this patch proposal to dev@openoffice.apache.org.
I'm adding this comment to all open issues with Issue Type == PATCH. We have 220 such issues, many of them quite old. I apologize for that. We need your help in prioritizing which patches should be integrated into our next release, Apache OpenOffice 4.0. If you have submitted a patch and think it is applicable for AOO 4.0, please respond with a comment to let us know. On the other hand, if the patch is no longer relevant, please let us know that as well. If you have any general questions or want to discuss this further, please send a note to our dev mailing list: dev@openoffice.apache.org Thanks! -Rob
(In reply to comment #0) > Created attachment 80226 [details] > patch file > > Modify SwWrongArea so that it holds the color and line-style that are used > in order to paint the corresponding marking line. > Add functionality to SwWrongArea that evaluates the XStringKeyMap parameter > of its constructor. > The SmartTagRecognizer can explicitly specify the color of the markings by > adding entries "Red", "Green", "Blue" to the > string key map where the content of these keys is a hexadecimal string > representation of the color component values. > The default color of all other wrong list types has not been changed. If one > adds a smart tag without specification of the color, > it would get the default smart tag color. This would be more compliant with the rest of the API if the XStringKeyMap has a key "LineColor" and the value is css::util::Color > Furthermore, the SmartTagRecognizer can specify the line type of the smart > tag by addition of an entry "LineStyle" that can > have the values "WAVE", "WAVE_NORMAL", "WAVE_SMALL", "WAVE_FLAT". The > default line style is dashed. Here too, instead of strings, use css::awt::FontUnderline > Modify the drawing function lcl_DrawWrongListData so that it uses the color > and style information contained in the SwWrongArea > elements rather than determining the color and style of each marking within > this function each time it is called. I'm not convinced about given so much control to the extension developer. At least, the application code sure ensure that the extension settings do not overlap with other settings, so that the smart tag can uniquely be identified as such by the user.
Created attachment 80440 [details] patch file I consider this patch request as relevant for the AOO 4.0 release. Currently, we have a discussion about this patch request at dev@openoffice.apache.org. The title of the thread is "[Call-for-Review] code changes for more powerful smarttag extensions". Jürgen tried to apply the separate patches to the AOO trunk sources and reported that some of the patch-files were broken. Therefore, I have regenerated the patch files and submitted them again. I also integrated the suggestions of Ariel. Now, the code uses css::util::Color and css::awt::FontUnderline instead of strings.
"jsc" committed SVN revision 1458879 into trunk: #121733# enhancement for colored smarttags
patch reviewed and applied on trunk