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 /sc | |
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 'sc')
-rw-r--r-- | sc/source/filter/oox/commentsbuffer.cxx | 3 | ||||
-rw-r--r-- | sc/source/filter/xcl97/xcl97rec.cxx | 15 |
2 files changed, 15 insertions, 3 deletions
diff --git a/sc/source/filter/oox/commentsbuffer.cxx b/sc/source/filter/oox/commentsbuffer.cxx index 3bbf751f2f84..39d57a0b4988 100644 --- a/sc/source/filter/oox/commentsbuffer.cxx +++ b/sc/source/filter/oox/commentsbuffer.cxx @@ -195,8 +195,7 @@ void Comment::finalizeImport() // position and formatting pNoteShape->convertFormatting( xAnnoShape ); // visibility - const ::oox::vml::ClientData* pClientData = pNoteShape->getClientData(); - xAnno->setIsVisible( pClientData && pClientData->mbVisible ); + bVisible = pNoteShape->getTypeModel().mbVisible; } } break; diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index 4e7e4af970c9..6b886bfd6602 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -566,7 +566,20 @@ VmlCommentExporter::VmlCommentExporter( sax_fastparser::FSHelperPtr p, ScAddress void VmlCommentExporter::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect ) { lcl_FillProps( rProps, mpCaption, mbVisible ); - rProps.AddOpt( ESCHER_Prop_fHidden, 1 ); // bool field + rProps.AddOpt( ESCHER_Prop_fHidden, mbVisible ); // bool field + + // shadow property value for comment ( set in lcl_FillProps [*] ) has been + // overwritten by new value ( 0x20000 ) in the generic part of the export + // ( see EscherPropertyContainer::CreateShadowProperties ) + // Safer option here is to just force the needed value here for oox vml + // export alone ( and avoid potential problems with binary export ) + // #TODO investigate value of ESCHER_Prop_fshadowObscured generally + // in binary export ( if indeed this value is good for binary export ) + // we can change the heuristics and/or initialisation path and get + // rid of line below. + // [*] lcl_FillProps seems to be called twice when exporting to xlsx + // once from XclObjComment::ProcessEscherObj #TODO look into that also + rProps.AddOpt( ESCHER_Prop_fshadowObscured, 0x00030003 ); // force value for comments VMLExport::Commit( rProps, rRect ); } |