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&nbsp;. 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&nbsp;</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; ">&gt; To: [email protected]<br>&gt; From: Armin.Le.Gr=
[email protected]<br>&gt; Date: Wed, 13 Jul 2011 12:14:27 +0200<br>&gt; Subject:
  [dev] Re: Drawing Porblem about the OLE-Object (line, fill, shadow, ...=
)<br>&gt; <br>&gt; 	Hi Merlin (and limerlin, same person?),<br>&gt; <br>&=
gt; thanks for the bugdoc, I just confounded the state of the task (so ma=
ny<br>&gt; different ones :-)). Task<br>&gt; <br>&gt; http://openoffice.o=
rg/bugzilla/show_bug.cgi?id=3D67705<br>&gt; <br>&gt; is the correct one t=
o look at. bBehaveCompatibleToPaintVersion is there<br>&gt; since I prepa=
red the task's solution. It's currently true since after<br>&gt; some dis=
cussion with ODF guys there was no way to detect if older ODF<br>&gt; 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>&gt; code, but suppressed currently to stay compatible with old beha=
viour. As<br>&gt; described in the task this will have to wait until ODF1=
.2 and a safe<br>&gt; possibility to detect at load times if attributes f=
or OLE SdrObjects<br>&gt; need to be correc
 ted. Thus, currently it is by purpose and line and fill<br>&gt; style fo=
r OLEs is not supported.<br>&gt; <br>&gt; The bool is there to activate t=
he enhancement easily when that<br>&gt; distinction will be possible, so =
it's true to 'be compatible with the<br>&gt; paint version' intentional. =
It's a static bool to be able to switch it<br>&gt; for test purposes in d=
ebug code, this often comes handy when working on<br>&gt; the code.<br>&g=
t; <br>&gt; When You would switch it to false it will work for your case,=
 but all<br>&gt; ODF files which were created (or will be as people use o=
lder OOo<br>&gt; versions, too) will show OLEs filled with Blue7 and with=
 black hairlines<br>&gt; (what was the default), so this is no option.<br=
>&gt; <br>&gt; In your case it's a PPT import and it would be nice to swi=
tch on that<br>&gt; feature early since the problem is not there in that =
case (no old ODF<br>&gt; loaded). This would require to detect that the d=
ocument in memory was a<br>&gt; PPT impor
 t and no loaded ODF. This may be possible, but I would suggest<br>&gt; 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>&gt; but prepared.<br>&gt; <br>&gt; Sorry, no solution currently.<br>&=
gt; <br>&gt; Ah, and the OLE content is shown in both cases, with true an=
d false. I<br>&gt; initially thought we might have a problem with missing=
 OLE content, but<br>&gt; this works for me.<br>&gt; <br>&gt; Am 13.07.20=
11 04:27, schrieb limerlin:<br>&gt; &gt; hi ALG<br>&gt; &gt; <br>&gt; &gt=
; Thanks for your help.<br>&gt; &gt; The bugdoc is in the annex.<br>&gt; =
&gt; <br>&gt; &gt; <br>&gt; &gt; Best regards,<br>&gt; &gt; Merlin<br>&gt=
; &gt; <br>&gt; &gt; <br>&gt; &gt; <br>&gt; &gt;  &gt; To: dev@openoffice=
.org<br>&gt; &gt;  &gt; From: [email protected]<br>&gt; &gt;  &gt; Da=
te: Tue, 12 Jul 2011 16:52:33 +0200<br>&gt; &gt;  &gt; Subject: [dev] Re:=
 Drawing Porblem about the OLE-Object (li
 ne, fill, <br>&gt; &gt; shadow, ...)<br>&gt; &gt;  &gt;<br>&gt; &gt;  &g=
t; Am 12.07.2011 08:23, schrieb limerlin:<br>&gt; &gt;  &gt; &gt; Hi<br>&=
gt; &gt;  &gt; &gt;<br>&gt; &gt;  &gt; &gt;<br>&gt; &gt;  &gt; &gt; When =
i opened a MS PowerPoint file with OpenOffice,the fillings and<br>&gt; &g=
t;  &gt; &gt; lines of OLE-Object's area does not display. Following is w=
hat I found<br>&gt; &gt;  &gt; &gt; after error checking:<br>&gt; &gt;  &=
gt; &gt;<br>&gt; &gt;  &gt; &gt; http://openoffice.org/bugzilla/show_bug.=
cgi?id=3D67705<br>&gt; &gt;  &gt; &gt;<br>&gt; &gt;  &gt; &gt;<br>&gt; &g=
t;  &gt; &gt; then i read the source code and made following changes to s=
ee if it <br>&gt; &gt; works.<br>&gt; &gt;  &gt; &gt;<br>&gt; &gt;  &gt; =
&gt; http://svn.services.openof<br>&gt; &gt;  &gt; &gt; <br>&gt; &gt; fic=
e.org/opengrok/xref/Current%20(trunk)/svx/source/sdr/primitive2d/sdrole2p=
rimitive2d.cxx <br>&gt; &gt; <br>&gt; &gt;  &gt; &gt; <br>&gt; &gt; &lt;h=
ttp://svn.services.openoffice.org/opengrok/
 xref/Current%20(trunk)/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx=
&gt;<br>&gt; &gt;  &gt; &gt; at line 86<br>&gt; &gt;  &gt; &gt;<br>&gt; &=
gt;  &gt; &gt; 86 //*static* *bool* bB<br>&gt; &gt;  &gt; &gt; ehaveCompa=
tibleToPaintVersion <br>&gt; &gt; &lt;http://svn.services.openoffice.org/=
opengrok/s?defs=3DbBehaveCompatibleToPaintVersion&amp;project=3D/Current%=
20(trunk)&gt;(*true*);//delete<br>&gt; &gt;  &gt; &gt;<br>&gt; &gt;  &gt;=
 &gt;<br>&gt; &gt;  &gt; &gt;<br>&gt; &gt;  &gt; &gt; bool bBehaveCompati=
