diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-01-05 17:49:45 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-01-05 17:49:45 +0000 |
commit | 305c3ee0d0b4c49de8e8829a99da9a17063363a9 (patch) | |
tree | 31475d884750470a1d91b565b1e2ce5631508af1 /svx/source/svdraw | |
parent | 6195d275cb60575aa320bab64e10a52994b40e7b (diff) |
CWS-TOOLING: integrate CWS overline3
2008-12-11 15:24:46 +0100 fredrikh r265314 : i97099
2008-12-11 15:20:37 +0100 fredrikh r265313 : i97099
2008-12-11 15:18:00 +0100 fredrikh r265312 : i97099
2008-12-11 15:17:00 +0100 fredrikh r265311 : i97099
2008-12-11 15:13:20 +0100 fredrikh r265309 : i97144
2008-12-11 15:06:24 +0100 fredrikh r265306 : i97099
2008-11-24 10:41:42 +0100 fme r264213 : #i5991# Overline support
2008-11-24 10:39:53 +0100 fme r264212 : #i5991# Overline support
2008-11-24 10:02:13 +0100 fme r264209 : #5991# Overline support
2008-11-24 10:01:26 +0100 fme r264208 : #5991# Overline support
2008-11-24 09:59:11 +0100 fme r264207 : #5991# Overline support
2008-11-24 09:57:11 +0100 fme r264206 : #5991# Overline support
2008-11-14 10:36:44 +0100 fme r263667 : CWS-TOOLING: rebase CWS overline3 to trunk@263288 (milestone: DEV300:m35)
2008-11-13 16:12:13 +0100 fme r263649 : #i5991# migrate CWS overline3 to SVN.
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r-- | svx/source/svdraw/svdattr.cxx | 3 | ||||
-rw-r--r-- | svx/source/svdraw/svdfmtf.cxx | 3 | ||||
-rw-r--r-- | svx/source/svdraw/svdotextdecomposition.cxx | 67 | ||||
-rw-r--r-- | svx/source/svdraw/svdstr.src | 7 |
4 files changed, 50 insertions, 30 deletions
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index a19c7be86f7e..97a2802573d8 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: svdattr.cxx,v $ - * $Revision: 1.35 $ + * $Revision: 1.34.212.2 $ * * This file is part of OpenOffice.org. * @@ -609,6 +609,7 @@ void SdrItemPool::TakeItemName(sal_uInt16 nWhich, String& rItemName) case EE_CHAR_FONTWIDTH : nResId = SIP_EE_CHAR_FONTWIDTH;break; case EE_CHAR_WEIGHT : nResId = SIP_EE_CHAR_WEIGHT;break; case EE_CHAR_UNDERLINE : nResId = SIP_EE_CHAR_UNDERLINE;break; + case EE_CHAR_OVERLINE : nResId = SIP_EE_CHAR_OVERLINE;break; case EE_CHAR_STRIKEOUT : nResId = SIP_EE_CHAR_STRIKEOUT;break; case EE_CHAR_ITALIC : nResId = SIP_EE_CHAR_ITALIC;break; case EE_CHAR_OUTLINE : nResId = SIP_EE_CHAR_OUTLINE;break; diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index bb65d5f0b619..49e3fc87ae68 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: svdfmtf.cxx,v $ - * $Revision: 1.21 $ + * $Revision: 1.20.84.2 $ * * This file is part of OpenOffice.org. * @@ -319,6 +319,7 @@ void ImpSdrGDIMetaFileImport::SetAttributes(SdrObject* pObj, FASTBOOL bForceText pTextAttr->Put( SvxFontHeightItem( nHeight, 100, EE_CHAR_FONTHEIGHT_CTL ) ); pTextAttr->Put(SvxCharScaleWidthItem(100, EE_CHAR_FONTWIDTH)); pTextAttr->Put(SvxUnderlineItem(aFnt.GetUnderline(), EE_CHAR_UNDERLINE)); + pTextAttr->Put(SvxOverlineItem(aFnt.GetOverline(), EE_CHAR_OVERLINE)); pTextAttr->Put(SvxCrossedOutItem(aFnt.GetStrikeout(), EE_CHAR_STRIKEOUT)); pTextAttr->Put(SvxShadowedItem(aFnt.IsShadow(), EE_CHAR_SHADOW)); pTextAttr->Put(SvxAutoKernItem(aFnt.IsKerning(), EE_CHAR_KERNING)); diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index b2d49c29befd..4f07779147df 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -79,6 +79,32 @@ namespace return aRetval; } + static drawinglayer::primitive2d::FontUnderline mapTextLineStyle(FontUnderline eLineStyle) + { + switch(eLineStyle) + { + case UNDERLINE_SINGLE: return drawinglayer::primitive2d::FONT_UNDERLINE_SINGLE; + case UNDERLINE_DOUBLE: return drawinglayer::primitive2d::FONT_UNDERLINE_DOUBLE; + case UNDERLINE_DOTTED: return drawinglayer::primitive2d::FONT_UNDERLINE_DOTTED; + case UNDERLINE_DASH: return drawinglayer::primitive2d::FONT_UNDERLINE_DASH; + case UNDERLINE_LONGDASH: return drawinglayer::primitive2d::FONT_UNDERLINE_LONGDASH; + case UNDERLINE_DASHDOT: return drawinglayer::primitive2d::FONT_UNDERLINE_DASHDOT; + case UNDERLINE_DASHDOTDOT: return drawinglayer::primitive2d::FONT_UNDERLINE_DASHDOTDOT; + case UNDERLINE_SMALLWAVE: return drawinglayer::primitive2d::FONT_UNDERLINE_SMALLWAVE; + case UNDERLINE_WAVE: return drawinglayer::primitive2d::FONT_UNDERLINE_WAVE; + case UNDERLINE_DOUBLEWAVE: return drawinglayer::primitive2d::FONT_UNDERLINE_DOUBLEWAVE; + case UNDERLINE_BOLD: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLD; + case UNDERLINE_BOLDDOTTED: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDOTTED; + case UNDERLINE_BOLDDASH: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDASH; + case UNDERLINE_BOLDLONGDASH: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDLONGDASH; + case UNDERLINE_BOLDDASHDOT: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDASHDOT; + case UNDERLINE_BOLDDASHDOTDOT: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDASHDOTDOT; + case UNDERLINE_BOLDWAVE: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDWAVE; + // FontUnderline_FORCE_EQUAL_SIZE, UNDERLINE_DONTKNOW, UNDERLINE_NONE + default: return drawinglayer::primitive2d::FONT_UNDERLINE_NONE; + } + } + class impTextBreakupHandler { private: @@ -247,30 +273,11 @@ namespace } } - // prepare underline data - drawinglayer::primitive2d::FontUnderline eFontUnderline(drawinglayer::primitive2d::FONT_UNDERLINE_NONE); + // prepare overline data + drawinglayer::primitive2d::FontUnderline eFontOverline(mapTextLineStyle(rInfo.mrFont.GetOverline())); - switch(rInfo.mrFont.GetUnderline()) - { - case UNDERLINE_SINGLE : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_SINGLE; break; - case UNDERLINE_DOUBLE : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_DOUBLE; break; - case UNDERLINE_DOTTED : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_DOTTED; break; - case UNDERLINE_DASH : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_DASH; break; - case UNDERLINE_LONGDASH : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_LONGDASH; break; - case UNDERLINE_DASHDOT : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_DASHDOT; break; - case UNDERLINE_DASHDOTDOT : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_DASHDOTDOT; break; - case UNDERLINE_SMALLWAVE : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_SMALLWAVE; break; - case UNDERLINE_WAVE : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_WAVE; break; - case UNDERLINE_DOUBLEWAVE : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_DOUBLEWAVE; break; - case UNDERLINE_BOLD : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_BOLD; break; - case UNDERLINE_BOLDDOTTED : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDOTTED; break; - case UNDERLINE_BOLDDASH : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDASH; break; - case UNDERLINE_BOLDLONGDASH : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_BOLDLONGDASH; break; - case UNDERLINE_BOLDDASHDOT : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDASHDOT; break; - case UNDERLINE_BOLDDASHDOTDOT : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDASHDOTDOT; break; - case UNDERLINE_BOLDWAVE : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_BOLDWAVE; break; - default : break; // FontUnderline_FORCE_EQUAL_SIZE, UNDERLINE_DONTKNOW, UNDERLINE_NONE - } + // prepare underline data + drawinglayer::primitive2d::FontUnderline eFontUnderline(mapTextLineStyle(rInfo.mrFont.GetUnderline())); const bool bUnderlineAbove(drawinglayer::primitive2d::FONT_UNDERLINE_NONE != eFontUnderline && impIsUnderlineAbove(rInfo.mrFont)); @@ -323,9 +330,13 @@ namespace const Color aFontColor(rInfo.mrFont.GetColor()); const basegfx::BColor aBFontColor(aFontColor.getBColor()); - // get line color. If it's on automatic (0xffffffff) use FontColor instead - const Color aLineColor(rInfo.maTextLineColor); - const basegfx::BColor aBLineColor((0xffffffff == aLineColor.GetColor()) ? aBFontColor : aLineColor.getBColor()); + // get overline color. If it's on automatic (0xffffffff) use FontColor instead + const Color aOverlineColor(rInfo.maOverlineColor); + const basegfx::BColor aBOverlineColor((0xffffffff == aOverlineColor.GetColor()) ? aBFontColor : aOverlineColor.getBColor()); + + // get underline color. If it's on automatic (0xffffffff) use FontColor instead + const Color aUnderlineColor(rInfo.maTextLineColor); + const basegfx::BColor aBUnderlineColor((0xffffffff == aUnderlineColor.GetColor()) ? aBFontColor : aUnderlineColor.getBColor()); drawinglayer::primitive2d::BasePrimitive2D* pNewPrimitive = new drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D( @@ -340,7 +351,9 @@ namespace aBFontColor, // attributes for TextDecoratedPortionPrimitive2D - aBLineColor, + aBOverlineColor, + aBUnderlineColor, + eFontOverline, eFontUnderline, bUnderlineAbove, eFontStrikeout, diff --git a/svx/source/svdraw/svdstr.src b/svx/source/svdraw/svdstr.src index 2f592a639bcd..32c457cf3d02 100644 --- a/svx/source/svdraw/svdstr.src +++ b/svx/source/svdraw/svdstr.src @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: svdstr.src,v $ - * $Revision: 1.95 $ + * $Revision: 1.95.212.1 $ * * This file is part of OpenOffice.org. * @@ -2619,6 +2619,11 @@ String SIP_EE_CHAR_UNDERLINE Text [ en-US ] = "Underline"; }; +String SIP_EE_CHAR_OVERLINE +{ + Text [ en-US ] = "Overline"; +}; + String SIP_EE_CHAR_STRIKEOUT { Text [ en-US ] = "Strikethrough"; |