You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2018/08/23 15:10:09 UTC

[Issue 127861] New: Writer does not show OLE Object inserted from file

https://bz.apache.org/ooo/show_bug.cgi?id=127861

          Issue ID: 127861
        Issue Type: DEFECT
           Summary: Writer does not show OLE Object inserted from file
           Product: Writer
           Version: 4.2.0-dev
          Hardware: All
                OS: Windows 7
            Status: CONFIRMED
          Severity: Normal
          Priority: P5 (lowest)
         Component: ui
          Assignee: issues@openoffice.apache.org
          Reporter: pedlino@gmail.com
  Target Milestone: ---

Created attachment 86493
  --> https://bz.apache.org/ooo/attachment.cgi?id=86493&action=edit
Small equation document for testing

This issue occurs on AOO 4.2.0 when inserting any OLE object if the "Link to
file" option is not checked.
It was detected on version 4.2.0 build 1838150 and newer on Windows 7 x64 Pro

Steps to reproduce
1) Create new Writer file
2) Insert > Object > OLE Object > Create from file > Search > Select any file
(a small sample equation is attached as example)
3) Do _not_ check the "Link to file" option
4) Click OK

Result: an image with a yellow electric plug on top of a document with red text
Object 1 shows up

Expected: an image of the inserted object is shown

If the user double clicks on the yellow plug image then the OLE object is
opened for editing as expected and after closing the edit window, the correct
image is shown.

If the "Link to file" option is checked then the image of the object shows as
expected

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 127861] Writer does not show OLE Object inserted from file

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=127861

--- Comment #13 from damjan@apache.org ---
*** Issue 128465 has been marked as a duplicate of this issue. ***

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 127861] Writer does not show OLE Object inserted from file

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=127861

Matthias Seidel <ms...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mseidel@apache.org

--- Comment #9 from Matthias Seidel <ms...@apache.org> ---
Maybe it should align with:

https://github.com/apache/openoffice/commit/cf914f842e0d4f6546c2c6edefa5660411c62b42

and

https://github.com/apache/openoffice/commit/611fcdab0900c77ff92ad579f9da6d63d2aca818

?

Am I wrong or are there parts missing?

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 127861] Writer does not show OLE Object inserted from file

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=127861

damjan@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |damjan@apache.org

--- Comment #6 from damjan@apache.org ---
The equation does show immediately after insertion in
2ed47956e3ec22116d5164494008afeac3f699a1 on Windows from 29 August 2015.

If it's broken on SVN commit 1838150, which is git commit
816b35f85d2528a06b83fb2832c4d1eb52b6fe62 on 16 August 2018, then the regression
happened somewhere between those commits.

1069 commits to bisect...

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 127861] Writer does not show OLE Object inserted from file

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=127861

--- Comment #7 from damjan@apache.org ---
The regression happened somewhere between these 134 commits between:
e74cb447ea3816bfc4b366ebc4fba3b638e9c65a (5 August 2017)
and
db54ab87120ff0d8e8b488a3aea635318583b1f4 (2 December 2017)

I have a grim suspicion that it was caused by one of the backports of security
patches from 4.1.X that affect embedded objects, but let's still see what
further bisects reveal. If true, a longer audit of 4.1.X might be needed to
find why it didn't cause a regression there too.

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 127861] Writer does not show OLE Object inserted from file

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=127861

Keith N. McKenna <kn...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |CONFIRMED
                 CC|                            |knmc@apache.org

--- Comment #3 from Keith N. McKenna <kn...@apache.org> ---
Confirmed by Comments 1 & 2.

jmpoo and leva.carol.a please consider joining the QA team. For more
information see the QA orientation page at
https://openoffice.apache.org/orientation/intro-qa.html

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 127861] Writer does not show OLE Object inserted from file

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=127861

Pedro <pe...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|1                           |0
             Status|CONFIRMED                   |UNCONFIRMED
           Keywords|                            |regression

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 127861] Writer does not show OLE Object inserted from file

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=127861

