Bug 76878 - Polygons, curves, and contours fail to load correct text rotation
Summary: Polygons, curves, and contours fail to load correct text rotation
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: Other All
: high critical
Assignee: Andras Timar
URL:
Whiteboard: target:4.3.0 target:4.2.5
Keywords: bibisected, regression
Depends on:
Blocks:
 
Reported: 2014-04-01 04:10 UTC by tmacalp
Modified: 2019-07-22 01:26 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example drawing of text not rotating properly with objects (63.14 KB, application/vnd.oasis.opendocument.graphics)
2014-04-01 04:25 UTC, tmacalp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tmacalp 2014-04-01 04:10:08 UTC
Description:
When text is applied to a polygon, curve, or contour and the object is rotated, the text rotates with the object.  If the drawing is then saved and then reloaded, the object will still be rotated, but the text rotation information is lost.  This is a recent regression that can lead to loss of information and permanent corruption of custom draw objects.

Steps to reproduce:
* Create a new drawing
* Insert a square (or another shape)
* Right click on square -> Convert -> polygon (or curve/contour)
* Double click square and type some text
* Rotate the object and leave it rotated (Modify -> Rotate)
* Note that the text rotates with the object
* File -> Save
* File -> Reload

Expected:
The text should remain properly rotated as it behaves with native draw shapes and as it appeared before we reloaded the document.  

Actual:
Upon reloading the file, the text orientation is back to standard and is out of sync with our rotated object.  At this point, if you re-save the drawing, it will save the incorrect text orientation, and make the corruption permanent.  As far as I can tell, it is then impossible to fix the text orientation without deleting and remaking the object.

Note that this only appears to affect the LOADING of rotated text.  Both the object rotation and the text rotation are saved.  This can be proven by following the above steps, minus the reload, and then opening it with a previous working version of LO.  

As an example, we use Draw for an extensive to-scale multi-layer diagram of our facility with thousands of objects.  Many of our objects are custom shapes, formatted with text that must run in a certain orientation.  Fortunately, we haven't touched this diagram with a recent version of LO, but this bug would have cost us MANY hours of productivity.

It appears that this bug started with LO 4.1.X.  I tested the following versions:

Bug confirmed in the following versions:
LO 4.1.0.4 using 32bit Fedora 17
LO 4.1.4.2 using 64bit RHEL6
LO 4.2.1.1 using 32bit Fedora 17
LO 4.2.0.1 using 64bit Windows Vista

Correct behavior using the following versions:
OO 3.2.1 using 64bit RHEL6
LO 3.5.7.2 using 32bit Fedora 17
LO 4.0.6.2 using 32bit Fedora 17

According to the bug prioritization flowchart, I'll set the severity to critical since it causes loss of data and high priority since it's a regression.

https://wiki.documentfoundation.org/images/0/06/Prioritizing_Bugs_Flowchart.jpg
Comment 1 tmacalp 2014-04-01 04:25:02 UTC
Created attachment 96693 [details]
Example drawing of text not rotating properly with objects

I've attached a drawing that should quickly demonstrate the bug.
Comment 2 sophie 2014-04-02 08:58:40 UTC
Confirmed using Ubuntu 13.10 Version: 4.2.3.2
Build ID: 7c5c769e412afd32da4d946d2cb0c8b0674e95e0 with the provided document and a new one - Set as new - Sophie
Comment 3 tmacalp 2014-04-11 02:50:29 UTC
I performed a bibisect:
 88f650e02a29e4e7656f1c132f7b47a912a5b8f2 is the first bad commit


