You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Regina Henschel <rb...@t-online.de> on 2014/10/09 17:34:19 UTC

Complex content inside shapes

Hi all,

LibreOffice has implemented the ability for complex content in shapes. I 
would not bother you with this, but it will result in requests for 
ODF1.3. Therefore I ask you to have a look and help me to form an opinion.

[1] http://vmiklos.hu/blog/textbox.html
[2] 
https://wiki.documentfoundation.org/ReleaseNotes/4.4#Shapes_can_have_a_TextBox
[3] https://bugs.freedesktop.org/show_bug.cgi?id=70942
[4] 
http://lists.freedesktop.org/archives/libreoffice/2014-October/063831.html

Kind regards
Regina

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: Complex content inside shapes

Posted by Regina Henschel <rb...@t-online.de>.
Hi Dennis,

Dennis E. Hamilton schrieb:
> Regina,
>
> Here is my question:
>
> 	What about the <draw:text-box> shape, which can contain any
> 	sequence of text-content elements, including <table:table>
>       in ODF 1.2 already?
>
> It seems to me that a custom shape is not required at all.
>
> Since <draw:text-box> can appear anywhere any shape element can appear, is there not enough flexibility there?  I see it in <draw:g> and <draw:frame>, for example, and in other places where <draw:text-box> is allowed as a specific case.

The custom-shape is already there in import of a .docx file. The 
implementation in LibreOffice is the result of an interoperability 
problem with .docx. MS Office allows to add a textfield into a 
custom-shape. It produces a:graphic > a:graphicData > wps:wps > wps:txbx 
 > w:txbxContent > w:tbl (which is the table). So the problem is to find 
a good way to transform this OOXML construction to ODF.

Kind regards
Regina


>
>   - Dennis
>
> -----Original Message-----
> From: Regina Henschel [mailto:rb.henschel@t-online.de]
> Sent: Thursday, October 9, 2014 14:53
> To: dev@openoffice.apache.org
> Subject: Re: Complex content inside shapes
>
> [ ... ]
>
> Is the idea to allow <table:table> as child of <draw:custom-shape> and
> other shapes worth supporting?
>
> Kind regards
> Regina
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: dev-help@openoffice.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: dev-help@openoffice.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


RE: Complex content inside shapes

Posted by "Dennis E. Hamilton" <de...@acm.org>.
Regina,

Here is my question:

	What about the <draw:text-box> shape, which can contain any 
	sequence of text-content elements, including <table:table>
     in ODF 1.2 already?

It seems to me that a custom shape is not required at all.

Since <draw:text-box> can appear anywhere any shape element can appear, is there not enough flexibility there?  I see it in <draw:g> and <draw:frame>, for example, and in other places where <draw:text-box> is allowed as a specific case.

 - Dennis

-----Original Message-----
From: Regina Henschel [mailto:rb.henschel@t-online.de] 
Sent: Thursday, October 9, 2014 14:53
To: dev@openoffice.apache.org
Subject: Re: Complex content inside shapes

[ ... ]

Is the idea to allow <table:table> as child of <draw:custom-shape> and 
other shapes worth supporting?

Kind regards
Regina





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: Complex content inside shapes

Posted by Oliver-Rainer Wittmann <or...@googlemail.com>.
Hi,

On 09.10.2014 23:53, Regina Henschel wrote:
> Hi Dennis,
>
> comments below.
>
> Dennis E. Hamilton schrieb:
>> Hi Regina,
>>
>> <orcnote> below,
>>
>> -----Original Message-----
>> From: Regina Henschel [mailto:rb.henschel@t-online.de]
>> Sent: Thursday, October 9, 2014 08:34
>> To: AOO dev
>> Subject: Complex content inside shapes
>>
>> Hi all,
>>
>> LibreOffice has implemented the ability for complex content in shapes. I
>> would not bother you with this, but it will result in requests for
>> ODF1.3. Therefore I ask you to have a look and help me to form an
>> opinion.
>>
>> [1] http://vmiklos.hu/blog/textbox.html
>> [2]
>> https://wiki.documentfoundation.org/ReleaseNotes/4.4#Shapes_can_have_a_TextBox
>>
>> [3] https://bugs.freedesktop.org/show_bug.cgi?id=70942
>> [4]
>> http://lists.freedesktop.org/archives/libreoffice/2014-October/063831.html
>>
>>
>> <orcnote>
>>     Can you say more on how you think this is already possible
>>     in ODF 1.2 without any required change?  Or are you saying
>>     there is an implementation-defined case already available
>>     under ODF 1.2?
>>
>>     In the second case, it would seem simpler to agree on a
>>     shared implementation-defined (and public) definition than
>>     to expect incorporation in a new ODF specification.  For one
>>     thing, that doesn't do anything for ODF 1.2-conforming documents.
>>
>>     Did the LibreOffice extension presume to reuse an OASIS namespace
>>     or was it done properly with a well-defined foreign extension?
>
> (1)
> I became aware of the problem with
> https://issues.oasis-open.org/browse/OFFICE-3864. In the meantime the
> developer found another way to track, whether the shape has "complex"
> content. So the request for a new attribute has been (or will be?)
> canceled. But he is not really satisfied with the solution.
>
> (2)
> When a custom shape contains a table then LibreOffice currently writes e.g.
> <draw:custom-shape ...>
>       <table:table...>
>          ...
>       </table>
>       <text:p ...>
>          ...
>       </text:p>
>       <draw:enhanced-geometry ...>
> ...
> </draw:custom-shape>
>
> This solution is not valid in ODF1.2. A construction of the kind
> <draw:custom-shape>
> ...
>     <text:p>
>         <draw:frame>
>            <table:table>
>                 ...
>            </table:table>
>         </draw:frame>
>     </text:p>
> ...
> </draw:custom-shape>
> would be valid.
>
> In normal texts <table:table> and <text:p> are both allowed as child of
> <office:text>. Here a <table:table> element in a <draw:frame> has a
> different meaning, because its outside the text flow. But inside a shape
> the table is already outside the text flow and putting it into a
> <draw:frame> would not add restrictions.
>
> The comment of the developer is in
> https://bugs.freedesktop.org/show_bug.cgi?id=84714#c1. He suggests to
> write loext:table till the proposal of <table:table> as child of
> <draw:custom-shape> is accepted. He dislikes "fake" use of
> <text:p><draw:frame> as wrapper. In addition he mentioned in the
> discussion [4] on the mailing list, that because LibreOffice (and same
> OpenOffice) use a SAX parser, it can not easily be detected, whether
> elements exist or not exists in a sub-tree of the XML tree. I'm not able
> to judge this.
>
> Is the idea to allow <table:table> as child of <draw:custom-shape> and
> other shapes worth supporting?
>