damjan@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Latest|---                         |4.2.0-dev
    Confirmation in|                            |
         Resolution|---                         |FIXED
             Status|CONFIRMED                   |RESOLVED
   Target Milestone|---                         |4.2.0

--- Comment #11 from damjan@apache.org ---
The changelog for main/svtools/source/misc/embedhlp.cxx, shows the:

---snip---
        bool bUserAllowsLinkUpdate(true);
---snip---

came from 963c6022f24579e0f2f001621d7d3631970d71c3 in 2014 for bug 125386, and
appears to have fixed that bug, so it should be true (instead of false) in
trunk as well.

---snip---
commit dc7ddb711f16837106137e3e2a512e9200048da7 (HEAD -> trunk)
Author: Damjan Jovanovic <da...@apache.org>
Date:   Sun Oct 8 18:51:45 2023 +0200

    The bUserAllowsLinkUpdate variable was erroneously changed to false
    in commit eab2447c44324e4faff5275517dba43fafb93341, causing formulas
inserted
    without linking to the file to not display until double-clicked on.
    Change that variable to true like it always was in the AOO41X branch.

    Patch by: me
    Found by: Pedro Lino
---snip---

Resolving FIXED. Thank you for your bug report!

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 127861] Writer does not show OLE Object inserted from file

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=127861

--- Comment #10 from damjan@apache.org ---
(In reply to Matthias Seidel from comment #9)
> Maybe it should align with:
> 
> https://github.com/apache/openoffice/commit/
> cf914f842e0d4f6546c2c6edefa5660411c62b42
> 
> and
> 
> https://github.com/apache/openoffice/commit/
> 611fcdab0900c77ff92ad579f9da6d63d2aca818
> 
> ?
> 
> Am I wrong or are there parts missing?

If we look at the files changed by the bad commit
eab2447c44324e4faff5275517dba43fafb93341, and do a:

$ git diff -w AOO41X..trunk PATH/TO/FILE

for all the files changed by that commit, they are all the same (barring
comment changes), except for this one:

---snip---
$ git diff -w AOO41X..trunk main/svtools/source/misc/embedhlp.cxx
diff --git a/main/svtools/source/misc/embedhlp.cxx
b/main/svtools/source/misc/embedhlp.cxx
index c08bb364ba..c82a8f9fa8 100644
--- a/main/svtools/source/misc/embedhlp.cxx
+++ b/main/svtools/source/misc/embedhlp.cxx
@@ -709,7 +709,7 @@ SvStream* EmbeddedObjectRef::GetGraphicStream( sal_Bool
bUpdate ) const
     if ( !xStream.is() )
     {
                RTL_LOGFILE_CONTEXT_TRACE( aLog, "getting stream from object"
);
-        bool bUserAllowsLinkUpdate(true);
+        bool bUserAllowsLinkUpdate(false);
         const comphelper::EmbeddedObjectContainer* pContainer =
GetContainer();

         if(pContainer)
---snip---

Now if on trunk I change that "false" to "true" like in AOO41X, it fixes this
bug - the equation shows when inserted.

But how did bUserAllowsLinkUpdate become "false" in the first place?

It was originally "true", and commit eab2447c44324e4faff5275517dba43fafb93341
changed it to "false" on trunk but NOT on AOO41X!!! AOO41X remained on "true"
from 2014 till present day!!!

Why?
- Was the change to false made on the wrong variable, or wrong file?
- Was it meant to be false on AOO41X too but never set to false?
- What was the point of these patches in the first place? They look related to
some security fix. If so, is AOO41X still vulnerable?

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 127861] Writer does not show OLE Object inserted from file

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=127861

Czesław Wolański <cz...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |czeslaw.wolanski@gmail.com

--- Comment #5 from Czesław Wolański <cz...@gmail.com> ---
Issue 128465
"Inserting a Formula Directly - formula not shown immediately"
describes similar symptoms.

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 127861] Writer does not show OLE Object inserted from file

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=127861

