Download it now!
Bug 65338 - FILESAVE doesn't retain font settings of style: after save (as) and again opening of presentation, font is changed
Summary: FILESAVE doesn't retain font settings of style: after save (as) and again ope...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
4.1.0.0.beta1
Hardware: All All
: medium blocker
Assignee: Luboš Luňák
URL:
Whiteboard: odf target:4.2.0 target:4.1.0
Keywords: bibisected, regression
: 67216 67754 (view as bug list)
Depends on:
Blocks: mab4.1
  Show dependency treegraph
 
Reported: 2013-06-04 09:43 UTC by Johan Vromans
Modified: 2015-12-17 07:15 UTC (History)
16 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample presentation showing the bug (13.54 KB, application/vnd.oasis.opendocument.presentation)
2013-06-04 09:43 UTC, Johan Vromans
Details
Sample presentation as saved with 4.1 (13.44 KB, application/vnd.oasis.opendocument.presentation)
2013-06-06 18:24 UTC, Johan Vromans
Details
bisect log (2.95 KB, text/plain)
2013-07-10 08:54 UTC, Jorendc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johan Vromans 2013-06-04 09:43:23 UTC
Created attachment 80275 [details]
Sample presentation showing the bug

Open the attached example presentation, try0.opd, with LO 4.1.0.0 beta1.

Verify that the slide has a non-serif text (Arial).

Save as try2.odp.

Restart LO and open try2.opd.

The slide now has serif texts (Times New Roman) instead of Arial.
Comment 1 Jacques Guilleron 2013-06-04 10:55:33 UTC
Hello Johan,

I reproduce With 
master LO 4.2.0.0.alpha0+ Build ID: 60790b3f0ccc1779bcff2ddcc278a9027aedabe
Windows 7 Home Premium
Save and reopen try0.odp with LO 4.0.2.2 give the correct font.

Have a nice day,

Jacques Guilloeron
Comment 2 Cor Nouws 2013-06-06 13:03:30 UTC
Hi Johan,
thanks for reporting :)
Did you open try2.odp also in e.g. 3.6.x or 4.0.x, to see if it's correct there (learning if the problem is at SAVE or OPEN or combined maybe..)
best,
Cor
Comment 3 Johan Vromans 2013-06-06 18:24:15 UTC
Created attachment 80425 [details]
Sample presentation as saved with 4.1
Comment 4 Johan Vromans 2013-06-06 18:28:42 UTC
Yes. Opening and saving with 4.0 yields correct fonts.
Opening and saving with 4.1 yields a document with changed fonts. When this document is opened in (a fresh copy of) 4.0 or 4.1, the changes are still there.

See https://bugs.freedesktop.org/attachment.cgi?id=80425 .
Comment 5 Johan Vromans 2013-06-23 19:31:55 UTC
The problem is still present in 4.1 RC1 and an absolute show stopper.

Note that the fonts that get substituted are fonts that reside in the users ~/.fonts directory (i.e., they're not system wide). This might give a clue.
Comment 6 Johan Vromans 2013-06-23 19:55:38 UTC
For the sake of completeness: the problem is not present in 3.5.7 and 4.0.3.3.
Comment 7 tommy27 2013-06-23 21:21:54 UTC
fonts are still OK after saving with LibO 4.0.4.2 so the regression has took place during LibO 4.1.x development
Comment 8 Michael Meeks 2013-06-24 09:18:49 UTC
Lubos - I wonder if you have any thoughts here ? ( who worked on font-embedding for impress ? ) though perhaps this is unrelated :-)
Comment 9 Cor Nouws 2013-07-01 08:14:12 UTC
Working and testing with the RC2, would give a much better expereince if this can be fixed by then ;)
By the way: the problem is with saving the file and of course affects Draw too.
Comment 10 Cor Nouws 2013-07-01 08:19:43 UTC
In my expereince, this does not affect direct formatting, but the fonts that are set in the Styles.
Comment 11 Michael Meeks 2013-07-01 20:28:50 UTC
The difference (saving each side as .fodp) is:

  <style:style style:name="Standaard-subtitle" style:family="presentation">
   <style:graphic-properties draw:stroke="none" draw:fill="none" draw:textarea-vertical-align="middle">
...
    <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-align="center" fo:text-indent="0cm"/>
   <style:text-properties style:use-window-font-color="true"
    ... in this set of attributes ...
   </style:style>

And diffing the text-properties we get (from old & working -> new and broken)

 <style:text-properties style:use-window-font-color="true"
 style:text-outline="false" style:text-line-through-style="none"
-fo:font-family="Arial" style:font-family-generic="roman"
-style:font-pitch="variable" fo:font-size="32pt" fo:font-style="normal"
+style:font-name="Arial" fo:font-size="32pt" fo:font-style="normal"
 fo:text-shadow="none" style:text-underline-style="none"
 fo:font-weight="normal" style:letter-kerning="true"
-style:font-family-asian="&apos;AR PL UMing CN&apos;"
-style:font-family-generic-asian="system"
-style:font-pitch-asian="variable" style:font-size-asian="32pt"
+style:font-name-asian="AR PL UMing CN" style:font-size-asian="32pt"
 style:font-style-asian="normal" style:font-weight-asian="normal"
-style:font-family-complex="&apos;Lohit Devanagari&apos;"
-style:font-family-generic-complex="system"
-style:font-pitch-complex="variable" style:font-size-complex="32pt"
-style:font-style-complex="normal" style:font-weight-complex="normal"
-style:text-emphasize="none" style:font-relief="none"
-style:text-overline-style="none"
+style:font-name-complex="Lohit Devanagari"
+style:font-size-complex="32pt" style:font-style-complex="normal"
+style:font-weight-complex="normal" style:text-emphasize="none"
+style:font-relief="none" style:text-overline-style="none"
 style:text-overline-color="font-color"/>

