diff options
55 files changed, 1462 insertions, 644 deletions
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx index 118c6d852ef4..4a7b300ecfb1 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx @@ -55,6 +55,7 @@ namespace drawinglayer { namespace primitive2d { + // This is used for both underline and overline enum FontUnderline { FONT_UNDERLINE_NONE, @@ -106,7 +107,9 @@ namespace drawinglayer class TextDecoratedPortionPrimitive2D : public TextSimplePortionPrimitive2D { private: + basegfx::BColor maOverlineColor; basegfx::BColor maTextlineColor; + FontUnderline meFontOverline; FontUnderline meFontUnderline; FontStrikeout meFontStrikeout; FontEmphasisMark meFontEmphasisMark; @@ -120,6 +123,16 @@ 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, basegfx::DecomposedB2DHomMatrixContainer& rDecTrans, @@ -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 d322ee87b48c..fa3746108136 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx @@ -79,6 +79,8 @@ namespace drawinglayer 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; diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx index 0e704093b04e..df4aa6a748ae 100644 --- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx @@ -55,6 +55,212 @@ 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, basegfx::DecomposedB2DHomMatrixContainer& rDecTrans, @@ -76,10 +282,11 @@ namespace drawinglayer 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; @@ -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) @@ -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: @@ -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 @@ -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), @@ -720,7 +744,9 @@ namespace drawinglayer { 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 a788416725d9..ad97637761e9 100644 --- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx +++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx @@ -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(); diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 9e397e7c36b0..55eee14d8120 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; diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index b7923632b0c8..bb82fedfe7fd 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 713f39f5ab5a..64c7028dc0b1 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 439b0618f9f1..d40ca4de1876 100644 --- a/svx/inc/globlmn_tmpl.hrc +++ b/svx/inc/globlmn_tmpl.hrc @@ -7,7 +7,7 @@ * 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. * @@ -140,6 +140,12 @@ 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" ; \ diff --git a/svx/inc/svdstr.hrc b/svx/inc/svdstr.hrc index 03b4858a861b..cb1b85079f37 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 6c3955683e5e..d5176034a301 100644 --- a/svx/inc/svx/editeng.hxx +++ b/svx/inc/svx/editeng.hxx @@ -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; diff --git a/svx/inc/svx/eeitem.hxx b/svx/inc/svx/eeitem.hxx index 7ce56a45b088..53202b795170 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 0ca9822fa37b..088762f7fe10 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 32351252c4f8..9fc20b815494 100644 --- a/svx/inc/svx/outliner.hxx +++ b/svx/inc/svx/outliner.hxx @@ -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. @@ -456,6 +457,7 @@ public: const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, const ::com::sun::star::lang::Locale* pLocale, + const Color& rOverlineColor, const Color& rTextLineColor, BYTE nBiDiLevel, bool bEndOfLine, @@ -472,6 +474,7 @@ public: mpWrongSpellVector(pWrongSpellVector), mpFieldData(pFieldData), mpLocale(pLocale), + maOverlineColor(rOverlineColor), maTextLineColor(rTextLineColor), mnBiDiLevel(nBiDiLevel), mbEndOfLine(bEndOfLine), @@ -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 0df801e90e4d..019211697711 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 5e10783b4968..ca27f07b9602 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 a74d2e64ebb2..f4c44d228b04 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 9b589301b90a..7f28e5677043 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 7662eea8706f..3d26d1b09836 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 896494c5a810..f66e37033759 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 f43d6fb6644d..f372c6ad5e4b 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 30bae65cc655..91f326e862b0 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 4b811dee5321..795f2aea1177 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 1134e13e152e..b1969f17a185 100644 --- a/svx/source/dialog/chardlg.cxx +++ b/svx/source/dialog/chardlg.cxx @@ -7,7 +7,7 @@ * 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_aUnderlineColorLB.SelectEntryPos( nPos ); + else + { + nPos = m_aUnderlineColorLB.GetEntryPos( aColor ); + if ( LISTBOX_ENTRY_NOTFOUND != nPos ) + m_aUnderlineColorLB.SelectEntryPos( nPos ); + else + m_aUnderlineColorLB.SelectEntryPos( + m_aUnderlineColorLB.InsertEntry( aColor, + String( SVX_RES( RID_SVXSTR_COLOR_USER ) ) ) ); + } + } + else + { + 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_aColorLB.SelectEntryPos( nPos ); + m_aOverlineColorLB.SelectEntryPos( nPos ); else { - nPos = m_aColorLB.GetEntryPos( aColor ); + nPos = m_aOverlineColorLB.GetEntryPos( aColor ); if ( LISTBOX_ENTRY_NOTFOUND != nPos ) - m_aColorLB.SelectEntryPos( nPos ); + m_aOverlineColorLB.SelectEntryPos( nPos ); else - m_aColorLB.SelectEntryPos( - m_aColorLB.InsertEntry( aColor, + m_aOverlineColorLB.SelectEntryPos( + m_aOverlineColorLB.InsertEntry( aColor, String( SVX_RES( RID_SVXSTR_COLOR_USER ) ) ) ); } } else { - m_aColorLB.SelectEntry( Color( COL_AUTO )); - m_aColorLB.Disable(); + 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 5f8466073148..63faba788bbe 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 763cefa0cf47..d767d8ddd8f3 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 261010ee8912..b51008e285f6 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 c2069e552cf8..7dd1516a2a5c 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 7dad4d347ad8..6c964590bbea 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 19cace6abc35..8a2cde5f7522 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 05aa13dba68f..d5f5cbff507f 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 bd0ebbe015a3..9a0b1d593f40 100644 --- a/svx/source/editeng/editeng.cxx +++ b/svx/source/editeng/editeng.cxx @@ -2455,7 +2455,8 @@ ParagraphInfos EditEngine::GetParagraphInfos( sal_uInt16 nPara ) 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 ::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 fc3f2b4e24de..0d1872f96549 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 d41bf6793ff2..24c0ba28ab69 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 cbccd8211aa8..cae9847de8b7 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 8c8f787690fd..73665766a3a4 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 4a446ed539fe..8ca108153cfa 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 71001b6b0197..d5188bdde22f 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 1fb1a5bde15d..50c18cd14b17 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 76404849c281..47786327293f 100644 --- a/svx/source/outliner/outleeng.cxx +++ b/svx/source/outliner/outleeng.cxx @@ -163,6 +163,7 @@ 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 @@ -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 9dbd3ae071c5..be7c2084d717 100644 --- a/svx/source/outliner/outleeng.hxx +++ b/svx/source/outliner/outleeng.hxx @@ -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 ); diff --git a/svx/source/outliner/outliner.cxx b/svx/source/outliner/outliner.cxx index c46f8afccebb..2ff45f2865c2 100644 --- a/svx/source/outliner/outliner.cxx +++ b/svx/source/outliner/outliner.cxx @@ -7,7 +7,7 @@ * 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. * @@ -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 ); @@ -1017,7 +1018,7 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos, } DrawingText(aTextPos, pPara->GetText(), 0, pPara->GetText().Len(), pBuf, - aSvxFont, nPara, 0xFFFF, 0xFF, 0, 0, false, false, true, 0, Color()); + aSvxFont, nPara, 0xFFFF, 0xFF, 0, 0, false, false, true, 0, Color(), Color()); delete[] pBuf; } @@ -1753,6 +1754,7 @@ 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); @@ -1761,7 +1763,7 @@ void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, USHO { // #101498# DrawPortionInfo aInfo( rStartPos, rText, nTextStart, nTextLen, rFont, nPara, nIndex, pDXArray, pWrongSpellVector, - pFieldData, pLocale, rTextLineColor, nRightToLeft, bEndOfLine, bEndOfParagraph, bEndOfBullet); + pFieldData, pLocale, rOverlineColor, rTextLineColor, nRightToLeft, bEndOfLine, bEndOfParagraph, bEndOfBullet); aDrawPortionHdl.Call( &aInfo ); } diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index a19c7be86f7e..97a2802573d8 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: svdattr.cxx,v $ - * $Revision: 1.35 $ + * $Revision: 1.34.212.2 $ * * This file is part of OpenOffice.org. * @@ -609,6 +609,7 @@ void SdrItemPool::TakeItemName(sal_uInt16 nWhich, String& rItemName) case EE_CHAR_FONTWIDTH : nResId = SIP_EE_CHAR_FONTWIDTH;break; case EE_CHAR_WEIGHT : nResId = SIP_EE_CHAR_WEIGHT;break; case EE_CHAR_UNDERLINE : nResId = SIP_EE_CHAR_UNDERLINE;break; + case EE_CHAR_OVERLINE : nResId = SIP_EE_CHAR_OVERLINE;break; case EE_CHAR_STRIKEOUT : nResId = SIP_EE_CHAR_STRIKEOUT;break; case EE_CHAR_ITALIC : nResId = SIP_EE_CHAR_ITALIC;break; case EE_CHAR_OUTLINE : nResId = SIP_EE_CHAR_OUTLINE;break; diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index bb65d5f0b619..49e3fc87ae68 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: svdfmtf.cxx,v $ - * $Revision: 1.21 $ + * $Revision: 1.20.84.2 $ * * This file is part of OpenOffice.org. * @@ -319,6 +319,7 @@ void ImpSdrGDIMetaFileImport::SetAttributes(SdrObject* pObj, FASTBOOL bForceText pTextAttr->Put( SvxFontHeightItem( nHeight, 100, EE_CHAR_FONTHEIGHT_CTL ) ); pTextAttr->Put(SvxCharScaleWidthItem(100, EE_CHAR_FONTWIDTH)); pTextAttr->Put(SvxUnderlineItem(aFnt.GetUnderline(), EE_CHAR_UNDERLINE)); + pTextAttr->Put(SvxOverlineItem(aFnt.GetOverline(), EE_CHAR_OVERLINE)); pTextAttr->Put(SvxCrossedOutItem(aFnt.GetStrikeout(), EE_CHAR_STRIKEOUT)); pTextAttr->Put(SvxShadowedItem(aFnt.IsShadow(), EE_CHAR_SHADOW)); pTextAttr->Put(SvxAutoKernItem(aFnt.IsKerning(), EE_CHAR_KERNING)); diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index b2d49c29befd..4f07779147df 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -79,6 +79,32 @@ namespace return aRetval; } + static drawinglayer::primitive2d::FontUnderline mapTextLineStyle(FontUnderline eLineStyle) + { + switch(eLineStyle) + { + case UNDERLINE_SINGLE: return drawinglayer::primitive2d::FONT_UNDERLINE_SINGLE; + case UNDERLINE_DOUBLE: return drawinglayer::primitive2d::FONT_UNDERLINE_DOUBLE; + case UNDERLINE_DOTTED: return drawinglayer::primitive2d::FONT_UNDERLINE_DOTTED; + case UNDERLINE_DASH: return drawinglayer::primitive2d::FONT_UNDERLINE_DASH; + case UNDERLINE_LONGDASH: return drawinglayer::primitive2d::FONT_UNDERLINE_LONGDASH; + case UNDERLINE_DASHDOT: return drawinglayer::primitive2d::FONT_UNDERLINE_DASHDOT; + case UNDERLINE_DASHDOTDOT: return drawinglayer::primitive2d::FONT_UNDERLINE_DASHDOTDOT; + case UNDERLINE_SMALLWAVE: return drawinglayer::primitive2d::FONT_UNDERLINE_SMALLWAVE; + case UNDERLINE_WAVE: return drawinglayer::primitive2d::FONT_UNDERLINE_WAVE; + case UNDERLINE_DOUBLEWAVE: return drawinglayer::primitive2d::FONT_UNDERLINE_DOUBLEWAVE; + case UNDERLINE_BOLD: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLD; + case UNDERLINE_BOLDDOTTED: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDOTTED; + case UNDERLINE_BOLDDASH: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDASH; + case UNDERLINE_BOLDLONGDASH: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDLONGDASH; + case UNDERLINE_BOLDDASHDOT: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDASHDOT; + case UNDERLINE_BOLDDASHDOTDOT: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDASHDOTDOT; + case UNDERLINE_BOLDWAVE: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDWAVE; + // FontUnderline_FORCE_EQUAL_SIZE, UNDERLINE_DONTKNOW, UNDERLINE_NONE + default: return drawinglayer::primitive2d::FONT_UNDERLINE_NONE; + } + } + class impTextBreakupHandler { private: @@ -247,30 +273,11 @@ namespace } } - // prepare underline data - drawinglayer::primitive2d::FontUnderline eFontUnderline(drawinglayer::primitive2d::FONT_UNDERLINE_NONE); + // prepare overline data + drawinglayer::primitive2d::FontUnderline eFontOverline(mapTextLineStyle(rInfo.mrFont.GetOverline())); - switch(rInfo.mrFont.GetUnderline()) - { - case UNDERLINE_SINGLE : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_SINGLE; break; - case UNDERLINE_DOUBLE : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_DOUBLE; break; - case UNDERLINE_DOTTED : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_DOTTED; break; - case UNDERLINE_DASH : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_DASH; break; - case UNDERLINE_LONGDASH : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_LONGDASH; break; - case UNDERLINE_DASHDOT : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_DASHDOT; break; - case UNDERLINE_DASHDOTDOT : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_DASHDOTDOT; break; - case UNDERLINE_SMALLWAVE : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_SMALLWAVE; break; - case UNDERLINE_WAVE : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_WAVE; break; - case UNDERLINE_DOUBLEWAVE : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_DOUBLEWAVE; break; - case UNDERLINE_BOLD : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_BOLD; break; - case UNDERLINE_BOLDDOTTED : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDOTTED; break; - case UNDERLINE_BOLDDASH : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDASH; break; - case UNDERLINE_BOLDLONGDASH : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_BOLDLONGDASH; break; - case UNDERLINE_BOLDDASHDOT : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDASHDOT; break; - case UNDERLINE_BOLDDASHDOTDOT : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDASHDOTDOT; break; - case UNDERLINE_BOLDWAVE : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_BOLDWAVE; break; - default : break; // FontUnderline_FORCE_EQUAL_SIZE, UNDERLINE_DONTKNOW, UNDERLINE_NONE - } + // prepare underline data + drawinglayer::primitive2d::FontUnderline eFontUnderline(mapTextLineStyle(rInfo.mrFont.GetUnderline())); const bool bUnderlineAbove(drawinglayer::primitive2d::FONT_UNDERLINE_NONE != eFontUnderline && impIsUnderlineAbove(rInfo.mrFont)); @@ -323,9 +330,13 @@ namespace const Color aFontColor(rInfo.mrFont.GetColor()); const basegfx::BColor aBFontColor(aFontColor.getBColor()); - // get line color. If it's on automatic (0xffffffff) use FontColor instead - const Color aLineColor(rInfo.maTextLineColor); - const basegfx::BColor aBLineColor((0xffffffff == aLineColor.GetColor()) ? aBFontColor : aLineColor.getBColor()); + // get overline color. If it's on automatic (0xffffffff) use FontColor instead + const Color aOverlineColor(rInfo.maOverlineColor); + const basegfx::BColor aBOverlineColor((0xffffffff == aOverlineColor.GetColor()) ? aBFontColor : aOverlineColor.getBColor()); + + // get underline color. If it's on automatic (0xffffffff) use FontColor instead + const Color aUnderlineColor(rInfo.maTextLineColor); + const basegfx::BColor aBUnderlineColor((0xffffffff == aUnderlineColor.GetColor()) ? aBFontColor : aUnderlineColor.getBColor()); drawinglayer::primitive2d::BasePrimitive2D* pNewPrimitive = new drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D( @@ -340,7 +351,9 @@ namespace aBFontColor, // attributes for TextDecoratedPortionPrimitive2D - aBLineColor, + aBOverlineColor, + aBUnderlineColor, + eFontOverline, eFontUnderline, bUnderlineAbove, eFontStrikeout, diff --git a/svx/source/svdraw/svdstr.src b/svx/source/svdraw/svdstr.src index 2f592a639bcd..32c457cf3d02 100644 --- a/svx/source/svdraw/svdstr.src +++ b/svx/source/svdraw/svdstr.src @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: svdstr.src,v $ - * $Revision: 1.95 $ + * $Revision: 1.95.212.1 $ * * This file is part of OpenOffice.org. * @@ -2619,6 +2619,11 @@ String SIP_EE_CHAR_UNDERLINE Text [ en-US ] = "Underline"; }; +String SIP_EE_CHAR_OVERLINE +{ + Text [ en-US ] = "Overline"; +}; + String SIP_EE_CHAR_STRIKEOUT { Text [ en-US ] = "Strikethrough"; diff --git a/svx/source/svrtf/rtfitem.cxx b/svx/source/svrtf/rtfitem.cxx index a86bea702037..bab67c91b1ef 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 45b6fe990853..24e3c6f89666 100644 --- a/svx/source/svrtf/svxrtf.cxx +++ b/svx/source/svrtf/svxrtf.cxx @@ -7,7 +7,7 @@ * 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. * @@ -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 f790a5888ed7..0d9ca7786b7e 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 e04322491cd0..6b9ed30cda29 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 0073907052f7..6c1399812d4c 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 ce8d0063e1e1..7235ae8efd44 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, diff --git a/xmloff/inc/xmloff/xmltypes.hxx b/xmloff/inc/xmloff/xmltypes.hxx index be555b901df0..d00a8ab3ced2 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 ad7ea20cd2f5..d0de29d84445 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 ), diff --git a/xmloff/source/style/prhdlfac.cxx b/xmloff/source/style/prhdlfac.cxx index de2309aaba6f..b328f3dddc3e 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 fe8e142e2ccc..d4737ce7baec 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,6 +151,7 @@ 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_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 ), @@ -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,6 +446,7 @@ 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_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 ), @@ -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 ), |