https://bugs.documentfoundation.org/show_bug.cgi?id=161555

--- Comment #6 from Regina Henschel <rb.hensc...@t-online.de> ---
I admit that a solution for more than two shapes with the UI is too complex. A
solution using macros is also complex because the required methods from basegfx
are not available in macros but only the .uno commands can be used if you do
not want to emulate the methods from basegfx as macro methods. Problems with
the intersect and subtract .uno commands are: the shapes need to be inserted in
a page, they relay on z-order, they work with a marked objects collection 
on the view.

So I now think, it is a valid feature request. 

(In reply to Eyal Rozenberg from comment #5)
> Really? Please sketch out the code for that macro. For the general case of N
> shapes of course.

An algorithm looks straight forward to me in principle, but details are
complex:

Copy first shape from collection into result vector.
for each shape in collection starting with second shape
do
  prepare temp vector
  current shape = next shape from collection.
  for each shape of result vector
  do 
    subtract current shape from result vector shape and add this subtraction to
temp vector.
  for each shape of result vector
  do
    subtract result vector shape from current shape and add this subtraction to
temp vector.
  for each shape of result vector
  do
    intersect current shape with result vector shape and add this intersection
to temp vector.
  replace result vector with temp vector.
next
return result vector

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to