Bug Hunting Session
Bug 124329 - Published attribute of shapes in sheets regarding the now 3 anchoring types is missing
Summary: Published attribute of shapes in sheets regarding the now 3 anchoring types i...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
6.1.2.1 release
Hardware: All All
: medium normal
Assignee: Samuel Mehrbrodt (CIB)
URL:
Whiteboard: target:6.3.0 target:6.1.6 target:6.2.4
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-25 21:29 UTC by Wolfgang Jäger
Modified: 2019-08-05 06:25 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Made for demonstrating the lack of the new property ResizeWithCell in the BASIC IDE in V6.2.5release x86 (10.88 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-08-04 10:56 UTC, Wolfgang Jäger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Jäger 2019-03-25 21:29:39 UTC
Concerning the API for shapes inserted into spreadsheets ("com.sun.star.comp.sc.ScShapeObj" supporting the service "com.sun.star.sheet.Shape"):

Older versions of LibO only knew 2 types of anchoring a shape in a spreadsheet:
-1- To the page
-2- To a cell
The types were distinguished by the .Anchor property which always was basically a SheetCellRange, but was a complete spreadsheet (ScTableSheetObj) in the first case, and a single cell (ScCellObj) in the second.  

Now there are three types of anchoring, but the anchor still can only be of the two mentioned types. An additional PUBLISHED (and not read-only) property distinguishing the anchor settings 'To Cell' and 'To Cell (resize with cell)' should offer a way for users to ask for the new anchoring subtypes and to set it if needed.
Comment 1 Eike Rathke 2019-03-27 17:05:56 UTC
@Samuel: could that be solved in a compatible way, like having a ScCellRangeObj with start and end cell for cell-resize?

Additionally SCA_CELL_RESIZE needs to be handled in sc/source/ui/unoobj/shapeuno.cxx ScShapeObj::setPropertyValue() and ScShapeObj::getPropertyValue() along with the cases for SCA_CELL under SC_UNONAME_HORIPOS and SC_UNONAME_VERTPOS.
Comment 2 Wolfgang Jäger 2019-03-27 20:36:25 UTC
Why isn't it possible to introduce a property .AnchorType for ScShapeObj as it already exists for SwXShape?
Comment 3 Samuel Mehrbrodt (CIB) 2019-03-28 07:32:57 UTC
I would also be in favor of something like AnchorType to keep things simple and understandable.
But this of course needs to be checked if it can be done backwards compatible.
Comment 4 Commit Notification 2019-04-02 07:48:56 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/e587645f551c6c684f9f36606f8fa5e1b06004a1%5E%21

Related tdf#124329 Handle shapes resizing with the cell

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2019-04-02 12:58:56 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/823c77a98ffbc1c819a81687ca7e13d91277bca5%5E%21

tdf#124329 Add API to make cell anchored graphic resize with cell

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2019-04-02 13:04:04 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/8603d7029b0d62032a5c9d2e039117799be9e798%5E%21

tdf#124329 Test setting ResizeWithCell via UNO API

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2019-04-02 13:05:32 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/c8e1f2fb1e5576dd85a1172d064480734e21d96e%5E%21

tdf#124329 Keep ResizeWithCell value when anchoring to a different cell

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2019-04-08 11:45:49 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

https://git.libreoffice.org/core/+/c45f22ce7c1560ec2deddc90a71da062d803f15d%5E%21

Related tdf#124329 Handle shapes resizing with the cell

It will be available in 6.1.6.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2019-04-08 11:46:03 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/acc33b803ebff910139c7a7cabba6aa2e242fad3%5E%21

Related tdf#124329 Handle shapes resizing with the cell

It will be available in 6.2.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Wolfgang Jäger 2019-08-04 10:56:25 UTC
Created attachment 153126 [details]
Made for demonstrating the lack of the new property ResizeWithCell in the BASIC IDE in V6.2.5release x86

V6.2.5 release (x86 from .paf.exe) does not show the .ResizeWithCell property of a shape in the BASIC IDE. 
The attached example was not originally made for this purpose, but should show the addressed effect.
Comment 11 Samuel Mehrbrodt (CIB) 2019-08-05 06:25:00 UTC
(In reply to Wolfgang Jäger from comment #10)
> Created attachment 153126 [details]
> Made for demonstrating the lack of the new property ResizeWithCell in the
> BASIC IDE in V6.2.5release x86
> 
> V6.2.5 release (x86 from .paf.exe) does not show the .ResizeWithCell
> property of a shape in the BASIC IDE. 
> The attached example was not originally made for this purpose, but should
> show the addressed effect.

Can you please file a new bug report for that and CC me?