To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=102061
                 Issue #|102061
                 Summary|sc: rfc: proposed cell anchoring and positioning mecha
                        |nism
               Component|Spreadsheet
                 Version|DEV300m48
                Platform|All
                     URL|
              OS/Version|Linux
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|PATCH
                Priority|P3
            Subcomponent|code
             Assigned to|nn
             Reported by|cmc





------- Additional comments from c...@openoffice.org Tue May 19 13:14:21 +0000 
2009 -------
So issue 28244 and others show some difficulty with cell anchored objects with
resizing of rows and columns. Especially when they are affected by collapsing
and expanding outlines where the sizes end up sort of "screwy" or the shapes end
up stuck to the top of the collapsed region even after re-expansion

The .odf format gives... 

"If a drawing shape is included in a spreadsheet document and if the anchor of
the shape is in a cell, then the attributes table:end-cell-address, table:end-x
and table:end-y specify the end position of the shape and the size attributes
are ignored. The end position is specified using the cell address of the cell in
which the end position is located, and the x and y coordinates of the end
position relative to the top left edge of the cell."

So I suggest we just associate an anchor object with all cell anchored cells
which describes the start and end cell which it belongs to and include in that
anchor object an offset from the start cell and the end cell. We make the
definition of being cell-anchored the presence of that anchor data, being
page-anchored otherwise. ScDrawObjData is basically used for something like this
already.

a) For non size and position protected objects inside a range that's collapsed
then we can restore the object's size on expand.
b) For size-protected objects we can restore it back to its original location
when that position is restored
c) Cache inside the anchor data the logicrect of the shape on the last update,
so we can distinguish between the shape being moved due to cell/row movement,
and being moved around the page.
d) Manual movement of the shape "breaks" the anchors and new ones are generated
from the position on the page
e) If inserted through the uno api (which only takes a single XCell as the
reference), or through xml that is missing the end-x/end-y values then we
generate the end anchors at insertion time but keep the start ones

The plus here is that
a) cell anchored objects, resizable + repositionable end up equivalent behaviour
as the excel move and size with cells
b) cell anchored objects, non-resizable + repositionable end up equivalent
behaviour as the excel move with cells

As a demo, I attach a .ods which on expansion of the outline should IMO end up
with three graphics all at the same visual y position

Some open questions though: 
a) a size and position protected cell-anchored object. That should be size and
position relative to the *page* protected right ?, i.e. not really any different
to page anchored in how it behaves ?
b) What have I forgotten ?, I haven't looked at fixing this up for RTL yet, so I
need to check that. But is there other things that need to be handled ?

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@sc.openoffice.org
For additional commands, e-mail: issues-h...@sc.openoffice.org


---------------------------------------------------------------------
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org

Reply via email to