Issue 125613 - Insert Picture from file do not work
Summary: Insert Picture from file do not work
Status: CLOSED FIXED
Alias: None
Product: Impress
Classification: Application
Component: ui (show other issues)
Version: 4.1.1
Hardware: PC Windows, all
: P2 Critical with 3 votes (vote)
Target Milestone: 4.2.0
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: regression
: 124784 125883 126265 126493 127654 (view as issue list)
Depends on:
Blocks:
 
Reported: 2014-09-11 15:12 UTC by jmpoo
Modified: 2018-01-23 21:25 UTC (History)
16 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.2.0-dev
Developer Difficulty: ---
pescetti: 4.1.2_release_blocker+


Attachments
Impress - inserted picture is not shown (18.85 KB, application/vnd.oasis.opendocument.presentation)
2014-09-11 15:14 UTC, jmpoo
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description jmpoo 2014-09-11 15:12:07 UTC
Don't work in AOO 4.1.0, 4.1.1 and 4.2.0 dev r1623875, german
works last in AOO 4.0.1

Open Impress
insert a new slide
chose "Insert Picture" Button in the middle of the slide
insert any picture
notice that the "Insertion and Listing Mask" is always visible
but the inserted picture is not shown in slide preview or slide show

It appears, if you type any outline text.
Small pictures fills the whole frame as tiles.

So it works like inserting a background picture at the textframe.
Comment 1 jmpoo 2014-09-11 15:14:58 UTC
Created attachment 83949 [details]
Impress - inserted picture is not shown
Comment 2 oooforum (fr) 2014-09-12 07:38:02 UTC
Duplicate of issue 125387
Comment 3 jmpoo 2014-09-12 09:18:27 UTC
Maybee it's the same root cause but not a duplicate.

The main topic of my issue is the non visability of the inserted picture in slide preview and slide show in addition to the always activated input template - not the "mosaic effect".
Comment 4 bmarcelly 2014-09-12 09:52:32 UTC
Issue 125387 describes only part of the observed anomalies.
I think all the side-effects have to be investigated together, the current situation is user-unfriendly.

Description of the effects, seen on Windows 7, Apache OpenOffice 4.1.1

Create a new Impress file, with one slide.
For the slide, choose in the sidebar one of the Layouts, except "Blank Slide".

- Either select a rectangle where you see "Click to add text", then menu Insert > file.
- Or if you have chosen a layout with a Content, click on the grey mask "insert Picture"
- choose an image with small dimensions

Consequences:
- you have to wait 2-3 seconds before the image appears, wondering what's going on...
- then the small image appears many times as tiles to cover the surface of the rectangle
- but the image does not appear in the Slide Pane
- run slideshow : the image does not appear
- return to edit mode; add some text in the rectangle. Then the tiled images appear in the Slide Pane, and in the slideshow.

In LibreOffice 4.2.4 the same manipulations have a normal behaviour : 
- the image appears instantly after being chosen
- the image appears correctly, both in design mode and slideshow
- once the image is inserted in the Content, the ". Click to add text" disappears, the rectangle has been replaced by the image.
Comment 5 Ariel Constenla-Haile 2014-09-12 10:11:43 UTC
And if you switch to another layout, the picture is gone.
Comment 6 slacka 2014-10-04 21:56:21 UTC
Adding Armin to the CC because he's been working on the Impress graphics engine. Do you have any idea why the slideshow is broken in 4.1?
Comment 7 slacka 2014-10-04 23:10:34 UTC
This may not be display issue. Impress slides created in LO and AOO <=4.0 show the pictures fine in AOO 4.1+. Slides created in AOO 4.1+ are corrupted showing blank images in the slideshow when viewed in all version of AOO and LO.

Oliver, any thoughts?
Comment 8 Regina Henschel 2014-10-05 13:08:37 UTC
Read issue 124784, issue 123922 and issue 125387 too. The problem is, that version 4.1+ put the image into the background of a text frame, if some is present. The frame need not be activated, being present is sufficient. Effected are presentation objects "Outline text" and "Subtitle" and graphic object "Text frame" as well.

