summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2009-01-05 17:49:45 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2009-01-05 17:49:45 +0000
commit0c478a57c3e92805a5ba4d4a534117cf24f6bec6 (patch)
treee98d61db3671b47bb0aebed6a5885295666fa146 /svx/source
parent91b4358ce216334236fe25a165ba85e08de89234 (diff)
CWS-TOOLING: integrate CWS overline3
2008-12-11 15:24:46 +0100 fredrikh r265314 : i97099 2008-12-11 15:20:37 +0100 fredrikh r265313 : i97099 2008-12-11 15:18:00 +0100 fredrikh r265312 : i97099 2008-12-11 15:17:00 +0100 fredrikh r265311 : i97099 2008-12-11 15:13:20 +0100 fredrikh r265309 : i97144 2008-12-11 15:06:24 +0100 fredrikh r265306 : i97099 2008-11-24 10:41:42 +0100 fme r264213 : #i5991# Overline support 2008-11-24 10:39:53 +0100 fme r264212 : #i5991# Overline support 2008-11-24 10:02:13 +0100 fme r264209 : #5991# Overline support 2008-11-24 10:01:26 +0100 fme r264208 : #5991# Overline support 2008-11-24 09:59:11 +0100 fme r264207 : #5991# Overline support 2008-11-24 09:57:11 +0100 fme r264206 : #5991# Overline support 2008-11-14 10:36:44 +0100 fme r263667 : CWS-TOOLING: rebase CWS overline3 to trunk@263288 (milestone: DEV300:m35) 2008-11-13 16:12:13 +0100 fme r263649 : #i5991# migrate CWS overline3 to SVN.
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/dialog/chardlg.cxx230
-rw-r--r--svx/source/dialog/chardlg.hrc87
-rw-r--r--svx/source/dialog/chardlg.hxx38
-rw-r--r--svx/source/dialog/chardlg.src285
-rw-r--r--svx/source/editeng/editattr.cxx18
-rw-r--r--svx/source/editeng/editattr.hxx14
-rw-r--r--svx/source/editeng/editdbg.cxx8
-rw-r--r--svx/source/editeng/editdoc.cxx22
-rw-r--r--svx/source/editeng/editeng.cxx10
-rw-r--r--svx/source/editeng/eerdll.cxx13
-rw-r--r--svx/source/editeng/impedit3.cxx14
-rw-r--r--svx/source/editeng/impedit4.cxx18
-rw-r--r--svx/source/form/fmtextcontrolshell.cxx20
-rw-r--r--svx/source/form/formshell.src6
-rw-r--r--svx/source/items/svxitems.src87
-rw-r--r--svx/source/items/textitem.cxx124
-rw-r--r--svx/source/outliner/outleeng.cxx9
-rw-r--r--svx/source/outliner/outleeng.hxx13
-rw-r--r--svx/source/outliner/outliner.cxx62
-rw-r--r--svx/source/svdraw/svdattr.cxx3
-rw-r--r--svx/source/svdraw/svdfmtf.cxx3
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx99
-rw-r--r--svx/source/svdraw/svdstr.src7
-rw-r--r--svx/source/svrtf/rtfitem.cxx111
-rw-r--r--svx/source/svrtf/svxrtf.cxx9
-rw-r--r--svx/source/table/tablertfexporter.cxx4
-rw-r--r--svx/source/unodraw/unofdesc.cxx6
27 files changed, 953 insertions, 367 deletions
diff --git a/svx/source/dialog/chardlg.cxx b/svx/source/dialog/chardlg.cxx
index b41b180dfc..b8c8ba4db4 100644
--- a/svx/source/dialog/chardlg.cxx
+++ b/svx/source/dialog/chardlg.cxx
@@ -1,13 +1,13 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: chardlg.cxx,v $
- * $Revision: 1.102.88.2 $
+ * $Revision: 1.102.148.1 $
*
* This file is part of OpenOffice.org.
*
@@ -169,6 +169,8 @@ static USHORT pEffectsRanges[] =
SID_ATTR_CHAR_RELIEF,
SID_ATTR_CHAR_HIDDEN,
SID_ATTR_CHAR_HIDDEN,
+ SID_ATTR_CHAR_OVERLINE,
+ SID_ATTR_CHAR_OVERLINE,
0
};
@@ -275,6 +277,22 @@ void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet )
rCJKFont.SetUnderline( eUnderline );
rCTLFont.SetUnderline( eUnderline );
+ // Overline
+ FontUnderline eOverline;
+ nWhich = GetWhich( SID_ATTR_CHAR_OVERLINE );
+ if( ISITEMSET )
+ {
+ const SvxOverlineItem& rItem = ( SvxOverlineItem& ) rSet.Get( nWhich );
+ eOverline = ( FontUnderline ) rItem.GetValue();
+ m_aPreviewWin.SetOverlineColor( rItem.GetColor() );
+ }
+ else
+ eOverline = UNDERLINE_NONE;
+
+ rFont.SetOverline( eOverline );
+ rCJKFont.SetOverline( eOverline );
+ rCTLFont.SetOverline( eOverline );
+
// Strikeout
FontStrikeout eStrikeout;
nWhich = GetWhich( SID_ATTR_CHAR_STRIKEOUT );
@@ -1778,17 +1796,6 @@ SvxCharEffectsPage::SvxCharEffectsPage( Window* pParent, const SfxItemSet& rInSe
SvxCharBasePage( pParent, SVX_RES( RID_SVXPAGE_CHAR_EFFECTS ), rInSet, WIN_EFFECTS_PREVIEW, FT_EFFECTS_FONTTYPE ),
- m_aUnderlineFT ( this, SVX_RES( FT_UNDERLINE ) ),
- m_aUnderlineLB ( this, SVX_RES( LB_UNDERLINE ) ),
- m_aColorFT ( this, SVX_RES( FT_UNDERLINE_COLOR ) ),
- m_aColorLB ( this, SVX_RES( LB_UNDERLINE_COLOR ) ),
- m_aStrikeoutFT ( this, SVX_RES( FT_STRIKEOUT ) ),
- m_aStrikeoutLB ( this, SVX_RES( LB_STRIKEOUT ) ),
- m_aIndividualWordsBtn ( this, SVX_RES( CB_INDIVIDUALWORDS ) ),
- m_aEmphasisFT ( this, SVX_RES( FT_EMPHASIS ) ),
- m_aEmphasisLB ( this, SVX_RES( LB_EMPHASIS ) ),
- m_aPositionFT ( this, SVX_RES( FT_POSITION ) ),
- m_aPositionLB ( this, SVX_RES( LB_POSITION ) ),
m_aFontColorFT ( this, SVX_RES( FT_FONTCOLOR ) ),
m_aFontColorLB ( this, SVX_RES( LB_FONTCOLOR ) ),
@@ -1805,6 +1812,27 @@ SvxCharEffectsPage::SvxCharEffectsPage( Window* pParent, const SfxItemSet& rInSe
m_aBlinkingBtn ( this, SVX_RES( CB_BLINKING ) ),
m_aHiddenBtn ( this, SVX_RES( CB_CHARHIDDEN ) ),
+ m_aVerticalLine ( this, SVX_RES( FL_EFFECTS_VERTICAL ) ),
+
+ m_aOverlineFT ( this, SVX_RES( FT_OVERLINE ) ),
+ m_aOverlineLB ( this, SVX_RES( LB_OVERLINE ) ),
+ m_aOverlineColorFT ( this, SVX_RES( FT_OVERLINE_COLOR ) ),
+ m_aOverlineColorLB ( this, SVX_RES( LB_OVERLINE_COLOR ) ),
+ m_aStrikeoutFT ( this, SVX_RES( FT_STRIKEOUT ) ),
+ m_aStrikeoutLB ( this, SVX_RES( LB_STRIKEOUT ) ),
+ m_aUnderlineFT ( this, SVX_RES( FT_UNDERLINE ) ),
+ m_aUnderlineLB ( this, SVX_RES( LB_UNDERLINE ) ),
+ m_aUnderlineColorFT ( this, SVX_RES( FT_UNDERLINE_COLOR ) ),
+ m_aUnderlineColorLB ( this, SVX_RES( LB_UNDERLINE_COLOR ) ),
+ m_aIndividualWordsBtn ( this, SVX_RES( CB_INDIVIDUALWORDS ) ),
+
+ m_aAsianLine ( this, SVX_RES( FL_EFFECTS_ASIAN ) ),
+
+ m_aEmphasisFT ( this, SVX_RES( FT_EMPHASIS ) ),
+ m_aEmphasisLB ( this, SVX_RES( LB_EMPHASIS ) ),
+ m_aPositionFT ( this, SVX_RES( FT_POSITION ) ),
+ m_aPositionLB ( this, SVX_RES( LB_POSITION ) ),
+
m_aTransparentColorName ( SVX_RES( STR_CHARNAME_TRANSPARENT ) )
{
@@ -1853,7 +1881,8 @@ void SvxCharEffectsPage::Initialize()
bKillTable = TRUE;
}
- m_aColorLB.SetUpdateMode( FALSE );
+ m_aUnderlineColorLB.SetUpdateMode( FALSE );
+ m_aOverlineColorLB.SetUpdateMode( FALSE );
m_aFontColorLB.SetUpdateMode( FALSE );
{
@@ -1862,18 +1891,21 @@ void SvxCharEffectsPage::Initialize()
if ( !pFrame ||
SFX_ITEM_DEFAULT > pFrame->GetBindings().QueryState( SID_ATTR_AUTO_COLOR_INVALID, pDummy ) )
{
- m_aColorLB.InsertAutomaticEntry();
+ m_aUnderlineColorLB.InsertAutomaticEntry();
+ m_aOverlineColorLB.InsertAutomaticEntry();
m_aFontColorLB.InsertAutomaticEntry();
}
}
for ( long i = 0; i < pColorTable->Count(); i++ )
{
XColorEntry* pEntry = pColorTable->GetColor(i);
- m_aColorLB.InsertEntry( pEntry->GetColor(), pEntry->GetName() );
+ m_aUnderlineColorLB.InsertEntry( pEntry->GetColor(), pEntry->GetName() );
+ m_aOverlineColorLB.InsertEntry( pEntry->GetColor(), pEntry->GetName() );
m_aFontColorLB.InsertEntry( pEntry->GetColor(), pEntry->GetName() );
}
- m_aColorLB.SetUpdateMode( TRUE );
+ m_aUnderlineColorLB.SetUpdateMode( TRUE );
+ m_aOverlineColorLB.SetUpdateMode( TRUE );
m_aFontColorLB.SetUpdateMode( TRUE );
m_aFontColorLB.SetSelectHdl( LINK( this, SvxCharEffectsPage, ColorBoxSelectHdl_Impl ) );
@@ -1883,18 +1915,22 @@ void SvxCharEffectsPage::Initialize()
// handler
Link aLink = LINK( this, SvxCharEffectsPage, SelectHdl_Impl );
m_aUnderlineLB.SetSelectHdl( aLink );
+ m_aUnderlineColorLB.SetSelectHdl( aLink );
+ m_aOverlineLB.SetSelectHdl( aLink );
+ m_aOverlineColorLB.SetSelectHdl( aLink );
m_aStrikeoutLB.SetSelectHdl( aLink );
m_aEmphasisLB.SetSelectHdl( aLink );
m_aPositionLB.SetSelectHdl( aLink );
m_aEffects2LB.SetSelectHdl( aLink );
m_aReliefLB.SetSelectHdl( aLink );
- m_aColorLB.SetSelectHdl( aLink );
m_aUnderlineLB.SelectEntryPos( 0 );
+ m_aUnderlineColorLB.SelectEntryPos( 0 );
+ m_aOverlineLB.SelectEntryPos( 0 );
+ m_aOverlineColorLB.SelectEntryPos( 0 );
m_aStrikeoutLB.SelectEntryPos( 0 );
m_aEmphasisLB.SelectEntryPos( 0 );
m_aPositionLB.SelectEntryPos( 0 );
- m_aColorLB.SelectEntryPos( 0 );
SelectHdl_Impl( NULL );
SelectHdl_Impl( &m_aEmphasisLB );
@@ -1907,13 +1943,11 @@ void SvxCharEffectsPage::Initialize()
if ( !SvtLanguageOptions().IsAsianTypographyEnabled() )
{
+ m_aAsianLine.Hide();
m_aEmphasisFT.Hide();
m_aEmphasisLB.Hide();
m_aPositionFT.Hide();
m_aPositionLB.Hide();
-
- m_aFontColorFT.SetPosPixel( m_aEmphasisFT.GetPosPixel() );
- m_aFontColorLB.SetPosPixel( m_aEmphasisLB.GetPosPixel() );
}
}
// -----------------------------------------------------------------------
@@ -1926,13 +1960,18 @@ void SvxCharEffectsPage::UpdatePreview_Impl()
USHORT nPos = m_aUnderlineLB.GetSelectEntryPos();
FontUnderline eUnderline = (FontUnderline)(ULONG)m_aUnderlineLB.GetEntryData( nPos );
+ nPos = m_aOverlineLB.GetSelectEntryPos();
+ FontUnderline eOverline = (FontUnderline)(ULONG)m_aOverlineLB.GetEntryData( nPos );
nPos = m_aStrikeoutLB.GetSelectEntryPos();
FontStrikeout eStrikeout = (FontStrikeout)(ULONG)m_aStrikeoutLB.GetEntryData( nPos );
rFont.SetUnderline( eUnderline );
rCJKFont.SetUnderline( eUnderline );
rCTLFont.SetUnderline( eUnderline );
-
- m_aPreviewWin.SetTextLineColor( m_aColorLB.GetSelectEntryColor() );
+ m_aPreviewWin.SetTextLineColor( m_aUnderlineColorLB.GetSelectEntryColor() );
+ rFont.SetOverline( eOverline );
+ rCJKFont.SetOverline( eOverline );
+ rCTLFont.SetOverline( eOverline );
+ m_aPreviewWin.SetOverlineColor( m_aOverlineColorLB.GetSelectEntryColor() );
rFont.SetStrikeout( eStrikeout );
rCJKFont.SetStrikeout( eStrikeout );
rCTLFont.SetStrikeout( eStrikeout );
@@ -2112,11 +2151,16 @@ IMPL_LINK( SvxCharEffectsPage, SelectHdl_Impl, ListBox*, pBox )
}
else if ( &m_aPositionLB != pBox )
{
- USHORT nUPos = m_aUnderlineLB.GetSelectEntryPos(), nSPos = m_aStrikeoutLB.GetSelectEntryPos();
- BOOL bEnable = ( nUPos > 0 && nUPos != LISTBOX_ENTRY_NOTFOUND );
- m_aColorFT.Enable( bEnable );
- m_aColorLB.Enable( bEnable );
- m_aIndividualWordsBtn.Enable( bEnable || ( nSPos > 0 && nSPos != LISTBOX_ENTRY_NOTFOUND ) );
+ USHORT nUPos = m_aUnderlineLB.GetSelectEntryPos(),
+ nOPos = m_aOverlineLB.GetSelectEntryPos(),
+ nSPos = m_aStrikeoutLB.GetSelectEntryPos();
+ BOOL bUEnable = ( nUPos > 0 && nUPos != LISTBOX_ENTRY_NOTFOUND );
+ BOOL bOEnable = ( nOPos > 0 && nOPos != LISTBOX_ENTRY_NOTFOUND );
+ m_aUnderlineColorFT.Enable( bUEnable );
+ m_aUnderlineColorLB.Enable( bUEnable );
+ m_aOverlineColorFT.Enable( bOEnable );
+ m_aOverlineColorLB.Enable( bOEnable );
+ m_aIndividualWordsBtn.Enable( bUEnable || bOEnable || ( nSPos > 0 && nSPos != LISTBOX_ENTRY_NOTFOUND ) );
}
UpdatePreview_Impl();
return 0;
@@ -2126,8 +2170,9 @@ IMPL_LINK( SvxCharEffectsPage, SelectHdl_Impl, ListBox*, pBox )
IMPL_LINK( SvxCharEffectsPage, UpdatePreview_Impl, ListBox*, EMPTYARG )
{
- bool bEnable = ( ( m_aUnderlineLB.GetSelectEntryPos() > 0 ) |
- ( m_aStrikeoutLB.GetSelectEntryPos() > 0 ) );
+ bool bEnable = ( ( m_aUnderlineLB.GetSelectEntryPos() > 0 ) ||
+ ( m_aOverlineLB.GetSelectEntryPos() > 0 ) ||
+ ( m_aStrikeoutLB.GetSelectEntryPos() > 0 ) );
m_aIndividualWordsBtn.Enable( bEnable );
UpdatePreview_Impl();
@@ -2237,25 +2282,82 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet )
}
Color aColor = rItem.GetColor();
- USHORT nPos = m_aColorLB.GetEntryPos( aColor );
+ USHORT nPos = m_aUnderlineColorLB.GetEntryPos( aColor );
if ( LISTBOX_ENTRY_NOTFOUND != nPos )
- m_aColorLB.SelectEntryPos( nPos );
+ m_aUnderlineColorLB.SelectEntryPos( nPos );
else
{
- nPos = m_aColorLB.GetEntryPos( aColor );
+ nPos = m_aUnderlineColorLB.GetEntryPos( aColor );
if ( LISTBOX_ENTRY_NOTFOUND != nPos )
- m_aColorLB.SelectEntryPos( nPos );
+ m_aUnderlineColorLB.SelectEntryPos( nPos );
else
- m_aColorLB.SelectEntryPos(
- m_aColorLB.InsertEntry( aColor,
+ m_aUnderlineColorLB.SelectEntryPos(
+ m_aUnderlineColorLB.InsertEntry( aColor,
String( SVX_RES( RID_SVXSTR_COLOR_USER ) ) ) );
}
}
else
{
- m_aColorLB.SelectEntry( Color( COL_AUTO ));
- m_aColorLB.Disable();
+ m_aUnderlineColorLB.SelectEntry( Color( COL_AUTO ));
+ m_aUnderlineColorLB.Disable();
+ }
+ }
+ }
+
+ // Overline
+ nWhich = GetWhich( SID_ATTR_CHAR_OVERLINE );
+ rFont.SetOverline( UNDERLINE_NONE );
+ rCJKFont.SetOverline( UNDERLINE_NONE );
+ rCTLFont.SetOverline( UNDERLINE_NONE );
+
+ m_aOverlineLB.SelectEntryPos( 0 );
+ eState = rSet.GetItemState( nWhich );
+
+ if ( eState >= SFX_ITEM_DONTCARE )
+ {
+ if ( eState == SFX_ITEM_DONTCARE )
+ m_aOverlineLB.SetNoSelection();
+ else
+ {
+ const SvxOverlineItem& rItem = (SvxOverlineItem&)rSet.Get( nWhich );
+ FontUnderline eOverline = (FontUnderline)rItem.GetValue();
+ rFont.SetOverline( eOverline );
+ rCJKFont.SetOverline( eOverline );
+ rCTLFont.SetOverline( eOverline );
+
+ if ( eOverline != UNDERLINE_NONE )
+ {
+ for ( USHORT i = 0; i < m_aOverlineLB.GetEntryCount(); ++i )
+ {
+ if ( (FontUnderline)(ULONG)m_aOverlineLB.GetEntryData(i) == eOverline )
+ {
+ m_aOverlineLB.SelectEntryPos(i);
+ bEnable |= TRUE;
+ break;
+ }
+ }
+
+ Color aColor = rItem.GetColor();
+ USHORT nPos = m_aOverlineColorLB.GetEntryPos( aColor );
+
+ if ( LISTBOX_ENTRY_NOTFOUND != nPos )
+ m_aOverlineColorLB.SelectEntryPos( nPos );
+ else
+ {
+ nPos = m_aOverlineColorLB.GetEntryPos( aColor );
+ if ( LISTBOX_ENTRY_NOTFOUND != nPos )
+ m_aOverlineColorLB.SelectEntryPos( nPos );
+ else
+ m_aOverlineColorLB.SelectEntryPos(
+ m_aOverlineColorLB.InsertEntry( aColor,
+ String( SVX_RES( RID_SVXSTR_COLOR_USER ) ) ) );
+ }
+ }
+ else
+ {
+ m_aOverlineColorLB.SelectEntry( Color( COL_AUTO ));
+ m_aOverlineColorLB.Disable();
}
}
}
@@ -2367,8 +2469,10 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet )
m_aEmphasisLB.Disable();
}
- // the select handler for the underline/strikeout list boxes
+ // the select handler for the underline/overline/strikeout list boxes
// SelectHdl_Impl( NULL );
+ DBG_ASSERT(m_aUnderlineLB.GetSelectHdl() == m_aOverlineLB.GetSelectHdl(),
+ "SvxCharEffectsPage::Reset: inconsistence (1)!");
DBG_ASSERT(m_aUnderlineLB.GetSelectHdl() == m_aStrikeoutLB.GetSelectHdl(),
"SvxCharEffectsPage::Reset: inconsistence (1)!");
m_aUnderlineLB.GetSelectHdl().Call(NULL);
@@ -2566,7 +2670,9 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet )
// save this settings
m_aUnderlineLB.SaveValue();
- m_aColorLB.SaveValue();
+ m_aUnderlineColorLB.SaveValue();
+ m_aOverlineLB.SaveValue();
+ m_aOverlineColorLB.SaveValue();
m_aStrikeoutLB.SaveValue();
m_aIndividualWordsBtn.SaveValue();
m_aEmphasisLB.SaveValue();
@@ -2606,7 +2712,7 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet )
const SvxUnderlineItem& rItem = *( (const SvxUnderlineItem*)pOld );
if ( (FontUnderline)rItem.GetValue() == eUnder &&
- ( UNDERLINE_NONE == eUnder || rItem.GetColor() == m_aColorLB.GetSelectEntryColor() ) &&
+ ( UNDERLINE_NONE == eUnder || rItem.GetColor() == m_aUnderlineColorLB.GetSelectEntryColor() ) &&
! bAllowChg )
bChanged = FALSE;
}
@@ -2614,7 +2720,41 @@ BOOL SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet )
if ( bChanged )
{
SvxUnderlineItem aNewItem( eUnder, nWhich );
- aNewItem.SetColor( m_aColorLB.GetSelectEntryColor() );
+ aNewItem.SetColor( m_aUnderlineColorLB.GetSelectEntryColor() );
+ rSet.Put( aNewItem );
+ bModified |= TRUE;
+ }
+ else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
+ CLEARTITEM;
+
+ bChanged = TRUE;
+
+ // Overline
+ nWhich = GetWhich( SID_ATTR_CHAR_OVERLINE );
+ pOld = GetOldItem( rSet, SID_ATTR_CHAR_OVERLINE );
+ nPos = m_aOverlineLB.GetSelectEntryPos();
+ FontUnderline eOver = (FontUnderline)(ULONG)m_aOverlineLB.GetEntryData( nPos );
+
+ if ( pOld )
+ {
+ //! if there are different underline styles in the selection the
+ //! item-state in the 'rOldSet' will be invalid. In this case
+ //! changing the underline style will be allowed if a style is
+ //! selected in the listbox.
+ BOOL bAllowChg = LISTBOX_ENTRY_NOTFOUND != nPos &&
+ SFX_ITEM_DEFAULT > rOldSet.GetItemState( nWhich, TRUE );
+
+ const SvxOverlineItem& rItem = *( (const SvxOverlineItem*)pOld );
+ if ( (FontUnderline)rItem.GetValue() == eOver &&
+ ( UNDERLINE_NONE == eOver || rItem.GetColor() == m_aOverlineColorLB.GetSelectEntryColor() ) &&
+ ! bAllowChg )
+ bChanged = FALSE;
+ }
+
+ if ( bChanged )
+ {
+ SvxOverlineItem aNewItem( eOver, nWhich );
+ aNewItem.SetColor( m_aOverlineColorLB.GetSelectEntryColor() );
rSet.Put( aNewItem );
bModified |= TRUE;
}
@@ -2885,8 +3025,8 @@ void SvxCharEffectsPage::DisableControls( USHORT nDisable )
if ( ( DISABLE_UNDERLINE_COLOR & nDisable ) == DISABLE_UNDERLINE_COLOR )
{
// disable the controls
- m_aColorFT.Disable( );
- m_aColorLB.Disable( );
+ m_aUnderlineColorFT.Disable( );
+ m_aUnderlineColorLB.Disable( );
// and reroute the selection handler of the controls which normally would affect the color box dis-/enabling
m_aUnderlineLB.SetSelectHdl(LINK(this, SvxCharEffectsPage, UpdatePreview_Impl));
m_aStrikeoutLB.SetSelectHdl(LINK(this, SvxCharEffectsPage, UpdatePreview_Impl));
diff --git a/svx/source/dialog/chardlg.hrc b/svx/source/dialog/chardlg.hrc
index a9bc04f19b..303d1b7887 100644
--- a/svx/source/dialog/chardlg.hrc
+++ b/svx/source/dialog/chardlg.hrc
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: chardlg.hrc,v $
- * $Revision: 1.15 $
+ * $Revision: 1.15.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -76,41 +76,56 @@
// EffectsPage --------------------------------------------------------------
-#define FT_UNDERLINE 200
-#define LB_UNDERLINE 201
-#define FT_UNDERLINE_COLOR 202
-#define LB_UNDERLINE_COLOR 203
-#define FT_STRIKEOUT 204
-#define LB_STRIKEOUT 205
-#define CB_INDIVIDUALWORDS 206
-#define FT_EMPHASIS 207
-#define LB_EMPHASIS 208
-#define FT_POSITION 209
-#define LB_POSITION 210
-#define FT_FONTCOLOR 211
-#define LB_FONTCOLOR 212
-
-#define FT_EFFECTS 220
-#define LB_EFFECTS 221
-#define LB_EFFECTS2 222
-#define CB_OUTLINE 223
-#define CB_SHADOW 224
-#define CB_BLINKING 225
-#define FT_RELIEF 226
-#define LB_RELIEF 227
-#define CB_CHARHIDDEN 228
-
-#define WIN_EFFECTS_PREVIEW 231
-#define FT_EFFECTS_FONTTYPE 232
-
-#define STR_EFFECTS_TRANSPARENT 240
-#define STR_EFFECTS_CAPITALS 241
-#define STR_EFFECTS_LOWERCASE 242
-#define STR_EFFECTS_TITLE 243
-#define STR_EFFECTS_SMALL 244
-#define STR_EFFECTS_OUTLINE 245
-#define STR_EFFECTS_SHADOW 246
-#define STR_EFFECTS_BLINKING 247
+#define FT_FONTCOLOR 201
+#define LB_FONTCOLOR 202
+
+#define FT_EFFECTS 203
+#define LB_EFFECTS 204
+#define LB_EFFECTS2 205
+
+#define FT_RELIEF 206
+#define LB_RELIEF 207
+
+#define CB_OUTLINE 208
+#define CB_SHADOW 209
+#define CB_BLINKING 210
+#define CB_CHARHIDDEN 211
+
+#define FL_EFFECTS_VERTICAL 220
+
+#define FT_OVERLINE 221
+#define LB_OVERLINE 222
+#define FT_OVERLINE_COLOR 223
+#define LB_OVERLINE_COLOR 224
+
+#define FT_STRIKEOUT 225
+#define LB_STRIKEOUT 226
+
+#define FT_UNDERLINE 227
+#define LB_UNDERLINE 228
+#define FT_UNDERLINE_COLOR 229
+#define LB_UNDERLINE_COLOR 230
+
+#define CB_INDIVIDUALWORDS 231
+
+#define FL_EFFECTS_ASIAN 240
+
+#define FT_EMPHASIS 241
+#define LB_EMPHASIS 242
+#define FT_POSITION 243
+#define LB_POSITION 244
+
+#define WIN_EFFECTS_PREVIEW 251
+#define FT_EFFECTS_FONTTYPE 252
+
+#define STR_EFFECTS_TRANSPARENT 260
+#define STR_EFFECTS_CAPITALS 261
+#define STR_EFFECTS_LOWERCASE 262
+#define STR_EFFECTS_TITLE 263
+#define STR_EFFECTS_SMALL 264
+#define STR_EFFECTS_OUTLINE 265
+#define STR_EFFECTS_SHADOW 266
+#define STR_EFFECTS_BLINKING 267
// PositionPage -------------------------------------------------------------
diff --git a/svx/source/dialog/chardlg.hxx b/svx/source/dialog/chardlg.hxx
index 09cedabf85..e89ac291e7 100644
--- a/svx/source/dialog/chardlg.hxx
+++ b/svx/source/dialog/chardlg.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: chardlg.hxx,v $
- * $Revision: 1.8 $
+ * $Revision: 1.8.184.1 $
*
* This file is part of OpenOffice.org.
*
@@ -196,17 +196,6 @@ class SvxCharEffectsPage : public SvxCharBasePage
{
private:
- FixedText m_aUnderlineFT;
- ListBox m_aUnderlineLB;
- FixedText m_aColorFT;
- ColorListBox m_aColorLB;
- FixedText m_aStrikeoutFT;
- ListBox m_aStrikeoutLB;
- CheckBox m_aIndividualWordsBtn;
- FixedText m_aEmphasisFT;
- ListBox m_aEmphasisLB;
- FixedText m_aPositionFT;
- ListBox m_aPositionLB;
FixedText m_aFontColorFT;
ColorListBox m_aFontColorLB;
@@ -223,6 +212,31 @@ private:
TriStateBox m_aBlinkingBtn;
TriStateBox m_aHiddenBtn;
+ FixedLine m_aVerticalLine;
+
+ FixedText m_aOverlineFT;
+ ListBox m_aOverlineLB;
+ FixedText m_aOverlineColorFT;
+ ColorListBox m_aOverlineColorLB;
+
+ FixedText m_aStrikeoutFT;
+ ListBox m_aStrikeoutLB;
+
+ FixedText m_aUnderlineFT;
+ ListBox m_aUnderlineLB;
+ FixedText m_aUnderlineColorFT;
+ ColorListBox m_aUnderlineColorLB;
+
+ CheckBox m_aIndividualWordsBtn;
+
+ FixedLine m_aAsianLine;
+
+ FixedText m_aEmphasisFT;
+ ListBox m_aEmphasisLB;
+
+ FixedText m_aPositionFT;
+ ListBox m_aPositionLB;
+
USHORT m_nHtmlMode;
String m_aTransparentColorName;
diff --git a/svx/source/dialog/chardlg.src b/svx/source/dialog/chardlg.src
index 261010ee89..b51008e285 100644
--- a/svx/source/dialog/chardlg.src
+++ b/svx/source/dialog/chardlg.src
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: chardlg.src,v $
- * $Revision: 1.78 $
+ * $Revision: 1.78.20.1 $
*
* This file is part of OpenOffice.org.
*
@@ -323,13 +323,13 @@ TabPage RID_SVXPAGE_CHAR_NAME
Window WIN_CHAR_PREVIEW
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 129 ) ;
+ Pos = MAP_APPFONT ( 6 , 149 ) ;
Size = MAP_APPFONT ( 248 , 37 ) ;
Text [ en-US ] = "Example";
};
FixedText FT_CHAR_FONTTYPE
{
- Pos = MAP_APPFONT ( 6 , 168 ) ;
+ Pos = MAP_APPFONT ( 6 , 129 ) ;
Size = MAP_APPFONT ( 248 , 16 ) ;
WordBreak = TRUE ;
};
@@ -370,17 +370,100 @@ TabPage RID_SVXPAGE_CHAR_EFFECTS
HelpId = HID_SVXPAGE_CHAR_EFFECTS ;
Size = MAP_APPFONT ( 260 , 185 ) ;
Hide = TRUE ;
- FixedText FT_UNDERLINE
+ FixedText FT_FONTCOLOR
{
- Pos = MAP_APPFONT( 12 , 6 );
- Size = MAP_APPFONT( 78 , 8 );
- Text [ en-US ] = "Underlining" ;
+ Pos = MAP_APPFONT ( 10 , 4 );
+ Size = MAP_APPFONT ( 82 , 8 );
+ Text [ en-US ] = "Font ~color" ;
};
- ListBox LB_UNDERLINE
+ ListBox LB_FONTCOLOR
{
Border = TRUE;
- Pos = MAP_APPFONT ( 12 , 17 );
- Size = MAP_APPFONT ( 78 , 72 );
+ Pos = MAP_APPFONT ( 10 , 15 );
+ Size = MAP_APPFONT ( 82 , 72 );
+ TabStop = TRUE;
+ DropDown = TRUE;
+ };
+ FixedText FT_EFFECTS
+ {
+ Pos = MAP_APPFONT( 10 , 33 );
+ Size = MAP_APPFONT( 82 , 8 );
+ Text [ en-US ] = "~Effects" ;
+ };
+ ListBox LB_EFFECTS2
+ {
+ Pos = MAP_APPFONT ( 10 , 44 ) ;
+ Size = MAP_APPFONT ( 82 , 56 ) ;
+ DropDown = TRUE;
+ StringList [ en-US ] =
+ {
+ < "(Without)" ; Default ; > ;
+ < "Capitals" ; Default ; > ;
+ < "Lowercase" ; Default ; > ;
+ < "Title" ; Default ; > ;
+ < "Small capitals" ; Default ; > ;
+ };
+ };
+ FixedText FT_RELIEF
+ {
+ Pos = MAP_APPFONT ( 10 , 62 );
+ Size = MAP_APPFONT ( 82 , 8 );
+ Text [ en-US ] = "~Relief";
+ };
+ ListBox LB_RELIEF
+ {
+ Pos = MAP_APPFONT ( 10 , 73 ) ;
+ Size = MAP_APPFONT ( 82 , 56 ) ;
+ DropDown = TRUE;
+ StringList [ en-US ] =
+ {
+ < "(Without)" ; Default ; > ;
+ < "Embossed" ; Default ; > ;
+ < "Engraved" ; Default ; > ;
+ };
+ };
+ TriStateBox CB_OUTLINE
+ {
+ Pos = MAP_APPFONT ( 10 , 93 ) ;
+ Size = MAP_APPFONT ( 82 , 10 ) ;
+ Text [ en-US ] = "Out~line" ;
+ };
+ TriStateBox CB_SHADOW
+ {
+ Pos = MAP_APPFONT ( 10 , 107 ) ;
+ Size = MAP_APPFONT ( 82 , 10 ) ;
+ Text [ en-US ] = "Sha~dow" ;
+ };
+ TriStateBox CB_BLINKING
+ {
+ Pos = MAP_APPFONT ( 10 , 121 ) ;
+ Size = MAP_APPFONT ( 82 , 10 ) ;
+ Hide = TRUE;
+ Text [ en-US ] = "~Blinking" ;
+ };
+ TriStateBox CB_CHARHIDDEN
+ {
+ Pos = MAP_APPFONT ( 10 , 135 ) ;
+ Size = MAP_APPFONT ( 82 , 10 ) ;
+ Text [ en-US ] = "H~idden" ;
+ };
+ FixedLine FL_EFFECTS_VERTICAL
+ {
+ Pos = MAP_APPFONT ( 100 , 4 ) ;
+ Size = MAP_APPFONT ( 4 , 142 ) ;
+ Vert = TRUE;
+ };
+ FixedText FT_OVERLINE
+ {
+ Pos = MAP_APPFONT( 110 , 4 );
+ Size = MAP_APPFONT( 68 , 8 );
+ Text [ en-US ] = "~Overlining" ;
+ };
+ ListBox LB_OVERLINE
+ {
+ Border = TRUE;
+ Pos = MAP_APPFONT ( 110 , 15 );
+ Size = MAP_APPFONT ( 68 , 72 );
TabStop = TRUE;
DropDown = TRUE;
StringList [ en-US ] =
@@ -404,31 +487,31 @@ TabPage RID_SVXPAGE_CHAR_EFFECTS
< "Double Wave"; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
};
};
- FixedText FT_UNDERLINE_COLOR
+ FixedText FT_OVERLINE_COLOR
{
- Pos = MAP_APPFONT ( 96 , 6 );
- Size = MAP_APPFONT ( 70 , 8 );
- Text [ en-US ] = "Color";
+ Pos = MAP_APPFONT ( 184 , 4 );
+ Size = MAP_APPFONT ( 68 , 8 );
+ Text [ en-US ] = "O~verline color";
};
- ListBox LB_UNDERLINE_COLOR
+ ListBox LB_OVERLINE_COLOR
{
Border = TRUE;
- Pos = MAP_APPFONT ( 96 , 17 );
- Size = MAP_APPFONT ( 70 , 100 );
+ Pos = MAP_APPFONT ( 184 , 15 );
+ Size = MAP_APPFONT ( 68 , 100 );
TabStop = TRUE;
DropDown = TRUE;
};
FixedText FT_STRIKEOUT
{
- Pos = MAP_APPFONT ( 12 , 35 );
- Size = MAP_APPFONT ( 78 , 8 );
- Text [ en-US ] = "Strikethrough" ;
+ Pos = MAP_APPFONT ( 110 , 33 );
+ Size = MAP_APPFONT ( 68 , 8 );
+ Text [ en-US ] = "~Strikethrough" ;
};
ListBox LB_STRIKEOUT
{
Border = TRUE;
- Pos = MAP_APPFONT ( 12 , 46 );
- Size = MAP_APPFONT ( 78 , 72 );
+ Pos = MAP_APPFONT ( 110 , 44 );
+ Size = MAP_APPFONT ( 68 , 72 );
TabStop = TRUE;
DropDown = TRUE;
StringList [ en-US ] =
@@ -441,135 +524,111 @@ TabPage RID_SVXPAGE_CHAR_EFFECTS
< "With X" ; CHRDLG_STRIKEOUT_X ; > ;
};
};
- CheckBox CB_INDIVIDUALWORDS
- {
- Pos = MAP_APPFONT ( 96 , 48 );
- Size = MAP_APPFONT ( 70 , 10 );
- TabStop = TRUE;
- Text [ en-US ] = "Individual ~words" ;
- };
- FixedText FT_EMPHASIS
+ FixedText FT_UNDERLINE
{
- Pos = MAP_APPFONT ( 12 , 64 );
- Size = MAP_APPFONT ( 78 , 8 );
- Text [ en-US ] = "Emp~hasis mark" ;
+ Pos = MAP_APPFONT( 110 , 62 );
+ Size = MAP_APPFONT( 68 , 8 );
+ Text [ en-US ] = "~Underlining" ;
};
- ListBox LB_EMPHASIS
+ ListBox LB_UNDERLINE
{
Border = TRUE;
- Pos = MAP_APPFONT ( 12 , 75 );
- Size = MAP_APPFONT ( 78 , 72 );
+ Pos = MAP_APPFONT ( 110 , 73 );
+ Size = MAP_APPFONT ( 68 , 72 );
TabStop = TRUE;
DropDown = TRUE;
StringList [ en-US ] =
{
- < "(Without)" ; default ; > ;
- < "Dot" ; default ; > ;
- < "Circle" ; default ; > ;
- < "Disc" ; default ; > ;
- < "Accent" ; default ; > ;
+ < "(Without)" ; CHRDLG_UNDERLINE_NONE ; > ;
+ < "Single" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "Double" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < "Bold"; CHRDLG_UNDERLINE_BOLD; > ;
+ < "Dotted" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < "Dotted (Bold)" ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < "Dash"; CHRDLG_UNDERLINE_DASH; > ;
+ < "Dash (Bold)"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < "Long Dash"; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < "Long Dash (Bold)"; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < "Dot Dash"; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < "Dot Dash (Bold)"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < "Dot Dot Dash"; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < "Dot Dot Dash (Bold)"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < "Wave"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "Wave (Bold)"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < "Double Wave"; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
};
};
- FixedText FT_POSITION
+ FixedText FT_UNDERLINE_COLOR
{
- Pos = MAP_APPFONT ( 96 , 64 );
- Size = MAP_APPFONT ( 70 , 8 );
- Text [ en-US ] = "Position" ;
+ Pos = MAP_APPFONT ( 184 , 62 );
+ Size = MAP_APPFONT ( 68 , 8 );
+ Text [ en-US ] = "U~nderline color";
};
- ListBox LB_POSITION
+ ListBox LB_UNDERLINE_COLOR
{
Border = TRUE;
- Pos = MAP_APPFONT ( 96 , 75 );
- Size = MAP_APPFONT ( 70 , 48 );
+ Pos = MAP_APPFONT ( 184 , 73 );
+ Size = MAP_APPFONT ( 68 , 100 );
TabStop = TRUE;
DropDown = TRUE;
- StringList [ en-US ] =
- {
- < "Above text" ; CHRDLG_POSITION_OVER ; > ;
- < "Below text" ; CHRDLG_POSITION_UNDER ; > ;
- };
};
- FixedText FT_FONTCOLOR
+ CheckBox CB_INDIVIDUALWORDS
{
- Pos = MAP_APPFONT ( 12 , 93 );
- Size = MAP_APPFONT ( 78 , 8 );
- Text [ en-US ] = "Font ~color" ;
+ Pos = MAP_APPFONT ( 110 , 93 );
+ Size = MAP_APPFONT ( 68 , 10 );
+ TabStop = TRUE;
+ Text [ en-US ] = "Individual ~words" ;
};
- ListBox LB_FONTCOLOR
+ FixedLine FL_EFFECTS_ASIAN
{
- Border = TRUE;
- Pos = MAP_APPFONT ( 12 , 104 );
- Size = MAP_APPFONT ( 78 , 72 );
- TabStop = TRUE;
- DropDown = TRUE;
+ Pos = MAP_APPFONT ( 106 , 110 ) ;
+ Size = MAP_APPFONT ( 148 , 4 ) ;
};
- FixedText FT_EFFECTS
+ FixedText FT_EMPHASIS
{
- Pos = MAP_APPFONT( 172 , 6 );
- Size = MAP_APPFONT( 82 , 8 );
- Text [ en-US ] = "Effects" ;
+ Pos = MAP_APPFONT ( 110 , 117 );
+ Size = MAP_APPFONT ( 68 , 8 );
+ Text [ en-US ] = "Emp~hasis mark" ;
};
- ListBox LB_EFFECTS2
+ ListBox LB_EMPHASIS
{
- Pos = MAP_APPFONT ( 172 , 17 ) ;
- Size = MAP_APPFONT ( 82 , 56 ) ;
+ Border = TRUE;
+ Pos = MAP_APPFONT ( 110 , 128 );
+ Size = MAP_APPFONT ( 68 , 72 );
+ TabStop = TRUE;
DropDown = TRUE;
StringList [ en-US ] =
{
- < "(Without)" ; Default ; > ;
- < "Capitals" ; Default ; > ;
- < "Lowercase" ; Default ; > ;
- < "Title" ; Default ; > ;
- < "Small capitals" ; Default ; > ;
+ < "(Without)" ; default ; > ;
+ < "Dot" ; default ; > ;
+ < "Circle" ; default ; > ;
+ < "Disc" ; default ; > ;
+ < "Accent" ; default ; > ;
};
};
- FixedText FT_RELIEF
+ FixedText FT_POSITION
{
- Pos = MAP_APPFONT ( 172 , 35 );
- Size = MAP_APPFONT ( 82 , 8 );
- Text [ en-US ] = "~Relief";
+ Pos = MAP_APPFONT ( 184 , 117 );
+ Size = MAP_APPFONT ( 68 , 8 );
+ Text [ en-US ] = "~Position" ;
};
- ListBox LB_RELIEF
+ ListBox LB_POSITION
{
- Pos = MAP_APPFONT ( 172 , 46 ) ;
- Size = MAP_APPFONT ( 82 , 56 ) ;
+ Border = TRUE;
+ Pos = MAP_APPFONT ( 184 , 128 );
+ Size = MAP_APPFONT ( 68 , 48 );
+ TabStop = TRUE;
DropDown = TRUE;
StringList [ en-US ] =
{
- < "(Without)" ; Default ; > ;
- < "Embossed" ; Default ; > ;
- < "Engraved" ; Default ; > ;
+ < "Above text" ; CHRDLG_POSITION_OVER ; > ;
+ < "Below text" ; CHRDLG_POSITION_UNDER ; > ;
};
};
- TriStateBox CB_OUTLINE
- {
- Pos = MAP_APPFONT ( 172 , 64 ) ;
- Size = MAP_APPFONT ( 82 , 10 ) ;
- Text [ en-US ] = "Outline" ;
- };
- TriStateBox CB_SHADOW
- {
- Pos = MAP_APPFONT ( 172 , 78 ) ;
- Size = MAP_APPFONT ( 82 , 10 ) ;
- Text [ en-US ] = "Shadow" ;
- };
- TriStateBox CB_BLINKING
- {
- Pos = MAP_APPFONT ( 172 , 92 ) ;
- Size = MAP_APPFONT ( 82 , 10 ) ;
- Hide = TRUE;
- Text [ en-US ] = "~Blinking" ;
- };
- TriStateBox CB_CHARHIDDEN
- {
- Pos = MAP_APPFONT ( 172 , 106 ) ;
- Size = MAP_APPFONT ( 82 , 10 ) ;
- Text [ en-US ] = "H~idden" ;
- };
Window WIN_EFFECTS_PREVIEW
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 129 ) ;
+ Pos = MAP_APPFONT ( 6 , 149 ) ;
Size = MAP_APPFONT ( 248 , 37 ) ;
Text [ en-US ] = "Example";
};
@@ -810,7 +869,7 @@ TabPage RID_SVXPAGE_CHAR_POSITION
{
Text [ en-US ] = "Example" ;
Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 129 ) ;
+ Pos = MAP_APPFONT ( 6 , 149 ) ;
Size = MAP_APPFONT ( 248 , 37 ) ;
};
FixedText FT_POS_FONTTYPE
@@ -892,7 +951,7 @@ TabPage RID_SVXPAGE_CHAR_TWOLINES
Window WIN_TWOLINES_PREVIEW
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 129 ) ;
+ Pos = MAP_APPFONT ( 6 , 149 ) ;
Size = MAP_APPFONT ( 248 , 37 ) ;
Text [ en-US ] = "Example" ;
};
diff --git a/svx/source/editeng/editattr.cxx b/svx/source/editeng/editattr.cxx
index 1f96e5f9e5..1ac66fb300 100644
--- a/svx/source/editeng/editattr.cxx
+++ b/svx/source/editeng/editattr.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: editattr.cxx,v $
- * $Revision: 1.16 $
+ * $Revision: 1.16.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -157,6 +157,22 @@ void EditCharAttribUnderline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
}
// -------------------------------------------------------------------------
+// class EditCharAttribOverline
+// -------------------------------------------------------------------------
+EditCharAttribOverline::EditCharAttribOverline( const SvxOverlineItem& rAttr, USHORT _nStart, USHORT _nEnd )
+ : EditCharAttrib( rAttr, _nStart, _nEnd )
+{
+ DBG_ASSERT( rAttr.Which() == EE_CHAR_OVERLINE, "Kein Overlineattribut!" );
+}
+
+void EditCharAttribOverline::SetFont( SvxFont& rFont, OutputDevice* pOutDev )
+{
+ rFont.SetOverline( (FontUnderline)((const SvxOverlineItem*)GetItem())->GetValue() );
+ if ( pOutDev )
+ pOutDev->SetOverlineColor( ((const SvxOverlineItem*)GetItem())->GetColor() );
+}
+
+// -------------------------------------------------------------------------
// class EditCharAttribFontHeight
// -------------------------------------------------------------------------
EditCharAttribFontHeight::EditCharAttribFontHeight( const SvxFontHeightItem& rAttr, USHORT _nStart, USHORT _nEnd )
diff --git a/svx/source/editeng/editattr.hxx b/svx/source/editeng/editattr.hxx
index f04a00495f..a24b1697c3 100644
--- a/svx/source/editeng/editattr.hxx
+++ b/svx/source/editeng/editattr.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: editattr.hxx,v $
- * $Revision: 1.13 $
+ * $Revision: 1.13.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -42,6 +42,7 @@ class SvxEscapementItem;
class SvxContourItem;
class SvxCrossedOutItem;
class SvxUnderlineItem;
+class SvxOverlineItem;
class SvxFontHeightItem;
class SvxCharScaleWidthItem;
class SvxColorItem;
@@ -258,6 +259,17 @@ public:
};
// -------------------------------------------------------------------------
+// class EditCharAttribOverline
+// -------------------------------------------------------------------------
+class EditCharAttribOverline : public EditCharAttrib
+{
+public:
+ EditCharAttribOverline( const SvxOverlineItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev );
+};
+
+// -------------------------------------------------------------------------
// class EditCharAttribEmphasisMark
// -------------------------------------------------------------------------
class EditCharAttribEmphasisMark : public EditCharAttrib
diff --git a/svx/source/editeng/editdbg.cxx b/svx/source/editeng/editdbg.cxx
index c01887f8d6..c93e7bc63f 100644
--- a/svx/source/editeng/editdbg.cxx
+++ b/svx/source/editeng/editdbg.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: editdbg.cxx,v $
- * $Revision: 1.22 $
+ * $Revision: 1.22.148.1 $
*
* This file is part of OpenOffice.org.
*
@@ -237,7 +237,11 @@ ByteString DbgOutItem( const SfxItemPool& rPool, const SfxPoolItem& rItem )
break;
case EE_CHAR_UNDERLINE:
aDebStr += "FontUnderline=";
- aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxUnderlineItem&)rItem).GetUnderline() );
+ aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxUnderlineItem&)rItem).GetLineStyle() );
+ break;
+ case EE_CHAR_OVERLINE:
+ aDebStr += "FontOverline=";
+ aDebStr += ByteString::CreateFromInt32( (USHORT)((SvxOverlineItem&)rItem).GetLineStyle() );
break;
case EE_CHAR_EMPHASISMARK:
aDebStr += "FontUnderline=";
diff --git a/svx/source/editeng/editdoc.cxx b/svx/source/editeng/editdoc.cxx
index cbc443cea4..8bd094ae98 100644
--- a/svx/source/editeng/editdoc.cxx
+++ b/svx/source/editeng/editdoc.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: editdoc.cxx,v $
- * $Revision: 1.48 $
+ * $Revision: 1.48.148.1 $
*
* This file is part of OpenOffice.org.
*
@@ -218,6 +218,7 @@ SfxItemInfo aItemInfos[EDITITEMCOUNT] = {
{ SID_ATTR_CHAR_RELIEF, SFX_ITEM_POOLABLE },
{ 0, SFX_ITEM_POOLABLE }, // EE_CHAR_RUBI_DUMMY
{ 0, SFX_ITEM_POOLABLE }, // EE_CHAR_XMLATTRIBS
+ { SID_ATTR_CHAR_OVERLINE, SFX_ITEM_POOLABLE },
{ 0, SFX_ITEM_POOLABLE }, // EE_FEATURE_TAB
{ 0, SFX_ITEM_POOLABLE }, // EE_FEATURE_LINEBR
{ SID_ATTR_CHAR_CHARSETCOLOR, SFX_ITEM_POOLABLE }, // EE_FEATURE_NOTCONV
@@ -248,6 +249,15 @@ USHORT aV4Map[] = {
4034, 4035, 4036, 4037
};
+USHORT aV5Map[] = {
+ 3994, 3995, 3996, 3997, 3998, 3999, 4000, 4001, 4002, 4003,
+ 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013,
+ 4014, 4015, 4016, 4017, 4018, 4019, 4020, 4021, 4022, 4023,
+ 4024, 4025, 4026, 4027, 4028, 4029, 4030, 4031, 4032, 4033,
+ /* EE_CHAR_OVERLINE inserted here */
+ 4035, 4036, 4037, 4038
+};
+
SV_IMPL_PTRARR( ContentList, ContentNode* );
SV_IMPL_VARARR( ScriptTypePosInfos, ScriptTypePosInfo );
SV_IMPL_VARARR( WritingDirectionInfos, WritingDirectionInfo );
@@ -314,6 +324,11 @@ EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, US
pNew = new EditCharAttribUnderline( (const SvxUnderlineItem&)rNew, nS, nE );
}
break;
+ case EE_CHAR_OVERLINE:
+ {
+ pNew = new EditCharAttribOverline( (const SvxOverlineItem&)rNew, nS, nE );
+ }
+ break;
case EE_CHAR_EMPHASISMARK:
{
pNew = new EditCharAttribEmphasisMark( (const SvxEmphasisMarkItem&)rNew, nS, nE );
@@ -1278,7 +1293,9 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, s
if ( bSearchInParent || ( rSet.GetItemState( nWhich_Weight ) == SFX_ITEM_ON ) )
rFont.SetWeight( ((const SvxWeightItem&)rSet.Get( nWhich_Weight )).GetWeight() );
if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_UNDERLINE ) == SFX_ITEM_ON ) )
- rFont.SetUnderline( ((const SvxUnderlineItem&)rSet.Get( EE_CHAR_UNDERLINE )).GetUnderline() );
+ rFont.SetUnderline( ((const SvxUnderlineItem&)rSet.Get( EE_CHAR_UNDERLINE )).GetLineStyle() );
+ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_OVERLINE ) == SFX_ITEM_ON ) )
+ rFont.SetOverline( ((const SvxOverlineItem&)rSet.Get( EE_CHAR_OVERLINE )).GetLineStyle() );
if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_STRIKEOUT ) == SFX_ITEM_ON ) )
rFont.SetStrikeout( ((const SvxCrossedOutItem&)rSet.Get( EE_CHAR_STRIKEOUT )).GetStrikeout() );
if ( bSearchInParent || ( rSet.GetItemState( nWhich_Italic ) == SFX_ITEM_ON ) )
@@ -2261,6 +2278,7 @@ EditEngineItemPool::EditEngineItemPool( BOOL bPersistenRefCounts )
SetVersionMap( 2, 3999, 4019, aV2Map );
SetVersionMap( 3, 3997, 4020, aV3Map );
SetVersionMap( 4, 3994, 4022, aV4Map );
+ SetVersionMap( 5, 3994, 4037, aV5Map );
DBG_ASSERT( EE_DLL(), "EditDLL?!" );
SfxPoolItem** ppDefItems = EE_DLL()->GetGlobalData()->GetDefItems();
diff --git a/svx/source/editeng/editeng.cxx b/svx/source/editeng/editeng.cxx
index 25201dd36d..0f42cbd26f 100644
--- a/svx/source/editeng/editeng.cxx
+++ b/svx/source/editeng/editeng.cxx
@@ -2452,10 +2452,11 @@ ParagraphInfos EditEngine::GetParagraphInfos( sal_uInt16 nPara )
// =====================================================================
// ====================== Virtuelle Methoden =======================
// =====================================================================
-void __EXPORT EditEngine::DrawingText( const Point&, const XubString&, USHORT, USHORT,
- const sal_Int32*, const SvxFont&, sal_uInt16, sal_uInt16, BYTE,
- const EEngineData::WrongSpellVector*, const SvxFieldData*, bool, bool, bool,
- const ::com::sun::star::lang::Locale*, const Color&)
+void __EXPORT EditEngine::DrawingText( const Point&, const XubString&, USHORT, USHORT,
+ const sal_Int32*, const SvxFont&, sal_uInt16, sal_uInt16, BYTE,
+ const EEngineData::WrongSpellVector*, const SvxFieldData*, bool, bool, bool,
+ const ::com::sun::star::lang::Locale*, const Color&, const Color&)
+
{
DBG_CHKTHIS( EditEngine, 0 );
}
@@ -2642,6 +2643,7 @@ void EditEngine::SetFontInfoInItemSet( SfxItemSet& rSet, const SvxFont& rFont )
rSet.Put( SvxWeightItem( rFont.GetWeight(), EE_CHAR_WEIGHT ) );
rSet.Put( SvxColorItem( rFont.GetColor(), EE_CHAR_COLOR ) );
rSet.Put( SvxUnderlineItem( rFont.GetUnderline(), EE_CHAR_UNDERLINE ) );
+ rSet.Put( SvxOverlineItem( rFont.GetOverline(), EE_CHAR_OVERLINE ) );
rSet.Put( SvxCrossedOutItem( rFont.GetStrikeout(), EE_CHAR_STRIKEOUT ) );
rSet.Put( SvxPostureItem( rFont.GetItalic(), EE_CHAR_ITALIC ) );
rSet.Put( SvxContourItem( rFont.IsOutline(), EE_CHAR_OUTLINE ) );
diff --git a/svx/source/editeng/eerdll.cxx b/svx/source/editeng/eerdll.cxx
index a65b7eee3f..ce23a1e00e 100644
--- a/svx/source/editeng/eerdll.cxx
+++ b/svx/source/editeng/eerdll.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: eerdll.cxx,v $
- * $Revision: 1.31 $
+ * $Revision: 1.31.148.1 $
*
* This file is part of OpenOffice.org.
*
@@ -164,14 +164,15 @@ SfxPoolItem** GlobalEditData::GetDefItems()
// no need to have alien attributes persistent
ppDefItems[44] = new SfxVoidItem( EE_CHAR_XMLATTRIBS );
#endif // #ifndef SVX_LIGHT
+ ppDefItems[45] = new SvxOverlineItem( UNDERLINE_NONE, EE_CHAR_OVERLINE );
// Features
- ppDefItems[45] = new SfxVoidItem( EE_FEATURE_TAB );
- ppDefItems[46] = new SfxVoidItem( EE_FEATURE_LINEBR );
- ppDefItems[47] = new SvxCharSetColorItem( Color( COL_RED ), RTL_TEXTENCODING_DONTKNOW, EE_FEATURE_NOTCONV );
- ppDefItems[48] = new SvxFieldItem( SvxFieldData(), EE_FEATURE_FIELD );
+ ppDefItems[46] = new SfxVoidItem( EE_FEATURE_TAB );
+ ppDefItems[47] = new SfxVoidItem( EE_FEATURE_LINEBR );
+ ppDefItems[48] = new SvxCharSetColorItem( Color( COL_RED ), RTL_TEXTENCODING_DONTKNOW, EE_FEATURE_NOTCONV );
+ ppDefItems[49] = new SvxFieldItem( SvxFieldData(), EE_FEATURE_FIELD );
- DBG_ASSERT( EDITITEMCOUNT == 49, "ITEMCOUNT geaendert, DefItems nicht angepasst!" );
+ DBG_ASSERT( EDITITEMCOUNT == 50, "ITEMCOUNT geaendert, DefItems nicht angepasst!" );
// Init DefFonts:
GetDefaultFonts( *(SvxFontItem*)ppDefItems[EE_CHAR_FONTINFO - EE_ITEMS_START],
diff --git a/svx/source/editeng/impedit3.cxx b/svx/source/editeng/impedit3.cxx
index 2acea25ec6..9500cf789a 100644
--- a/svx/source/editeng/impedit3.cxx
+++ b/svx/source/editeng/impedit3.cxx
@@ -2546,6 +2546,15 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rF
pOut->SetTextLineColor();
}
+ if ( pOut )
+ {
+ const SvxOverlineItem& rOverlineColor = (const SvxOverlineItem&)pNode->GetContentAttribs().GetItem( EE_CHAR_OVERLINE );
+ if ( rOverlineColor.GetColor() != COL_TRANSPARENT )
+ pOut->SetOverlineColor( rOverlineColor.GetColor() );
+ else
+ pOut->SetOverlineColor();
+ }
+
const SvxLanguageItem* pCJKLanguageItem = NULL;
if ( aStatus.UseCharAttribs() )
@@ -3233,6 +3242,10 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
const bool bEndOfLine(y == pLine->GetEndPortion());
const bool bEndOfParagraph(bEndOfLine && nLine + 1 == nLines);
+ // get Overline color (from ((const SvxOverlineItem*)GetItem())->GetColor() in
+ // consequence, but also already set at pOutDev)
+ const Color aOverlineColor(pOutDev->GetOverlineColor());
+
// get TextLine color (from ((const SvxUnderlineItem*)GetItem())->GetColor() in
// consequence, but also already set at pOutDev)
const Color aTextLineColor(pOutDev->GetTextLineColor());
@@ -3247,6 +3260,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
pFieldData,
bEndOfLine, bEndOfParagraph, false, // support for EOL/EOP TEXT comments
&aLocale,
+ aOverlineColor,
aTextLineColor);
}
else
diff --git a/svx/source/editeng/impedit4.cxx b/svx/source/editeng/impedit4.cxx
index 197eff298b..b2aee4f9a5 100644
--- a/svx/source/editeng/impedit4.cxx
+++ b/svx/source/editeng/impedit4.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: impedit4.cxx,v $
- * $Revision: 1.78 $
+ * $Revision: 1.78.54.1 $
*
* This file is part of OpenOffice.org.
*
@@ -894,7 +894,7 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput,
{
// muesste bei WordLineMode ggf. ulw werden,
// aber die Information fehlt hier
- FontUnderline e = ((const SvxUnderlineItem&)rItem).GetUnderline();
+ FontUnderline e = ((const SvxUnderlineItem&)rItem).GetLineStyle();
switch ( e )
{
case UNDERLINE_NONE: rOutput << sRTF_ULNONE; break;
@@ -906,6 +906,20 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput,
}
}
break;
+ case EE_CHAR_OVERLINE:
+ {
+ FontUnderline e = ((const SvxOverlineItem&)rItem).GetLineStyle();
+ switch ( e )
+ {
+ case UNDERLINE_NONE: rOutput << sRTF_OLNONE; break;
+ case UNDERLINE_SINGLE: rOutput << sRTF_OL; break;
+ case UNDERLINE_DOUBLE: rOutput << sRTF_OLDB; break;
+ case UNDERLINE_DOTTED: rOutput << sRTF_OLD; break;
+ default:
+ break;
+ }
+ }
+ break;
case EE_CHAR_STRIKEOUT:
{
FontStrikeout e = ((const SvxCrossedOutItem&)rItem).GetStrikeout();
diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx
index 837ee60102..13f2b0cb69 100644
--- a/svx/source/form/fmtextcontrolshell.cxx
+++ b/svx/source/form/fmtextcontrolshell.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: fmtextcontrolshell.cxx,v $
- * $Revision: 1.16 $
+ * $Revision: 1.16.86.1 $
*
* This file is part of OpenOffice.org.
*
@@ -115,6 +115,7 @@ namespace svx
SID_ATTR_CHAR_CONTOUR,
SID_ATTR_CHAR_STRIKEOUT,
SID_ATTR_CHAR_UNDERLINE,
+ SID_ATTR_CHAR_OVERLINE,
SID_ATTR_CHAR_FONTHEIGHT,
SID_ATTR_CHAR_COLOR,
SID_ATTR_CHAR_KERNING,
@@ -878,20 +879,25 @@ namespace svx
{
case SID_ATTR_CHAR_STRIKEOUT:
case SID_ATTR_CHAR_UNDERLINE:
+ case SID_ATTR_CHAR_OVERLINE:
{
SfxItemSet aToggled( *_rReq.GetArgs() );
lcl_translateUnoStateToItem( nSlot, aFeaturePos->second->getFeatureState(), aToggled );
WhichId nWhich = aToggled.GetPool()->GetWhich( nSlot );
const SfxPoolItem* pItem = aToggled.GetItem( nWhich );
- if ( SID_ATTR_CHAR_UNDERLINE == nSlot )
+ if ( ( SID_ATTR_CHAR_UNDERLINE == nSlot ) || ( SID_ATTR_CHAR_OVERLINE == nSlot ) )
{
- const SvxUnderlineItem* pUnderline = PTR_CAST( SvxUnderlineItem, pItem );
- DBG_ASSERT( pUnderline, "FmTextControlShell::ExecuteTextAttribute: ooops - no underline item!" );
- if ( pUnderline )
+ const SvxOverlineItem* pTextLine = PTR_CAST( SvxOverlineItem, pItem );
+ DBG_ASSERT( pTextLine, "FmTextControlShell::ExecuteTextAttribute: ooops - no underline/overline item!" );
+ if ( pTextLine )
{
- FontUnderline eFU = pUnderline->GetUnderline();
- aToggled.Put( SvxUnderlineItem( eFU == UNDERLINE_SINGLE ? UNDERLINE_NONE : UNDERLINE_SINGLE, nWhich ) );
+ FontUnderline eTL = pTextLine->GetLineStyle();
+ if ( SID_ATTR_CHAR_UNDERLINE == nSlot ) {
+ aToggled.Put( SvxUnderlineItem( eTL == UNDERLINE_SINGLE ? UNDERLINE_NONE : UNDERLINE_SINGLE, nWhich ) );
+ } else {
+ aToggled.Put( SvxOverlineItem( eTL == UNDERLINE_SINGLE ? UNDERLINE_NONE : UNDERLINE_SINGLE, nWhich ) );
+ }
}
}
else
diff --git a/svx/source/form/formshell.src b/svx/source/form/formshell.src
index daca30ee9f..f59bdc1bb4 100644
--- a/svx/source/form/formshell.src
+++ b/svx/source/form/formshell.src
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: formshell.src,v $
- * $Revision: 1.10 $
+ * $Revision: 1.10.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -66,6 +66,10 @@ Menu RID_FM_TEXTATTRIBUTE_MENU
};
MenuItem
{
+ ITEM_FORMAT_ATTR_CHAR_OVERLINE
+ };
+ MenuItem
+ {
ITEM_FORMAT_ATTR_CHAR_UNDERLINE
};
MenuItem
diff --git a/svx/source/items/svxitems.src b/svx/source/items/svxitems.src
index 00d69e7db8..c7a35f625b 100644
--- a/svx/source/items/svxitems.src
+++ b/svx/source/items/svxitems.src
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svxitems.src,v $
- * $Revision: 1.83 $
+ * $Revision: 1.83.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -396,7 +396,7 @@ String RID_SVXITEMS_WEIGHT_BLACK
{
Text [ en-US ] = "black" ;
};
- // enum FontUnderline ----------------------------------------------------
+ // enum FontUnderline - used for underline ------------------------------
String RID_SVXITEMS_UL_NONE
{
Text [ en-US ] = "No underline" ;
@@ -407,7 +407,7 @@ String RID_SVXITEMS_UL_SINGLE
};
String RID_SVXITEMS_UL_DOUBLE
{
- Text [ en-US ] = "Double underlne" ;
+ Text [ en-US ] = "Double underline" ;
};
String RID_SVXITEMS_UL_DOTTED
{
@@ -473,6 +473,83 @@ String RID_SVXITEMS_UL_BOLDWAVE
{
Text [ en-US ] = "Underline (wave, bold)";
};
+ // enum FontUnderline - used for overline -------------------------------
+String RID_SVXITEMS_OL_NONE
+{
+ Text [ en-US ] = "No overline" ;
+};
+String RID_SVXITEMS_OL_SINGLE
+{
+ Text [ en-US ] = "Single overline" ;
+};
+String RID_SVXITEMS_OL_DOUBLE
+{
+ Text [ en-US ] = "Double overline" ;
+};
+String RID_SVXITEMS_OL_DOTTED
+{
+ Text [ en-US ] = "Dotted overline" ;
+};
+String RID_SVXITEMS_OL_DONTKNOW
+{
+ Text [ en-US ] = "Overline";
+};
+String RID_SVXITEMS_OL_DASH
+{
+ Text [ en-US ] = "Overline (dashes)";
+};
+String RID_SVXITEMS_OL_LONGDASH
+{
+ Text [ en-US ] = "Overline (long dashes)";
+};
+String RID_SVXITEMS_OL_DASHDOT
+{
+ Text [ en-US ] = "Overline (dot dash)";
+};
+String RID_SVXITEMS_OL_DASHDOTDOT
+{
+ Text [ en-US ] = "Overline (dot dot dash)";
+};
+String RID_SVXITEMS_OL_SMALLWAVE
+{
+ Text [ en-US ] = "Overline (small wave)";
+};
+String RID_SVXITEMS_OL_WAVE
+{
+ Text [ en-US ] = "Overline (Wave)";
+};
+String RID_SVXITEMS_OL_DOUBLEWAVE
+{
+ Text [ en-US ] = "Overline (Double wave)";
+};
+String RID_SVXITEMS_OL_BOLD
+{
+ Text [ en-US ] = "Overlined (Bold)";
+};
+String RID_SVXITEMS_OL_BOLDDOTTED
+{
+ Text [ en-US ] = "Dotted overline (Bold)";
+};
+String RID_SVXITEMS_OL_BOLDDASH
+{
+ Text [ en-US ] = "Overline (Dash bold)";
+};
+String RID_SVXITEMS_OL_BOLDLONGDASH
+{
+ Text [ en-US ] = "Overline (long dash, bold)";
+};
+String RID_SVXITEMS_OL_BOLDDASHDOT
+{
+ Text [ en-US ] = "Overline (dot dash, bold)";
+};
+String RID_SVXITEMS_OL_BOLDDASHDOTDOT
+{
+ Text [ en-US ] = "Overline (dot dot dash, bold)";
+};
+String RID_SVXITEMS_OL_BOLDWAVE
+{
+ Text [ en-US ] = "Overline (wave, bold)";
+};
// enum FontStrikeout ----------------------------------------------------
String RID_SVXITEMS_STRIKEOUT_NONE
{
@@ -687,6 +764,10 @@ String RID_ATTR_CHAR_CHARSETCOLOR
{
Text [ en-US ] = "Character set color";
};
+String RID_ATTR_CHAR_OVERLINE
+{
+ Text [ en-US ] = "Overline" ;
+};
String RID_ATTR_BORDER_INNER
{
Text = "?" ;
diff --git a/svx/source/items/textitem.cxx b/svx/source/items/textitem.cxx
index 13a2daceed..32e8b9f617 100644
--- a/svx/source/items/textitem.cxx
+++ b/svx/source/items/textitem.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: textitem.cxx,v $
- * $Revision: 1.74 $
+ * $Revision: 1.74.86.1 $
*
* This file is part of OpenOffice.org.
*
@@ -142,7 +142,9 @@ TYPEINIT1_FACTORY(SvxPostureItem, SfxEnumItem, new SvxPostureItem(ITALIC_NONE, 0
TYPEINIT1_FACTORY(SvxWeightItem, SfxEnumItem, new SvxWeightItem(WEIGHT_NORMAL, 0));
TYPEINIT1_FACTORY(SvxFontHeightItem, SfxPoolItem, new SvxFontHeightItem(240, 100, 0));
TYPEINIT1_FACTORY(SvxFontWidthItem, SfxPoolItem, new SvxFontWidthItem(0, 100, 0));
+TYPEINIT1_FACTORY(SvxTextLineItem, SfxEnumItem, new SvxTextLineItem(UNDERLINE_NONE, 0));
TYPEINIT1_FACTORY(SvxUnderlineItem, SfxEnumItem, new SvxUnderlineItem(UNDERLINE_NONE, 0));
+TYPEINIT1_FACTORY(SvxOverlineItem, SfxEnumItem, new SvxOverlineItem(UNDERLINE_NONE, 0));
TYPEINIT1_FACTORY(SvxCrossedOutItem, SfxEnumItem, new SvxCrossedOutItem(STRIKEOUT_NONE, 0));
TYPEINIT1_FACTORY(SvxShadowedItem, SfxBoolItem, new SvxShadowedItem(sal_False, 0));
TYPEINIT1_FACTORY(SvxAutoKernItem, SfxBoolItem, new SvxAutoKernItem(sal_False, 0));
@@ -1322,53 +1324,53 @@ SfxItemPresentation SvxFontWidthItem::GetPresentation
return SFX_ITEM_PRESENTATION_NONE;
}
-// class SvxUnderlineItem ------------------------------------------------
+// class SvxTextLineItem ------------------------------------------------
-SvxUnderlineItem::SvxUnderlineItem( const FontUnderline eSt, const USHORT nId )
+SvxTextLineItem::SvxTextLineItem( const FontUnderline eSt, const USHORT nId )
: SfxEnumItem( nId, (USHORT)eSt ), mColor( COL_TRANSPARENT )
{
}
// -----------------------------------------------------------------------
-int SvxUnderlineItem::HasBoolValue() const
+int SvxTextLineItem::HasBoolValue() const
{
return sal_True;
}
// -----------------------------------------------------------------------
-sal_Bool SvxUnderlineItem::GetBoolValue() const
+sal_Bool SvxTextLineItem::GetBoolValue() const
{
return (FontUnderline)GetValue() != UNDERLINE_NONE;
}
// -----------------------------------------------------------------------
-void SvxUnderlineItem::SetBoolValue( sal_Bool bVal )
+void SvxTextLineItem::SetBoolValue( sal_Bool bVal )
{
SetValue( (USHORT)(bVal ? UNDERLINE_SINGLE : UNDERLINE_NONE) );
}
// -----------------------------------------------------------------------
-SfxPoolItem* SvxUnderlineItem::Clone( SfxItemPool * ) const
+SfxPoolItem* SvxTextLineItem::Clone( SfxItemPool * ) const
{
- SvxUnderlineItem* pNew = new SvxUnderlineItem( *this );
+ SvxTextLineItem* pNew = new SvxTextLineItem( *this );
pNew->SetColor( GetColor() );
return pNew;
}
// -----------------------------------------------------------------------
-USHORT SvxUnderlineItem::GetValueCount() const
+USHORT SvxTextLineItem::GetValueCount() const
{
return UNDERLINE_DOTTED + 1; // auch UNDERLINE_NONE geh"ort dazu
}
// -----------------------------------------------------------------------
-SvStream& SvxUnderlineItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
+SvStream& SvxTextLineItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const
{
rStrm << (BYTE)GetValue();
return rStrm;
@@ -1376,16 +1378,16 @@ SvStream& SvxUnderlineItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) c
// -----------------------------------------------------------------------
-SfxPoolItem* SvxUnderlineItem::Create(SvStream& rStrm, USHORT) const
+SfxPoolItem* SvxTextLineItem::Create(SvStream& rStrm, USHORT) const
{
BYTE nState;
rStrm >> nState;
- return new SvxUnderlineItem( (FontUnderline)nState, Which() );
+ return new SvxTextLineItem( (FontUnderline)nState, Which() );
}
//------------------------------------------------------------------------
-SfxItemPresentation SvxUnderlineItem::GetPresentation
+SfxItemPresentation SvxTextLineItem::GetPresentation
(
SfxItemPresentation ePres,
SfxMapUnit /*eCoreUnit*/,
@@ -1413,31 +1415,31 @@ SfxItemPresentation SvxUnderlineItem::GetPresentation
// -----------------------------------------------------------------------
-XubString SvxUnderlineItem::GetValueTextByPos( USHORT nPos ) const
+XubString SvxTextLineItem::GetValueTextByPos( USHORT /*nPos*/ ) const
{
- DBG_ASSERT( nPos <= (USHORT)UNDERLINE_BOLDWAVE, "enum overflow!" );
- return SVX_RESSTR( RID_SVXITEMS_UL_BEGIN + nPos );
+ DBG_ERROR("SvxTextLineItem::GetValueTextByPos: Pure virtual method");
+ return XubString();
}
/*-----------------13.03.98 16:25-------------------
--------------------------------------------------*/
-sal_Bool SvxUnderlineItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+sal_Bool SvxTextLineItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
{
// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
switch(nMemberId)
{
- case MID_UNDERLINED:
+ case MID_TEXTLINED:
rVal = Bool2Any(GetBoolValue());
break;
- case MID_UNDERLINE:
+ case MID_TL_STYLE:
rVal <<= (sal_Int16)(GetValue());
break;
- case MID_UL_COLOR:
+ case MID_TL_COLOR:
rVal <<= (sal_Int32)( mColor.GetColor() );
break;
- case MID_UL_HASCOLOR:
+ case MID_TL_HASCOLOR:
rVal = Bool2Any( !mColor.GetTransparency() );
break;
}
@@ -1447,17 +1449,17 @@ sal_Bool SvxUnderlineItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
/*-----------------13.03.98 16:28-------------------
--------------------------------------------------*/
-sal_Bool SvxUnderlineItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+sal_Bool SvxTextLineItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
{
// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
sal_Bool bRet = sal_True;
switch(nMemberId)
{
- case MID_UNDERLINED:
+ case MID_TEXTLINED:
SetBoolValue(Any2Bool(rVal));
break;
- case MID_UNDERLINE:
+ case MID_TL_STYLE:
{
sal_Int32 nValue = 0;
if(!(rVal >>= nValue))
@@ -1466,7 +1468,7 @@ sal_Bool SvxUnderlineItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
SetValue((sal_Int16)nValue);
}
break;
- case MID_UL_COLOR:
+ case MID_TL_COLOR:
{
sal_Int32 nCol = 0;
if( !( rVal >>= nCol ) )
@@ -1481,18 +1483,84 @@ sal_Bool SvxUnderlineItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
}
}
break;
- case MID_UL_HASCOLOR:
+ case MID_TL_HASCOLOR:
mColor.SetTransparency( Any2Bool( rVal ) ? 0 : 0xff );
break;
}
return bRet;
}
-int SvxUnderlineItem::operator==( const SfxPoolItem& rItem ) const
+int SvxTextLineItem::operator==( const SfxPoolItem& rItem ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
return SfxEnumItem::operator==( rItem ) &&
- GetColor() == ((SvxUnderlineItem&)rItem).GetColor();
+ GetColor() == ((SvxTextLineItem&)rItem).GetColor();
+}
+
+// class SvxUnderlineItem ------------------------------------------------
+
+SvxUnderlineItem::SvxUnderlineItem( const FontUnderline eSt, const USHORT nId )
+ : SvxTextLineItem( eSt, nId )
+{
+}
+
+//------------------------------------------------------------------------
+
+SfxPoolItem* SvxUnderlineItem::Clone( SfxItemPool * ) const
+{
+ SvxUnderlineItem* pNew = new SvxUnderlineItem( *this );
+ pNew->SetColor( GetColor() );
+ return pNew;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxUnderlineItem::Create(SvStream& rStrm, USHORT) const
+{
+ BYTE nState;
+ rStrm >> nState;
+ return new SvxUnderlineItem( (FontUnderline)nState, Which() );
+}
+
+// -----------------------------------------------------------------------
+
+XubString SvxUnderlineItem::GetValueTextByPos( USHORT nPos ) const
+{
+ DBG_ASSERT( nPos <= (USHORT)UNDERLINE_BOLDWAVE, "enum overflow!" );
+ return SVX_RESSTR( RID_SVXITEMS_UL_BEGIN + nPos );
+}
+
+// class SvxOverlineItem ------------------------------------------------
+
+SvxOverlineItem::SvxOverlineItem( const FontUnderline eSt, const USHORT nId )
+ : SvxTextLineItem( eSt, nId )
+{
+}
+
+//------------------------------------------------------------------------
+
+SfxPoolItem* SvxOverlineItem::Clone( SfxItemPool * ) const
+{
+ SvxOverlineItem* pNew = new SvxOverlineItem( *this );
+ pNew->SetColor( GetColor() );
+ return pNew;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SvxOverlineItem::Create(SvStream& rStrm, USHORT) const
+{
+ BYTE nState;
+ rStrm >> nState;
+ return new SvxOverlineItem( (FontUnderline)nState, Which() );
+}
+
+// -----------------------------------------------------------------------
+
+XubString SvxOverlineItem::GetValueTextByPos( USHORT nPos ) const
+{
+ DBG_ASSERT( nPos <= (USHORT)UNDERLINE_BOLDWAVE, "enum overflow!" );
+ return SVX_RESSTR( RID_SVXITEMS_OL_BEGIN + nPos );
}
// class SvxCrossedOutItem -----------------------------------------------
diff --git a/svx/source/outliner/outleeng.cxx b/svx/source/outliner/outleeng.cxx
index 5dad2e60b2..3ee790dc44 100644
--- a/svx/source/outliner/outleeng.cxx
+++ b/svx/source/outliner/outleeng.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -155,7 +155,7 @@ XubString OutlinerEditEng::GetUndoComment( USHORT nUndoId ) const
}
// #101498#
-void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen,
+void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen,
const sal_Int32* pDXArray, const SvxFont& rFont, USHORT nPara, USHORT nIndex, BYTE nRightToLeft,
const EEngineData::WrongSpellVector* pWrongSpellVector,
const SvxFieldData* pFieldData,
@@ -163,12 +163,13 @@ void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rTex
bool bEndOfParagraph,
bool bEndOfBullet,
const ::com::sun::star::lang::Locale* pLocale,
+ const Color& rOverlineColor,
const Color& rTextLineColor)
{
// why do bullet here at all? Just use GetEditEnginePtr()->PaintingFirstLine
// inside of ImpEditEngine::Paint which calls pOwner->PaintBullet with the correct
// values for hor and ver. No change for not-layouting (painting).
- // changed, bullet rendering now using PaintBullet via
+ // changed, bullet rendering now using PaintBullet via
/* if ( nIndex == 0 )
{
// Dann das Bullet 'malen', dort wird bStrippingPortions ausgewertet
@@ -197,7 +198,7 @@ void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rTex
// #101498#
pOwner->DrawingText(rStartPos,rText,nTextStart,nTextLen,pDXArray,rFont,nPara,nIndex,nRightToLeft,
- pWrongSpellVector, pFieldData, bEndOfLine, bEndOfParagraph, bEndOfBullet, pLocale, rTextLineColor);
+ pWrongSpellVector, pFieldData, bEndOfLine, bEndOfParagraph, bEndOfBullet, pLocale, rOverlineColor, rTextLineColor);
}
void OutlinerEditEng::FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos )
diff --git a/svx/source/outliner/outleeng.hxx b/svx/source/outliner/outleeng.hxx
index 4fb43dacaa..cf4d7d13a9 100644
--- a/svx/source/outliner/outleeng.hxx
+++ b/svx/source/outliner/outleeng.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,9 +43,9 @@ class OutlinerEditEng : public EditEngine
Outliner* pOwner;
protected:
-
- // derived from EditEngine. Allows Outliner objetcs to provide
- // bullet access to the EditEngine.
+
+ // derived from EditEngine. Allows Outliner objetcs to provide
+ // bullet access to the EditEngine.
virtual const SvxNumberFormat* GetNumberFormat( USHORT nPara ) const;
public:
@@ -60,7 +60,7 @@ public:
// #101498#
virtual void DrawingText(
- const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont,
+ const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont,
USHORT nPara, USHORT nIndex, BYTE nRightToLeft,
const EEngineData::WrongSpellVector* pWrongSpellVector,
const SvxFieldData* pFieldData,
@@ -68,6 +68,7 @@ public:
bool bEndOfParagraph,
bool bEndOfBullet,
const ::com::sun::star::lang::Locale* pLocale,
+ const Color& rOverlineColor,
const Color& rTextLineColor);
virtual void StyleSheetChanged( SfxStyleSheet* pStyle );
@@ -87,7 +88,7 @@ public:
virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet );
// belongs into class Outliner, move there before incompatible update!
- Link aOutlinerNotifyHdl;
+ Link aOutlinerNotifyHdl;
NotifyList aNotifyCache;
};
diff --git a/svx/source/outliner/outliner.cxx b/svx/source/outliner/outliner.cxx
index 9e29502f25..d5adb9294a 100644
--- a/svx/source/outliner/outliner.cxx
+++ b/svx/source/outliner/outliner.cxx
@@ -1,13 +1,13 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: outliner.cxx,v $
- * $Revision: 1.74.6.2 $
+ * $Revision: 1.75.20.2 $
*
* This file is part of OpenOffice.org.
*
@@ -200,7 +200,7 @@ void Outliner::ParagraphDeleted( USHORT nPara )
Paragraph* pPara = pParaList->GetParagraph( nPara );
if (!pPara)
return;
-
+
sal_Int16 nDepth = pPara->GetDepth();
if( !pEditEngine->IsInUndo() )
@@ -244,14 +244,14 @@ void Outliner::Init( USHORT nMode )
case OUTLINERMODE_TEXTOBJECT:
case OUTLINERMODE_TITLEOBJECT:
break;
-
+
case OUTLINERMODE_OUTLINEOBJECT:
nCtrl |= EE_CNTRL_OUTLINER2;
break;
case OUTLINERMODE_OUTLINEVIEW:
nCtrl |= EE_CNTRL_OUTLINER;
break;
-
+
default: DBG_ERROR( "Outliner::Init - Invalid Mode!" );
}
@@ -694,7 +694,7 @@ void Outliner::SetStyleSheet( ULONG nPara, SfxStyleSheet* pStyle )
DBG_CHKTHIS(Outliner,0);
Paragraph* pPara = pParaList->GetParagraph( nPara );
if (pPara)
- {
+ {
pEditEngine->SetStyleSheet( (USHORT)nPara, pStyle );
pPara->nFlags |= PARAFLAG_SETBULLETTEXT;
ImplCheckNumBulletItem( (USHORT) nPara );
@@ -707,7 +707,7 @@ void Outliner::SetVisible( Paragraph* pPara, BOOL bVisible )
DBG_ASSERT( pPara, "SetVisible: pPara = NULL" );
if (pPara)
- {
+ {
pPara->bVisible = bVisible;
ULONG nPara = pParaList->GetAbsPos( pPara );
pEditEngine->ShowParagraph( (USHORT)nPara, bVisible );
@@ -894,6 +894,7 @@ Font Outliner::ImpCalcBulletFont( USHORT nPara ) const
{
aBulletFont = aStdFont;
aBulletFont.SetUnderline( UNDERLINE_NONE );
+ aBulletFont.SetOverline( UNDERLINE_NONE );
aBulletFont.SetStrikeout( STRIKEOUT_NONE );
aBulletFont.SetEmphasisMark( EMPHASISMARK_NONE );
aBulletFont.SetRelief( RELIEF_NONE );
@@ -1016,16 +1017,16 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos,
aTextPos.Y() -= aMetric.GetDescent();
}
- DrawingText(aTextPos, pPara->GetText(), 0, pPara->GetText().Len(), pBuf,
- aSvxFont, nPara, 0xFFFF, 0xFF, 0, 0, false, false, true, 0, Color());
-
+ DrawingText(aTextPos, pPara->GetText(), 0, pPara->GetText().Len(), pBuf,
+ aSvxFont, nPara, 0xFFFF, 0xFF, 0, 0, false, false, true, 0, Color(), Color());
+
delete[] pBuf;
}
else
{
pOutDev->DrawText( aTextPos, pPara->GetText() );
}
-
+
pOutDev->SetFont( aOldFont );
}
else
@@ -1057,7 +1058,7 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos,
// created DrawBulletInfo and added handling to sdrtextdecomposition.cxx
DrawBulletInfo aDrawBulletInfo(
*pFmt->GetBrush()->GetGraphicObject(),
- aBulletPos,
+ aBulletPos,
pPara->aBulSize);
aDrawBulletHdl.Call(&aDrawBulletInfo);
@@ -1443,7 +1444,7 @@ const SvxNumberFormat* Outliner::GetNumberFormat( USHORT nPara ) const
Paragraph* pPara = pParaList->GetParagraph( nPara );
if (pPara == NULL)
return NULL;
-
+
sal_Int16 nDepth = pPara? pPara->GetDepth() : -1;
if( nDepth >= 0 )
@@ -1579,7 +1580,7 @@ Rectangle Outliner::ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnP
// the ODF attribut text:space-before which holds the spacing to add to the left of the label
const short nSpaceBefore = pFmt->GetAbsLSpace() + pFmt->GetFirstLineOffset();
-
+
const SvxLRSpaceItem& rLR = (const SvxLRSpaceItem&) pEditEngine->GetParaAttrib( nPara, bOutlineMode ? EE_PARA_OUTLLRSPACE : EE_PARA_LRSPACE );
aTopLeft.X() = rLR.GetTxtLeft() + rLR.GetTxtFirstLineOfst() + nSpaceBefore;
@@ -1592,7 +1593,7 @@ Rectangle Outliner::ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnP
// Bei zentriert/rechtsbuendig anpassen
const SvxAdjustItem& rItem = (const SvxAdjustItem&)pEditEngine->GetParaAttrib( nPara, EE_PARA_JUST );
if ( ( !pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SVX_ADJUST_LEFT ) ) ||
- ( pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SVX_ADJUST_RIGHT ) ) )
+ ( pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SVX_ADJUST_RIGHT ) ) )
{
aTopLeft.X() = pEditEngine->GetFirstLineStartX( nPara ) - nBulletWidth;
}
@@ -1683,11 +1684,11 @@ EBulletInfo Outliner::GetBulletInfo( USHORT nPara )
aInfo.nType = pFmt ? pFmt->GetNumberingType() : 0;
if( pFmt )
- {
+ {
if( pFmt->GetNumberingType() != SVX_NUM_BITMAP )
{
aInfo.aText = ImplGetBulletText( nPara );
-
+
if( pFmt->GetBulletFont() )
aInfo.aFont = *pFmt->GetBulletFont();
}
@@ -1696,7 +1697,7 @@ EBulletInfo Outliner::GetBulletInfo( USHORT nPara )
aInfo.aGraphic = pFmt->GetBrush()->GetGraphicObject()->GetGraphic();
}
}
-
+
if ( aInfo.bVisible )
{
aInfo.aBounds = ImpCalcBulletArea( nPara, TRUE, TRUE );
@@ -1745,7 +1746,7 @@ void Outliner::StripPortions()
}
// #101498#
-void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray,const SvxFont& rFont,
+void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray,const SvxFont& rFont,
USHORT nPara, USHORT nIndex, BYTE nRightToLeft,
const EEngineData::WrongSpellVector* pWrongSpellVector,
const SvxFieldData* pFieldData,
@@ -1753,16 +1754,17 @@ void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, USHO
bool bEndOfParagraph,
bool bEndOfBullet,
const ::com::sun::star::lang::Locale* pLocale,
+ const Color& rOverlineColor,
const Color& rTextLineColor)
{
DBG_CHKTHIS(Outliner,0);
-
+
if(aDrawPortionHdl.IsSet())
{
// #101498#
- DrawPortionInfo aInfo( rStartPos, rText, nTextStart, nTextLen, rFont, nPara, nIndex, pDXArray, pWrongSpellVector,
- pFieldData, pLocale, rTextLineColor, nRightToLeft, bEndOfLine, bEndOfParagraph, bEndOfBullet);
-
+ DrawPortionInfo aInfo( rStartPos, rText, nTextStart, nTextLen, rFont, nPara, nIndex, pDXArray, pWrongSpellVector,
+ pFieldData, pLocale, rOverlineColor, rTextLineColor, nRightToLeft, bEndOfLine, bEndOfParagraph, bEndOfBullet);
+
aDrawPortionHdl.Call( &aInfo );
}
}
@@ -1852,7 +1854,7 @@ sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pPar
{
pPara = pParaList->GetParagraph( nPara );
const sal_Int16 nDepth = pPara->GetDepth();
-
+
// ignore paragraphs that are below our paragraph
if( nDepth > nParaDepth )
continue;
@@ -1981,7 +1983,7 @@ String Outliner::ImplGetBulletText( USHORT nPara )
// if( pPara->nFlags & PARAFLAG_SETBULLETTEXT )
ImplCalcBulletText( nPara, FALSE, FALSE );
aRes = pPara->GetText();
- }
+ }
return aRes;
}
@@ -2031,7 +2033,7 @@ IMPL_LINK( Outliner, EditEngineNotifyHdl, EENotify*, pNotify )
EENotify* pNewNotify = new EENotify( *pNotify );
pEditEngine->aNotifyCache.Insert( pNewNotify, pEditEngine->aNotifyCache.Count() );
}
-
+
return 0;
}
@@ -2097,8 +2099,8 @@ bool Outliner::HasParaFlag( const Paragraph* pPara, sal_uInt16 nFlag ) const
}
-sal_Bool DrawPortionInfo::IsRTL() const
-{
+sal_Bool DrawPortionInfo::IsRTL() const
+{
if(0xFF == mnBiDiLevel)
{
// Use Bidi functions from icu 2.0 to calculate if this portion
@@ -2109,7 +2111,7 @@ sal_Bool DrawPortionInfo::IsRTL() const
// I do not have this info here. Is it necessary? I'll have to ask MT.
const BYTE nDefaultDir = UBIDI_LTR; //IsRightToLeft( nPara ) ? UBIDI_RTL : UBIDI_LTR;
-
+
ubidi_setPara(pBidi, mrText.GetBuffer(), mrText.Len(), nDefaultDir, NULL, &nError);
nError = U_ZERO_ERROR;
@@ -2127,7 +2129,7 @@ sal_Bool DrawPortionInfo::IsRTL() const
((DrawPortionInfo*)this)->mnBiDiLevel = nCurrDir;
}
- return (1 == (mnBiDiLevel % 2));
+ return (1 == (mnBiDiLevel % 2));
}
// eof
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 46dd3625fa..867c0956ca 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdattr.cxx,v $
- * $Revision: 1.35 $
+ * $Revision: 1.34.212.2 $
*
* This file is part of OpenOffice.org.
*
@@ -609,6 +609,7 @@ void SdrItemPool::TakeItemName(sal_uInt16 nWhich, String& rItemName)
case EE_CHAR_FONTWIDTH : nResId = SIP_EE_CHAR_FONTWIDTH;break;
case EE_CHAR_WEIGHT : nResId = SIP_EE_CHAR_WEIGHT;break;
case EE_CHAR_UNDERLINE : nResId = SIP_EE_CHAR_UNDERLINE;break;
+ case EE_CHAR_OVERLINE : nResId = SIP_EE_CHAR_OVERLINE;break;
case EE_CHAR_STRIKEOUT : nResId = SIP_EE_CHAR_STRIKEOUT;break;
case EE_CHAR_ITALIC : nResId = SIP_EE_CHAR_ITALIC;break;
case EE_CHAR_OUTLINE : nResId = SIP_EE_CHAR_OUTLINE;break;
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 1e3c1d6b37..df52800ab4 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdfmtf.cxx,v $
- * $Revision: 1.21 $
+ * $Revision: 1.20.84.2 $
*
* This file is part of OpenOffice.org.
*
@@ -319,6 +319,7 @@ void ImpSdrGDIMetaFileImport::SetAttributes(SdrObject* pObj, FASTBOOL bForceText
pTextAttr->Put( SvxFontHeightItem( nHeight, 100, EE_CHAR_FONTHEIGHT_CTL ) );
pTextAttr->Put(SvxCharScaleWidthItem(100, EE_CHAR_FONTWIDTH));
pTextAttr->Put(SvxUnderlineItem(aFnt.GetUnderline(), EE_CHAR_UNDERLINE));
+ pTextAttr->Put(SvxOverlineItem(aFnt.GetOverline(), EE_CHAR_OVERLINE));
pTextAttr->Put(SvxCrossedOutItem(aFnt.GetStrikeout(), EE_CHAR_STRIKEOUT));
pTextAttr->Put(SvxShadowedItem(aFnt.IsShadow(), EE_CHAR_SHADOW));
pTextAttr->Put(SvxAutoKernItem(aFnt.IsKerning(), EE_CHAR_KERNING));
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 05bf6ab856..323a493cc7 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -79,6 +79,32 @@ namespace
return aRetval;
}
+ static drawinglayer::primitive2d::FontUnderline mapTextLineStyle(FontUnderline eLineStyle)
+ {
+ switch(eLineStyle)
+ {
+ case UNDERLINE_SINGLE: return drawinglayer::primitive2d::FONT_UNDERLINE_SINGLE;
+ case UNDERLINE_DOUBLE: return drawinglayer::primitive2d::FONT_UNDERLINE_DOUBLE;
+ case UNDERLINE_DOTTED: return drawinglayer::primitive2d::FONT_UNDERLINE_DOTTED;
+ case UNDERLINE_DASH: return drawinglayer::primitive2d::FONT_UNDERLINE_DASH;
+ case UNDERLINE_LONGDASH: return drawinglayer::primitive2d::FONT_UNDERLINE_LONGDASH;
+ case UNDERLINE_DASHDOT: return drawinglayer::primitive2d::FONT_UNDERLINE_DASHDOT;
+ case UNDERLINE_DASHDOTDOT: return drawinglayer::primitive2d::FONT_UNDERLINE_DASHDOTDOT;
+ case UNDERLINE_SMALLWAVE: return drawinglayer::primitive2d::FONT_UNDERLINE_SMALLWAVE;
+ case UNDERLINE_WAVE: return drawinglayer::primitive2d::FONT_UNDERLINE_WAVE;
+ case UNDERLINE_DOUBLEWAVE: return drawinglayer::primitive2d::FONT_UNDERLINE_DOUBLEWAVE;
+ case UNDERLINE_BOLD: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLD;
+ case UNDERLINE_BOLDDOTTED: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDOTTED;
+ case UNDERLINE_BOLDDASH: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDASH;
+ case UNDERLINE_BOLDLONGDASH: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDLONGDASH;
+ case UNDERLINE_BOLDDASHDOT: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDASHDOT;
+ case UNDERLINE_BOLDDASHDOTDOT: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDASHDOTDOT;
+ case UNDERLINE_BOLDWAVE: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDWAVE;
+ // FontUnderline_FORCE_EQUAL_SIZE, UNDERLINE_DONTKNOW, UNDERLINE_NONE
+ default: return drawinglayer::primitive2d::FONT_UNDERLINE_NONE;
+ }
+ }
+
class impTextBreakupHandler
{
private:
@@ -174,7 +200,7 @@ namespace
{
basegfx::B2DVector aSize;
drawinglayer::primitive2d::FontAttributes aFontAttributes(drawinglayer::primitive2d::getFontAttributesFromVclFont(
- aSize,
+ aSize,
rInfo.mrFont,
rInfo.IsRTL(),
false));
@@ -247,30 +273,11 @@ namespace
}
}
- // prepare underline data
- drawinglayer::primitive2d::FontUnderline eFontUnderline(drawinglayer::primitive2d::FONT_UNDERLINE_NONE);
+ // prepare overline data
+ drawinglayer::primitive2d::FontUnderline eFontOverline(mapTextLineStyle(rInfo.mrFont.GetOverline()));
- switch(rInfo.mrFont.GetUnderline())
- {
- case UNDERLINE_SINGLE : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_SINGLE; break;
- case UNDERLINE_DOUBLE : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_DOUBLE; break;
- case UNDERLINE_DOTTED : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_DOTTED; break;
- case UNDERLINE_DASH : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_DASH; break;
- case UNDERLINE_LONGDASH : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_LONGDASH; break;
- case UNDERLINE_DASHDOT : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_DASHDOT; break;
- case UNDERLINE_DASHDOTDOT : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_DASHDOTDOT; break;
- case UNDERLINE_SMALLWAVE : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_SMALLWAVE; break;
- case UNDERLINE_WAVE : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_WAVE; break;
- case UNDERLINE_DOUBLEWAVE : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_DOUBLEWAVE; break;
- case UNDERLINE_BOLD : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_BOLD; break;
- case UNDERLINE_BOLDDOTTED : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDOTTED; break;
- case UNDERLINE_BOLDDASH : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDASH; break;
- case UNDERLINE_BOLDLONGDASH : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_BOLDLONGDASH; break;
- case UNDERLINE_BOLDDASHDOT : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDASHDOT; break;
- case UNDERLINE_BOLDDASHDOTDOT : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDASHDOTDOT; break;
- case UNDERLINE_BOLDWAVE : eFontUnderline = drawinglayer::primitive2d::FONT_UNDERLINE_BOLDWAVE; break;
- default : break; // FontUnderline_FORCE_EQUAL_SIZE, UNDERLINE_DONTKNOW, UNDERLINE_NONE
- }
+ // prepare underline data
+ drawinglayer::primitive2d::FontUnderline eFontUnderline(mapTextLineStyle(rInfo.mrFont.GetUnderline()));
const bool bUnderlineAbove(drawinglayer::primitive2d::FONT_UNDERLINE_NONE != eFontUnderline && impIsUnderlineAbove(rInfo.mrFont));
@@ -323,16 +330,20 @@ namespace
const Color aFontColor(rInfo.mrFont.GetColor());
const basegfx::BColor aBFontColor(aFontColor.getBColor());
- // get line color. If it's on automatic (0xffffffff) use FontColor instead
- const Color aLineColor(rInfo.maTextLineColor);
- const basegfx::BColor aBLineColor((0xffffffff == aLineColor.GetColor()) ? aBFontColor : aLineColor.getBColor());
+ // get overline color. If it's on automatic (0xffffffff) use FontColor instead
+ const Color aOverlineColor(rInfo.maOverlineColor);
+ const basegfx::BColor aBOverlineColor((0xffffffff == aOverlineColor.GetColor()) ? aBFontColor : aOverlineColor.getBColor());
+
+ // get underline color. If it's on automatic (0xffffffff) use FontColor instead
+ const Color aUnderlineColor(rInfo.maTextLineColor);
+ const basegfx::BColor aBUnderlineColor((0xffffffff == aUnderlineColor.GetColor()) ? aBFontColor : aUnderlineColor.getBColor());
drawinglayer::primitive2d::BasePrimitive2D* pNewPrimitive = new drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D(
-
+
// attributes for TextSimplePortionPrimitive2D
aNewTransform,
- rInfo.mrText,
- rInfo.mnTextStart,
+ rInfo.mrText,
+ rInfo.mnTextStart,
rInfo.mnTextLen,
aDXArray,
aFontAttributes,
@@ -340,7 +351,9 @@ namespace
aBFontColor,
// attributes for TextDecoratedPortionPrimitive2D
- aBLineColor,
+ aBOverlineColor,
+ aBUnderlineColor,
+ eFontOverline,
eFontUnderline,
bUnderlineAbove,
eFontStrikeout,
@@ -364,7 +377,7 @@ namespace
pNewPrimitive = impCheckFieldPrimitive(pNewPrimitive, rInfo);
}
- maTextPortionPrimitives.push_back(pNewPrimitive);
+ maTextPortionPrimitives.push_back(pNewPrimitive);
// support for WrongSpellVector. Create WrongSpellPrimitives as needed
if(rInfo.mpWrongSpellVector && !aDXArray.empty())
@@ -398,7 +411,7 @@ namespace
{
maTextPortionPrimitives.push_back(new drawinglayer::primitive2d::WrongSpellPrimitive2D(
aNewTransform,
- fStart,
+ fStart,
fEnd,
aSpellColor));
}
@@ -419,7 +432,7 @@ namespace
// embed current primitive to a sequence
drawinglayer::primitive2d::Primitive2DSequence aSequence;
-
+
if(pPrimitive)
{
aSequence.realloc(1);
@@ -501,16 +514,16 @@ namespace
// create GraphicPrimitive2D
const drawinglayer::primitive2d::Primitive2DReference aNewReference(new drawinglayer::primitive2d::GraphicPrimitive2D(
- aNewTransform,
- rInfo.maBulletGraphicObject,
+ aNewTransform,
+ rInfo.maBulletGraphicObject,
aGraphicAttr));
// embed in TextHierarchyBulletPrimitive2D
const drawinglayer::primitive2d::Primitive2DSequence aNewSequence(&aNewReference, 1);
drawinglayer::primitive2d::BasePrimitive2D* pNewPrimitive = new drawinglayer::primitive2d::TextHierarchyBulletPrimitive2D(aNewSequence);
-
+
// add to output
- maTextPortionPrimitives.push_back(pNewPrimitive);
+ maTextPortionPrimitives.push_back(pNewPrimitive);
}
IMPL_LINK(impTextBreakupHandler, decomposeContourTextPrimitive, DrawPortionInfo*, pInfo)
@@ -575,8 +588,8 @@ namespace
return 0;
}
- drawinglayer::primitive2d::Primitive2DSequence impTextBreakupHandler::getPrimitive2DSequence()
- {
+ drawinglayer::primitive2d::Primitive2DSequence impTextBreakupHandler::getPrimitive2DSequence()
+ {
if(maTextPortionPrimitives.size())
{
// collect non-closed lines
@@ -602,7 +615,7 @@ bool SdrTextObj::impCheckSpellCheckForDecomposeTextPrimitive() const
}
bool SdrTextObj::impDecomposeContourTextPrimitive(
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DSequence& rTarget,
const drawinglayer::primitive2d::SdrContourTextPrimitive2D& rSdrContourTextPrimitive,
const drawinglayer::geometry::ViewInformation2D& aViewInformation) const
{
@@ -657,7 +670,7 @@ bool SdrTextObj::impDecomposeContourTextPrimitive(
}
bool SdrTextObj::impDecomposeBlockTextPrimitive(
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DSequence& rTarget,
const drawinglayer::primitive2d::SdrBlockTextPrimitive2D& rSdrBlockTextPrimitive,
const drawinglayer::geometry::ViewInformation2D& aViewInformation) const
{
diff --git a/svx/source/svdraw/svdstr.src b/svx/source/svdraw/svdstr.src
index 4a1f1e9ed2..f577928354 100644
--- a/svx/source/svdraw/svdstr.src
+++ b/svx/source/svdraw/svdstr.src
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdstr.src,v $
- * $Revision: 1.95 $
+ * $Revision: 1.95.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -2619,6 +2619,11 @@ String SIP_EE_CHAR_UNDERLINE
Text [ en-US ] = "Underline";
};
+String SIP_EE_CHAR_OVERLINE
+{
+ Text [ en-US ] = "Overline";
+};
+
String SIP_EE_CHAR_STRIKEOUT
{
Text [ en-US ] = "Strikethrough";
diff --git a/svx/source/svrtf/rtfitem.cxx b/svx/source/svrtf/rtfitem.cxx
index 419c6c934a..45a0d0f461 100644
--- a/svx/source/svrtf/rtfitem.cxx
+++ b/svx/source/svrtf/rtfitem.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: rtfitem.cxx,v $
- * $Revision: 1.35 $
+ * $Revision: 1.35.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -108,8 +108,6 @@ inline const SvxEscapementItem& GetEscapement(const SfxItemSet& rSet,USHORT nId,
{ return (const SvxEscapementItem&)rSet.Get( nId,bInP); }
inline const SvxLineSpacingItem& GetLineSpacing(const SfxItemSet& rSet,USHORT nId,BOOL bInP=TRUE)
{ return (const SvxLineSpacingItem&)rSet.Get( nId,bInP); }
-inline const SvxUnderlineItem& GetUnderline(const SfxItemSet& rSet,USHORT nId,BOOL bInP=TRUE)
- { return (const SvxUnderlineItem&)rSet.Get( nId,bInP); }
// frm
inline const SvxLRSpaceItem& GetLRSpace(const SfxItemSet& rSet,USHORT nId,BOOL bInP=TRUE)
{ return (const SvxLRSpaceItem&)rSet.Get( nId,bInP); }
@@ -229,6 +227,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
int bFirstToken = TRUE, bWeiter = TRUE;
USHORT nStyleNo = 0; // default
FontUnderline eUnderline;
+ FontUnderline eOverline;
FontEmphasisMark eEmphasis;
bPardTokenRead = FALSE;
RTF_CharTypeDef eCharType = NOTDEF_CHARTYPE;
@@ -847,28 +846,122 @@ ATTR_SETUNDERLINE:
case RTF_ULC:
if( PLAINID->nUnderline )
{
- SvxUnderlineItem aUL( UNDERLINE_SINGLE,
- PLAINID->nUnderline );
+ SvxUnderlineItem aUL( UNDERLINE_SINGLE, PLAINID->nUnderline );
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pSet->GetItemState(
PLAINID->nUnderline, FALSE, &pItem ) )
{
// is switched off ?
if( UNDERLINE_NONE ==
- ((SvxUnderlineItem*)pItem)->GetUnderline() )
+ ((SvxUnderlineItem*)pItem)->GetLineStyle() )
break;
aUL = *(SvxUnderlineItem*)pItem;
}
else
- aUL = GetUnderline( *pSet, PLAINID->nUnderline, FALSE );
+ aUL = (const SvxUnderlineItem&)pSet->Get( PLAINID->nUnderline, FALSE );
- if( UNDERLINE_NONE == aUL.GetUnderline() )
- aUL.SetUnderline( UNDERLINE_SINGLE );
+ if( UNDERLINE_NONE == aUL.GetLineStyle() )
+ aUL.SetLineStyle( UNDERLINE_SINGLE );
aUL.SetColor( GetColor( USHORT(nTokenValue) ));
pSet->Put( aUL );
}
break;
+ case RTF_OL:
+ if( !IsAttrSttPos() )
+ break;
+ eOverline = nTokenValue ? UNDERLINE_SINGLE : UNDERLINE_NONE;
+ goto ATTR_SETOVERLINE;
+
+ case RTF_OLD:
+ eOverline = UNDERLINE_DOTTED;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLDASH:
+ eOverline = UNDERLINE_DASH;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLDASHD:
+ eOverline = UNDERLINE_DASHDOT;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLDASHDD:
+ eOverline = UNDERLINE_DASHDOTDOT;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLDB:
+ eOverline = UNDERLINE_DOUBLE;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLNONE:
+ eOverline = UNDERLINE_NONE;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLTH:
+ eOverline = UNDERLINE_BOLD;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLWAVE:
+ eOverline = UNDERLINE_WAVE;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLTHD:
+ eOverline = UNDERLINE_BOLDDOTTED;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLTHDASH:
+ eOverline = UNDERLINE_BOLDDASH;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLLDASH:
+ eOverline = UNDERLINE_LONGDASH;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLTHLDASH:
+ eOverline = UNDERLINE_BOLDLONGDASH;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLTHDASHD:
+ eOverline = UNDERLINE_BOLDDASHDOT;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLTHDASHDD:
+ eOverline = UNDERLINE_BOLDDASHDOTDOT;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLHWAVE:
+ eOverline = UNDERLINE_BOLDWAVE;
+ goto ATTR_SETOVERLINE;
+ case RTF_OLOLDBWAVE:
+ eOverline = UNDERLINE_DOUBLEWAVE;
+ goto ATTR_SETOVERLINE;
+
+ case RTF_OLW:
+ eOverline = UNDERLINE_SINGLE;
+
+ if( PLAINID->nWordlineMode )
+ {
+ pSet->Put( SvxWordLineModeItem( TRUE, PLAINID->nWordlineMode ));
+ }
+ goto ATTR_SETOVERLINE;
+
+ATTR_SETOVERLINE:
+ if( PLAINID->nUnderline )
+ {
+ pSet->Put( SvxOverlineItem( eOverline, PLAINID->nOverline ));
+ }
+ break;
+
+ case RTF_OLC:
+ if( PLAINID->nOverline )
+ {
+ SvxOverlineItem aOL( UNDERLINE_SINGLE, PLAINID->nOverline );
+ const SfxPoolItem* pItem;
+ if( SFX_ITEM_SET == pSet->GetItemState(
+ PLAINID->nOverline, FALSE, &pItem ) )
+ {
+ // is switched off ?
+ if( UNDERLINE_NONE ==
+ ((SvxOverlineItem*)pItem)->GetLineStyle() )
+ break;
+ aOL = *(SvxOverlineItem*)pItem;
+ }
+ else
+ aOL = (const SvxOverlineItem&)pSet->Get( PLAINID->nUnderline, FALSE );
+
+ if( UNDERLINE_NONE == aOL.GetLineStyle() )
+ aOL.SetLineStyle( UNDERLINE_SINGLE );
+ aOL.SetColor( GetColor( USHORT(nTokenValue) ));
+ pSet->Put( aOL );
+ }
+ break;
+
case RTF_UP:
case RTF_SUPER:
if( PLAINID->nEscapement )
diff --git a/svx/source/svrtf/svxrtf.cxx b/svx/source/svrtf/svxrtf.cxx
index 5bd443c418..8808a1dfd9 100644
--- a/svx/source/svrtf/svxrtf.cxx
+++ b/svx/source/svrtf/svxrtf.cxx
@@ -1,13 +1,13 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svxrtf.cxx,v $
- * $Revision: 1.34.216.1 $
+ * $Revision: 1.34.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -1086,7 +1086,7 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen
_ClearStyleAttr( *pOld );
#else
/*
- #i21422#
+ #i21422#
If the parent (pAkt) sets something e.g. , and the child (pOld)
unsets it and the style both are based on has it unset then
clearing the pOld by looking at the style is clearly a disaster
@@ -1239,7 +1239,7 @@ SvxRTFStyleType::SvxRTFStyleType( SfxItemPool& rPool, const USHORT* pWhichRange
: aAttrSet( rPool, pWhichRange )
{
nOutlineNo = BYTE(-1); // nicht gesetzt
- nBasedOn = 0;
+ nBasedOn = 0;
bBasedOnIsSet = FALSE; //$flr #117411#
nNext = 0;
bIsCharFmt = FALSE;
@@ -1469,6 +1469,7 @@ RTFPlainAttrMapIds::RTFPlainAttrMapIds( const SfxItemPool& rPool )
nPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_POSTURE, FALSE );
nShadowed = rPool.GetTrueWhich( SID_ATTR_CHAR_SHADOWED, FALSE );
nUnderline = rPool.GetTrueWhich( SID_ATTR_CHAR_UNDERLINE, FALSE );
+ nOverline = rPool.GetTrueWhich( SID_ATTR_CHAR_OVERLINE, FALSE );
nWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_WEIGHT, FALSE );
nWordlineMode = rPool.GetTrueWhich( SID_ATTR_CHAR_WORDLINEMODE, FALSE );
nAutoKerning = rPool.GetTrueWhich( SID_ATTR_CHAR_AUTOKERN, FALSE );
diff --git a/svx/source/table/tablertfexporter.cxx b/svx/source/table/tablertfexporter.cxx
index 5856518eb1..1581e2decf 100644
--- a/svx/source/table/tablertfexporter.cxx
+++ b/svx/source/table/tablertfexporter.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: tablertfexporter.cxx,v $
- * $Revision: 1.3 $
+ * $Revision: 1.3.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -262,7 +262,7 @@ void SdrTableRtfExporter::WriteCell( sal_Int32 nCol, sal_Int32 nRow )
bResetAttr = true;
mrStrm << sRTF_I;
}
- if ( rUnderlineItem.GetUnderline() != UNDERLINE_NONE )
+ if ( rUnderlineItem.GetLineStyle() != UNDERLINE_NONE )
{ // underline
bResetAttr = true;
mrStrm << sRTF_UL;
diff --git a/svx/source/unodraw/unofdesc.cxx b/svx/source/unodraw/unofdesc.cxx
index 6596ab5c54..879b13ad5e 100644
--- a/svx/source/unodraw/unofdesc.cxx
+++ b/svx/source/unodraw/unofdesc.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: unofdesc.cxx,v $
- * $Revision: 1.7 $
+ * $Revision: 1.7.212.1 $
*
* This file is part of OpenOffice.org.
*
@@ -119,7 +119,7 @@ void SvxUnoFontDescriptor::FillItemSet( const awt::FontDescriptor& rDesc, SfxIte
{
SvxUnderlineItem aUnderlineItem( (FontUnderline)0, EE_CHAR_UNDERLINE );
aTemp <<= (sal_Int16)rDesc.Underline;
- ((SfxPoolItem*)&aUnderlineItem)->PutValue( aTemp, MID_UNDERLINE );
+ ((SfxPoolItem*)&aUnderlineItem)->PutValue( aTemp, MID_TL_STYLE );
rSet.Put( aUnderlineItem );
}
@@ -171,7 +171,7 @@ void SvxUnoFontDescriptor::FillFromItemSet( const SfxItemSet& rSet, awt::FontDes
{
pItem = &rSet.Get( EE_CHAR_UNDERLINE, TRUE );
uno::Any aUnderline;
- if(pItem->QueryValue( aUnderline, MID_UNDERLINE ))
+ if(pItem->QueryValue( aUnderline, MID_TL_STYLE ))
aUnderline >>= rDesc.Underline;
}
{