Adding an fo:font-family="Ariel" back into the mix and we get what is expected; interesting.
Comment 12 Petr Mladek 2013-07-04 15:11:00 UTC
Lubos, Muthu, could you please have a look?

I am not sure how many users might be affected. But it smells like a ticking bomb. It would be great to have this fixed in 4.1.0.3.
Comment 13 Cor Nouws 2013-07-04 21:02:14 UTC
(In reply to comment #12)

> I am not sure how many users might be affected. But it smells like a ticking
> bomb. It would be great to have this fixed in 4.1.0.3.

Indeed. Every odg or odp that is edited, containing font settings in a style, is affected.
I'll add a note somewhere in the release notes for the RC2.
Comment 14 Luboš Luňák 2013-07-08 15:01:15 UTC
I've gotten as far as xmloff/source/style/styleexp.cxx:324, where xPropStates has mnIndex -1 in master instead of 183 (whatever 183 is) in 4.0. And there are actually many more items that have -1 instead of some positive value, so possibly there's more broken that just fonts.

Trying to figure out where that change comes from I get lost in property map madness, and as I'm not very familiar with xmloff, I'll leave that to somebody else.
Comment 15 David Tardon 2013-07-09 09:53:23 UTC
It could be the same problem as in bug 57231. I'm currently knee-deep in property maps too :-(
Comment 17 Jorendc 2013-07-10 08:54:39 UTC
Created attachment 82258 [details]
bisect log
Comment 18 Cor Nouws 2013-07-10 09:06:36 UTC
@joren: super, thanks!

(In reply to comment #16)

> Probably introduced due commit:
> 
> http://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=b40bcde076f9fabf24810d2520e878d604d99637
> 
> and/or
> 
> http://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=8ad5c064190084cb46ce8847bfa306ce3cb01987

@radek: can you pls have a look?
thanks,
Comment 19 David Tardon 2013-07-10 11:21:37 UTC
style:font-name is not exported
Comment 20 Luboš Luňák 2013-07-10 11:33:42 UTC
It's b40bcde076f9fabf24810d2520e878d604d99637 . And Radek is no longer at SUSE, I'll have a look.
Comment 21 Luboš Luňák 2013-07-10 15:40:25 UTC
https://gerrit.libreoffice.org/#/c/4816/
Comment 22 Commit Notification 2013-07-10 15:43:04 UTC
LuboÅ¡ LuÅak committed a patch related to this issue.
It has been pushed to "master":

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

fix reading fonts from .odp using style::font-name (fdo#65338)



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 23 tommy27 2013-07-10 17:34:50 UTC
backporting to the 4.1.x branch should be considered ASAP

this is a MAB and a nasty regression from the 4.0.x branch.

would be nice to integrate the fix in 4.1.0 RC3
Comment 24 Commit Notification 2013-07-10 19:40:33 UTC
LuboÅ¡ LuÅak committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

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

fix reading fonts from .odp using style::font-name (fdo#65338)


It will be available in LibreOffice 4.1.1.

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 25 Commit Notification 2013-07-11 04:15:51 UTC
LuboÅ¡ LuÅak committed a patch related to this issue.
It has been pushed to "libreoffice-4-1-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b84347d905a5fb4c04077ace924744c82c76cce3&h=libreoffice-4-1-0

fix reading fonts from .odp using style::font-name (fdo#65338)


It will be available already in LibreOffice 4.1.0.

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 26 Michael Meeks 2013-07-11 09:56:16 UTC
re-resolving fixed; back-ported to 4.1.0 etc - thanks Lubos
Comment 27 Cor Nouws 2013-07-11 10:38:30 UTC
(In reply to comment #26)
> re-resolving fixed; back-ported to 4.1.0 etc - thanks Lubos

+1 Great :)
Comment 28 Johan Vromans 2013-07-16 10:04:30 UTC
Confirmed. Thanks.
Comment 29 Cor Nouws 2013-07-23 16:08:35 UTC
*** Bug 67216 has been marked as a duplicate of this bug. ***
Comment 30 Cor Nouws 2013-08-04 19:32:55 UTC
*** Bug 67754 has been marked as a duplicate of this bug. ***
Comment 31 Patrick Gillespie 2015-04-24 15:56:10 UTC
Version: 4.4.2.2
Build ID: 40m0(Build:2)
Locale: en_US

Netrunner (Ubuntu 14.04)

Working on an ebook and am saving document as doc file (not sure if that has anything to do with it but...)

I've created a style called <Poetry (Single Space)>. This style is inherited from the Default. The default line spacing is 1.5. The Poetry spacing is 1. I notice that whenever I close and reopen the document, the Poetry style reverts to 1.5. I initially was going to open a new bug, but I'm wondering if this is related?

Let me know. I've reopened the bug.
Comment 32 Patrick Gillespie 2015-04-24 15:57:36 UTC
The Component is Writer, by the way. I just noticed this bug pertained to Impress.
Comment 33 Caolán McNamara 2015-04-24 16:24:44 UTC
I believe you have a different bug that this one which was closed two years ago. Whenever in doubt file a new one because opening an old one can lead to the bug being assigned to someone who has died or otherwise become inactive, or simply doesn't have the time to work that that specific area.
Comment 34 Robinson Tryon (qubit) 2015-12-17 07:15:31 UTC
Migrating Whiteboard tags to Keywords: (bibisected)
[NinjaEdit]