Apache OpenOffice (AOO) Bugzilla – Issue 118485
Styles for OLEs are not saved
Last modified: 2017-05-20 10:30:39 UTC
ALG: For new created OLEs no graphic styles are saved. This must be suppressed somewhere in export code. This is not for SW but for all other apps. Attributes are necessary when #i67705# will be fixed which is about supporting styles for OLEs.
ALG: When adding a style to a OLE object and setting properties there, all works well. Problem is that the uno api for ole does not allow graphic attributes. I need to extend that API to support graphic attributes. ALG: Adding line, fill, text, shadow, fontwork, rotate, shear for test purposes...
ALG: Due to the interactor (OLE is temporarily replaced with SdrGrafObj with Metafile) i also enable shear for SdrGrafObj, should be no problem. ALso need to copy text for the temp clone interaction object.
ALG: Text has problems, but is not too necessary during interactions, leaving out for now. The rest is looking good, though. Still looking for text input activation by typing...
ALG: Text input activation adapted. OLE activation adapted to be centered at the now evtl. sheared/rotated area. Works well. Looking for conversions...
ALG: Converter of SdrGrafObj never took care of line and/or fill attributes at all,e evn though that feature was in for quite some time. It would be worth writing another task, but... ALG: Added taking care of attributes for SdrGrafObj conversions (to SdrPathObj).
ALG: SdrGrafObj conversions complete, adding SdrOle2Obj converter. Using a shared helper which also creates the FullDragClone.
ALG: With the shared helper, text will be added anyways, so it will be available for interaction previews, too. Works in general, but there is a problem with the old MetaFile importer. ALG: Found, ImpSdrGDIMetaFileImport just can scale metafile actions when creating SdrObjects. Changed to break up using logic rect, then applying the original objects shear and scale to the created objects. ALG: Needed some time to find out how the target scale is set at that metafile import filter, but found at the end. Works now well. ALG: The MetaFile importter has a problem with text import, hunted down to setting the SvxAutoKernItem. Deactivated for now, have to ask hdu on monday.
ALG: Adapted places in SD where fill/line and other stuff is adapted depending on selected object, adapted context menu for OLE, too. ALG: Will need to do the same for calc, searching...
ALG: Some adaptions needed in SC, too. Activation centered, Attribute allowance, text for OLEs. Context menu ressource changed, but had no effect. Need to look deeper. Text is lost on export, not sure yet why. Taking a look.
ALG: Text in import/export was a hard issue. Exporting is easy, but where to add it to the hierarchy is not simple. OLEs are embedded in a <draw:frame> which contains a <draw:object> and a <draw:image> (the replacement image). My first idea was to add the text to <draw:frame> which also defines the geometry, but at import time text reading depends on xShape creation, and that is bound to <draw:object>. Adding the text to <draw:object> works well. ALG: Checked saving/loading with AOOo and OOo3.3, works well. OD offered me a identify reader which is part of SvXMLImport. This allows to close the last gap for fixing this bug: Correct all by OOo written files before OOo3.4 so that the fill and line attributes for OLEs get corrected at load time. Without this, the defaults of Blue8 and Hairline would be used. Added that code, added correction. ALG: Added correct initialisation of Line and Fill attributes for new OLE objects. This completes the roundtrip. ALG: Checked exchange between older and current (AOOo 3.4) version, works well. Still open is the context menu for calc. Taking a look...
ALG: Found context menu issue with Calc, works now. Re-checking all changes, adding more sophisticated comments.
Created attachment 76879 [details] Needed changes to have Line,Fill;Text, shear and rotate for OLEs, shear for GrafObjs
Committed as revision 1182166. Thanks!
Committed as r1182166. Thanks!