The fact, that the picture is not shown, is a side effect. The presentation object is not shown in presentation mode, because it has only the placeholder info but no real content. If you add some words, the presentation object and its background is shown in presentation mode too.

Workaround for version 4.1: Insert a slide with a blank layout. Insert the picture into that slide and from there copy and paste it to the target place.
Comment 9 Regina Henschel 2014-11-20 19:06:50 UTC
*** Issue 125883 has been marked as a duplicate of this issue. ***
Comment 10 Regina Henschel 2014-12-30 01:30:57 UTC
Perhaps introduced with fix for issue 123922 (cs 1565510)?
Comment 11 Regina Henschel 2014-12-31 13:01:11 UTC
The fix for issue 123922 has introduced a new behavior in sd/Source/ui/view/sdview4.cxx in method View::InsertGraphic.

When you click on the "insert picture" button in the middle of an empty presentation object type 'text', then the presentation object becomes selected automatically. With the new behavior you get in line #27:
pPickObj is true
!bIsGraphic is true since bIsGraphic is false
pPickObj->IsClosedObj is true
Therefore the case is cought and the selected presentation object is filled with the picture as background.

Clicking on the button should not select the empty presentation object, then pPickObj would not exist.

This is not the only error. Filling an empty presentation object, when nothing is selected, is a different error. But I don't know the reason yet.
Comment 12 Regina Henschel 2014-12-31 19:05:16 UTC
Further investigations show, that pPickObj exists, when any empty outline text is on the slide, whether it is selected or not. So in my previous comment "then pPickObj would not exist" is not right.

Why?

The method InsertGraphic is called by FuInsertGraphic::DoExecute in sd/source/ui/fuinsert.cxx

It gets the pPickObj from the call GetEmptyPresentationObject(PRESOBJ_GRAPHIC) and in case that fails, from a single marked object if any.

View::GetEmptyPresentationObject resides in sd/source/ui/view/sdview5.cxx

GetEmptyPresentationObject first looks, whether a single object is marked and IsEmptyPresObj() and whether it belongs to those PresObjKind listed in implIsMultiPresObj. It does not test the kind given in the parameter (in our case a PRESOBJ_GRAPHIC), but returns any marked object in that list, which IsEmptyPresObj(). So it will return any marked empty outline text. For me this looks erroneous, I expect that a marked object is only returned if it has the in the parameter given kind.

In case no object is marked, GetEmptyPresentationObject iterates through all objects of given kind (here PRESOBJ_GRAPHIC) and returns the first with IsEmptyPresObj(). 

At last step GetEmptyPresentationObject iterates through all from GetPresentationShapeList and returns the first one with meets IsEmptyPresObj() && implIsMultiPresObj(). Here too the kind given in the parameter is not tested, but all kind listed in implIsMultiPresObj will meet. The first one listed is the kind PRESOBJ_OUTLINE. This behavior looks erroneous too for me.

Do objects of kinds listed in implIsMultiPresObj() other than PRESOBJ_OUTLINE can be an IsEmptyPresObj()? What it the purpose of method GetEmptyPresentationObject?

The error has other manifestations too:
Take a slide with an empty outline text. Do not mark the outline text. Insert a formula. The formula replaces the outline text.
Take a slide with an empty outline text and a formula. (To get the formula insert it from clipboard.) Mark the formula. Insert picture from file. The background of the formula should be filled, but the outline text is filled instead.
Comment 13 Regina Henschel 2015-01-05 13:48:50 UTC
Filling the background of the placeholder outline can be fixed by adding the condition
 &&!(pPickObj->IsEmptyPresObj() )
to the "if" in line #112 in View::InsertGraphic in sdview4.cxx

