Issue 118485 - Styles for OLEs are not saved
Summary: Styles for OLEs are not saved
Status: CLOSED FIXED
Alias: None
Product: Draw
Classification: Application
Component: formatting (show other issues)
Version: 3.4.0 Beta (OOo)
Hardware: PC Windows 7
: P5 (lowest) Major (vote)
Target Milestone: ---
Assignee: Armin Le Grand
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-06 12:56 UTC by Armin Le Grand
Modified: 2017-05-20 10:30 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Needed changes to have Line,Fill;Text, shear and rotate for OLEs, shear for GrafObjs (60.16 KB, patch)
2011-10-10 16:32 UTC, Armin Le Grand
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Armin Le Grand 2011-10-06 12:56:31 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.
Comment 1 Armin Le Grand 2011-10-06 14:29:01 UTC
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...
Comment 2 Armin Le Grand 2011-10-06 15:43:09 UTC
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.
Comment 3 Armin Le Grand 2011-10-06 16:33:34 UTC
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...
Comment 4 Armin Le Grand 2011-10-07 08:33:04 UTC
ALG: Text input activation adapted. OLE activation adapted to be centered at the now evtl. sheared/rotated area. Works well. Looking for conversions...
Comment 5 Armin Le Grand 2011-10-07 09:25:10 UTC
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).
Comment 6 Armin Le Grand 2011-10-07 10:35:54 UTC
ALG: SdrGrafObj conversions complete, adding SdrOle2Obj converter. Using a shared helper which also creates the FullDragClone.
Comment 7 Armin Le Grand 2011-10-07 13:44:51 UTC
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.
Comment 8 Armin Le Grand 2011-10-07 14:14:46 UTC
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...
Comment 9 Armin Le Grand 2011-10-10 09:50:06 UTC
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.
Comment 10 Armin Le Grand 2011-10-10 15:40:41 UTC
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...
Comment 11 Armin Le Grand 2011-10-10 16:31:12 UTC
ALG: Found context menu issue with Calc, works now. Re-checking all changes, adding more sophisticated comments.
Comment 12 Armin Le Grand 2011-10-10 16:32:27 UTC
Created attachment 76879 [details]
Needed changes to have Line,Fill;Text, shear and rotate for OLEs, shear for GrafObjs
Comment 13 Pedro Giffuni 2011-10-12 01:31:56 UTC
Committed as revision 1182166.

Thanks!
Comment 14 Pedro Giffuni 2011-10-14 20:32:36 UTC
Committed as r1182166.

Thanks!