summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2009-01-05 17:49:45 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2009-01-05 17:49:45 +0000
commit0c478a57c3e92805a5ba4d4a534117cf24f6bec6 (patch)
treee98d61db3671b47bb0aebed6a5885295666fa146
parent91b4358ce216334236fe25a165ba85e08de89234 (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.
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx47
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx28
-rw-r--r--drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx488
-rw-r--r--drawinglayer/source/primitive2d/textlayoutdevice.cxx76
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx122
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu10
-rw-r--r--sfx2/inc/sfx2/sfxsids.hrc3
-rw-r--r--svx/inc/globlmn_tmpl.hrc38
-rw-r--r--svx/inc/svdstr.hrc99
-rw-r--r--svx/inc/svx/editeng.hxx7
-rw-r--r--svx/inc/svx/eeitem.hxx19
-rw-r--r--svx/inc/svx/eeitemid.hxx6
-rw-r--r--svx/inc/svx/outliner.hxx38
-rw-r--r--svx/inc/svx/svxitems.hrc27
-rw-r--r--svx/inc/svx/udlnitem.hxx62
-rw-r--r--svx/inc/svx/unomid.hxx12
-rw-r--r--svx/inc/svx/unoprnms.hxx3
-rw-r--r--svx/inc/svx/unotext.hxx11
-rw-r--r--svx/inc/svxrtf.hxx3
-rw-r--r--svx/sdi/fmslots.sdi7
-rw-r--r--svx/sdi/svx.sdi29
-rw-r--r--svx/sdi/svxitems.sdi12
-rw-r--r--svx/source/dialog/chardlg.cxx230
-rw-r--r--svx/source/dialog/chardlg.hrc87
-rw-r--r--svx/source/dialog/chardlg.hxx38
-rw-r--r--svx/source/dialog/chardlg.src285
-rw-r--r--svx/source/editeng/editattr.cxx18
-rw-r--r--svx/source/editeng/editattr.hxx14
-rw-r--r--svx/source/editeng/editdbg.cxx8
-rw-r--r--svx/source/editeng/editdoc.cxx22
-rw-r--r--svx/source/editeng/editeng.cxx10
-rw-r--r--svx/source/editeng/eerdll.cxx13
-rw-r--r--svx/source/editeng/impedit3.cxx14
-rw-r--r--svx/source/editeng/impedit4.cxx18
-rw-r--r--svx/source/form/fmtextcontrolshell.cxx20
-rw-r--r--svx/source/form/formshell.src6
-rw-r--r--svx/source/items/svxitems.src87
-rw-r--r--svx/source/items/textitem.cxx124
-rw-r--r--svx/source/outliner/outleeng.cxx9
-rw-r--r--svx/source/outliner/outleeng.hxx13
-rw-r--r--svx/source/outliner/outliner.cxx62
-rw-r--r--svx/source/svdraw/svdattr.cxx3
-rw-r--r--svx/source/svdraw/svdfmtf.cxx3
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx99
-rw-r--r--svx/source/svdraw/svdstr.src7
-rw-r--r--svx/source/svrtf/rtfitem.cxx111
-rw-r--r--svx/source/svrtf/svxrtf.cxx9
-rw-r--r--svx/source/table/tablertfexporter.cxx4
-rw-r--r--svx/source/unodraw/unofdesc.cxx6
-rw-r--r--svx/workben/edittest.cxx6
-rw-r--r--xmloff/inc/xmloff/xmltoken.hxx10
-rw-r--r--xmloff/inc/xmloff/xmltypes.hxx9
-rw-r--r--xmloff/source/core/xmltoken.cxx10
-rw-r--r--xmloff/source/style/prhdlfac.cxx18
-rw-r--r--xmloff/source/text/txtprmap.cxx20
55 files changed, 1679 insertions, 861 deletions
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx
index f91fb7aab2..c4c0fa09b3 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx
@@ -55,31 +55,32 @@ namespace drawinglayer
{
namespace primitive2d
{
+ // This is used for both underline and overline
enum FontUnderline
{
- FONT_UNDERLINE_NONE,
- FONT_UNDERLINE_SINGLE,
+ FONT_UNDERLINE_NONE,
+ FONT_UNDERLINE_SINGLE,
FONT_UNDERLINE_DOUBLE,
- FONT_UNDERLINE_DOTTED,
- FONT_UNDERLINE_DASH,
+ FONT_UNDERLINE_DOTTED,
+ FONT_UNDERLINE_DASH,
FONT_UNDERLINE_LONGDASH,
- FONT_UNDERLINE_DASHDOT,
+ FONT_UNDERLINE_DASHDOT,
FONT_UNDERLINE_DASHDOTDOT,
FONT_UNDERLINE_SMALLWAVE,
- FONT_UNDERLINE_WAVE,
+ FONT_UNDERLINE_WAVE,
FONT_UNDERLINE_DOUBLEWAVE,
- FONT_UNDERLINE_BOLD,
+ FONT_UNDERLINE_BOLD,
FONT_UNDERLINE_BOLDDOTTED,
- FONT_UNDERLINE_BOLDDASH,
+ FONT_UNDERLINE_BOLDDASH,
FONT_UNDERLINE_BOLDLONGDASH,
- FONT_UNDERLINE_BOLDDASHDOT,
+ FONT_UNDERLINE_BOLDDASHDOT,
FONT_UNDERLINE_BOLDDASHDOTDOT,
FONT_UNDERLINE_BOLDWAVE
};
enum FontStrikeout
{
- FONT_STRIKEOUT_NONE,
+ FONT_STRIKEOUT_NONE,
FONT_STRIKEOUT_SINGLE,
FONT_STRIKEOUT_DOUBLE,
FONT_STRIKEOUT_BOLD,
@@ -98,16 +99,18 @@ namespace drawinglayer
enum FontRelief
{
- FONT_RELIEF_NONE,
- FONT_RELIEF_EMBOSSED,
+ FONT_RELIEF_NONE,
+ FONT_RELIEF_EMBOSSED,
FONT_RELIEF_ENGRAVED
};
class TextDecoratedPortionPrimitive2D : public TextSimplePortionPrimitive2D
{
private:
- basegfx::BColor maTextlineColor;
- FontUnderline meFontUnderline;
+ basegfx::BColor maOverlineColor;
+ basegfx::BColor maTextlineColor;
+ FontUnderline meFontOverline;
+ FontUnderline meFontUnderline;
FontStrikeout meFontStrikeout;
FontEmphasisMark meFontEmphasisMark;
FontRelief meFontRelief;
@@ -120,8 +123,18 @@ namespace drawinglayer
unsigned mbShadow : 1;
// helper methods
+ void impCreateTextLine(
+ std::vector< Primitive2DReference >& rTarget,
+ basegfx::DecomposedB2DHomMatrixContainer& rDecTrans,
+ const basegfx::B2DHomMatrix &rUnscaledTransform,
+ FontUnderline eLineStyle,
+ double fLineOffset,
+ double fLineHeight,
+ double fLineWidth,
+ const basegfx::BColor& rLineColor) const;
+
void impCreateGeometryContent(
- std::vector< Primitive2DReference >& rTarget,
+ std::vector< Primitive2DReference >& rTarget,
basegfx::DecomposedB2DHomMatrixContainer& rDecTrans,
const String& rText,
xub_StrLen aTextPosition,
@@ -154,7 +167,9 @@ namespace drawinglayer
const basegfx::BColor& rFontColor,
// local parameters
+ const basegfx::BColor& rOverlineColor,
const basegfx::BColor& rTextlineColor,
+ FontUnderline eFontOverline = FONT_UNDERLINE_NONE,
FontUnderline eFontUnderline = FONT_UNDERLINE_NONE,
bool bUnderlineAbove = false,
FontStrikeout eFontStrikeout = FONT_STRIKEOUT_NONE,
@@ -166,10 +181,12 @@ namespace drawinglayer
bool bShadow = false);
// get data
+ FontUnderline getFontOverline() const { return meFontOverline; }
FontUnderline getFontUnderline() const { return meFontUnderline; }
FontStrikeout getFontStrikeout() const { return meFontStrikeout; }
FontEmphasisMark getFontEmphasisMark() const { return meFontEmphasisMark; }
FontRelief getFontRelief() const { return meFontRelief; }
+ basegfx::BColor getOverlineColor() const { return maOverlineColor; }
basegfx::BColor getTextlineColor() const { return maTextlineColor; }
bool getUnderlineAbove() const { return mbUnderlineAbove; }
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx
index f339c58e7e..bbdc3df86c 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx
@@ -73,12 +73,14 @@ namespace drawinglayer
public:
TextLayouterDevice();
~TextLayouterDevice();
-
+
void setFont(const Font& rFont);
void setFontAttributes(const FontAttributes& rFontAttributes, const basegfx::B2DHomMatrix& rTransform);
void setFontAttributes(const FontAttributes& rFontAttributes, double fFontScaleX, double fFontScaleY);
double getTextHeight() const;
+ double getOverlineHeight() const;
+ double getOverlineOffset() const;
double getUnderlineHeight() const;
double getUnderlineOffset() const;
double getStrikeoutOffset() const;
@@ -87,19 +89,19 @@ namespace drawinglayer
#endif
double getTextWidth(
- const String& rText,
- xub_StrLen nIndex,
+ const String& rText,
+ xub_StrLen nIndex,
xub_StrLen nLength) const;
- bool getTextOutlines(
+ bool getTextOutlines(
basegfx::B2DPolyPolygonVector&,
const String& rText,
- xub_StrLen nIndex,
+ xub_StrLen nIndex,
xub_StrLen nLength);
basegfx::B2DRange getTextBoundRect(
- const String& rText,
- xub_StrLen nIndex,
+ const String& rText,
+ xub_StrLen nIndex,
xub_StrLen nLength) const;
};
} // end of namespace primitive2d
@@ -113,17 +115,17 @@ namespace drawinglayer
{
// helper methods for vcl font handling
Font getVclFontFromFontAttributes(
- const FontAttributes& rFontAttributes,
- double fFontScaleX,
+ const FontAttributes& rFontAttributes,
+ double fFontScaleX,
double fFontScaleY,
- double fFontRotation,
+ double fFontRotation,
const OutputDevice& rOutDev);
-
+
Font getVclFontFromFontAttributes(
- const FontAttributes& rFontAttributes,
+ const FontAttributes& rFontAttributes,
const basegfx::B2DHomMatrix& rTransform,
const OutputDevice& rOutDev);
-
+
FontAttributes getFontAttributesFromVclFont(basegfx::B2DVector& rSize, const Font& rFont, bool bRTL, bool bBiDiStrong);
} // end of namespace primitive2d
diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
index b321dac20d..367976df07 100644
--- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
@@ -55,8 +55,214 @@ namespace drawinglayer
{
namespace primitive2d
{
+ void TextDecoratedPortionPrimitive2D::impCreateTextLine(
+ std::vector< Primitive2DReference >& rTarget,
+ basegfx::DecomposedB2DHomMatrixContainer& rDecTrans,
+ const basegfx::B2DHomMatrix &rUnscaledTransform,
+ FontUnderline eLineStyle,
+ double fLineOffset,
+ double fLineHeight,
+ double fLineWidth,
+ const basegfx::BColor& rLineColor) const
+ {
+ bool bDoubleLine(false);
+ bool bWaveLine(false);
+ bool bBoldLine(false);
+ const int* pDotDashArray(0);
+ basegfx::B2DLineJoin eLineJoin(basegfx::B2DLINEJOIN_NONE);
+
+ static const int aDottedArray[] = { 1, 1, 0}; // DOTTED LINE
+ static const int aDotDashArray[] = { 1, 1, 4, 1, 0}; // DASHDOT
+ static const int aDashDotDotArray[] = { 1, 1, 1, 1, 4, 1, 0}; // DASHDOTDOT
+ static const int aDashedArray[] = { 5, 2, 0}; // DASHED LINE
+ static const int aLongDashArray[] = { 7, 2, 0}; // LONGDASH
+
+ switch(eLineStyle)
+ {
+ default: // case FONT_UNDERLINE_SINGLE:
+ {
+ break;
+ }
+ case FONT_UNDERLINE_DOUBLE:
+ {
+ bDoubleLine = true;
+ break;
+ }
+ case FONT_UNDERLINE_DOTTED:
+ {
+ pDotDashArray = aDottedArray;
+ break;
+ }
+ case FONT_UNDERLINE_DASH:
+ {
+ pDotDashArray = aDashedArray;
+ break;
+ }
+ case FONT_UNDERLINE_LONGDASH:
+ {
+ pDotDashArray = aLongDashArray;
+ break;
+ }
+ case FONT_UNDERLINE_DASHDOT:
+ {
+ pDotDashArray = aDotDashArray;
+ break;
+ }
+ case FONT_UNDERLINE_DASHDOTDOT:
+ {
+ pDotDashArray = aDashDotDotArray;
+ break;
+ }
+ case FONT_UNDERLINE_SMALLWAVE:
+ {
+ bWaveLine = true;
+ break;
+ }
+ case FONT_UNDERLINE_WAVE:
+ {
+ bWaveLine = true;
+ break;
+ }
+ case FONT_UNDERLINE_DOUBLEWAVE:
+ {
+ bDoubleLine = true;
+ bWaveLine = true;
+ break;
+ }
+ case FONT_UNDERLINE_BOLD:
+ {
+ bBoldLine = true;
+ break;
+ }
+ case FONT_UNDERLINE_BOLDDOTTED:
+ {
+ bBoldLine = true;
+ pDotDashArray = aDottedArray;
+ break;
+ }
+ case FONT_UNDERLINE_BOLDDASH:
+ {
+ bBoldLine = true;
+ pDotDashArray = aDashedArray;
+ break;
+ }
+ case FONT_UNDERLINE_BOLDLONGDASH:
+ {
+ bBoldLine = true;
+ pDotDashArray = aLongDashArray;
+ break;
+ }
+ case FONT_UNDERLINE_BOLDDASHDOT:
+ {
+ bBoldLine = true;
+ pDotDashArray = aDotDashArray;
+ break;
+ }
+ case FONT_UNDERLINE_BOLDDASHDOTDOT:
+ {
+ bBoldLine = true;
+ pDotDashArray = aDashDotDotArray;
+ break;
+ }
+ case FONT_UNDERLINE_BOLDWAVE:
+ {
+ bWaveLine = true;
+ bBoldLine = true;
+ break;
+ }
+ }
+
+ if(bBoldLine)
+ {
+ fLineHeight *= 2.0;
+ }
+
+ if(bDoubleLine)
+ {
+ fLineOffset -= 0.50 * fLineHeight;
+ fLineHeight *= 0.64;
+ }
+
+ if(bWaveLine)
+ {
+ eLineJoin = basegfx::B2DLINEJOIN_ROUND;
+ fLineHeight *= 0.5;
+ }
+
+ // prepare Line and Stroke Attributes
+ const attribute::LineAttribute aLineAttribute(rLineColor, fLineHeight, eLineJoin);
+ attribute::StrokeAttribute aStrokeAttribute;
+
+ if(pDotDashArray)
+ {
+ ::std::vector< double > aDoubleArray;
+
+ for(const int* p = pDotDashArray; *p; ++p)
+ {
+ aDoubleArray.push_back((double)(*p) * fLineHeight);
+ }
+
+ aStrokeAttribute = attribute::StrokeAttribute(aDoubleArray);
+ }
+
+ // create base polygon and new primitive
+ basegfx::B2DPolygon aLine;
+ Primitive2DReference aNewPrimitive;
+
+ aLine.append(basegfx::B2DPoint(0.0, fLineOffset));
+ aLine.append(basegfx::B2DPoint(fLineWidth, fLineOffset));
+ aLine.transform(rUnscaledTransform);
+
+ if(bWaveLine)
+ {
+ double fWaveWidth(4.0 * fLineHeight);
+
+ if(FONT_UNDERLINE_SMALLWAVE == eLineStyle)
+ {
+ fWaveWidth *= 0.7;
+ }
+ else if(FONT_UNDERLINE_WAVE == eLineStyle)
+ {
+ // extra multiply to get the same WaveWidth as with the bold version
+ fWaveWidth *= 2.0;
+ }
+
+ aNewPrimitive = Primitive2DReference(new PolygonWavePrimitive2D(aLine, aLineAttribute, aStrokeAttribute, fWaveWidth, 0.5 * fWaveWidth));
+ }
+ else
+ {
+ aNewPrimitive = Primitive2DReference(new PolygonStrokePrimitive2D(aLine, aLineAttribute, aStrokeAttribute));
+ }
+
+ // add primitive
+ rTarget.push_back(aNewPrimitive);
+
+ if(bDoubleLine)
+ {
+ // double line, create 2nd primitive with offset using TransformPrimitive based on
+ // already created NewPrimitive
+ const double fLineDist((bWaveLine ? 3.0 : 2.0) * fLineHeight);
+ basegfx::B2DHomMatrix aTransform;
+
+ // move base point of text to 0.0 and de-rotate
+ aTransform.translate(-rDecTrans.getTranslate().getX(), -rDecTrans.getTranslate().getY());
+ aTransform.rotate(-rDecTrans.getRotate());
+
+ // translate in Y by offset
+ aTransform.translate(0.0, fLineDist);
+
+ // move back and rotate
+ aTransform.rotate(rDecTrans.getRotate());
+ aTransform.translate(rDecTrans.getTranslate().getX(), rDecTrans.getTranslate().getY());
+
+ // add transform primitive
+ const Primitive2DSequence aContent(&aNewPrimitive, 1);
+ rTarget.push_back(Primitive2DReference(new TransformPrimitive2D(aTransform, aContent)));
+ }
+ }
+
void TextDecoratedPortionPrimitive2D::impCreateGeometryContent(
- std::vector< Primitive2DReference >& rTarget,
+ std::vector< Primitive2DReference >& rTarget,
basegfx::DecomposedB2DHomMatrixContainer& rDecTrans,
const String& rText,
xub_StrLen aTextPosition,
@@ -66,31 +272,32 @@ namespace drawinglayer
{
// create the SimpleTextPrimitive needed in any case
rTarget.push_back(Primitive2DReference(new TextSimplePortionPrimitive2D(
- rDecTrans.getB2DHomMatrix(),
- rText,
+ rDecTrans.getB2DHomMatrix(),
+ rText,
aTextPosition,
aTextLength,
- rDXArray,
- rFontAttributes,
- getLocale(),
+ rDXArray,
+ rFontAttributes,
+ getLocale(),
getFontColor())));
// see if something else needs to be done
+ const bool bOverlineUsed(FONT_UNDERLINE_NONE != getFontOverline());
const bool bUnderlineUsed(FONT_UNDERLINE_NONE != getFontUnderline());
const bool bStrikeoutUsed(FONT_STRIKEOUT_NONE != getFontStrikeout());
- if(bUnderlineUsed || bStrikeoutUsed)
+ if(bUnderlineUsed || bStrikeoutUsed || bOverlineUsed)
{
// common preparations
basegfx::B2DHomMatrix aUnscaledTransform;
TextLayouterDevice aTextLayouter;
-
+
// unscaled is needed since scale contains already the font size
aUnscaledTransform.shearX(rDecTrans.getShearX());
aUnscaledTransform.rotate(rDecTrans.getRotate());
aUnscaledTransform.translate(rDecTrans.getTranslate().getX(), rDecTrans.getTranslate().getY());
- // TextLayouterDevice is needed to get metrics for text decorations like
+ // TextLayouterDevice is needed to get metrics for text decorations like
// underline/strikeout/emphasis marks from it. For setup, the font size is needed
aTextLayouter.setFontAttributes(getFontAttributes(), rDecTrans.getScale().getX(), rDecTrans.getScale().getY());
@@ -106,205 +313,18 @@ namespace drawinglayer
fTextWidth = rDXArray.back() * rDecTrans.getScale().getX();
}
+ if(bOverlineUsed)
+ {
+ // create primitive geometry for overline
+ impCreateTextLine(rTarget, rDecTrans, aUnscaledTransform, getFontOverline(), aTextLayouter.getOverlineOffset(),
+ aTextLayouter.getOverlineHeight(), fTextWidth, getOverlineColor());
+ }
+
if(bUnderlineUsed)
{
// create primitive geometry for underline
- bool bDoubleLine(false);
- bool bWaveLine(false);
- bool bBoldLine(false);
- const int* pDotDashArray(0);
- basegfx::B2DLineJoin eLineJoin(basegfx::B2DLINEJOIN_NONE);
- double fUnderlineOffset(aTextLayouter.getUnderlineOffset());
- double fUnderlineHeight(aTextLayouter.getUnderlineHeight());
-
- static const int aDottedArray[] = { 1, 1, 0}; // DOTTED LINE
- static const int aDotDashArray[] = { 1, 1, 4, 1, 0}; // DASHDOT
- static const int aDashDotDotArray[] = { 1, 1, 1, 1, 4, 1, 0}; // DASHDOTDOT
- static const int aDashedArray[] = { 5, 2, 0}; // DASHED LINE
- static const int aLongDashArray[] = { 7, 2, 0}; // LONGDASH
-
- switch(getFontUnderline())
- {
- default: // case FONT_UNDERLINE_SINGLE:
- {
- break;
- }
- case FONT_UNDERLINE_DOUBLE:
- {
- bDoubleLine = true;
- break;
- }
- case FONT_UNDERLINE_DOTTED:
- {
- pDotDashArray = aDottedArray;
- break;
- }
- case FONT_UNDERLINE_DASH:
- {
- pDotDashArray = aDashedArray;
- break;
- }
- case FONT_UNDERLINE_LONGDASH:
- {
- pDotDashArray = aLongDashArray;
- break;
- }
- case FONT_UNDERLINE_DASHDOT:
- {
- pDotDashArray = aDotDashArray;
- break;
- }
- case FONT_UNDERLINE_DASHDOTDOT:
- {
- pDotDashArray = aDashDotDotArray;
- break;
- }
- case FONT_UNDERLINE_SMALLWAVE:
- {
- bWaveLine = true;
- break;
- }
- case FONT_UNDERLINE_WAVE:
- {
- bWaveLine = true;
- break;
- }
- case FONT_UNDERLINE_DOUBLEWAVE:
- {
- bDoubleLine = true;
- bWaveLine = true;
- break;
- }
- case FONT_UNDERLINE_BOLD:
- {
- bBoldLine = true;
- break;
- }
- case FONT_UNDERLINE_BOLDDOTTED:
- {
- bBoldLine = true;
- pDotDashArray = aDottedArray;
- break;
- }
- case FONT_UNDERLINE_BOLDDASH:
- {
- bBoldLine = true;
- pDotDashArray = aDashedArray;
- break;
- }
- case FONT_UNDERLINE_BOLDLONGDASH:
- {
- bBoldLine = true;
- pDotDashArray = aLongDashArray;
- break;
- }
- case FONT_UNDERLINE_BOLDDASHDOT:
- {
- bBoldLine = true;
- pDotDashArray = aDotDashArray;
- break;
- }
- case FONT_UNDERLINE_BOLDDASHDOTDOT:
- {
- bBoldLine = true;
- pDotDashArray = aDashDotDotArray;
- break;
- }
- case FONT_UNDERLINE_BOLDWAVE:
- {
- bWaveLine = true;
- bBoldLine = true;
- break;
- }
- }
-
- if(bBoldLine)
- {
- fUnderlineHeight *= 2.0;
- }
-
- if(bDoubleLine)
- {
- fUnderlineOffset -= 0.50 * fUnderlineHeight;
- fUnderlineHeight *= 0.64;
- }
-
- if(bWaveLine)
- {
- eLineJoin = basegfx::B2DLINEJOIN_ROUND;
- fUnderlineHeight *= 0.5;
- }
-
- // prepare Line and Stroke Attributes
- const attribute::LineAttribute aLineAttribute(getTextlineColor(), fUnderlineHeight, eLineJoin);
- attribute::StrokeAttribute aStrokeAttribute;
-
- if(pDotDashArray)
- {
- ::std::vector< double > aDoubleArray;
-
- for(const int* p = pDotDashArray; *p; ++p)
- {
- aDoubleArray.push_back((double)(*p) * fUnderlineHeight);
- }
-
- aStrokeAttribute = attribute::StrokeAttribute(aDoubleArray);
- }
-
- // create base polygon and new primitive
- basegfx::B2DPolygon aUnderline;
- Primitive2DReference aNewPrimitive;
-
- aUnderline.append(basegfx::B2DPoint(0.0, fUnderlineOffset));
- aUnderline.append(basegfx::B2DPoint(fTextWidth, fUnderlineOffset));
- aUnderline.transform(aUnscaledTransform);
-
- if(bWaveLine)
- {
- double fWaveWidth(4.0 * fUnderlineHeight);
-
- if(primitive2d::FONT_UNDERLINE_SMALLWAVE == getFontUnderline())
- {
- fWaveWidth *= 0.7;
- }
- else if(primitive2d::FONT_UNDERLINE_WAVE == getFontUnderline())
- {
- // extra multiply to get the same WaveWidth as with the bold version
- fWaveWidth *= 2.0;
- }
-
- aNewPrimitive = Primitive2DReference(new PolygonWavePrimitive2D(aUnderline, aLineAttribute, aStrokeAttribute, fWaveWidth, 0.5 * fWaveWidth));
- }
- else
- {
- aNewPrimitive = Primitive2DReference(new PolygonStrokePrimitive2D(aUnderline, aLineAttribute, aStrokeAttribute));
- }
-
- // add primitive
- rTarget.push_back(aNewPrimitive);
-
- if(bDoubleLine)
- {
- // double line, create 2nd primitive with offset using TransformPrimitive based on
- // already created NewPrimitive
- const double fLineDist((bWaveLine ? 3.0 : 2.0) * fUnderlineHeight);
- basegfx::B2DHomMatrix aTransform;
-
- // move base point of text to 0.0 and de-rotate
- aTransform.translate(-rDecTrans.getTranslate().getX(), -rDecTrans.getTranslate().getY());
- aTransform.rotate(-rDecTrans.getRotate());
-
- // translate in Y by offset
- aTransform.translate(0.0, fLineDist);
-
- // move back and rotate
- aTransform.rotate(rDecTrans.getRotate());
- aTransform.translate(rDecTrans.getTranslate().getX(), rDecTrans.getTranslate().getY());
-
- // add transform primitive
- const Primitive2DSequence aContent(&aNewPrimitive, 1);
- rTarget.push_back(Primitive2DReference(new TransformPrimitive2D(aTransform, aContent)));
- }
+ impCreateTextLine(rTarget, rDecTrans, aUnscaledTransform, getFontUnderline(), aTextLayouter.getUnderlineOffset(),
+ aTextLayouter.getUnderlineHeight(), fTextWidth, getTextlineColor());
}
if(bStrikeoutUsed)
@@ -320,7 +340,7 @@ namespace drawinglayer
const sal_uInt32 nStrikeCharCount(static_cast< sal_uInt32 >(fStrikeCharCount + 0.9));
const double fScaleX(rDecTrans.getScale().getX());
const double fStrikeCharWidthUnscaled(basegfx::fTools::equalZero(fScaleX) ? fStrikeCharWidth : fStrikeCharWidth/fScaleX);
-
+
std::vector<double> aDXArray(nStrikeCharCount);
String aStrikeoutString;
@@ -329,15 +349,15 @@ namespace drawinglayer
aStrikeoutString += aSingleCharString;
aDXArray[a] = (a + 1) * fStrikeCharWidthUnscaled;
}
-
+
rTarget.push_back(Primitive2DReference(new TextSimplePortionPrimitive2D(
- rDecTrans.getB2DHomMatrix(),
- aStrikeoutString,
+ rDecTrans.getB2DHomMatrix(),
+ aStrikeoutString,
0,
aStrikeoutString.Len(),
- aDXArray,
- rFontAttributes,
- getLocale(),
+ aDXArray,
+ rFontAttributes,
+ getLocale(),
getFontColor())));
}
else
@@ -347,7 +367,7 @@ namespace drawinglayer
double fStrikeoutOffset(aTextLayouter.getStrikeoutOffset());
bool bDoubleLine(false);
- // set Underline attribute
+ // set line attribute
switch(getFontStrikeout())
{
default : // case primitive2d::FONT_STRIKEOUT_SINGLE:
@@ -378,7 +398,7 @@ namespace drawinglayer
aStrikeoutLine.append(basegfx::B2DPoint(0.0, -fStrikeoutOffset));
aStrikeoutLine.append(basegfx::B2DPoint(fTextWidth, -fStrikeoutOffset));
aStrikeoutLine.transform(aUnscaledTransform);
-
+
const attribute::LineAttribute aLineAttribute(getFontColor(), fStrikeoutHeight, basegfx::B2DLINEJOIN_NONE);
Primitive2DReference aNewPrimitive(new PolygonStrokePrimitive2D(aStrikeoutLine, aLineAttribute));
@@ -507,7 +527,7 @@ namespace drawinglayer
// prepare new DXArray for the single word
::std::vector< double > aNewDXArray(
- getDXArray().begin() + static_cast< sal_uInt32 >(nNewTextStart - getTextPosition()),
+ getDXArray().begin() + static_cast< sal_uInt32 >(nNewTextStart - getTextPosition()),
getDXArray().begin() + static_cast< sal_uInt32 >(nNewTextEnd - getTextPosition()));
if(bNewStartIsNotOldStart)
@@ -520,15 +540,15 @@ namespace drawinglayer
aNewDXArray[a] -= fDistance;
}
}
-
+
// create geometry content for the single word
basegfx::DecomposedB2DHomMatrixContainer aDecTrans(aNewTransform);
- impCreateGeometryContent(rTarget, aDecTrans, getText(), nNewTextStart,
+ impCreateGeometryContent(rTarget, aDecTrans, getText(), nNewTextStart,
nNewTextEnd - nNewTextStart, aNewDXArray, aNewFontAttributes);
// prepare next word and truncate to possibilities
aNextWordBoundary = xLocalBreakIterator->nextWord(
- getText(), aNextWordBoundary.endPos, getLocale(),
+ getText(), aNextWordBoundary.endPos, getLocale(),
::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES);
impCorrectTextBoundary(aNextWordBoundary);
}
@@ -542,8 +562,8 @@ namespace drawinglayer
basegfx::DecomposedB2DHomMatrixContainer aDecTrans(getTextTransform());
Primitive2DSequence aRetval;
- // create basic geometry such as SimpleTextPrimitive, Underline,
- // Strikeuot, etc...
+ // create basic geometry such as SimpleTextPrimitive, Overline, Underline,
+ // Strikeout, etc...
if(getWordLineMode())
{
// support for single word mode
@@ -569,7 +589,7 @@ namespace drawinglayer
// convert to Primitive2DSequence
const sal_uInt32 nMemberCount(aNewPrimitives.size());
-
+
if(nMemberCount)
{
aRetval.realloc(nMemberCount);
@@ -595,13 +615,13 @@ namespace drawinglayer
if(bHasShadow)
{
// create shadow with current content (in aRetval). Text shadow
- // is constant, relative to font size, rotated with the text and has a
+ // is constant, relative to font size, rotated with the text and has a
// constant color.
// shadow parameter values
static double fFactor(1.0 / 24.0);
const double fTextShadowOffset(aDecTrans.getScale().getY() * fFactor);
static basegfx::BColor aShadowColor(0.3, 0.3, 0.3);
-
+
// preapare shadow transform matrix
basegfx::B2DHomMatrix aShadowTransform;
aShadowTransform.translate(fTextShadowOffset, fTextShadowOffset);
@@ -645,9 +665,9 @@ namespace drawinglayer
}
Primitive2DReference aNewTextEffect(new TextEffectPrimitive2D(
- aRetval,
+ aRetval,
aDecTrans.getTranslate(),
- aDecTrans.getRotate(),
+ aDecTrans.getRotate(),
aTextEffectStyle2D));
aRetval = Primitive2DSequence(&aNewTextEffect, 1);
}
@@ -656,9 +676,9 @@ namespace drawinglayer
// create outline using an own helper primitive since this will
// be view-dependent
Primitive2DReference aNewTextEffect(new TextEffectPrimitive2D(
- aRetval,
- aDecTrans.getTranslate(),
- aDecTrans.getRotate(),
+ aRetval,
+ aDecTrans.getTranslate(),
+ aDecTrans.getRotate(),
TEXTEFFECTSTYLE2D_OUTLINE));
aRetval = Primitive2DSequence(&aNewTextEffect, 1);
}
@@ -681,7 +701,7 @@ namespace drawinglayer
// TextSimplePortionPrimitive2D parameters
const basegfx::B2DHomMatrix& rNewTransform,
- const String& rText,
+ const String& rText,
xub_StrLen aTextPosition,
xub_StrLen aTextLength,
const ::std::vector< double >& rDXArray,
@@ -690,7 +710,9 @@ namespace drawinglayer
const basegfx::BColor& rFontColor,
// local parameters
+ const basegfx::BColor& rOverlineColor,
const basegfx::BColor& rTextlineColor,
+ FontUnderline eFontOverline,
FontUnderline eFontUnderline,
bool bUnderlineAbove,
FontStrikeout eFontStrikeout,
@@ -701,7 +723,9 @@ namespace drawinglayer
FontRelief eFontRelief,
bool bShadow)
: TextSimplePortionPrimitive2D(rNewTransform, rText, aTextPosition, aTextLength, rDXArray, rFontAttributes, rLocale, rFontColor),
+ maOverlineColor(rOverlineColor),
maTextlineColor(rTextlineColor),
+ meFontOverline(eFontOverline),
meFontUnderline(eFontUnderline),
meFontStrikeout(eFontStrikeout),
meFontEmphasisMark(eFontEmphasisMark),
@@ -719,8 +743,10 @@ namespace drawinglayer
if(TextSimplePortionPrimitive2D::operator==(rPrimitive))
{
const TextDecoratedPortionPrimitive2D& rCompare = (TextDecoratedPortionPrimitive2D&)rPrimitive;
-
- return (getTextlineColor() == rCompare.getTextlineColor()
+
+ return (getOverlineColor() == rCompare.getOverlineColor()
+ && getTextlineColor() == rCompare.getTextlineColor()
+ && getFontOverline() == rCompare.getFontOverline()
&& getFontUnderline() == rCompare.getFontUnderline()
&& getFontStrikeout() == rCompare.getFontStrikeout()
&& getFontEmphasisMark() == rCompare.getFontEmphasisMark()
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index dff471c9c1..60df24c1e1 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -115,7 +115,7 @@ namespace
{
OSL_ENSURE(mnUseCount, "mismatch call number to releaseVirtualDevice() (!)");
mnUseCount--;
-
+
if(!mnUseCount)
{
Start();
@@ -175,6 +175,13 @@ namespace drawinglayer
setFont(getVclFontFromFontAttributes(rFontAttributes, fFontScaleX, fFontScaleY, 0.0, mrDevice));
}
+ double TextLayouterDevice::getOverlineOffset() const
+ {
+ const ::FontMetric& rMetric = mrDevice.GetFontMetric();
+ double fRet = (rMetric.GetIntLeading() / 2.0) - rMetric.GetAscent();
+ return fRet;
+ }
+
double TextLayouterDevice::getUnderlineOffset() const
{
const ::FontMetric& rMetric = mrDevice.GetFontMetric();
@@ -201,6 +208,13 @@ namespace drawinglayer
}
#endif
+ double TextLayouterDevice::getOverlineHeight() const
+ {
+ const ::FontMetric& rMetric = mrDevice.GetFontMetric();
+ double fRet = rMetric.GetIntLeading() / 2.5;
+ return fRet;
+ }
+
double TextLayouterDevice::getUnderlineHeight() const
{
const ::FontMetric& rMetric = mrDevice.GetFontMetric();
@@ -214,44 +228,44 @@ namespace drawinglayer
}
double TextLayouterDevice::getTextWidth(
- const String& rText,
- xub_StrLen nIndex,
+ const String& rText,
+ xub_StrLen nIndex,
xub_StrLen nLength) const
{
return mrDevice.GetTextWidth(rText, nIndex, nLength);
}
- bool TextLayouterDevice::getTextOutlines(
- basegfx::B2DPolyPolygonVector& rB2DPolyPolyVector,
- const String& rText,
- xub_StrLen nIndex,
+ bool TextLayouterDevice::getTextOutlines(
+ basegfx::B2DPolyPolygonVector& rB2DPolyPolyVector,
+ const String& rText,
+ xub_StrLen nIndex,
xub_StrLen nLength)
{
- return mrDevice.GetTextOutlines(
- rB2DPolyPolyVector,
- rText,
- nIndex,
- nIndex,
- nLength,
- true,
- 0,
+ return mrDevice.GetTextOutlines(
+ rB2DPolyPolyVector,
+ rText,
+ nIndex,
+ nIndex,
+ nLength,
+ true,
+ 0,
0);
}
basegfx::B2DRange TextLayouterDevice::getTextBoundRect(
- const String& rText,
- xub_StrLen nIndex,
+ const String& rText,
+ xub_StrLen nIndex,
xub_StrLen nLength) const
{
if(nLength)
{
Rectangle aRect;
-
+
mrDevice.GetTextBoundRect(
- aRect,
- rText,
- nIndex,
- nIndex,
+ aRect,
+ rText,
+ nIndex,
+ nIndex,
nLength);
return basegfx::B2DRange(aRect.Left(), aRect.Top(), aRect.Right(), aRect.Bottom());
@@ -272,31 +286,31 @@ namespace drawinglayer
namespace primitive2d
{
Font getVclFontFromFontAttributes(
- const FontAttributes& rFontAttributes,
+ const FontAttributes& rFontAttributes,
const basegfx::B2DHomMatrix& rTransform,
const OutputDevice& rOutDev)
{
// decompose matrix to have position and size of text
basegfx::B2DVector aScale, aTranslate;
double fRotate, fShearX;
-
+
rTransform.decompose(aScale, aTranslate, fRotate, fShearX);
-
+
return getVclFontFromFontAttributes(rFontAttributes, aScale.getX(), aScale.getY(), fRotate, rOutDev);
}
Font getVclFontFromFontAttributes(
- const FontAttributes& rFontAttributes,
- double fFontScaleX,
- double fFontScaleY,
+ const FontAttributes& rFontAttributes,
+ double fFontScaleX,
+ double fFontScaleY,
double fFontRotation,
const OutputDevice& /*rOutDev*/)
{
sal_uInt32 nWidth(basegfx::fround(fabs(fFontScaleX)));
sal_uInt32 nHeight(basegfx::fround(fabs(fFontScaleY)));
Font aRetval(
- rFontAttributes.getFamilyName(),
- rFontAttributes.getStyleName(),
+ rFontAttributes.getFamilyName(),
+ rFontAttributes.getStyleName(),
#ifdef WIN32
Size(0, nHeight));
#else
@@ -364,7 +378,7 @@ namespace drawinglayer
rSize.setX(nWidth ? nWidth : nHeight);
rSize.setY(nHeight);
-
+
return aRetval;
}
} // end of namespace primitive2d
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index caba69769c..9c499990f8 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -102,6 +102,34 @@ namespace drawinglayer
using ::com::sun::star::awt::XWindow;
using ::com::sun::star::awt::PosSize::POSSIZE;
+ static FontUnderline mapTextLineStyle(primitive2d::FontUnderline eLineStyle)
+ {
+ switch(eLineStyle)
+ {
+ default:
+ DBG_WARNING1( "DrawingLayer: Unknown text line style attribute (%d)!", eLineStyle );
+ // fall through
+ case primitive2d::FONT_UNDERLINE_NONE: return UNDERLINE_NONE;
+ case primitive2d::FONT_UNDERLINE_SINGLE: return UNDERLINE_SINGLE;
+ case primitive2d::FONT_UNDERLINE_DOUBLE: return UNDERLINE_DOUBLE;
+ case primitive2d::FONT_UNDERLINE_DOTTED: return UNDERLINE_DOTTED;
+ case primitive2d::FONT_UNDERLINE_DASH: return UNDERLINE_DASH;
+ case primitive2d::FONT_UNDERLINE_LONGDASH: return UNDERLINE_LONGDASH;
+ case primitive2d::FONT_UNDERLINE_DASHDOT: return UNDERLINE_DASHDOT;
+ case primitive2d::FONT_UNDERLINE_DASHDOTDOT: return UNDERLINE_DASHDOTDOT;
+ case primitive2d::FONT_UNDERLINE_SMALLWAVE: return UNDERLINE_SMALLWAVE;
+ case primitive2d::FONT_UNDERLINE_WAVE: return UNDERLINE_WAVE;
+ case primitive2d::FONT_UNDERLINE_DOUBLEWAVE: return UNDERLINE_DOUBLEWAVE;
+ case primitive2d::FONT_UNDERLINE_BOLD: return UNDERLINE_BOLD;
+ case primitive2d::FONT_UNDERLINE_BOLDDOTTED: return UNDERLINE_BOLDDOTTED;
+ case primitive2d::FONT_UNDERLINE_BOLDDASH: return UNDERLINE_BOLDDASH;
+ case primitive2d::FONT_UNDERLINE_BOLDLONGDASH: return UNDERLINE_LONGDASH;
+ case primitive2d::FONT_UNDERLINE_BOLDDASHDOT: return UNDERLINE_BOLDDASHDOT;
+ case primitive2d::FONT_UNDERLINE_BOLDDASHDOTDOT:return UNDERLINE_BOLDDASHDOT;
+ case primitive2d::FONT_UNDERLINE_BOLDWAVE: return UNDERLINE_BOLDWAVE;
+ }
+ }
+
//////////////////////////////////////////////////////////////////////////////
// rendering support
@@ -140,33 +168,17 @@ namespace drawinglayer
if( pTCPP != NULL )
{
- // set Underline attribute
- FontUnderline eFontUnderline = UNDERLINE_NONE;
- switch( pTCPP->getFontUnderline() )
+ // set Overline attribute
+ FontUnderline eFontOverline = mapTextLineStyle( pTCPP->getFontOverline() );
+ if( eFontOverline != UNDERLINE_NONE )
{
- default:
- DBG_WARNING1( "DrawingLayer: Unknown underline attribute (%d)!", pTCPP->getFontUnderline() );
- // fall through
- case primitive2d::FONT_UNDERLINE_NONE: eFontUnderline = UNDERLINE_NONE; break;
- case primitive2d::FONT_UNDERLINE_SINGLE: eFontUnderline = UNDERLINE_SINGLE; break;
- case primitive2d::FONT_UNDERLINE_DOUBLE: eFontUnderline = UNDERLINE_DOUBLE; break;
- case primitive2d::FONT_UNDERLINE_DOTTED: eFontUnderline = UNDERLINE_DOTTED; break;
- case primitive2d::FONT_UNDERLINE_DASH: eFontUnderline = UNDERLINE_DASH; break;
- case primitive2d::FONT_UNDERLINE_LONGDASH: eFontUnderline = UNDERLINE_LONGDASH; break;
- case primitive2d::FONT_UNDERLINE_DASHDOT: eFontUnderline = UNDERLINE_DASHDOT; break;
- case primitive2d::FONT_UNDERLINE_DASHDOTDOT:eFontUnderline = UNDERLINE_DASHDOTDOT; break;
- case primitive2d::FONT_UNDERLINE_SMALLWAVE: eFontUnderline = UNDERLINE_SMALLWAVE; break;
- case primitive2d::FONT_UNDERLINE_WAVE: eFontUnderline = UNDERLINE_WAVE; break;
- case primitive2d::FONT_UNDERLINE_DOUBLEWAVE:eFontUnderline = UNDERLINE_DOUBLEWAVE; break;
- case primitive2d::FONT_UNDERLINE_BOLD: eFontUnderline = UNDERLINE_BOLD; break;
- case primitive2d::FONT_UNDERLINE_BOLDDOTTED:eFontUnderline = UNDERLINE_BOLDDOTTED; break;
- case primitive2d::FONT_UNDERLINE_BOLDDASH: eFontUnderline = UNDERLINE_BOLDDASH; break;
- case primitive2d::FONT_UNDERLINE_BOLDLONGDASH:eFontUnderline = UNDERLINE_LONGDASH; break;
- case primitive2d::FONT_UNDERLINE_BOLDDASHDOT:eFontUnderline = UNDERLINE_BOLDDASHDOT; break;
- case primitive2d::FONT_UNDERLINE_BOLDDASHDOTDOT:eFontUnderline = UNDERLINE_BOLDDASHDOT; break;
- case primitive2d::FONT_UNDERLINE_BOLDWAVE: eFontUnderline = UNDERLINE_BOLDWAVE; break;
+ aFont.SetOverline( eFontOverline );
+ if( pTCPP->getWordLineMode() )
+ aFont.SetWordLineMode( true );
}
+ // set Underline attribute
+ FontUnderline eFontUnderline = mapTextLineStyle( pTCPP->getFontUnderline() );
if( eFontUnderline != UNDERLINE_NONE )
{
aFont.SetUnderline( eFontUnderline );
@@ -181,7 +193,7 @@ namespace drawinglayer
switch( pTCPP->getFontStrikeout() )
{
default:
- DBG_WARNING1( "DrawingLayer: Unknown strikeout attribute (%d)!", pTCPP->getFontUnderline() );
+ DBG_WARNING1( "DrawingLayer: Unknown strikeout attribute (%d)!", pTCPP->getFontStrikeout() );
// fall through
case primitive2d::FONT_STRIKEOUT_NONE: eFontStrikeout = STRIKEOUT_NONE; break;
case primitive2d::FONT_STRIKEOUT_SINGLE: eFontStrikeout = STRIKEOUT_SINGLE; break;
@@ -259,7 +271,7 @@ namespace drawinglayer
const basegfx::B2DPoint aPoint(aLocalTransform * basegfx::B2DPoint(0.0, 0.0));
const Point aStartPoint(basegfx::fround(aPoint.getX()), basegfx::fround(aPoint.getY()));
const sal_uInt32 nOldLayoutMode(mpOutputDevice->GetLayoutMode());
-
+
if(rTextCandidate.getFontAttributes().getRTL())
{
sal_uInt32 nRTLLayoutMode(nOldLayoutMode & ~(TEXT_LAYOUT_COMPLEX_DISABLED|TEXT_LAYOUT_BIDI_STRONG));
@@ -269,10 +281,10 @@ namespace drawinglayer
mpOutputDevice->SetFont(aFont);
mpOutputDevice->SetTextColor(Color(aRGBFontColor));
-
+
mpOutputDevice->DrawTextArray(
- aStartPoint,
- rTextCandidate.getText(),
+ aStartPoint,
+ rTextCandidate.getText(),
aTransformedDXArray.size() ? &(aTransformedDXArray[0]) : NULL,
rTextCandidate.getTextPosition(),
rTextCandidate.getTextLength());
@@ -417,10 +429,10 @@ namespace drawinglayer
const basegfx::B2DPoint aBmpBottomRight(aLocalTransform * basegfx::B2DPoint(rFillBitmapAttribute.getTopLeft() + rFillBitmapAttribute.getSize()));
const Point aBmpTL(mpOutputDevice->LogicToPixel(Point((sal_Int32)aBmpTopLeft.getX(), (sal_Int32)aBmpTopLeft.getY())));
const Point aBmpBR(mpOutputDevice->LogicToPixel(Point((sal_Int32)aBmpBottomRight.getX(), (sal_Int32)aBmpBottomRight.getY())));
-
+
sal_Int32 nOWidth(aObjBR.X() - aObjTL.X());
sal_Int32 nOHeight(aObjBR.Y() - aObjTL.Y());
-
+
// only do something when object has a size in discrete units
if(nOWidth > 0 && nOHeight > 0)
{
@@ -516,7 +528,7 @@ namespace drawinglayer
{
impDrawGradientToOutDev(
*mpOutputDevice, aLocalPolyPolygon, rGradient.getStyle(), rGradient.getSteps(),
- aStartColor, aEndColor, rGradient.getBorder(),
+ aStartColor, aEndColor, rGradient.getBorder(),
-rGradient.getAngle(), rGradient.getOffsetX(), rGradient.getOffsetY(), false);
}
}
@@ -534,7 +546,7 @@ namespace drawinglayer
if(mnPolygonStrokePrimitive2D && getOptionsDrawinglayer().IsAntiAliasing())
{
- // when AA is on and this filled polygons are the result of stroked line geometry,
+ // when AA is on and this filled polygons are the result of stroked line geometry,
// draw the geometry once extra as lines to avoid AA 'gaps' between partial polygons
mpOutputDevice->SetFillColor();
mpOutputDevice->SetLineColor(Color(aPolygonColor));
@@ -552,14 +564,14 @@ namespace drawinglayer
static bool bInside(true);
static bool bFilled(false);
static bool bLine(false);
-
+
basegfx::B2DRange aRange(aLocalPolyPolygon.getB2DRange());
aRange.grow(aRange.getWidth() * -0.1);
-
+
if(bFilled)
{
basegfx::B2DPolyPolygon aFilledClipped(basegfx::tools::clipPolyPolygonOnRange(aLocalPolyPolygon, aRange, bInside, false));
- basegfx::BColor aRand(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0);
+ basegfx::BColor aRand(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0);
mpOutputDevice->SetFillColor(Color(aRand));
mpOutputDevice->SetLineColor();
mpOutputDevice->DrawPolyPolygon(aFilledClipped);
@@ -568,7 +580,7 @@ namespace drawinglayer
if(bLine)
{
basegfx::B2DPolyPolygon aLineClipped(basegfx::tools::clipPolyPolygonOnRange(aLocalPolyPolygon, aRange, bInside, true));
- basegfx::BColor aRand(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0);
+ basegfx::BColor aRand(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0);
mpOutputDevice->SetFillColor();
mpOutputDevice->SetLineColor(Color(aRand));
@@ -592,22 +604,22 @@ namespace drawinglayer
// get BoundRect
basegfx::B2DRange aOutlineRange(rMetaCandidate.getB2DRange(getViewInformation2D()));
aOutlineRange.transform(maCurrentTransformation);
-
+
// Due to the integer MapModes used from VCL aind inside MetaFiles errors of up to three
// pixels in size may happen. As long as there is no better way (e.g. convert the MetaFile
- // to primitives) it is necessary to reduce maximum pixel size by 1 in X and Y and to use
- // the inner pixel bounds accordingly (ceil resp. floor). This will also be done for logic
- // units e.g. when creating a new MetaFile, but since much huger value ranges are used
+ // to primitives) it is necessary to reduce maximum pixel size by 1 in X and Y and to use
+ // the inner pixel bounds accordingly (ceil resp. floor). This will also be done for logic
+ // units e.g. when creating a new MetaFile, but since much huger value ranges are used
// there typically will be okay for this compromize.
Rectangle aDestRectView(
(sal_Int32)ceil(aOutlineRange.getMinX()), (sal_Int32)ceil(aOutlineRange.getMinY()),
(sal_Int32)floor(aOutlineRange.getMaxX()), (sal_Int32)floor(aOutlineRange.getMaxY()));
-
+
if(aDestRectView.Right() > aDestRectView.Left())
{
aDestRectView.Right()--;
}
-
+
if(aDestRectView.Bottom() > aDestRectView.Top())
{
aDestRectView.Bottom()--;
@@ -766,7 +778,7 @@ namespace drawinglayer
// paint content to it
process(rTransCandidate.getChildren());
-
+
// set to mask
mpOutputDevice = &aBufferDevice.getAlpha();
@@ -801,7 +813,7 @@ namespace drawinglayer
maCurrentTransformation = maCurrentTransformation * rTransformCandidate.getTransformation();
const geometry::ViewInformation2D aViewInformation2D(
getViewInformation2D().getObjectTransformation() * rTransformCandidate.getTransformation(),
- getViewInformation2D().getViewTransformation(),
+ getViewInformation2D().getViewTransformation(),
getViewInformation2D().getViewport(),
getViewInformation2D().getVisualizedPage(),
getViewInformation2D().getViewTime(),
@@ -824,8 +836,8 @@ namespace drawinglayer
// create new local ViewInformation2D
const geometry::ViewInformation2D aViewInformation2D(
- getViewInformation2D().getObjectTransformation(),
- getViewInformation2D().getViewTransformation(),
+ getViewInformation2D().getObjectTransformation(),
+ getViewInformation2D().getViewTransformation(),
getViewInformation2D().getViewport(),
rPagePreviewCandidate.getXDrawPage(),
getViewInformation2D().getViewTime(),
@@ -934,8 +946,8 @@ namespace drawinglayer
else
{
// else apply LineStyle
- basegfx::tools::applyLineDashing(rPolygonStrokeCandidate.getB2DPolygon(),
- rStrokeAttribute.getDotDashArray(),
+ basegfx::tools::applyLineDashing(rPolygonStrokeCandidate.getB2DPolygon(),
+ rStrokeAttribute.getDotDashArray(),
&aHairlinePolyPolygon, 0, rStrokeAttribute.getFullDotDashLen());
}
@@ -955,23 +967,23 @@ namespace drawinglayer
{
basegfx::B2DPolygon aCandidate(aHairlinePolyPolygon.getB2DPolygon(a));
mpOutputDevice->DrawPolyLine(aCandidate, 0.0);
-
+
aMat.set(0, 2, 1.0);
aMat.set(1, 2, 0.0);
aCandidate.transform(aMat);
-
+
mpOutputDevice->DrawPolyLine(aCandidate, 0.0);
-
+
aMat.set(0, 2, 0.0);
aMat.set(1, 2, 1.0);
aCandidate.transform(aMat);
-
+
mpOutputDevice->DrawPolyLine(aCandidate, 0.0);
-
+
aMat.set(0, 2, -1.0);
aMat.set(1, 2, 0.0);
aCandidate.transform(aMat);
-
+
mpOutputDevice->DrawPolyLine(aCandidate, 0.0);
}
}
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index b7923632b0..bb82fedfe7 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -8,7 +8,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: GenericCommands.xcu,v $
- * $Revision: 1.74 $
+ * $Revision: 1.72.24.2 $
*
* This file is part of OpenOffice.org.
*
@@ -1438,6 +1438,14 @@
<value>1</value>
</prop>
</node>
+ <node oor:name=".uno:Overline" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Overline</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
<node oor:name=".uno:HelpIndex" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">%PRODUCTNAME ~Help</value>
diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc
index cb55b87dc1..395cfe041c 100644
--- a/sfx2/inc/sfx2/sfxsids.hrc
+++ b/sfx2/inc/sfx2/sfxsids.hrc
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: sfxsids.hrc,v $
- * $Revision: 1.12.58.1 $
+ * $Revision: 1.12.104.1 $
*
* This file is part of OpenOffice.org.
*
@@ -1148,6 +1148,7 @@
#define SID_ATTR_CHAR_MAPTYPE (SID_SVX_START + 64)
// zusaetzlich f"ur die Ext-Zeichen-TabPage
#define SID_ATTR_CHAR_AUTOKERN (SID_SVX_START + 67)
+#define SID_ATTR_CHAR_OVERLINE (SID_SVX_START + 68)
#define SID_ZOOM_TOOLBOX (SID_SVX_START + 96)
#define SID_ZOOM_OUT (SID_SVX_START + 97)
#define SID_ZOOM_IN (SID_SVX_START + 98)
diff --git a/svx/inc/globlmn_tmpl.hrc b/svx/inc/globlmn_tmpl.hrc
index 3e9d3eab24..327bd45d53 100644
--- a/svx/inc/globlmn_tmpl.hrc
+++ b/svx/inc/globlmn_tmpl.hrc
@@ -1,13 +1,13 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: globlmn_tmpl.hrc,v $
- * $Revision: 1.11 $
+ * $Revision: 1.11.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -55,7 +55,7 @@
Command = ".uno:ChangeControlType" ; \
HelpID = SID_FM_CHANGECONTROLTYPE ; \
Text [ en-US ] = "~Replace with"; \
-
+
#define ITEM_FORMAT_TEMPLATECATALOG \
Identifier = SID_STYLE_CATALOG ; \
Command = ".uno:StyleCatalog" ; \
@@ -67,37 +67,37 @@
Command = ".uno:DesignerDialog" ; \
HelpID = SID_STYLE_DESIGNER ; \
Text [ en-US ] = "St~ylist" ; \
-
+
#define ITEM_FORMAT_AUTOFORMAT \
Identifier = SID_AUTOFORMAT ; \
Command = ".uno:AutoFormat" ; \
HelpID = SID_AUTOFORMAT ; \
Text [ en-US ] = "Auto~Format..." ;\
-
+
#define ITEM_FORMAT_CHAR_DLG \
Identifier = SID_CHAR_DLG ; \
Command = ".uno:FontDialog" ; \
HelpID = SID_CHAR_DLG ; \
Text [ en-US ] = "C~haracter..." ;\
-
+
#define ITEM_FORMAT_PARA_DLG \
Identifier = SID_PARA_DLG ; \
Command = ".uno:ParagraphDialog" ; \
HelpID = SID_PARA_DLG ; \
Text [ en-US ] = "P~aragraph..." ;\
-
+
#define ITEM_FORMAT_FONTWORK \
Identifier = SID_FONTWORK ; \
Command = ".uno:FontWork" ; \
HelpID = SID_FONTWORK ; \
Text [ en-US ] = "F~ontwork" ;\
-
+
#define ITEM_EDIT_CUT \
Identifier = SID_CUT ; \
Command = ".uno:Cut" ; \
HelpID = SID_CUT ; \
Text [ en-US ] = "Cu~t" ;\
-
+
#define ITEM_EDIT_COPY \
Identifier = SID_COPY ; \
Command = ".uno:Copy" ; \
@@ -115,37 +115,43 @@
Command = ".uno:CharFontName" ; \
HelpID = SID_ATTR_CHAR_FONT ; \
Text [ en-US ] = "Font" ;\
-
+
#define ITEM_FORMAT_ATTR_CHAR_FONTHEIGHT \
Identifier = SID_ATTR_CHAR_FONTHEIGHT ; \
Command = ".uno:FontHeight" ; \
HelpID = SID_ATTR_CHAR_FONTHEIGHT ; \
Text [ en-US ] = "Size" ;\
-
+
#define ITEM_FORMAT_ATTR_CHAR_WEIGHT \
Identifier = SID_ATTR_CHAR_WEIGHT ; \
Command = ".uno:Bold" ; \
HelpID = SID_ATTR_CHAR_WEIGHT ; \
Text [ en-US ] = "Bold" ; \
-
+
#define ITEM_FORMAT_ATTR_CHAR_POSTURE \
Identifier = SID_ATTR_CHAR_POSTURE ; \
Command = ".uno:Italic" ; \
HelpID = SID_ATTR_CHAR_POSTURE ; \
Text [ en-US ] = "Italic" ;\
-
+
#define ITEM_FORMAT_ATTR_CHAR_UNDERLINE \
Identifier = SID_ATTR_CHAR_UNDERLINE ; \
Command = ".uno:Underline" ; \
HelpID = SID_ATTR_CHAR_UNDERLINE ; \
Text [ en-US ] = "Underline" ;\
-
+
+#define ITEM_FORMAT_ATTR_CHAR_OVERLINE \
+ Identifier = SID_ATTR_CHAR_OVERLINE ; \
+ Command = ".uno:Overline" ; \
+ HelpID = SID_ATTR_CHAR_OVERLINE ; \
+ Text [ en-US ] = "Overline" ;\
+
#define ITEM_FORMAT_ATTR_CHAR_STRIKEOUT \
Identifier = SID_ATTR_CHAR_STRIKEOUT ; \
Command = ".uno:Strikeout" ; \
HelpID = SID_ATTR_CHAR_STRIKEOUT ; \
Text [ en-US ] = "Strikethrough" ;\
-
+
#define ITEM_FORMAT_ATTR_CHAR_SHADOWED \
Identifier = SID_ATTR_CHAR_SHADOWED ; \
Command = ".uno:Shadowed" ; \
@@ -174,7 +180,7 @@
Command = ".uno:LeftPara" ; \
HelpID = SID_ATTR_PARA_ADJUST_LEFT ; \
Text [ en-US ] = "~Left" ;\
-
+
#define ITEM_FORMAT_ATTR_PARA_ADJUST_RIGHT \
Identifier = SID_ATTR_PARA_ADJUST_RIGHT ; \
Command = ".uno:RightPara" ; \
diff --git a/svx/inc/svdstr.hrc b/svx/inc/svdstr.hrc
index e55b31db00..68a1eec5ee 100644
--- a/svx/inc/svdstr.hrc
+++ b/svx/inc/svdstr.hrc
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdstr.hrc,v $
- * $Revision: 1.18 $
+ * $Revision: 1.18.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -722,59 +722,60 @@
#define SIP_EE_CHAR_FONTWIDTH (SIP_Begin + 228)
#define SIP_EE_CHAR_WEIGHT (SIP_Begin + 229)
#define SIP_EE_CHAR_UNDERLINE (SIP_Begin + 230)
-#define SIP_EE_CHAR_STRIKEOUT (SIP_Begin + 231)
-#define SIP_EE_CHAR_ITALIC (SIP_Begin + 232)
-#define SIP_EE_CHAR_OUTLINE (SIP_Begin + 233)
-#define SIP_EE_CHAR_SHADOW (SIP_Begin + 234)
-#define SIP_EE_CHAR_ESCAPEMENT (SIP_Begin + 235)
-#define SIP_EE_CHAR_PAIRKERNING (SIP_Begin + 236)
-#define SIP_EE_CHAR_KERNING (SIP_Begin + 237)
-#define SIP_EE_CHAR_WLM (SIP_Begin + 238)
-#define SIP_EE_FEATURE_TAB (SIP_Begin + 239)
-#define SIP_EE_FEATURE_LINEBR (SIP_Begin + 240)
-#define SIP_EE_FEATURE_NOTCONV (SIP_Begin + 241)
-#define SIP_EE_FEATURE_FIELD (SIP_Begin + 242)
-
-#define SIP_SA_GRAFRED (SIP_Begin + 243)
-#define SIP_SA_GRAFGREEN (SIP_Begin + 244)
-#define SIP_SA_GRAFBLUE (SIP_Begin + 245)
-#define SIP_SA_GRAFLUMINANCE (SIP_Begin + 246)
-#define SIP_SA_GRAFCONTRAST (SIP_Begin + 247)
-#define SIP_SA_GRAFGAMMA (SIP_Begin + 248)
-#define SIP_SA_GRAFTRANSPARENCE (SIP_Begin + 249)
-#define SIP_SA_GRAFINVERT (SIP_Begin + 250)
-#define SIP_SA_GRAFMODE (SIP_Begin + 251)
-#define SIP_SA_GRAFCROP (SIP_Begin + 252)
-#define SIP_SA_GRAFRESERVE3 (SIP_Begin + 253)
-#define SIP_SA_GRAFRESERVE4 (SIP_Begin + 254)
-#define SIP_SA_GRAFRESERVE5 (SIP_Begin + 255)
-#define SIP_SA_GRAFRESERVE6 (SIP_Begin + 256)
-//BFS01#define SIP_SDRATTRSET_GRAF (SIP_Begin + 257)
+#define SIP_EE_CHAR_OVERLINE (SIP_Begin + 231)
+#define SIP_EE_CHAR_STRIKEOUT (SIP_Begin + 232)
+#define SIP_EE_CHAR_ITALIC (SIP_Begin + 233)
+#define SIP_EE_CHAR_OUTLINE (SIP_Begin + 234)
+#define SIP_EE_CHAR_SHADOW (SIP_Begin + 235)
+#define SIP_EE_CHAR_ESCAPEMENT (SIP_Begin + 236)
+#define SIP_EE_CHAR_PAIRKERNING (SIP_Begin + 237)
+#define SIP_EE_CHAR_KERNING (SIP_Begin + 238)
+#define SIP_EE_CHAR_WLM (SIP_Begin + 239)
+#define SIP_EE_FEATURE_TAB (SIP_Begin + 240)
+#define SIP_EE_FEATURE_LINEBR (SIP_Begin + 241)
+#define SIP_EE_FEATURE_NOTCONV (SIP_Begin + 242)
+#define SIP_EE_FEATURE_FIELD (SIP_Begin + 243)
+
+#define SIP_SA_GRAFRED (SIP_Begin + 244)
+#define SIP_SA_GRAFGREEN (SIP_Begin + 245)
+#define SIP_SA_GRAFBLUE (SIP_Begin + 246)
+#define SIP_SA_GRAFLUMINANCE (SIP_Begin + 247)
+#define SIP_SA_GRAFCONTRAST (SIP_Begin + 248)
+#define SIP_SA_GRAFGAMMA (SIP_Begin + 249)
+#define SIP_SA_GRAFTRANSPARENCE (SIP_Begin + 250)
+#define SIP_SA_GRAFINVERT (SIP_Begin + 251)
+#define SIP_SA_GRAFMODE (SIP_Begin + 252)
+#define SIP_SA_GRAFCROP (SIP_Begin + 253)
+#define SIP_SA_GRAFRESERVE3 (SIP_Begin + 254)
+#define SIP_SA_GRAFRESERVE4 (SIP_Begin + 255)
+#define SIP_SA_GRAFRESERVE5 (SIP_Begin + 256)
+#define SIP_SA_GRAFRESERVE6 (SIP_Begin + 257)
+//BFS01#define SIP_SDRATTRSET_GRAF (SIP_Begin + 258)
#define SIP_SA_MARKERS (SIP_Begin + 258)
-#define SIP_SA_FINE_MARKERS (SIP_Begin + 259)
+#define SIP_SA_FINE_MARKERS (SIP_Begin + 260)
// #100499#
-#define BMP_SVXOLEOBJ (SIP_Begin + 260)
+#define BMP_SVXOLEOBJ (SIP_Begin + 261)
// #101928#
-#define SIP_SA_ACCESSIBILITY_MARKERS (SIP_Begin + 261)
-
-#define STR_TABLE_ATTR (SIP_Begin + 262)
-#define STR_TABLE_AUTOFMT (SIP_Begin + 263)
-#define STR_TABLE_INSCOL (SIP_Begin + 264)
-#define STR_TABLE_INSROW (SIP_Begin + 265)
-#define STR_UNDO_COL_DELETE (SIP_Begin + 266)
-#define STR_UNDO_ROW_DELETE (SIP_Begin + 267)
-#define STR_TABLE_SPLIT (SIP_Begin + 268)
-#define STR_TABLE_MERGE (SIP_Begin + 269)
-#define STR_TABLE_NUMFORMAT (SIP_Begin + 270)
-#define STR_TABLE_DISTRIBUTE_ROWS (SIP_Begin + 271)
-#define STR_TABLE_DISTRIBUTE_COLUMNS (SIP_Begin + 272)
-#define STR_TABLE_STYLE (SIP_Begin + 273)
-#define STR_TABLE_STYLE_SETTINGS (SIP_Begin + 274)
-#define SIP_SA_CROP_MARKERS (SIP_Begin + 275)
-#define SIP_SA_CROP_FINE_MARKERS (SIP_Begin + 276)
+#define SIP_SA_ACCESSIBILITY_MARKERS (SIP_Begin + 262)
+
+#define STR_TABLE_ATTR (SIP_Begin + 263)
+#define STR_TABLE_AUTOFMT (SIP_Begin + 264)
+#define STR_TABLE_INSCOL (SIP_Begin + 265)
+#define STR_TABLE_INSROW (SIP_Begin + 266)
+#define STR_UNDO_COL_DELETE (SIP_Begin + 267)
+#define STR_UNDO_ROW_DELETE (SIP_Begin + 268)
+#define STR_TABLE_SPLIT (SIP_Begin + 269)
+#define STR_TABLE_MERGE (SIP_Begin + 270)
+#define STR_TABLE_NUMFORMAT (SIP_Begin + 271)
+#define STR_TABLE_DISTRIBUTE_ROWS (SIP_Begin + 272)
+#define STR_TABLE_DISTRIBUTE_COLUMNS (SIP_Begin + 273)
+#define STR_TABLE_STYLE (SIP_Begin + 274)
+#define STR_TABLE_STYLE_SETTINGS (SIP_Begin + 275)
+#define SIP_SA_CROP_MARKERS (SIP_Begin + 276)
+#define SIP_SA_CROP_FINE_MARKERS (SIP_Begin + 277)
#define SIP_SA_ACCESSIBILITY_CROP_MARKERS (SIP_Begin + 278)
#define SIP_End (SIP_SA_ACCESSIBILITY_CROP_MARKERS)
@@ -783,5 +784,3 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
-
-
diff --git a/svx/inc/svx/editeng.hxx b/svx/inc/svx/editeng.hxx
index 8502d26bbf..7f7cfea42b 100644
--- a/svx/inc/svx/editeng.hxx
+++ b/svx/inc/svx/editeng.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -432,7 +432,7 @@ public:
// #101498#
virtual void DrawingText(
- const Point& rStartPos, const String& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray,
+ const Point& rStartPos, const String& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray,
const SvxFont& rFont, USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft,
const EEngineData::WrongSpellVector* pWrongSpellVector,
const SvxFieldData* pFieldData,
@@ -440,6 +440,7 @@ public:
bool bEndOfParagraph,
bool bEndOfBullet,
const ::com::sun::star::lang::Locale* pLocale,
+ const Color& rOverlineColor,
const Color& rTextLineColor);
virtual String GetUndoComment( USHORT nUndoId ) const;
@@ -448,7 +449,7 @@ public:
virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos );
virtual void FieldSelected( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos );
virtual String CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor );
-
+
// to be overloaded if access to bullet information needs to be provided
virtual const SvxNumberFormat * GetNumberFormat( USHORT nPara ) const;
diff --git a/svx/inc/svx/eeitem.hxx b/svx/inc/svx/eeitem.hxx
index d0b06b7e69..e828c91d08 100644
--- a/svx/inc/svx/eeitem.hxx
+++ b/svx/inc/svx/eeitem.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: eeitem.hxx,v $
- * $Revision: 1.3 $
+ * $Revision: 1.3.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -84,17 +84,18 @@
#define EE_CHAR_RELIEF (EE_ITEMS_START+42)
#define EE_CHAR_RUBI_DUMMY (EE_ITEMS_START+43)
#define EE_CHAR_XMLATTRIBS (EE_ITEMS_START+44)
-#define EE_CHAR_END (EE_ITEMS_START+44)
+#define EE_CHAR_OVERLINE (EE_ITEMS_START+45)
+#define EE_CHAR_END (EE_ITEMS_START+45)
-#define EE_FEATURE_START (EE_ITEMS_START+45)
-#define EE_FEATURE_TAB (EE_ITEMS_START+45)
-#define EE_FEATURE_LINEBR (EE_ITEMS_START+46)
-#define EE_FEATURE_NOTCONV (EE_ITEMS_START+47)
-#define EE_FEATURE_FIELD (EE_ITEMS_START+48)
-#define EE_FEATURE_END (EE_ITEMS_START+48)
+#define EE_FEATURE_START (EE_ITEMS_START+46)
+#define EE_FEATURE_TAB (EE_ITEMS_START+46)
+#define EE_FEATURE_LINEBR (EE_ITEMS_START+47)
+#define EE_FEATURE_NOTCONV (EE_ITEMS_START+48)
+#define EE_FEATURE_FIELD (EE_ITEMS_START+49)
+#define EE_FEATURE_END (EE_ITEMS_START+49)
-#define EE_ITEMS_END (EE_ITEMS_START+48)
+#define EE_ITEMS_END (EE_ITEMS_START+49)
#define EDITITEMCOUNT ( EE_ITEMS_END - EE_ITEMS_START + 1 )
diff --git a/svx/inc/svx/eeitemid.hxx b/svx/inc/svx/eeitemid.hxx
index 63b5959b9f..b66675eeb3 100644
--- a/svx/inc/svx/eeitemid.hxx
+++ b/svx/inc/svx/eeitemid.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: eeitemid.hxx,v $
- * $Revision: 1.3 $
+ * $Revision: 1.3.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -60,6 +60,9 @@
#ifdef ITEMID_UNDERLINE
#undef ITEMID_UNDERLINE
#endif
+#ifdef ITEMID_OVERLINE
+#undef ITEMID_OVERLINE
+#endif
#ifdef ITEMID_LANGUAGE
#undef ITEMID_LANGUAGE
#endif
@@ -87,6 +90,7 @@
#define ITEMID_CONTOUR EE_CHAR_OUTLINE
#define ITEMID_CROSSEDOUT EE_CHAR_STRIKEOUT
#define ITEMID_UNDERLINE EE_CHAR_UNDERLINE
+#define ITEMID_OVERLINE EE_CHAR_OVERLINE
#define ITEMID_FONTHEIGHT EE_CHAR_FONTHEIGHT
#define ITEMID_CHARSCALE_W EE_CHAR_FONTWIDTH
#define ITEMID_COLOR EE_CHAR_COLOR
diff --git a/svx/inc/svx/outliner.hxx b/svx/inc/svx/outliner.hxx
index b8dafdcaef..6ec0054dcd 100644
--- a/svx/inc/svx/outliner.hxx
+++ b/svx/inc/svx/outliner.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -431,6 +431,7 @@ public:
const EEngineData::WrongSpellVector* mpWrongSpellVector;
const SvxFieldData* mpFieldData;
const ::com::sun::star::lang::Locale* mpLocale;
+ const Color maOverlineColor;
const Color maTextLineColor;
// #101498# BiDi level needs to be transported, too.
@@ -444,34 +445,36 @@ public:
BYTE GetBiDiLevel() const { return mnBiDiLevel; }
sal_Bool IsRTL() const;
- DrawPortionInfo(
- const Point& rPos,
- const String& rTxt,
- sal_uInt16 nTxtStart,
+ DrawPortionInfo(
+ const Point& rPos,
+ const String& rTxt,
+ sal_uInt16 nTxtStart,
sal_uInt16 nTxtLen,
- const SvxFont& rFnt,
- sal_uInt16 nPar,
- xub_StrLen nIdx,
- const sal_Int32* pDXArr,
- const EEngineData::WrongSpellVector* pWrongSpellVector,
+ const SvxFont& rFnt,
+ sal_uInt16 nPar,
+ xub_StrLen nIdx,
+ const sal_Int32* pDXArr,
+ const EEngineData::WrongSpellVector* pWrongSpellVector,
const SvxFieldData* pFieldData,
const ::com::sun::star::lang::Locale* pLocale,
+ const Color& rOverlineColor,
const Color& rTextLineColor,
BYTE nBiDiLevel,
bool bEndOfLine,
bool bEndOfParagraph,
bool bEndOfBullet)
- : mrStartPos(rPos),
+ : mrStartPos(rPos),
mrText(rTxt),
mnTextStart(nTxtStart),
mnTextLen(nTxtLen),
- mnPara(nPar),
+ mnPara(nPar),
mnIndex(nIdx),
- mrFont(rFnt),
- mpDXArray(pDXArr),
+ mrFont(rFnt),
+ mpDXArray(pDXArr),
mpWrongSpellVector(pWrongSpellVector),
mpFieldData(pFieldData),
mpLocale(pLocale),
+ maOverlineColor(rOverlineColor),
maTextLineColor(rTextLineColor),
mnBiDiLevel(nBiDiLevel),
mbEndOfLine(bEndOfLine),
@@ -702,8 +705,8 @@ protected:
const Point& rOrigin, short nOrientation,
OutputDevice* pOutDev );
- // used by OutlinerEditEng. Allows Outliner objects to provide
- // bullet access to the EditEngine.
+ // used by OutlinerEditEng. Allows Outliner objects to provide
+ // bullet access to the EditEngine.
virtual const SvxNumberFormat* GetNumberFormat( USHORT nPara ) const;
public:
@@ -895,7 +898,7 @@ public:
void StripPortions();
// #101498#
- virtual void DrawingText(
+ virtual void DrawingText(
const Point& rStartPos, const String& rText, USHORT nTextStart, USHORT nTextLen,
const sal_Int32* pDXArray, const SvxFont& rFont, USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft,
const EEngineData::WrongSpellVector* pWrongSpellVector,
@@ -904,6 +907,7 @@ public:
bool bEndOfParagraph,
bool bEndOfBullet,
const ::com::sun::star::lang::Locale* pLocale,
+ const Color& rOverlineColor,
const Color& rTextLineColor);
Size CalcTextSize();
diff --git a/svx/inc/svx/svxitems.hrc b/svx/inc/svx/svxitems.hrc
index 67593632b9..8974d9f29a 100644
--- a/svx/inc/svx/svxitems.hrc
+++ b/svx/inc/svx/svxitems.hrc
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svxitems.hrc,v $
- * $Revision: 1.3 $
+ * $Revision: 1.3.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -211,7 +211,7 @@
#define RID_SVXITEMS_ESCAPEMENT_SUB (RID_SVXITEMS_START + 168)
#define RID_SVXITEMS_ESCAPEMENT_AUTO (RID_SVXITEMS_START + 169)
-// enum FontUnderline ----------------------------------------------------
+// enum FontUnderline - used for underline -------------------------------
#define RID_SVXITEMS_UL_BEGIN (RID_SVXITEMS_START + 170)
#define RID_SVXITEMS_UL_NONE (RID_SVXITEMS_START + 170)
#define RID_SVXITEMS_UL_SINGLE (RID_SVXITEMS_START + 171)
@@ -233,6 +233,28 @@
#define RID_SVXITEMS_UL_BOLDDASHDOTDOT (RID_SVXITEMS_START + 187)
#define RID_SVXITEMS_UL_BOLDWAVE (RID_SVXITEMS_START + 188)
+// enum FontUnderline - used for overline --------------------------------
+#define RID_SVXITEMS_OL_BEGIN (RID_SVXITEMS_START + 200)
+#define RID_SVXITEMS_OL_NONE (RID_SVXITEMS_START + 200)
+#define RID_SVXITEMS_OL_SINGLE (RID_SVXITEMS_START + 201)
+#define RID_SVXITEMS_OL_DOUBLE (RID_SVXITEMS_START + 202)
+#define RID_SVXITEMS_OL_DOTTED (RID_SVXITEMS_START + 203)
+#define RID_SVXITEMS_OL_DONTKNOW (RID_SVXITEMS_START + 204)
+#define RID_SVXITEMS_OL_DASH (RID_SVXITEMS_START + 205)
+#define RID_SVXITEMS_OL_LONGDASH (RID_SVXITEMS_START + 206)
+#define RID_SVXITEMS_OL_DASHDOT (RID_SVXITEMS_START + 207)
+#define RID_SVXITEMS_OL_DASHDOTDOT (RID_SVXITEMS_START + 208)
+#define RID_SVXITEMS_OL_SMALLWAVE (RID_SVXITEMS_START + 209)
+#define RID_SVXITEMS_OL_WAVE (RID_SVXITEMS_START + 210)
+#define RID_SVXITEMS_OL_DOUBLEWAVE (RID_SVXITEMS_START + 211)
+#define RID_SVXITEMS_OL_BOLD (RID_SVXITEMS_START + 212)
+#define RID_SVXITEMS_OL_BOLDDOTTED (RID_SVXITEMS_START + 213)
+#define RID_SVXITEMS_OL_BOLDDASH (RID_SVXITEMS_START + 214)
+#define RID_SVXITEMS_OL_BOLDLONGDASH (RID_SVXITEMS_START + 215)
+#define RID_SVXITEMS_OL_BOLDDASHDOT (RID_SVXITEMS_START + 216)
+#define RID_SVXITEMS_OL_BOLDDASHDOTDOT (RID_SVXITEMS_START + 217)
+#define RID_SVXITEMS_OL_BOLDWAVE (RID_SVXITEMS_START + 218)
+
// enum SvxAdjust -----------------------------------------------------------
#define RID_SVXITEMS_ADJUST_BEGIN (RID_SVXITEMS_START + 230)
#define RID_SVXITEMS_ADJUST_LEFT (RID_SVXITEMS_START + 230)
@@ -322,6 +344,7 @@
#define RID_ATTR_PARA_KEEP (RID_ATTR_BEGIN + 66)
#define RID_ATTR_CHAR_BLINK (RID_ATTR_BEGIN + 67)
#define RID_ATTR_CHAR_CHARSETCOLOR (RID_ATTR_BEGIN + 68)
+#define RID_ATTR_CHAR_OVERLINE (RID_ATTR_BEGIN + 69)
#define RID_ATTR_FLASH (RID_ATTR_BEGIN + 406)
#define RID_ATTR_PARA_REGISTER (RID_ATTR_BEGIN + 413)
diff --git a/svx/inc/svx/udlnitem.hxx b/svx/inc/svx/udlnitem.hxx
index 6b163919f2..d46f51322f 100644
--- a/svx/inc/svx/udlnitem.hxx
+++ b/svx/inc/svx/udlnitem.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: udlnitem.hxx,v $
- * $Revision: 1.4 $
+ * $Revision: 1.4.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -46,21 +46,18 @@ namespace rtl
class OUString;
}
-// class SvxUnderlineItem ------------------------------------------------
-
-/* [Beschreibung]
+// class SvxTextLineItem ------------------------------------------------
- Dieses Item beschreibt, ob und wie unterstrichen ist.
-*/
+/* Value container for underline and overline font effects */
-class SVX_DLLPUBLIC SvxUnderlineItem : public SfxEnumItem
+class SVX_DLLPUBLIC SvxTextLineItem : public SfxEnumItem
{
Color mColor;
public:
TYPEINFO();
- SvxUnderlineItem( const FontUnderline eSt /*= UNDERLINE_NONE*/,
- const USHORT nId );
+ SvxTextLineItem( const FontUnderline eSt,
+ const USHORT nId );
// "pure virtual Methoden" vom SfxPoolItem
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -86,24 +83,57 @@ public:
virtual BOOL GetBoolValue() const;
virtual void SetBoolValue( BOOL bVal );
- virtual int operator==( const SfxPoolItem& ) const;
+ virtual int operator==( const SfxPoolItem& ) const;
- inline SvxUnderlineItem& operator=(const SvxUnderlineItem& rUnderline)
+ inline SvxTextLineItem& operator=(const SvxTextLineItem& rTextLine)
{
- SetValue( rUnderline.GetValue() );
- SetColor( rUnderline.GetColor() );
+ SetValue( rTextLine.GetValue() );
+ SetColor( rTextLine.GetColor() );
return *this;
}
// enum cast
- FontUnderline GetUnderline() const
+ FontUnderline GetLineStyle() const
{ return (FontUnderline)GetValue(); }
- void SetUnderline ( FontUnderline eNew )
+ void SetLineStyle( FontUnderline eNew )
{ SetValue((USHORT) eNew); }
const Color& GetColor() const { return mColor; }
void SetColor( const Color& rCol ) { mColor = rCol; }
};
-#endif // #ifndef _SVX_UDLNITEM_HXX
+// class SvxUnderlineItem ------------------------------------------------
+
+/* Value container for underline font effects */
+
+class SVX_DLLPUBLIC SvxUnderlineItem : public SvxTextLineItem
+{
+public:
+ TYPEINFO();
+
+ SvxUnderlineItem( const FontUnderline eSt,
+ const USHORT nId );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual String GetValueTextByPos( USHORT nPos ) const;
+};
+
+// class SvxOverlineItem ------------------------------------------------
+
+/* Value container for overline font effects */
+
+class SVX_DLLPUBLIC SvxOverlineItem : public SvxTextLineItem
+{
+public:
+ TYPEINFO();
+ SvxOverlineItem( const FontUnderline eSt,
+ const USHORT nId );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual String GetValueTextByPos( USHORT nPos ) const;
+};
+
+#endif // #ifndef _SVX_UDLNITEM_HXX
diff --git a/svx/inc/svx/unomid.hxx b/svx/inc/svx/unomid.hxx
index 19f44d48b4..0a0328b924 100644
--- a/svx/inc/svx/unomid.hxx
+++ b/svx/inc/svx/unomid.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: unomid.hxx,v $
- * $Revision: 1.3 $
+ * $Revision: 1.3.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -68,11 +68,11 @@
#define MID_FONTWIDTH 0
#define MID_FONTWIDTH_PROP 1
-//SvxUnderlineItem
-#define MID_UNDERLINED 0
-#define MID_UNDERLINE 1
-#define MID_UL_COLOR 2
-#define MID_UL_HASCOLOR 3
+//SvxTextLineItem
+#define MID_TEXTLINED 0
+#define MID_TL_STYLE 1
+#define MID_TL_COLOR 2
+#define MID_TL_HASCOLOR 3
//SvxCrossedOutItem
#define MID_CROSSED_OUT 0
diff --git a/svx/inc/svx/unoprnms.hxx b/svx/inc/svx/unoprnms.hxx
index 3ebc8d8702..541c2f5577 100644
--- a/svx/inc/svx/unoprnms.hxx
+++ b/svx/inc/svx/unoprnms.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: unoprnms.hxx,v $
- * $Revision: 1.4 $
+ * $Revision: 1.4.148.1 $
*
* This file is part of OpenOffice.org.
*
@@ -340,6 +340,7 @@
#define UNO_NAME_EDIT_CHAR_FONTNAME "CharFontName"
#define UNO_NAME_EDIT_CHAR_SHADOWED "CharShadowed"
#define UNO_NAME_EDIT_CHAR_UNDERLINE "CharUnderline"
+#define UNO_NAME_EDIT_CHAR_OVERLINE "CharOverline"
#define UNO_NAME_BITMAP "Bitmap"
diff --git a/svx/inc/svx/unotext.hxx b/svx/inc/svx/unotext.hxx
index 921e3cefaf..c876211eaa 100644
--- a/svx/inc/svx/unotext.hxx
+++ b/svx/inc/svx/unotext.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: unotext.hxx,v $
- * $Revision: 1.6 $
+ * $Revision: 1.6.84.1 $
*
* This file is part of OpenOffice.org.
*
@@ -114,9 +114,12 @@
{ MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_LOCALE), EE_CHAR_LANGUAGE, &::getCppuType((const ::com::sun::star::lang::Locale*)0),0, MID_LANG_LOCALE }, \
{ MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_COLOR), EE_CHAR_COLOR, &::getCppuType((const sal_Int32*)0), 0, 0 }, \
{ MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_ESCAPEMENT), EE_CHAR_ESCAPEMENT, &::getCppuType((const sal_Int16*)0), 0, MID_ESC }, \
- { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_UNDERLINE), EE_CHAR_UNDERLINE, &::getCppuType((const sal_Int16*)0), 0, MID_UNDERLINE }, \
- { MAP_CHAR_LEN("CharUnderlineColor"), EE_CHAR_UNDERLINE, &::getCppuType((const sal_Int32*)0), 0, MID_UL_COLOR }, \
- { MAP_CHAR_LEN("CharUnderlineHasColor"), EE_CHAR_UNDERLINE, &::getBooleanCppuType(), 0, MID_UL_HASCOLOR } , \
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_UNDERLINE), EE_CHAR_UNDERLINE, &::getCppuType((const sal_Int16*)0), 0, MID_TL_STYLE }, \
+ { MAP_CHAR_LEN("CharUnderlineColor"), EE_CHAR_UNDERLINE, &::getCppuType((const sal_Int32*)0), 0, MID_TL_COLOR }, \
+ { MAP_CHAR_LEN("CharUnderlineHasColor"), EE_CHAR_UNDERLINE, &::getBooleanCppuType(), 0, MID_TL_HASCOLOR } , \
+ { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_OVERLINE), EE_CHAR_OVERLINE, &::getCppuType((const sal_Int16*)0), 0, MID_TL_STYLE }, \
+ { MAP_CHAR_LEN("CharOverlineColor"), EE_CHAR_OVERLINE, &::getCppuType((const sal_Int32*)0), 0, MID_TL_COLOR }, \
+ { MAP_CHAR_LEN("CharOverlineHasColor"), EE_CHAR_OVERLINE, &::getBooleanCppuType(), 0, MID_TL_HASCOLOR } , \
{ MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_CROSSEDOUT), EE_CHAR_STRIKEOUT, &::getBooleanCppuType(), 0, MID_CROSSED_OUT }, \
{ MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_STRIKEOUT), EE_CHAR_STRIKEOUT, &::getCppuType((const sal_Int16*)0), 0, MID_CROSS_OUT}, \
{ MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_SHADOWED), EE_CHAR_SHADOW, &::getBooleanCppuType(), 0, 0 }, \
diff --git a/svx/inc/svxrtf.hxx b/svx/inc/svxrtf.hxx
index 100c9b8461..3f0435b309 100644
--- a/svx/inc/svxrtf.hxx
+++ b/svx/inc/svxrtf.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svxrtf.hxx,v $
- * $Revision: 1.24 $
+ * $Revision: 1.24.208.1 $
*
* This file is part of OpenOffice.org.
*
@@ -165,6 +165,7 @@ struct RTFPlainAttrMapIds
nPosture,
nShadowed,
nUnderline,
+ nOverline,
nWeight,
nWordlineMode,
nAutoKerning,
diff --git a/svx/sdi/fmslots.sdi b/svx/sdi/fmslots.sdi
index 8a522f822c..4829c2889f 100644
--- a/svx/sdi/fmslots.sdi
+++ b/svx/sdi/fmslots.sdi
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: fmslots.sdi,v $
- * $Revision: 1.16 $
+ * $Revision: 1.15.212.2 $
*
* This file is part of OpenOffice.org.
*
@@ -420,6 +420,11 @@ interface FormTextAttributeShell
ExecMethod = ExecuteTextAttribute;
StateMethod = GetTextAttributeState;
]
+ SID_ATTR_CHAR_OVERLINE
+ [
+ ExecMethod = ExecuteTextAttribute;
+ StateMethod = GetTextAttributeState;
+ ]
SID_ATTR_CHAR_WEIGHT
[
ExecMethod = ExecuteTextAttribute;
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index f1cd135a53..9c967eb77d 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -10996,7 +10996,34 @@ SfxVoidItem TwainTransfer SID_TWAIN_TRANSFER
]
//--------------------------------------------------------------------------
-SvxUnderlineItem Underline SID_ATTR_CHAR_UNDERLINE
+SvxTextLineItem Underline SID_ATTR_CHAR_UNDERLINE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SvxTextLineItem Overline SID_ATTR_CHAR_OVERLINE
[
/* flags: */
diff --git a/svx/sdi/svxitems.sdi b/svx/sdi/svxitems.sdi
index 23e5d47769..9650864679 100644
--- a/svx/sdi/svxitems.sdi
+++ b/svx/sdi/svxitems.sdi
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svxitems.sdi,v $
- * $Revision: 1.32 $
+ * $Revision: 1.32.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -426,13 +426,13 @@ struct SvxCrossedOut
};
item SvxCrossedOut SvxCrossedOutItem;
-struct SvxUnderline
+struct SvxTextLine
{
- FontUnderline Underline MID_UNDERLINE;
- BOOL HasColor MID_UL_HASCOLOR;
- INT32 Color MID_UL_COLOR;
+ FontUnderline LineStyle MID_TL_STYLE;
+ BOOL HasColor MID_TL_HASCOLOR;
+ INT32 Color MID_TL_COLOR;
};
-item SvxUnderline SvxUnderlineItem;
+item SvxTextLine SvxTextLineItem;
struct SvxBrush
{
diff --git a/svx/source/dialog/chardlg.cxx b/svx/source/dialog/chardlg.cxx
index b41b180dfc..b8c8ba4db4 100644
--- a/svx/source/dialog/chardlg.cxx
+++ b/svx/source/dialog/chardlg.cxx
@@ -1,13 +1,13 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: chardlg.cxx,v $
- * $Revision: 1.102.88.2 $
+ * $Revision: 1.102.148.1 $
*
* This file is part of OpenOffice.org.
*
@@ -169,6 +169,8 @@ static USHORT pEffectsRanges[] =
SID_ATTR_CHAR_RELIEF,
SID_ATTR_CHAR_HIDDEN,
SID_ATTR_CHAR_HIDDEN,
+ SID_ATTR_CHAR_OVERLINE,
+ SID_ATTR_CHAR_OVERLINE,
0
};
@@ -275,6 +277,22 @@ void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet )
rCJKFont.SetUnderline( eUnderline );
rCTLFont.SetUnderline( eUnderline );
+ // Overline
+ FontUnderline eOverline;
+ nWhich = GetWhich( SID_ATTR_CHAR_OVERLINE );
+ if( ISITEMSET )
+ {
+ const SvxOverlineItem& rItem = ( SvxOverlineItem& ) rSet.Get( nWhich );
+ eOverline = ( FontUnderline ) rItem.GetValue();
+ m_aPreviewWin.SetOverlineColor( rItem.GetColor() );
+ }
+ else
+ eOverline = UNDERLINE_NONE;
+
+ rFont.SetOverline( eOverline );
+ rCJKFont.SetOverline( eOverline );
+ rCTLFont.SetOverline( eOverline );
+
// Strikeout
FontStrikeout eStrikeout;
nWhich = GetWhich( SID_ATTR_CHAR_STRIKEOUT );
@@ -1778,17 +1796,6 @@ SvxCharEffectsPage::SvxCharEffectsPage( Window* pParent, const SfxItemSet& rInSe
SvxCharBasePage( pParent, SVX_RES( RID_SVXPAGE_CHAR_EFFECTS ), rInSet, WIN_EFFECTS_PREVIEW, FT_EFFECTS_FONTTYPE ),
- m_aUnderlineFT ( this, SVX_RES( FT_UNDERLINE ) ),
- m_aUnderlineLB ( this, SVX_RES( LB_UNDERLINE ) ),
- m_aColorFT ( this, SVX_RES( FT_UNDERLINE_COLOR ) ),
- m_aColorLB ( this, SVX_RES( LB_UNDERLINE_COLOR ) ),
- m_aStrikeoutFT ( this, SVX_RES( FT_STRIKEOUT ) ),
- m_aStrikeoutLB ( this, SVX_RES( LB_STRIKEOUT ) ),
- m_aIndividualWordsBtn ( this, SVX_RES( CB_INDIVIDUALWORDS ) ),
- m_aEmphasisFT ( this, SVX_RES( FT_EMPHASIS ) ),
- m_aEmphasisLB ( this, SVX_RES( LB_EMPHASIS ) ),
- m_aPositionFT ( this, SVX_RES( FT_POSITION ) ),
- m_aPositionLB ( this, SVX_RES( LB_POSITION ) ),
m_aFontColorFT ( this, SVX_RES( FT_FONTCOLOR ) ),
m_aFontColorLB ( this, SVX_RES( LB_FONTCOLOR ) ),
@@ -1805,6 +1812,27 @@ SvxCharEffectsPage::SvxCharEffectsPage( Window* pParent, const SfxItemSet& rInSe
m_aBlinkingBtn ( this, SVX_RES( CB_BLINKING ) ),
m_aHiddenBtn ( this, SVX_RES( CB_CHARHIDDEN ) ),
+ m_aVerticalLine ( this, SVX_RES( FL_EFFECTS_VERTICAL ) ),
+
+ m_aOverlineFT ( this, SVX_RES( FT_OVERLINE ) ),
+ m_aOverlineLB ( this, SVX_RES( LB_OVERLINE ) ),
+ m_aOverlineColorFT ( this, SVX_RES( FT_OVERLINE_COLOR ) ),
+ m_aOverlineColorLB ( this, SVX_RES( LB_OVERLINE_COLOR ) ),
+ m_aStrikeoutFT ( this, SVX_RES( FT_STRIKEOUT ) ),
+ m_aStrikeoutLB ( this, SVX_RES( LB_STRIKEOUT ) ),
+ m_aUnderlineFT ( this, SVX_RES( FT_UNDERLINE ) ),
+ m_aUnderlineLB ( this, SVX_RES( LB_UNDERLINE ) ),
+ m_aUnderlineColorFT ( this, SVX_RES( FT_UNDERLINE_COLOR ) ),
+ m_aUnderlineColorLB ( this, SVX_RES( LB_UNDERLINE_COLOR ) ),
+ m_aIndividualWordsBtn ( this, SVX_RES( CB_INDIVIDUALWORDS ) ),
+
+ m_aAsianLine ( this, SVX_RES( FL_EFFECTS_ASIAN ) ),
+
+ m_aEmphasisFT ( this, SVX_RES( FT_EMPHASIS ) ),
+ m_aEmphasisLB ( this, SVX_RES( LB_EMPHASIS ) ),
+ m_aPositionFT ( this, SVX_RES( FT_POSITION ) ),
+ m_aPositionLB ( this, SVX_RES( LB_POSITION ) ),
+
m_aTransparentColorName ( SVX_RES( STR_CHARNAME_TRANSPARENT ) )
{
@@ -1853,7 +1881,8 @@ void SvxCharEffectsPage::Initialize()
bKillTable = TRUE;
}
- m_aColorLB.SetUpdateMode( FALSE );
+ m_aUnderlineColorLB.SetUpdateMode( FALSE );
+ m_aOverlineColorLB.SetUpdateMode( FALSE );
m_aFontColorLB.SetUpdateMode( FALSE );
{
@@ -1862,18 +1891,21 @@ void SvxCharEffectsPage::Initialize()
if ( !pFrame ||
SFX_ITEM_DEFAULT > pFrame->GetBindings().QueryState( SID_ATTR_AUTO_COLOR_INVALID, pDummy ) )
{
- m_aColorLB.InsertAutomaticEntry();
+ m_aUnderlineColorLB.InsertAutomaticEntry();
+ m_aOverlineColorLB.InsertAutomaticEntry();
m_aFontColorLB.InsertAutomaticEntry();
}
}
for ( long i = 0; i < pColorTable->Count(); i++ )
{
XColorEntry* pEntry = pColorTable->GetColor(i);
- m_aColorLB.InsertEntry( pEntry->GetColor(), pEntry->GetName() );
+ m_aUnderlineColorLB.InsertEntry( pEntry->GetColor(), pEntry->GetName() );
+ m_aOverlineColorLB.InsertEntry( pEntry->GetColor(), pEntry->GetName() );
m_aFontColorLB.InsertEntry( pEntry->GetColor(), pEntry->GetName() );
}
- m_aColorLB.SetUpdateMode( TRUE );
+ m_aUnderlineColorLB.SetUpdateMode( TRUE );
+ m_aOverlineColorLB.SetUpdateMode( TRUE );
m_aFontColorLB.SetUpdateMode( TRUE );
m_aFontColorLB.SetSelectHdl( LINK( this, SvxCharEffectsPage, ColorBoxSelectHdl_Impl ) );
@@ -1883,18 +1915,22 @@ void SvxCharEffectsPage::Initialize()
// handler
Link aLink = LINK( this, SvxCharEffectsPage, SelectHdl_Impl );
m_aUnderlineLB.SetSelectHdl( aLink );
+ m_aUnderlineColorLB.SetSelectHdl( aLink );
+ m_aOverlineLB.SetSelectHdl( aLink );
+ m_aOverlineColorLB.SetSelectHdl( aLink );
m_aStrikeoutLB.SetSelectHdl( aLink );
m_aEmphasisLB.SetSelectHdl( aLink );
m_aPositionLB.SetSelectHdl( aLink );
m_aEffects2LB.SetSelectHdl( aLink );
m_aReliefLB.SetSelectHdl( aLink );
- m_aColorLB.SetSelectHdl( aLink );
m_aUnderlineLB.SelectEntryPos( 0 );
+ m_aUnderlineColorLB.SelectEntryPos( 0 );
+ m_aOverlineLB.SelectEntryPos( 0 );
+ m_aOverlineColorLB.SelectEntryPos( 0 );
m_aStrikeoutLB.SelectEntryPos( 0 );
m_aEmphasisLB.SelectEntryPos( 0 );
m_aPositionLB.SelectEntryPos( 0 );
- m_aColorLB.SelectEntryPos( 0 );
SelectHdl_Impl( NULL );
SelectHdl_Impl( &m_aEmphasisLB );
@@ -1907,13 +1943,11 @@ void SvxCharEffectsPage::Initialize()
if ( !SvtLanguageOptions().IsAsianTypographyEnabled() )
{
+ m_aAsianLine.Hide();
m_aEmphasisFT.Hide();
m_aEmphasisLB.Hide();
m_aPositionFT.Hide();
m_aPositionLB.Hide();
-
- m_aFontColorFT.SetPosPixel( m_aEmphasisFT.GetPosPixel() );
- m_aFontColorLB.SetPosPixel( m_aEmphasisLB.GetPosPixel() );
}
}
// -----------------------------------------------------------------------
@@ -1926,13 +1960,18 @@ void SvxCharEffectsPage::UpdatePreview_Impl()
USHORT nPos = m_aUnderlineLB.GetSelectEntryPos();
FontUnderline eUnderline = (FontUnderline)(ULONG)m_aUnderlineLB.GetEntryData( nPos );
+ nPos = m_aOverlineLB.GetSelectEntryPos();
+ FontUnderline eOverline = (FontUnderline)(ULONG)m_aOverlineLB.GetEntryData( nPos );
nPos = m_aStrikeoutLB.GetSelectEntryPos();
FontStrikeout eStrikeout = (FontStrikeout)(ULONG)m_aStrikeoutLB.GetEntryData( nPos );
rFont.SetUnderline( eUnderline );
rCJKFont.SetUnderline( eUnderline );
rCTLFont.SetUnderline( eUnderline );
-
- m_aPreviewWin.SetTextLineColor( m_aColorLB.GetSelectEntryColor() );
+ m_aPreviewWin.SetTextLineColor( m_aUnderlineColorLB.GetSelectEntryColor() );
+ rFont.SetOverline( eOverline );
+ rCJKFont.SetOverline( eOverline );
+ rCTLFont.SetOverline( eOverline );
+ m_aPreviewWin.SetOverlineColor( m_aOverlineColorLB.GetSelectEntryColor() );
rFont.SetStrikeout( eStrikeout );
rCJKFont.SetStrikeout( eStrikeout );
rCTLFont.SetStrikeout( eStrikeout );
@@ -2112,11 +2151,16 @@ IMPL_LINK( SvxCharEffectsPage, SelectHdl_Impl, ListBox*, pBox )
}
else if ( &m_aPositionLB != pBox )
{
- USHORT nUPos = m_aUnderlineLB.GetSelectEntryPos(), nSPos = m_aStrikeoutLB.GetSelectEntryPos();
- BOOL bEnable = ( nUPos > 0 && nUPos != LISTBOX_ENTRY_NOTFOUND );
- m_aColorFT.Enable( bEnable );
- m_aColorLB.Enable( bEnable );
- m_aIndividualWordsBtn.Enable( bEnable || ( nSPos > 0 && nSPos != LISTBOX_ENTRY_NOTFOUND ) );
+ USHORT nUPos = m_aUnderlineLB.GetSelectEntryPos(),
+ nOPos = m_aOverlineLB.GetSelectEntryPos(),
+ nSPos = m_aStrikeoutLB.GetSelectEntryPos();
+ BOOL bUEnable = ( nUPos > 0 && nUPos != LISTBOX_ENTRY_NOTFOUND );
+ BOOL bOEnable = ( nOPos > 0 && nOPos != LISTBOX_ENTRY_NOTFOUND );
+ m_aUnderlineColorFT.Enable( bUEnable );
+ m_aUnderlineColorLB.Enable( bUEnable );
+ m_aOverlineColorFT.Enable( bOEnable );
+ m_aOverlineColorLB.Enable( bOEnable );
+ m_aIndividualWordsBtn.Enable( bUEnable || bOEnable || ( nSPos > 0 && nSPos != LISTBOX_ENTRY_NOTFOUND ) );
}
UpdatePreview_Impl();
return 0;
@@ -2126,8 +2170,9 @@ IMPL_LINK( SvxCharEffectsPage, SelectHdl_Impl, ListBox*, pBox )
IMPL_LINK( SvxCharEffectsPage, UpdatePreview_Impl, ListBox*, EMPTYARG )
{
- bool bEnable = ( ( m_aUnderlineLB.GetSelectEntryPos() > 0 ) |
- ( m_aStrikeoutLB.GetSelectEntryPos() > 0 ) );
+ bool bEnable = ( ( m_aUnderlineLB.GetSelectEntryPos() > 0 ) ||
+ ( m_aOverlineLB.GetSelectEntryPos() > 0 ) ||
+ ( m_aStrikeoutLB.GetSelectEntryPos() > 0 ) );
m_aIndividualWordsBtn.Enable( bEnable );
UpdatePreview_Impl();
@@ -2237,25 +2282,82 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet )
}
Color aColor = rItem.GetColor();
- USHORT nPos = m_aColorLB.GetEntryPos( aColor );
+ USHORT nPos = m_aUnderlineColorLB.GetEntryPos( aColor );
if ( LISTBOX_ENTRY_NOTFOUND != nPos )
- m_aColorLB.SelectEntryPos( nPos );
+ m_aUnderlineColorLB.SelectEntryPos( nPos );
else
{
- nPos = m_aColorLB.GetEntryPos( aColor );
+ nPos = m_aUnderlineColorLB.GetEntryPos( aColor );
if ( LISTBOX_ENTRY_NOTFOUND != nPos )
- m_aColorLB.SelectEntryPos( nPos );
+ m_aUnderlineColorLB.SelectEntryPos( nPos );
else
- m_aColorLB.SelectEntryPos(
- m_aColorLB.InsertEntry( aColor,
+ m_aUnderlineColorLB.SelectEntryPos(
+ m_aUnderlineColorLB.InsertEntry( aColor,
String( SVX_RES( RID_SVXSTR_COLOR_USER ) ) ) );
}
}
else
{
- m_aColorLB.SelectEntry( Color( COL_AUTO ));
- m_aColorLB.Disable();
+ m_aUnderlineColorLB.SelectEntry( Color( COL_AUTO ));
+ m_aUnderlineColorLB.Disable();
+ }
+ }
+ }
+
+ // Overline
+ nWhich = GetWhich( SID_ATTR_CHAR_OVERLINE );
+ rFont.SetOverline( UNDERLINE_NONE );
+ rCJKFont.SetOverline( UNDERLINE_NONE );
+ rCTLFont.SetOverline( UNDERLINE_NONE );
+
+ m_aOverlineLB.SelectEntryPos( 0 );
+ eState = rSet.GetItemState( nWhich );
+
+ if ( eState >= SFX_ITEM_DONTCARE )
+ {
+ if ( eState == SFX_ITEM_DONTCARE )
+ m_aOverlineLB.SetNoSelection();
+ else
+ {
+ const SvxOverlineItem& rItem = (SvxOverlineItem&)rSet.Get( nWhich );
+ FontUnderline eOverline = (FontUnderline)rItem.GetValue();
+ rFont.SetOverline( eOverline );
+ rCJKFont.SetOverline( eOverline );
+ rCTLFont.SetOverline( eOverline );
+
+ if ( eOverline != UNDERLINE_NONE )
+ {
+ for ( USHORT i = 0; i < m_aOverlineLB.GetEntryCount(); ++i )
+ {
+ if ( (FontUnderline)(ULONG)m_aOverlineLB.GetEntryData(i) == eOverline )
+ {
+ m_aOverlineLB.SelectEntryPos(i);
+ bEnable |= TRUE;
+ break;
+ }
+ }
+
+ Color aColor = rItem.GetColor();
+ USHORT nPos = m_aOverlineColorLB.GetEntryPos( aColor );
+
+ if ( LISTBOX_ENTRY_NOTFOUND != nPos )
+ m_aOverlineColorLB.SelectEntryPos( nPos );
+ else
+ {
+ nPos = m_aOverlineColorLB.GetEntryPos( aColor );
+ if ( LISTBOX_ENTRY_NOTFOUND != nPos )
+ m_aOverlineColorLB.SelectEntryPos( nPos );
+ else
+ m_aOverlineColorLB.SelectEntryPos(
+ m_aOverlineColorLB.InsertEntry( aColor,
+ String( SVX_RES( RID_SVXSTR_COLOR_USER ) ) ) );
+ }
+ }
+ else
+ {
+ m_aOverlineColorLB.SelectEntry( Color( COL_AUTO ));
+ m_aOverlineColorLB.Disable();
}
}
}
@@ -2367,8 +2469,10 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet )
m_aEmphasisLB.Disable();
}
- // the select handler for the underline/strikeout list boxes
+ // the select handler for the underline/overline/strikeout list boxes
// SelectHdl_Impl( NULL );
+ DBG_ASSERT(m_aUnderlineLB.GetSelectHdl() == m_aOverlineLB.GetSelectHdl(),
+ "SvxCharEffectsPage::Reset: inconsistence (1)!");
DBG_ASSERT(m_aUnderlineLB.GetSelectHdl() == m_aStrikeoutLB.GetSelectHdl(),
"SvxCharEffectsPage::Reset: inconsistence (1)!");
m_aUnderlineLB.GetSelectHdl().Call(NULL);
@@ -2566,7 +2670,9 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet )
// save this settings
m_aUnderlineLB.SaveValue();
- m_aColorLB.SaveValue();
+ m_aUnderlineColorLB.SaveValue();
+ m_aOverlineLB.SaveValue();
+ m_aOverlineColorLB.SaveValue();
m_aStrikeoutLB.SaveValue();
m_aIndividualWordsBtn.SaveValue();
m_aEmphasisLB.SaveValue();
@@ -2606,7 +2712,7 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet )
const SvxUnderlineItem& rItem = *( (const SvxUnderlineItem*)pOld );
if ( (FontUnderline)rItem.GetValue() == eUnder &&
- ( UNDERLINE_NONE == eUnder || rItem.GetColor() == m_aColorLB.GetSelectEntryColor() ) &&
+ ( UNDERLINE_NONE == eUnder || rItem.GetColor() == m_aUnderlineColorLB.GetSelectEntryColor() ) &&
! bAllowChg )
bChanged = FALSE;
}
@@ -2614,7 +2720,41 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet )
if ( bChanged )
{
SvxUnderlineItem aNewItem( eUnder, nWhich );
- aNewItem.SetColor( m_aColorLB.GetSelectEntryColor() );
+ aNewItem.SetColor( m_aUnderlineColorLB.GetSelectEntryColor() );
+ rSet.Put( aNewItem );
+ bModified |= TRUE;
+ }
+ else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
+ CLEARTITEM;
+
+ bChanged = TRUE;
+
+ // Overline
+ nWhich = GetWhich( SID_ATTR_CHAR_OVERLINE );
+ pOld = GetOldItem( rSet, SID_ATTR_CHAR_OVERLINE );
+ nPos = m_aOverlineLB.GetSelectEntryPos();
+ FontUnderline eOver = (FontUnderline)(ULONG)m_aOverlineLB.GetEntryData( nPos );
+
+ if ( pOld )
+ {
+ //! if there are different underline styles in the selection the
+ //! item-state in the 'rOldSet' will be invalid. In this case
+ //! changing the underline style will be allowed if a style is
+ //! selected in the listbox.
+ BOOL bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos &&
+ SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, TRUE );
+
+ const SvxOverlineItem& rItem = *( (const SvxOverlineItem*)pOld );
+ if ( (FontUnderline)rItem.GetValue() == eOver &&
+ ( UNDERLINE_NONE == eOver || rItem.GetColor() == m_aOverlineColorLB.GetSelectEntryColor() ) &&
+ ! bAllowChg )
+ bChanged = FALSE;
+ }
+
+ if ( bChanged )
+ {
+ SvxOverlineItem aNewItem( eOver, nWhich );
+ aNewItem.SetColor( m_aOverlineColorLB.GetSelectEntryColor() );
rSet.Put( aNewItem );
bModified |= TRUE;
}
@@ -2885,8 +3025,8 @@ void SvxCharEffectsPage::DisableControls( USHORT nDisable )
if ( ( DISABLE_UNDERLINE_COLOR & nDisable ) == DISABLE_UNDERLINE_COLOR )
{
// disable the controls
- m_aColorFT.Disable( );
- m_aColorLB.Disable( );
+ m_aUnderlineColorFT.Disable( );
+ m_aUnderlineColorLB.Disable( );
// and reroute the selection handler of the controls which normally would affect the color box dis-/enabling
m_aUnderlineLB.SetSelectHdl(LINK(this, SvxCharEffectsPage, UpdatePreview_Impl));
m_aStrikeoutLB.SetSelectHdl(LINK(this, SvxCharEffectsPage, UpdatePreview_Impl));
diff --git a/svx/source/dialog/chardlg.hrc b/svx/source/dialog/chardlg.hrc
index a9bc04f19b..303d1b7887 100644
--- a/svx/source/dialog/chardlg.hrc
+++ b/svx/source/dialog/chardlg.hrc
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: chardlg.hrc,v $
- * $Revision: 1.15 $
+ * $Revision: 1.15.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -76,41 +76,56 @@
// EffectsPage --------------------------------------------------------------
-#define FT_UNDERLINE 200
-#define LB_UNDERLINE 201
-#define FT_UNDERLINE_COLOR 202
-#define LB_UNDERLINE_COLOR 203
-#define FT_STRIKEOUT 204
-#define LB_STRIKEOUT 205
-#define CB_INDIVIDUALWORDS 206
-#define FT_EMPHASIS 207
-#define LB_EMPHASIS 208
-#define FT_POSITION 209
-#define LB_POSITION 210
-#define FT_FONTCOLOR 211
-#define LB_FONTCOLOR 212
-
-#define FT_EFFECTS 220
-#define LB_EFFECTS 221
-#define LB_EFFECTS2 222
-#define CB_OUTLINE 223
-#define CB_SHADOW 224
-#define CB_BLINKING 225
-#define FT_RELIEF 226
-#define LB_RELIEF 227
-#define CB_CHARHIDDEN 228
-
-#define WIN_EFFECTS_PREVIEW 231
-#define FT_EFFECTS_FONTTYPE 232
-
-#define STR_EFFECTS_TRANSPARENT 240
-#define STR_EFFECTS_CAPITALS 241
-#define STR_EFFECTS_LOWERCASE 242
-#define STR_EFFECTS_TITLE 243
-#define STR_EFFECTS_SMALL 244
-#define STR_EFFECTS_OUTLINE 245
-#define STR_EFFECTS_SHADOW 246
-#define STR_EFFECTS_BLINKING 247
+#define FT_FONTCOLOR 201
+#define LB_FONTCOLOR 202
+
+#define FT_EFFECTS 203
+#define LB_EFFECTS 204
+#define LB_EFFECTS2 205
+
+#define FT_RELIEF 206
+#define LB_RELIEF 207
+
+#define CB_OUTLINE 208
+#define CB_SHADOW 209
+#define CB_BLINKING 210
+#define CB_CHARHIDDEN 211
+
+#define FL_EFFECTS_VERTICAL 220
+
+#define FT_OVERLINE 221
+#define LB_OVERLINE 222
+#define FT_OVERLINE_COLOR 223
+#define LB_OVERLINE_COLOR 224
+
+#define FT_STRIKEOUT 225
+#define LB_STRIKEOUT 226
+
+#define FT_UNDERLINE 227
+#define LB_UNDERLINE 228
+#define FT_UNDERLINE_COLOR 229
+#define LB_UNDERLINE_COLOR 230
+
+#define CB_INDIVIDUALWORDS 231
+
+#define FL_EFFECTS_ASIAN 240
+
+#define FT_EMPHASIS 241
+#define LB_EMPHASIS 242
+#define FT_POSITION 243
+#define LB_POSITION 244
+
+#define WIN_EFFECTS_PREVIEW 251
+#define FT_EFFECTS_FONTTYPE 252
+
+#define STR_EFFECTS_TRANSPARENT 260
+#define STR_EFFECTS_CAPITALS 261
+#define STR_EFFECTS_LOWERCASE 262
+#define STR_EFFECTS_TITLE 263
+#define STR_EFFECTS_SMALL 264
+#define STR_EFFECTS_OUTLINE 265
+#define STR_EFFECTS_SHADOW 266
+#define STR_EFFECTS_BLINKING 267
// PositionPage -------------------------------------------------------------
diff --git a/svx/source/dialog/chardlg.hxx b/svx/source/dialog/chardlg.hxx
index 09cedabf85..e89ac291e7 100644
--- a/svx/source/dialog/chardlg.hxx
+++ b/svx/source/dialog/chardlg.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: chardlg.hxx,v $
- * $Revision: 1.8 $
+ * $Revision: 1.8.184.1 $
*
* This file is part of OpenOffice.org.
*
@@ -196,17 +196,6 @@ class SvxCharEffectsPage : public SvxCharBasePage
{
private:
- FixedText m_aUnderlineFT;
- ListBox m_aUnderlineLB;
- FixedText m_aColorFT;
- ColorListBox m_aColorLB;
- FixedText m_aStrikeoutFT;
- ListBox m_aStrikeoutLB;
- CheckBox m_aIndividualWordsBtn;
- FixedText m_aEmphasisFT;
- ListBox m_aEmphasisLB;
- FixedText m_aPositionFT;
- ListBox m_aPositionLB;
FixedText m_aFontColorFT;
ColorListBox m_aFontColorLB;
@@ -223,6 +212,31 @@ private:
TriStateBox m_aBlinkingBtn;
TriStateBox m_aHiddenBtn;
+ FixedLine m_aVerticalLine;
+
+ FixedText m_aOverlineFT;
+ ListBox m_aOverlineLB;
+ FixedText m_aOverlineColorFT;
+ ColorListBox m_aOverlineColorLB;
+
+ FixedText m_aStrikeoutFT;
+ ListBox m_aStrikeoutLB;
+
+ FixedText m_aUnderlineFT;
+ ListBox m_aUnderlineLB;
+ FixedText m_aUnderlineColorFT;
+ ColorListBox m_aUnderlineColorLB;
+
+ CheckBox m_aIndividualWordsBtn;
+
+ FixedLine m_aAsianLine;
+
+ FixedText m_aEmphasisFT;
+ ListBox m_aEmphasisLB;
+
+ FixedText m_aPositionFT;
+ ListBox m_aPositionLB;
+
USHORT m_nHtmlMode;
String m_aTransparentColorName;
diff --git a/svx/source/dialog/chardlg.src b/svx/source/dialog/chardlg.src
index 261010ee89..b51008e285 100644
--- a/svx/source/dialog/chardlg.src
+++ b/svx/source/dialog/chardlg.src
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: chardlg.src,v $
- * $Revision: 1.78 $
+ * $Revision: 1.78.20.1 $
*
* This file is part of OpenOffice.org.
*
@@ -323,13 +323,13 @@ TabPage RID_SVXPAGE_CHAR_NAME
Window WIN_CHAR_PREVIEW
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 129 ) ;
+ Pos = MAP_APPFONT ( 6 , 149 ) ;
Size = MAP_APPFONT ( 248 , 37 ) ;
Text [ en-US ] = "Example";
};
FixedText FT_CHAR_FONTTYPE
{
- Pos = MAP_APPFONT ( 6 , 168 ) ;
+ Pos = MAP_APPFONT ( 6 , 129 ) ;
Size = MAP_APPFONT ( 248 , 16 ) ;
WordBreak = TRUE ;
};
@@ -370,17 +370,100 @@ TabPage RID_SVXPAGE_CHAR_EFFECTS
HelpId = HID_SVXPAGE_CHAR_EFFECTS ;
Size = MAP_APPFONT ( 260 , 185 ) ;
Hide = TRUE ;
- FixedText FT_UNDERLINE
+ FixedText FT_FONTCOLOR
{
- Pos = MAP_APPFONT( 12 , 6 );
- Size = MAP_APPFONT( 78 , 8 );
- Text [ en-US ] = "Underlining" ;
+ Pos = MAP_APPFONT ( 10 , 4 );
+ Size = MAP_APPFONT ( 82 , 8 );
+ Text [ en-US ] = "Font ~color" ;
};
- ListBox LB_UNDERLINE
+ ListBox LB_FONTCOLOR
{
Border = TRUE;
- Pos = MAP_APPFONT ( 12 , 17 );
- Size = MAP_APPFONT ( 78 , 72 );
+ Pos = MAP_APPFONT ( 10 , 15 );
+ Size = MAP_APPFONT ( 82 , 72 );
+ TabStop = TRUE;
+ DropDown = TRUE;
+ };
+ FixedText FT_EFFECTS
+ {
+ Pos = MAP_APPFONT( 10 , 33 );
+ Size = MAP_APPFONT( 82 , 8 );
+ Text [ en-US ] = "~Effects" ;
+ };
+ ListBox LB_EFFECTS2
+ {
+ Pos = MAP_APPFONT ( 10 , 44 ) ;
+ Size = MAP_APPFONT ( 82 , 56 ) ;
+ DropDown = TRUE;
+ StringList [ en-US ] =
+ {
+ < "(Without)" ; Default ; > ;
+ < "Capitals" ; Default ; > ;
+ < "Lowercase" ; Default ; > ;
+ < "Title" ; Default ; > ;
+ < "Small capitals" ; Default ; > ;
+ };
+ };
+ FixedText FT_RELIEF
+ {
+ Pos = MAP_APPFONT ( 10 , 62 );
+ Size = MAP_APPFONT ( 82 , 8 );
+ Text [ en-US ] = "~Relief";
+ };
+ ListBox LB_RELIEF
+ {
+ Pos = MAP_APPFONT ( 10 , 73 ) ;
+ Size = MAP_APPFONT ( 82 , 56 ) ;
+ DropDown = TRUE;
+ StringList [ en-US ] =
+ {
+ < "(Without)" ; Default ; > ;
+ < "Embossed" ; Default ; > ;
+ < "Engraved" ; Default ; > ;
+ };
+ };
+ TriStateBox CB_OUTLINE
+ {
+ Pos = MAP_APPFONT ( 10 , 93 ) ;
+ Size = MAP_APPFONT ( 82 , 10 ) ;
+ Text [ en-US ] = "Out~line" ;
+ };
+ TriStateBox CB_SHADOW
+ {
+ Pos = MAP_APPFONT ( 10 , 107 ) ;
+ Size = MAP_APPFONT ( 82 , 10 ) ;
+ Text [ en-US ] = "Sha~dow" ;
+ };
+ TriStateBox CB_BLINKING
+ {
+ Pos = MAP_APPFONT ( 10 , 121 ) ;
+ Size = MAP_APPFONT ( 82 , 10 ) ;
+ Hide = TRUE;
+ Text [ en-US ] = "~Blinking" ;
+ };
+ TriStateBox CB_CHARHIDDEN
+ {
+ Pos = MAP_APPFONT ( 10 , 135 ) ;
+ Size = MAP_APPFONT ( 82 , 10 ) ;
+ Text [ en-US ] = "H~idden" ;
+ };
+ FixedLine FL_EFFECTS_VERTICAL
+ {
+ Pos = MAP_APPFONT ( 100 , 4 ) ;
+ Size = MAP_APPFONT ( 4 , 142 ) ;
+ Vert = TRUE;
+ };
+ FixedText FT_OVERLINE
+ {
+ Pos = MAP_APPFONT( 110 , 4 );
+ Size = MAP_APPFONT( 68 , 8 );
+ Text [ en-US ] = "~Overlining" ;
+ };
+ ListBox LB_OVERLINE
+ {
+ Border = TRUE;
+ Pos = MAP_APPFONT ( 110 , 15 );
+ Size = MAP_APPFONT ( 68 , 72 );
TabStop = TRUE;
DropDown = TRUE;
StringList [ en-US ] =
@@ -404,31 +487,31 @@ TabPage RID_SVXPAGE_CHAR_EFFECTS
< "Double Wave"; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
};
};
- FixedText FT_UNDERLINE_COLOR
+ FixedText FT_OVERLINE_COLOR
{
- Pos = MAP_APPFONT ( 96 , 6 );
- Size = MAP_APPFONT ( 70 , 8 );
- Text [ en-US ] = "Color";
+ Pos = MAP_APPFONT ( 184 , 4 );
+ Size = MAP_APPFONT ( 68 , 8 );
+ Text [ en-US ] = "O~verline color";
};
- ListBox LB_UNDERLINE_COLOR
+ ListBox LB_OVERLINE_COLOR
{
Border = TRUE;
- Pos = MAP_APPFONT ( 96 , 17 );
- Size = MAP_APPFONT ( 70 , 100 );
+ Pos = MAP_APPFONT ( 184 , 15 );
+ Size = MAP_APPFONT ( 68 , 100 );
TabStop = TRUE;
DropDown = TRUE;
};
FixedText FT_STRIKEOUT
{
- Pos = MAP_APPFONT ( 12 , 35 );
- Size = MAP_APPFONT ( 78 , 8 );
- Text [ en-US ] = "Strikethrough" ;
+ Pos = MAP_APPFONT ( 110 , 33 );
+ Size = MAP_APPFONT ( 68 , 8 );
+ Text [ en-US ] = "~Strikethrough" ;
};
ListBox LB_STRIKEOUT
{
Border = TRUE;
- Pos = MAP_APPFONT ( 12 , 46 );
- Size = MAP_APPFONT ( 78 , 72 );
+ Pos = MAP_APPFONT ( 110 , 44 );
+ Size = MAP_APPFONT ( 68 , 72 );
TabStop = TRUE;
DropDown = TRUE;
StringList [ en-US ] =
@@ -441,135 +524,111 @@ TabPage RID_SVXPAGE_CHAR_EFFECTS
< "With X" ; CHRDLG_STRIKEOUT_X ; > ;
};
};
- CheckBox CB_INDIVIDUALWORDS
- {
- Pos = MAP_APPFONT ( 96 , 48 );
- Size = MAP_APPFONT ( 70 , 10 );
- TabStop = TRUE;
- Text [ en-US ] = "Individual ~words" ;
- };
- FixedText FT_EMPHASIS
+ FixedText FT_UNDERLINE
{
- Pos = MAP_APPFONT ( 12 , 64 );
- Size = MAP_APPFONT ( 78 , 8 );
- Text [ en-US ] = "Emp~hasis mark" ;
+ Pos = MAP_APPFONT( 110 , 62 );
+ Size = MAP_APPFONT( 68 , 8 );
+ Text [ en-US ] = "~Underlining" ;
};
- ListBox LB_EMPHASIS
+ ListBox LB_UNDERLINE
{
Border = TRUE;
- Pos = MAP_APPFONT ( 12 , 75 );
- Size = MAP_APPFONT ( 78 , 72 );
+ Pos = MAP_APPFONT ( 110 , 73 );
+ Size = MAP_APPFONT ( 68 , 72 );
TabStop = TRUE;
DropDown = TRUE;
StringList [ en-US ] =
{
- < "(Without)" ; default ; > ;
- < "Dot" ; default ; > ;
- < "Circle" ; default ; > ;
- < "Disc" ; default ; > ;
- < "Accent" ; default ; > ;
+ < "(Without)" ; CHRDLG_UNDERLINE_NONE ; > ;
+ < "Single" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "Double" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < "Bold"; CHRDLG_UNDERLINE_BOLD; > ;
+ < "Dotted" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < "Dotted (Bold)" ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < "Dash"; CHRDLG_UNDERLINE_DASH; > ;
+ < "Dash (Bold)"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < "Long Dash"; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < "Long Dash (Bold)"; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < "Dot Dash"; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < "Dot Dash (Bold)"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < "Dot Dot Dash"; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < "Dot Dot Dash (Bold)"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < "Wave"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "Wave (Bold)"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < "Double Wave"; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
};
};
- FixedText FT_POSITION
+ FixedText FT_UNDERLINE_COLOR
{
- Pos = MAP_APPFONT ( 96 , 64 );
- Size = MAP_APPFONT ( 70 , 8 );
- Text [ en-US ] = "Position" ;
+ Pos = MAP_APPFONT ( 184 , 62 );
+ Size = MAP_APPFONT ( 68 , 8 );
+ Text [ en-US ] = "U~nderline color";
};
- ListBox LB_POSITION
+ ListBox LB_UNDERLINE_COLOR
{
Border = TRUE;
- Pos = MAP_APPFONT ( 96 , 75 );
- Size = MAP_APPFONT ( 70 , 48 );
+ Pos = MAP_APPFONT ( 184 , 73 );
+ Size = MAP_APPFONT ( 68 , 100 );
TabStop = TRUE;
DropDown = TRUE;
- StringList [ en-US ] =
- {
- < "Above text" ; CHRDLG_POSITION_OVER ; > ;
- < "Below text" ; CHRDLG_POSITION_UNDER ; > ;
- };
};
- FixedText FT_FONTCOLOR
+ CheckBox CB_INDIVIDUALWORDS
{
- Pos = MAP_APPFONT ( 12 , 93 );
- Size = MAP_APPFONT ( 78 , 8 );
- Text [ en-US ] = "Font ~color" ;
+ Pos = MAP_APPFONT ( 110 , 93 );
+ Size = MAP_APPFONT ( 68 , 10 );
+ TabStop = TRUE;
+ Text [ en-US ] = "Individual ~words" ;
};
- ListBox LB_FONTCOLOR
+ FixedLine FL_EFFECTS_ASIAN
{
- Border = TRUE;
- Pos = MAP_APPFONT ( 12 , 104 );
- Size = MAP_APPFONT ( 78 , 72 );
- TabStop = TRUE;
- DropDown = TRUE;
+ Pos = MAP_APPFONT ( 106 , 110 ) ;
+ Size = MAP_APPFONT ( 148 , 4 ) ;
};
- FixedText FT_EFFECTS
+ FixedText FT_EMPHASIS
{
- Pos = MAP_APPFONT( 172 , 6 );
- Size = MAP_APPFONT( 82 , 8 );
- Text [ en-US ] = "Effects" ;
+ Pos = MAP_APPFONT ( 110 , 117 );
+ Size = MAP_APPFONT ( 68 , 8 );
+ Text [ en-US ] = "Emp~hasis mark" ;
};
- ListBox LB_EFFECTS2
+ ListBox LB_EMPHASIS
{
- Pos = MAP_APPFONT ( 172 , 17 ) ;
- Size = MAP_APPFONT ( 82 , 56 ) ;
+ Border = TRUE;
+ Pos = MAP_APPFONT ( 110 , 128 );
+ Size = MAP_APPFONT ( 68 , 72 );
+ TabStop = TRUE;
DropDown = TRUE;
StringList [ en-US ] =
{
- < "(Without)" ; Default ; > ;
- < "Capitals" ; Default ; > ;
- < "Lowercase" ; Default ; > ;
- < "Title" ; Default ; > ;
- < "Small capitals" ; Default ; > ;
+ < "(Without)" ; default ; > ;
+ < "Dot" ; default ; > ;
+ < "Circle" ; default ; > ;
+ < "Disc" ; default ; > ;
+ < "Accent" ; default ; > ;
};
};
- FixedText FT_RELIEF
+ FixedText FT_POSITION
{
- Pos = MAP_APPFONT ( 172 , 35 );
- Size = MAP_APPFONT ( 82 , 8 );
- Text [ en-US ] = "~Relief";
+ Pos = MAP_APPFONT ( 184 , 117 );
+ Size = MAP_APPFONT ( 68 , 8 );
+ Text [ en-US ] = "~Position" ;
};
- ListBox LB_RELIEF
+ ListBox LB_POSITION
{
- Pos = MAP_APPFONT ( 172 , 46 ) ;
- Size = MAP_APPFONT ( 82 , 56 ) ;
+ Border = TRUE;
+ Pos = MAP_APPFONT ( 184 , 128 );
+ Size = MAP_APPFONT ( 68 , 48 );
+ TabStop = TRUE;
DropDown = TRUE;
StringList [ en-US ] =
{
- < "(Without)" ; Default ; > ;
- < "Embossed" ; Default ; > ;
- < "Engraved" ; Default ; > ;
+ < "Above text" ; CHRDLG_POSITION_OVER ; > ;
+ < "Below text" ; CHRDLG_POSITION_UNDER ; > ;
};
};
- TriStateBox CB_OUTLINE
- {
- Pos = MAP_APPFONT ( 172 , 64 ) ;
- Size = MAP_APPFONT ( 82 , 10 ) ;
- Text [ en-US ] = "Outline" ;
- };
- TriStateBox CB_SHADOW
- {
- Pos = MAP_APPFONT ( 172 , 78 ) ;
- Size = MAP_APPFONT ( 82 , 10 ) ;
- Text [ en-US ] = "Shadow" ;
- };
- TriStateBox CB_BLINKING
- {
- Pos = MAP_APPFONT ( 172 , 92 ) ;
- Size = MAP_APPFONT ( 82 , 10 ) ;
- Hide = TRUE;
- Text [ en-US ] = "~Blinking" ;
- };
- TriStateBox CB_CHARHIDDEN
- {
- Pos = MAP_APPFONT ( 172 , 106 ) ;
- Size = MAP_APPFONT ( 82 , 10 ) ;
- Text [ en-US ] = "H~idden" ;
- };
Window WIN_EFFECTS_PREVIEW
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 129 ) ;
+ Pos = MAP_APPFONT ( 6 , 149 ) ;
Size = MAP_APPFONT ( 248 , 37 ) ;
Text [ en-US ] = "Example";
};
@@ -810,7 +869,7 @@ TabPage RID_SVXPAGE_CHAR_POSITION
{
Text [ en-US ] = "Example" ;
Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 129 ) ;
+ Pos = MAP_APPFONT ( 6 , 149 ) ;
Size = MAP_APPFONT ( 248 , 37 ) ;
};
FixedText FT_POS_FONTTYPE
@@ -892,7 +951,7 @@ TabPage RID_SVXPAGE_CHAR_TWOLINES
Window WIN_TWOLINES_PREVIEW
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 129 ) ;
+ Pos = MAP_APPFONT ( 6 , 149 ) ;
Size = MAP_APPFONT ( 248 , 37 ) ;
Text [ en-US ] = "Example" ;
};
diff --git a/svx/source/editeng/editattr.cxx b/svx/source/editeng/editattr.cxx
index 1f96e5f9e5..1ac66fb300 100644
--- a/svx/source/editeng/editattr.cxx
+++ b/svx/source/editeng/editattr.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: editattr.cxx,v $
- * $Revision: 1.16 $
+ * $Revision: 1.16.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -157,6 +157,22 @@ void EditCharAttribUnderline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
}
// -------------------------------------------------------------------------
+// class EditCharAttribOverline
+// -------------------------------------------------------------------------
+EditCharAttribOverline::EditCharAttribOverline( const SvxOverlineItem& rAttr, USHORT _nStart, USHORT _nEnd )
+ : EditCharAttrib( rAttr, _nStart, _nEnd )
+{
+ DBG_ASSERT( rAttr.Which() == EE_CHAR_OVERLINE, "Kein Overlineattribut!" );
+}
+
+void EditCharAttribOverline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
+{
+ rFont.SetOverline( (FontUnderline)((const SvxOverlineItem*)GetItem())->GetValue() );
+ if ( pOutDev )
+ pOutDev->SetOverlineColor( ((const SvxOverlineItem*)GetItem())->GetColor() );
+}
+
+// -------------------------------------------------------------------------
// class EditCharAttribFontHeight
// -------------------------------------------------------------------------
EditCharAttribFontHeight::EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, USHORT _nStart, USHORT _nEnd )
diff --git a/svx/source/editeng/editattr.hxx b/svx/source/editeng/editattr.hxx
index f04a00495f..a24b1697c3 100644
--- a/svx/source/editeng/editattr.hxx
+++ b/svx/source/editeng/editattr.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: editattr.hxx,v $
- * $Revision: 1.13 $
+ * $Revision: 1.13.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -42,6 +42,7 @@ class SvxEscapementItem;
class SvxContourItem;
class SvxCrossedOutItem;
class SvxUnderlineItem;
+class SvxOverlineItem;
class SvxFontHeightItem;
class SvxCharScaleWidthItem;
class SvxColorItem;
@@ -258,6 +259,17 @@ public:
};
// -------------------------------------------------------------------------
+// class EditCharAttribOverline
+// -------------------------------------------------------------------------
+class EditCharAttribOverline : public EditCharAttrib
+{
+public:
+ EditCharAttribOverline( const SvxOverlineItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
+};
+
+// -------------------------------------------------------------------------
// class EditCharAttribEmphasisMark
// -------------------------------------------------------------------------
class EditCharAttribEmphasisMark : public EditCharAttrib
diff --git a/svx/source/editeng/editdbg.cxx b/svx/source/editeng/editdbg.cxx
index c01887f8d6..c93e7bc63f 100644
--- a/svx/source/editeng/editdbg.cxx
+++ b/svx/source/editeng/editdbg.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: editdbg.cxx,v $
- * $Revision: 1.22 $
+ * $Revision: 1.22.148.1 $
*
* This file is part of OpenOffice.org.
*
@@ -237,7 +237,11 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem )
break;
case EE_CHAR_UNDERLINE:
aDebStr += "FontUnderline=";
- aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxUnderlineItem&)rItem).GetUnderline() );
+ aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxUnderlineItem&)rItem).GetLineStyle() );
+ break;
+ case EE_CHAR_OVERLINE:
+ aDebStr += "FontOverline=";
+ aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxOverlineItem&)rItem).GetLineStyle() );
break;
case EE_CHAR_EMPHASISMARK:
aDebStr += "FontUnderline=";
diff --git a/svx/source/editeng/editdoc.cxx b/svx/source/editeng/editdoc.cxx
index cbc443cea4..8bd094ae98 100644
--- a/svx/source/editeng/editdoc.cxx
+++ b/svx/source/editeng/editdoc.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: editdoc.cxx,v $
- * $Revision: 1.48 $
+ * $Revision: 1.48.148.1 $
*
* This file is part of OpenOffice.org.
*
@@ -218,6 +218,7 @@ SfxItemInfo aItemInfos[EDITITEMCOUNT] = {
{ SID_ATTR_CHAR_RELIEF, SFX_ITEM_POOLABLE },
{ 0, SFX_ITEM_POOLABLE }, // EE_CHAR_RUBI_DUMMY
{ 0, SFX_ITEM_POOLABLE }, // EE_CHAR_XMLATTRIBS
+ { SID_ATTR_CHAR_OVERLINE, SFX_ITEM_POOLABLE },
{ 0, SFX_ITEM_POOLABLE }, // EE_FEATURE_TAB
{ 0, SFX_ITEM_POOLABLE }, // EE_FEATURE_LINEBR
{ SID_ATTR_CHAR_CHARSETCOLOR, SFX_ITEM_POOLABLE }, // EE_FEATURE_NOTCONV
@@ -248,6 +249,15 @@ USHORT aV4Map[] = {
4034, 4035, 4036, 4037
};
+USHORT aV5Map[] = {
+ 3994, 3995, 3996, 3997, 3998, 3999, 4000, 4001, 4002, 4003,
+ 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013,
+ 4014, 4015, 4016, 4017, 4018, 4019, 4020, 4021, 4022, 4023,
+ 4024, 4025, 4026, 4027, 4028, 4029, 4030, 4031, 4032, 4033,
+ /* EE_CHAR_OVERLINE inserted here */
+ 4035, 4036, 4037, 4038
+};
+
SV_IMPL_PTRARR( ContentList, ContentNode* );
SV_IMPL_VARARR( ScriptTypePosInfos, ScriptTypePosInfo );
SV_IMPL_VARARR( WritingDirectionInfos, WritingDirectionInfo );
@@ -314,6 +324,11 @@ EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, US
pNew = new EditCharAttribUnderline( (const SvxUnderlineItem&)rNew, nS, nE );
}
break;
+ case EE_CHAR_OVERLINE:
+ {
+ pNew = new EditCharAttribOverline( (const SvxOverlineItem&)rNew, nS, nE );
+ }
+ break;
case EE_CHAR_EMPHASISMARK:
{
pNew = new EditCharAttribEmphasisMark( (const SvxEmphasisMarkItem&)rNew, nS, nE );
@@ -1278,7 +1293,9 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, s
if ( bSearchInParent || ( rSet.GetItemState( nWhich_Weight ) == SFX_ITEM_ON ) )
rFont.SetWeight( ((const SvxWeightItem&)rSet.Get( nWhich_Weight )).GetWeight() );
if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_UNDERLINE ) == SFX_ITEM_ON ) )
- rFont.SetUnderline( ((const SvxUnderlineItem&)rSet.Get( EE_CHAR_UNDERLINE )).GetUnderline() );
+ rFont.SetUnderline( ((const SvxUnderlineItem&)rSet.Get( EE_CHAR_UNDERLINE )).GetLineStyle() );
+ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_OVERLINE ) == SFX_ITEM_ON ) )
+ rFont.SetOverline( ((const SvxOverlineItem&)rSet.Get( EE_CHAR_OVERLINE )).GetLineStyle() );
if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_STRIKEOUT ) == SFX_ITEM_ON ) )
rFont.SetStrikeout( ((const SvxCrossedOutItem&)rSet.Get( EE_CHAR_STRIKEOUT )).GetStrikeout() );
if ( bSearchInParent || ( rSet.GetItemState( nWhich_Italic ) == SFX_ITEM_ON ) )
@@ -2261,6 +2278,7 @@ EditEngineItemPool::EditEngineItemPool( BOOL bPersistenRefCounts )
SetVersionMap( 2, 3999, 4019, aV2Map );
SetVersionMap( 3, 3997, 4020, aV3Map );
SetVersionMap( 4, 3994, 4022, aV4Map );
+ SetVersionMap( 5, 3994, 4037, aV5Map );
DBG_ASSERT( EE_DLL(), "EditDLL?!" );
SfxPoolItem** ppDefItems = EE_DLL()->GetGlobalData()->GetDefItems();
diff --git a/svx/source/editeng/editeng.cxx b/svx/source/editeng/editeng.cxx
index 25201dd36d..0f42cbd26f 100644
--- a/svx/source/editeng/editeng.cxx
+++ b/svx/source/editeng/editeng.cxx
@@ -2452,10 +2452,11 @@ ParagraphInfos EditEngine::GetParagraphInfos( sal_uInt16 nPara )
// =====================================================================
// ====================== Virtuelle Methoden =======================
// =====================================================================
-void __EXPORT EditEngine::DrawingText( const Point&, const XubString&, USHORT, USHORT,
- const sal_Int32*, const SvxFont&, sal_uInt16, sal_uInt16, BYTE,
- const EEngineData::WrongSpellVector*, const SvxFieldData*, bool, bool, bool,
- const ::com::sun::star::lang::Locale*, const Color&)
+void __EXPORT EditEngine::DrawingText( const Point&, const XubString&, USHORT, USHORT,
+ const sal_Int32*, const SvxFont&, sal_uInt16, sal_uInt16, BYTE,
+ const EEngineData::WrongSpellVector*, const SvxFieldData*, bool, bool, bool,
+ const ::com::sun::star::lang::Locale*, const Color&, const Color&)
+
{
DBG_CHKTHIS( EditEngine, 0 );
}
@@ -2642,6 +2643,7 @@ void EditEngine::SetFontInfoInItemSet( SfxItemSet& rSet, const SvxFont& rFont )
rSet.Put( SvxWeightItem( rFont.GetWeight(), EE_CHAR_WEIGHT ) );
rSet.Put( SvxColorItem( rFont.GetColor(), EE_CHAR_COLOR ) );
rSet.Put( SvxUnderlineItem( rFont.GetUnderline(), EE_CHAR_UNDERLINE ) );
+ rSet.Put( SvxOverlineItem( rFont.GetOverline(), EE_CHAR_OVERLINE ) );
rSet.Put( SvxCrossedOutItem( rFont.GetStrikeout(), EE_CHAR_STRIKEOUT ) );
rSet.Put( SvxPostureItem( rFont.GetItalic(), EE_CHAR_ITALIC ) );
rSet.Put( SvxContourItem( rFont.IsOutline(), EE_CHAR_OUTLINE ) );
diff --git a/svx/source/editeng/eerdll.cxx b/svx/source/editeng/eerdll.cxx
index a65b7eee3f..ce23a1e00e 100644
--- a/svx/source/editeng/eerdll.cxx
+++ b/svx/source/editeng/eerdll.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: eerdll.cxx,v $
- * $Revision: 1.31 $
+ * $Revision: 1.31.148.1 $
*
* This file is part of OpenOffice.org.
*
@@ -164,14 +164,15 @@ SfxPoolItem** GlobalEditData::GetDefItems()
// no need to have alien attributes persistent
ppDefItems[44] = new SfxVoidItem( EE_CHAR_XMLATTRIBS );
#endif // #ifndef SVX_LIGHT
+ ppDefItems[45] = new SvxOverlineItem( UNDERLINE_NONE, EE_CHAR_OVERLINE );
// Features
- ppDefItems[45] = new SfxVoidItem( EE_FEATURE_TAB );
- ppDefItems[46] = new SfxVoidItem( EE_FEATURE_LINEBR );
- ppDefItems[47] = new SvxCharSetColorItem( Color( COL_RED ), RTL_TEXTENCODING_DONTKNOW, EE_FEATURE_NOTCONV );
- ppDefItems[48] = new SvxFieldItem( SvxFieldData(), EE_FEATURE_FIELD );
+ ppDefItems[46] = new SfxVoidItem( EE_FEATURE_TAB );
+ ppDefItems[47] = new SfxVoidItem( EE_FEATURE_LINEBR );
+ ppDefItems[48] = new SvxCharSetColorItem( Color( COL_RED ), RTL_TEXTENCODING_DONTKNOW, EE_FEATURE_NOTCONV );
+ ppDefItems[49] = new SvxFieldItem( SvxFieldData(), EE_FEATURE_FIELD );
- DBG_ASSERT( EDITITEMCOUNT == 49, "ITEMCOUNT geaendert, DefItems nicht angepasst!" );
+ DBG_ASSERT( EDITITEMCOUNT == 50, "ITEMCOUNT geaendert, DefItems nicht angepasst!" );
// Init DefFonts:
GetDefaultFonts( *(SvxFontItem*)ppDefItems[EE_CHAR_FONTINFO - EE_ITEMS_START],
diff --git a/svx/source/editeng/impedit3.cxx b/svx/source/editeng/impedit3.cxx
index 2acea25ec6..9500cf789a 100644
--- a/svx/source/editeng/impedit3.cxx
+++ b/svx/source/editeng/impedit3.cxx
@@ -2546,6 +2546,15 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rF
pOut->SetTextLineColor();
}
+ if ( pOut )
+ {
+ const SvxOverlineItem& rOverlineColor = (const SvxOverlineItem&)pNode->GetContentAttribs().GetItem( EE_CHAR_OVERLINE );
+ if ( rOverlineColor.GetColor() != COL_TRANSPARENT )
+ pOut->SetOverlineColor( rOverlineColor.GetColor() );
+ else
+ pOut->SetOverlineColor();
+ }
+
const SvxLanguageItem* pCJKLanguageItem = NULL;
if ( aStatus.UseCharAttribs() )
@@ -3233,6 +3242,10 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
const bool bEndOfLine(y == pLine->GetEndPortion());
const bool bEndOfParagraph(bEndOfLine && nLine + 1 == nLines);
+ // get Overline color (from ((const SvxOverlineItem*)GetItem())->GetColor() in
+ // consequence, but also already set at pOutDev)
+ const Color aOverlineColor(pOutDev->GetOverlineColor());
+
// get TextLine color (from ((const SvxUnderlineItem*)GetItem())->GetColor() in
// consequence, but also already set at pOutDev)
const Color aTextLineColor(pOutDev->GetTextLineColor());
@@ -3247,6 +3260,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
pFieldData,
bEndOfLine, bEndOfParagraph, false, // support for EOL/EOP TEXT comments
&aLocale,
+ aOverlineColor,
aTextLineColor);
}
else
diff --git a/svx/source/editeng/impedit4.cxx b/svx/source/editeng/impedit4.cxx
index 197eff298b..b2aee4f9a5 100644
--- a/svx/source/editeng/impedit4.cxx
+++ b/svx/source/editeng/impedit4.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: impedit4.cxx,v $
- * $Revision: 1.78 $
+ * $Revision: 1.78.54.1 $
*
* This file is part of OpenOffice.org.
*
@@ -894,7 +894,7 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput,
{
// muesste bei WordLineMode ggf. ulw werden,
// aber die Information fehlt hier
- FontUnderline e = ((const SvxUnderlineItem&)rItem).GetUnderline();
+ FontUnderline e = ((const SvxUnderlineItem&)rItem).GetLineStyle();
switch ( e )
{
case UNDERLINE_NONE: rOutput << sRTF_ULNONE; break;
@@ -906,6 +906,20 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput,
}
}
break;
+ case EE_CHAR_OVERLINE:
+ {
+ FontUnderline e = ((const SvxOverlineItem&)rItem).GetLineStyle();
+ switch ( e )
+ {
+ case UNDERLINE_NONE: rOutput << sRTF_OLNONE; break;
+ case UNDERLINE_SINGLE: rOutput << sRTF_OL; break;
+ case UNDERLINE_DOUBLE: rOutput << sRTF_OLDB; break;
+ case UNDERLINE_DOTTED: rOutput << sRTF_OLD; break;
+ default:
+ break;
+ }
+ }
+ break;
case EE_CHAR_STRIKEOUT:
{
FontStrikeout e = ((const SvxCrossedOutItem&)rItem).GetStrikeout();
diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx
index 837ee60102..13f2b0cb69 100644
--- a/svx/source/form/fmtextcontrolshell.cxx
+++ b/svx/source/form/fmtextcontrolshell.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: fmtextcontrolshell.cxx,v $
- * $Revision: 1.16 $
+ * $Revision: 1.16.86.1 $
*
* This file is part of OpenOffice.org.
*
@@ -115,6 +115,7 @@ namespace svx
SID_ATTR_CHAR_CONTOUR,
SID_ATTR_CHAR_STRIKEOUT,
SID_ATTR_CHAR_UNDERLINE,
+ SID_ATTR_CHAR_OVERLINE,
SID_ATTR_CHAR_FONTHEIGHT,
SID_ATTR_CHAR_COLOR,
SID_ATTR_CHAR_KERNING,
@@ -878,20 +879,25 @@ namespace svx
{
case SID_ATTR_CHAR_STRIKEOUT:
case SID_ATTR_CHAR_UNDERLINE:
+ case SID_ATTR_CHAR_OVERLINE:
{
SfxItemSet aToggled( *_rReq.GetArgs() );
lcl_translateUnoStateToItem( nSlot, aFeaturePos->second->getFeatureState(), aToggled );
WhichId nWhich = aToggled.GetPool()->GetWhich( nSlot );
const SfxPoolItem* pItem = aToggled.GetItem( nWhich );
- if ( SID_ATTR_CHAR_UNDERLINE == nSlot )
+ if ( ( SID_ATTR_CHAR_UNDERLINE == nSlot ) || ( SID_ATTR_CHAR_OVERLINE == nSlot ) )
{
- const SvxUnderlineItem* pUnderline = PTR_CAST( SvxUnderlineItem, pItem );
- DBG_ASSERT( pUnderline, "FmTextControlShell::ExecuteTextAttribute: ooops - no underline item!" );
- if ( pUnderline )
+ const SvxOverlineItem* pTextLine = PTR_CAST( SvxOverlineItem, pItem );
+ DBG_ASSERT( pTextLine, "FmTextControlShell::ExecuteTextAttribute: ooops - no underline/overline item!" );
+ if ( pTextLine )
{
- FontUnderline eFU = pUnderline->GetUnderline();
- aToggled.Put( SvxUnderlineItem( eFU == UNDERLINE_SINGLE ? UNDERLINE_NONE : UNDERLINE_SINGLE, nWhich ) );
+ FontUnderline eTL = pTextLine->GetLineStyle();
+ if ( SID_ATTR_CHAR_UNDERLINE == nSlot ) {
+ aToggled.Put( SvxUnderlineItem( eTL == UNDERLINE_SINGLE ? UNDERLINE_NONE : UNDERLINE_SINGLE, nWhich ) );
+ } else {
+ aToggled.Put( SvxOverlineItem( eTL == UNDERLINE_SINGLE ? UNDERLINE_NONE : UNDERLINE_SINGLE, nWhich ) );
+ }
}
}
else
diff --git a/svx/source/form/formshell.src b/svx/source/form/formshell.src
index daca30ee9f..f59bdc1bb4 100644
--- a/svx/source/form/formshell.src
+++ b/svx/source/form/formshell.src
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: formshell.src,v $
- * $Revision: 1.10 $
+ * $Revision: 1.10.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -66,6 +66,10 @@ Menu RID_FM_TEXTATTRIBUTE_MENU
};
MenuItem
{
+ ITEM_FORMAT_ATTR_CHAR_OVERLINE
+ };
+ MenuItem
+ {
ITEM_FORMAT_ATTR_CHAR_UNDERLINE
};
MenuItem
diff --git a/svx/source/items/svxitems.src b/svx/source/items/svxitems.src
index 00d69e7db8..c7a35f625b 100644
--- a/svx/source/items/svxitems.src
+++ b/svx/source/items/svxitems.src
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svxitems.src,v $
- * $Revision: 1.83 $
+ * $Revision: 1.83.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -396,7 +396,7 @@ String RID_SVXITEMS_WEIGHT_BLACK
{
Text [ en-US ] = "black" ;
};
- // enum FontUnderline ----------------------------------------------------
+ // enum FontUnderline - used for underline ------------------------------
String RID_SVXITEMS_UL_NONE
{
Text [ en-US ] = "No underline" ;
@@ -407,7 +407,7 @@ String RID_SVXITEMS_UL_SINGLE
};
String RID_SVXITEMS_UL_DOUBLE
{
- Text [ en-US ] = "Double underlne" ;
+ Text [ en-US ] = "Double underline" ;
};
String RID_SVXITEMS_UL_DOTTED
{
@@ -473,6 +473,83 @@ String RID_SVXITEMS_UL_BOLDWAVE
{
Text [ en-US ] = "Underline (wave, bold)";
};
+ // enum FontUnderline - used for overline -------------------------------
+String RID_SVXITEMS_OL_NONE
+{
+ Text [ en-US ] = "No overline" ;
+};
+String RID_SVXITEMS_OL_SINGLE
+{
+ Text [ en-US ] = "Single overline" ;
+};
+String RID_SVXITEMS_OL_DOUBLE
+{
+ Text [ en-US ] = "Double overline" ;
+};
+String RID_SVXITEMS_OL_DOTTED
+{
+ Text [ en-US ] = "Dotted overline" ;
+};
+String RID_SVXITEMS_OL_DONTKNOW
+{
+ Text [ en-US ] = "Overline";
+};
+String RID_SVXITEMS_OL_DASH
+{
+ Text [ en-US ] = "Overline (dashes)";
+};
+String RID_SVXITEMS_OL_LONGDASH
+{
+ Text [ en-US ] = "Overline (long dashes)";
+};
+String RID_SVXITEMS_OL_DASHDOT
+{
+ Text [ en-US ] = "Overline (dot dash)";
+};
+String RID_SVXITEMS_OL_DASHDOTDOT
+{
+ Text [ en-US ] = "Overline (dot dot dash)";
+};
+String RID_SVXITEMS_OL_SMALLWAVE
+{
+ Text [ en-US ] = "Overline (small wave)";
+};
+String RID_SVXITEMS_OL_WAVE
+{
+ Text [ en-US ] = "Overline (Wave)";
+};
+String RID_SVXITEMS_OL_DOUBLEWAVE
+{
+ Text [ en-US ] = "Overline (Double wave)";
+};
+String RID_SVXITEMS_OL_BOLD
+{
+ Text [ en-US ] = "Overlined (Bold)";
+};
+String RID_SVXITEMS_OL_BOLDDOTTED
+{
+ Text [ en-US ] = "Dotted overline (Bold)";
+};
+String RID_SVXITEMS_OL_BOLDDASH
+{
+ Text [ en-US ] = "Overline (Dash bold)";
+};
+String RID_SVXITEMS_OL_BOLDLONGDASH
+{
+ Text [ en-US ] = "Overline (long dash, bold)";
+};
+String RID_SVXITEMS_OL_BOLDDASHDOT
+{
+ Text [ en-US ] = "Overline (dot dash, bold)";
+};
+String RID_SVXITEMS_OL_BOLDDASHDOTDOT
+{
+ Text [ en-US ] = "Overline (dot dot dash, bold)";
+};
+String RID_SVXITEMS_OL_BOLDWAVE
+{
+ Text [ en-US ] = "Overline (wave, bold)";
+};
// enum FontStrikeout ----------------------------------------------------
String RID_SVXITEMS_STRIKEOUT_NONE
{
@@ -687,6 +764,10 @@ String RID_ATTR_CHAR_CHARSETCOLOR
{
Text [ en-US ] = "Character set color";
};
+String RID_ATTR_CHAR_OVERLINE
+{
+ Text [ en-US ] = "Overline" ;
+};
String RID_ATTR_BORDER_INNER
{
Text = "?" ;
diff --git a/svx/source/items/textitem.cxx b/svx/source/items/textitem.cxx
index 13a2daceed..32e8b9f617 100644
--- a/svx/source/items/textitem.cxx
+++ b/svx/source/items/textitem.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: textitem.cxx,v $
- * $Revision: 1.74 $
+ * $Revision: 1.74.86.1 $
*
* This file is part of OpenOffice.org.
*
@@ -142,7 +142,9 @@ TYPEINIT1_FACTORY(SvxPostureItem, SfxEnumItem, new SvxPostureItem(ITALIC_NONE, 0
TYPEINIT1_FACTORY(SvxWeightItem, SfxEnumItem, new SvxWeightItem(WEIGHT_NORMAL, 0));
TYPEINIT1_FACTORY(SvxFontHeightItem, SfxPoolItem, new SvxFontHeightItem(240, 100, 0));
TYPEINIT1_FACTORY(SvxFontWidthItem, SfxPoolItem, new SvxFontWidthItem(0, 100, 0));
+TYPEINIT1_FACTORY(SvxTextLineItem, SfxEnumItem, new SvxTextLineItem(UNDERLINE_NONE, 0));
TYPEINIT1_FACTORY(SvxUnderlineItem, SfxEnumItem, new SvxUnderlineItem(UNDERLINE_NONE, 0));
+TYPEINIT1_FACTORY(SvxOverlineItem, SfxEnumItem, new SvxOverlineItem(UNDERLINE_NONE, 0));
TYPEINIT1_FACTORY(SvxCrossedOutItem, SfxEnumItem, new SvxCrossedOutItem(STRIKEOUT_NONE, 0));
TYPEINIT1_FACTORY(SvxShadowedItem, SfxBoolItem, new SvxShadowedItem(sal_False, 0));
TYPEINIT1_FACTORY(SvxAutoKernItem, SfxBoolItem, new SvxAutoKernItem(sal_False, 0));
@@ -1322,53 +1324,53 @@ SfxItemPresentation SvxFontWidthItem::GetPresentation
return SFX_ITEM_PRESENTATION_NONE;
}
-// class SvxUnderlineItem ------------------------------------------------
+// class SvxTextLineItem ------------------------------------------------
-SvxUnderlineItem::SvxUnderlineItem( const FontUnderline eSt, const USHORT nId )
+SvxTextLineItem::SvxTextLineItem( const FontUnderline eSt, const USHORT nId )
: SfxEnumItem( nId, (USHORT)eSt ), mColor( COL_TRANSPARENT )
{
}
// -----------------------------------------------------------------------
-int SvxUnderlineItem::HasBoolValue() const
+int SvxTextLineItem::HasBoolValue() const
{
return sal_True;
}
// -----------------------------------------------------------------------
-sal_Bool SvxUnderlineItem::GetBoolValue() const
+sal_Bool SvxTextLineItem::GetBoolValue() const
{
return (FontUnderline)GetValue() != UNDERLINE_NONE;
}
// -----------------------------------------------------------------------
-void SvxUnderlineItem::SetBoolValue( sal_Bool bVal )
+void SvxTextLineItem::SetBoolValue( sal_Bool bVal )
{
SetValue( (USHORT)(bVal ? UNDERLINE_SINGLE : UNDERLINE_NONE) );
}
// -----------------------------------------------------------------------
-SfxPoolItem* SvxUnderlineItem::Clone( SfxItemPool * ) const
+SfxPoolItem* SvxTextLineItem::Clone( SfxItemPool * ) const
{
- SvxUnderlineItem* pNew = new SvxUnderlineItem( *this );
+ SvxTextLineItem* pNew = new SvxTextLineItem( *this );
pNew->SetColor( GetColor() );
return pNew;
}
// -----------------------------------------------------------------------
-USHORT SvxUnderlineItem::GetValueCount() const
+USHORT SvxTextLineItem::GetValueCount() const
{
return UNDERLINE_DOTTED + 1; // auch UNDERLINE_NONE geh"ort dazu
}
// -----------------------------------------------------------------------
-SvStream& SvxUnderlineItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
+SvStream& SvxTextLineItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
{
rStrm << (BYTE)GetValue();
return rStrm;
@@ -1376,16 +1378,16 @@ SvStream& SvxUnderlineItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) c
// -----------------------------------------------------------------------
-SfxPoolItem* SvxUnderlineItem::Create(SvStream& rStrm, USHORT) const
+SfxPoolItem* SvxTextLineItem::Create(SvStream& rStrm, USHORT) const
{
BYTE nState;
rStrm >> nState;
- return new SvxUnderlineItem( (FontUnderline)nState, Which() );
+ return new SvxTextLineItem( (FontUnderline)nState, Which() );
}
//------------------------------------------------------------------------
-SfxItemPresentation SvxUnderlineItem::GetPresentation
+SfxItemPresentation SvxTextLineItem::GetPresentation
(
SfxItemPresentation ePres,
SfxMapUnit /*eCoreUnit*/,
@@ -1413,31 +1415,31 @@ SfxItemPresentation SvxUnderlineItem::GetPresentation
// -----------------------------------------------------------------------
-XubString SvxUnderlineItem::GetValueTextByPos( USHORT nPos ) const
+XubString SvxTextLineItem::GetValueTextByPos( USHORT /*nPos*/ ) const
{
- DBG_ASSERT( nPos <= (USHORT)UNDERLINE_BOLDWAVE, "enum overflow!" );
- return SVX_RESSTR( RID_SVXITEMS_UL_BEGIN + nPos );
+ DBG_ERROR("SvxTextLineItem::GetValueTextByPos: Pure virtual method");
+ return XubString();
}
/*-----------------13.03.98 16:25-------------------
--------------------------------------------------*/
-sal_Bool SvxUnderlineItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+sal_Bool SvxTextLineItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
{
// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
switch(nMemberId)
{
- case MID_UNDERLINED:
+ case MID_TEXTLINED:
rVal = Bool2Any(GetBoolValue());
break;
- case MID_UNDERLINE:
+ case MID_TL_STYLE:
rVal <<= (sal_Int16)(GetValue());
break;
- case MID_UL_COLOR:
+ case MID_TL_COLOR:
rVal <<= (sal_Int32)( mColor.GetColor() );
break;
- case MID_UL_HASCOLOR:
+ case MID_TL_HASCOLOR:
rVal = Bool2Any( !mColor.GetTransparency() );
break;
}
@@ -1447,17 +1449,17 @@ sal_Bool SvxUnderlineItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
/*-----------------13.03.98 16:28-------------------
--------------------------------------------------*/
-sal_Bool SvxUnderlineItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+sal_Bool SvxTextLineItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
{
// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
sal_Bool bRet = sal_True;
switch(nMemberId)
{
- case MID_UNDERLINED:
+ case MID_TEXTLINED:
SetBoolValue(Any2Bool(rVal));
break;
- case MID_UNDERLINE:
+ case MID_TL_STYLE:
{
sal_Int32 nValue = 0;
if(!(rVal >>= nValue))
@@ -1466,7 +1468,7 @@ sal_Bool SvxUnderlineItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
SetValue((sal_Int16)nValue);
}
break;
- case MID_UL_COLOR:
+ case MID_TL_COLOR:
{
sal_Int32 nCol = 0;
if( !( rVal >>= nCol ) )
@@ -1481,18 +1483,84 @@ sal_Bool SvxUnderlineItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
}
}
break;
- case MID_UL_HASCOLOR:
+ case MID_TL_HASCOLOR:
mColor.SetTransparency( Any2Bool( rVal ) ? 0 : 0xff );
break;
}
return bRet;
}
-int SvxUnderlineItem::operator==( const SfxPoolItem& rItem ) const
+int SvxTextLineItem::operator==( const SfxPoolItem& rItem ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
return SfxEnumItem::operator==( rItem ) &&
- GetColor() == ((SvxUnderlineItem&)rItem).GetColor();
+ GetColor() == ((SvxTextLineItem&)rItem).GetColor();
+}
+
+// class SvxUnderlineItem ------------------------------------------------
+
+SvxUnderlineItem::SvxUnderlineItem( const FontUnderline eSt, const USHORT nId )
+ : SvxTextLineItem( eSt, nId )
+{
+}
+
+//------------------------------------------------------------------------
+
+SfxPoolItem* SvxUnderlineItem::Clone( SfxItemPool * ) const
+{
+ SvxUnderlineItem* pNew = new SvxUnderlineItem( *this );
+ pNew->SetColor( GetColor() );
+ return pNew;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxUnderlineItem::Create(SvStream& rStrm, USHORT) const
+{
+ BYTE nState;
+ rStrm >> nState;
+ return new SvxUnderlineItem( (FontUnderline)nState, Which() );
+}
+
+// -----------------------------------------------------------------------
+
+XubString SvxUnderlineItem::GetValueTextByPos( USHORT nPos ) const
+{
+ DBG_ASSERT( nPos <= (USHORT)UNDERLINE_BOLDWAVE, "enum overflow!" );
+ return SVX_RESSTR( RID_SVXITEMS_UL_BEGIN + nPos );
+}
+
+// class SvxOverlineItem ------------------------------------------------
+
+SvxOverlineItem::SvxOverlineItem( const FontUnderline eSt, const USHORT nId )
+ : SvxTextLineItem( eSt, nId )
+{
+}
+
+//------------------------------------------------------------------------
+
+SfxPoolItem* SvxOverlineItem::Clone( SfxItemPool * ) const
+{
+ SvxOverlineItem* pNew = new SvxOverlineItem( *this );
+ pNew->SetColor( GetColor() );
+ return pNew;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxOverlineItem::Create(SvStream& rStrm, USHORT) const
+{
+ BYTE nState;
+ rStrm >> nState;
+ return new SvxOverlineItem( (FontUnderline)nState, Which() );
+}
+
+// -----------------------------------------------------------------------
+
+XubString SvxOverlineItem::GetValueTextByPos( USHORT nPos ) const
+{
+ DBG_ASSERT( nPos <= (USHORT)UNDERLINE_BOLDWAVE, "enum overflow!" );
+ return SVX_RESSTR( RID_SVXITEMS_OL_BEGIN + nPos );
}
// class SvxCrossedOutItem -----------------------------------------------
diff --git a/svx/source/outliner/outleeng.cxx b/svx/source/outliner/outleeng.cxx
index 5dad2e60b2..3ee790dc44 100644
--- a/svx/source/outliner/outleeng.cxx
+++ b/svx/source/outliner/outleeng.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -155,7 +155,7 @@ XubString OutlinerEditEng::GetUndoComment( USHORT nUndoId ) const
}
// #101498#
-void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen,
+void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen,
const sal_Int32* pDXArray, const SvxFont& rFont, USHORT nPara, USHORT nIndex, BYTE nRightToLeft,
const EEngineData::WrongSpellVector* pWrongSpellVector,
const SvxFieldData* pFieldData,
@@ -163,12 +163,13 @@ void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rTex
bool bEndOfParagraph,
bool bEndOfBullet,
const ::com::sun::star::lang::Locale* pLocale,
+ const Color& rOverlineColor,
const Color& rTextLineColor)
{
// why do bullet here at all? Just use GetEditEnginePtr()->PaintingFirstLine
// inside of ImpEditEngine::Paint which calls pOwner->PaintBullet with the correct
// values for hor and ver. No change for not-layouting (painting).
- // changed, bullet rendering now using PaintBullet via
+ // changed, bullet rendering now using PaintBullet via
/* if ( nIndex == 0 )
{
// Dann das Bullet 'malen', dort wird bStrippingPortions ausgewertet
@@ -197,7 +198,7 @@ void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rTex
// #101498#
pOwner->DrawingText(rStartPos,rText,nTextStart,nTextLen,pDXArray,rFont,nPara,nIndex,nRightToLeft,
- pWrongSpellVector, pFieldData, bEndOfLine, bEndOfParagraph, bEndOfBullet, pLocale, rTextLineColor);
+ pWrongSpellVector, pFieldData, bEndOfLine, bEndOfParagraph, bEndOfBullet, pLocale, rOverlineColor, rTextLineColor);
}
void OutlinerEditEng::FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos )
diff --git a/svx/source/outliner/outleeng.hxx b/svx/source/outliner/outleeng.hxx
index 4fb43dacaa..cf4d7d13a9 100644
--- a/svx/source/outliner/outleeng.hxx
+++ b/svx/source/outliner/outleeng.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,9 +43,9 @@ class OutlinerEditEng : public EditEngine
Outliner* pOwner;
protected:
-
- // derived from EditEngine. Allows Outliner objetcs to provide
- // bullet access to the EditEngine.
+
+ // derived from EditEngine. Allows Outliner objetcs to provide
+ // bullet access to the EditEngine.
virtual const SvxNumberFormat* GetNumberFormat( USHORT nPara ) const;
public:
@@ -60,7 +60,7 @@ public:
// #101498#
virtual void DrawingText(
- const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont,
+ const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont,
USHORT nPara, USHORT nIndex, BYTE nRightToLeft,
const EEngineData::WrongSpellVector* pWrongSpellVector,
const SvxFieldData* pFieldData,
@@ -68,6 +68,7 @@ public:
bool bEndOfParagraph,
bool bEndOfBullet,
const ::com::sun::star::lang::Locale* pLocale,
+ const Color& rOverlineColor,
const Color& rTextLineColor);
virtual void StyleSheetChanged( SfxStyleSheet* pStyle );
@@ -87,7 +88,7 @@ public:
virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet );
// belongs into class Outliner, move there before incompatible update!
- Link aOutlinerNotifyHdl;
+ Link aOutlinerNotifyHdl;
NotifyList aNotifyCache;
};
diff --git a/svx/source/outliner/outliner.cxx b/svx/source/outliner/outliner.cxx
index 9e29502f25..d5adb9294a 100644
--- a/svx/source/outliner/outliner.cxx
+++ b/svx/source/outliner/outliner.cxx
@@ -1,13 +1,13 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: outliner.cxx,v $
- * $Revision: 1.74.6.2 $
+ * $Revision: 1.75.20.2 $
*
* This file is part of OpenOffice.org.
*
@@ -200,7 +200,7 @@ void Outliner::ParagraphDeleted( USHORT nPara )
Paragraph* pPara = pParaList->GetParagraph( nPara );
if (!pPara)
return;
-
+
sal_Int16 nDepth = pPara->GetDepth();
if( !pEditEngine->IsInUndo() )
@@ -244,14 +244,14 @@ void Outliner::Init( USHORT nMode )
case OUTLINERMODE_TEXTOBJECT:
case OUTLINERMODE_TITLEOBJECT:
break;
-
+
case OUTLINERMODE_OUTLINEOBJECT:
nCtrl |= EE_CNTRL_OUTLINER2;
break;
case OUTLINERMODE_OUTLINEVIEW:
nCtrl |= EE_CNTRL_OUTLINER;
break;
-
+
default: DBG_ERROR( "Outliner::Init - Invalid Mode!" );
}
@@ -694,7 +694,7 @@ void Outliner::SetStyleSheet( ULONG nPara, SfxStyleSheet* pStyle )
DBG_CHKTHIS(Outliner,0);
Paragraph* pPara = pParaList->GetParagraph( nPara );
if (pPara)
- {
+ {
pEditEngine->SetStyleSheet( (USHORT)nPara, pStyle );
pPara->nFlags |= PARAFLAG_SETBULLETTEXT;
ImplCheckNumBulletItem( (USHORT) nPara );
@@ -707,7 +707,7 @@ void Outliner::SetVisible( Paragraph* pPara, BOOL bVisible )
DBG_ASSERT( pPara, "SetVisible: pPara = NULL" );
if (pPara)
- {
+ {
pPara->bVisible = bVisible;
ULONG nPara = pParaList->GetAbsPos( pPara );
pEditEngine->ShowParagraph( (USHORT)nPara, bVisible );
@@ -894,6 +894,7 @@ Font Outliner::ImpCalcBulletFont( USHORT nPara ) const
{
aBulletFont = aStdFont;
aBulletFont.SetUnderline( UNDERLINE_NONE );
+ aBulletFont.SetOverline( UNDERLINE_NONE );
aBulletFont.SetStrikeout( STRIKEOUT_NONE );
aBulletFont.SetEmphasisMark( EMPHASISMARK_NONE );
aBulletFont.SetRelief( RELIEF_NONE );
@@ -1016,16 +1017,16 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos,
aTextPos.Y() -= aMetric.GetDescent();
}
- DrawingText(aTextPos, pPara->GetText(), 0, pPara->GetText().Len(), pBuf,
- aSvxFont, nPara, 0xFFFF, 0xFF, 0, 0, false, false, true, 0, Color());
-
+ DrawingText(aTextPos, pPara->GetText(), 0, pPara->GetText().Len(), pBuf,
+ aSvxFont, nPara, 0xFFFF, 0xFF, 0, 0, false, false, true, 0, Color(), Color());
+
delete[] pBuf;
}
else
{
pOutDev->DrawText( aTextPos, pPara->GetText() );
}
-
+
pOutDev->SetFont( aOldFont );
}
else
@@ -1057,7 +1058,7 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos,
// created DrawBulletInfo and added handling to sdrtextdecomposition.cxx
DrawBulletInfo aDrawBulletInfo(
*pFmt->GetBrush()->GetGraphicObject(),
- aBulletPos,
+ aBulletPos,
pPara->aBulSize);
aDrawBulletHdl.Call(&aDrawBulletInfo);
@@ -1443,7 +1444,7 @@ const SvxNumberFormat* Outliner::GetNumberFormat( USHORT nPara ) const
Paragraph* pPara = pParaList->GetParagraph( nPara );
if (pPara == NULL)
return NULL;
-
+
sal_Int16 nDepth = pPara? pPara->GetDepth() : -1;
if( nDepth >= 0 )
@@ -1579,7 +1580,7 @@ Rectangle Outliner::ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnP
// the ODF attribut text:space-before which holds the spacing to add to the left of the label
const short nSpaceBefore = pFmt->GetAbsLSpace() + pFmt->GetFirstLineOffset();
-
+
const SvxLRSpaceItem& rLR = (const SvxLRSpaceItem&) pEditEngine->GetParaAttrib( nPara, bOutlineMode ? EE_PARA_OUTLLRSPACE : EE_PARA_LRSPACE );
aTopLeft.X() = rLR.GetTxtLeft() + rLR.GetTxtFirstLineOfst() + nSpaceBefore;
@@ -1592,7 +1593,7 @@ Rectangle Outliner::ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnP
// Bei zentriert/rechtsbuendig anpassen
const SvxAdjustItem& rItem = (const SvxAdjustItem&)pEditEngine->GetParaAttrib( nPara, EE_PARA_JUST );
if ( ( !pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SVX_ADJUST_LEFT ) ) ||
- ( pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SVX_ADJUST_RIGHT ) ) )
+ ( pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SVX_ADJUST_RIGHT ) ) )
{
aTopLeft.X() = pEditEngine->GetFirstLineStartX( nPara ) - nBulletWidth;
}
@@ -1683,11 +1684,11 @@ EBulletInfo Outliner::GetBulletInfo( USHORT nPara )
aInfo.nType = pFmt ? pFmt->GetNumberingType() : 0;
if( pFmt )
- {
+ {
if( pFmt->GetNumberingType() != SVX_NUM_BITMAP )
{
aInfo.aText = ImplGetBulletText( nPara );
-
+
if( pFmt->GetBulletFont() )
aInfo.aFont = *pFmt->GetBulletFont();
}
@@ -1696,7 +1697,7 @@ EBulletInfo Outliner::GetBulletInfo( USHORT nPara )
aInfo.aGraphic = pFmt->GetBrush()->GetGraphicObject()->GetGraphic();
}
}
-
+
if ( aInfo.bVisible )
{
aInfo.aBounds = ImpCalcBulletArea( nPara, TRUE, TRUE );
@@ -1745,7 +1746,7 @@ void Outliner::StripPortions()
}
// #101498#
-void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray,const SvxFont& rFont,
+void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray,const SvxFont& rFont,
USHORT nPara, USHORT nIndex, BYTE nRightToLeft,
const EEngineData::WrongSpellVector* pWrongSpellVector,
const SvxFieldData* pFieldData,
@@ -1753,16 +1754,17 @@ void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, USHO
bool bEndOfParagraph,
bool bEndOfBullet,
const ::com::sun::star::lang::Locale* pLocale,
+ const Color& rOverlineColor,
const Color& rTextLineColor)
{
DBG_CHKTHIS(Outliner,0);
-
+
if(aDrawPortionHdl.IsSet())
{
// #101498#
- DrawPortionInfo aInfo( rStartPos, rText, nTextStart, nTextLen, rFont, nPara, nIndex, pDXArray, pWrongSpellVector,
- pFieldData, pLocale, rTextLineColor, nRightToLeft, bEndOfLine, bEndOfParagraph, bEndOfBullet);
-
+ DrawPortionInfo aInfo( rStartPos, rText, nTextStart, nTextLen, rFont, nPara, nIndex, pDXArray, pWrongSpellVector,
+ pFieldData, pLocale, rOverlineColor, rTextLineColor, nRightToLeft, bEndOfLine, bEndOfParagraph, bEndOfBullet);
+
aDrawPortionHdl.Call( &aInfo );
}
}
@@ -1852,7 +1854,7 @@ sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pPar
{
pPara = pParaList->GetParagraph( nPara );
const sal_Int16 nDepth = pPara->GetDepth();
-
+
// ignore paragraphs that are below our paragraph
if( nDepth > nParaDepth )
continue;
@@ -1981,7 +1983,7 @@ String Outliner::ImplGetBulletText( USHORT nPara )
// if( pPara->nFlags & PARAFLAG_SETBULLETTEXT )
ImplCalcBulletText( nPara, FALSE, FALSE );
aRes = pPara->GetText();
- }
+ }
return aRes;
}
@@ -2031,7 +2033,7 @@ IMPL_LINK( Outliner, EditEngineNotifyHdl, EENotify*, pNotify )
EENotify* pNewNotify = new EENotify( *pNotify );
pEditEngine->aNotifyCache.Insert( pNewNotify, pEditEngine->aNotifyCache.Count() );
}
-
+
return 0;
}
@@ -2097,8 +2099,8 @@ bool Outliner::HasParaFlag( const Paragraph* pPara, sal_uInt16 nFlag ) const
}
-sal_Bool DrawPortionInfo::IsRTL() const
-{
+sal_Bool DrawPortionInfo::IsRTL() const
+{
if(0xFF == mnBiDiLevel)
{
// Use Bidi functions from icu 2.0 to calculate if this portion
@@ -2109,7 +2111,7 @@ sal_Bool DrawPortionInfo::IsRTL() const
// I do not have this info here. Is it necessary? I'll have to ask MT.
const BYTE nDefaultDir = UBIDI_LTR; //IsRightToLeft( nPara ) ? UBIDI_RTL : UBIDI_LTR;
-
+
ubidi_setPara(pBidi, mrText.GetBuffer(), mrText.Len(), nDefaultDir, NULL, &nError);
nError = U_ZERO_ERROR;
@@ -2127,7 +2129,7 @@ sal_Bool DrawPortionInfo::IsRTL() const
((DrawPortionInfo*)this)->mnBiDiLevel = nCurrDir;
}
- return (1 == (mnBiDiLevel % 2));
+ return (1 == (mnBiDiLevel % 2));
}
// eof
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 46dd3625fa..867c0956ca 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 1e3c1d6b37..df52800ab4 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 05bf6ab856..323a493cc7 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -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:
@@ -174,7 +200,7 @@ namespace
{
basegfx::B2DVector aSize;
drawinglayer::primitive2d::FontAttributes aFontAttributes(drawinglayer::primitive2d::getFontAttributesFromVclFont(
- aSize,
+ aSize,
rInfo.mrFont,
rInfo.IsRTL(),
false));
@@ -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,16 +330,20 @@ 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(
-
+
// attributes for TextSimplePortionPrimitive2D
aNewTransform,
- rInfo.mrText,
- rInfo.mnTextStart,
+ rInfo.mrText,
+ rInfo.mnTextStart,
rInfo.mnTextLen,
aDXArray,
aFontAttributes,
@@ -340,7 +351,9 @@ namespace
aBFontColor,
// attributes for TextDecoratedPortionPrimitive2D
- aBLineColor,
+ aBOverlineColor,
+ aBUnderlineColor,
+ eFontOverline,
eFontUnderline,
bUnderlineAbove,
eFontStrikeout,
@@ -364,7 +377,7 @@ namespace
pNewPrimitive = impCheckFieldPrimitive(pNewPrimitive, rInfo);
}
- maTextPortionPrimitives.push_back(pNewPrimitive);
+ maTextPortionPrimitives.push_back(pNewPrimitive);
// support for WrongSpellVector. Create WrongSpellPrimitives as needed
if(rInfo.mpWrongSpellVector && !aDXArray.empty())
@@ -398,7 +411,7 @@ namespace
{
maTextPortionPrimitives.push_back(new drawinglayer::primitive2d::WrongSpellPrimitive2D(
aNewTransform,
- fStart,
+ fStart,
fEnd,
aSpellColor));
}
@@ -419,7 +432,7 @@ namespace
// embed current primitive to a sequence
drawinglayer::primitive2d::Primitive2DSequence aSequence;
-
+
if(pPrimitive)
{
aSequence.realloc(1);
@@ -501,16 +514,16 @@ namespace
// create GraphicPrimitive2D
const drawinglayer::primitive2d::Primitive2DReference aNewReference(new drawinglayer::primitive2d::GraphicPrimitive2D(
- aNewTransform,
- rInfo.maBulletGraphicObject,
+ aNewTransform,
+ rInfo.maBulletGraphicObject,
aGraphicAttr));
// embed in TextHierarchyBulletPrimitive2D
const drawinglayer::primitive2d::Primitive2DSequence aNewSequence(&aNewReference, 1);
drawinglayer::primitive2d::BasePrimitive2D* pNewPrimitive = new drawinglayer::primitive2d::TextHierarchyBulletPrimitive2D(aNewSequence);
-
+
// add to output
- maTextPortionPrimitives.push_back(pNewPrimitive);
+ maTextPortionPrimitives.push_back(pNewPrimitive);
}
IMPL_LINK(impTextBreakupHandler, decomposeContourTextPrimitive, DrawPortionInfo*, pInfo)
@@ -575,8 +588,8 @@ namespace
return 0;
}
- drawinglayer::primitive2d::Primitive2DSequence impTextBreakupHandler::getPrimitive2DSequence()
- {
+ drawinglayer::primitive2d::Primitive2DSequence impTextBreakupHandler::getPrimitive2DSequence()
+ {
if(maTextPortionPrimitives.size())
{
// collect non-closed lines
@@ -602,7 +615,7 @@ bool SdrTextObj::impCheckSpellCheckForDecomposeTextPrimitive() const
}
bool SdrTextObj::impDecomposeContourTextPrimitive(
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DSequence& rTarget,
const drawinglayer::primitive2d::SdrContourTextPrimitive2D& rSdrContourTextPrimitive,
const drawinglayer::geometry::ViewInformation2D& aViewInformation) const
{
@@ -657,7 +670,7 @@ bool SdrTextObj::impDecomposeContourTextPrimitive(
}
bool SdrTextObj::impDecomposeBlockTextPrimitive(
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DSequence& rTarget,
const drawinglayer::primitive2d::SdrBlockTextPrimitive2D& rSdrBlockTextPrimitive,
const drawinglayer::geometry::ViewInformation2D& aViewInformation) const
{
diff --git a/svx/source/svdraw/svdstr.src b/svx/source/svdraw/svdstr.src
index 4a1f1e9ed2..f577928354 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";
diff --git a/svx/source/svrtf/rtfitem.cxx b/svx/source/svrtf/rtfitem.cxx
index 419c6c934a..45a0d0f461 100644
--- a/svx/source/svrtf/rtfitem.cxx
+++ b/svx/source/svrtf/rtfitem.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: rtfitem.cxx,v $
- * $Revision: 1.35 $
+ * $Revision: 1.35.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -108,8 +108,6 @@ inline const SvxEscapementItem& GetEscapement(const SfxItemSet& rSet,USHORT nId,
{ return (const SvxEscapementItem&)rSet.Get( nId,bInP); }
inline const SvxLineSpacingItem& GetLineSpacing(const SfxItemSet& rSet,USHORT nId,BOOL bInP=TRUE)
{ return (const SvxLineSpacingItem&)rSet.Get( nId,bInP); }
-inline const SvxUnderlineItem& GetUnderline(const SfxItemSet& rSet,USHORT nId,BOOL bInP=TRUE)
- { return (const SvxUnderlineItem&)rSet.Get( nId,bInP); }
// frm
inline const SvxLRSpaceItem& GetLRSpace(const SfxItemSet& rSet,USHORT nId,BOOL bInP=TRUE)
{ return (const SvxLRSpaceItem&)rSet.Get( nId,bInP); }
@@ -229,6 +227,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
int bFirstToken = TRUE, bWeiter = TRUE;
USHORT nStyleNo = 0; // default
FontUnderline eUnderline;
+ FontUnderline eOverline;
FontEmphasisMark eEmphasis;
bPardTokenRead = FALSE;
RTF_CharTypeDef eCharType = NOTDEF_CHARTYPE;
@@ -847,28 +846,122 @@ ATTR_SETUNDERLINE:
case RTF_ULC:
if( PLAINID->nUnderline )
{
- SvxUnderlineItem aUL( UNDERLINE_SINGLE,
- PLAINID->nUnderline );
+ SvxUnderlineItem aUL( UNDERLINE_SINGLE, PLAINID->nUnderline );
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pSet->GetItemState(
PLAINID->nUnderline, FALSE, &pItem ) )
{
// is switched off ?
if( UNDERLINE_NONE ==
- ((SvxUnderlineItem*)pItem)->GetUnderline() )
+ ((SvxUnderlineItem*)pItem)->GetLineStyle() )
break;
aUL = *(SvxUnderlineItem*)pItem;
}
else
- aUL = GetUnderline( *pSet, PLAINID->nUnderline, FALSE );
+ aUL = (const SvxUnderlineItem&)pSet->Get( PLAINID->nUnderline, FALSE );
- if( UNDERLINE_NONE == aUL.GetUnderline() )
- aUL.SetUnderline( UNDERLINE_SINGLE );
+ if( UNDERLINE_NONE == aUL.GetLineStyle() )
+ aUL.SetLineStyle( UNDERLINE_SINGLE );
aUL.SetColor( GetColor( USHORT(nTokenValue) ));
pSet->Put( aUL );
}
break;
+ case RTF_OL:
+ if( !IsAttrSttPos() )
+ break;
+ eOverline = nTokenValue ? UNDERLINE_SINGLE : UNDERLINE_NONE;
+ goto ATTR_SETOVERLINE;
+
+ case RTF_OLD:
+ eOverline = UNDERLINE_DOTTED;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLDASH:
+ eOverline = UNDERLINE_DASH;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLDASHD:
+ eOverline = UNDERLINE_DASHDOT;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLDASHDD:
+ eOverline = UNDERLINE_DASHDOTDOT;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLDB:
+ eOverline = UNDERLINE_DOUBLE;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLNONE:
+ eOverline = UNDERLINE_NONE;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLTH:
+ eOverline = UNDERLINE_BOLD;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLWAVE:
+ eOverline = UNDERLINE_WAVE;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLTHD:
+ eOverline = UNDERLINE_BOLDDOTTED;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLTHDASH:
+ eOverline = UNDERLINE_BOLDDASH;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLLDASH:
+ eOverline = UNDERLINE_LONGDASH;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLTHLDASH:
+ eOverline = UNDERLINE_BOLDLONGDASH;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLTHDASHD:
+ eOverline = UNDERLINE_BOLDDASHDOT;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLTHDASHDD:
+ eOverline = UNDERLINE_BOLDDASHDOTDOT;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLHWAVE:
+ eOverline = UNDERLINE_BOLDWAVE;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLOLDBWAVE:
+ eOverline = UNDERLINE_DOUBLEWAVE;
+ goto ATTR_SETOVERLINE;
+
+ case RTF_OLW:
+ eOverline = UNDERLINE_SINGLE;
+
+ if( PLAINID->nWordlineMode )
+ {
+ pSet->Put( SvxWordLineModeItem( TRUE, PLAINID->nWordlineMode ));
+ }
+ goto ATTR_SETOVERLINE;
+
+ATTR_SETOVERLINE:
+ if( PLAINID->nUnderline )
+ {
+ pSet->Put( SvxOverlineItem( eOverline, PLAINID->nOverline ));
+ }
+ break;
+
+ case RTF_OLC:
+ if( PLAINID->nOverline )
+ {
+ SvxOverlineItem aOL( UNDERLINE_SINGLE, PLAINID->nOverline );
+ const SfxPoolItem* pItem;
+ if( SFX_ITEM_SET == pSet->GetItemState(
+ PLAINID->nOverline, FALSE, &pItem ) )
+ {
+ // is switched off ?
+ if( UNDERLINE_NONE ==
+ ((SvxOverlineItem*)pItem)->GetLineStyle() )
+ break;
+ aOL = *(SvxOverlineItem*)pItem;
+ }
+ else
+ aOL = (const SvxOverlineItem&)pSet->Get( PLAINID->nUnderline, FALSE );
+
+ if( UNDERLINE_NONE == aOL.GetLineStyle() )
+ aOL.SetLineStyle( UNDERLINE_SINGLE );
+ aOL.SetColor( GetColor( USHORT(nTokenValue) ));
+ pSet->Put( aOL );
+ }
+ break;
+
case RTF_UP:
case RTF_SUPER:
if( PLAINID->nEscapement )
diff --git a/svx/source/svrtf/svxrtf.cxx b/svx/source/svrtf/svxrtf.cxx
index 5bd443c418..8808a1dfd9 100644
--- a/svx/source/svrtf/svxrtf.cxx
+++ b/svx/source/svrtf/svxrtf.cxx
@@ -1,13 +1,13 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svxrtf.cxx,v $
- * $Revision: 1.34.216.1 $
+ * $Revision: 1.34.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -1086,7 +1086,7 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen
_ClearStyleAttr( *pOld );
#else
/*
- #i21422#
+ #i21422#
If the parent (pAkt) sets something e.g. , and the child (pOld)
unsets it and the style both are based on has it unset then
clearing the pOld by looking at the style is clearly a disaster
@@ -1239,7 +1239,7 @@ SvxRTFStyleType::SvxRTFStyleType( SfxItemPool& rPool, const USHORT* pWhichRange
: aAttrSet( rPool, pWhichRange )
{
nOutlineNo = BYTE(-1); // nicht gesetzt
- nBasedOn = 0;
+ nBasedOn = 0;
bBasedOnIsSet = FALSE; //$flr #117411#
nNext = 0;
bIsCharFmt = FALSE;
@@ -1469,6 +1469,7 @@ RTFPlainAttrMapIds::RTFPlainAttrMapIds( const SfxItemPool& rPool )
nPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_POSTURE, FALSE );
nShadowed = rPool.GetTrueWhich( SID_ATTR_CHAR_SHADOWED, FALSE );
nUnderline = rPool.GetTrueWhich( SID_ATTR_CHAR_UNDERLINE, FALSE );
+ nOverline = rPool.GetTrueWhich( SID_ATTR_CHAR_OVERLINE, FALSE );
nWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_WEIGHT, FALSE );
nWordlineMode = rPool.GetTrueWhich( SID_ATTR_CHAR_WORDLINEMODE, FALSE );
nAutoKerning = rPool.GetTrueWhich( SID_ATTR_CHAR_AUTOKERN, FALSE );
diff --git a/svx/source/table/tablertfexporter.cxx b/svx/source/table/tablertfexporter.cxx
index 5856518eb1..1581e2decf 100644
--- a/svx/source/table/tablertfexporter.cxx
+++ b/svx/source/table/tablertfexporter.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: tablertfexporter.cxx,v $
- * $Revision: 1.3 $
+ * $Revision: 1.3.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -262,7 +262,7 @@ void SdrTableRtfExporter::WriteCell( sal_Int32 nCol, sal_Int32 nRow )
bResetAttr = true;
mrStrm << sRTF_I;
}
- if ( rUnderlineItem.GetUnderline() != UNDERLINE_NONE )
+ if ( rUnderlineItem.GetLineStyle() != UNDERLINE_NONE )
{ // underline
bResetAttr = true;
mrStrm << sRTF_UL;
diff --git a/svx/source/unodraw/unofdesc.cxx b/svx/source/unodraw/unofdesc.cxx
index 6596ab5c54..879b13ad5e 100644
--- a/svx/source/unodraw/unofdesc.cxx
+++ b/svx/source/unodraw/unofdesc.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: unofdesc.cxx,v $
- * $Revision: 1.7 $
+ * $Revision: 1.7.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -119,7 +119,7 @@ void SvxUnoFontDescriptor::FillItemSet( const awt::FontDescriptor& rDesc, SfxIte
{
SvxUnderlineItem aUnderlineItem( (FontUnderline)0, EE_CHAR_UNDERLINE );
aTemp <<= (sal_Int16)rDesc.Underline;
- ((SfxPoolItem*)&aUnderlineItem)->PutValue( aTemp, MID_UNDERLINE );
+ ((SfxPoolItem*)&aUnderlineItem)->PutValue( aTemp, MID_TL_STYLE );
rSet.Put( aUnderlineItem );
}
@@ -171,7 +171,7 @@ void SvxUnoFontDescriptor::FillFromItemSet( const SfxItemSet& rSet, awt::FontDes
{
pItem = &rSet.Get( EE_CHAR_UNDERLINE, TRUE );
uno::Any aUnderline;
- if(pItem->QueryValue( aUnderline, MID_UNDERLINE ))
+ if(pItem->QueryValue( aUnderline, MID_TL_STYLE ))
aUnderline >>= rDesc.Underline;
}
{
diff --git a/svx/workben/edittest.cxx b/svx/workben/edittest.cxx
index 8787b922a1..13cd4ea698 100644
--- a/svx/workben/edittest.cxx
+++ b/svx/workben/edittest.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: edittest.cxx,v $
- * $Revision: 1.20 $
+ * $Revision: 1.20.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -676,7 +676,7 @@ void EditMainWindow::UpdateToolBox()
break;
case EE_CHAR_UNDERLINE:
{
- aToolBox.CheckItem( TB_UNDERLINE, ((SvxUnderlineItem&)rItem).GetUnderline() );
+ aToolBox.CheckItem( TB_UNDERLINE, ((SvxUnderlineItem&)rItem).GetLineStyle() );
}
break;
case EE_CHAR_WLM:
@@ -1222,7 +1222,7 @@ IMPL_LINK( EditMainWindow, TBSelect, ToolBox *, p )
break;
case EE_CHAR_UNDERLINE:
aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "FontUnderline=" ) );
- aDebStr += String::CreateFromInt32( ((SvxUnderlineItem&)rItem).GetUnderline() );
+ aDebStr += String::CreateFromInt32( ((SvxUnderlineItem&)rItem).GetLineStyle() );
break;
case EE_CHAR_WLM:
aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "WordLineMode=" ) );
diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx
index e687f79edc..1ed5b0fa82 100644
--- a/xmloff/inc/xmloff/xmltoken.hxx
+++ b/xmloff/inc/xmloff/xmltoken.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: xmltoken.hxx,v $
- * $Revision: 1.26.2.3 $
+ * $Revision: 1.27.6.2 $
*
* This file is part of OpenOffice.org.
*
@@ -2414,6 +2414,12 @@ namespace xmloff { namespace token {
XML_TEXT_UNDERLINE_TYPE,
XML_TEXT_UNDERLINE_WIDTH,
+ XML_TEXT_OVERLINE_TYPE,
+ XML_TEXT_OVERLINE_STYLE,
+ XML_TEXT_OVERLINE_WIDTH,
+ XML_TEXT_OVERLINE_COLOR,
+ XML_TEXT_OVERLINE_MODE,
+
XML_TEXT_LINE_THROUGH_STYLE,
XML_TEXT_LINE_THROUGH_TYPE,
XML_TEXT_LINE_THROUGH_WIDTH,
@@ -3044,7 +3050,7 @@ namespace xmloff { namespace token {
XML_IGNORE,
// enhanced fields
- XML_FIELDMARK,
+ XML_FIELDMARK,
XML_FIELDMARK_START,
XML_FIELDMARK_END,
XML_N_FIELD,
diff --git a/xmloff/inc/xmloff/xmltypes.hxx b/xmloff/inc/xmloff/xmltypes.hxx
index 54514cf0b6..7deb386139 100644
--- a/xmloff/inc/xmloff/xmltypes.hxx
+++ b/xmloff/inc/xmloff/xmltypes.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: xmltypes.hxx,v $
- * $Revision: 1.6 $
+ * $Revision: 1.6.36.1 $
*
* This file is part of OpenOffice.org.
*
@@ -277,9 +277,14 @@
#define XML_TYPE_TEXT_USE_SOFT_PAGE_BREAKS (XML_TEXT_TYPES_START + 107)
#define XML_TYPE_TEXT_CLIP (XML_TEXT_TYPES_START + 108)
+#define XML_TYPE_TEXT_OVERLINE_TYPE (XML_TEXT_TYPES_START + 108)
+#define XML_TYPE_TEXT_OVERLINE_STYLE (XML_TEXT_TYPES_START + 109)
+#define XML_TYPE_TEXT_OVERLINE_WIDTH (XML_TEXT_TYPES_START + 110)
+#define XML_TYPE_TEXT_OVERLINE_COLOR (XML_TEXT_TYPES_START + 111)
+#define XML_TYPE_TEXT_OVERLINE_HASCOLOR (XML_TEXT_TYPES_START + 112)
+
#define XML_SCH_TYPES_START (0x4 << XML_TYPE_APP_SHIFT)
#define XML_PM_TYPES_START (0x5 << XML_TYPE_APP_SHIFT) // page master
#define XML_DB_TYPES_START (0x6 << XML_TYPE_APP_SHIFT)
#endif // _XMLOFF_XMLTYPES_HXX
-
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index ed7dbe587f..d20e05cbe9 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: xmltoken.cxx,v $
- * $Revision: 1.130.2.3 $
+ * $Revision: 1.131.6.2 $
*
* This file is part of OpenOffice.org.
*
@@ -2420,6 +2420,12 @@ namespace xmloff { namespace token {
TOKEN( "text-underline-type", XML_TEXT_UNDERLINE_TYPE ),
TOKEN( "text-underline-width", XML_TEXT_UNDERLINE_WIDTH ),
+ TOKEN( "text-overline-type", XML_TEXT_OVERLINE_TYPE ),
+ TOKEN( "text-overline-style", XML_TEXT_OVERLINE_STYLE ),
+ TOKEN( "text-overline-width", XML_TEXT_OVERLINE_WIDTH ),
+ TOKEN( "text-overline-color", XML_TEXT_OVERLINE_COLOR ),
+ TOKEN( "text-overline-mode", XML_TEXT_OVERLINE_MODE ),
+
TOKEN( "text-line-through-style", XML_TEXT_LINE_THROUGH_STYLE ),
TOKEN( "text-line-through-type", XML_TEXT_LINE_THROUGH_TYPE ),
TOKEN( "text-line-through-width", XML_TEXT_LINE_THROUGH_WIDTH ),
@@ -3023,7 +3029,7 @@ namespace xmloff { namespace token {
TOKEN( "cell-range" , XML_CELL_RANGE ),
TOKEN( "error-lower-range", XML_ERROR_LOWER_RANGE ),
TOKEN( "error-upper-range", XML_ERROR_UPPER_RANGE ),
-
+
// --> OD 2008-04-22 #refactorlists#
TOKEN( "continue-list", XML_CONTINUE_LIST ),
TOKEN( "style-override", XML_STYLE_OVERRIDE ),
diff --git a/xmloff/source/style/prhdlfac.cxx b/xmloff/source/style/prhdlfac.cxx
index 286559b00b..81530e129c 100644
--- a/xmloff/source/style/prhdlfac.cxx
+++ b/xmloff/source/style/prhdlfac.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: prhdlfac.cxx,v $
- * $Revision: 1.30 $
+ * $Revision: 1.30.68.1 $
*
* This file is part of OpenOffice.org.
*
@@ -326,6 +326,22 @@ const XMLPropertyHandler* XMLPropertyHandlerFactory::CreatePropertyHandler( sal_
pPropHdl = new XMLIsTransparentPropHdl( XML_FONT_COLOR,
sal_False );
break;
+ case XML_TYPE_TEXT_OVERLINE_TYPE:
+ pPropHdl = new XMLUnderlineTypePropHdl;
+ break;
+ case XML_TYPE_TEXT_OVERLINE_STYLE:
+ pPropHdl = new XMLUnderlineStylePropHdl;
+ break;
+ case XML_TYPE_TEXT_OVERLINE_WIDTH:
+ pPropHdl = new XMLUnderlineWidthPropHdl;
+ break;
+ case XML_TYPE_TEXT_OVERLINE_COLOR:
+ pPropHdl = new XMLColorTransparentPropHdl( XML_FONT_COLOR );
+ break;
+ case XML_TYPE_TEXT_OVERLINE_HASCOLOR:
+ pPropHdl = new XMLIsTransparentPropHdl( XML_FONT_COLOR,
+ sal_False );
+ break;
case XML_TYPE_TEXT_WEIGHT:
pPropHdl = new XMLFontWeightPropHdl;
break;
diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx
index ca48238758..83fa7436ff 100644
--- a/xmloff/source/text/txtprmap.cxx
+++ b/xmloff/source/text/txtprmap.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: txtprmap.cxx,v $
- * $Revision: 1.106 $
+ * $Revision: 1.106.36.1 $
*
* This file is part of OpenOffice.org.
*
@@ -151,7 +151,8 @@ XMLPropertyMapEntry aXMLParaPropMap[] =
MT_E( "CharWeight", FO, FONT_WEIGHT, XML_TYPE_TEXT_WEIGHT, 0 ),
// RES_CHRATR_WORDLINEMODE
MT_E( "CharWordMode", STYLE, TEXT_UNDERLINE_MODE, XML_TYPE_TEXT_LINE_MODE|MID_FLAG_MERGE_PROPERTY, 0 ),
- MT_E( "CharWordMode", STYLE, TEXT_LINE_THROUGH_MODE, XML_TYPE_TEXT_LINE_MODE|MID_FLAG_MERGE_PROPERTY, 0 ),
+ MT_E( "CharWordMode", STYLE, TEXT_OVERLINE_MODE, XML_TYPE_TEXT_LINE_MODE|MID_FLAG_MERGE_PROPERTY, 0 ),
+ MT_E( "CharWordMode", STYLE, TEXT_LINE_THROUGH_MODE, XML_TYPE_TEXT_LINE_MODE|MID_FLAG_MERGE_PROPERTY, 0 ),
// RES_CHRATR_AUTOKERN
MT_E( "CharAutoKerning", STYLE, LETTER_KERNING, XML_TYPE_BOOL, 0 ),
// RES_CHRATR_BLINK
@@ -215,6 +216,12 @@ XMLPropertyMapEntry aXMLParaPropMap[] =
MT_E( "CharRelief", STYLE, FONT_RELIEF, XML_TYPE_TEXT_FONT_RELIEF, 0 ),
// RES_CHRATR_HIDDEN
MT_E( "CharHidden", TEXT, DISPLAY, XML_TYPE_TEXT_HIDDEN_AS_DISPLAY|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_TEXT_DISPLAY ),
+ // RES_CHRATR_OVERLINE
+ MT_E( "CharOverline", STYLE, TEXT_OVERLINE_STYLE, XML_TYPE_TEXT_OVERLINE_STYLE|MID_FLAG_MERGE_PROPERTY, 0 ),
+ MT_E( "CharOverline", STYLE, TEXT_OVERLINE_TYPE, XML_TYPE_TEXT_OVERLINE_TYPE|MID_FLAG_MERGE_PROPERTY, 0 ),
+ MT_E( "CharOverline", STYLE, TEXT_OVERLINE_WIDTH, XML_TYPE_TEXT_OVERLINE_WIDTH|MID_FLAG_MERGE_PROPERTY, 0 ),
+ MT_E( "CharOverlineColor", STYLE, TEXT_OVERLINE_COLOR, XML_TYPE_TEXT_OVERLINE_COLOR|MID_FLAG_MULTI_PROPERTY, 0 ),
+ MT_E( "CharOverlineHasColor", STYLE, TEXT_OVERLINE_COLOR, XML_TYPE_TEXT_OVERLINE_HASCOLOR|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
// RES_TXTATR_INETFMT
// TODO
@@ -439,7 +446,8 @@ XMLPropertyMapEntry aXMLTextPropMap[] =
MT_E( "CharWeight", FO, FONT_WEIGHT, XML_TYPE_TEXT_WEIGHT, 0 ),
// RES_CHRATR_WORDLINEMODE
MT_E( "CharWordMode", STYLE, TEXT_UNDERLINE_MODE, XML_TYPE_TEXT_LINE_MODE|MID_FLAG_MERGE_PROPERTY, 0 ),
- MT_E( "CharWordMode", STYLE, TEXT_LINE_THROUGH_MODE, XML_TYPE_TEXT_LINE_MODE|MID_FLAG_MERGE_PROPERTY, 0 ),
+ MT_E( "CharWordMode", STYLE, TEXT_OVERLINE_MODE, XML_TYPE_TEXT_LINE_MODE|MID_FLAG_MERGE_PROPERTY, 0 ),
+ MT_E( "CharWordMode", STYLE, TEXT_LINE_THROUGH_MODE, XML_TYPE_TEXT_LINE_MODE|MID_FLAG_MERGE_PROPERTY, 0 ),
// RES_CHRATR_AUTOKERN
MT_E( "CharAutoKerning", STYLE, LETTER_KERNING, XML_TYPE_BOOL, 0 ),
// RES_CHRATR_BLINK
@@ -505,6 +513,12 @@ XMLPropertyMapEntry aXMLTextPropMap[] =
MT_E( "CharRelief", STYLE, FONT_RELIEF, XML_TYPE_TEXT_FONT_RELIEF, 0 ),
// RES_CHRATR_HIDDEN
MT_E( "CharHidden", TEXT, DISPLAY, XML_TYPE_TEXT_HIDDEN_AS_DISPLAY|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_TEXT_DISPLAY ),
+ // RES_CHRATR_OVERLINE
+ MT_E( "CharOverline", STYLE, TEXT_OVERLINE_STYLE, XML_TYPE_TEXT_OVERLINE_STYLE|MID_FLAG_MERGE_PROPERTY, 0 ),
+ MT_E( "CharOverline", STYLE, TEXT_OVERLINE_TYPE, XML_TYPE_TEXT_OVERLINE_TYPE|MID_FLAG_MERGE_PROPERTY, 0 ),
+ MT_E( "CharOverline", STYLE, TEXT_OVERLINE_WIDTH, XML_TYPE_TEXT_OVERLINE_WIDTH|MID_FLAG_MERGE_PROPERTY, 0 ),
+ MT_E( "CharOverlineColor", STYLE, TEXT_OVERLINE_COLOR, XML_TYPE_TEXT_OVERLINE_COLOR|MID_FLAG_MULTI_PROPERTY, 0 ),
+ MT_E( "CharOverlineHasColor", STYLE, TEXT_OVERLINE_COLOR, XML_TYPE_TEXT_OVERLINE_HASCOLOR|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
// RES_TXTATR_INETFMT
MT_E( "HyperLinkURL", TEXT, XMLNS, XML_TYPE_STRING|MID_FLAG_NO_PROPERTY_IMPORT, CTF_HYPERLINK_URL ),