summaryrefslogtreecommitdiff
path: root/doc/excel-formcontrols-import-export-notes.txt
blob: e9dcce634391c6deba102cfd0926265e9929e339 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
form control objects imported by

XclImpTbxControlObj


where 

XclImpControlObjHelper
     /|\ 
      |
XclImpDrawObjBase
     /|\ 
      |
XclImpDrawingObj
     /|\ 
      |
XclImpTbxControlObj

key methods are 
o CreateSdrObject - factory to create the correct 'type' of object
o DoProcessObj -    object specific processing e.g. for shape, control, note etc.

XclImpTbxControlObj::DoProcessSdrObj()  xiescher.cxx:943
XclImpDrawObjBase::ProcessSdrObject () xiescher.cxx:561
XclImpDffManager::ProcessObj() xiescher.cxx:1779 - note: after processing the object t is inserted into the solver container, there is a map between the shapeId and the SdrObject - useful I guess for postprocessing
SvxMSDffManager::ImportShape() msdffimp.cxx:5425 - imports the shape e.g. size, position, font specifics etc. it also calls XclImpDffManager::ProcessObj() at xiescher.cxx:1681
  XclImpDffManager::ProcessObj() calls XclImpDffManager::CreateCustomSdrObject() which calls XclImpDffManager::CreateSdrObject() 
SvxMSDffManager::ImportObj () msdffimp.cxx:4657 - calls appropriate sub processing importShape or importGroup
XclImpDffManager::ProcessShContainer () at xiescher.cxx:1927 - imports the object
XclImpDffManager::ProcessShGrContainer() at xiescher.cxx:1895 this fellow then loops for the DFF_msofbtSpgrContainer reading each record ( shape )
XclImpDffManager::ProcessDgContainer () at xiescher.cxx:1869  - called in a loop, depending on the record ( DFF_msofbtSolverContainer or DFF_msofbtSpgrContainer ) a ProcessSolverContainer or ProcessShGrContainer call is made

XclImpDffManager::ProcessDrawing() - called once per tab

