diff options
Diffstat (limited to 'sw/source')
40 files changed, 488 insertions, 150 deletions
diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx index 7aa235d4ac..acdf713a8a 100644 --- a/sw/source/core/attr/swatrset.cxx +++ b/sw/source/core/attr/swatrset.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: swatrset.cxx,v $ - * $Revision: 1.17 $ + * $Revision: 1.16.140.2 $ * * This file is part of OpenOffice.org. * @@ -69,6 +69,7 @@ SwAttrPool::SwAttrPool( SwDoc* pD ) SetVersionMap( 4, 1,121, pVersionMap4 ); // OD 2004-01-21 #i18732# - apply new version map SetVersionMap( 5, 1,130, pVersionMap5 ); + SetVersionMap( 6, 1,136, pVersionMap6 ); } diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx index 10892187cc..01540ceb90 100644 --- a/sw/source/core/bastyp/init.cxx +++ b/sw/source/core/bastyp/init.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: init.cxx,v $ - * $Revision: 1.66 $ + * $Revision: 1.66.138.1 $ * * This file is part of OpenOffice.org. * @@ -315,6 +315,9 @@ SfxItemInfo __FAR_DATA aSlotTab[] = { SID_ATTR_CHAR_SCALEWIDTH, SFX_ITEM_POOLABLE }, // RES_CHRATR_SCALEW { SID_ATTR_CHAR_RELIEF, SFX_ITEM_POOLABLE }, // RES_CHRATR_RELIEF { SID_ATTR_CHAR_HIDDEN, SFX_ITEM_POOLABLE }, // RES_CHRATR_HIDDEN + { SID_ATTR_CHAR_OVERLINE, SFX_ITEM_POOLABLE }, // RES_CHRATR_OVERLINE + { 0, SFX_ITEM_POOLABLE }, // RES_CHRATR_DUMMY1 + { 0, SFX_ITEM_POOLABLE }, // RES_CHRATR_DUMMY2 { 0, SFX_ITEM_POOLABLE }, // RES_TXTATR_AUTOFMT { FN_TXTATR_INET, 0 }, // RES_TXTATR_INETFMT @@ -444,6 +447,7 @@ USHORT* SwAttrPool::pVersionMap3 = 0; USHORT* SwAttrPool::pVersionMap4 = 0; // OD 2004-01-21 #i18732# USHORT* SwAttrPool::pVersionMap5 = 0; +USHORT* SwAttrPool::pVersionMap6 = 0; SwIndexReg* SwIndexReg::pEmptyIndexArray = 0; const sal_Char* __FAR_DATA pMarkToTable = "table"; @@ -519,9 +523,11 @@ void _InitCore() aAttrTab[ RES_CHRATR_SCALEW - POOLATTR_BEGIN ] = new SvxCharScaleWidthItem( 100, RES_CHRATR_SCALEW ); aAttrTab[ RES_CHRATR_RELIEF - POOLATTR_BEGIN ] = new SvxCharReliefItem( RELIEF_NONE, RES_CHRATR_RELIEF ); aAttrTab[ RES_CHRATR_HIDDEN - POOLATTR_BEGIN ] = new SvxCharHiddenItem( FALSE, RES_CHRATR_HIDDEN ); + aAttrTab[ RES_CHRATR_OVERLINE- POOLATTR_BEGIN ] = new SvxOverlineItem( UNDERLINE_NONE, RES_CHRATR_OVERLINE ); // CharakterAttr - Dummies - //no dummy available + aAttrTab[ RES_CHRATR_DUMMY1 - POOLATTR_BEGIN ] = new SfxBoolItem( RES_CHRATR_DUMMY1 ); + aAttrTab[ RES_CHRATR_DUMMY2 - POOLATTR_BEGIN ] = new SfxBoolItem( RES_CHRATR_DUMMY2 ); // CharakterAttr - Dummies aAttrTab[ RES_TXTATR_AUTOFMT- POOLATTR_BEGIN ] = new SwFmtAutoFmt; @@ -715,6 +721,13 @@ void _InitCore() for ( i = 110; i <= 130; ++i ) SwAttrPool::pVersionMap5[ i-1 ] = i + 6; + // 6. Version - new character attribute for overlining plus 2 dummies + SwAttrPool::pVersionMap6 = new USHORT[ 136 ]; + for( i = 1; i <= 37; i++ ) + SwAttrPool::pVersionMap6[ i-1 ] = i; + for ( i = 38; i <= 136; ++i ) + SwAttrPool::pVersionMap6[ i-1 ] = i + 3; + uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); @@ -827,6 +840,7 @@ void _FinitCore() delete[] SwAttrPool::pVersionMap4; // OD 2004-01-21 #i18732# delete[] SwAttrPool::pVersionMap5; + delete[] SwAttrPool::pVersionMap6; for ( USHORT i = 0; i < pGlobalOLEExcludeList->Count(); ++i ) delete (SvGlobalName*)(*pGlobalOLEExcludeList)[i]; diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx index d336bb280f..da9f2dd269 100644 --- a/sw/source/core/doc/dbgoutsw.cxx +++ b/sw/source/core/doc/dbgoutsw.cxx @@ -141,6 +141,7 @@ map<USHORT,String,CompareUShort> & GetItemWhichMap() aItemWhichMap[RES_CHRATR_PROPORTIONALFONTSIZE] = String("CHRATR_PROPORTIONALFONTSIZE", RTL_TEXTENCODING_ASCII_US); aItemWhichMap[RES_CHRATR_SHADOWED] = String("CHRATR_SHADOWED", RTL_TEXTENCODING_ASCII_US); aItemWhichMap[RES_CHRATR_UNDERLINE] = String("CHRATR_UNDERLINE", RTL_TEXTENCODING_ASCII_US); + aItemWhichMap[RES_CHRATR_OVERLINE] = String("CHRATR_OVERLINE", RTL_TEXTENCODING_ASCII_US); aItemWhichMap[RES_CHRATR_WEIGHT] = String("CHRATR_WEIGHT", RTL_TEXTENCODING_ASCII_US); aItemWhichMap[RES_CHRATR_WORDLINEMODE] = String("CHRATR_WORDLINEMODE", RTL_TEXTENCODING_ASCII_US); aItemWhichMap[RES_CHRATR_AUTOKERN] = String("CHRATR_AUTOKERN", RTL_TEXTENCODING_ASCII_US); diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index c07545f4e2..9924d06ff4 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: notxtfrm.cxx,v $ - * $Revision: 1.44 $ + * $Revision: 1.43.54.2 $ * * This file is part of OpenOffice.org. * @@ -140,7 +140,7 @@ void lcl_PaintReplacement( const SwRect &rRect, const String &rText, SwFmt *pFmt = rSh.GetDoc()->GetFmtFromPool( static_cast<sal_uInt16> (bVisited ? RES_POOLCHR_INET_VISIT : RES_POOLCHR_INET_NORMAL ) ); aCol = pFmt->GetColor().GetValue(); - eUnderline = pFmt->GetUnderline().GetUnderline(); + eUnderline = pFmt->GetUnderline().GetLineStyle(); } pFont->SetUnderline( eUnderline ); diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index 690abfbb4b..2dc28332f3 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: tblafmt.cxx,v $ - * $Revision: 1.22 $ + * $Revision: 1.22.210.1 $ * * This file is part of OpenOffice.org. * @@ -80,9 +80,13 @@ const USHORT AUTOFORMAT_DATA_ID_680DR14 = 10012; const USHORT AUTOFORMAT_ID_680DR25 = 10021; const USHORT AUTOFORMAT_DATA_ID_680DR25 = 10022; +// --- from DEV300/overline2 on: #5991# overline +const USHORT AUTOFORMAT_ID_300OVRLN = 10031; +const USHORT AUTOFORMAT_DATA_ID_300OVRLN = 10032; + // current version -const USHORT AUTOFORMAT_ID = AUTOFORMAT_ID_680DR25; -const USHORT AUTOFORMAT_DATA_ID = AUTOFORMAT_DATA_ID_680DR25; +const USHORT AUTOFORMAT_ID = AUTOFORMAT_ID_300OVRLN; +const USHORT AUTOFORMAT_DATA_ID = AUTOFORMAT_DATA_ID_300OVRLN; #ifdef READ_OLDVERS @@ -110,6 +114,7 @@ public: USHORT nWeightVersion; USHORT nPostureVersion; USHORT nUnderlineVersion; + USHORT nOverlineVersion; USHORT nCrossedOutVersion; USHORT nContourVersion; USHORT nShadowedVersion; @@ -140,6 +145,7 @@ SwAfVersions::SwAfVersions() : nWeightVersion(0), nPostureVersion(0), nUnderlineVersion(0), + nOverlineVersion(0), nCrossedOutVersion(0), nContourVersion(0), nShadowedVersion(0), @@ -166,6 +172,8 @@ void SwAfVersions::Load( SvStream& rStream, USHORT nVer ) rStream >> nWeightVersion; rStream >> nPostureVersion; rStream >> nUnderlineVersion; + if ( nVer >= AUTOFORMAT_ID_300OVRLN ) + rStream >> nOverlineVersion; rStream >> nCrossedOutVersion; rStream >> nContourVersion; rStream >> nShadowedVersion; @@ -207,6 +215,7 @@ SwBoxAutoFmt::SwBoxAutoFmt() aCTLPosture( ITALIC_NONE, RES_CHRATR_CTL_POSTURE ), aUnderline( UNDERLINE_NONE, RES_CHRATR_UNDERLINE ), + aOverline( UNDERLINE_NONE, RES_CHRATR_OVERLINE ), aCrossedOut( STRIKEOUT_NONE, RES_CHRATR_CROSSEDOUT ), aContour( sal_False, RES_CHRATR_CONTOUR ), aShadowed( sal_False, RES_CHRATR_SHADOWED ), @@ -247,6 +256,7 @@ SwBoxAutoFmt::SwBoxAutoFmt( const SwBoxAutoFmt& rNew ) aCTLWeight( rNew.aCTLWeight ), aCTLPosture( rNew.aCTLPosture ), aUnderline( rNew.aUnderline ), + aOverline( rNew.aOverline ), aCrossedOut( rNew.aCrossedOut ), aContour( rNew.aContour ), aShadowed( rNew.aShadowed ), @@ -289,6 +299,7 @@ SwBoxAutoFmt& SwBoxAutoFmt::operator=( const SwBoxAutoFmt& rNew ) aCTLWeight = rNew.aCTLWeight; aCTLPosture = rNew.aCTLPosture; aUnderline = rNew.aUnderline; + aOverline = rNew.aOverline; aCrossedOut = rNew.aCrossedOut; aContour = rNew.aContour; aShadowed = rNew.aShadowed; @@ -346,6 +357,10 @@ BOOL SwBoxAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions, USHOR READ( aCTLPosture, SvxPostureItem , rVersions.nPostureVersion) } READ( aUnderline, SvxUnderlineItem , rVersions.nUnderlineVersion) + if( nVer >= AUTOFORMAT_DATA_ID_300OVRLN ) + { + READ( aOverline, SvxOverlineItem , rVersions.nOverlineVersion) + } READ( aCrossedOut, SvxCrossedOutItem , rVersions.nCrossedOutVersion) READ( aContour, SvxContourItem , rVersions.nContourVersion) READ( aShadowed, SvxShadowedItem , rVersions.nShadowedVersion) @@ -453,6 +468,7 @@ BOOL SwBoxAutoFmt::Save( SvStream& rStream ) const aCTLWeight.Store( rStream, aCTLWeight.GetVersion(SOFFICE_FILEFORMAT_40) ); aCTLPosture.Store( rStream, aCTLPosture.GetVersion(SOFFICE_FILEFORMAT_40) ); aUnderline.Store( rStream, aUnderline.GetVersion(SOFFICE_FILEFORMAT_40) ); + aOverline.Store( rStream, aOverline.GetVersion(SOFFICE_FILEFORMAT_40) ); aCrossedOut.Store( rStream, aCrossedOut.GetVersion(SOFFICE_FILEFORMAT_40) ); aContour.Store( rStream, aContour.GetVersion(SOFFICE_FILEFORMAT_40) ); aShadowed.Store( rStream, aShadowed.GetVersion(SOFFICE_FILEFORMAT_40) ); @@ -488,6 +504,7 @@ BOOL SwBoxAutoFmt::SaveVerionNo( SvStream& rStream ) const rStream << aWeight.GetVersion( SOFFICE_FILEFORMAT_40 ); rStream << aPosture.GetVersion( SOFFICE_FILEFORMAT_40 ); rStream << aUnderline.GetVersion( SOFFICE_FILEFORMAT_40 ); + rStream << aOverline.GetVersion( SOFFICE_FILEFORMAT_40 ); rStream << aCrossedOut.GetVersion( SOFFICE_FILEFORMAT_40 ); rStream << aContour.GetVersion( SOFFICE_FILEFORMAT_40 ); rStream << aShadowed.GetVersion( SOFFICE_FILEFORMAT_40 ); @@ -630,6 +647,7 @@ SwBoxAutoFmt& SwTableAutoFmt::UpdateFromSet( BYTE nPos, pFmt->SetCTLWeight( (SvxWeightItem&)rSet.Get( RES_CHRATR_CTL_WEIGHT ) ); pFmt->SetCTLPosture( (SvxPostureItem&)rSet.Get( RES_CHRATR_CTL_POSTURE ) ); pFmt->SetUnderline( (SvxUnderlineItem&)rSet.Get( RES_CHRATR_UNDERLINE ) ); + pFmt->SetOverline( (SvxOverlineItem&)rSet.Get( RES_CHRATR_OVERLINE ) ); pFmt->SetCrossedOut( (SvxCrossedOutItem&)rSet.Get( RES_CHRATR_CROSSEDOUT ) ); pFmt->SetContour( (SvxContourItem&)rSet.Get( RES_CHRATR_CONTOUR ) ); pFmt->SetShadowed( (SvxShadowedItem&)rSet.Get( RES_CHRATR_SHADOWED ) ); @@ -709,6 +727,7 @@ void SwTableAutoFmt::UpdateToSet( BYTE nPos, SfxItemSet& rSet, rSet.Put( rChg.GetPosture(), RES_CHRATR_CTL_POSTURE ); } rSet.Put( rChg.GetUnderline() ); + rSet.Put( rChg.GetOverline() ); rSet.Put( rChg.GetCrossedOut() ); rSet.Put( rChg.GetContour() ); rSet.Put( rChg.GetShadowed() ); diff --git a/sw/source/core/inc/swfntcch.hxx b/sw/source/core/inc/swfntcch.hxx index abf6b6ca54..e6e9859b9d 100644 --- a/sw/source/core/inc/swfntcch.hxx +++ b/sw/source/core/inc/swfntcch.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: swfntcch.hxx,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.210.1 $ * * This file is part of OpenOffice.org. * @@ -32,7 +32,7 @@ #include <tools/mempool.hxx> -#define NUM_DEFAULT_VALUES 35 +#define NUM_DEFAULT_VALUES 36 #include "swcache.hxx" #include "swfont.hxx" diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx index 9b3ba36437..7b09d045a8 100644 --- a/sw/source/core/inc/swfont.hxx +++ b/sw/source/core/inc/swfont.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: swfont.hxx,v $ - * $Revision: 1.37 $ + * $Revision: 1.37.210.1 $ * * This file is part of OpenOffice.org. * @@ -98,6 +98,7 @@ class SwSubFont : public SvxFont inline void SetPitch( const FontPitch ePitch ); inline void SetAlign( const FontAlign eAlign ); inline void SetUnderline( const FontUnderline eUnderline ); + inline void SetOverline( const FontUnderline eOverline ); inline void SetStrikeout( const FontStrikeout eStrikeout ); inline void SetItalic( const FontItalic eItalic ); inline void SetOutline( const BOOL bOutline ); @@ -137,6 +138,7 @@ class SwFont SwSubFont aSub[SW_SCRIPTS]; // Latin-, CJK- and CTL-font Color* pBackColor; // background color (i.e. at character styles) Color aUnderColor; // color of the underlining + Color aOverColor; // color of the overlining BYTE nToxCnt; // Zaehlt die Schachtelungstiefe der Tox BYTE nRefCnt; // Zaehlt die Schachtelungstiefe der Refs BYTE nActual; // actual font (Latin, CJK or CTL) @@ -202,6 +204,8 @@ public: inline void SetAlign( const FontAlign eAlign ); inline void SetUnderline( const FontUnderline eUnderline ); inline void SetUnderColor( const Color &rColor ) { aUnderColor = rColor; } + inline void SetOverline( const FontUnderline eOverline ); + inline void SetOverColor( const Color &rColor ) { aOverColor = rColor; } inline void SetStrikeout( const FontStrikeout eStrikeout ); inline void SetOutline( const BOOL bOutline ); void SetVertical( USHORT nDir, const BOOL nVertLayout = FALSE ); @@ -264,6 +268,8 @@ public: { return aSub[nActual].IsSymbol( pSh ); } FontUnderline GetUnderline() const { return aSub[nActual].GetUnderline(); } const Color& GetUnderColor() const { return aUnderColor; } + FontUnderline GetOverline() const { return aSub[nActual].GetOverline(); } + const Color& GetOverColor() const { return aOverColor; } short GetFixKerning() const { return aSub[nActual].GetFixKerning(); } FontStrikeout GetStrikeout() const { return aSub[nActual].GetStrikeout(); } const Color& GetColor() const { return aSub[nActual].GetColor(); } @@ -500,6 +506,21 @@ inline void SwFont::SetUnderline( const FontUnderline eUnderline ) } // gekapselte SV-Font-Methode +inline void SwSubFont::SetOverline( const FontUnderline eOverline ) +{ + pMagic = 0; + Font::SetOverline( eOverline ); +} + +inline void SwFont::SetOverline( const FontUnderline eOverline ) +{ + bFntChg = TRUE; + aSub[0].SetOverline( eOverline ); + aSub[1].SetOverline( eOverline ); + aSub[2].SetOverline( eOverline ); +} + +// gekapselte SV-Font-Methode inline void SwSubFont::SetStrikeout( const FontStrikeout eStrikeout ) { pMagic = 0; diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index 8de13cfc8b..d00d3e3459 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -2329,6 +2329,7 @@ void SwCntntFrm::_UpdateAttr( SfxPoolItem* pOld, SfxPoolItem* pNew, case RES_CHRATR_SHADOWED: case RES_CHRATR_AUTOKERN: case RES_CHRATR_UNDERLINE: + case RES_CHRATR_OVERLINE: case RES_CHRATR_KERNING: case RES_CHRATR_FONT: case RES_CHRATR_FONTSIZE: diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index bc5804117d..d274dd2bca 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: EnhancedPDFExportHelper.cxx,v $ - * $Revision: 1.26 $ + * $Revision: 1.26.138.1 $ * * This file is part of OpenOffice.org. * @@ -821,6 +821,8 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType ) { if ( UNDERLINE_NONE != rInf.GetFont()->GetUnderline() ) mpPDFExtOutDevData->SetStructureAttribute( vcl::PDFWriter::TextDecorationType, vcl::PDFWriter::Underline ); + if ( UNDERLINE_NONE != rInf.GetFont()->GetOverline() ) + mpPDFExtOutDevData->SetStructureAttribute( vcl::PDFWriter::TextDecorationType, vcl::PDFWriter::Overline ); if ( STRIKEOUT_NONE != rInf.GetFont()->GetStrikeout() ) mpPDFExtOutDevData->SetStructureAttribute( vcl::PDFWriter::TextDecorationType, vcl::PDFWriter::LineThrough ); if ( EMPHASISMARK_NONE != rInf.GetFont()->GetEmphasisMark() ) @@ -1428,6 +1430,7 @@ void SwTaggedPDFHelper::BeginInlineStructureElements() const LanguageType nDefaultLang = SwEnhancedPDFExportHelper::GetDefaultLanguage(); if ( UNDERLINE_NONE != rInf.GetFont()->GetUnderline() || + UNDERLINE_NONE != rInf.GetFont()->GetOverline() || STRIKEOUT_NONE != rInf.GetFont()->GetStrikeout() || EMPHASISMARK_NONE != rInf.GetFont()->GetEmphasisMark() || 0 != rInf.GetFont()->GetEscapement() || diff --git a/sw/source/core/text/atrhndl.hxx b/sw/source/core/text/atrhndl.hxx index cd94617786..35fb80bde2 100644 --- a/sw/source/core/text/atrhndl.hxx +++ b/sw/source/core/text/atrhndl.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: atrhndl.hxx,v $ - * $Revision: 1.5 $ + * $Revision: 1.5.210.1 $ * * This file is part of OpenOffice.org. * @@ -32,7 +32,7 @@ #define _ATRHNDL_HXX #define INITIAL_NUM_ATTR 3 -#define NUM_ATTRIBUTE_STACKS 38 +#define NUM_ATTRIBUTE_STACKS 39 #include <txatbase.hxx> #include <swfntcch.hxx> diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx index bb2dd1fa87..ff3009c7dd 100644 --- a/sw/source/core/text/atrstck.cxx +++ b/sw/source/core/text/atrstck.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: atrstck.cxx,v $ - * $Revision: 1.30 $ + * $Revision: 1.30.210.1 $ * * This file is part of OpenOffice.org. * @@ -129,16 +129,19 @@ const BYTE StackPos[ static_cast<USHORT>(RES_TXTATR_WITHEND_END) - 32, // RES_CHRATR_SCALEW, // 35 33, // RES_CHRATR_RELIEF, // 36 34, // RES_CHRATR_HIDDEN, // 37 - 0, // RES_TXTATR_AUTOFMT, // 39 - 0, // RES_TXTATR_INETFMT // 38 - 35, // RES_TXTATR_REFMARK, // 40 - 36, // RES_TXTATR_TOXMARK, // 41 - 0, // RES_TXTATR_CHARFMT, // 42 - 0, // RES_TXTATR_DUMMY5 // 43 - 37, // RES_TXTATR_CJK_RUBY, // 44 - 0, // RES_TXTATR_UNKNOWN_CONTAINER, // 45 - 0, // RES_TXTATR_DUMMY6, // 46 - 0 // RES_TXTATR_DUMMY7, // 47 + 35, // RES_CHRATR_OVERLINE, // 38 + 0, // RES_CHRATR_DUMMY1, // 39 + 0, // RES_CHRATR_DUMMY2, // 40 + 0, // RES_TXTATR_AUTOFMT, // 41 + 0, // RES_TXTATR_INETFMT // 42 + 36, // RES_TXTATR_REFMARK, // 43 + 37, // RES_TXTATR_TOXMARK, // 44 + 0, // RES_TXTATR_CHARFMT, // 45 + 0, // RES_TXTATR_DUMMY5 // 46 + 38, // RES_TXTATR_CJK_RUBY, // 47 + 0, // RES_TXTATR_UNKNOWN_CONTAINER, // 48 + 0, // RES_TXTATR_DUMMY6, // 49 + 0 // RES_TXTATR_DUMMY7, // 50 }; /************************************************************************* @@ -748,11 +751,15 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, sal_Bool bPu if( (mpShell && !mpShell->GetWin()) || pTmpItem && !static_cast<const SvxCharHiddenItem*>(pTmpItem)->GetValue() ) { - rFnt.SetUnderline( ((SvxUnderlineItem&)rItem).GetUnderline() ); + rFnt.SetUnderline( ((SvxUnderlineItem&)rItem).GetLineStyle() ); rFnt.SetUnderColor( ((SvxUnderlineItem&)rItem).GetColor() ); } break; } + case RES_CHRATR_OVERLINE : + rFnt.SetOverline( ((SvxOverlineItem&)rItem).GetLineStyle() ); + rFnt.SetOverColor( ((SvxOverlineItem&)rItem).GetColor() ); + break; case RES_CHRATR_WEIGHT : rFnt.SetWeight( ((SvxWeightItem&)rItem).GetWeight(), SW_LATIN ); break; diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx index c6bf6951bd..fc5ebbf16c 100644 --- a/sw/source/core/text/itrpaint.cxx +++ b/sw/source/core/text/itrpaint.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: itrpaint.cxx,v $ - * $Revision: 1.47 $ + * $Revision: 1.47.210.1 $ * * This file is part of OpenOffice.org. * @@ -564,7 +564,7 @@ void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor, if ( pItem ) { bUnder = sal_True; - bUnderSelect = pFnt->GetUnderline() == pItem->GetUnderline(); + bUnderSelect = pFnt->GetUnderline() == pItem->GetLineStyle(); } if( bUnder ) @@ -709,6 +709,7 @@ void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor, pUnderlineFnt->SetProportion( 100 ); pUnderlineFnt->SetEscapement( 0 ); pUnderlineFnt->SetStrikeout( STRIKEOUT_NONE ); + pUnderlineFnt->SetOverline( UNDERLINE_NONE ); const Color aFillColor( COL_TRANSPARENT ); pUnderlineFnt->SetFillColor( aFillColor ); diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index 996237694f..39a3d256b5 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -708,11 +708,13 @@ void SwNumberPortion::Paint( const SwTxtPaintInfo &rInf ) const { const SwFont *pTmpFnt = rInf.GetFont(); sal_Bool bPaintSpace = ( UNDERLINE_NONE != pTmpFnt->GetUnderline() || - STRIKEOUT_NONE != pTmpFnt->GetStrikeout() ) && - !pTmpFnt->IsWordLineMode(); + UNDERLINE_NONE != pTmpFnt->GetOverline() || + STRIKEOUT_NONE != pTmpFnt->GetStrikeout() ) && + !pTmpFnt->IsWordLineMode(); if( bPaintSpace && pFnt ) bPaintSpace = ( UNDERLINE_NONE != pFnt->GetUnderline() || - STRIKEOUT_NONE != pFnt->GetStrikeout() ) && + UNDERLINE_NONE != pFnt->GetOverline() || + STRIKEOUT_NONE != pFnt->GetStrikeout() ) && !pFnt->IsWordLineMode(); SwFontSave aSave( rInf, pFnt ); diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx index e834075e78..209c0d36f2 100644 --- a/sw/source/core/text/txtfld.cxx +++ b/sw/source/core/text/txtfld.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: txtfld.cxx,v $ - * $Revision: 1.30 $ + * $Revision: 1.30.136.1 $ * * This file is part of OpenOffice.org. * @@ -398,9 +398,11 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const { // i18463: // Underline style of paragraph font should not be considered + // Overline style of paragraph font should not be considered // Weight style of paragraph font should not be considered // Posture style of paragraph font should not be considered pNumFnt->SetUnderline( UNDERLINE_NONE ); + pNumFnt->SetOverline( UNDERLINE_NONE ); pNumFnt->SetItalic( ITALIC_NONE, SW_LATIN ); pNumFnt->SetItalic( ITALIC_NONE, SW_CJK ); pNumFnt->SetItalic( ITALIC_NONE, SW_CTL ); @@ -472,6 +474,8 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const // i18463: // Underline style of paragraph font should not be considered pNumFnt->SetUnderline( UNDERLINE_NONE ); + // Overline style of paragraph font should not be considered + pNumFnt->SetOverline( UNDERLINE_NONE ); } diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx index 59e9e6c76d..fadeabe6b9 100644 --- a/sw/source/core/text/txtftn.cxx +++ b/sw/source/core/text/txtftn.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: txtftn.cxx,v $ - * $Revision: 1.51 $ + * $Revision: 1.51.208.1 $ * * This file is part of OpenOffice.org. * @@ -1028,10 +1028,12 @@ SwNumberPortion *SwTxtFormatter::NewFtnNumPortion( SwTxtFormatInfo &rInf ) const // --> FME 2005-02-17 #i37142# // Underline style of paragraph font should not be considered + // Overline style of paragraph font should not be considered // Weight style of paragraph font should not be considered // Posture style of paragraph font should not be considered // See also #i18463# and SwTxtFormatter::NewNumberPortion() pNumFnt->SetUnderline( UNDERLINE_NONE ); + pNumFnt->SetOverline( UNDERLINE_NONE ); pNumFnt->SetItalic( ITALIC_NONE, SW_LATIN ); pNumFnt->SetItalic( ITALIC_NONE, SW_CJK ); pNumFnt->SetItalic( ITALIC_NONE, SW_CTL ); diff --git a/sw/source/core/text/txtio.cxx b/sw/source/core/text/txtio.cxx index 42aa453baa..a155db6de4 100644 --- a/sw/source/core/text/txtio.cxx +++ b/sw/source/core/text/txtio.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: txtio.cxx,v $ - * $Revision: 1.17 $ + * $Revision: 1.17.208.1 $ * * This file is part of OpenOffice.org. * @@ -297,6 +297,8 @@ SvStream &operator<<( SvStream &rOs, const SwpHints & ) //$ ostream rOs << "FONTSIZE" << ' ' << GetFontSize(pHint)->nSize; else if(0 != GetUnderline(pHint)) rOs << "UNDERLINE" << ' ' << (MSHORT)(GetUnderline(pHint)->nState); + else if(0 != GetOverline(pHint)) + rOs << "OVERLINE" << ' ' << (MSHORT)(GetOverline(pHint)->nState); else if(0 != GetWeight(pHint)) rOs << "WEIGHT" << ' ' << GetWeight(pHint)->nWeight; else if(0 != GetContour(pHint)) diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 91d7ec2762..0b5f8b31e6 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -116,14 +116,14 @@ void SwRVPMarker::Mark( const OutputDevice* pOut ) { if( pOut ) { - Color aOldCol = pOut->GetLineColor(); + Color aOldCol = pOut->GetUnderColor(); Color aBlack = Color( COL_BLACK ); if( aOldCol != aBlack ) { - ((OutputDevice*)pOut)->SetLineColor( aBlack ); + ((OutputDevice*)pOut)->SetUnderColor( aBlack ); ((OutputDevice*)pOut)->DrawChord( Rectangle(0,1,0,1), Point(), Point() ); - ((OutputDevice*)pOut)->SetLineColor( aOldCol ); + ((OutputDevice*)pOut)->SetUnderColor( aOldCol ); } else ((OutputDevice*)pOut)->DrawChord( Rectangle(0,1,0,1), @@ -175,8 +175,9 @@ SwFntObj::SwFntObj( const SwSubFont &rFont, const void *pOwn, ViewShell *pSh ) : nPrtAscent = USHRT_MAX; nPrtHeight = USHRT_MAX; bPaintBlank = ( UNDERLINE_NONE != aFont.GetUnderline() - || STRIKEOUT_NONE != aFont.GetStrikeout() ) - && !aFont.IsWordLineMode(); + || UNDERLINE_NONE != aFont.GetOverline() + || STRIKEOUT_NONE != aFont.GetStrikeout() ) + && !aFont.IsWordLineMode(); } SwFntObj::~SwFntObj() @@ -937,10 +938,10 @@ static void lcl_DrawLineForWrongListData( if (rInf.GetOut().GetConnectMetaFile()) rInf.GetOut().Push(); - const Color aCol( rInf.GetOut().GetLineColor() ); + const Color aCol( rInf.GetOut().GetTextLineColor() ); const BOOL bColSave = aCol != aLineColor; if (bColSave) - rInf.GetOut().SetLineColor( aLineColor ); + rInf.GetOut().SetTextLineColor( aLineColor ); // iterate over all ranges stored in the respective SwWrongList do @@ -1011,7 +1012,7 @@ static void lcl_DrawLineForWrongListData( while (nWrLen && pWList->Check( nStart, nWrLen )); if (bColSave) - rInf.GetOut().SetLineColor( aCol ); + rInf.GetOut().SetTextLineColor( aCol ); if (rInf.GetOut().GetConnectMetaFile()) rInf.GetOut().Pop(); @@ -1931,10 +1932,10 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) WRONG_SHOW_MEDIUM < nHght ? WAVE_NORMAL : ( WRONG_SHOW_SMALL < nHght ? WAVE_SMALL : WAVE_FLAT ); - Color aCol( rInf.GetOut().GetLineColor() ); + Color aCol( rInf.GetOut().GetTextLineColor() ); BOOL bColSave = aCol != *pWaveCol; if ( bColSave ) - rInf.GetOut().SetLineColor( *pWaveCol ); + rInf.GetOut().SetTextLineColor( *pWaveCol ); Point aEnd; long nKernVal = pKernArray[ USHORT( rInf.GetLen() - 1 ) ]; @@ -1981,7 +1982,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) rInf.GetOut().DrawWaveLine( aCurrPos, aEnd, nWave ); if ( bColSave ) - rInf.GetOut().SetLineColor( aCol ); + rInf.GetOut().SetTextLineColor( aCol ); if ( rInf.GetOut().GetConnectMetaFile() ) rInf.GetOut().Pop(); @@ -2815,27 +2816,28 @@ sal_Bool SwDrawTextInfo::ApplyAutoColor( Font* pFont ) sal_Bool bPrt = GetShell() && ! GetShell()->GetWin(); ColorData nNewColor = COL_BLACK; sal_Bool bChgFntColor = sal_False; - sal_Bool bChgUnderColor = sal_False; + sal_Bool bChgLineColor = sal_False; if( bPrt && GetShell() && GetShell()->GetViewOptions()->IsBlackFont() ) { if ( COL_BLACK != rFnt.GetColor().GetColor() ) bChgFntColor = sal_True; - if ( COL_BLACK != GetOut().GetTextLineColor().GetColor() ) - bChgUnderColor = sal_True; + if ( (COL_BLACK != GetOut().GetTextLineColor().GetColor()) || + (COL_BLACK != GetOut().GetOverlineColor().GetColor()) ) + bChgLineColor = sal_True; } else { // FontColor has to be changed if: // 1. FontColor = AUTO or 2. IsAlwaysAutoColor is set - // UnderLineColor has to be changed if: + // LineColor has to be changed if: // 1. IsAlwaysAutoColor is set - bChgUnderColor = ! bPrt && GetShell() && + bChgLineColor = ! bPrt && GetShell() && GetShell()->GetAccessibilityOptions()->IsAlwaysAutoColor(); - bChgFntColor = COL_AUTO == rFnt.GetColor().GetColor() || bChgUnderColor; + bChgFntColor = COL_AUTO == rFnt.GetColor().GetColor() || bChgLineColor; if ( bChgFntColor ) { @@ -2893,7 +2895,7 @@ sal_Bool SwDrawTextInfo::ApplyAutoColor( Font* pFont ) } } - if ( bChgFntColor || bChgUnderColor ) + if ( bChgFntColor || bChgLineColor ) { Color aNewColor( nNewColor ); @@ -2913,13 +2915,15 @@ sal_Bool SwDrawTextInfo::ApplyAutoColor( Font* pFont ) } } - // the underline color has to be set separately - if ( bChgUnderColor ) + // the underline and overline colors have to be set separately + if ( bChgLineColor ) { // get current font color or color set at output device aNewColor = pFont ? pFont->GetColor() : GetOut().GetFont().GetColor(); if ( aNewColor != GetOut().GetTextLineColor() ) GetOut().SetTextLineColor( aNewColor ); + if ( aNewColor != GetOut().GetOverlineColor() ) + GetOut().SetOverlineColor( aNewColor ); } return sal_True; diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx index a4229de0b2..e15f975c83 100644 --- a/sw/source/core/txtnode/fntcap.cxx +++ b/sw/source/core/txtnode/fntcap.cxx @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: fntcap.cxx,v $ - * $Revision: 1.27.214.1 $ + * $Revision: 1.27.210.1 $ * * This file is part of OpenOffice.org. * @@ -380,6 +380,7 @@ void SwSubFont::DrawCapital( SwDrawTextInfo &rInf ) // Es wird vorausgesetzt, dass rPos bereits kalkuliert ist! // hochgezogen in SwFont: const Point aPos( CalcPos(rPos) ); rInf.SetDrawSpace( GetUnderline() != UNDERLINE_NONE || + GetOverline() != UNDERLINE_NONE || GetStrikeout() != STRIKEOUT_NONE ); SwDoDrawCapital aDo( rInf ); DoOnCapitals( aDo ); @@ -549,6 +550,7 @@ void SwSubFont::DrawStretchCapital( SwDrawTextInfo &rInf ) rInf.SetPos( rOldPos ); rInf.SetDrawSpace( GetUnderline() != UNDERLINE_NONE || + GetOverline() != UNDERLINE_NONE || GetStrikeout() != STRIKEOUT_NONE ); SwDoDrawStretchCapital aDo( rInf, nCapWidth ); DoOnCapitals( aDo ); @@ -601,13 +603,14 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo ) SwSubFont aFont( *this ); Point aStartPos( rDo.GetInf().GetPos() ); - const BOOL bUnderStriked = aFont.GetUnderline() != UNDERLINE_NONE - || aFont.GetStrikeout() != STRIKEOUT_NONE; - const BOOL bWordWise = bUnderStriked && aFont.IsWordLineMode() && + const BOOL bTextLines = aFont.GetUnderline() != UNDERLINE_NONE + || aFont.GetOverline() != UNDERLINE_NONE + || aFont.GetStrikeout() != STRIKEOUT_NONE; + const BOOL bWordWise = bTextLines && aFont.IsWordLineMode() && rDo.GetInf().GetDrawSpace(); const long nTmpKern = rDo.GetInf().GetKern(); - if ( bUnderStriked ) + if ( bTextLines ) { if ( bWordWise ) { @@ -621,6 +624,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo ) // Wir basteln uns einen Font fuer die Grossbuchstaben: aFont.SetUnderline( UNDERLINE_NONE ); + aFont.SetOverline( UNDERLINE_NONE ); aFont.SetStrikeout( STRIKEOUT_NONE ); pMagic2 = NULL; nIndex2 = 0; @@ -827,7 +831,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo ) if( pBigFont != pOldLast ) delete pBigFontAccess; - if( bUnderStriked ) + if( bTextLines ) { if( rDo.GetInf().GetDrawSpace() ) { diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx index c13bee2f3e..49b17b884d 100644 --- a/sw/source/core/txtnode/swfont.cxx +++ b/sw/source/core/txtnode/swfont.cxx @@ -337,9 +337,15 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet, if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_UNDERLINE, TRUE, &pItem )) { - SetUnderline( ((SvxUnderlineItem*)pItem)->GetUnderline() ); + SetUnderline( ((SvxUnderlineItem*)pItem)->GetLineStyle() ); SetUnderColor( ((SvxUnderlineItem*)pItem)->GetColor() ); } + if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_OVERLINE, + TRUE, &pItem )) + { + SetOverline( ((SvxOverlineItem*)pItem)->GetLineStyle() ); + SetOverColor( ((SvxOverlineItem*)pItem)->GetColor() ); + } if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CROSSEDOUT, TRUE, &pItem )) SetStrikeout( ((SvxCrossedOutItem*)pItem)->GetStrikeout() ); @@ -438,6 +444,7 @@ SwFont::SwFont( const SwFont &rFont ) nActual = rFont.nActual; pBackColor = rFont.pBackColor ? new Color( *rFont.pBackColor ) : NULL; aUnderColor = rFont.GetUnderColor(); + aOverColor = rFont.GetOverColor(); nToxCnt = nRefCnt = 0; bFntChg = rFont.bFntChg; bOrgChg = rFont.bOrgChg; @@ -515,12 +522,14 @@ SwFont::SwFont( const SwAttrSet* pAttrSet, aSub[SW_CTL].SetLanguage( pAttrSet->GetCTLLanguage().GetLanguage() ); } - const FontUnderline eUnderline = pAttrSet->GetUnderline().GetUnderline(); + const FontUnderline eUnderline = pAttrSet->GetUnderline().GetLineStyle(); if ( pAttrSet->GetCharHidden().GetValue() ) SetUnderline( UNDERLINE_DOTTED ); else SetUnderline( eUnderline ); SetUnderColor( pAttrSet->GetUnderline().GetColor() ); + SetOverline( pAttrSet->GetOverline().GetLineStyle() ); + SetOverColor( pAttrSet->GetOverline().GetColor() ); SetEmphasisMark( pAttrSet->GetEmphasisMark().GetEmphasisMark() ); SetStrikeout( pAttrSet->GetCrossedOut().GetStrikeout() ); SetColor( pAttrSet->GetColor().GetValue() ); @@ -580,6 +589,7 @@ SwFont& SwFont::operator=( const SwFont &rFont ) delete pBackColor; pBackColor = rFont.pBackColor ? new Color( *rFont.pBackColor ) : NULL; aUnderColor = rFont.GetUnderColor(); + aOverColor = rFont.GetOverColor(); nToxCnt = nRefCnt = 0; bFntChg = rFont.bFntChg; bOrgChg = rFont.bOrgChg; @@ -629,7 +639,9 @@ BOOL SwSubFont::ChgFnt( ViewShell *pSh, OutputDevice& rOut ) pLastFont->SetDevFont( pSh, rOut ); pLastFont->Lock(); - return UNDERLINE_NONE != GetUnderline() || STRIKEOUT_NONE != GetStrikeout(); + return UNDERLINE_NONE != GetUnderline() || + UNDERLINE_NONE != GetOverline() || + STRIKEOUT_NONE != GetStrikeout(); } /************************************************************************* @@ -658,6 +670,8 @@ void SwFont::ChgPhysFnt( ViewShell *pSh, OutputDevice& rOut ) } if( rOut.GetTextLineColor() != aUnderColor ) rOut.SetTextLineColor( aUnderColor ); + if( rOut.GetOverlineColor() != aOverColor ) + rOut.SetOverlineColor( aOverColor ); } /************************************************************************* diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx index becba7d6c3..1ff80d2cb8 100644 --- a/sw/source/core/unocore/unomap.cxx +++ b/sw/source/core/unocore/unomap.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: unomap.cxx,v $ - * $Revision: 1.213 $ + * $Revision: 1.213.54.1 $ * * This file is part of OpenOffice.org. * @@ -304,9 +304,12 @@ void SwUnoPropertyMapProvider::Sort( sal_uInt16 nId ) { SW_PROP_NMID(UNO_NAME_CHAR_AUTO_ESCAPEMENT), RES_CHRATR_ESCAPEMENT, CPPU_E2T(CPPUTYPE_BOOLEAN) , PropertyAttribute::MAYBEVOID, MID_AUTO_ESC }, \ { SW_PROP_NMID(UNO_NAME_CHAR_FLASH), RES_CHRATR_BLINK , CPPU_E2T(CPPUTYPE_BOOLEAN) , PropertyAttribute::MAYBEVOID, 0}, \ { SW_PROP_NMID(UNO_NAME_CHAR_HIDDEN), RES_CHRATR_HIDDEN, CPPU_E2T(CPPUTYPE_BOOLEAN) , PropertyAttribute::MAYBEVOID, 0},\ - { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, MID_UNDERLINE}, \ - { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE_COLOR), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_INT32), PropertyAttribute::MAYBEVOID, MID_UL_COLOR}, \ - { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE_HAS_COLOR), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_BOOLEAN), PropertyAttribute::MAYBEVOID, MID_UL_HASCOLOR}, \ + { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, MID_TL_STYLE}, \ + { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE_COLOR), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_INT32), PropertyAttribute::MAYBEVOID, MID_TL_COLOR}, \ + { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE_HAS_COLOR), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_BOOLEAN), PropertyAttribute::MAYBEVOID, MID_TL_HASCOLOR}, \ + { SW_PROP_NMID(UNO_NAME_CHAR_OVERLINE), RES_CHRATR_OVERLINE , CPPU_E2T(CPPUTYPE_INT16), PropertyAttribute::MAYBEVOID, MID_TL_STYLE}, \ + { SW_PROP_NMID(UNO_NAME_CHAR_OVERLINE_COLOR), RES_CHRATR_OVERLINE , CPPU_E2T(CPPUTYPE_INT32), PropertyAttribute::MAYBEVOID, MID_TL_COLOR}, \ + { SW_PROP_NMID(UNO_NAME_CHAR_OVERLINE_HAS_COLOR), RES_CHRATR_OVERLINE , CPPU_E2T(CPPUTYPE_BOOLEAN), PropertyAttribute::MAYBEVOID, MID_TL_HASCOLOR}, \ { SW_PROP_NMID(UNO_NAME_PARA_GRAPHIC_URL), RES_BACKGROUND, CPPU_E2T(CPPUTYPE_OUSTRING), PropertyAttribute::MAYBEVOID ,MID_GRAPHIC_URL }, \ { SW_PROP_NMID(UNO_NAME_PARA_GRAPHIC_FILTER), RES_BACKGROUND, CPPU_E2T(CPPUTYPE_OUSTRING), PropertyAttribute::MAYBEVOID ,MID_GRAPHIC_FILTER }, \ { SW_PROP_NMID(UNO_NAME_PARA_GRAPHIC_LOCATION), RES_BACKGROUND, CPPU_E2T(CPPUTYPE_GRAPHICLOC), PropertyAttribute::MAYBEVOID ,MID_GRAPHIC_POSITION}, \ @@ -519,9 +522,12 @@ void SwUnoPropertyMapProvider::Sort( sal_uInt16 nId ) _STANDARD_FONT_PROPERTIES\ _CJK_FONT_PROPERTIES\ _CTL_FONT_PROPERTIES\ - { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, MID_UNDERLINE},\ - { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE_COLOR), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE, MID_UL_COLOR},\ - { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE_HAS_COLOR), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, MID_UL_HASCOLOR},\ + { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, MID_TL_STYLE},\ + { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE_COLOR), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE, MID_TL_COLOR},\ + { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE_HAS_COLOR), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, MID_TL_HASCOLOR},\ + { SW_PROP_NMID(UNO_NAME_CHAR_OVERLINE), RES_CHRATR_OVERLINE , CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, MID_TL_STYLE},\ + { SW_PROP_NMID(UNO_NAME_CHAR_OVERLINE_COLOR), RES_CHRATR_OVERLINE , CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE, MID_TL_COLOR},\ + { SW_PROP_NMID(UNO_NAME_CHAR_OVERLINE_HAS_COLOR), RES_CHRATR_OVERLINE , CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, MID_TL_HASCOLOR},\ { SW_PROP_NMID(UNO_NAME_PARA_LEFT_MARGIN), RES_LR_SPACE, CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE, MID_TXT_LMARGIN|CONVERT_TWIPS},\ { SW_PROP_NMID(UNO_NAME_PARA_RIGHT_MARGIN), RES_LR_SPACE, CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE, MID_R_MARGIN|CONVERT_TWIPS},\ { SW_PROP_NMID(UNO_NAME_PARA_LEFT_MARGIN_RELATIVE), RES_LR_SPACE, CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, MID_L_REL_MARGIN},\ @@ -672,9 +678,12 @@ const SfxItemPropertyMap* SwUnoPropertyMapProvider::GetPropertyMap(sal_uInt16 nP _STANDARD_FONT_PROPERTIES _CJK_FONT_PROPERTIES _CTL_FONT_PROPERTIES - { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, MID_UNDERLINE}, - { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE_COLOR), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE, MID_UL_COLOR}, - { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE_HAS_COLOR), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, MID_UL_HASCOLOR}, + { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, MID_TL_STYLE}, + { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE_COLOR), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE, MID_TL_COLOR}, + { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE_HAS_COLOR), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, MID_TL_HASCOLOR}, + { SW_PROP_NMID(UNO_NAME_CHAR_OVERLINE), RES_CHRATR_OVERLINE , CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, MID_TL_STYLE}, + { SW_PROP_NMID(UNO_NAME_CHAR_OVERLINE_COLOR), RES_CHRATR_OVERLINE , CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE, MID_TL_COLOR}, + { SW_PROP_NMID(UNO_NAME_CHAR_OVERLINE_HAS_COLOR), RES_CHRATR_OVERLINE , CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, MID_TL_HASCOLOR}, { SW_PROP_NMID(UNO_NAME_CHAR_KERNING), RES_CHRATR_KERNING , CPPU_E2T(CPPUTYPE_INT16) , PROPERTY_NONE, CONVERT_TWIPS}, { SW_PROP_NMID(UNO_NAME_CHAR_NO_HYPHENATION), RES_CHRATR_NOHYPHEN , CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0}, { SW_PROP_NMID(UNO_NAME_CHAR_SHADOWED), RES_CHRATR_SHADOWED , CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0}, @@ -716,9 +725,12 @@ const SfxItemPropertyMap* SwUnoPropertyMapProvider::GetPropertyMap(sal_uInt16 nP _STANDARD_FONT_PROPERTIES _CJK_FONT_PROPERTIES _CTL_FONT_PROPERTIES - { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, MID_UNDERLINE}, - { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE_COLOR), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE, MID_UL_COLOR}, - { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE_HAS_COLOR), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, MID_UL_HASCOLOR}, + { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, MID_TL_STYLE}, + { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE_COLOR), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE, MID_TL_COLOR}, + { SW_PROP_NMID(UNO_NAME_CHAR_UNDERLINE_HAS_COLOR), RES_CHRATR_UNDERLINE , CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, MID_TL_HASCOLOR}, + { SW_PROP_NMID(UNO_NAME_CHAR_OVERLINE), RES_CHRATR_OVERLINE , CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, MID_TL_STYLE}, + { SW_PROP_NMID(UNO_NAME_CHAR_OVERLINE_COLOR), RES_CHRATR_OVERLINE , CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE, MID_TL_COLOR}, + { SW_PROP_NMID(UNO_NAME_CHAR_OVERLINE_HAS_COLOR), RES_CHRATR_OVERLINE , CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, MID_TL_HASCOLOR}, { SW_PROP_NMID(UNO_NAME_CHAR_KERNING), RES_CHRATR_KERNING , CPPU_E2T(CPPUTYPE_INT16) , PROPERTY_NONE, CONVERT_TWIPS}, { SW_PROP_NMID(UNO_NAME_CHAR_NO_HYPHENATION), RES_CHRATR_NOHYPHEN , CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0}, { SW_PROP_NMID(UNO_NAME_CHAR_SHADOWED), RES_CHRATR_SHADOWED , CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE, 0}, diff --git a/sw/source/core/unocore/unoprnms.cxx b/sw/source/core/unocore/unoprnms.cxx index 6349e8b5de..36ba9f5581 100644 --- a/sw/source/core/unocore/unoprnms.cxx +++ b/sw/source/core/unocore/unoprnms.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: unoprnms.cxx,v $ - * $Revision: 1.139 $ + * $Revision: 1.139.100.1 $ * * This file is part of OpenOffice.org. * @@ -774,7 +774,10 @@ const SwPropNameTab aPropNameTab = { /* 0729 UNO_NAME_DEFAULT_LIST_ID*/ {MAP_CHAR_LEN("DefaultListId")}, /* 0730 UNO_NAME_STREAM_NAME */ {MAP_CHAR_LEN("StreamName")}, /* 0731 UNO_NAME_PARA_CONTINUEING_PREVIOUS_SUB_TREE */ {MAP_CHAR_LEN("ContinueingPreviousSubTree")}, -/* 0732 UNO_NAME_PARA_LIST_LABEL_STRING */ {MAP_CHAR_LEN("ListLabelString")} +/* 0732 UNO_NAME_PARA_LIST_LABEL_STRING */ {MAP_CHAR_LEN("ListLabelString")}, +/* 0733 CHAR_OVERLINE */ {MAP_CHAR_LEN("CharOverline")}, +/* 0734 CHAR_OVERLINE_COLOR */ {MAP_CHAR_LEN("CharOverlineColor")}, +/* 0735 CHAR_OVERLINE_HAS_COLOR */ {MAP_CHAR_LEN("CharOverlineHasColor")} }; const SwPropNameLen& SwGetPropName( USHORT nId ) diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx index ad38ce3d23..b446cbcf60 100644 --- a/sw/source/core/unocore/unosrch.cxx +++ b/sw/source/core/unocore/unosrch.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: unosrch.cxx,v $ - * $Revision: 1.19 $ + * $Revision: 1.19.210.1 $ * * This file is part of OpenOffice.org. * @@ -179,6 +179,7 @@ void SwSearchProperties_Impl::FillItemSet(SfxItemSet& rSet, sal_Bool bIsValueSea *pDropItem = 0, *pWeightItem = 0, *pULineItem = 0, + *pOLineItem = 0, *pCharFmtItem = 0, *pShadItem = 0, *pPostItem = 0, @@ -298,6 +299,11 @@ void SwSearchProperties_Impl::FillItemSet(SfxItemSet& rSet, sal_Bool bIsValueSea pULineItem = rSet.GetPool()->GetDefaultItem(pTempMap->nWID).Clone(); pTempItem = pULineItem; break; + case RES_CHRATR_OVERLINE: + if(!pOLineItem) + pOLineItem = rSet.GetPool()->GetDefaultItem(pTempMap->nWID).Clone(); + pTempItem = pOLineItem; + break; case RES_CHRATR_WEIGHT: if(!pWeightItem) pWeightItem = rSet.GetPool()->GetDefaultItem(pTempMap->nWID).Clone(); @@ -406,6 +412,7 @@ void SwSearchProperties_Impl::FillItemSet(SfxItemSet& rSet, sal_Bool bIsValueSea delete pDropItem; delete pWeightItem; delete pULineItem; + delete pOLineItem; delete pCharFmtItem ; delete pShadItem; delete pPostItem; diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 26f61b3a71..81586a5bb7 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: css1atr.cxx,v $ - * $Revision: 1.44 $ + * $Revision: 1.44.138.1 $ * * This file is part of OpenOffice.org. * @@ -163,8 +163,9 @@ static Writer& OutCSS1_SwFtnInfo( Writer& rWrt, const SwEndNoteInfo& rInfo, static void OutCSS1_SwFmtDropAttrs( SwHTMLWriter& rHWrt, const SwFmtDrop& rDrop, const SfxItemSet *pCharFmtItemSet=0 ); -static Writer& OutCSS1_SvxUnderl_SvxCrOut_SvxBlink( Writer& rWrt, +static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt, const SvxUnderlineItem *pUItem, + const SvxOverlineItem *pOItem, const SvxCrossedOutItem *pCOItem, const SvxBlinkItem *pBItem ); static Writer& OutCSS1_SvxFontWeight( Writer& rWrt, const SfxPoolItem& rHt ); @@ -545,7 +546,7 @@ void SwHTMLWriter::OutCSS1_SfxItemSet( const SfxItemSet& rItemSet, // ein par Attribute benoetigen eine Spezial-Behandlung const SfxPoolItem *pItem = 0; - // Underline, CrossedOut und Blink bilden zusammen eine CSS1-Property + // Underline, Overline, CrossedOut und Blink bilden zusammen eine CSS1-Property // (geht natuerlich nicht bei Hints) if( !IsCSS1Source(CSS1_OUTMODE_HINT) ) { @@ -553,6 +554,10 @@ void SwHTMLWriter::OutCSS1_SfxItemSet( const SfxItemSet& rItemSet, if( SFX_ITEM_SET==rItemSet.GetItemState( RES_CHRATR_UNDERLINE, bDeep, &pItem )) pUnderlineItem = (const SvxUnderlineItem *)pItem; + const SvxOverlineItem *pOverlineItem = 0; + if( SFX_ITEM_SET==rItemSet.GetItemState( RES_CHRATR_OVERLINE, bDeep, &pItem )) + pOverlineItem = (const SvxOverlineItem *)pItem; + const SvxCrossedOutItem *pCrossedOutItem = 0; if( SFX_ITEM_SET==rItemSet.GetItemState( RES_CHRATR_CROSSEDOUT, bDeep, &pItem )) pCrossedOutItem = (const SvxCrossedOutItem *)pItem; @@ -561,8 +566,9 @@ void SwHTMLWriter::OutCSS1_SfxItemSet( const SfxItemSet& rItemSet, if( SFX_ITEM_SET==rItemSet.GetItemState( RES_CHRATR_BLINK, bDeep, &pItem )) pBlinkItem = (const SvxBlinkItem *)pItem; - if( pUnderlineItem || pCrossedOutItem || pBlinkItem ) - OutCSS1_SvxUnderl_SvxCrOut_SvxBlink( *this, pUnderlineItem, + if( pUnderlineItem || pOverlineItem || pCrossedOutItem || pBlinkItem ) + OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( *this, pUnderlineItem, + pOverlineItem, pCrossedOutItem, pBlinkItem ); @@ -2453,20 +2459,22 @@ void SwHTMLWriter::OutCSS1_FrmFmtBackground( const SwFrmFmt& rFrmFmt ) //----------------------------------------------------------------------- -static Writer& OutCSS1_SvxUnderl_SvxCrOut_SvxBlink( Writer& rWrt, +static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt, const SvxUnderlineItem *pUItem, + const SvxOverlineItem *pOItem, const SvxCrossedOutItem *pCOItem, const SvxBlinkItem *pBItem ) { SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt; + BOOL bNone = FALSE; const sal_Char *pUStr = 0; if( pUItem ) { - switch( pUItem->GetUnderline() ) + switch( pUItem->GetLineStyle() ) { case UNDERLINE_NONE: - pUStr = sCSS1_PV_none; + bNone = TRUE; break; case UNDERLINE_DONTKNOW: break; @@ -2483,16 +2491,38 @@ static Writer& OutCSS1_SvxUnderl_SvxCrOut_SvxBlink( Writer& rWrt, } } + const sal_Char *pOStr = 0; + if( pOItem ) + { + switch( pOItem->GetLineStyle() ) + { + case UNDERLINE_NONE: + bNone = TRUE; + break; + case UNDERLINE_DONTKNOW: + break; + default: + if( !rHTMLWrt.IsCSS1Source( CSS1_OUTMODE_PARA ) ) + { + // das geht auch in HTML und muss nicht als STYLE-Option + // und darf nicht als Hint geschrieben werden + ASSERT( !rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT), + "Overline als Hint schreiben?" ); + pOStr = sCSS1_PV_overline; + } + break; + } + } + const sal_Char *pCOStr = 0; if( pCOItem ) { switch( pCOItem->GetStrikeout() ) { - case STRIKEOUT_DONTKNOW: - break; case STRIKEOUT_NONE: - if( !pUStr ) - pUStr = sCSS1_PV_none; + bNone = TRUE; + break; + case STRIKEOUT_DONTKNOW: break; default: if( !rHTMLWrt.IsCSS1Source( CSS1_OUTMODE_PARA ) ) @@ -2502,8 +2532,6 @@ static Writer& OutCSS1_SvxUnderl_SvxCrOut_SvxBlink( Writer& rWrt, ASSERT( !rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT), "CrossedOut als Hint schreiben?" ); pCOStr = sCSS1_PV_line_through; - if( pUStr && sCSS1_PV_none == pUStr ) - pUStr = 0; } break; } @@ -2514,8 +2542,7 @@ static Writer& OutCSS1_SvxUnderl_SvxCrOut_SvxBlink( Writer& rWrt, { if( !pBItem->GetValue() ) { - if( !pUStr && !pCOStr ) - pBStr = sCSS1_PV_none; + bNone = TRUE; } else if( !rHTMLWrt.IsCSS1Source( CSS1_OUTMODE_PARA ) ) { @@ -2524,10 +2551,6 @@ static Writer& OutCSS1_SvxUnderl_SvxCrOut_SvxBlink( Writer& rWrt, ASSERT( !rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT), "Blink als Hint schreiben?" ); pBStr = sCSS1_PV_blink; - if( pUStr && sCSS1_PV_none == pUStr ) - pUStr = 0; - if( pCOStr && sCSS1_PV_none == pCOStr ) - pCOStr = 0; } } @@ -2535,6 +2558,14 @@ static Writer& OutCSS1_SvxUnderl_SvxCrOut_SvxBlink( Writer& rWrt, if( pUStr ) sOut.Append( pUStr ); + if( pOStr ) + { + if( sOut.Len() ) + sOut += ' '; + + sOut.Append( pOStr ); + } + if( pCOStr ) { if( sOut.Len() ) @@ -2553,6 +2584,8 @@ static Writer& OutCSS1_SvxUnderl_SvxCrOut_SvxBlink( Writer& rWrt, if( sOut.Len() ) rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_text_decoration, sOut ); + else if( bNone ) + rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_text_decoration, sCSS1_PV_none ); return rWrt; } @@ -2608,11 +2641,11 @@ static Writer& OutCSS1_SvxColor( Writer& rWrt, const SfxPoolItem& rHt ) static Writer& OutCSS1_SvxCrossedOut( Writer& rWrt, const SfxPoolItem& rHt ) { // Mit dieser Methode werden nur Hints ausgegeben! - // Sonst wird OutCSS1_SvxUnderl_SvxCrOut_SvxBlink() direkt aufgerufen. + // Sonst wird OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink() direkt aufgerufen. if( ((SwHTMLWriter&)rWrt).IsCSS1Source(CSS1_OUTMODE_HINT) ) - OutCSS1_SvxUnderl_SvxCrOut_SvxBlink( rWrt, 0, - (const SvxCrossedOutItem *)&rHt, 0 ); + OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( rWrt, + 0, 0, (const SvxCrossedOutItem *)&rHt, 0 ); return rWrt; } @@ -2793,11 +2826,24 @@ static Writer& OutCSS1_SvxLanguage( Writer& rWrt, const SfxPoolItem& rHt ) static Writer& OutCSS1_SvxUnderline( Writer& rWrt, const SfxPoolItem& rHt ) { // Mit dieser Methode werden nur Hints ausgegeben! - // Sonst wird OutCSS1_SvxUnderl_SvxCrOut_SvxBlink() direkt aufgerufen. + // Sonst wird OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink() direkt aufgerufen. + + if( ((SwHTMLWriter&)rWrt).IsCSS1Source(CSS1_OUTMODE_HINT) ) + OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( rWrt, + (const SvxUnderlineItem *)&rHt, 0, 0, 0 ); + + return rWrt; +} + + +static Writer& OutCSS1_SvxOverline( Writer& rWrt, const SfxPoolItem& rHt ) +{ + // Mit dieser Methode werden nur Hints ausgegeben! + // Sonst wird OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink() direkt aufgerufen. if( ((SwHTMLWriter&)rWrt).IsCSS1Source(CSS1_OUTMODE_HINT) ) - OutCSS1_SvxUnderl_SvxCrOut_SvxBlink( rWrt, - (const SvxUnderlineItem *)&rHt, 0, 0 ); + OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( rWrt, + 0, (const SvxOverlineItem *)&rHt, 0, 0 ); return rWrt; } @@ -2848,11 +2894,11 @@ static Writer& OutCSS1_SvxFontWeight( Writer& rWrt, const SfxPoolItem& rHt ) static Writer& OutCSS1_SvxBlink( Writer& rWrt, const SfxPoolItem& rHt ) { // Mit dieser Methode werden nur Hints ausgegeben! - // Sonst wird OutCSS1_SvxUnderl_SvxCrOut_SvxBlink() direkt aufgerufen. + // Sonst wird OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink() direkt aufgerufen. if( ((SwHTMLWriter&)rWrt).IsCSS1Source(CSS1_OUTMODE_HINT) ) - OutCSS1_SvxUnderl_SvxCrOut_SvxBlink( rWrt, - 0, 0, (const SvxBlinkItem *)&rHt ); + OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( rWrt, + 0, 0, 0, (const SvxBlinkItem *)&rHt ); return rWrt; } @@ -3699,12 +3745,15 @@ SwAttrFnTab aCSS1AttrFnTab = { /* RES_CHRATR_CTL_LANGUAGE */ OutCSS1_SvxLanguage, /* RES_CHRATR_CTL_POSTURE */ OutCSS1_SvxPosture, /* RES_CHRATR_CTL_WEIGHT */ OutCSS1_SvxFontWeight, -/* RES_CHRATR_WRITING_DIRECTION */ 0, -/* RES_CHRATR_DUMMY2 */ 0, -/* RES_CHRATR_DUMMY3 */ 0, -/* RES_CHRATR_DUMMY4 */ 0, -/* RES_CHRATR_DUMMY5 */ 0, -/* RES_CHRATR_HIDDEN */ 0, // Dummy: +/* RES_CHRATR_ROTATE */ 0, +/* RES_CHRATR_EMPHASIS_MARK */ 0, +/* RES_CHRATR_TWO_LINES */ 0, +/* RES_CHRATR_SCALEW */ 0, +/* RES_CHRATR_RELIEF */ 0, +/* RES_CHRATR_HIDDEN */ 0, +/* RES_CHRATR_OVERLINE */ OutCSS1_SvxOverline, +/* RES_CHRATR_DUMMY1 */ 0, +/* RES_CHRATR_DUMMY2 */ 0, /* RES_TXTATR_NOLINEBREAK */ 0, /* RES_TXTATR_NOHYPHEN */ 0, diff --git a/sw/source/filter/html/css1kywd.cxx b/sw/source/filter/html/css1kywd.cxx index f8ba54aaae..1660cc2f09 100644 --- a/sw/source/filter/html/css1kywd.cxx +++ b/sw/source/filter/html/css1kywd.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: css1kywd.cxx,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.210.1 $ * * This file is part of OpenOffice.org. * @@ -165,6 +165,7 @@ sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_P_text_decoration, "text-decorati sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_none, "none" ); sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_underline, "underline" ); +sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_overline, "overline" ); sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_line_through, "line-through" ); sal_Char __FAR_DATA CSS1_CONSTASCII_DEF( sCSS1_PV_blink, "blink" ); diff --git a/sw/source/filter/html/css1kywd.hxx b/sw/source/filter/html/css1kywd.hxx index 6571979e6c..c88c988427 100644 --- a/sw/source/filter/html/css1kywd.hxx +++ b/sw/source/filter/html/css1kywd.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: css1kywd.hxx,v $ - * $Revision: 1.5 $ + * $Revision: 1.5.210.1 $ * * This file is part of OpenOffice.org. * @@ -171,6 +171,7 @@ extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_P_text_decoration, "text- extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_none, "none" ); extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_underline, "underline" ); +extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_overline, "overline" ); extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_line_through, "line-through" ); extern sal_Char __FAR_DATA CSS1_CONSTASCII_DECL( sCSS1_PV_blink, "blink" ); diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index aa8b8c51df..38c48b2e11 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: htmlatr.cxx,v $ - * $Revision: 1.41 $ + * $Revision: 1.41.140.1 $ * * This file is part of OpenOffice.org. * @@ -1448,7 +1448,7 @@ HTMLOnOffState HTMLEndPosLst::GetHTMLItemState( const SfxPoolItem& rItem ) break; case RES_CHRATR_UNDERLINE: - switch( ((const SvxUnderlineItem&)rItem).GetUnderline() ) + switch( ((const SvxUnderlineItem&)rItem).GetLineStyle() ) { case UNDERLINE_SINGLE: eState = HTML_ON_VALUE; @@ -1463,6 +1463,11 @@ HTMLOnOffState HTMLEndPosLst::GetHTMLItemState( const SfxPoolItem& rItem ) } break; + case RES_CHRATR_OVERLINE: + if( IsHTMLMode(HTMLMODE_SOME_STYLES) ) + eState = HTML_STYLE_VALUE; + break; + case RES_CHRATR_WEIGHT: case RES_CHRATR_CJK_WEIGHT: case RES_CHRATR_CTL_WEIGHT: @@ -1851,7 +1856,9 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem, // Zeichen-Hintergrund-Attribut. Es muss immer wie ein // Hint behandelt werden. bSet = bOutStyles && - (!bParaAttrs || rItem.Which()==RES_CHRATR_BACKGROUND); + (!bParaAttrs + || rItem.Which()==RES_CHRATR_BACKGROUND + || rItem.Which()==RES_CHRATR_OVERLINE); break; case HTML_CHRFMT_VALUE: @@ -3004,7 +3011,7 @@ static Writer& OutHTML_SwUnderline( Writer& rWrt, const SfxPoolItem& rHt ) if( rHTMLWrt.bOutOpts ) return rWrt; - const FontUnderline eUnder = ((const SvxUnderlineItem&)rHt).GetUnderline(); + const FontUnderline eUnder = ((const SvxUnderlineItem&)rHt).GetLineStyle(); if( UNDERLINE_NONE != eUnder ) { HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), sHTML_underline, rHTMLWrt.bTagOn ); @@ -3384,12 +3391,15 @@ SwAttrFnTab aHTMLAttrFnTab = { /* RES_CHRATR_CTL_LANGUAGE */ OutHTML_SvxLanguage, /* RES_CHRATR_CTL_POSTURE */ OutHTML_SwPosture, /* RES_CHRATR_CTL_WEIGHT */ OutHTML_SwWeight, -/* RES_CHRATR_WRITING_DIRECTION */ 0, -/* RES_CHRATR_DUMMY2 */ 0, -/* RES_CHRATR_DUMMY3 */ 0, -/* RES_CHRATR_DUMMY4 */ 0, -/* RES_CHRATR_DUMMY5 */ 0, -/* RES_CHRATR_HIDDEN */ 0, // Dummy: +/* RES_CHRATR_ROTATE */ 0, +/* RES_CHRATR_EMPHASIS_MARK */ 0, +/* RES_CHRATR_TWO_LINES */ 0, +/* RES_CHRATR_SCALEW */ 0, +/* RES_CHRATR_RELIEF */ 0, +/* RES_CHRATR_HIDDEN */ 0, +/* RES_CHRATR_OVERLINE */ OutHTML_CSS1Attr, +/* RES_CHRATR_DUMMY1 */ 0, +/* RES_CHRATR_DUMMY2 */ 0, /* RES_TXTATR_DUMMY4 */ 0, /* RES_TXTATR_INETFMT */ OutHTML_SwFmtINetFmt, diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index f76f48e408..196774f8ef 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: htmlform.cxx,v $ - * $Revision: 1.27 $ + * $Revision: 1.27.94.1 $ * * This file is part of OpenOffice.org. * @@ -1144,7 +1144,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( sal_True, &pItem ) && xPropSetInfo->hasPropertyByName( sPropName ) ) { - aTmp <<= (sal_Int16)((SvxUnderlineItem *)pItem)->GetUnderline(); + aTmp <<= (sal_Int16)((SvxUnderlineItem *)pItem)->GetLineStyle(); rFCompPropSet->setPropertyValue( sPropName, aTmp ); } diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx index 8d6e99c007..bda9ee26e0 100644 --- a/sw/source/filter/html/svxcss1.cxx +++ b/sw/source/filter/html/svxcss1.cxx @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: svxcss1.cxx,v $ - * $Revision: 1.20.214.1 $ + * $Revision: 1.20.210.1 $ * * This file is part of OpenOffice.org. * @@ -309,6 +309,7 @@ struct SvxCSS1ItemIds USHORT nFontHeightCJK; USHORT nFontHeightCTL; USHORT nUnderline; + USHORT nOverline; USHORT nCrossedOut; USHORT nColor; USHORT nKerning; @@ -802,6 +803,7 @@ SvxCSS1Parser::SvxCSS1Parser( SfxItemPool& rPool, const String& rBaseURL, USHORT aItemIds.nFontHeightCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONTHEIGHT, FALSE ); aItemIds.nFontHeightCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONTHEIGHT, FALSE ); aItemIds.nUnderline = rPool.GetTrueWhich( SID_ATTR_CHAR_UNDERLINE, FALSE ); + aItemIds.nOverline = rPool.GetTrueWhich( SID_ATTR_CHAR_OVERLINE, FALSE ); aItemIds.nCrossedOut = rPool.GetTrueWhich( SID_ATTR_CHAR_STRIKEOUT, FALSE ); aItemIds.nColor = rPool.GetTrueWhich( SID_ATTR_CHAR_COLOR, FALSE ); aItemIds.nKerning = rPool.GetTrueWhich( SID_ATTR_CHAR_KERNING, FALSE ); @@ -1917,10 +1919,12 @@ static void ParseCSS1_text_decoration( const CSS1Expression *pExpr, DBG_ASSERT( pExpr, "kein Ausdruck" ); BOOL bUnderline = FALSE; + BOOL bOverline = FALSE; BOOL bCrossedOut = FALSE; BOOL bBlink = FALSE; BOOL bBlinkOn = FALSE; FontUnderline eUnderline = UNDERLINE_NONE; + FontUnderline eOverline = UNDERLINE_NONE; FontStrikeout eCrossedOut = STRIKEOUT_NONE; // der Wert kann zwei Werte enthalten! Und MS-IE auch Strings @@ -1939,6 +1943,9 @@ static void ParseCSS1_text_decoration( const CSS1Expression *pExpr, bUnderline = TRUE; eUnderline = UNDERLINE_NONE; + bOverline = TRUE; + eOverline = UNDERLINE_NONE; + bCrossedOut = TRUE; eCrossedOut = STRIKEOUT_NONE; @@ -1959,6 +1966,16 @@ static void ParseCSS1_text_decoration( const CSS1Expression *pExpr, } break; + case 'o': + if( aValue.EqualsAscii( sCSS1_PV_overline ) ) + { + bOverline = TRUE; + eOverline = UNDERLINE_SINGLE; + + bKnown = TRUE; + } + break; + case 'l': if( aValue.EqualsAscii( sCSS1_PV_line_through ) ) { @@ -1992,6 +2009,9 @@ static void ParseCSS1_text_decoration( const CSS1Expression *pExpr, if( bUnderline ) rItemSet.Put( SvxUnderlineItem( eUnderline, aItemIds.nUnderline ) ); + if( bOverline ) + rItemSet.Put( SvxOverlineItem( eOverline, aItemIds.nOverline ) ); + if( bCrossedOut ) rItemSet.Put( SvxCrossedOutItem( eCrossedOut, aItemIds.nCrossedOut ) ); diff --git a/sw/source/filter/rtf/rtfatr.cxx b/sw/source/filter/rtf/rtfatr.cxx index 7ae50ac807..f791d05156 100644 --- a/sw/source/filter/rtf/rtfatr.cxx +++ b/sw/source/filter/rtf/rtfatr.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: rtfatr.cxx,v $ - * $Revision: 1.75 $ + * $Revision: 1.75.136.1 $ * * This file is part of OpenOffice.org. * @@ -2442,7 +2442,7 @@ static Writer& OutRTF_SwCaseMap( Writer& rWrt, const SfxPoolItem& rHt ) static Writer& OutRTF_SwUnderline( Writer& rWrt, const SfxPoolItem& rHt ) { const char* pStr = 0; - switch( ((const SvxUnderlineItem&)rHt).GetUnderline() ) + switch( ((const SvxUnderlineItem&)rHt).GetLineStyle() ) { case UNDERLINE_SINGLE: pStr = sRTF_UL; @@ -2503,7 +2503,7 @@ static Writer& OutRTF_SwUnderline( Writer& rWrt, const SfxPoolItem& rHt ) { SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; - if( UNDERLINE_SINGLE == ((const SvxUnderlineItem&)rHt).GetUnderline() + if( UNDERLINE_SINGLE == ((const SvxUnderlineItem&)rHt).GetLineStyle() && ((SvxWordLineModeItem&)rRTFWrt.GetItem( RES_CHRATR_WORDLINEMODE )).GetValue() ) pStr = sRTF_ULW; @@ -2521,6 +2521,90 @@ static Writer& OutRTF_SwUnderline( Writer& rWrt, const SfxPoolItem& rHt ) +static Writer& OutRTF_SwOverline( Writer& rWrt, const SfxPoolItem& rHt ) +{ + const char* pStr = 0; + switch( ((const SvxOverlineItem&)rHt).GetLineStyle() ) + { + case UNDERLINE_SINGLE: + pStr = sRTF_OL; + break; + case UNDERLINE_DOUBLE: + pStr = sRTF_OLDB; + break; + case UNDERLINE_NONE: + pStr = sRTF_OLNONE; + break; + case UNDERLINE_DOTTED: + pStr = sRTF_OLD; + break; + case UNDERLINE_DASH: + pStr = sRTF_OLDASH; + break; + case UNDERLINE_DASHDOT: + pStr = sRTF_OLDASHD; + break; + case UNDERLINE_DASHDOTDOT: + pStr = sRTF_OLDASHDD; + break; + case UNDERLINE_BOLD: + pStr = sRTF_OLTH; + break; + case UNDERLINE_WAVE: + pStr = sRTF_OLWAVE; + break; + case UNDERLINE_BOLDDOTTED: + pStr = sRTF_OLTHD; + break; + case UNDERLINE_BOLDDASH: + pStr = sRTF_OLTHDASH; + break; + case UNDERLINE_LONGDASH: + pStr = sRTF_OLLDASH; + break; + case UNDERLINE_BOLDLONGDASH: + pStr = sRTF_OLTHLDASH; + break; + case UNDERLINE_BOLDDASHDOT: + pStr = sRTF_OLTHDASHD; + break; + case UNDERLINE_BOLDDASHDOTDOT: + pStr = sRTF_OLTHDASHDD; + break; + case UNDERLINE_BOLDWAVE: + pStr = sRTF_OLHWAVE; + break; + case UNDERLINE_DOUBLEWAVE: + pStr = sRTF_OLOLDBWAVE; + break; + default: + break; + } + + if( pStr ) + { + SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; + if ( rRTFWrt.bNonStandard ) + { + if( UNDERLINE_SINGLE == ((const SvxOverlineItem&)rHt).GetLineStyle() + && ((SvxWordLineModeItem&)rRTFWrt.GetItem( + RES_CHRATR_WORDLINEMODE )).GetValue() ) + pStr = sRTF_OLW; + + rRTFWrt.Strm() << pStr; + rRTFWrt.bOutFmtAttr = TRUE; + + rWrt.Strm() << sRTF_OLC; + rWrt.OutULong( rRTFWrt.GetId(((const SvxOverlineItem&)rHt).GetColor()) ); + } + + } + + return rWrt; +} + + + static Writer& OutRTF_SwLanguage( Writer& rWrt, const SfxPoolItem& rHt ) { SwRTFWriter& rRTFWrt = (SwRTFWriter&)rWrt; @@ -4144,6 +4228,9 @@ SwAttrFnTab aRTFAttrFnTab = { /* RES_CHRATR_SCALEW */ OutRTF_SwCharScaleW, /* RES_CHRATR_RELIEF */ OutRTF_SwCharRelief, /* RES_CHRATR_HIDDEN */ OutRTF_SvxCharHiddenItem, +/* RES_CHRATR_OVERLINE */ OutRTF_SwOverline, +/* RES_CHRATR_DUMMY1 */ 0, +/* RES_CHRATR_DUMMY2 */ 0, /* RES_TXTATR_AUTOFMT */ OutRTF_SwTxtAutoFmt, /* RES_TXTATR_INETFMT */ OutRTF_SwTxtINetFmt, // Dummy diff --git a/sw/source/filter/rtf/wrtrtf.cxx b/sw/source/filter/rtf/wrtrtf.cxx index 9e51a68b87..ac6eb6fa0f 100644 --- a/sw/source/filter/rtf/wrtrtf.cxx +++ b/sw/source/filter/rtf/wrtrtf.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: wrtrtf.cxx,v $ - * $Revision: 1.42 $ + * $Revision: 1.42.208.1 $ * * This file is part of OpenOffice.org. * @@ -108,6 +108,8 @@ SwRTFWriter::SwRTFWriter( const String& rFltName, const String & rBaseURL ) : bWriteHelpFmt = 'W' == rFltName.GetChar( 0 ); // schreibe nur Gliederungs Absaetze bOutOutlineOnly = 'O' == rFltName.GetChar( 0 ); + // enable non-standard tags for cut and paste + bNonStandard = '\0' == rFltName.GetChar( 0 ); } @@ -699,6 +701,16 @@ void SwRTFWriter::OutRTFColorTab() } + const SvxOverlineItem* pOver = (const SvxOverlineItem*)GetDfltAttr( RES_CHRATR_OVERLINE ); + InsColor( *pColTbl, pOver->GetColor() ); + nMaxItem = rPool.GetItemCount(RES_CHRATR_OVERLINE); + for( n = 0; n < nMaxItem;n++) + { + if( 0 != (pOver = (const SvxOverlineItem*)rPool.GetItem( RES_CHRATR_OVERLINE, n ) ) ) + InsColor( *pColTbl, pOver->GetColor() ); + + } + } // das Frame Hintergrund - Attribut diff --git a/sw/source/filter/rtf/wrtrtf.hxx b/sw/source/filter/rtf/wrtrtf.hxx index 43537dadad..30f9d32851 100644 --- a/sw/source/filter/rtf/wrtrtf.hxx +++ b/sw/source/filter/rtf/wrtrtf.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: wrtrtf.hxx,v $ - * $Revision: 1.18 $ + * $Revision: 1.18.210.1 $ * * This file is part of OpenOffice.org. * @@ -146,6 +146,8 @@ public: BOOL bIgnoreNextPgBreak : 1; // TRUE: naechsten PageDesc/Break ignorieren BOOL bAssociated : 1; // use associated tokens + BOOL bNonStandard : 1; // use non-standard tags (for cut and paste) + // --- public Methoden ------------------------------------------------ SwRTFWriter( const String& rFilterName, const String& rBaseURL ); diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 3dde865e55..4f30e935be 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -1206,7 +1206,7 @@ static Writer& OutWW8_SwUnderline( Writer& rWrt, const SfxPoolItem& rHt ) // 6 = thick, 7 = dash, 8 = dot(not used) // 9 = dotdash 10 = dotdotdash, 11 = wave BYTE b = 0; - switch (rAttr.GetUnderline()) + switch (rAttr.GetLineStyle()) { case UNDERLINE_SINGLE: b = ( bWord ) ? 2 : 1; @@ -1261,7 +1261,7 @@ static Writer& OutWW8_SwUnderline( Writer& rWrt, const SfxPoolItem& rHt ) b = 0; break; default: - ASSERT(rAttr.GetUnderline() == UNDERLINE_NONE, "Unhandled underline type"); + ASSERT(rAttr.GetLineStyle() == UNDERLINE_NONE, "Unhandled underline type"); break; } @@ -4959,6 +4959,9 @@ SwAttrFnTab aWW8AttrFnTab = { /* RES_CHRATR_DUMMY4 */ OutWW8_ScaleWidth, /* RES_CHRATR_RELIEF*/ OutWW8_Relief, /* RES_CHRATR_HIDDEN */ OutWW8_SvxCharHidden, +/* RES_CHRATR_OVERLINE */ 0, +/* RES_CHRATR_DUMMY1 */ 0, +/* RES_CHRATR_DUMMY2 */ 0, /* RES_TXTATR_DUMMY4 */ 0, /* RES_TXTATR_INETFMT */ OutSwFmtINetFmt, diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 2e24cfdf83..e351cf238b 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: ww8par3.cxx,v $ - * $Revision: 1.94 $ + * $Revision: 1.93.92.2 $ * * This file is part of OpenOffice.org. * @@ -2370,8 +2370,8 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const String &rString, break; case RES_CHRATR_UNDERLINE: - aTmp <<= (sal_Int16)(((SvxUnderlineItem*)pItem)->GetUnderline()); - aFont.SetUnderline(((SvxUnderlineItem*)pItem)->GetUnderline()); + aTmp <<= (sal_Int16)(((SvxUnderlineItem*)pItem)->GetLineStyle()); + aFont.SetUnderline(((SvxUnderlineItem*)pItem)->GetLineStyle()); break; case RES_CHRATR_CROSSEDOUT: diff --git a/sw/source/ui/inc/swmn_tmpl.hrc b/sw/source/ui/inc/swmn_tmpl.hrc index eea0eb2d2d..fc7380d678 100644 --- a/sw/source/ui/inc/swmn_tmpl.hrc +++ b/sw/source/ui/inc/swmn_tmpl.hrc @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: swmn_tmpl.hrc,v $ - * $Revision: 1.15 $ + * $Revision: 1.15.210.1 $ * * This file is part of OpenOffice.org. * @@ -94,6 +94,10 @@ };\ MenuItem\ {\ + ITEM_FORMAT_ATTR_CHAR_OVERLINE\ + };\ + MenuItem\ + {\ ITEM_FORMAT_ATTR_CHAR_UNDERLINE\ };\ MenuItem\ diff --git a/sw/source/ui/inc/toolbox_tmpl.hrc b/sw/source/ui/inc/toolbox_tmpl.hrc index 6395c8ee25..af8e64abaf 100644 --- a/sw/source/ui/inc/toolbox_tmpl.hrc +++ b/sw/source/ui/inc/toolbox_tmpl.hrc @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: toolbox_tmpl.hrc,v $ - * $Revision: 1.5 $ + * $Revision: 1.5.210.1 $ * * This file is part of OpenOffice.org. * @@ -64,6 +64,11 @@ };\ ToolBoxItem\ {\ + Identifier = SID_ATTR_CHAR_OVERLINE ; \ + HelpID = SID_ATTR_CHAR_OVERLINE ; \ + };\ + ToolBoxItem\ + {\ Identifier = FN_SET_SUPER_SCRIPT;\ HelpID = FN_SET_SUPER_SCRIPT;\ Hide = HIDE;\ @@ -115,6 +120,11 @@ };\ ToolBoxItem\ {\ + Identifier = SID_ATTR_CHAR_OVERLINE ; \ + HelpID = SID_ATTR_CHAR_OVERLINE ; \ + };\ + ToolBoxItem\ + {\ Identifier = FN_SET_SUPER_SCRIPT;\ HelpID = FN_SET_SUPER_SCRIPT;\ Hide = HIDE;\ diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx index 2d696b3715..b2c8846429 100755 --- a/sw/source/ui/shells/annotsh.cxx +++ b/sw/source/ui/shells/annotsh.cxx @@ -205,10 +205,16 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) case SID_ATTR_CHAR_COLOR: nEEWhich = EE_CHAR_COLOR; break; case SID_ATTR_CHAR_UNDERLINE: { - FontUnderline eFU = ((const SvxUnderlineItem&)aEditAttr.Get(EE_CHAR_UNDERLINE)).GetUnderline(); + FontUnderline eFU = ((const SvxUnderlineItem&)aEditAttr.Get(EE_CHAR_UNDERLINE)).GetLineStyle(); aNewAttr.Put(SvxUnderlineItem(eFU == UNDERLINE_SINGLE ? UNDERLINE_NONE : UNDERLINE_SINGLE, EE_CHAR_UNDERLINE)); break; } + case SID_ATTR_CHAR_OVERLINE: + { + FontUnderline eFO = ((const SvxOverlineItem&)aEditAttr.Get(EE_CHAR_OVERLINE)).GetLineStyle(); + aNewAttr.Put(SvxOverlineItem(eFO == UNDERLINE_SINGLE ? UNDERLINE_NONE : UNDERLINE_SINGLE, EE_CHAR_OVERLINE)); + break; + } case SID_ATTR_CHAR_CONTOUR: nEEWhich = EE_CHAR_OUTLINE; break; case SID_ATTR_CHAR_SHADOWED: nEEWhich = EE_CHAR_SHADOW; break; case SID_ATTR_CHAR_STRIKEOUT: nEEWhich = EE_CHAR_STRIKEOUT; break; @@ -613,6 +619,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet) break; case SID_ATTR_CHAR_COLOR: nEEWhich = EE_CHAR_COLOR; break; case SID_ATTR_CHAR_UNDERLINE: nEEWhich = EE_CHAR_UNDERLINE;break; + case SID_ATTR_CHAR_OVERLINE: nEEWhich = EE_CHAR_OVERLINE;break; case SID_ATTR_CHAR_CONTOUR: nEEWhich = EE_CHAR_OUTLINE; break; case SID_ATTR_CHAR_SHADOWED: nEEWhich = EE_CHAR_SHADOW;break; case SID_ATTR_CHAR_STRIKEOUT: nEEWhich = EE_CHAR_STRIKEOUT;break; diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx index 0b088300cc..fc15241d12 100644 --- a/sw/source/ui/shells/drwtxtex.cxx +++ b/sw/source/ui/shells/drwtxtex.cxx @@ -175,11 +175,18 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) case SID_ATTR_CHAR_UNDERLINE: { - FontUnderline eFU = ((const SvxUnderlineItem&)aEditAttr.Get(EE_CHAR_UNDERLINE)).GetUnderline(); + FontUnderline eFU = ((const SvxUnderlineItem&)aEditAttr.Get(EE_CHAR_UNDERLINE)).GetLineStyle(); aNewAttr.Put(SvxUnderlineItem(eFU == UNDERLINE_SINGLE ? UNDERLINE_NONE : UNDERLINE_SINGLE, EE_CHAR_UNDERLINE)); } break; + case SID_ATTR_CHAR_OVERLINE: + { + FontUnderline eFO = ((const SvxOverlineItem&)aEditAttr.Get(EE_CHAR_OVERLINE)).GetLineStyle(); + aNewAttr.Put(SvxOverlineItem(eFO == UNDERLINE_SINGLE ? UNDERLINE_NONE : UNDERLINE_SINGLE, EE_CHAR_OVERLINE)); + } + break; + case SID_ATTR_CHAR_CONTOUR: nEEWhich = EE_CHAR_OUTLINE; break; case SID_ATTR_CHAR_SHADOWED: nEEWhich = EE_CHAR_SHADOW; break; case SID_ATTR_CHAR_STRIKEOUT: nEEWhich = EE_CHAR_STRIKEOUT; break; @@ -784,6 +791,7 @@ void SwDrawTextShell::GetDrawTxtCtrlState(SfxItemSet& rSet) break; case SID_ATTR_CHAR_COLOR: nEEWhich = EE_CHAR_COLOR; break; case SID_ATTR_CHAR_UNDERLINE: nEEWhich = EE_CHAR_UNDERLINE;break; + case SID_ATTR_CHAR_OVERLINE: nEEWhich = EE_CHAR_OVERLINE;break; case SID_ATTR_CHAR_CONTOUR: nEEWhich = EE_CHAR_OUTLINE; break; case SID_ATTR_CHAR_SHADOWED: nEEWhich = EE_CHAR_SHADOW;break; case SID_ATTR_CHAR_STRIKEOUT: nEEWhich = EE_CHAR_STRIKEOUT;break; diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx index c6cc811405..8e6f6248ab 100644 --- a/sw/source/ui/shells/txtattr.cxx +++ b/sw/source/ui/shells/txtattr.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: txtattr.cxx,v $ - * $Revision: 1.28 $ + * $Revision: 1.28.140.1 $ * * This file is part of OpenOffice.org. * @@ -169,7 +169,7 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq) case FN_UNDERLINE_DOUBLE: { FontUnderline eUnderline = ((const SvxUnderlineItem&) - aSet.Get(RES_CHRATR_UNDERLINE)).GetUnderline(); + aSet.Get(RES_CHRATR_UNDERLINE)).GetLineStyle(); switch( eState ) { case STATE_TOGGLE: @@ -737,7 +737,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) if( eState >= SFX_ITEM_DEFAULT ) { FontUnderline eUnderline = ((const SvxUnderlineItem&) - aCoreSet.Get(RES_CHRATR_UNDERLINE)).GetUnderline(); + aCoreSet.Get(RES_CHRATR_UNDERLINE)).GetLineStyle(); rSet.Put(SfxBoolItem(nSlot, eUnderline == UNDERLINE_DOUBLE)); } else diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 5a9413adb7..1b756f47ef 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: tautofmt.cxx,v $ - * $Revision: 1.24 $ + * $Revision: 1.24.190.1 $ * * This file is part of OpenOffice.org. * @@ -665,6 +665,7 @@ void AutoFmtPreview::MakeFonts( BYTE nIndex, Font& rFont, Font& rCJKFont, Font& lcl_SetFontProperties( rCTLFont, rBoxFmt.GetCTLFont(), rBoxFmt.GetCTLWeight(), rBoxFmt.GetCTLPosture() ); SETONALLFONTS( SetUnderline, (FontUnderline)rBoxFmt.GetUnderline().GetValue() ); + SETONALLFONTS( SetOverline, (FontUnderline)rBoxFmt.GetOverline().GetValue() ); SETONALLFONTS( SetStrikeout, (FontStrikeout)rBoxFmt.GetCrossedOut().GetValue() ); SETONALLFONTS( SetOutline, rBoxFmt.GetContour().GetValue() ); SETONALLFONTS( SetShadow, rBoxFmt.GetShadowed().GetValue() ); diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 640e013244..5b56af43e6 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: view.cxx,v $ - * $Revision: 1.112.110.1 $ + * $Revision: 1.112.94.1 $ * * This file is part of OpenOffice.org. * @@ -687,6 +687,7 @@ void SwView::_CheckReadonlyState() SID_ATTR_CHAR_FONT, SID_ATTR_CHAR_FONTHEIGHT, SID_ATTR_CHAR_COLOR_BACKGROUND, SID_ATTR_CHAR_COLOR_BACKGROUND_EXT, SID_ATTR_CHAR_COLOR_EXT, SID_ATTR_CHAR_COLOR, SID_ATTR_CHAR_WEIGHT, SID_ATTR_CHAR_POSTURE, + SID_ATTR_CHAR_OVERLINE, SID_ATTR_CHAR_UNDERLINE, SID_ATTR_FLASH, SID_ATTR_CHAR_STRIKEOUT, FN_UNDERLINE_DOUBLE, SID_ATTR_CHAR_CONTOUR, SID_ATTR_CHAR_SHADOWED, SID_ATTR_CHAR_AUTOKERN, SID_ATTR_CHAR_ESCAPEMENT, FN_SET_SUPER_SCRIPT, |