Re: Drawing Porblem about the OLE-Object (line, fill, shadow, ...)
limerlin <[email protected]> Thu, 14 Jul 2011 07:40:56 +0000
| Newsgroups | gmane.comp.openoffice.devel.general |
|---|---|
| Message-ID | <[email protected]> |
--_8add8c68-9e98-4bb3-8a38-a46e134010b7_ Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable thank u for your patient answer . It is helpful. BTW ,Li is my surname.Best regards,Merlin > To: [email protected] > From: [email protected] > Date: Wed, 13 Jul 2011 12:14:27 +0200 > Subject: [dev] Re: Drawing Porblem about the OLE-Object (line, fill, sh= adow, ...) >=20 > Hi Merlin (and limerlin, same person?), >=20 > thanks for the bugdoc, I just confounded the state of the task (so many > different ones :-)). Task >=20 > http://openoffice.org/bugzilla/show_bug.cgi?id=3D67705 >=20 > 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. A= s > 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 fil= l > style for OLEs is not supported. >=20 > 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. >=20 > 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 hairline= s > (what was the default), so this is no option. >=20 > 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. >=20 > Sorry, no solution currently. >=20 > 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. >=20 > Am 13.07.2011 04:27, schrieb limerlin: > > hi ALG > >=20 > > Thanks for your help. > > The bugdoc is in the annex. > >=20 > >=20 > > Best regards, > > Merlin > >=20 > >=20 > >=20 > > > To: [email protected] > > > From: [email protected] > > > Date: Tue, 12 Jul 2011 16:52:33 +0200 > > > Subject: [dev] Re: Drawing Porblem about the OLE-Object (line, fil= l,=20 > > 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=3D67705 > > > > > > > > > > > > then i read the source code and made following changes to see if= it=20 > > works. > > > > > > > > http://svn.services.openof > > > >=20 > > fice.org/opengrok/xref/Current%20(trunk)/svx/source/sdr/primitive2d/s= drole2primitive2d.cxx=20 > >=20 > > > >=20 > > <http://svn.services.openoffice.org/opengrok/xref/Current%20(trunk)/s= vx/source/sdr/primitive2d/sdrole2primitive2d.cxx> > > > > at line 86 > > > > > > > > 86 //*static* *bool* bB > > > > ehaveCompatibleToPaintVersion=20 > > <http://svn.services.openoffice.org/opengrok/s?defs=3DbBehaveCompatib= leToPaintVersion&project=3D/Current%20(trunk)>(*true*);//delete > > > > > > > > > > > > > > > > bool bBehaveCompatibleToPaintVersion > > > >=20 > > <http://svn.services.openoffice.org/opengrok/s?defs=3DbBehaveCompatib= leToPaintVersion&project=3D/Current%20(trunk)>=20 > >=20 > > > > =3D false //add > > > > > > > > It work well! > > > > > > Hi limerli n, > > > > > > the static bool bBehaveCompatibleToPaintVersion is there to > > > enable/disable adding graphical fill/line attributes if wanted. Th= e > > > 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 pa= int > > > time but set in the ItemSet of the SdrObject (and saved in ODF ove= r the > > > UNO API) switching this on was critical for a period of time, espe= cially > > > for files saved before these attributes were corectly initialized = for > > > OLE SdrObjects. I'm not sure anymore when this was done, but you s= hould > > > not set it to false, this will ruin functionality. > > > > > > When e.g. you define a new OLE and use the fill/line attributes (a= lso > > > 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, getOLECont= ent()); > > > > > > 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 th= e > > > 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 [email protected] > > > For additional commands send email to [email protected] > > > with Subject: help >=20 >=20 > --=20 > ----------------------------------------------------------------- > To unsubscribe send email to [email protected] > For additional commands send email to [email protected] > with Subject: help --=20 ----------------------------------------------------------------- To unsubscribe send email to [email protected] For additional commands send email to [email protected] with Subject: help --_8add8c68-9e98-4bb3-8a38-a46e134010b7_ Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable <html> <head> <style><!-- .hmmessage P { margin:0px; padding:0px } body.hmmessage { font-size: 10pt; font-family:=CE=A2=C8=ED=D1=C5=BA=DA } --></style> </head> <body class=3D'hmmessage'><div dir=3D'ltr'> <font class=3D"Apple-style-span" face=3D"=CE=A2=C8=ED=D1=C5=BA=DA" size=3D= "2">thank u for your patient answer . It is helpful.</font><div><fon= t class=3D"Apple-style-span" face=3D"=CE=A2=C8=ED=D1=C5=BA=DA" size=3D"2"= ><br></font></div><div><font class=3D"Apple-style-span" face=3D"=CE=A2=C8= =ED=D1=C5=BA=DA" size=3D"2"><br></font><font class=3D"Apple-style-span" s= ize=3D"2">BTW ,Li is </font><span class=3D"ecxApple-style-span" styl= e=3D"color: rgb(42, 42, 42); font-family: Verdana, Simsun, Tahoma, Arial,= sans-serif; "><span class=3D"Apple-style-span" style=3D"font-family: Ari= al; line-height: 24px; white-space: pre-wrap; color: rgb(0, 0, 0); "><fon= t class=3D"Apple-style-span" size=3D"2">my surname.</font></span><pre sty= le=3D"font-size: 12px; line-height: 20px; white-space: normal; "><br styl= e=3D"line-height:20px">Best regards,<br style=3D"line-height:20px">Merlin= </pre></span><br><br><div style=3D"font-family: =CE=A2=C8=ED=D1=C5=BA=DA;= font-size: 10pt; ">> To: [email protected]<br>> From: Armin.Le.Gr= [email protected]<br>> Date: Wed, 13 Jul 2011 12:14:27 +0200<br>> Subject: [dev] Re: Drawing Porblem about the OLE-Object (line, fill, shadow, ...= )<br>> <br>> Hi Merlin (and limerlin, same person?),<br>> <br>&= gt; thanks for the bugdoc, I just confounded the state of the task (so ma= ny<br>> different ones :-)). Task<br>> <br>> http://openoffice.o= rg/bugzilla/show_bug.cgi?id=3D67705<br>> <br>> is the correct one t= o look at. bBehaveCompatibleToPaintVersion is there<br>> since I prepa= red the task's solution. It's currently true since after<br>> some dis= cussion with ODF guys there was no way to detect if older ODF<br>> fil= es were saved (as explained) with wrong attributes for fill and line<br>&= gt; attributes. So the current state is that everything is prepared in th= e<br>> code, but suppressed currently to stay compatible with old beha= viour. As<br>> described in the task this will have to wait until ODF1= .2 and a safe<br>> possibility to detect at load times if attributes f= or OLE SdrObjects<br>> need to be correc ted. Thus, currently it is by purpose and line and fill<br>> style fo= r OLEs is not supported.<br>> <br>> The bool is there to activate t= he enhancement easily when that<br>> distinction will be possible, so = it's true to 'be compatible with the<br>> paint version' intentional. = It's a static bool to be able to switch it<br>> for test purposes in d= ebug code, this often comes handy when working on<br>> the code.<br>&g= t; <br>> When You would switch it to false it will work for your case,= but all<br>> ODF files which were created (or will be as people use o= lder OOo<br>> versions, too) will show OLEs filled with Blue7 and with= black hairlines<br>> (what was the default), so this is no option.<br= >> <br>> In your case it's a PPT import and it would be nice to swi= tch on that<br>> feature early since the problem is not there in that = case (no old ODF<br>> loaded). This would require to detect that the d= ocument in memory was a<br>> PPT impor t and no loaded ODF. This may be possible, but I would suggest<br>> t= o wait until the feature is completely finished with ODF1.2 at some<br>&g= t; time. Currently,fill and line style for OLEs is simply not supported,<= br>> but prepared.<br>> <br>> Sorry, no solution currently.<br>&= gt; <br>> Ah, and the OLE content is shown in both cases, with true an= d false. I<br>> initially thought we might have a problem with missing= OLE content, but<br>> this works for me.<br>> <br>> Am 13.07.20= 11 04:27, schrieb limerlin:<br>> > hi ALG<br>> > <br>> >= ; Thanks for your help.<br>> > The bugdoc is in the annex.<br>> = > <br>> > <br>> > Best regards,<br>> > Merlin<br>>= ; > <br>> > <br>> > <br>> > > To: dev@openoffice= .org<br>> > > From: [email protected]<br>> > > Da= te: Tue, 12 Jul 2011 16:52:33 +0200<br>> > > Subject: [dev] Re:= Drawing Porblem about the OLE-Object (li ne, fill, <br>> > shadow, ...)<br>> > ><br>> > &g= t; Am 12.07.2011 08:23, schrieb limerlin:<br>> > > > Hi<br>&= gt; > > ><br>> > > ><br>> > > > When = i opened a MS PowerPoint file with OpenOffice,the fillings and<br>> &g= t; > > lines of OLE-Object's area does not display. Following is w= hat I found<br>> > > > after error checking:<br>> > &= gt; ><br>> > > > http://openoffice.org/bugzilla/show_bug.= cgi?id=3D67705<br>> > > ><br>> > > ><br>> &g= t; > > then i read the source code and made following changes to s= ee if it <br>> > works.<br>> > > ><br>> > > = > http://svn.services.openof<br>> > > > <br>> > fic= e.org/opengrok/xref/Current%20(trunk)/svx/source/sdr/primitive2d/sdrole2p= rimitive2d.cxx <br>> > <br>> > > > <br>> > <h= ttp://svn.services.openoffice.org/opengrok/ xref/Current%20(trunk)/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx= ><br>> > > > at line 86<br>> > > ><br>> &= gt; > > 86 //*static* *bool* bB<br>> > > > ehaveCompa= tibleToPaintVersion <br>> > <http://svn.services.openoffice.org/= opengrok/s?defs=3DbBehaveCompatibleToPaintVersion&project=3D/Current%= 20(trunk)>(*true*);//delete<br>> > > ><br>> > >= ><br>> > > ><br>> > > > bool bBehaveCompati= bleToPaintVersion<br>> > > > <br>> > <http://svn.se= rvices.openoffice.org/opengrok/s?defs=3DbBehaveCompatibleToPaintVersion&a= mp;project=3D/Current%20(trunk)> <br>> > <br>> > > >= ; =3D false //add<br>> > > ><br>> > > > It work= well!<br>> > ><br>> > > Hi limerli n,<br>> > = ><br>> > > the static bool bBehaveCompatibleToPaintVersion i= s there to<br>> > > enable/disable adding graphical fill/line attributes if wanted. The<br>> > > backgr= ound is that OLE SdrObjects in the old paint version (before<br>> >= > changing to primitives) ignored the line and fill attributes which= are<br>> > > commonly defined for all SdrObjects. Sice these w= ere ignored at paint<br>> > > time but set in the ItemSet of th= e SdrObject (and saved in ODF over the<br>> > > UNO API) switch= ing this on was critical for a period of time, especially<br>> > &= gt; for files saved before these attributes were corectly initialized for= <br>> > > OLE SdrObjects. I'm not sure anymore when this was do= ne, but you should<br>> > > not set it to false, this will ruin= functionality.<br>> > ><br>> > > When e.g. you defin= e a new OLE and use the fill/line attributes (also<br>> > > sha= dow), this will be ignored when switching the bool to false.<br>> >= ><br>> > > As can be seen=20 some lines after this:<br>> > > < br>> // add graphic= content<br>> > > appendPrimitive2DSequenceToPrimitive2DSequenc= e(aRetval, getOLEContent());<br>> > ><br>> > > the OL= E graphic content is added after the line and fill primtives, so<br>> = > > it should be painted above line and fill anyways.<br>> >= ><br>> > > So: I cannot explain why the content is missing= when you switch the<br>> > > bool, but it is wrong to do so. I= t will ruin used functionality.<br>> > ><br>> > > I w= ould try to go in the direction to find out if getOLEContent() is<br>>= > > empty in your case and why.<br>> > ><br>> > = > Is the bugdoc available somewhere? I would like to take a look...<br= >> > ><br>> > > Regards,<br>> > > Armin<br>= > > ><br>> > ><br>> > > > How ever the l= imited knowledge of openoffice confused m e that i dont<br>> > > > know is it approiate to make those= changes.<br>> > > ><br>> > > > Anyone can help= me ?<br>> > > ><br>> > > > --<br>> > &g= t; > Best regards,<br>> > > > Merlin<br>> > > &= gt;<br>> > > ><br>> > > ><br>> > > &g= t;<br>> > > ><br>> > > ><br>> > > >= ;<br>> > > ><br>> > ><br>> > > --<br>>= ; > > ALG<br>> > ><br>> > > --<br>> > &= gt; -----------------------------------------------------------------<br>= > > > To unsubscribe send email to [email protected]= rg<br>> > > For additional commands send email to sympa@openoff= ice.org<br>> > > with Subject: help<br>> <br>> <br>> -= - <br>> --------------------------------------------------------------= ---<br>> To unsubscribe send email to=20 [email protected]<br>> For additional commands send emai= l to [email protected]<br>> with Subject: help<br></div></div> = </div></body> </html> --_8add8c68-9e98-4bb3-8a38-a46e134010b7_--