Bug 111746 - Rotation applied on title shape is not removed by resetting the layout
Summary: Rotation applied on title shape is not removed by resetting the layout
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Object-Rotation
  Show dependency treegraph
 
Reported: 2017-08-12 20:46 UTC by Tamás Zolnai
Modified: 2023-08-27 16:14 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of a rotated title shape after resetting a slide layout (86.99 KB, image/png)
2017-08-13 14:58 UTC, Tamás Zolnai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tamás Zolnai 2017-08-12 20:46:49 UTC
Description:
Default formatting removes all formatting applied directly on a presentation shape (e.g. title shape), but it seems rotation is not reverted.

Steps to Reproduce:
1. Open Impress
2. Apply some rotation on title shape (context menu -> Position and Size... -> Rotation)
3. Apply default formatting (context menu -> Default Formatting)

Actual Results:  
Rotation remains the same.

Expected Results:
Rotation should be removed from the title shape.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36
Comment 1 Julien Nabet 2017-08-12 22:45:02 UTC
On pc Debian x86-64 with master sources updated yesterday, I could reproduce this.

If it can help, here's a code pointer to start:
sd/source/ui/view/drviews2.cxx#774
Comment 2 Regina Henschel 2017-08-13 14:15:23 UTC
Rotation belongs to the transformations and such are no style but an attribute, the 'draw:transform' attribute of the object. Therefore I think, that the command "Default Formatting" is the wrong command for setting the rotation to 0°.

But a reset should happen, if you apply the slide layout again. Then the setting from master slide should be applied, where the title object has no rotation. Such reset works with size and position (which are transformations too), but not with rotation. So I too think, it is a bug.
Comment 3 Tamás Zolnai 2017-08-13 14:51:30 UTC
(In reply to Regina Henschel from comment #2)
> Rotation belongs to the transformations and such are no style but an
> attribute, the 'draw:transform' attribute of the object. Therefore I think,
> that the command "Default Formatting" is the wrong command for setting the
> rotation to 0°.
> 
> But a reset should happen, if you apply the slide layout again. Then the
> setting from master slide should be applied, where the title object has no
> rotation. Such reset works with size and position (which are transformations
> too), but not with rotation. So I too think, it is a bug.

You're right. Let's turn this bug to speak about reseting the slide layout. I guess it's related to the issue that rotation is not inherited from master slide even if the slide is newly created.
Comment 4 Tamás Zolnai 2017-08-13 14:54:39 UTC
Bug update: It's not about default formatting, but applying slide layout on an edited slide.

Description:
Applying slide layout removes all positioning / resizing applied directly on a presentation shapes (e.g. title shape), but it seems rotation is not reverted.

Steps to Reproduce:
1. Open Impress
2. Add some text to title shape
2. Apply some rotation on title shape (context menu -> Position and Size... -> Rotation)
3. Apply a slide layout (sidebar -> Layouts, click on slide background to have slide as a context for sidebar)

Actual Results:  
Rotation remains the same. The shape is placed to a wierd position.

Expected Results:
Rotation should be removed from the title shape.
Comment 5 Tamás Zolnai 2017-08-13 14:58:04 UTC
Created attachment 135517 [details]
Screenshot of a rotated title shape after resetting a slide layout

The title moved that position (what picture shows) after resetting the layout. I only applied a rotation before, so the title position was the default (on top of the slide)
Comment 6 QA Administrators 2018-08-14 02:32:13 UTC Comment hidden (obsolete)
Comment 7 Regina Henschel 2018-08-14 09:13:03 UTC
The error still exists in Version: 6.2.0.0.alpha0+ (x64)
Build ID: d54861bac28c0c6dd84bca6a9c1ddeb76de184a8
CPU threads: 8; OS: Windows 10.0; UI render: GL; 
Locale: de-DE (en_US); Calc: threaded
Comment 8 Julien Nabet 2018-08-15 11:41:16 UTC
In addition to the fix, I'd be interested in knowing how to find the location to fix.
I tried to find this by changing size/pos but there's no function called, I just see things like rSet->Put(SfxInt32Item...
(see SvxPositionSizeTabPage::FillItemSet in cui/source/tabpages/transfrm.cxx)
I wanted to find function called to bt from it when applying the a new layout. So I would have found where pos/size are reinitialized from.
Comment 9 QA Administrators 2019-08-19 06:54:38 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2021-08-19 03:44:03 UTC Comment hidden (obsolete)
Comment 11 Regina Henschel 2023-08-27 16:14:55 UTC
Rotation of title shape on master is not applied to the slides title and the other way round, a rotation on a slides title is not removed by applying the master to that slide.

Tested with Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c9916d9be9c060d43fc063b76d70629162650fea
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL threaded