Download it now!
Bug 128730 - In draw and impress only preview is visible, but not page content. copy/paste helps.
Summary: In draw and impress only preview is visible, but not page content. copy/paste...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
6.3.2.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-12 08:08 UTC by Patrik Eschle
Modified: 2020-07-06 08:09 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Draw docuement. When opened shows only the preview pane. The main page is empty (18.43 KB, application/vnd.oasis.opendocument.graphics)
2019-11-12 08:09 UTC, Patrik Eschle
Details
Impress document that shows only a preview of a slide, the main page is empty (21.24 KB, application/vnd.oasis.opendocument.presentation)
2019-11-20 19:46 UTC, Patrik Eschle
Details
Makro to repair the document (888 bytes, text/plain)
2019-12-02 18:03 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrik Eschle 2019-11-12 08:08:14 UTC
Description:
Bug:
-Open a previously made .odg file. 
-Sometimes only the previews are visible. The page is empty white, saving as pdf also results in a white page.

Workaround:
- Open an empty odg document
- Mark all previews in the buggy document, copy, paste in the new document

Steps to Reproduce:
1. Open attached file
2. Page is blank (at least here)
3. Copy preview slides and paste into new document

Actual Results:
Blank main page

Expected Results:
Drawing in page


Reproducible: Sometimes


User Profile Reset: Yes



Additional Info:
Comment 1 Patrik Eschle 2019-11-12 08:09:25 UTC
Created attachment 155724 [details]
Draw docuement. When opened shows only the preview pane. The main page is empty
Comment 2 Gerhard Weydt 2019-11-20 17:21:30 UTC
Hi Patrik,

your document is an Impress document only using the extension .odg, which makes it look like a draw document, at first glance. You see that it's Impress looking at the window title, and using Xray you see its implementation name is SdXImpressDocument.
The drawing objects are present in the Impress document, one can analyse them using Xray, but it seems that they have some attribute which prevents them being displayed; I cannot tell which.
The solution for you should be simple: Work with the Draw document you get by copying the previews, and delete the Impress document.
To investigate the supposed incompatibility between Draw and Impress I have no inclination, that's probably not so easy, and I am absolutely unable to mend it.
If you agree with my opinion, then set the status to resolved and add a reason in the new dropbox on the right, for example NOTABUG or WORKSFORME
Comment 3 Patrik Eschle 2019-11-20 19:46:07 UTC
Created attachment 155984 [details]
Impress document that shows only a preview of a slide, the main page is empty
Comment 4 Patrik Eschle 2019-11-20 19:50:15 UTC
Hi Gerhard

Thanks for looking into this. I uploaded an Impress Document that shows the same error. 

I still consider this a serious bug. It happens randomly (every half year) on random odg/odp-Documents, that had worked well before. It seems to be a purely administrative issue, since the content is there and can be restored with copy/paste from the preview pane.

  Patrik
Comment 5 Gerhard Weydt 2019-11-20 20:57:16 UTC
Now it's a different story. I can confirm the bug.
It's a permanent error, closing  (and eventually saving) and reopening do change nothing, if you create a new slide then the fields for the title and the text are again missing.
The procedure you described (copying the previews in a new document) always led to a document looking correct, creating a new slide then did work.
I tried to look at the attributes of the document and to compare them, but I only found one difference which I am not sure is harmless, and that's one I simply don't understand: the BuildId was ";6332" in your doc and "" in the newly created one, but I have no idea what that means.
I also unzipped the documents, but to no avail.
But these efforts were only blind poking, as I do not know much about these things, and I certainly will not be able to find the reason. To find out the cause why the document changed its state will probably be difficult, but your document at least provides the chance to find out what is wrong with its present state, comparing it to the newly created "copy" (simply copying the file does not work).
Still an Impress document is quite complex, with masters etc., and I presume a Draw document would make it easier. So if you could provide a simple Draw example as well, I think this would help developpers who try to tackle the problem.
For the future I can only assume the role of spectator, I am afraid.
Comment 6 Regina Henschel 2019-12-02 18:03:04 UTC
Created attachment 156250 [details]
Makro to repair the document

Make a copy of the document. Then apply the attached macro to the copy.
Comment 7 Patrik Eschle 2019-12-02 19:08:38 UTC
Thanks - works perfectly nice. And - given my limited knowledge of macros - seems essentially to set IsVisible to true in a layer.

Any idea how this got a value false? Do you consider this a bug or an irreproducible glitch?

Thanks a lot,
  Patrik
Comment 8 Gerhard Weydt 2019-12-02 19:33:21 UTC
It's essential for correcting wrong layer attributes in an Impress document. Layers are not editable in Impress as regards the user interface. They are necessary, nevertheless, for separating drawing objects, control etc.
In Draw you can edit layers and create new ones.
As regards the reason, I fear we shall not know if you do not remember what you did before the problem occurred, and are able to reproduce the steps. Without that, I think no one will tackle the problem, if hasn't got a sudden enlightenment.
I propose you close the bug, setting the status to RESOLVED and probably WORKSFORME in the second field.
Comment 9 Regina Henschel 2019-12-02 19:54:19 UTC
I have no idea, how the wrong layer state comes into the document. Current versions should work correctly for new documents. Documents once repaired should stay OK too. It might be, that saving the document was interrupted. Such wrong layer state was reported on the Ask site too, put up to now no scenario is known, that produces the wrong layer state, so a "fix" is not possible.
Comment 10 David Lea 2020-07-06 03:30:42 UTC
This is a very interesting discussion! My knowledge of macros and file formats is just enough to "get the gist" of what you are talking about, but I wouldn't know here to start applying the macro to the damaged file of mine.

How are you folks viewing the xml code of these files? If I was to load my show into a text editor it would be about a thousand miles long, with the graphics, wouldn't it?

The first time this happened to me, I took a slide show file and saved it to a new name so that I could start adding a few new features and still have the original file as is. But the newly saved file was all blanks in the edit. So it would seem that in this case, simply changing the name and saving was enough to set these layer attributes to blank. Very mysterious indeed!!

I am not a coder - just a little amateur fiddling, mostly years ago.

Any advice on how to apply a macro to a file would be much appreciated!

Dave Lea - Fish Creek, WI
Comment 11 Regina Henschel 2020-07-06 08:09:54 UTC
How to apply the macro
-----------------------
Press Alt+F11. You get the "LibreOffice Basic Macros" dialog.
Click on "Organizer". You get the "LibreOffice Basic Macro Organizer" dialog.
Open the tree "My Macros" and "Standard". Click on "New".
Enter a name, which tells you something about the content, e.g "RepairHiddenSlideContent". OK.
The new Module should be selected, if not click on it. Then click on "Edit". Now you are in the Basic IDE,
You should see
    REM  *****  BASIC  *****

    Sub Main

    End Sub
Delete that and then insert the content of the attachment "Makro to repair the document".
Close the IDE.
Open the faulty presentation.
Press Alt+F11.
Open tree "My Macros" if it is closed. Click on the macro, e.g. "RepairHiddenSlideContent".
The macro "SetAllLayerToDefault" should be selected already. If not select it.
Click on "Run". It is in the lower part of the dialog.