Apache OpenOffice (AOO) Bugzilla – Issue 121443
Insert picture (from file) focus jumps to end of document
Last modified: 2017-05-20 10:35:30 UTC
Inserting a picture mid document causes the following: 1. Writer assumes I want to go to the bottom of the very last page of my document. I don't - I want to stay with the picture. 2. Writer assumes I want the picture in front of all of my text. I don't, I want the text to be wrapped top and bottom. Even when I change the wrapping to "none" which seems to mean top and bottom it is still in front of all the text. I have to drag it around a few times and resize it to get it to top and bottom wrap.
@James: In general a picture inserted via Menu - Insert - Picture - From file is inserted at the position where the cursor is located. It is anchored at the paragraph the cursor is in with wrapping style "None". By your description I assume that your Frame Style "Graphics" somehow had changed. Can you attach a sample document in order to reproduce the described behavior? The sample document would contain the definition of the Frame Style "Graphics". Thus, it would be possible to check my assumption.
Comment #0 is about 2 different issues: re 1: Inserting an image makes Writer jump its view to the end of the document. Which is a known issue (see Bug #50867, with a number of duplicates, recently Bug #121219). I have attached a sample doc at Bug #50867. re 2: If you drag an image to the document, Writer (AOO 3.4.1, AOO350m1 Build:9611 Rev. 1420743/2012-12-13) inserts it centered with anchor to paragraph and optimal page-wrap (according to dialog settings). You have to change it for every image, of course, to whatever you like. "No wrap" seems (for me) to do what James wants - text follows after the image. But there is a bug with the default placemant after d&d or Insert: If I change the wrap back to "optimal page-wrap" it looks different than immediately after the d&d (which actually looked like "wrap-through").
Created attachment 80052 [details] Screen shot
Created attachment 80053 [details] Example document
@Oliver: Sorry about the late reply, its been a busy few weeks. The sample stfhell gives at Bug #50867 is a good example of my first point. The drag-and-drop solution suggested works well. I have attached a sample document for the second point; at the end of page two I have inserted some text I want a picture to be anchored to, one picture per line. Here are the steps I take: 1. Select the start of the sentence "I want a picture above this text 1" 2. Go to Menu - Insert - Picture - From file and select the picture 3. Picture inserted in the correct position :-) 4. Select the start of the sentence "I want a picture above this text 2" 5. Go to Menu - Insert - Picture - From file and select the picture 6. Picture inserted is over the top of the previous picture and in this example the text is over the top of other text too. Additionally the problem only seems to occur on images that aren't the full width of the page, the images I am using are between 413 px wide x 635 px high and 749 px wide x 1141 px high. @stfhell: Thanks for the drag-and-drop tip!
(In reply to comment #5) > 2. Go to Menu - Insert - Picture - From file and select the picture > 3. Picture inserted in the correct position :-) OO jumping to the end (or start of the document) when frames or images are edited does not happen in all documents. I have edited documents where everything works as it should (as in your sample doc), documents where Writer always jumps (like attachment #80046 [details]), and documents where it sometimes jumps. It's a mystery to me what exactly triggers this behaviour. But I don't think inserting an image via menu or d&d makes a difference. > 4. Select the start of the sentence "I want a picture above this text 2" > 5. Go to Menu - Insert - Picture - From file and select the picture > 6. Picture inserted is over the top of the previous picture and in this > example the text is over the top of other text too. > > Additionally the problem only seems to occur on images that aren't the full > width of the page, the images I am using are between 413 px wide x 635 px > high and 749 px wide x 1141 px high. If anchor, position and flow settings are correct, this should work. When I insert an image (small or big) in your sample doc, it does not overlay any text (AOO 3.4.1/Linux64). In your screenshot, a paragraph overlays a different paragraph, which shouldn't happen. Can you save the document and reload it with overlaid text still visible? If you want a paragraph with an image on top of it to appear on the same page (with no page break between image and text), the only secure solution is to insert a frame that contains both image and text. Otherwise there can be page breaks after the image.
Need further verification
(In reply to comment #5) > @Oliver: > Sorry about the late reply, its been a busy few weeks. > The sample stfhell gives at Bug #50867 is a good example of my first point. > The drag-and-drop solution suggested works well. > > > I have attached a sample document for the second point; at the end of page > two I have inserted some text I want a picture to be anchored to, one > picture per line. Here are the steps I take: > 1. Select the start of the sentence "I want a picture above this text 1" > 2. Go to Menu - Insert - Picture - From file and select the picture > 3. Picture inserted in the correct position :-) > 4. Select the start of the sentence "I want a picture above this text 2" > 5. Go to Menu - Insert - Picture - From file and select the picture > 6. Picture inserted is over the top of the previous picture and in this > example the text is over the top of other text too. > > Additionally the problem only seems to occur on images that aren't the full > width of the page, the images I am using are between 413 px wide x 635 px > high and 749 px wide x 1141 px high. > > @stfhell: > > Thanks for the drag-and-drop tip! point 6 doesn't happen to me.
No jump to last page and no picture over picture.
Created attachment 81452 [details] Test document with more that 100 pages - Open the attached document - Put the cursor at the beginning of the document - Open the Gallery from the Sidebar - Right-click on any graphic, and from the context menu select Insert - Link - The document view jumps to the end of the document, though the graphic is selected
Reopening It is reproducible with the document in attachment 81452 [details]
Other related/duplicated bugs: Bug 50867 Bug 121219
*** Issue 123393 has been marked as a duplicate of this issue. ***
I often see that during my daily work and also with Sample document "2013-09-04 22:28 CEST, Ariel Constenla-Haile ": 1. Open Document from AOO Start Center 2. With Find Toolbar find String "Gregor selbst mußte handeln" (page 90 or so) 3. Click behind dot at end of that sentence. 4. Open Gallery -> Homepage 5. Click arbitrary picture (bludown) -> Drag and Drop it to caret position behind paragraph First problem (irrelevant here): as soon as mouse pointer reaches paper sheet area focus changes, for me to page 7. Because I was not able to find old caret position I moved Mouse Pointer behind dot of "Beginn der abwärts führenden Treppe" and released mouse button > Picture became inserted between paragraphs, anchored to paragraph. Second problem: As soon as I released mouse button, focus changed to end of document (bottom right corner of last page becomes visible). Additional info: ---------------- a) original test with "AOO 4.0.1 RC3 – German UI / German locale [Rev. 1524958 2013-09-20 11:40:29]" on German WIN7 Home Premium (64bit)", “historic” 4.0 User Profile used for all predecessor versions b) Behaviour with other Versions: b1) OOo 3.1.1: First problem does exist, second does not. b2) AOO 3.4.1 as OOo 3.1.1, same OOo 1.1.1 c) First problem is irrelevant here, because not visible when insert picture from file or similar d) Second problem (relevant here) reproducible in Step 5 you use 'rightclick on gallery picture -> Add -> Copy' e) Are we really sure concerning Version (in selector) 3.4.1 ? I can't reproduce the problem with that version on WIN g) I reduce Summary to reproducible part of the report, if someone can reproduce the other problems from originla report please submit separate new bugs @Edwin: Strange! What AOO Version? What OS?
h) Strange Variation with server installation of " AOO 4.0.0-Dev – English UI / German locale [AOO400m1(Build:9700) - Rev. 1457992 - Rev.1457606]" on German WIN7 Home Premium (64bit)", own separate user profile: after My step 5 focus first jumps to end of document, after less than 1 second to begin of document. i) Problem is not limited to pictures, with document 2013-09-04 22:28 and "AOO 4.0.1 RC3 – German UI / German locale [Rev. 1524958 2013-09-20 11:40:29]" on German WIN7 Home Premium (64bit)", “historic” 4.0 User Profile used for all predecessor versions (others not tested I also see the problem after my step 5 for 'Insert -> Frame', but not for other objects like Chart, Forumla, ...
*** Issue 124550 has been marked as a duplicate of this issue. ***
Duplicate bug *** This issue has been marked as a duplicate of issue 124721 ***
Here we have a useful sample document, 9 followers, 2 DUPS, a developer in CC ... Issue 124721: no DUPs, no Developer in CC, a rather unhandy sample document In such a case, where all indications advise to make Issue 124721 a DUP of this one, it would be wise to follow a developer's advice Issue 124721 Comment 11
reopening
Original attachment - attachment 80053 [details] is irreproducible for me. Attachment 81452 [details] shows a momentarily jump while attachment of issue 124721 shows a permanent jump. -> issues may be related but not duplicate.
*** Issue 124190 has been marked as a duplicate of this issue. ***
This is a confirmed bug, with duplicates, reports on users lists and sample document available. Unfortunately, there is no patch available yet. But it seems worth a look for release 4.1.1 if possible.
I experimented a litle bit with the trunk version. It starts to happen with 31 pages, does not happen with 30 pages. To reproduce: - New writer - DT + F3 (test text) - copy all - insert/field/page number - cursor one back - paste until 30 or 31 pages reached - scroll half up, set cursor somewhere - D&D pic from gallery (used homepage/bludown as described) -> 30P -> focus stays at inserted graphic, can be moved with cursor -> 31P -> inserted graphic selected, no focus on text at all, display jumps to last paragraph on last page Thus depends on content of document, probably number of pages, also possible paragraphs or chars. This may hint to some overrun in some selection calculation. Also possible is a problem with the involved vertical scrollbar (wasn't there a problem in the mac version, too?)
Another guess: maybe that the max distance on page 31 from top page in twips comes close or goes over 65536 twips, that would be a candidate for numerical problems...
taking over to work on a solution
defect cause: In text documents with more than 30 pages ridiculous 'layout algorithm optimization code' is triggered - the newly inserted text frame or graphic is not registered at the page its anchor is on, but at a page at the end of the document. This suppresses the formatting of the newly inserted text frame/graphic - its position. But the newly inserted text frame/graphic is selected and the selection is made visible. Due to the fact that the text frame/graphic is not formatted its position is not set. Thus, its area which is made visible is not the one at which the text frame/graphic has been inserted. A solution is in progress. When the solution is available we should consider its integration into the planned 4.1.1 release.
"orw" committed SVN revision 1610671 into trunk: 121443: - register text frames and graphics on the correct page frame
fixed on trunk +1 for its integration into planned 4.1.1 release as issue 50867, issue 121219 and issue 124721 are also fixed by the provided fix.
grant showstopper flag, fix available
"orw" committed SVN revision 1610722 into branches/AOO410: 121443: - register text frames and graphics on the correct page frame
fixed on branch AOO410 for planned 4.1.1 release
Current available build AOO 4.1.1 M2(AOO411m2(Build:9771) - Rev. 1608452 2014-07-07 15:29:02 (Mon, 07 Jul 2014)) doesn't include the fix, waiting for next build(M3)
Verified this issue is fixed on Windows 8 AOO 4.1.1 m4 , build : 9774 Now im able to insert pictures in between text . I see that a small space is also added ,on top of the picture ,when its inserted,im not sure if that is expected . Yuzhen,can you confirm that is as expected ? (Attaching a screenshot ) thanks Rekha
Created attachment 83780 [details] Small space added after Image inserted between text
Thanks Rekha for your verification. I have checked and do not see the small space added on top of the picture with build AOO RC1, aka AOO411m4(Build:9774) - Rev. 1614049. I also can not figure out where is the small space in attachment 83780 [details], could you please indicate? I think it is not expected behavior for an extra space, could you please create a new bug after we confirm this? The problem described in this bug is verified fixed, I will mark it verified.