damjan@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jim@apache.org

--- Comment #8 from damjan@apache.org ---
Finally found the regression:

---snip---
eab2447c44324e4faff5275517dba43fafb93341 is the first bad commit
commit eab2447c44324e4faff5275517dba43fafb93341
Author: Jim Jagielski <ji...@apache.org>
Date:   Wed Aug 16 20:13:07 2017 +0000

    Align w/ AOO414 on these fixes

    git-svn-id: https://svn.apache.org/repos/asf/openoffice/trunk@1805237
13f79535-47bb-0310-9956-ffa450edef68

 .../source/container/embeddedobjectcontainer.cxx     |  6 +++---
 main/filter/source/msfilter/svdfppt.cxx              |  5 +++++
 main/sfx2/source/appl/linkmgr2.cxx                   | 20 ++++++++++----------
 main/svtools/source/misc/embedhlp.cxx                |  2 +-
 main/sw/source/filter/ww8/ww8par2.cxx                | 10 +++++-----
 5 files changed, 24 insertions(+), 19 deletions(-)
---snip---




Jim: any ideas? What was this commit meant to accomplish, and how did it cause
this regression in 4.2.x but not in 4.1.x?

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 127861] Writer does not show OLE Object inserted from file

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=127861

--- Comment #1 from jmpoo <jm...@arcor.de> ---
I can confirm this on Linux Mint 18.3 with AOO420m1(Build:9800) - Rev. 1844412

Tried to insert a text file as ole object and get the same error.

Works as expected in AOO416m1(Build:9790) - Rev. 1844227

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 127861] Writer does not show OLE Object inserted from file

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=127861

leva.carol.a@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |leva.carol.a@gmail.com

--- Comment #2 from leva.carol.a@gmail.com ---
I replicated this bug on AOO 4.2 rev 1846059 on a Windows 10 Enterprise desktop
for files types TXT, RTF, and PNG.  I could not replicate the bug on prior
version AOO 4.1.6 rev 1844436 on a Windows 10 Enterprise desktop for file types
TXT, RTF, and PNG.  

I also tried file types OXPS and WMV, and I noticed a different behavior in AAO
4.2, where the generic icon and title show up after (instead of before)
double-clicking on the object.  These file types appear as icons in the
document instead of showing their content in the document.  Initially, an
appropriate icon and title is shown in the document, but after you double-click
on the icon and open the file, it changes to the plug-in icon with a generic
Object title.

Steps to replicate:
1) Open a new Writer document
2) From the menu, select Insert>Object>OLE Object
3) From the “Insert OLE Object” dialog, select “Create from File”, then use the
Search button to select a file with a WMV extension.  Make sure “Link to file”
is not checked and select OK.
4) Note that an appropriate icon and title appears on the object.
5) Double-click on the object, then select Open from the “Open Package
Contents” dialog.  The WMV file opens in a video player app.  Close this app.
6) Note that the object icon has changed to a plug-in icon and the title has
changed to Object 1.

Actual Result: Icon and title on object are changed to a generic icon and title
Expected Result: Appropriate icon and title on object are retained

Additional information: This behavior does not occur when using the “Link to
file” option for a WMV file.  This behavior also occurs in AOO 4.1.6 for a WMV
file.

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 127861] Writer does not show OLE Object inserted from file

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=127861

Keith N. McKenna <kn...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |4.2.0_release_blocker?

--- Comment #4 from Keith N. McKenna <kn...@apache.org> ---
I have replicated this in AOO 4.2.0-Dev2 and as it is a regression, it works in
AOO RC2 I believe it should be a release blocker.

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 127861] Writer does not show OLE Object inserted from file

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=127861

damjan@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|Windows 7                   |All

--- Comment #12 from damjan@apache.org ---
Cherry picked for AOO42X in commit 405ea29d30eefeab1cbcdbada03548845d83dbca.

-- 
You are receiving this mail because:
You are the assignee for the issue.