Issue 98267 - Page numbers increase continuously when inserting a video file as linked section
Summary: Page numbers increase continuously when inserting a video file as linked section
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: DEV300m37
Hardware: PC All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: needhelp
: 92460 (view as issue list)
Depends on:
Blocks: 84292
  Show dependency tree
 
Reported: 2009-01-20 03:41 UTC by amy2008
Modified: 2017-05-20 11:17 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Can be reproduced with this avi (2.15 MB, application/octet-stream)
2009-01-20 09:21 UTC, michael.ruess
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description amy2008 2009-01-20 03:41:16 UTC
Can reproduce it with DEV300m37 on WinXP and Fedora

How to reproduce ti
1 Open a new Writer document
2 Insert - Section, "Insert Section" dialog opens, switch to "Section" Tab and
  check "link", hit the button at the end of "File name", "Insert" dialog opens,
  choose any video file and then click "Insert" button, come back to "Insert
  Section" dialog

Result
Page number on the left of writer file increases continuously untile you click 
the file, OOo hangs

Expectation
If can't insert video files for sections, shouldn't show these video format 
files in the "Insert" dialog. In this way, OOo can works well
Comment 1 michael.ruess 2009-01-20 09:21:18 UTC
Created attachment 59514 [details]
Can be reproduced with this avi
Comment 2 michael.ruess 2009-01-20 09:26:19 UTC
MRU->OD: can be reproduced with the attached avi file. Insert this as linked
section and Writer will end u in a loop. Maybe it is, because the avi is
interpreted as text file having many page break bytes?
Comment 3 michael.ruess 2009-01-20 09:41:08 UTC
Sorry, a correction: it does not end up in a loop, it "just" needs very long
time. about 14000 pages are created. 
MRU->OD: I guess, there's nothing to fix - every is allowed to use a file of any
extension as a text file if he likes to... what do you think?
Comment 4 amy2008 2009-01-21 02:07:36 UTC
Meiying -> MRU,
I think you are right. Indeed video files can be imported with disorder code.
So, I advise that our application may not show video format files in 
the "Insert" dialog if can't insert video files for sections. In this way, OOo 
can works well. 
Defect -> Enhancement
Comment 5 Oliver-Rainer Wittmann 2009-01-23 13:54:17 UTC
Yes, nothing to fix here, but the user interface's feedback could be improved.

My proposal is the following:
Do not touch the "Insert" dialog, but perform a file type detection on the
selected file. When the detected file format does not represent a text
document's file format provide a message to the user containing this information
and ask her/him, if she/he wants OOo to treat this file as a plain text file. If
the user denies, the selected file is rejected, the "Insert" dialog is presented
again and the user can select again or cancel the selection.

Anybody volunteering to evaluate possible solutions and to implement the chosen
solution?
Comment 6 Mathias_Bauer 2009-05-25 12:27:51 UTC
*** Issue 92460 has been marked as a duplicate of this issue. ***
Comment 7 Mathias_Bauer 2009-05-25 12:39:31 UTC
The same problem can be found by "insert file". Thus issue 92460 is a duplicate
of this one. 

BTW: the idea with the type detection won't work as issues 92460 shows that
Video and other binary formats are indeed accepted or at least suggested to be
accepted as "encoded text". We must find a way to detect binary stuff before we
dump it into our core where a clean exit isn't possible in most cases.

So my proposal is to fix the "(encoded) text" filter in a way that the file to
be imported is first imported into a simple text engine and it is rejected if
the number of characters per paragraph exceeds our possible limit or if the
encoding selected by the user shows does not allow to import the file as
anything useful. All this would happen in the type detection step, not in the
import code itself.
Comment 8 Marcus 2017-05-20 11:17:40 UTC
Reset assigne to the default "issues@openoffice.apache.org".