Just a short feedback regarding the ODF without having gone through the 
details:
As <draw:custom-shape> already allows <text:p> and <text:list> as childs 
I currently do not see an objection to not allow <table:table>, too.
This should be discussed in the OASIS ODF TC and I am sure that soon a 
corresponding discussion will be started from one of the LibreOffice/TDF 
representatives.


Best regards, Oliver.


P.S.: I will be on vacation from 2014-10-11 until 2014-10-27

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: Complex content inside shapes

Posted by Armin Le Grand <Ar...@me.com>.
     Hi,

On 09.10.2014 23:53, Regina Henschel wrote:
> (1)
> I became aware of the problem with 
> https://issues.oasis-open.org/browse/OFFICE-3864. In the meantime the 
> developer found another way to track, whether the shape has "complex" 
> content. So the request for a new attribute has been (or will be?) 
> canceled. But he is not really satisfied with the solution.
>
> (2)
> When a custom shape contains a table then LibreOffice currently writes 
> e.g.
> <draw:custom-shape ...>
>      <table:table...>
>         ...
>      </table>
>      <text:p ...>
>         ...
>      </text:p>
>      <draw:enhanced-geometry ...>
> ...
> </draw:custom-shape>
>
> This solution is not valid in ODF1.2. A construction of the kind
> <draw:custom-shape>
> ...
>    <text:p>
>        <draw:frame>
>           <table:table>
>                ...
>           </table:table>
>        </draw:frame>
>    </text:p>
> ...
> </draw:custom-shape>
> would be valid.
>
> In normal texts <table:table> and <text:p> are both allowed as child 
> of <office:text>. Here a <table:table> element in a <draw:frame> has a 
> different meaning, because its outside the text flow. But inside a 
> shape the table is already outside the text flow and putting it into a 
> <draw:frame> would not add restrictions.

I would prefer this - it expresses what happens.

I see more problems in this solution being a 'special' solution for draw 
objects in Writer only - because AFAIK (understood) it associates a draw 
shape (SdrShape) with a writer frame pretty much directly internal. This 
has some consequences:

- Will only work in Writer
- ODF parts describing shapes using this will not be copyable to ODF of 
other apps
- copy/paste of those shapes between apps will be (very) problematic

Some years ago there was the general idea to use writer incarnations 
instead of the EditEngine in general for text in text objects, with the 
main goal to allow complex text content there. I would definitely prefer 
such a more general solution which would work out of the box in all apps 
with all shapes and would use a unified solutiuon for ODF (whichever 
one, but a single one). I see the motivation to do a quick solution for 
the problem which needs to be solved, but I recommend to think about the 
more general possible solution. In the mid to long term this solution 
may be in the way later.

 From this perspective the most urgent requirement from my POV is that 
the ODF solution should be usable for this more common case in the 
future, too. It should/must be usable in general to embed Writer-styled 
text to draw objects in all apps.

Just my 2 cents...
Sincerely,
     Armin

>
> The comment of the developer is in 
> https://bugs.freedesktop.org/show_bug.cgi?id=84714#c1. He suggests to 
> write loext:table till the proposal of <table:table> as child of 
> <draw:custom-shape> is accepted. He dislikes "fake" use of 
> <text:p><draw:frame> as wrapper. In addition he mentioned in the 
> discussion [4] on the mailing list, that because LibreOffice (and same 
> OpenOffice) use a SAX parser, it can not easily be detected, whether 
> elements exist or not exists in a sub-tree of the XML tree. I'm not 
> able to judge this.
>
> Is the idea to allow <table:table> as child of <draw:custom-shape> and 
> other shapes worth supporting?
>
> Kind regards
> Regina
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: dev-help@openoffice.apache.org
>
--
ALG

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: Complex content inside shapes

