summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx67
-rw-r--r--chart2/source/inc/CharacterProperties.hxx3
-rw-r--r--chart2/source/tools/CharacterProperties.cxx25
-rw-r--r--chart2/source/view/main/PropertyMapper.cxx3
4 files changed, 98 insertions, 0 deletions
diff --git a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
index 3382ae1ff085..c1f6c1a24472 100644
--- a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
@@ -193,6 +193,40 @@ void CharacterPropertyItemConverter::FillSpecialItem(
}
break;
+ case EE_CHAR_OVERLINE:
+ {
+ SvxOverlineItem aItem( UNDERLINE_NONE, EE_CHAR_OVERLINE );
+ bool bModified = false;
+
+ uno::Any aValue( GetPropertySet()->getPropertyValue( C2U( "CharOverline" ) ) );
+ if ( aValue.hasValue() )
+ {
+ aItem.PutValue( aValue, MID_TL_STYLE );
+ bModified = true;
+ }
+
+ aValue = GetPropertySet()->getPropertyValue( C2U( "CharOverlineHasColor" ) );
+ if ( aValue.hasValue() &&
+ ( *reinterpret_cast< const sal_Bool* >( aValue.getValue() ) != sal_False ) )
+ {
+ aItem.PutValue( aValue, MID_TL_HASCOLOR );
+ bModified = true;
+ }
+
+ aValue = GetPropertySet()->getPropertyValue( C2U( "CharOverlineColor" ) );
+ if ( aValue.hasValue() )
+ {
+ aItem.PutValue( aValue, MID_TL_COLOR );
+ bModified = true;
+ }
+
+ if ( bModified )
+ {
+ rOutItemSet.Put( aItem );
+ }
+ }
+ break;
+
case EE_CHAR_ITALIC:
case EE_CHAR_ITALIC_CJK:
case EE_CHAR_ITALIC_CTL:
@@ -397,6 +431,39 @@ bool CharacterPropertyItemConverter::ApplySpecialItem(
}
break;
+ case EE_CHAR_OVERLINE:
+ {
+ const SvxOverlineItem& rItem = static_cast< const SvxOverlineItem & >( rItemSet.Get( nWhichId ) );
+
+ if ( rItem.QueryValue( aValue, MID_TL_STYLE ) )
+ {
+ if ( aValue != GetPropertySet()->getPropertyValue( C2U( "CharOverline" ) ) )
+ {
+ GetPropertySet()->setPropertyValue( C2U( "CharOverline" ), aValue );
+ bChanged = true;
+ }
+ }
+
+ if ( rItem.QueryValue( aValue, MID_TL_COLOR ) )
+ {
+ if ( aValue != GetPropertySet()->getPropertyValue( C2U( "CharOverlineColor" ) ) )
+ {
+ GetPropertySet()->setPropertyValue( C2U( "CharOverlineColor" ), aValue );
+ bChanged = true;
+ }
+ }
+
+ if ( rItem.QueryValue( aValue, MID_TL_HASCOLOR ) )
+ {
+ if ( aValue != GetPropertySet()->getPropertyValue( C2U( "CharOverlineHasColor" ) ) )
+ {
+ GetPropertySet()->setPropertyValue( C2U( "CharOverlineHasColor" ), aValue );
+ bChanged = true;
+ }
+ }
+ }
+ break;
+
case EE_CHAR_ITALIC:
case EE_CHAR_ITALIC_CJK:
case EE_CHAR_ITALIC_CTL:
diff --git a/chart2/source/inc/CharacterProperties.hxx b/chart2/source/inc/CharacterProperties.hxx
index 0742435e9bfe..676618d0bc5c 100644
--- a/chart2/source/inc/CharacterProperties.hxx
+++ b/chart2/source/inc/CharacterProperties.hxx
@@ -63,6 +63,9 @@ public:
PROP_CHAR_UNDERLINE,
PROP_CHAR_UNDERLINE_COLOR,
PROP_CHAR_UNDERLINE_HAS_COLOR,
+ PROP_CHAR_OVERLINE,
+ PROP_CHAR_OVERLINE_COLOR,
+ PROP_CHAR_OVERLINE_HAS_COLOR,
PROP_CHAR_WEIGHT,
PROP_CHAR_POSTURE,
PROP_CHAR_AUTO_KERNING,
diff --git a/chart2/source/tools/CharacterProperties.cxx b/chart2/source/tools/CharacterProperties.cxx
index cca655780a79..f0d310173ebb 100644
--- a/chart2/source/tools/CharacterProperties.cxx
+++ b/chart2/source/tools/CharacterProperties.cxx
@@ -161,6 +161,28 @@ void CharacterProperties::AddPropertiesToVector(
::getBooleanCppuType(),
beans::PropertyAttribute::BOUND
| beans::PropertyAttribute::MAYBEDEFAULT ));
+ // CharOverline (see awt.FontUnderline)
+ rOutProperties.push_back(
+ Property( C2U( "CharOverline" ),
+ PROP_CHAR_OVERLINE,
+ ::getCppuType( reinterpret_cast< const sal_Int16* >( 0 ) ),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT ) );
+ // CharOverlineColor
+ rOutProperties.push_back(
+ Property( C2U( "CharOverlineColor" ),
+ PROP_CHAR_OVERLINE_COLOR,
+ ::getCppuType( reinterpret_cast< const sal_Int32* >( 0 ) ),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT
+ | beans::PropertyAttribute::MAYBEVOID ) );
+ // CharOverlineHasColor
+ rOutProperties.push_back(
+ Property( C2U( "CharOverlineHasColor" ),
+ PROP_CHAR_OVERLINE_HAS_COLOR,
+ ::getBooleanCppuType(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT ) );
// CharWeight (see awt.FontWeight)
rOutProperties.push_back(
Property( C2U( "CharWeight" ),
@@ -503,6 +525,9 @@ void CharacterProperties::AddDefaultsToMap(
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_UNDERLINE, awt::FontUnderline::NONE );
::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_CHAR_UNDERLINE_COLOR, -1 ); //automatic color (COL_AUTO)
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_UNDERLINE_HAS_COLOR, false );
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_OVERLINE, awt::FontUnderline::NONE );
+ ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_CHAR_OVERLINE_COLOR, -1 ); //automatic color (COL_AUTO)
+ ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_OVERLINE_HAS_COLOR, false );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_WEIGHT, awt::FontWeight::NORMAL );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_POSTURE, awt::FontSlant_NONE );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_AUTO_KERNING, true );
diff --git a/chart2/source/view/main/PropertyMapper.cxx b/chart2/source/view/main/PropertyMapper.cxx
index 1979582763fa..82f3f48ea3ae 100644
--- a/chart2/source/view/main/PropertyMapper.cxx
+++ b/chart2/source/view/main/PropertyMapper.cxx
@@ -244,6 +244,9 @@ const tMakePropertyNameMap& PropertyMapper::getPropertyNameMapForCharacterProper
( C2U( "CharUnderline" ), C2U("CharUnderline") )
( C2U( "CharUnderlineColor" ), C2U("CharUnderlineColor") )
( C2U( "CharUnderlineHasColor" ), C2U("CharUnderlineHasColor") )
+ ( C2U( "CharOverline" ), C2U("CharOverline") )
+ ( C2U( "CharOverlineColor" ), C2U("CharOverlineColor") )
+ ( C2U( "CharOverlineHasColor" ), C2U("CharOverlineHasColor") )
( C2U( "CharWeight" ), C2U("CharWeight") )
( C2U( "CharWeightAsian" ), C2U("CharWeightAsian") )
( C2U( "CharWeightComplex" ), C2U("CharWeightComplex") )