Log:
# bad: [793dbf6f80f497dfe587d560d6257f42a24273f6] source-hash-1581b1fc3ac82a7bd62df968226e98604a4ca52d
# good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
git bisect start 'latest' 'oldest'
# good: [8092559c5013969ebda017d79200463b9b975038] source-hash-fd84daf696a368c2c7561b5253b32a63ecdeca4a
git bisect good 8092559c5013969ebda017d79200463b9b975038
# bad: [0270ef1b76a6de423b30f7927362cc01c1a0fc38] source-hash-b1f7dd66b898b03cb4bd8d434b6370310ea95946
git bisect bad 0270ef1b76a6de423b30f7927362cc01c1a0fc38
# good: [aedcb9e93c73792e6d4f6bc5d74050efbe5af7c1] source-hash-358b60b3b172968a7605b428af01df456d7669b2
git bisect good aedcb9e93c73792e6d4f6bc5d74050efbe5af7c1
# bad: [63ac4ab9665db60fac1e1813c9c80da52b2e87c6] source-hash-66e39940d763586060c4bcc8c3cd213495c40b79
git bisect bad 63ac4ab9665db60fac1e1813c9c80da52b2e87c6
# good: [ec9e268ce152176463e07e09901e4a99d65d86ee] source-hash-1b14676b5f95dd51d6266a6ab7bd713a5ddcff2f
git bisect good ec9e268ce152176463e07e09901e4a99d65d86ee
# good: [bf5d7e3794ac23c52e833b6822032f5f11272d0e] source-hash-a2c34b3d9ac2d7e43e52846308cc63447fd51f23
git bisect good bf5d7e3794ac23c52e833b6822032f5f11272d0e
# good: [5aaaa56b691a456d6c40a20ceca4574681f49634] source-hash-3fb33e3e04c7f339e1e15d24529e8ea1d4dbe321
git bisect good 5aaaa56b691a456d6c40a20ceca4574681f49634
# good: [5d26e0a77ed0f2b5803dfbd75d9f5eed5ca5cca4] source-hash-e8ad612bf813579f7a3bd4ed32c719ee01c6ce2e
git bisect good 5d26e0a77ed0f2b5803dfbd75d9f5eed5ca5cca4
# bad: [315d45609b25edb26f80e4164c6bc9c948143bfc] source-hash-f160e4935c474a5293b3d3c11b3d538efb4767a0
git bisect bad 315d45609b25edb26f80e4164c6bc9c948143bfc
# bad: [88f650e02a29e4e7656f1c132f7b47a912a5b8f2] source-hash-0c45b5548537cffddc3fbdd6b1c2b9a8a1bdbc4a
git bisect bad 88f650e02a29e4e7656f1c132f7b47a912a5b8f2
# first bad commit: [88f650e02a29e4e7656f1c132f7b47a912a5b8f2] source-hash-0c45b5548537cffddc3fbdd6b1c2b9a8a1bdbc4a
Comment 4 crxssi 2014-04-11 04:54:54 UTC
Also confirmed.  This is a nasty/serious regression.  In certain situations, it will simply destroy a user's work.
Comment 5 Commit Notification 2014-04-23 11:13:40 UTC
Andras Timar committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1e48bfcd7aa811d31ecdf9df897b30cffebd5669

fdo#76878 Revert "Resolves: #i116244# need to reset rotation..."



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2014-04-23 11:24:45 UTC
Andras Timar committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c9be21b771e83566c912542f98a4cb5d8932f129&h=libreoffice-4-2

fdo#76878 Revert "Resolves: #i116244# need to reset rotation..."


It will be available in LibreOffice 4.2.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Jean-Baptiste Faure 2014-04-23 12:58:38 UTC
(In reply to comment #6)
> Andras Timar committed a patch related to this issue.
> It has been pushed to "libreoffice-4-2":
> 
> http://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=c9be21b771e83566c912542f98a4cb5d8932f129&h=libreoffice-4-2

When building LO 4.2.5.0.0+, this reverting commit breaks the following unit test :

[build CUT] sd_filters_test
diff.cxx:267:Assertion
Test name: SdFiltersTest::testDocumentLayout
double equality assertion failed
- Expected: 7591.681979
- Actual  : 0
- Delta   : 1e-08
- Reference: .../sd/qa/unit/data/xml/shapes-test_page3.xml
- Node: column1

Failures !!!
Run: 9   Failure total: 1   Failures: 1   Errors: 0

Best regards. JBF
Comment 8 Andras Timar 2014-04-23 15:26:15 UTC
I fixed the failing unit test.
Comment 9 Jean-Baptiste Faure 2014-04-23 15:59:42 UTC
(In reply to comment #8)
> I fixed the failing unit test.

Indeed. Thank you very much. :-)

Best regards. JBF
Comment 10 Robinson Tryon (qubit) 2015-12-17 07:54:28 UTC
Migrating Whiteboard tags to Keywords: (bibisected)
[NinjaEdit]