Apache OpenOffice (AOO) Bugzilla – Issue 99842
wrong colour displayed for underlining text
Last modified: 2009-07-28 09:32:09 UTC
[Steps] 1. Create a(n) Writer/Impress doc. 2. "Insert" -> "Drawing Object" -> "Chart...", to insert a chart. 3. "Insert" -> "Title", and type any word in any of the six text-box in "Title" dialog, e.g., type "TEST" in Subtitle, press OK button. 4. "Format" -> "Title" -> "Subtitle...", select "Font Effects" bar in "Title" dialog, set "Double" to Underlining and "light Red" to Underline color, press OK button. 5. Click on the blank space on the doc page to quit the edit mode of chart. [Result] The color of the underlining of subtitle is black. Only in chart edit-mode, the color of underlining of title displays correctly.
I checked with "Ooo Dev 3.1.0 multilingual version English UI WIN XP: [OOo310m2 (Build 9385)]" and can confirm the reported effect Works fine with "Ooo 3.0.1 (DE) Multilingual version GERMAN UI WIN XP: [OOO300m15 (Build 9379)]" There is a similar effect in Issue 56520, but I doubt that there is a connection between these issues.
@iha: pls have a look
@weiz, please have a look.
Created attachment 61674 [details] example document
@iha, maybe the "CharUnderlineColor" property of chart is overridden by the same property of text in the applications. And this is a global problem, please see the example document.
@weiz, thanks for analyzing the problem! @hdu, the font underline color is rendered correctly only in text edit mode. The drawinglayer and also the metafile renderer do use a wrong color for underlining of texts in OLE objects. Please look at the attached example document from weiz and follow the instructions there.
The rTextlineColor argument in the TextDecoratedPortionPrimitive2D constructor requests the black underline color: # p rTextlineColor $1 = (const BColor &) @0xbfffd2f0: { <B3DTuple> = { mfX = 1, mfY = 0, mfZ = 0 } in DEV300_m46: #0 drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D::TextDecoratedPortionPrimitive2D (this=0xfb5a964, rNewTransform=@0xbfffd358, rText=@0xbfffd644, aTextPosition=0, aTextLength=30, rDXArray=@0xbfffd33c, rFontAttributes=@0xbfffd318, rLocale=@0xbfffd324, rFontColor=@0xbfffd2d8, rOverlineColor=@0xbfffd2c0, rTextlineColor=@0xbfffd2f0, eFontOverline=FONT_UNDERLINE_NONE, eFontUnderline=FONT_UNDERLINE_DOUBLE, bUnderlineAbove=false, eFontStrikeout=FONT_STRIKEOUT_NONE, bWordLineMode=false, eFontEmphasisMark=FONT_EMPHASISMARK_NONE, bEmphasisMarkAbove=false, bEmphasisMarkBelow=false, eFontRelief=FONT_RELIEF_NONE, bShadow=false) at drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx:783 #1 (anonymous namespace)::impTextBreakupHandler::impCreateTextPortionPrimitive (this=0xbfffd8d8, rInfo=@0xbfffd3f0) at svx/source/svdraw/svdotextdecomposition.cxx:386 #2 (anonymous namespace)::impTextBreakupHandler::impHandleDrawPortionInfo (this=0xbfffd8d8, rInfo=@0xbfffd3f0) at svx/source/svdraw/svdotextdecomposition.cxx:529 #3 (anonymous namespace)::impTextBreakupHandler::decomposeBlockTextPrimitive (this=0xbfffd8d8, pInfo=0xbfffd3f0) at svx/source/svdraw/svdotextdecomposition.cxx:591 #4 Outliner::DrawingText (this=0x3d8a8a10, rStartPos=@0xbfffd610, rText=@0xbfffd644, nTextStart=0, nTextLen=30, pDXArray=0xfb54e90, rFont=@0xbfffd5cc, nPara=0, nIndex=0, nRightToLeft=0 '\0', pWrongSpellVector=0x0, pFieldData=0x0, bEndOfLine=1, bEndOfParagraph=1, bEndOfBullet=0, pLocale=0xbfffd5f4, rOverlineColor=@0xbfffd618, rTextLineColor=@0xbfffd640) at inc/tools/link.hxx:142 #5 ImpEditEngine::Paint (this=0x52b3000, pOutDev=0xbfffd6d8, aClipRec={nLeft = 0, nTop = 0, nRight = 2147483646, nBottom = 2147483646}, aStartPos={<Pair> = {nA = 0, nB = 0}, <No data fields>}, bStripOnly=1 '\001', nOrientation=0) at svx/source/editeng/impedit3.cxx:3303 #6 EditEngine::StripPortions (this=0x3d8b1ca0) at svx/source/editeng/editeng.cxx:1695 #7 Outliner::StripPortions (this=0x3d8a8a10) at svx/source/outliner/outliner.cxx:1768 #8 SdrTextObj::impDecomposeBlockTextPrimitive (this=0x3df337a0, rTarget=@0xbfffd9ec, rSdrBlockTextPrimitive=@0x6372d30, aViewInformation=@0xbfffde74) at /so/ws/DEV300/ooo/svx/source/svdraw/svdotextdecomposition.cxx:162 #9 drawinglayer::primitive2d::SdrBlockTextPrimitive2D::createLocalDecomposition (this=0x6372d30, aViewInformation=@0xbfffde74) at svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx:250 #10 0x1878e600 in drawinglayer::primitive2d::BasePrimitive2D::get2DDecomposition (this=0x6372d30, rViewInformation=@0xbfffde74) at drawinglayer/source/primitive2d/baseprimitive2d.cxx:80
ah, the tuple elements are doubles, so BColor={1,0,0} means RED...
.
Fixed in CWS vcl101.
@wg: please review in CWS vcl101
*** Issue 101504 has been marked as a duplicate of this issue. ***
aditionally, copy/paste of selected text replaces specified colors for over/underlining with text color.
Verified in CWS.
Target set for 3.1.1 showstopper.
prepare backporting to OOo3.11
reopen for backport
For target OOo3.11 the fix now is also in CWS ooo311gsl01
Created attachment 62191 [details] minimal bugdoc with underline and overline
@wg: please also verify in CWS ooo311gsl01
Tested in m52. I have written follow up i103692.