thank u for your patient answer . It is helpful.

BTW ,Li is my surname.Best regards,Merlin

> To: dev@openoffice.org
> From: armin.le.gr...@me.com
> Date: Wed, 13 Jul 2011 12:14:27 +0200
> Subject: [dev] Re: Drawing Porblem about the OLE-Object (line, fill, shadow, 
> ...)
> 
>       Hi Merlin (and limerlin, same person?),
> 
> thanks for the bugdoc, I just confounded the state of the task (so many
> different ones :-)). Task
> 
> http://openoffice.org/bugzilla/show_bug.cgi?id=67705
> 
> is the correct one to look at. bBehaveCompatibleToPaintVersion is there
> since I prepared the task's solution. It's currently true since after
> some discussion with ODF guys there was no way to detect if older ODF
> files were saved (as explained) with wrong attributes for fill and line
> attributes. So the current state is that everything is prepared in the
> code, but suppressed currently to stay compatible with old behaviour. As
> described in the task this will have to wait until ODF1.2 and a safe
> possibility to detect at load times if attributes for OLE SdrObjects
> need to be corrected. Thus, currently it is by purpose and line and fill
> style for OLEs is not supported.
> 
> The bool is there to activate the enhancement easily when that
> distinction will be possible, so it's true to 'be compatible with the
> paint version' intentional. It's a static bool to be able to switch it
> for test purposes in debug code, this often comes handy when working on
> the code.
> 
> When You would switch it to false it will work for your case, but all
> ODF files which were created (or will be as people use older OOo
> versions, too) will show OLEs filled with Blue7 and with black hairlines
> (what was the default), so this is no option.
> 
> In your case it's a PPT import and it would be nice to switch on that
> feature early since the problem is not there in that case (no old ODF
> loaded). This would require to detect that the document in memory was a
> PPT import and no loaded ODF. This may be possible, but I would suggest
> to wait until the feature is completely finished with ODF1.2 at some
> time. Currently,fill and line style for OLEs is simply not supported,
> but prepared.
> 
> Sorry, no solution currently.
> 
> Ah, and the OLE content is shown in both cases, with true and false. I
> initially thought we might have a problem with missing OLE content, but
> this works for me.
> 
> Am 13.07.2011 04:27, schrieb limerlin:
> > hi ALG
> > 
> > Thanks for your help.
> > The bugdoc is in the annex.
> > 
> > 
> > Best regards,
> > Merlin
> > 
> > 
> > 
> >  > To: dev@openoffice.org
> >  > From: armin.le.gr...@me.com
> >  > Date: Tue, 12 Jul 2011 16:52:33 +0200
> >  > Subject: [dev] Re: Drawing Porblem about the OLE-Object (line, fill, 
> > shadow, ...)
> >  >
> >  > Am 12.07.2011 08:23, schrieb limerlin:
> >  > > Hi
> >  > >
> >  > >
> >  > > When i opened a MS PowerPoint file with OpenOffice,the fillings and
> >  > > lines of OLE-Object's area does not display. Following is what I found
> >  > > after error checking:
> >  > >
> >  > > http://openoffice.org/bugzilla/show_bug.cgi?id=67705
> >  > >
> >  > >
> >  > > then i read the source code and made following changes to see if it 
> > works.
> >  > >
> >  > > http://svn.services.openof
> >  > > 
> > fice.org/opengrok/xref/Current%20(trunk)/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx
> >  
> > 
> >  > > 
> > <http://svn.services.openoffice.org/opengrok/xref/Current%20(trunk)/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx>
> >  > > at line 86
> >  > >
> >  > > 86 //*static* *bool* bB
> >  > > ehaveCompatibleToPaintVersion 
> > <http://svn.services.openoffice.org/opengrok/s?defs=bBehaveCompatibleToPaintVersion&project=/Current%20(trunk)>(*true*);//delete
> >  > >
> >  > >
> >  > >
> >  > > bool bBehaveCompatibleToPaintVersion
> >  > > 
> > <http://svn.services.openoffice.org/opengrok/s?defs=bBehaveCompatibleToPaintVersion&project=/Current%20(trunk)>
> >  
> > 
> >  > > = false //add
> >  > >
> >  > > It work well!
> >  >
> >  > Hi limerli n,
> >  >
> >  > the static bool bBehaveCompatibleToPaintVersion is there to
> >  > enable/disable adding graphical fill/line attributes if wanted. The
> >  > background is that OLE SdrObjects in the old paint version (before
> >  > changing to primitives) ignored the line and fill attributes which are
> >  > commonly defined for all SdrObjects. Sice these were ignored at paint
> >  > time but set in the ItemSet of the SdrObject (and saved in ODF over the
> >  > UNO API) switching this on was critical for a period of time, especially
> >  > for files saved before these attributes were corectly initialized for
> >  > OLE SdrObjects. I'm not sure anymore when this was done, but you should
> >  > not set it to false, this will ruin functionality.
> >  >
> >  > When e.g. you define a new OLE and use the fill/line attributes (also
> >  > shadow), this will be ignored when switching the bool to false.
> >  >
> >  > As can be seen some lines after this:
> >  > < br>> // add graphic content
> >  > appendPrimitive2DSequenceToPrimitive2DSequence(aRetval, getOLEContent());
> >  >
> >  > the OLE graphic content is added after the line and fill primtives, so
> >  > it should be painted above line and fill anyways.
> >  >
> >  > So: I cannot explain why the content is missing when you switch the
> >  > bool, but it is wrong to do so. It will ruin used functionality.
> >  >
> >  > I would try to go in the direction to find out if getOLEContent() is
> >  > empty in your case and why.
> >  >
> >  > Is the bugdoc available somewhere? I would like to take a look...
> >  >
> >  > Regards,
> >  > Armin
> >  >
> >  >
> >  > > How ever the limited knowledge of openoffice confused me that i dont
> >  > > know is it approiate to make those changes.
> >  > >
> >  > > Anyone can help me ?
> >  > >
> >  > > --
> >  > > Best regards,
> >  > > Merlin
> >  > >
> >  > >
> >  > >
> >  > >
> >  > >
> >  > >
> >  > >
> >  > >
> >  >
> >  > --
> >  > ALG
> >  >
> >  > --
> >  > -----------------------------------------------------------------
> >  > To unsubscribe send email to dev-unsubscr...@openoffice.org
> >  > For additional commands send email to sy...@openoffice.org
> >  > with Subject: help
> 
> 
> -- 
> -----------------------------------------------------------------
> To unsubscribe send email to dev-unsubscr...@openoffice.org
> For additional commands send email to sy...@openoffice.org
> with Subject: help
                                          -- 
-----------------------------------------------------------------
To unsubscribe send email to dev-unsubscr...@openoffice.org
For additional commands send email to sy...@openoffice.org
with Subject: help

Reply via email to