Bug 125100 - EDITING: Insert OLE Object behaves different if new document is generated from template
Summary: EDITING: Insert OLE Object behaves different if new document is generated fro...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Ilhan Yesil
URL:
Whiteboard: target:6.4.0 target:6.3.1
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-03 09:02 UTC by Ilhan Yesil
Modified: 2020-03-13 08:46 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Sample calc sheet to insert as OLE object (7.23 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-05-03 09:03 UTC, Ilhan Yesil
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ilhan Yesil 2019-05-03 09:02:08 UTC
Description:
A writer document can be created based on a template. 
After inserting a calc sheet as OLE object, the presentation of the calc sheet differs either if the document is based on a template or not.

Steps to Reproduce:
1. Create a new writer document, ensure it is not based on a template
2. Insert the attached calc document as OLE object. For this go to the menu "Insert -> Object -> OLE object...".
3. In the opened dialog select option "Create from file", then enter the name of the calc file to insert, and then select "Link to file"
4. Close the dialog with "Ok"

5. Go to menu "File -> New -> Templates..." and in the opened dialog select a template, "Modern" as example
6. Repeat steps 2.-4.

Actual Results:
After step 4, the writer document shows the data of the calc sheet
After step 6, the template based writer document shows only a pictogram

Expected Results:
There should be no difference in the behaviour. In both cases, either the calc sheet should be shown as pictogram or its data should be shown.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Ilhan Yesil 2019-05-03 09:03:13 UTC
Created attachment 151151 [details]
Sample calc sheet to insert as OLE object
Comment 2 Ilhan Yesil 2019-05-03 09:13:14 UTC
I already have explored the code.
In sw\source\uibase\app\docshini.cxx this function is called

// Load, Default-Format
bool  SwDocShell::Load( SfxMedium& rMedium )

wherein this function is called:

rEmbeddedObjectContainer.setUserAllowsLinkUpdate(false);

If I comment this out, the behaviour is identical and the sheet data are shown.

This function sets mbUserAllowsLinkUpdate to false.

But the constructors of EmbeddedObjectContainer sets this member to true.

So I assume, there is a default mismatch. Does someone know what the intention here is?
Comment 3 Durgapriyanka 2019-05-03 21:53:55 UTC
Thank you for reporting the bug. I can confirm the bug present in 
Version: 6.3.0.0.alpha0+
Build ID: b6b28931435e44aca92b8c0e1659f701e3ed1a87
CPU threads: 2; OS: Windows 6.1; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-01-30_06:57:04
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded

I can reproduce exactly as described.

In Version: LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4 

I can reproduce the same until step 4, but after that I'm not able to choose the templates. It has complete different options compared to version 6.
Comment 4 Dieter 2019-05-05 15:51:30 UTC
Set to NEW because of comment 3.
Comment 5 Commit Notification 2019-08-13 09:33:29 UTC
Ilhan Yesil committed a patch related to this issue.
It has been pushed to "master":

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

tdf#125100 After insert of calc document as OLE object, content is shown

It will be available in 6.4.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-08-13 11:15:57 UTC
Ilhan Yesil committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

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

tdf#125100 After insert of calc document as OLE object, content is shown

It will be available in 6.3.1.

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 Xisco Faulí 2019-11-21 12:31:36 UTC
A polite ping to Ilhan Yesil:
Is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Otherwise, Could you please explain what's missing?
Thanks