bleToPaintVersion<br>&gt; &gt;  &gt; &gt; <br>&gt; &gt; &lt;http://svn.se=
rvices.openoffice.org/opengrok/s?defs=3DbBehaveCompatibleToPaintVersion&a=
mp;project=3D/Current%20(trunk)&gt; <br>&gt; &gt; <br>&gt; &gt;  &gt; &gt=
; =3D false //add<br>&gt; &gt;  &gt; &gt;<br>&gt; &gt;  &gt; &gt; It work=
 well!<br>&gt; &gt;  &gt;<br>&gt; &gt;  &gt; Hi limerli n,<br>&gt; &gt;  =
&gt;<br>&gt; &gt;  &gt; the static bool bBehaveCompatibleToPaintVersion i=
s there to<br>&gt; &gt;  &gt; enable/disable adding
  graphical fill/line attributes if wanted. The<br>&gt; &gt;  &gt; backgr=
ound is that OLE SdrObjects in the old paint version (before<br>&gt; &gt;=
  &gt; changing to primitives) ignored the line and fill attributes which=
 are<br>&gt; &gt;  &gt; commonly defined for all SdrObjects. Sice these w=
ere ignored at paint<br>&gt; &gt;  &gt; time but set in the ItemSet of th=
e SdrObject (and saved in ODF over the<br>&gt; &gt;  &gt; UNO API) switch=
ing this on was critical for a period of time, especially<br>&gt; &gt;  &=
gt; for files saved before these attributes were corectly initialized for=
<br>&gt; &gt;  &gt; OLE SdrObjects. I'm not sure anymore when this was do=
ne, but you should<br>&gt; &gt;  &gt; not set it to false, this will ruin=
 functionality.<br>&gt; &gt;  &gt;<br>&gt; &gt;  &gt; When e.g. you defin=
e a new OLE and use the fill/line attributes (also<br>&gt; &gt;  &gt; sha=
dow), this will be ignored when switching the bool to false.<br>&gt; &gt;=
  &gt;<br>&gt; &gt;  &gt; As can be seen=20
 some lines after this:<br>&gt; &gt;  &gt; &lt; br&gt;&gt; // add graphic=
 content<br>&gt; &gt;  &gt; appendPrimitive2DSequenceToPrimitive2DSequenc=
e(aRetval, getOLEContent());<br>&gt; &gt;  &gt;<br>&gt; &gt;  &gt; the OL=
E graphic content is added after the line and fill primtives, so<br>&gt; =
&gt;  &gt; it should be painted above line and fill anyways.<br>&gt; &gt;=
  &gt;<br>&gt; &gt;  &gt; So: I cannot explain why the content is missing=
 when you switch the<br>&gt; &gt;  &gt; bool, but it is wrong to do so. I=
t will ruin used functionality.<br>&gt; &gt;  &gt;<br>&gt; &gt;  &gt; I w=
ould try to go in the direction to find out if getOLEContent() is<br>&gt;=
 &gt;  &gt; empty in your case and why.<br>&gt; &gt;  &gt;<br>&gt; &gt;  =
&gt; Is the bugdoc available somewhere? I would like to take a look...<br=
>&gt; &gt;  &gt;<br>&gt; &gt;  &gt; Regards,<br>&gt; &gt;  &gt; Armin<br>=
&gt; &gt;  &gt;<br>&gt; &gt;  &gt;<br>&gt; &gt;  &gt; &gt; How ever the l=
imited knowledge of openoffice confused m
 e that i dont<br>&gt; &gt;  &gt; &gt; know is it approiate to make those=
 changes.<br>&gt; &gt;  &gt; &gt;<br>&gt; &gt;  &gt; &gt; Anyone can help=
 me ?<br>&gt; &gt;  &gt; &gt;<br>&gt; &gt;  &gt; &gt; --<br>&gt; &gt;  &g=
t; &gt; Best regards,<br>&gt; &gt;  &gt; &gt; Merlin<br>&gt; &gt;  &gt; &=
gt;<br>&gt; &gt;  &gt; &gt;<br>&gt; &gt;  &gt; &gt;<br>&gt; &gt;  &gt; &g=
t;<br>&gt; &gt;  &gt; &gt;<br>&gt; &gt;  &gt; &gt;<br>&gt; &gt;  &gt; &gt=
;<br>&gt; &gt;  &gt; &gt;<br>&gt; &gt;  &gt;<br>&gt; &gt;  &gt; --<br>&gt=
; &gt;  &gt; ALG<br>&gt; &gt;  &gt;<br>&gt; &gt;  &gt; --<br>&gt; &gt;  &=
gt; -----------------------------------------------------------------<br>=
&gt; &gt;  &gt; To unsubscribe send email to [email protected]=
rg<br>&gt; &gt;  &gt; For additional commands send email to sympa@openoff=
ice.org<br>&gt; &gt;  &gt; with Subject: help<br>&gt; <br>&gt; <br>&gt; -=
- <br>&gt; --------------------------------------------------------------=
---<br>&gt; To unsubscribe send email to=20
 [email protected]<br>&gt; For additional commands send emai=
l to [email protected]<br>&gt; with Subject: help<br></div></div> 		 	=
   		  </div></body>
</html>
--_8add8c68-9e98-4bb3-8a38-a46e134010b7_--