XclImpTbxControlObj ( and other subclasses of XclImpDrawObjBase are created by XclImpDrawObjBase::ReadObjCmo ( static ) called by the objectmanager

The bones of the object ( formcontrol ) specific import happens in XclImpTbxControlObj::ReadSubRecord() where local variables are populated. The next stage is when XclImpTbxControlObj::DoProcessSdrObj is called. At the point the info stored by the local variables ( things like state, control name etc. ) are set on the uno object via the XPropertySet associated with the imported control. Access to the XPropertySet is given by XclImpControlObjHelper:: GetControlPropSet()

Export
======

XclImpTbxControlObj(s) are all created before exporting  ( so there is some chance to tweak them )

#0  XclExpTbxControlObj (this=0x8a2b280, rRoot=@0x8916580, xShape=@0xbfbbcdf4) at /data4/CWS/npower10/src680-m241/sc/source/filter/excel/xeescher.cxx:341
#1  0xb1801e72 in XclExpOcxConverter::CreateCtrlObj (this=0x8916558, xShape=@0xbfbbce4c) at /data4/CWS/npower10/src680-m241/sc/source/filter/excel/xlocx.cxx:335
#2  0xb1817162 in XclEscherEx::StartShape (this=0x89164a8, rShape=@0xbfbbd238) at /data4/CWS/npower10/src680-m241/sc/source/filter/xcl97/xcl97esc.cxx:253
#3  0xb0c521fe in ImplEESdrWriter::ImplWriteShape (this=0x89e0374, rObj=@0xbfbbd238, rSolverContainer=@0x8a28f38, ePageType=NORMAL) at /data4/CWS/npower10/src680-m241/svx/source/msfilter/eschesdo.cxx:255
#4  0xb0c55da2 in ImplEESdrWriter::ImplWritePage (this=0x89e0374, rSolverContainer=@0x8a28f38, ePageType=NORMAL) at /data4/CWS/npower10/src680-m241/svx/source/msfilter/eschesdo.cxx:990
#5  0xb0c55e22 in ImplEscherExSdr::ImplWriteCurrentPage (this=0x89e0370) at /data4/CWS/npower10/src680-m241/svx/source/msfilter/eschesdo.cxx:1082
#6  0xb0c55e62 in EscherEx::AddSdrPage (this=0x89164a8, rPage=@0x86a4aa0) at /data4/CWS/npower10/src680-m241/svx/source/msfilter/eschesdo.cxx:1101
#7  0xb1816a0b in XclEscher::AddSdrPage (this=0x89c7938, rRoot=@0x8a230dc) at /data4/CWS/npower10/src680-m241/sc/source/filter/xcl97/xcl97esc.cxx:409
#8  0xb16802ad in ExcTable::FillAsTable (this=0x8a230d8, nCodeNameIdx=0) at /data4/CWS/npower10/src680-m241/sc/source/filter/excel/excdoc.cxx:377
#9  0xb16821d9 in ExcDocument::ReadDoc (this=0x8928220) at /data4/CWS/npower10/src680-m241/sc/source/filter/excel/excdoc.cxx:488
#10 0xb169dde3 in ExportBiff5::Write (this=0xbfbbd648) at /data4/CWS/npower10/src680-m241/sc/source/filter/excel/expop2.cxx:115
#11 0xb16859fa in ScExportExcel5 (rMedium=@0x8916710, pDocument=0x85fed28, bBiff8=1 '\001', eNach=1) at /data4/CWS/npower10/src680-m241/sc/source/filter/excel/excel.cxx:252

ImplEESdrWriter::ImplWritePage() - write shapes on a page
{
    ImplEESdrWriter::ImplWriteShape() - writes a shape
    {
        strange is seems to have a local shape id ( ahh used when called recusively )
        it also handles (recursively of course ) some group related foo ( that I don't understand )
        ExlEscherEx::StartShape() creates the ExcExpTbxControl object, there seems to be some support for grouping ( via pumping info in pCurrAppData [ XclEscherHostAppData ] & pCurrXclObj [ XclObjAny ] into a stack 
            pCurrAppData is pumped with various data 
               * Anchor data
               * ClientTextbox etc. 
    )

}


saving the subRecords is triggered from

#0  XclExpTbxControlObj::WriteSubRecs (this=0x8aead70, rStrm=@0x8acfa98) at /data4/CWS/npower10/src680-m241/sc/source/filter/excel/xeescher.cxx:588
#1  0xb181dab5 in XclObj::WriteBody (this=0x8aead70, rStrm=@0xbfbbd434) at /data4/CWS/npower10/src680-m241/sc/source/filter/xcl97/xcl97rec.cxx:461
#2  0xb17246df in XclExpRecord::Save (this=0x8aead70, rStrm=@0xbfbbd434) at /data4/CWS/npower10/src680-m241/sc/source/filter/excel/xerecord.cxx:89
#3  0xb1819418 in XclObj::Save (this=0x8aead70, rStrm=@0xbfbbd434) at /data4/CWS/npower10/src680-m241/sc/source/filter/xcl97/xcl97rec.cxx:481
#4  0xb1819a1e in XclObjList::Save (this=0x8ac7c30, rStrm=@0xbfbbd434) at /data4/CWS/npower10/src680-m241/sc/source/filter/xcl97/xcl97rec.cxx:365
#5  0xb1682aee in XclExpRecordList<XclExpRecordBase>::Save (this=0x8ac7bf8, rStrm=@0xbfbbd434) at ../inc/xerecord.hxx:281
#6  0xb167f307 in ExcTable::Write (this=0x8ac7be8, rStr=@0xbfbbd434) at /data4/CWS/npower10/src680-m241/sc/source/filter/excel/excdoc.cxx:452
#7  0xb167f46c in ExcDocument::Write (this=0x8ad30b8, rSvStrm=@0x8ab39f0) at /data4/CWS/npower10/src680-m241/sc/source/filter/excel/excdoc.cxx:534
#8  0xb169ddfb in ExportBiff5::Write (this=0xbfbbd648) at /data4/CWS/npower10/src680-m241/sc/source/filter/excel/expop2.cxx:116
#9  0xb16859fa in ScExportExcel5 (rMedium=@0x8ab2458, pDocument=0x8818bc8, bBiff8=1 '\001', eNach=1) at /data4/CWS/npower10/src680-m241/sc/source/filter/excel/excel.cxx:252
#10 0xb10bbbf2 in ScDocShell::ConvertTo (this=0x8818b90, rMed=@0x8ab2458) at


basically ExcDocument has member maTableList which stores Table ( sheet ) records, e.g.

maTableList.GetRecord( nTab )->Write( aXclStrm );

where each ExcTable has a list of (objects) to write XclExpTbxControlObj(s) are all created before exporting  ( so there is some chance to tweak them )

these tables are filled ( as per where the XclExpTbxControlObj(s) are all created above ) e.g. from 
ExcDocument::ReadDoc ()
   creates a ExcTable for each tab, and calls ExcTable::FillAsTable for each of those
ExcTable::FillAsTable ()