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

dam...@apache.org changed:

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

--- Comment #9 from dam...@apache.org ---
Let's see, this might be an easy fix.

Calc's filters are in main/sc/source/filters, but CSV is not there.

Importing a CSV must set values to cells, and if we put a breakpoint on a sets
values to cells, we should be able to backtrace to the CSV code. Unfortunately
that was hard to find.

Setting a breakpoint on the POSIX open() function ("break --qualified open")
instead showed many files opening, and the one I was trying to test was only
being opened while detecting the file type, and never again.

Grepping through main/sc and looking around I eventually found
main/sc/source/ui/docshell/impex.cxx does get involved in importing CSV, and
calls ScDocument::SetString() to populate cells. Setting a breakpoint on that
finally got me a nice stack trace through the CSV import code path:

#0  ScImportExport::ExtText2Doc(SvStream&) (this=this@entry=0x7fffffffc1a8,
rStrm=...) at source/ui/docshell/impex.cxx:1154
#1  0x000000080c61b55c in ScImportExport::ImportStream(SvStream&, String
const&, unsigned long) (this=0x7fffffffc1a8, rStrm=..., rBaseURL=..., nFmt=1)
at source/ui/docshell/impex.cxx:450
#2  0x000000080c5c27fb in ScDocShell::ConvertFrom(SfxMedium&)
(this=0x80b27ae10, rMedium=...) at source/ui/docshell/docsh.cxx:1211
#3  0x000000080141a88d in SfxObjectShell::DoLoad(SfxMedium*) (this=0x80b27ae10,
pMed=0x81168e4b0) at source/doc/objstor.cxx:753
#4  0x000000080144b5ee in
SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&) (this=0x8116b9a00, seqArguments=<optimized out>) at
source/doc/sfxbasemodel.cxx:1878

Starting at frame #1,
sal_Bool ScImportExport::ImportStream( SvStream& rStrm, const String& rBaseURL,
sal_uLong nFmt )

already gets an opened SvStream, which explains why it was never calling
open().  Now let's understand how it works, and where the 64K line length limit
comes in.

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

Reply via email to