diff options
author | Noel Power <noel.power@novell.com> | 2012-08-09 11:15:43 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2012-08-09 11:42:24 +0100 |
commit | 56b0b2cbc0dc6538617e3f3b1005e4723ca227b0 (patch) | |
tree | 262c24cf9d5be007d532e8fa129bd6f823f9bf1b /oox | |
parent | 28b3a290ce3dfe4156d810d73140fed9decbb12c (diff) |
misc comment import/export fixes
a) fix vmldrawing.vml for xlsx export ( changed from frame to textbox, added
support for shadow element with attributes, shadow color, shadow obscured )
b) use proper fillcolor attribute
c) detect whether note/comment is shown on import
d) export state of note ( shown/hidden )
text position still not perfect, we still are missing some attributes to control
that.
Change-Id: I59b446175217479ce7960287aa540df8c6b2b1ea
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/vmlexport.cxx | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx index 34f080250805..17ff426cff7d 100644 --- a/oox/source/export/vmlexport.cxx +++ b/oox/source/export/vmlexport.cxx @@ -516,7 +516,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect } if ( rProps.GetOpt( ESCHER_Prop_fillColor, nValue ) ) - impl_AddColor( pAttrList, XML_color, nValue ); + impl_AddColor( m_pShapeAttrList, XML_fillcolor, nValue ); if ( rProps.GetOpt( ESCHER_Prop_fillBackColor, nValue ) ) impl_AddColor( pAttrList, XML_color2, nValue ); @@ -634,7 +634,34 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect break; case ESCHER_Prop_fHidden: - m_pShapeStyle->append( ";visibility:hidden" ); + if ( !it->nPropValue ) + m_pShapeStyle->append( ";visibility:hidden" ); + break; + case ESCHER_Prop_shadowColor: + case ESCHER_Prop_fshadowObscured: + { + sal_uInt32 nValue = 0; + bool bShadow = false; + bool bObscured = false; + if ( rProps.GetOpt( ESCHER_Prop_fshadowObscured, nValue ) ) + { + bShadow = (( nValue & 0x20002 ) == 0x20002 ); + bObscured = (( nValue & 0x10001 ) == 0x10001 ); + } + if ( bShadow ) + { + sax_fastparser::FastAttributeList *pAttrList = m_pSerializer->createAttrList(); + impl_AddBool( pAttrList, XML_on, bShadow ); + impl_AddBool( pAttrList, XML_obscured, bObscured ); + + if ( rProps.GetOpt( ESCHER_Prop_shadowColor, nValue ) ) + impl_AddColor( pAttrList, XML_color, nValue ); + + m_pSerializer->singleElementNS( XML_v, XML_shadow, XFastAttributeListRef( pAttrList ) ); + bAlreadyWritten[ ESCHER_Prop_fshadowObscured ] = true; + bAlreadyWritten[ ESCHER_Prop_shadowColor ] = true; + } + } break; default: #if OSL_DEBUG_LEVEL > 0 |