But following problem remains:
When a placeholder outline is present, then inserting not via overlay but directly, or inserting a formula, this will replace the placeholder outline object. This happens even in the case another object (e.g. graphic or picture) is selected.
Comment 14 SVN Robot 2015-01-09 08:50:22 UTC
"regina" committed SVN revision 1650314 into trunk:
#i125613# Insert Picture from file do not work
Comment 15 Logan 2015-02-10 01:04:02 UTC
(In reply to SVN Robot from comment #14)
> "regina" committed SVN revision 1650314 into trunk:
> #i125613# Insert Picture from file do not work

My team and I are aiming to fix bugs and thought that this would be a good one to try. Even with the revision, does the bug need to be fixed? We would like to fix this issue.
Comment 16 Regina Henschel 2015-02-10 01:16:04 UTC
"Commited into trunk" means, that the fix is integrated in the source. The daily builds on http://ci.apache.org/projects/openoffice/install/ should work well. If you find, that a daily build still shows this error, please write a note here.

So no, this is not a "good one to try", because it is already fixed. Please write a mail to dev@openoffice.apache.org. We can help you finding an interesting task.
Comment 17 jmpoo 2015-02-12 23:37:07 UTC
Tested with AOO 4.2.0 r1658822 de
Works fine.

So the issue should be closed as "fixed"?
Comment 18 Keith N. McKenna 2015-02-13 00:33:52 UTC
Changed to resolved fixed per reporter jmpoo in Comment 17
Comment 19 oooforum (fr) 2015-04-24 08:14:23 UTC
*** Issue 126265 has been marked as a duplicate of this issue. ***
Comment 20 oooforum (fr) 2015-08-31 08:05:02 UTC
*** Issue 126493 has been marked as a duplicate of this issue. ***
Comment 21 Andrea Pescetti 2015-09-26 17:57:42 UTC
@regina: since this was a bugfix you took care of and it is a regression, do you want to see it ported to OpenOffice 4.1.2?
Comment 22 Regina Henschel 2015-09-26 21:29:15 UTC
Yes, a port to AOO 4.1.2 would be useful. The bug is really annoying and I do not read complains that the fix does not work.
Comment 23 Andrea Pescetti 2015-09-26 23:21:11 UTC
As per discussion in the issue: approved for 4.1.2. Regina: feel free to merge it yourself or ask me/anyone to do it.
Comment 24 SVN Robot 2015-09-27 08:24:23 UTC
"pescetti" committed SVN revision 1705514 into branches/AOO410:
#i125613# Fix "Insert Picture from file does not work".
Comment 25 Pedro 2015-10-09 11:37:14 UTC
Confirmed fixed with

AOO412m1(Build:9780)  -  Rev. 1705625
2015-09-28 12:45:04 (Mo, 28 Sep 2015)

under Windows XP Pro x86 SP3
Comment 26 Regina Henschel 2015-10-15 09:45:30 UTC
*** Issue 124784 has been marked as a duplicate of this issue. ***
Comment 27 erikt 2015-11-10 19:50:44 UTC
HELP!!!

I installed OO 4.1.2, but I still encountered the problem twice. Symptoms: I use a slide lay-out with only a title box. Choose insert picture from file. The picture I am inserting is a TIFF file. I place it in the middle of the slide. So far so good.

After doing some more updates to the presentation the picture was gone again. I have no clue yet what the exact conditions were how the picture disappeared, but it could be when switching between slide sorter and normal display.

If I see it happening again, I will save the file and upload it.
Comment 28 Pedro 2016-08-31 09:46:24 UTC
(In reply to erikt from comment #27)
> HELP!!!
> 
> I installed OO 4.1.2, but I still encountered the problem twice. Symptoms: I
> use a slide lay-out with only a title box. Choose insert picture from file.
> The picture I am inserting is a TIFF file. I place it in the middle of the
> slide. So far so good.
> 
> After doing some more updates to the presentation the picture was gone
> again. I have no clue yet what the exact conditions were how the picture
> disappeared, but it could be when switching between slide sorter and normal
> display.
> 
> If I see it happening again, I will save the file and upload it.

Hi erikt

That is not the same problem as the one reported in the bug. If you are able to replicate your problem, please open a new bug report and attach the sample file. Thank you for contributing to the improvement of OpenOffice!

I have Verified that the reported bug is Fixed in AOO420m1(Build:9800) - Rev. 1757080 under Windows 7 Pro x64 SP1
Comment 29 Kay 2016-08-31 22:24:55 UTC
Closing based on verification.
Comment 30 oooforum (fr) 2018-01-23 17:29:50 UTC
*** Issue 127654 has been marked as a duplicate of this issue. ***