Posted by Regina Henschel <rb...@t-online.de>.
Hi Dennis,

comments below.

Dennis E. Hamilton schrieb:
> Hi Regina,
>
> <orcnote> below,
>
> -----Original Message-----
> From: Regina Henschel [mailto:rb.henschel@t-online.de]
> Sent: Thursday, October 9, 2014 08:34
> To: AOO dev
> Subject: Complex content inside shapes
>
> Hi all,
>
> LibreOffice has implemented the ability for complex content in shapes. I
> would not bother you with this, but it will result in requests for
> ODF1.3. Therefore I ask you to have a look and help me to form an opinion.
>
> [1] http://vmiklos.hu/blog/textbox.html
> [2]
> https://wiki.documentfoundation.org/ReleaseNotes/4.4#Shapes_can_have_a_TextBox
> [3] https://bugs.freedesktop.org/show_bug.cgi?id=70942
> [4]
> http://lists.freedesktop.org/archives/libreoffice/2014-October/063831.html
>
> <orcnote>
> 	Can you say more on how you think this is already possible
> 	in ODF 1.2 without any required change?  Or are you saying
> 	there is an implementation-defined case already available
> 	under ODF 1.2?
>
> 	In the second case, it would seem simpler to agree on a
> 	shared implementation-defined (and public) definition than
> 	to expect incorporation in a new ODF specification.  For one
> 	thing, that doesn't do anything for ODF 1.2-conforming documents.
>
> 	Did the LibreOffice extension presume to reuse an OASIS namespace
> 	or was it done properly with a well-defined foreign extension?

(1)
I became aware of the problem with 
https://issues.oasis-open.org/browse/OFFICE-3864. In the meantime the 
developer found another way to track, whether the shape has "complex" 
content. So the request for a new attribute has been (or will be?) 
canceled. But he is not really satisfied with the solution.

(2)
When a custom shape contains a table then LibreOffice currently writes e.g.
<draw:custom-shape ...>
      <table:table...>
         ...
      </table>
      <text:p ...>
         ...
      </text:p>
      <draw:enhanced-geometry ...>
...
</draw:custom-shape>

This solution is not valid in ODF1.2. A construction of the kind
<draw:custom-shape>
...
    <text:p>
        <draw:frame>
           <table:table>
                ...
           </table:table>
        </draw:frame>
    </text:p>
...
</draw:custom-shape>
would be valid.

In normal texts <table:table> and <text:p> are both allowed as child of 
<office:text>. Here a <table:table> element in a <draw:frame> has a 
different meaning, because its outside the text flow. But inside a shape 
the table is already outside the text flow and putting it into a 
<draw:frame> would not add restrictions.

The comment of the developer is in 
https://bugs.freedesktop.org/show_bug.cgi?id=84714#c1. He suggests to 
write loext:table till the proposal of <table:table> as child of 
<draw:custom-shape> is accepted. He dislikes "fake" use of 
<text:p><draw:frame> as wrapper. In addition he mentioned in the 
discussion [4] on the mailing list, that because LibreOffice (and same 
OpenOffice) use a SAX parser, it can not easily be detected, whether 
elements exist or not exists in a sub-tree of the XML tree. I'm not able 
to judge this.

Is the idea to allow <table:table> as child of <draw:custom-shape> and 
other shapes worth supporting?

Kind regards
Regina





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


RE: Complex content inside shapes

Posted by "Dennis E. Hamilton" <de...@acm.org>.
Hi Regina,

<orcnote> below,

-----Original Message-----
From: Regina Henschel [mailto:rb.henschel@t-online.de] 
Sent: Thursday, October 9, 2014 08:34
To: AOO dev
Subject: Complex content inside shapes

Hi all,

LibreOffice has implemented the ability for complex content in shapes. I 
would not bother you with this, but it will result in requests for 
ODF1.3. Therefore I ask you to have a look and help me to form an opinion.

[1] http://vmiklos.hu/blog/textbox.html
[2] 
https://wiki.documentfoundation.org/ReleaseNotes/4.4#Shapes_can_have_a_TextBox
[3] https://bugs.freedesktop.org/show_bug.cgi?id=70942
[4] 
http://lists.freedesktop.org/archives/libreoffice/2014-October/063831.html

<orcnote>
	Can you say more on how you think this is already possible 
	in ODF 1.2 without any required change?  Or are you saying 
	there is an implementation-defined case already available
	under ODF 1.2?

	In the second case, it would seem simpler to agree on a 
	shared implementation-defined (and public) definition than 
	to expect incorporation in a new ODF specification.  For one 
	thing, that doesn't do anything for ODF 1.2-conforming documents.

	Did the LibreOffice extension presume to reuse an OASIS namespace 
	or was it done properly with a well-defined foreign extension?

 	- Dennis
</orcnote>

Kind regards
Regina

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org