summaryrefslogtreecommitdiff
path: root/net/mac80211/key.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/key.h')
0 files changed, 0 insertions, 0 deletions
n>space:mode:
authorMichael Stahl <mstahl@redhat.com>2012-01-28 20:53:39 +0100
committerMichael Stahl <mstahl@redhat.com>2012-01-28 20:53:39 +0100
commit428df2c52fba1dfd728bff7bc981e00b983704dd (patch)
tree9e9f67205cd5b72f1031721273e1534a3a1e5b0f /lotuswordpro
parente4df1fafdafe23f6c36ecd3993bb30e71948e6dc (diff)
replace obsolete "master" branch with README that points at new repoHEADmaster-deletedmaster
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk84
-rw-r--r--lotuswordpro/Library_lwpft.mk240
-rw-r--r--lotuswordpro/Makefile39
-rw-r--r--lotuswordpro/Module_lotuswordpro.mk39
-rw-r--r--lotuswordpro/prj/build.lst2
-rw-r--r--lotuswordpro/prj/d.lst0
-rwxr-xr-xlotuswordpro/prj/makefile.mk40
-rw-r--r--lotuswordpro/qa/cppunit/data/fail/A14.lwpbin82280 -> 0 bytes
-rw-r--r--lotuswordpro/qa/cppunit/data/fail/IntPres11-2004.lwpbin5417924 -> 0 bytes
-rw-r--r--lotuswordpro/qa/cppunit/data/pass/A14.lwpbin82280 -> 0 bytes
-rw-r--r--lotuswordpro/qa/cppunit/data/pass/IntPres11-2004.lwpbin5417924 -> 0 bytes
-rw-r--r--lotuswordpro/qa/cppunit/test_lotuswordpro.cxx163
-rw-r--r--lotuswordpro/source/filter/LotusWordProImportFilter.cxx416
-rw-r--r--lotuswordpro/source/filter/LotusWordProImportFilter.hxx123
-rw-r--r--lotuswordpro/source/filter/bencont.cxx663
-rw-r--r--lotuswordpro/source/filter/benlist.cxx119
-rw-r--r--lotuswordpro/source/filter/benname.cxx85
-rw-r--r--lotuswordpro/source/filter/benobj.cxx131
-rw-r--r--lotuswordpro/source/filter/bento.hxx544
-rw-r--r--lotuswordpro/source/filter/bentoid.hxx113
-rw-r--r--lotuswordpro/source/filter/benval.cxx265
-rw-r--r--lotuswordpro/source/filter/clone.hxx85
-rw-r--r--lotuswordpro/source/filter/explode.cxx521
-rw-r--r--lotuswordpro/source/filter/explode.hxx128
-rw-r--r--lotuswordpro/source/filter/first.hxx82
-rw-r--r--lotuswordpro/source/filter/genericfilter.cxx46
-rw-r--r--lotuswordpro/source/filter/localtime.cxx194
-rw-r--r--lotuswordpro/source/filter/localtime.hxx76
-rw-r--r--lotuswordpro/source/filter/lwp9reader.cxx263
-rw-r--r--lotuswordpro/source/filter/lwp9reader.hxx92
-rw-r--r--lotuswordpro/source/filter/lwparrowstyles.hxx103
-rw-r--r--lotuswordpro/source/filter/lwpatomholder.cxx109
-rw-r--r--lotuswordpro/source/filter/lwpatomholder.hxx89
-rw-r--r--lotuswordpro/source/filter/lwpbackgroundoverride.cxx42
-rw-r--r--lotuswordpro/source/filter/lwpbackgroundoverride.hxx100
-rw-r--r--lotuswordpro/source/filter/lwpbackgroundstuff.cxx185
-rw-r--r--lotuswordpro/source/filter/lwpbackgroundstuff.hxx167
-rw-r--r--lotuswordpro/source/filter/lwpbasetype.cxx97
-rw-r--r--lotuswordpro/source/filter/lwpbasetype.hxx120
-rw-r--r--lotuswordpro/source/filter/lwpbookmarkmgr.cxx115
-rw-r--r--lotuswordpro/source/filter/lwpbookmarkmgr.hxx86
-rw-r--r--lotuswordpro/source/filter/lwpborderstuff.cxx255
-rw-r--r--lotuswordpro/source/filter/lwpborderstuff.hxx116
-rw-r--r--lotuswordpro/source/filter/lwpbreaksoverride.cxx288
-rw-r--r--lotuswordpro/source/filter/lwpbreaksoverride.hxx253
-rw-r--r--lotuswordpro/source/filter/lwpbulletstylemgr.cxx333
-rw-r--r--lotuswordpro/source/filter/lwpbulletstylemgr.hxx165
-rw-r--r--lotuswordpro/source/filter/lwpcelllayout.cxx950
-rw-r--r--lotuswordpro/source/filter/lwpcelllayout.hxx212
-rw-r--r--lotuswordpro/source/filter/lwpchangemgr.cxx344
-rw-r--r--lotuswordpro/source/filter/lwpchangemgr.hxx97
-rw-r--r--lotuswordpro/source/filter/lwpcharacterstyle.cxx208
-rw-r--r--lotuswordpro/source/filter/lwpcharacterstyle.hxx140
-rw-r--r--lotuswordpro/source/filter/lwpcharborderoverride.cxx171
-rw-r--r--lotuswordpro/source/filter/lwpcharborderoverride.hxx206
-rw-r--r--lotuswordpro/source/filter/lwpcharsetmgr.cxx118
-rw-r--r--lotuswordpro/source/filter/lwpcharsetmgr.hxx88
-rw-r--r--lotuswordpro/source/filter/lwpcolor.cxx154
-rw-r--r--lotuswordpro/source/filter/lwpcolor.hxx131
-rw-r--r--lotuswordpro/source/filter/lwpcontent.cxx154
-rw-r--r--lotuswordpro/source/filter/lwpcontent.hxx161
-rw-r--r--lotuswordpro/source/filter/lwpdefs.hxx426
-rw-r--r--lotuswordpro/source/filter/lwpdivinfo.cxx179
-rw-r--r--lotuswordpro/source/filter/lwpdivinfo.hxx169
-rw-r--r--lotuswordpro/source/filter/lwpdivopts.cxx136
-rw-r--r--lotuswordpro/source/filter/lwpdivopts.hxx123
-rw-r--r--lotuswordpro/source/filter/lwpdllist.cxx102
-rw-r--r--lotuswordpro/source/filter/lwpdllist.hxx107
-rw-r--r--lotuswordpro/source/filter/lwpdlvlist.cxx188
-rw-r--r--lotuswordpro/source/filter/lwpdlvlist.hxx208
-rw-r--r--lotuswordpro/source/filter/lwpdoc.cxx833
-rw-r--r--lotuswordpro/source/filter/lwpdoc.hxx253
-rw-r--r--lotuswordpro/source/filter/lwpdocdata.cxx398
-rw-r--r--lotuswordpro/source/filter/lwpdocdata.hxx194
-rw-r--r--lotuswordpro/source/filter/lwpdrawobj.cxx1488
-rw-r--r--lotuswordpro/source/filter/lwpdrawobj.hxx379
-rw-r--r--lotuswordpro/source/filter/lwpdropcapmgr.cxx84
-rw-r--r--lotuswordpro/source/filter/lwpdropcapmgr.hxx81
-rw-r--r--lotuswordpro/source/filter/lwpfilehdr.cxx94
-rw-r--r--lotuswordpro/source/filter/lwpfilehdr.hxx92
-rw-r--r--lotuswordpro/source/filter/lwpfilter.cxx511
-rw-r--r--lotuswordpro/source/filter/lwpfilter.hxx182
-rw-r--r--lotuswordpro/source/filter/lwpfnlayout.cxx398
-rw-r--r--lotuswordpro/source/filter/lwpfnlayout.hxx198
-rw-r--r--lotuswordpro/source/filter/lwpfont.cxx547
-rw-r--r--lotuswordpro/source/filter/lwpfont.hxx286
-rw-r--r--lotuswordpro/source/filter/lwpfootnote.cxx597
-rw-r--r--lotuswordpro/source/filter/lwpfootnote.hxx288
-rw-r--r--lotuswordpro/source/filter/lwpfoundry.cxx586
-rw-r--r--lotuswordpro/source/filter/lwpfoundry.hxx330
-rw-r--r--lotuswordpro/source/filter/lwpframelayout.cxx1289
-rw-r--r--lotuswordpro/source/filter/lwpframelayout.hxx243
-rw-r--r--lotuswordpro/source/filter/lwpfrib.cxx475
-rw-r--r--lotuswordpro/source/filter/lwpfrib.hxx142
-rw-r--r--lotuswordpro/source/filter/lwpfribbreaks.cxx168
-rw-r--r--lotuswordpro/source/filter/lwpfribbreaks.hxx107
-rw-r--r--lotuswordpro/source/filter/lwpfribframe.cxx249
-rw-r--r--lotuswordpro/source/filter/lwpfribframe.hxx100
-rw-r--r--lotuswordpro/source/filter/lwpfribheader.hxx138
-rw-r--r--lotuswordpro/source/filter/lwpfribmark.cxx1465
-rw-r--r--lotuswordpro/source/filter/lwpfribmark.hxx167
-rw-r--r--lotuswordpro/source/filter/lwpfribptr.cxx666
-rw-r--r--lotuswordpro/source/filter/lwpfribptr.hxx103
-rw-r--r--lotuswordpro/source/filter/lwpfribsection.cxx473
-rw-r--r--lotuswordpro/source/filter/lwpfribsection.hxx134
-rw-r--r--lotuswordpro/source/filter/lwpfribtable.cxx176
-rw-r--r--lotuswordpro/source/filter/lwpfribtable.hxx77
-rw-r--r--lotuswordpro/source/filter/lwpfribtext.cxx499
-rw-r--r--lotuswordpro/source/filter/lwpfribtext.hxx233
-rw-r--r--lotuswordpro/source/filter/lwpglobalmgr.cxx168
-rw-r--r--lotuswordpro/source/filter/lwpglobalmgr.hxx105
-rw-r--r--lotuswordpro/source/filter/lwpgrfobj.cxx822
-rw-r--r--lotuswordpro/source/filter/lwpgrfobj.hxx143
-rw-r--r--lotuswordpro/source/filter/lwpheader.hxx87
-rw-r--r--lotuswordpro/source/filter/lwpholder.cxx121
-rw-r--r--lotuswordpro/source/filter/lwpholder.hxx132
-rw-r--r--lotuswordpro/source/filter/lwphyperlinkmgr.cxx84
-rw-r--r--lotuswordpro/source/filter/lwphyperlinkmgr.hxx85
-rw-r--r--lotuswordpro/source/filter/lwpidxmgr.cxx354
-rw-r--r--lotuswordpro/source/filter/lwpidxmgr.hxx119
-rw-r--r--lotuswordpro/source/filter/lwplayout.cxx2231
-rw-r--r--lotuswordpro/source/filter/lwplayout.hxx461
-rw-r--r--lotuswordpro/source/filter/lwplayoutdef.hxx173
-rw-r--r--lotuswordpro/source/filter/lwplaypiece.cxx463
-rw-r--r--lotuswordpro/source/filter/lwplaypiece.hxx395
-rw-r--r--lotuswordpro/source/filter/lwplnopts.cxx99
-rw-r--r--lotuswordpro/source/filter/lwplnopts.hxx101
-rw-r--r--lotuswordpro/source/filter/lwpmargins.hxx121
-rw-r--r--lotuswordpro/source/filter/lwpmarker.cxx582
-rw-r--r--lotuswordpro/source/filter/lwpmarker.hxx283
-rw-r--r--lotuswordpro/source/filter/lwpnotes.cxx329
-rw-r--r--lotuswordpro/source/filter/lwpnotes.hxx163
-rw-r--r--lotuswordpro/source/filter/lwpnumberingoverride.cxx182
-rw-r--r--lotuswordpro/source/filter/lwpnumberingoverride.hxx173
-rw-r--r--lotuswordpro/source/filter/lwpnumericfmt.cxx571
-rw-r--r--lotuswordpro/source/filter/lwpnumericfmt.hxx315
-rw-r--r--lotuswordpro/source/filter/lwpobj.cxx123
-rw-r--r--lotuswordpro/source/filter/lwpobj.hxx108
-rw-r--r--lotuswordpro/source/filter/lwpobjfactory.cxx761
-rw-r--r--lotuswordpro/source/filter/lwpobjfactory.hxx122
-rw-r--r--lotuswordpro/source/filter/lwpobjhdr.cxx204
-rw-r--r--lotuswordpro/source/filter/lwpobjhdr.hxx140
-rw-r--r--lotuswordpro/source/filter/lwpobjid.cxx254
-rw-r--r--lotuswordpro/source/filter/lwpobjid.hxx162
-rw-r--r--lotuswordpro/source/filter/lwpobjstrm.cxx419
-rw-r--r--lotuswordpro/source/filter/lwpobjstrm.hxx128
-rw-r--r--lotuswordpro/source/filter/lwpobjtags.hxx244
-rw-r--r--lotuswordpro/source/filter/lwpoleobject.cxx286
-rw-r--r--lotuswordpro/source/filter/lwpoleobject.hxx192
-rw-r--r--lotuswordpro/source/filter/lwpoverride.cxx650
-rw-r--r--lotuswordpro/source/filter/lwpoverride.hxx521
-rw-r--r--lotuswordpro/source/filter/lwppagehint.cxx120
-rw-r--r--lotuswordpro/source/filter/lwppagehint.hxx131
-rw-r--r--lotuswordpro/source/filter/lwppagelayout.cxx1060
-rw-r--r--lotuswordpro/source/filter/lwppagelayout.hxx174
-rw-r--r--lotuswordpro/source/filter/lwppara.cxx986
-rw-r--r--lotuswordpro/source/filter/lwppara.hxx427
-rw-r--r--lotuswordpro/source/filter/lwppara1.cxx671
-rw-r--r--lotuswordpro/source/filter/lwpparaborderoverride.cxx391
-rw-r--r--lotuswordpro/source/filter/lwpparaborderoverride.hxx289
-rw-r--r--lotuswordpro/source/filter/lwpparaproperty.cxx279
-rw-r--r--lotuswordpro/source/filter/lwpparaproperty.hxx313
-rw-r--r--lotuswordpro/source/filter/lwpparastyle.cxx810
-rw-r--r--lotuswordpro/source/filter/lwpparastyle.hxx131
-rw-r--r--lotuswordpro/source/filter/lwppiece.hxx204
-rw-r--r--lotuswordpro/source/filter/lwpproplist.cxx154
-rw-r--r--lotuswordpro/source/filter/lwpproplist.hxx102
-rw-r--r--lotuswordpro/source/filter/lwpprtinfo.cxx105
-rw-r--r--lotuswordpro/source/filter/lwpprtinfo.hxx95
-rw-r--r--lotuswordpro/source/filter/lwppttntbl.hxx144
-rw-r--r--lotuswordpro/source/filter/lwpresource.hxx68
-rw-r--r--lotuswordpro/source/filter/lwprowlayout.cxx488
-rw-r--r--lotuswordpro/source/filter/lwprowlayout.hxx137
-rw-r--r--lotuswordpro/source/filter/lwpsdwdrawheader.hxx296
-rw-r--r--lotuswordpro/source/filter/lwpsdwfileloader.cxx152
-rw-r--r--lotuswordpro/source/filter/lwpsdwfileloader.hxx89
-rw-r--r--lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx415
-rw-r--r--lotuswordpro/source/filter/lwpsdwgrouploaderv0102.hxx97
-rw-r--r--lotuswordpro/source/filter/lwpsdwrect.cxx233
-rw-r--r--lotuswordpro/source/filter/lwpsdwrect.hxx131
-rw-r--r--lotuswordpro/source/filter/lwpsection.cxx158
-rw-r--r--lotuswordpro/source/filter/lwpsection.hxx175
-rw-r--r--lotuswordpro/source/filter/lwpshadow.hxx119
-rw-r--r--lotuswordpro/source/filter/lwpsilverbullet.cxx474
-rw-r--r--lotuswordpro/source/filter/lwpsilverbullet.hxx189
-rw-r--r--lotuswordpro/source/filter/lwpslvlist.hxx86
-rw-r--r--lotuswordpro/source/filter/lwpsortopt.cxx108
-rw-r--r--lotuswordpro/source/filter/lwpsortopt.hxx105
-rw-r--r--lotuswordpro/source/filter/lwpstory.cxx553
-rw-r--r--lotuswordpro/source/filter/lwpstory.hxx204
-rw-r--r--lotuswordpro/source/filter/lwpstyledef.hxx260
-rw-r--r--lotuswordpro/source/filter/lwpsvstream.cxx139
-rw-r--r--lotuswordpro/source/filter/lwpsvstream.hxx105
-rw-r--r--lotuswordpro/source/filter/lwptable.cxx283
-rw-r--r--lotuswordpro/source/filter/lwptable.hxx239
-rw-r--r--lotuswordpro/source/filter/lwptablelayout.cxx1539
-rw-r--r--lotuswordpro/source/filter/lwptablelayout.hxx272
-rw-r--r--lotuswordpro/source/filter/lwptaboverride.cxx42
-rw-r--r--lotuswordpro/source/filter/lwptaboverride.hxx135
-rw-r--r--lotuswordpro/source/filter/lwptabrack.cxx133
-rw-r--r--lotuswordpro/source/filter/lwptabrack.hxx157
-rw-r--r--lotuswordpro/source/filter/lwptblcell.cxx264
-rw-r--r--lotuswordpro/source/filter/lwptblcell.hxx497
-rw-r--r--lotuswordpro/source/filter/lwptblformula.cxx808
-rw-r--r--lotuswordpro/source/filter/lwptblformula.hxx226
-rw-r--r--lotuswordpro/source/filter/lwptemp.hxx82
-rw-r--r--lotuswordpro/source/filter/lwptoc.cxx459
-rw-r--r--lotuswordpro/source/filter/lwptoc.hxx173
-rw-r--r--lotuswordpro/source/filter/lwptools.cxx919
-rw-r--r--lotuswordpro/source/filter/lwptools.hxx159
-rw-r--r--lotuswordpro/source/filter/lwpuidoc.cxx140
-rw-r--r--lotuswordpro/source/filter/lwpuidoc.hxx157
-rw-r--r--lotuswordpro/source/filter/lwpunoheader.hxx87
-rw-r--r--lotuswordpro/source/filter/lwpusewhen.hxx168
-rw-r--r--lotuswordpro/source/filter/lwpusrdicts.cxx87
-rw-r--r--lotuswordpro/source/filter/lwpusrdicts.hxx83
-rw-r--r--lotuswordpro/source/filter/lwpverdocument.cxx112
-rw-r--r--lotuswordpro/source/filter/lwpverdocument.hxx87
-rw-r--r--lotuswordpro/source/filter/lwpvpointer.cxx84
-rw-r--r--lotuswordpro/source/filter/lwpvpointer.hxx85
-rw-r--r--lotuswordpro/source/filter/tocread.cxx522
-rw-r--r--lotuswordpro/source/filter/tocread.hxx92
-rw-r--r--lotuswordpro/source/filter/ut.hxx104
-rw-r--r--lotuswordpro/source/filter/utbenvs.cxx170
-rw-r--r--lotuswordpro/source/filter/utlist.cxx213
-rw-r--r--lotuswordpro/source/filter/utlist.hxx158
-rw-r--r--lotuswordpro/source/filter/xfilter/ixfattrlist.hxx88
-rw-r--r--lotuswordpro/source/filter/xfilter/ixfcontent.hxx99
-rw-r--r--lotuswordpro/source/filter/xfilter/ixfobject.hxx90
-rw-r--r--lotuswordpro/source/filter/xfilter/ixfproperty.hxx74
-rw-r--r--lotuswordpro/source/filter/xfilter/ixfstream.hxx112
-rw-r--r--lotuswordpro/source/filter/xfilter/ixfstyle.hxx111
-rw-r--r--lotuswordpro/source/filter/xfilter/xfannotation.hxx117
-rw-r--r--lotuswordpro/source/filter/xfilter/xfarrowstyle.hxx128
-rw-r--r--lotuswordpro/source/filter/xfilter/xfbase64.cxx133
-rw-r--r--lotuswordpro/source/filter/xfilter/xfbase64.hxx82
-rw-r--r--lotuswordpro/source/filter/xfilter/xfbgimage.cxx161
-rw-r--r--lotuswordpro/source/filter/xfilter/xfbgimage.hxx153
-rw-r--r--lotuswordpro/source/filter/xfilter/xfbookmark.hxx128
-rw-r--r--lotuswordpro/source/filter/xfilter/xfbookmarkref.cxx100
-rw-r--r--lotuswordpro/source/filter/xfilter/xfbookmarkref.hxx101
-rw-r--r--lotuswordpro/source/filter/xfilter/xfborders.cxx370
-rw-r--r--lotuswordpro/source/filter/xfilter/xfborders.hxx192
-rw-r--r--lotuswordpro/source/filter/xfilter/xfbreaks.hxx144
-rw-r--r--lotuswordpro/source/filter/xfilter/xfcell.cxx305
-rw-r--r--lotuswordpro/source/filter/xfilter/xfcell.hxx262
-rw-r--r--lotuswordpro/source/filter/xfilter/xfcellstyle.cxx307
-rw-r--r--lotuswordpro/source/filter/xfilter/xfcellstyle.hxx203
-rw-r--r--lotuswordpro/source/filter/xfilter/xfchange.cxx163
-rw-r--r--lotuswordpro/source/filter/xfilter/xfchange.hxx148
-rw-r--r--lotuswordpro/source/filter/xfilter/xfcolor.cxx90
-rw-r--r--lotuswordpro/source/filter/xfilter/xfcolor.hxx129
-rw-r--r--lotuswordpro/source/filter/xfilter/xfcolstyle.cxx93
-rw-r--r--lotuswordpro/source/filter/xfilter/xfcolstyle.hxx110
-rw-r--r--lotuswordpro/source/filter/xfilter/xfcolumns.cxx210
-rw-r--r--lotuswordpro/source/filter/xfilter/xfcolumns.hxx178
-rw-r--r--lotuswordpro/source/filter/xfilter/xfconditionformat.hxx72
-rw-r--r--lotuswordpro/source/filter/xfilter/xfconfigmanager.cxx106
-rw-r--r--lotuswordpro/source/filter/xfilter/xfconfigmanager.hxx108
-rw-r--r--lotuswordpro/source/filter/xfilter/xfcontent.hxx98
-rw-r--r--lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx216
-rw-r--r--lotuswordpro/source/filter/xfilter/xfcontentcontainer.hxx141
-rw-r--r--lotuswordpro/source/filter/xfilter/xfcrossref.cxx103
-rw-r--r--lotuswordpro/source/filter/xfilter/xfcrossref.hxx107
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdate.cxx117
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdate.hxx133
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdatestyle.cxx190
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdatestyle.hxx259
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdefs.hxx513
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdocfield.cxx232
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdocfield.hxx199
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawareastyle.cxx97
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawareastyle.hxx143
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawcircle.cxx133
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawcircle.hxx141
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawellipse.cxx116
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawellipse.hxx155
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawgroup.hxx115
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawline.cxx123
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawline.hxx110
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawlinestyle.cxx121
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawlinestyle.hxx216
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawobj.cxx133
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawobj.hxx177
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawpath.cxx221
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawpath.hxx152
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawpolygon.cxx100
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawpolygon.hxx80
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawpolyline.cxx132
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawpolyline.hxx97
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawrect.cxx81
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawrect.hxx114
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx348
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawstyle.hxx165
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdropcap.hxx150
-rw-r--r--lotuswordpro/source/filter/xfilter/xfendnote.hxx127
-rw-r--r--lotuswordpro/source/filter/xfilter/xfendnoteconfig.hxx80
-rw-r--r--lotuswordpro/source/filter/xfilter/xfentry.cxx106
-rw-r--r--lotuswordpro/source/filter/xfilter/xfentry.hxx160
-rw-r--r--lotuswordpro/source/filter/xfilter/xffileattrlist.cxx80
-rw-r--r--lotuswordpro/source/filter/xfilter/xffileattrlist.hxx86
-rw-r--r--lotuswordpro/source/filter/xfilter/xffilestream.cxx197
-rw-r--r--lotuswordpro/source/filter/xfilter/xffilestream.hxx90
-rw-r--r--lotuswordpro/source/filter/xfilter/xffloatframe.cxx89
-rw-r--r--lotuswordpro/source/filter/xfilter/xffloatframe.hxx92
-rw-r--r--lotuswordpro/source/filter/xfilter/xffont.cxx410
-rw-r--r--lotuswordpro/source/filter/xfilter/xffont.hxx507
-rw-r--r--lotuswordpro/source/filter/xfilter/xffontdecl.cxx102
-rw-r--r--lotuswordpro/source/filter/xfilter/xffontdecl.hxx110
-rw-r--r--lotuswordpro/source/filter/xfilter/xffontfactory.cxx100
-rw-r--r--lotuswordpro/source/filter/xfilter/xffontfactory.hxx106
-rw-r--r--lotuswordpro/source/filter/xfilter/xffontworkstyle.hxx155
-rw-r--r--lotuswordpro/source/filter/xfilter/xffooter.hxx87
-rw-r--r--lotuswordpro/source/filter/xfilter/xffooterstyle.hxx123
-rw-r--r--lotuswordpro/source/filter/xfilter/xffootnote.hxx127
-rw-r--r--lotuswordpro/source/filter/xfilter/xffootnoteconfig.hxx267
-rw-r--r--lotuswordpro/source/filter/xfilter/xfframe.cxx209
-rw-r--r--lotuswordpro/source/filter/xfilter/xfframe.hxx265
-rw-r--r--lotuswordpro/source/filter/xfilter/xfframestyle.cxx236
-rw-r--r--lotuswordpro/source/filter/xfilter/xfframestyle.hxx250
-rw-r--r--lotuswordpro/source/filter/xfilter/xfframetable.hxx89
-rw-r--r--lotuswordpro/source/filter/xfilter/xfglobal.cxx144
-rw-r--r--lotuswordpro/source/filter/xfilter/xfglobal.hxx176
-rw-r--r--lotuswordpro/source/filter/xfilter/xfheader.hxx88
-rw-r--r--lotuswordpro/source/filter/xfilter/xfheaderstyle.cxx191
-rw-r--r--lotuswordpro/source/filter/xfilter/xfheaderstyle.hxx141
-rw-r--r--lotuswordpro/source/filter/xfilter/xfhyperlink.hxx138
-rw-r--r--lotuswordpro/source/filter/xfilter/xfimage.cxx145
-rw-r--r--lotuswordpro/source/filter/xfilter/xfimage.hxx98
-rw-r--r--lotuswordpro/source/filter/xfilter/xfimagestyle.cxx210
-rw-r--r--lotuswordpro/source/filter/xfilter/xfimagestyle.hxx161
-rw-r--r--lotuswordpro/source/filter/xfilter/xfindex.cxx452
-rw-r--r--lotuswordpro/source/filter/xfilter/xfindex.hxx281
-rw-r--r--lotuswordpro/source/filter/xfilter/xfinputlist.hxx113
-rw-r--r--lotuswordpro/source/filter/xfilter/xflinebreak.hxx82
-rw-r--r--lotuswordpro/source/filter/xfilter/xflineheight.hxx174
-rw-r--r--lotuswordpro/source/filter/xfilter/xflinenumberconfig.hxx209
-rw-r--r--lotuswordpro/source/filter/xfilter/xflist.cxx159
-rw-r--r--lotuswordpro/source/filter/xfilter/xflist.hxx153
-rw-r--r--lotuswordpro/source/filter/xfilter/xflistitem.hxx116
-rw-r--r--lotuswordpro/source/filter/xfilter/xfliststyle.cxx339
-rw-r--r--lotuswordpro/source/filter/xfilter/xfliststyle.hxx267
-rw-r--r--lotuswordpro/source/filter/xfilter/xfmargins.cxx127
-rw-r--r--lotuswordpro/source/filter/xfilter/xfmargins.hxx145
-rw-r--r--lotuswordpro/source/filter/xfilter/xfmasterpage.cxx130
-rw-r--r--lotuswordpro/source/filter/xfilter/xfmasterpage.hxx97
-rw-r--r--lotuswordpro/source/filter/xfilter/xfnumberstyle.cxx387
-rw-r--r--lotuswordpro/source/filter/xfilter/xfnumberstyle.hxx195
-rw-r--r--lotuswordpro/source/filter/xfilter/xfnumfmt.hxx150
-rw-r--r--lotuswordpro/source/filter/xfilter/xfofficemeta.cxx148
-rw-r--r--lotuswordpro/source/filter/xfilter/xfofficemeta.hxx96
-rw-r--r--lotuswordpro/source/filter/xfilter/xfoleobj.cxx118
-rw-r--r--lotuswordpro/source/filter/xfilter/xfoleobj.hxx87
-rw-r--r--lotuswordpro/source/filter/xfilter/xfoutlinestyle.cxx129
-rw-r--r--lotuswordpro/source/filter/xfilter/xfoutlinestyle.hxx190
-rw-r--r--lotuswordpro/source/filter/xfilter/xfpadding.hxx208
-rw-r--r--lotuswordpro/source/filter/xfilter/xfpagecount.hxx87
-rw-r--r--lotuswordpro/source/filter/xfilter/xfpagemaster.cxx299
-rw-r--r--lotuswordpro/source/filter/xfilter/xfpagemaster.hxx167
-rw-r--r--lotuswordpro/source/filter/xfilter/xfpagenumber.hxx99
-rw-r--r--lotuswordpro/source/filter/xfilter/xfparagraph.cxx121
-rw-r--r--lotuswordpro/source/filter/xfilter/xfparagraph.hxx97
-rw-r--r--lotuswordpro/source/filter/xfilter/xfparastyle.cxx527
-rw-r--r--lotuswordpro/source/filter/xfilter/xfparastyle.hxx358
-rw-r--r--lotuswordpro/source/filter/xfilter/xfplaceholder.hxx141
-rw-r--r--lotuswordpro/source/filter/xfilter/xfpoint.hxx104
-rw-r--r--lotuswordpro/source/filter/xfilter/xfpvector.hxx98
-rw-r--r--lotuswordpro/source/filter/xfilter/xfrect.hxx138
-rw-r--r--lotuswordpro/source/filter/xfilter/xfrow.cxx183
-rw-r--r--lotuswordpro/source/filter/xfilter/xfrow.hxx140
-rw-r--r--lotuswordpro/source/filter/xfilter/xfrowstyle.cxx127
-rw-r--r--lotuswordpro/source/filter/xfilter/xfrowstyle.hxx124
-rw-r--r--lotuswordpro/source/filter/xfilter/xfruby.hxx111
-rw-r--r--lotuswordpro/source/filter/xfilter/xfrubystyle.hxx141
-rw-r--r--lotuswordpro/source/filter/xfilter/xfsaxattrlist.cxx85
-rw-r--r--lotuswordpro/source/filter/xfilter/xfsaxattrlist.hxx99
-rw-r--r--lotuswordpro/source/filter/xfilter/xfsaxstream.cxx134
-rw-r--r--lotuswordpro/source/filter/xfilter/xfsaxstream.hxx136
-rw-r--r--lotuswordpro/source/filter/xfilter/xfsection.cxx153
-rw-r--r--lotuswordpro/source/filter/xfilter/xfsection.hxx119
-rw-r--r--lotuswordpro/source/filter/xfilter/xfsectionstyle.cxx154
-rw-r--r--lotuswordpro/source/filter/xfilter/xfsectionstyle.hxx105
-rw-r--r--lotuswordpro/source/filter/xfilter/xfshadow.cxx128
-rw-r--r--lotuswordpro/source/filter/xfilter/xfshadow.hxx155
-rw-r--r--lotuswordpro/source/filter/xfilter/xfstyle.cxx105
-rw-r--r--lotuswordpro/source/filter/xfilter/xfstyle.hxx120
-rw-r--r--lotuswordpro/source/filter/xfilter/xfstylecont.cxx298
-rw-r--r--lotuswordpro/source/filter/xfilter/xfstylecont.hxx138
-rw-r--r--lotuswordpro/source/filter/xfilter/xfstylefamily.hxx74
-rw-r--r--lotuswordpro/source/filter/xfilter/xfstylemanager.cxx386
-rw-r--r--lotuswordpro/source/filter/xfilter/xfstylemanager.hxx145
-rw-r--r--lotuswordpro/source/filter/xfilter/xfsubject.hxx83
-rw-r--r--lotuswordpro/source/filter/xfilter/xftable.cxx317
-rw-r--r--lotuswordpro/source/filter/xfilter/xftable.hxx170
-rw-r--r--lotuswordpro/source/filter/xfilter/xftablestyle.cxx137
-rw-r--r--lotuswordpro/source/filter/xfilter/xftablestyle.hxx154
-rw-r--r--lotuswordpro/source/filter/xfilter/xftabstop.hxx82
-rw-r--r--lotuswordpro/source/filter/xfilter/xftabstyle.cxx101
-rw-r--r--lotuswordpro/source/filter/xfilter/xftabstyle.hxx120
-rw-r--r--lotuswordpro/source/filter/xfilter/xftextboxstyle.cxx104
-rw-r--r--lotuswordpro/source/filter/xfilter/xftextboxstyle.hxx92
-rw-r--r--lotuswordpro/source/filter/xfilter/xftextcontent.cxx124
-rw-r--r--lotuswordpro/source/filter/xfilter/xftextcontent.hxx103
-rw-r--r--lotuswordpro/source/filter/xfilter/xftextheading.cxx105
-rw-r--r--lotuswordpro/source/filter/xfilter/xftextheading.hxx90
-rw-r--r--lotuswordpro/source/filter/xfilter/xftextspan.cxx190
-rw-r--r--lotuswordpro/source/filter/xfilter/xftextspan.hxx101
-rw-r--r--lotuswordpro/source/filter/xfilter/xftextstyle.cxx138
-rw-r--r--lotuswordpro/source/filter/xfilter/xftextstyle.hxx98
-rw-r--r--lotuswordpro/source/filter/xfilter/xftime.cxx88
-rw-r--r--lotuswordpro/source/filter/xfilter/xftime.hxx107
-rw-r--r--lotuswordpro/source/filter/xfilter/xftimestyle.cxx152
-rw-r--r--lotuswordpro/source/filter/xfilter/xftimestyle.hxx204
-rw-r--r--lotuswordpro/source/filter/xfilter/xftitle.hxx87
-rw-r--r--lotuswordpro/source/filter/xfilter/xfutil.cxx547
-rw-r--r--lotuswordpro/source/filter/xfilter/xfutil.hxx116
-rw-r--r--lotuswordpro/util/lwpfilter.component8
417 files changed, 0 insertions, 90053 deletions
diff --git a/lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk b/lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk
deleted file mode 100644
index 12a0d5aeb..000000000
--- a/lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk
+++ /dev/null
@@ -1,84 +0,0 @@
-# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*-
-#*************************************************************************
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Initial Developer of the Original Code is
-# Bjoern Michaelsen, Canonical Ltd. <bjoern.michaelsen@canonical.com>
-# Portions created by the Initial Developer are Copyright (C) 2010 the
-# Initial Developer. All Rights Reserved.
-#
-# Major Contributor(s):
-# Caolán McNamara, Red Hat, Inc. <caolanm@redhat.com>
-# David Tardon, Red Hat Inc. <dtardon@redhat.com>
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-#*************************************************************************
-
-$(eval $(call gb_CppunitTest_CppunitTest,lotuswordpro_test_lotuswordpro))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,lotuswordpro_test_lotuswordpro, \
- lotuswordpro/qa/cppunit/test_lotuswordpro \
-))
-
-$(eval $(call gb_CppunitTest_add_linked_libs,lotuswordpro_test_lotuswordpro, \
- comphelper \
- cppu \
- cppuhelper \
- sal \
- vcl \
- $(gb_STDLIBS) \
-))
-
-$(eval $(call gb_CppunitTest_set_include,lotuswordpro_test_lotuswordpro,\
- $$(INCLUDE) \
- -I$(OUTDIR)/inc \
-))
-
-$(eval $(call gb_CppunitTest_add_api,lotuswordpro_test_lotuswordpro,\
- offapi \
- udkapi \
-))
-
-$(eval $(call gb_CppunitTest_uses_ure,lotuswordpro_test_lotuswordpro))
-
-$(eval $(call gb_CppunitTest_add_type_rdbs,lotuswordpro_test_lotuswordpro,\
- types \
-))
-
-$(eval $(call gb_CppunitTest_add_service_rdbs,lotuswordpro_test_lotuswordpro,\
- lotuswordpro_test_lotuswordpro \
-))
-
-$(eval $(call gb_CppunitTest_set_args,lotuswordpro_test_lotuswordpro,\
- --headless \
- --invisible \
- --protector unoexceptionprotector$(gb_Library_DLLEXT) unoexceptionprotector \
-))
-
-$(eval $(call gb_RdbTarget_RdbTarget,lotuswordpro_test_lotuswordpro))
-
-$(eval $(call gb_RdbTarget_add_components,lotuswordpro_test_lotuswordpro,\
- lotuswordpro/util/lwpfilter,\
-))
-
-# we need to explicitly depend on library lwpft because it is not implied
-# by a link relation
-$(call gb_CppunitTest_get_target,lotuswordpro_test_lotuswordpro) : $(call gb_Library_get_target,lwpft)
-
-# vim: set noet sw=4 ts=4:
diff --git a/lotuswordpro/Library_lwpft.mk b/lotuswordpro/Library_lwpft.mk
deleted file mode 100644
index 6ffc6a011..000000000
--- a/lotuswordpro/Library_lwpft.mk
+++ /dev/null
@@ -1,240 +0,0 @@
-# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*-
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Initial Developer of the Original Code is
-# David Tardon, Red Hat Inc. <dtardon@redhat.com>
-# Portions created by the Initial Developer are Copyright (C) 2010 the
-# Initial Developer. All Rights Reserved.
-#
-# Major Contributor(s):
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-$(eval $(call gb_Library_Library,lwpft))
-
-$(eval $(call gb_Library_set_include,lwpft,\
- $$(INCLUDE) \
- -I$(OUTDIR)/inc \
-))
-
-$(eval $(call gb_Library_add_api,lwpft,\
- offapi \
- udkapi \
-))
-
-$(eval $(call gb_Library_add_linked_libs,lwpft,\
- comphelper \
- cppu \
- cppuhelper \
- sal \
- sfx \
- sot \
- svt \
- svxcore \
- tl \
- ucbhelper \
- vcl \
- xo \
- $(gb_STDLIBS) \
-))
-
-$(eval $(call gb_Library_use_externals,lwpft,\
- icui18n \
- icuuc \
-))
-
-$(eval $(call gb_Library_set_componentfile,lwpft,lotuswordpro/util/lwpfilter))
-
-$(eval $(call gb_Library_add_exception_objects,lwpft,\
- lotuswordpro/source/filter/bencont \
- lotuswordpro/source/filter/benlist \
- lotuswordpro/source/filter/benname \
- lotuswordpro/source/filter/benobj \
- lotuswordpro/source/filter/benval \
- lotuswordpro/source/filter/explode \
- lotuswordpro/source/filter/genericfilter \
- lotuswordpro/source/filter/localtime \
- lotuswordpro/source/filter/LotusWordProImportFilter \
- lotuswordpro/source/filter/lwp9reader \
- lotuswordpro/source/filter/lwpatomholder \
- lotuswordpro/source/filter/lwpbackgroundoverride \
- lotuswordpro/source/filter/lwpbackgroundstuff \
- lotuswordpro/source/filter/lwpbasetype \
- lotuswordpro/source/filter/lwpbookmarkmgr \
- lotuswordpro/source/filter/lwpborderstuff \
- lotuswordpro/source/filter/lwpbreaksoverride \
- lotuswordpro/source/filter/lwpbulletstylemgr \
- lotuswordpro/source/filter/lwpcelllayout \
- lotuswordpro/source/filter/lwpchangemgr \
- lotuswordpro/source/filter/lwpcharacterstyle \
- lotuswordpro/source/filter/lwpcharborderoverride \
- lotuswordpro/source/filter/lwpcharsetmgr \
- lotuswordpro/source/filter/lwpcolor \
- lotuswordpro/source/filter/lwpcontent \
- lotuswordpro/source/filter/lwpdivinfo \
- lotuswordpro/source/filter/lwpdivopts \
- lotuswordpro/source/filter/lwpdllist \
- lotuswordpro/source/filter/lwpdlvlist \
- lotuswordpro/source/filter/lwpdoc \
- lotuswordpro/source/filter/lwpdocdata \
- lotuswordpro/source/filter/lwpdrawobj \
- lotuswordpro/source/filter/lwpdropcapmgr \
- lotuswordpro/source/filter/lwpfilehdr \
- lotuswordpro/source/filter/lwpfilter \
- lotuswordpro/source/filter/lwpfnlayout \
- lotuswordpro/source/filter/lwpfont \
- lotuswordpro/source/filter/lwpfootnote \
- lotuswordpro/source/filter/lwpfoundry \
- lotuswordpro/source/filter/lwpframelayout \
- lotuswordpro/source/filter/lwpfribbreaks \
- lotuswordpro/source/filter/lwpfrib \
- lotuswordpro/source/filter/lwpfribframe \
- lotuswordpro/source/filter/lwpfribmark \
- lotuswordpro/source/filter/lwpfribptr \
- lotuswordpro/source/filter/lwpfribsection \
- lotuswordpro/source/filter/lwpfribtable \
- lotuswordpro/source/filter/lwpfribtext \
- lotuswordpro/source/filter/lwpglobalmgr \
- lotuswordpro/source/filter/lwpgrfobj \
- lotuswordpro/source/filter/lwpholder \
- lotuswordpro/source/filter/lwphyperlinkmgr \
- lotuswordpro/source/filter/lwpidxmgr \
- lotuswordpro/source/filter/lwplayout \
- lotuswordpro/source/filter/lwplaypiece \
- lotuswordpro/source/filter/lwplnopts \
- lotuswordpro/source/filter/lwpmarker \
- lotuswordpro/source/filter/lwpnotes \
- lotuswordpro/source/filter/lwpnumberingoverride \
- lotuswordpro/source/filter/lwpnumericfmt \
- lotuswordpro/source/filter/lwpobj \
- lotuswordpro/source/filter/lwpobjfactory \
- lotuswordpro/source/filter/lwpobjhdr \
- lotuswordpro/source/filter/lwpobjid \
- lotuswordpro/source/filter/lwpobjstrm \
- lotuswordpro/source/filter/lwpoleobject \
- lotuswordpro/source/filter/lwpoverride \
- lotuswordpro/source/filter/lwppagehint \
- lotuswordpro/source/filter/lwppagelayout \
- lotuswordpro/source/filter/lwppara1 \
- lotuswordpro/source/filter/lwpparaborderoverride \
- lotuswordpro/source/filter/lwppara \
- lotuswordpro/source/filter/lwpparaproperty \
- lotuswordpro/source/filter/lwpparastyle \
- lotuswordpro/source/filter/lwpproplist \
- lotuswordpro/source/filter/lwpprtinfo \
- lotuswordpro/source/filter/lwprowlayout \
- lotuswordpro/source/filter/lwpsdwfileloader \
- lotuswordpro/source/filter/lwpsdwgrouploaderv0102 \
- lotuswordpro/source/filter/lwpsdwrect \
- lotuswordpro/source/filter/lwpsection \
- lotuswordpro/source/filter/lwpsilverbullet \
- lotuswordpro/source/filter/lwpsortopt \
- lotuswordpro/source/filter/lwpstory \
- lotuswordpro/source/filter/lwpsvstream \
- lotuswordpro/source/filter/lwptable \
- lotuswordpro/source/filter/lwptablelayout \
- lotuswordpro/source/filter/lwptaboverride \
- lotuswordpro/source/filter/lwptabrack \
- lotuswordpro/source/filter/lwptblcell \
- lotuswordpro/source/filter/lwptblformula \
- lotuswordpro/source/filter/lwptoc \
- lotuswordpro/source/filter/lwptools \
- lotuswordpro/source/filter/lwpuidoc \
- lotuswordpro/source/filter/lwpusrdicts \
- lotuswordpro/source/filter/lwpverdocument \
- lotuswordpro/source/filter/lwpvpointer \
- lotuswordpro/source/filter/tocread \
- lotuswordpro/source/filter/utbenvs \
- lotuswordpro/source/filter/utlist \
- lotuswordpro/source/filter/xfilter/xfbase64 \
- lotuswordpro/source/filter/xfilter/xfbgimage \
- lotuswordpro/source/filter/xfilter/xfbookmarkref \
- lotuswordpro/source/filter/xfilter/xfborders \
- lotuswordpro/source/filter/xfilter/xfcell \
- lotuswordpro/source/filter/xfilter/xfcellstyle \
- lotuswordpro/source/filter/xfilter/xfchange \
- lotuswordpro/source/filter/xfilter/xfcolor \
- lotuswordpro/source/filter/xfilter/xfcolstyle \
- lotuswordpro/source/filter/xfilter/xfcolumns \
- lotuswordpro/source/filter/xfilter/xfconfigmanager \
- lotuswordpro/source/filter/xfilter/xfcontentcontainer \
- lotuswordpro/source/filter/xfilter/xfcrossref \
- lotuswordpro/source/filter/xfilter/xfdate \
- lotuswordpro/source/filter/xfilter/xfdatestyle \
- lotuswordpro/source/filter/xfilter/xfdocfield \
- lotuswordpro/source/filter/xfilter/xfdrawareastyle \
- lotuswordpro/source/filter/xfilter/xfdrawcircle \
- lotuswordpro/source/filter/xfilter/xfdrawellipse \
- lotuswordpro/source/filter/xfilter/xfdrawline \
- lotuswordpro/source/filter/xfilter/xfdrawlinestyle \
- lotuswordpro/source/filter/xfilter/xfdrawobj \
- lotuswordpro/source/filter/xfilter/xfdrawpath \
- lotuswordpro/source/filter/xfilter/xfdrawpolygon \
- lotuswordpro/source/filter/xfilter/xfdrawpolyline \
- lotuswordpro/source/filter/xfilter/xfdrawrect \
- lotuswordpro/source/filter/xfilter/xfdrawstyle \
- lotuswordpro/source/filter/xfilter/xfentry \
- lotuswordpro/source/filter/xfilter/xffileattrlist \
- lotuswordpro/source/filter/xfilter/xffilestream \
- lotuswordpro/source/filter/xfilter/xffloatframe \
- lotuswordpro/source/filter/xfilter/xffont \
- lotuswordpro/source/filter/xfilter/xffontdecl \
- lotuswordpro/source/filter/xfilter/xffontfactory \
- lotuswordpro/source/filter/xfilter/xfframe \
- lotuswordpro/source/filter/xfilter/xfframestyle \
- lotuswordpro/source/filter/xfilter/xfglobal \
- lotuswordpro/source/filter/xfilter/xfheaderstyle \
- lotuswordpro/source/filter/xfilter/xfimage \
- lotuswordpro/source/filter/xfilter/xfimagestyle \
- lotuswordpro/source/filter/xfilter/xfindex \
- lotuswordpro/source/filter/xfilter/xflist \
- lotuswordpro/source/filter/xfilter/xfliststyle \
- lotuswordpro/source/filter/xfilter/xfmargins \
- lotuswordpro/source/filter/xfilter/xfmasterpage \
- lotuswordpro/source/filter/xfilter/xfnumberstyle \
- lotuswordpro/source/filter/xfilter/xfofficemeta \
- lotuswordpro/source/filter/xfilter/xfoleobj \
- lotuswordpro/source/filter/xfilter/xfoutlinestyle \
- lotuswordpro/source/filter/xfilter/xfpagemaster \
- lotuswordpro/source/filter/xfilter/xfparagraph \
- lotuswordpro/source/filter/xfilter/xfparastyle \
- lotuswordpro/source/filter/xfilter/xfrow \
- lotuswordpro/source/filter/xfilter/xfrowstyle \
- lotuswordpro/source/filter/xfilter/xfsaxattrlist \
- lotuswordpro/source/filter/xfilter/xfsaxstream \
- lotuswordpro/source/filter/xfilter/xfsection \
- lotuswordpro/source/filter/xfilter/xfsectionstyle \
- lotuswordpro/source/filter/xfilter/xfshadow \
- lotuswordpro/source/filter/xfilter/xfstylecont \
- lotuswordpro/source/filter/xfilter/xfstyle \
- lotuswordpro/source/filter/xfilter/xfstylemanager \
- lotuswordpro/source/filter/xfilter/xftable \
- lotuswordpro/source/filter/xfilter/xftablestyle \
- lotuswordpro/source/filter/xfilter/xftabstyle \
- lotuswordpro/source/filter/xfilter/xftextboxstyle \
- lotuswordpro/source/filter/xfilter/xftextcontent \
- lotuswordpro/source/filter/xfilter/xftextheading \
- lotuswordpro/source/filter/xfilter/xftextspan \
- lotuswordpro/source/filter/xfilter/xftextstyle \
- lotuswordpro/source/filter/xfilter/xftime \
- lotuswordpro/source/filter/xfilter/xftimestyle \
- lotuswordpro/source/filter/xfilter/xfutil \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/lotuswordpro/Makefile b/lotuswordpro/Makefile
deleted file mode 100644
index 8d7111991..000000000
--- a/lotuswordpro/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
-
-gb_PARTIALBUILD := T
-GBUILDDIR := $(SOLARENV)/gbuild
-include $(GBUILDDIR)/gbuild.mk
-
-$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
-
-# vim: set noet sw=4 ts=4:
diff --git a/lotuswordpro/Module_lotuswordpro.mk b/lotuswordpro/Module_lotuswordpro.mk
deleted file mode 100644
index f8427c98a..000000000
--- a/lotuswordpro/Module_lotuswordpro.mk
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*-
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Initial Developer of the Original Code is
-# David Tardon, Red Hat Inc. <dtardon@redhat.com>
-# Portions created by the Initial Developer are Copyright (C) 2010 the
-# Initial Developer. All Rights Reserved.
-#
-# Major Contributor(s):
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-$(eval $(call gb_Module_Module,lotuswordpro))
-
-$(eval $(call gb_Module_add_targets,lotuswordpro,\
- Library_lwpft \
-))
-
-$(eval $(call gb_Module_add_check_targets,lotuswordpro,\
- CppunitTest_lotuswordpro_test_lotuswordpro \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/lotuswordpro/prj/build.lst b/lotuswordpro/prj/build.lst
deleted file mode 100644
index f6c70c597..000000000
--- a/lotuswordpro/prj/build.lst
+++ /dev/null
@@ -1,2 +0,0 @@
-wp lotuswordpro : sfx2 sot svx comphelper BOOST:boost ure test NULL
-wp lotuswordpro\prj nmake - all lwp_prj NULL
diff --git a/lotuswordpro/prj/d.lst b/lotuswordpro/prj/d.lst
deleted file mode 100644
index e69de29bb..000000000
--- a/lotuswordpro/prj/d.lst
+++ /dev/null
diff --git a/lotuswordpro/prj/makefile.mk b/lotuswordpro/prj/makefile.mk
deleted file mode 100755
index e312a7cca..000000000
--- a/lotuswordpro/prj/makefile.mk
+++ /dev/null
@@ -1,40 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..
-TARGET=prj
-
-.INCLUDE : settings.mk
-
-.IF "$(VERBOSE)"!=""
-VERBOSEFLAG :=
-.ELSE
-VERBOSEFLAG := -s
-.ENDIF
-
-all:
- cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
diff --git a/lotuswordpro/qa/cppunit/data/fail/A14.lwp b/lotuswordpro/qa/cppunit/data/fail/A14.lwp
deleted file mode 100644
index 9dd36f626..000000000
--- a/lotuswordpro/qa/cppunit/data/fail/A14.lwp
+++ /dev/null
Binary files differ
diff --git a/lotuswordpro/qa/cppunit/data/fail/IntPres11-2004.lwp b/lotuswordpro/qa/cppunit/data/fail/IntPres11-2004.lwp
deleted file mode 100644
index 7672793e7..000000000
--- a/lotuswordpro/qa/cppunit/data/fail/IntPres11-2004.lwp
+++ /dev/null
Binary files differ
diff --git a/lotuswordpro/qa/cppunit/data/pass/A14.lwp b/lotuswordpro/qa/cppunit/data/pass/A14.lwp
deleted file mode 100644
index 7cc05cebc..000000000
--- a/lotuswordpro/qa/cppunit/data/pass/A14.lwp
+++ /dev/null
Binary files differ
diff --git a/lotuswordpro/qa/cppunit/data/pass/IntPres11-2004.lwp b/lotuswordpro/qa/cppunit/data/pass/IntPres11-2004.lwp
deleted file mode 100644
index 786164ea4..000000000
--- a/lotuswordpro/qa/cppunit/data/pass/IntPres11-2004.lwp
+++ /dev/null
Binary files differ
diff --git a/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx b/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx
deleted file mode 100644
index cb7075ce9..000000000
--- a/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx
+++ /dev/null
@@ -1,163 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * Version: MPL 1.1 / GPLv3+ / LGPLv3+
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Initial Developer of the Original Code is
- * Caolán McNamara <caolanm@redhat.com> (Red Hat, Inc.)
- * Portions created by the Initial Developer are Copyright (C) 2011 the
- * Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Caolán McNamara <caolanm@redhat.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
- * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
- * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
- * instead of those above.
- */
-
-#include <sal/cppunit.h>
-
-#include <cppuhelper/bootstrap.hxx>
-#include <comphelper/processfactory.hxx>
-
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/document/XFilter.hpp>
-
-#include <osl/file.hxx>
-#include <osl/process.h>
-
-#include <vcl/svapp.hxx>
-
-using namespace ::com::sun::star;
-
-namespace
-{
- class LotusWordProTest : public ::CppUnit::TestFixture
- {
- public:
- LotusWordProTest();
- ~LotusWordProTest();
-
- virtual void setUp();
- virtual void tearDown();
-
- void recursiveScan(const rtl::OUString &rURL, bool bExpected);
- bool load(const rtl::OUString &rURL);
- void test();
-
- CPPUNIT_TEST_SUITE(LotusWordProTest);
- CPPUNIT_TEST(test);
- CPPUNIT_TEST_SUITE_END();
- private:
- uno::Reference<uno::XComponentContext> m_xContext;
- uno::Reference<lang::XMultiComponentFactory> m_xFactory;
- uno::Reference<lang::XMultiServiceFactory> m_xMSF;
- uno::Reference<document::XFilter> m_xFilter;
-
- ::rtl::OUString m_aSrcRoot;
- int m_nLoadedDocs;
- };
-
- LotusWordProTest::LotusWordProTest()
- : m_aSrcRoot(RTL_CONSTASCII_USTRINGPARAM("file://" ))
- , m_nLoadedDocs(0)
- {
- m_xContext = cppu::defaultBootstrap_InitialComponentContext();
- m_xFactory = m_xContext->getServiceManager();
- m_xMSF = uno::Reference<lang::XMultiServiceFactory>(m_xFactory, uno::UNO_QUERY_THROW);
- m_xFilter = uno::Reference< document::XFilter >(m_xMSF->createInstance(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Writer.LotusWordProImportFilter"))),
- uno::UNO_QUERY_THROW);
-
- const char* pSrcRoot = getenv( "SRC_ROOT" );
- CPPUNIT_ASSERT_MESSAGE("SRC_ROOT env variable not set", pSrcRoot != NULL && pSrcRoot[0] != 0);
-
-#ifdef WNT
- if (pSrcRoot[1] == ':')
- m_aSrcRoot += rtl::OUString::createFromAscii( "/" );
-#endif
- m_aSrcRoot += rtl::OUString::createFromAscii( pSrcRoot );
-
- //Without this we're crashing because callees are using
- //getProcessServiceFactory. In general those should be removed in favour
- //of retaining references to the root ServiceFactory as its passed around
- comphelper::setProcessServiceFactory(m_xMSF);
-
- //Lotus Import filter pokes at printers :-(
- InitVCL(m_xMSF);
- }
-
- LotusWordProTest::~LotusWordProTest()
- {
- DeInitVCL();
- }
-
- void LotusWordProTest::setUp()
- {
- }
-
- void LotusWordProTest::tearDown()
- {
- }
-
- bool LotusWordProTest::load(const rtl::OUString &rURL)
- {
- uno::Sequence< beans::PropertyValue > aDescriptor(1);
- aDescriptor[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL"));
- aDescriptor[0].Value <<= rURL;
- sal_Bool bRet = m_xFilter->filter(aDescriptor);
-
- ++m_nLoadedDocs;
-
- return bRet;
- }
-
- void LotusWordProTest::recursiveScan(const rtl::OUString &rURL, bool bExpected)
- {
- osl::Directory aDir(rURL);
-
- CPPUNIT_ASSERT(osl::FileBase::E_None == aDir.open());
- osl::DirectoryItem aItem;
- osl::FileStatus aFileStatus(osl_FileStatus_Mask_FileURL|osl_FileStatus_Mask_Type);
- while (aDir.getNextItem(aItem) == osl::FileBase::E_None)
- {
- aItem.getFileStatus(aFileStatus);
- rtl::OUString sURL = aFileStatus.getFileURL();
- if (aFileStatus.getFileType() == osl::FileStatus::Directory)
- recursiveScan(sURL, bExpected);
- else
- {
- bool bRes = load(sURL);
- rtl::OString aRes(rtl::OUStringToOString(sURL, osl_getThreadTextEncoding()));
- CPPUNIT_ASSERT_MESSAGE(aRes.getStr(), bRes == bExpected);
- }
- }
- CPPUNIT_ASSERT(osl::FileBase::E_None == aDir.close());
- }
-
- void LotusWordProTest::test()
- {
- recursiveScan(m_aSrcRoot + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/clone/filters/lotuswordpro/qa/cppunit/data/pass")), true);
- recursiveScan(m_aSrcRoot + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/clone/filters/lotuswordpro/qa/cppunit/data/fail/")), false);
-
- printf("LotusWordPro: tested %d files\n", m_nLoadedDocs);
- }
-
- CPPUNIT_TEST_SUITE_REGISTRATION(LotusWordProTest);
-}
-
-CPPUNIT_PLUGIN_IMPLEMENT();
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
deleted file mode 100644
index 27668059b..000000000
--- a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
+++ /dev/null
@@ -1,416 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * Version: MPL 1.1 / GPLv3+ / LGPLv3+
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License or as specified alternatively below. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Initial Developer of the Original Code is
- * Fong Lin <pflin@novell.com>
- * Portions created by the Initial Developer are Copyright (C) 2010 the
- * Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fong Lin <pflin@novell.com>
- * Noel Power <noel.power@novell.com>
- *
- * For minor contributions see the git repository.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
- * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
- * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
- * instead of those above.
- */
-#include <osl/diagnose.h>
-#include <sal/macros.h>
-#include <rtl/tencinfo.h>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/io/XInputStream.hpp>
-#include <com/sun/star/xml/sax/XAttributeList.hpp>
-#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
-#include <com/sun/star/xml/sax/XParser.hpp>
-#include <com/sun/star/ucb/XCommandEnvironment.hpp>
-#include <com/sun/star/io/XInputStream.hpp>
-#include <com/sun/star/uno/Reference.hxx>
-#include <xmloff/attrlist.hxx>
-
-#include <ucbhelper/content.hxx>
-
-#include <tools/stream.hxx>
-
-#include "LotusWordProImportFilter.hxx"
-
-#include <vector>
-
-#include "lwpfilter.hxx"
-
-using namespace ::rtl;
-using namespace com::sun::star;
-using rtl::OString;
-using rtl::OUStringBuffer;
-using rtl::OUString;
-using com::sun::star::uno::Sequence;
-using com::sun::star::lang::XComponent;
-using com::sun::star::uno::Any;
-using com::sun::star::uno::UNO_QUERY;
-using com::sun::star::uno::XInterface;
-using com::sun::star::uno::Exception;
-using com::sun::star::uno::RuntimeException;
-using com::sun::star::io::XInputStream;
-using com::sun::star::lang::XMultiServiceFactory;
-using com::sun::star::beans::PropertyValue;
-using com::sun::star::document::XFilter;
-using com::sun::star::document::XExtendedFilterDetection;
-using com::sun::star::ucb::XCommandEnvironment;
-
-using com::sun::star::document::XImporter;
-using com::sun::star::xml::sax::XAttributeList;
-using com::sun::star::xml::sax::XDocumentHandler;
-using com::sun::star::xml::sax::XParser;
-
-// W o r d P r o
-static const sal_Int8 header[] = { 0x57, 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f };
-
-const sal_Int32 MAXCHARS = 65534;
-
- // Simple xml importer, currently the importer is very very simple
- // it only extracts pure text from the wordpro file. Absolutely no formating
- // information is currently imported.
- // To reflect the current state of this importer the sax events sent
- // to the document handler are also the simplest possible. In addition to
- // the the basic attributes set up for the 'office:document' element
- // all the imported text is inserted into 'text:p' elements.
- // The parser extracts the pure text and creates simple a simple 'text:p'
- // element to contain that text. In the event of the text exceeding
- // MAXCHARS new 'text:p' elements are created as needed
-class SimpleXMLImporter
-{
-private:
-
- uno::Reference< XDocumentHandler > m_xDocHandler;
- std::vector< OUString > m_vStringChunks;
- SvStream& m_InputStream;
-
- bool CheckValidData( sal_Int8 nChar ) const
- {
- if( ( nChar >= 0x20 && nChar <= 0x7E ) && ( nChar != 0X40 ) )
- return true;
- return false;
- }
-
- void addAttribute( SvXMLAttributeList* pAttrList, const char* key, const char* val )
- {
- pAttrList->AddAttribute( OUString::createFromAscii( key ), OUString::createFromAscii( val ) );
- }
-
- void writeTextChunk( const OUString& sChunk )
- {
- SvXMLAttributeList *pAttrList = new SvXMLAttributeList();
- uno::Reference < XAttributeList > xAttrList(pAttrList);
-
- pAttrList->AddAttribute( OUString(RTL_CONSTASCII_USTRINGPARAM("text:style-name")), OUString(RTL_CONSTASCII_USTRINGPARAM("Standard")));
-
- m_xDocHandler->startElement( OUString(RTL_CONSTASCII_USTRINGPARAM("text:p")), xAttrList );
- m_xDocHandler->characters( sChunk );
- m_xDocHandler->endElement( OUString(RTL_CONSTASCII_USTRINGPARAM("text:p") ) );
- }
-
- void writeDocContentPreamble()
- {
- SvXMLAttributeList *pDocContentPropList = new SvXMLAttributeList();
- uno::Reference < XAttributeList > xDocContentList(pDocContentPropList);
- addAttribute( pDocContentPropList, "xmlns:office", "urn:oasis:names:tc:opendocument:xmlns:office:1.0" );
- addAttribute( pDocContentPropList, "xmlns:style", "urn:oasis:names:tc:opendocument:xmlns:style:1.0");
- addAttribute( pDocContentPropList, "xmlns:text", "urn:oasis:names:tc:opendocument:xmlns:text:1.0" );
- addAttribute( pDocContentPropList, "xmlns:table", "urn:oasis:names:tc:opendocument:xmlns:table:1.0" );
- addAttribute( pDocContentPropList, "xmlns:draw", "urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" );
- addAttribute( pDocContentPropList, "xmlns:fo", "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" );
- addAttribute( pDocContentPropList, "xmlns:xlink", "http://www.w3.org/1999/xlink" );
- addAttribute( pDocContentPropList, "xmlns:dc", "http://purl.org/dc/elements/1.1/" );
- addAttribute( pDocContentPropList, "xmlns:meta", "urn:oasis:names:tc:opendocument:xmlns:meta:1.0" );
- addAttribute( pDocContentPropList, "xmlns:number", "urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" );
- addAttribute( pDocContentPropList, "xmlns:svg", "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" );
- addAttribute( pDocContentPropList, "xmlns:chart", "urn:oasis:names:tc:opendocument:xmlns:chart:1.0" );
- addAttribute( pDocContentPropList, "xmlns:dr3d", "urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" );
- addAttribute( pDocContentPropList, "xmlns:math", "http://www.w3.org/1998/Math/MathML" );
- addAttribute( pDocContentPropList, "xmlns:form", "urn:oasis:names:tc:opendocument:xmlns:form:1.0" );
- addAttribute( pDocContentPropList, "xmlns:script", "urn:oasis:names:tc:opendocument:xmlns:script:1.0" );
- addAttribute( pDocContentPropList, "xmlns:ooo", "http://openoffice.org/2004/office" );
- addAttribute( pDocContentPropList, "xmlns:ooow", "http://openoffice.org/2004/writer" );
- addAttribute( pDocContentPropList, "xmlns:oooc", "http://openoffice.org/2004/calc" );
- addAttribute( pDocContentPropList, "xmlns:dom", "http://www.w3.org/2001/xml-events" );
- addAttribute( pDocContentPropList, "xmlns:xforms", "http://www.w3.org/2002/xforms" );
- addAttribute( pDocContentPropList, "xmlns:xsd", "http://www.w3.org/2001/XMLSchema");
- addAttribute( pDocContentPropList, "xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance" );
- addAttribute( pDocContentPropList, "office:version", "1.0");
- m_xDocHandler->startElement(OUString(RTL_CONSTASCII_USTRINGPARAM("office:document-content" ) ), xDocContentList );
- }
-
- void parseDoc()
- {
- sal_uInt8 nDelim, nDummy, nLen, nData;
- sal_uInt16 nOpcode;
- OUStringBuffer sBuf( MAXCHARS );
- sal_Int32 nChars = 0;
-
- while( !m_InputStream.IsEof())
- {
- m_InputStream >> nDelim;
- if( nDelim == 0x40 )
- {
- m_InputStream >> nDummy >> nOpcode;
- switch( nOpcode )
- {
- case 0xC00B: // Dictionary Word
- m_InputStream >> nLen >> nDummy;
- while( nLen > 0 && !m_InputStream.IsEof() )
- {
- sal_uInt8 nChar;
- m_InputStream >> nChar;
- if( CheckValidData( nChar ) )
- {
- sBuf.appendAscii( (sal_Char*)(&nChar),1 );
- if ( ++nChars >= MAXCHARS )
- {
- m_vStringChunks.push_back( sBuf.makeStringAndClear() );
- nChars = 0;
- }
- }
- nLen--;
- }
- break;
-
- case 0x0242: // Non Dictionary word
- m_InputStream >> nData;
- if( nData == 0x02 )
- {
- m_InputStream >> nLen >> nDummy;
- while( nLen > 0 && !m_InputStream.IsEof() )
- {
- m_InputStream >> nData;
- if( CheckValidData( nData ) )
- {
- sBuf.appendAscii( (sal_Char*)(&nData),1 );
- if ( ++nChars >= MAXCHARS )
- {
- m_vStringChunks.push_back( sBuf.makeStringAndClear() );
- nChars = 0;
- }
- }
- nLen--;
- }
- }
- break;
- }
- }
- }
- if ( nChars )
- m_vStringChunks.push_back( sBuf.makeStringAndClear() );
- }
-
- void writeXML()
- {
- if ( !m_vStringChunks.empty() )
- {
- m_xDocHandler->startDocument();
- SvXMLAttributeList *pAttrList = new SvXMLAttributeList();
- writeDocContentPreamble(); // writes "office:document-content" elem
- uno::Reference < XAttributeList > xAttrList(pAttrList);
-
- m_xDocHandler->startElement( OUString(RTL_CONSTASCII_USTRINGPARAM("office:body")), xAttrList );
-
- // process strings imported
- std::vector< OUString >::const_iterator it = m_vStringChunks.begin();
- std::vector< OUString >::const_iterator it_end = m_vStringChunks.end();
- for ( ; it!=it_end; ++it )
- writeTextChunk( *it );
-
- m_xDocHandler->endElement( OUString(RTL_CONSTASCII_USTRINGPARAM("office:body") ) );
- m_xDocHandler->endElement( OUString(RTL_CONSTASCII_USTRINGPARAM("office:document-content")));
- m_xDocHandler->endDocument();
- }
- }
-public:
-
- SimpleXMLImporter( const uno::Reference< XDocumentHandler >& xDocHandler, SvStream& rStream ) : m_xDocHandler( xDocHandler ), m_InputStream( rStream ) {}
-
- void import()
- {
- parseDoc();
- writeXML();
- }
-};
-
-sal_Bool SAL_CALL LotusWordProImportFilter::importImpl( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
- throw (RuntimeException)
-{
-
- sal_Int32 nLength = aDescriptor.getLength();
- const PropertyValue * pValue = aDescriptor.getConstArray();
- OUString sURL;
- for ( sal_Int32 i = 0 ; i < nLength; i++)
- {
- //Note, we should attempt to use InputStream here first!
- if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "URL" ) ) )
- pValue[i].Value >>= sURL;
- }
-
- SvFileStream inputStream( sURL, STREAM_READ );
- if ( inputStream.IsEof() || ( inputStream.GetError() != SVSTREAM_OK ) )
- return sal_False;
-
- // An XML import service: what we push sax messages to..
- OUString sXMLImportService ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.XMLImporter" ) );
-
- uno::Reference< XDocumentHandler > xInternalHandler( mxMSF->createInstance( sXMLImportService ), UNO_QUERY );
- uno::Reference < XImporter > xImporter(xInternalHandler, UNO_QUERY);
- if (xImporter.is())
- xImporter->setTargetDocument(mxDoc);
-
- return ( ReadWordproFile( inputStream, xInternalHandler) == 0 );
-
-}
-
-sal_Bool SAL_CALL LotusWordProImportFilter::filter( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
- throw (RuntimeException)
-{
- return importImpl ( aDescriptor );
-}
-void SAL_CALL LotusWordProImportFilter::cancel( )
- throw (RuntimeException)
-{
-}
-
-// XImporter
-void SAL_CALL LotusWordProImportFilter::setTargetDocument( const uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
- throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException)
-{
- meType = FILTER_IMPORT;
- mxDoc = xDoc;
-}
-
-// XExtendedFilterDetection
-OUString SAL_CALL LotusWordProImportFilter::detect( com::sun::star::uno::Sequence< PropertyValue >& Descriptor )
- throw( com::sun::star::uno::RuntimeException )
-{
-
- OUString sTypeName(RTL_CONSTASCII_USTRINGPARAM("writer_LotusWordPro_Document"));
- sal_Int32 nLength = Descriptor.getLength();
- OUString sURL;
- const PropertyValue * pValue = Descriptor.getConstArray();
- uno::Reference < XInputStream > xInputStream;
- for ( sal_Int32 i = 0 ; i < nLength; i++)
- {
- if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "TypeName" ) ) )
- pValue[i].Value >>= sTypeName;
- else if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "InputStream" ) ) )
- pValue[i].Value >>= xInputStream;
- else if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "URL" ) ) )
- pValue[i].Value >>= sURL;
- }
-
- uno::Reference< com::sun::star::ucb::XCommandEnvironment > xEnv;
- if (!xInputStream.is())
- {
- try
- {
- ::ucbhelper::Content aContent(sURL, xEnv);
- xInputStream = aContent.openStream();
- }
- catch ( Exception& )
- {
- return ::rtl::OUString();
- }
-
- if (!xInputStream.is())
- return ::rtl::OUString();
- }
-
- Sequence< ::sal_Int8 > aData;
- sal_Int32 nLen = SAL_N_ELEMENTS( header );
- if ( !( ( nLen == xInputStream->readBytes( aData, nLen ) )
- && ( memcmp( ( void* )header, (void*) aData.getConstArray(), nLen ) == 0 ) ) )
- sTypeName = ::rtl::OUString();
-
- return sTypeName;
-}
-
-
-// XInitialization
-void SAL_CALL LotusWordProImportFilter::initialize( const Sequence< Any >& aArguments )
- throw (Exception, RuntimeException)
-{
- Sequence < PropertyValue > aAnySeq;
- sal_Int32 nLength = aArguments.getLength();
- if ( nLength && ( aArguments[0] >>= aAnySeq ) )
- {
- const PropertyValue * pValue = aAnySeq.getConstArray();
- nLength = aAnySeq.getLength();
- for ( sal_Int32 i = 0 ; i < nLength; i++)
- {
- if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "Type" ) ) )
- {
- pValue[i].Value >>= msFilterName;
- break;
- }
- }
- }
-}
-OUString LotusWordProImportFilter_getImplementationName ()
- throw (RuntimeException)
-{
- return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.LotusWordProImportFilter" ) );
-}
-
-#define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
-#define SERVICE_NAME2 "com.sun.star.document.ExtendedTypeDetection"
-sal_Bool SAL_CALL LotusWordProImportFilter_supportsService( const OUString& ServiceName )
- throw (RuntimeException)
-{
- return (ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME1 ) ) ||
- ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME2 ) ) );
-}
-Sequence< OUString > SAL_CALL LotusWordProImportFilter_getSupportedServiceNames( )
- throw (RuntimeException)
-{
- Sequence < OUString > aRet(2);
- OUString* pArray = aRet.getArray();
- pArray[0] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME1 ) );
- pArray[1] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME2 ) );
- return aRet;
-}
-#undef SERVICE_NAME2
-#undef SERVICE_NAME1
-
-uno::Reference< XInterface > SAL_CALL LotusWordProImportFilter_createInstance( const uno::Reference< XMultiServiceFactory > & rSMgr)
- throw( Exception )
-{
- return (cppu::OWeakObject*) new LotusWordProImportFilter( rSMgr );
-}
-
-// XServiceInfo
-OUString SAL_CALL LotusWordProImportFilter::getImplementationName( )
- throw (RuntimeException)
-{
- return LotusWordProImportFilter_getImplementationName();
-}
-sal_Bool SAL_CALL LotusWordProImportFilter::supportsService( const OUString& rServiceName )
- throw (RuntimeException)
-{
- return LotusWordProImportFilter_supportsService( rServiceName );
-}
-Sequence< OUString > SAL_CALL LotusWordProImportFilter::getSupportedServiceNames( )
- throw (RuntimeException)
-{
- return LotusWordProImportFilter_getSupportedServiceNames();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/LotusWordProImportFilter.hxx b/lotuswordpro/source/filter/LotusWordProImportFilter.hxx
deleted file mode 100644
index b85840b5d..000000000
--- a/lotuswordpro/source/filter/LotusWordProImportFilter.hxx
+++ /dev/null
@@ -1,123 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * Version: MPL 1.1 / GPLv3+ / LGPLv3+
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License or as specified alternatively below. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Initial Developer of the Original Code is
- * Fong Lin <pflin@novell.com>
- * Portions created by the Initial Developer are Copyright (C) 2010 the
- * Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Fong Lin <pflin@novell.com>
- * Noel Power <noel.power@novell.com>
- *
- * For minor contributions see the git repository.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
- * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
- * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
- * instead of those above.
- */
-#ifndef _WORDPERFECTIMPORTFILTER_HXX
-#define _WORDPERFECTIMPORTFILTER_HXX
-
-#include <com/sun/star/document/XFilter.hpp>
-#include <com/sun/star/document/XImporter.hpp>
-#include <com/sun/star/document/XExtendedFilterDetection.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
-#include <cppuhelper/implbase5.hxx>
-#include <rtl/ustrbuf.hxx>
-
-enum FilterType
-{
- FILTER_IMPORT,
- FILTER_EXPORT
-};
-/* This component will be instantiated for both import or export. Whether it calls
- * setSourceDocument or setTargetDocument determines which Impl function the filter
- * member calls */
-class LotusWordProImportFilter : public cppu::WeakImplHelper5
-<
- com::sun::star::document::XFilter,
- com::sun::star::document::XImporter,
- com::sun::star::document::XExtendedFilterDetection,
- com::sun::star::lang::XInitialization,
- com::sun::star::lang::XServiceInfo
->
-{
-private:
-
-protected:
- // oo.org declares
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > mxDoc;
- ::rtl::OUString msFilterName;
- ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > mxHandler;
-
- FilterType meType;
-
- sal_Bool SAL_CALL importImpl( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
- throw (::com::sun::star::uno::RuntimeException);
-
-public:
- LotusWordProImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF)
- : mxMSF( rxMSF ) {}
- virtual ~LotusWordProImportFilter() {}
-
- // XFilter
- virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
- throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL cancel( )
- throw (::com::sun::star::uno::RuntimeException);
-
- // XImporter
- virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
- throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
-
- //XExtendedFilterDetection
- virtual ::rtl::OUString SAL_CALL detect( com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& Descriptor )
- throw( com::sun::star::uno::RuntimeException );
-
- // XInitialization
- virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
- throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
-
- // XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName( )
- throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
- throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
- throw (::com::sun::star::uno::RuntimeException);
-
-};
-
-::rtl::OUString LotusWordProImportFilter_getImplementationName()
- throw ( ::com::sun::star::uno::RuntimeException );
-
-sal_Bool SAL_CALL LotusWordProImportFilter_supportsService( const ::rtl::OUString& ServiceName )
- throw ( ::com::sun::star::uno::RuntimeException );
-
-::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL LotusWordProImportFilter_getSupportedServiceNames( )
- throw ( ::com::sun::star::uno::RuntimeException );
-
-::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
-SAL_CALL LotusWordProImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr)
- throw ( ::com::sun::star::uno::Exception );
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/bencont.cxx b/lotuswordpro/source/filter/bencont.cxx
deleted file mode 100644
index 55a261170..000000000
--- a/lotuswordpro/source/filter/bencont.cxx
+++ /dev/null
@@ -1,663 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-#include "first.hxx"
-#include "assert.h"
-#include <stdio.h>
-#include <sot/storinfo.hxx>
-namespace OpenStormBento
-{
-
-// String definitions
-const char gsBenMagicBytes[] = BEN_MAGIC_BYTES;
-
-/**
-* New bento container from file stream
-* @param pointer to length of bento file
-* @param pointer to pointer of Bento Container object
-* @return error code
-*/
-sal_uLong BenOpenContainer(LwpSvStream * pStream, pLtcBenContainer * ppContainer)
-{
- BenError Err;
-
- *ppContainer = NULL;
-
- if (NULL == pStream)
- {
- return BenErr_ContainerWithNoObjects;
- }
-
- pLtcBenContainer pContainer = new LtcBenContainer(pStream);
- if ((Err = pContainer->Open()) != BenErr_OK) // delete two inputs
- {
- delete pContainer;
- return BenErr_InvalidTOC;
- }
-
- *ppContainer = pContainer;
- return BenErr_OK;
-}
-BenError
-LtcBenContainer::Close()
-{
- return BenErr_OK;
-}
-
-LtcBenContainer::~LtcBenContainer()
-{
- Close();
-}
-
-BenError
-LtcBenContainer::Open() // delete two inputs
-{
- BenError Err;
- CBenTOCReader TOCReader(this);
- if ((Err = TOCReader.ReadLabelAndTOC()) != BenErr_OK)
- {
- return Err;
- }
- return BenErr_OK;
-}
-
-void
-LtcBenContainer::Release()
-{
- delete this;
-}
-
-BenError
-LtcBenContainer::RegisterPropertyName(const char * sPropertyName,
- pCBenPropertyName * ppPropertyName)
-{
- pCBenNamedObjectListElmt pPrevNamedObjectListElmt;
- pCBenNamedObject pNamedObject = FindNamedObject(&cNamedObjects,
- sPropertyName, &pPrevNamedObjectListElmt);
-
- if (pNamedObject != NULL)
- {
- if (! pNamedObject->IsPropertyName())
- return BenErr_NameConflict;
- else *ppPropertyName = (pCBenPropertyName) pNamedObject;
- }
- else
- {
- pCBenIDListElmt pPrevObject;
- if (FindID(&cObjects, cNextAvailObjectID, &pPrevObject) != NULL)
- return BenErr_DuplicateObjectID;
-
- *ppPropertyName = new CBenPropertyName(this, cNextAvailObjectID,
- (pCBenObject) pPrevObject, sPropertyName, pPrevNamedObjectListElmt);
- ++cNextAvailObjectID;
- }
-
- return BenErr_OK;
-}
-
-BenError
-LtcBenContainer::RegisterTypeName(const char * sTypeName,
- pCBenTypeName * ppTypeName)
-{
- pCBenNamedObjectListElmt pPrevNamedObjectListElmt;
- pCBenNamedObject pNamedObject = FindNamedObject(&cNamedObjects, sTypeName,
- &pPrevNamedObjectListElmt);
-
- if (pNamedObject != NULL)
- {
- if (! pNamedObject->IsTypeName())
- return BenErr_NameConflict;
- else *ppTypeName = (pCBenTypeName) pNamedObject;
- }
- else
- {
- pCBenIDListElmt pPrevObject;
- if (FindID(&cObjects, cNextAvailObjectID, &pPrevObject) != NULL)
- return BenErr_DuplicateObjectID;
-
- *ppTypeName = new CBenTypeName(this, cNextAvailObjectID,
- (pCBenObject) pPrevObject, sTypeName, pPrevNamedObjectListElmt);
- ++cNextAvailObjectID;
- }
-
- return BenErr_OK;
-}
-
-BenError
-LtcBenContainer::NewObject(pCBenObject * ppBenObject)
-{
- pCBenIDListElmt pPrev;
- if (FindID(&cObjects, cNextAvailObjectID, &pPrev) != NULL)
- return BenErr_DuplicateObjectID;
-
- *ppBenObject = new CBenObject(this, cNextAvailObjectID, pPrev);
-
- ++cNextAvailObjectID;
- return BenErr_OK;
-}
-
-pCBenObject
-LtcBenContainer::GetNextObject(pCBenObject pCurrObject)
-{
- return (pCBenObject) cObjects.GetNextOrNULL(pCurrObject);
-}
-
-pCBenObject
-LtcBenContainer::FindNextObjectWithProperty(pCBenObject pCurrObject,
- BenObjectID PropertyID)
-{
- while ((pCurrObject = GetNextObject(pCurrObject)) != NULL)
- if (pCurrObject->UseProperty(PropertyID) != NULL)
- return pCurrObject;
-
- return NULL;
-}
-
-pCBenObject
-LtcBenContainer::FindObject(BenObjectID ObjectID)
-{
- return (pCBenObject) FindID(&cObjects, ObjectID, NULL);
-}
-
-/**
-* Construction
-* @param Bento file stream pointer
-* @return
-*/
-LtcBenContainer::LtcBenContainer(LwpSvStream * pStream)
-{
- cpStream = pStream;
- pStream->Seek(STREAM_SEEK_TO_END);
- m_ulLength = pStream->Tell();
- pStream->Seek(STREAM_SEEK_TO_BEGIN);
-}
-
-/**
-* Read buffer fro bento file with specified buffer
-* @date 07/05/2004
-* @param buffer pointer
-* @param buffer size
-* @param number of bytes read
-* @return BenError
-*/
-BenError LtcBenContainer::Read(BenDataPtr pBuffer, unsigned long MaxSize,
- unsigned long * pAmtRead)
-{
- *pAmtRead = cpStream->Read(pBuffer, MaxSize);
- return BenErr_OK;
-}
-/**
-* Read buffer from bento file with specified size
-* @date 07/05/2004
-* @param buffer pointer
-* @param number of bytes to be read
-* @return BenError
-*/
-BenError LtcBenContainer::ReadKnownSize(BenDataPtr pBuffer, unsigned long Amt)
-{
- sal_uLong ulLength;
- ulLength = cpStream->Read(pBuffer, Amt);
- if(ulLength == Amt)
- {
- return BenErr_OK;
- }
- return BenErr_ReadPastEndOfContainer;
-}
-/**
-* Seek to position from the beginning of the bento file
-* @date 07/05/2004
-* @param position in container file from beginning
-* @return BenError
-*/
-BenError LtcBenContainer::SeekToPosition(BenContainerPos Pos)
-{
- cpStream->Seek(Pos);
- return BenErr_OK;
-}
-/**
-* Seek to position compare to end of bento file
-* @date 07/05/2004
-* @param position in container file from end
-* @return BenError
-*/
-BenError LtcBenContainer::SeekFromEnd(long Offset)
-{
- cpStream->Seek(STREAM_SEEK_TO_END);
- cpStream->SeekRel(Offset);
-
- return BenErr_OK;
-}
-/**
-* Get position in the bento file
-* @date 07/05/2004
-* @param pointer of current position in container file from end
-* @return BenError
-*/
-BenError LtcBenContainer::GetPosition(BenContainerPos * pPosition)
-{
- *pPosition = cpStream->Tell();
- return BenErr_OK;
-}
-/**
-* Find the next value stream with property name
-* @date 07/05/2004
-* @param string of property name
-* @param current value stream pointer with the property name
-* @return next value stream pointer with the property names
-*/
-LtcUtBenValueStream * LtcBenContainer::FindNextValueStreamWithPropertyName(const char * sPropertyName, LtcUtBenValueStream * pCurrentValueStream)
-{
- CBenPropertyName * pPropertyName;
- RegisterPropertyName(sPropertyName, &pPropertyName); // Get property name object
-
- if (NULL == pPropertyName)
- return NULL; // Property not exist
-
- // Get current object
- CBenObject * pObj = NULL;
- if (pCurrentValueStream != NULL)
- {
- pObj = pCurrentValueStream->GetValue()->GetProperty()->GetBenObject();
- }
-
-
- pObj =FindNextObjectWithProperty(pObj, pPropertyName->GetID()); // Get next object with same property name
- if (NULL == pObj)
- return NULL;
-
- CBenValue * pValue;
- LtcUtBenValueStream * pValueStream;
-
- pValue = pObj->UseValue(pPropertyName->GetID());
-
- pValueStream = new LtcUtBenValueStream(pValue);
-
- return pValueStream;
-}
-
-/**
-* Find the unique value stream with property name
-* @date 07/05/2004
-* @param string of property name
-* @return the only value stream pointer with the property names
-*/
-LtcUtBenValueStream * LtcBenContainer::FindValueStreamWithPropertyName(const char * sPropertyName)
-{
- return FindNextValueStreamWithPropertyName(sPropertyName, NULL);
-}
-/**
-* Find the unique value stream with property name and Object ID
-* @date 10/24/2005
-* @param object ID
-* @param string of property name
-* @return the only value stream pointer with the property names
-*/
-LtcUtBenValueStream * LtcBenContainer::FindObjectValueStreamWithObjectIDAndProperty(BenObjectID ObjectID, const char * sPropertyName)
-{
- CBenPropertyName * pPropertyName;
- RegisterPropertyName(sPropertyName, &pPropertyName); // Get property name object
- if (NULL == pPropertyName)
- return NULL; // Property not exist
- // Get current object
- CBenObject * pObj = NULL;
- pObj = FindObject(ObjectID); // Get object with object ID
- if (NULL == pObj)
- return NULL;
- CBenValue * pValue;
- LtcUtBenValueStream * pValueStream;
- pValue = pObj->UseValue(pPropertyName->GetID());
- pValueStream = new LtcUtBenValueStream(pValue);
- return pValueStream;
-}
-/**
-* <description>
-* @date 07/05/2004
-* @param pointer to length of bento file
-* @return BenError
-*/
-BenError LtcBenContainer::GetSize(sal_uLong * pLength)
-{
- *pLength = m_ulLength;
- return BenErr_OK;
-}
-
-sal_uInt32 GetSvStreamSize(SvStream * pStream)
-{
- sal_uInt32 nCurPos = pStream->Tell();
- pStream->Seek(STREAM_SEEK_TO_END);
- sal_uInt32 ulLength = pStream->Tell();
- pStream->Seek(nCurPos);
-
- return ulLength;
-}
-/**
-* Find hazily according to part of property name
-* @date 01/31/2005
-* @param
-* @return the value stream pointers vector with the property names
-*/
-BenError LtcBenContainer::CreateGraphicStreams(std::vector<SvStream *> * pStreamVector)
-{
- /* traverse all named objects to find all the graphic property names */
- CBenObject * pObj= NULL;
- char *pName;
- std::vector<std::string> aGrPropertyVector ;
- while( (pObj = GetNextObject(pObj)) )
- {
- if(pObj->IsNamedObject())
- {
- CBenNamedObject * pNamedObj = static_cast<CBenNamedObject *>(pObj);
- if(!pNamedObj->IsPropertyName())
- continue;
-
- // Gr2E,41FDD458-S
- // Gr2E,41FDD458-D
- pName = const_cast<char *>(pNamedObj->GetName());
- if ( (pName[0] == 'G')
- && (pName[1] == 'r')
- &&( (pName[14] == 'D') || (pName[14] == 'S') ) )
- {
- aGrPropertyVector.push_back(std::string(pName));
- }
- }
- }
-
- /* traverse the found properties and construct the stream vectors */
- std::vector<std::string>::iterator itor;
- for (itor = aGrPropertyVector.begin(); itor != aGrPropertyVector.end(); ++itor)
- {
- // get property names with suffix of S&D
- char sSName[32], sDName[32];
- strcpy(sSName, itor->c_str());
- strcpy(sDName, itor->c_str());
- sSName[14] = 'S';
- sDName[14] = 'D';
-
- // erase strings in vector
- std::vector<std::string>::iterator itorSearch;
- for (itorSearch = aGrPropertyVector.begin(); itorSearch != aGrPropertyVector.end(); ++itorSearch)
- {
- if( (*itorSearch == sSName) || (*itorSearch == sDName) )
- {
- std::vector<std::string>::iterator itorDel = itorSearch;
- aGrPropertyVector.erase(itorDel);
- }
- }
-
- // get S&D's stream and merge them together
- {
- SvStream *pD = NULL, *pS = NULL;
-
- pS = FindValueStreamWithPropertyName(sSName);
- assert(pS != NULL);
- pD = FindValueStreamWithPropertyName(sDName);
- assert(pD != NULL);
-
- sal_uInt32 nDLen = GetSvStreamSize(pD);
- sal_uInt32 nLen = GetSvStreamSize(pS) + nDLen;
- assert(nLen > 0);
- char * pBuf = new char[nLen];
- assert(pBuf != NULL);
- char * pPointer = pBuf;
- pD->Read(pPointer, nDLen);
- pPointer += nDLen;
- pS->Read(pPointer, nLen - nDLen);
-
- delete pS;
- delete pD;
-
- SvMemoryStream * pStream = new SvMemoryStream(pBuf, nLen, STREAM_READ);
- assert(pStream != NULL);
-
- pStreamVector->push_back(pStream);
- }
- }
-
- aGrPropertyVector.clear();
- return BenErr_OK;
-}
-
-/**
-* Find hazily according to object ID
-* @date 01/31/2005
-* @param pObjectname - format as "GrXX,XXXXXXXX" wherein XX is high part of object ID, and XXXXXXXX is low part
-* @return the value stream pointers with the property names
-*/
-BenError LtcBenContainer::CreateGraphicStream(SvStream * &pStream, const char *pObjectName)
-{
- if (!pObjectName)
- {
- pStream = NULL;
- return BenErr_NamedObjectError;
- }
- // construct the string of property name
- char sSName[64]="";
- char sDName[64]="";
-
- sprintf(sSName, "%s-S", pObjectName);
- sprintf(sDName, "%s-D", pObjectName);
-
- /* traverse the found properties and construct the stream vectors */
- SvMemoryStream * pMemStream = NULL;
- // get S&D's stream and merge them together
- SvStream *pD = NULL, *pS = NULL;
-
- pS = FindValueStreamWithPropertyName(sSName);
- pD = FindValueStreamWithPropertyName(sDName);
-
-
- sal_uInt32 nDLen = 0;
- if(pD)
- {
- nDLen = GetSvStreamSize(pD);
- }
- sal_uInt32 nLen = nDLen;
- if(pS)
- {
- nLen += GetSvStreamSize(pS) ;
- }
-
- OSL_ENSURE(nLen > 0, "expected a non-0 length");
- // the 'D' stream is NULL or it has invalid length
- if (nLen <= 0)
- {
- pStream = NULL;
- return BenErr_NamedObjectError;
- }
-
- char * pBuf = new char[nLen];
- assert(pBuf != NULL);
- char * pPointer = pBuf;
- if(pD)
- {
- pD->Read(pPointer, nDLen);
- delete pD;
- }
- pPointer += nDLen;
- if(pS)
- {
- pS->Read(pPointer, nLen - nDLen);
- delete pS;
- }
-
- pMemStream = new SvMemoryStream(pBuf, nLen, STREAM_READ);
- assert(pMemStream != NULL);
-
- pStream = pMemStream;
- return BenErr_OK;
-}
-
-#include <tools/globname.hxx>
-
-/**
-* Find ole object storage stream data according to object name
-* @date 10/24/2005
-* @param
-* @return the value ole storage stream data pointers
-*/
-LtcUtBenValueStream* LtcBenContainer::FindOLEStorageStreamWithObjectName(const char * sObjectName, AswEntry& rEntry)
-{
- if (!sObjectName)
- return NULL;
-
- //Find OleRootStorage stream
- std::string aRootStroageName("OleRootStorage");
- std::string aOleStroageName("OleStorage");
- LtcUtBenValueStream* pRootStream = NULL;
- pRootStream = FindValueStreamWithPropertyName(aRootStroageName.c_str());
- if(!pRootStream)
- return NULL;
- //Read root storage data and find the ole storage object id according to the object name
- sal_uInt32 nDLen = 0;
- nDLen = GetSvStreamSize(pRootStream);
- for(sal_uInt32 nIndex = 0; nIndex < nDLen / ASWENTRY_SIZE; nIndex ++)
- {
- //Get entry
- ReadAswEntry(pRootStream, rEntry);
- String sObjName;
- rEntry.GetName(sObjName);
- if(sObjName.EqualsAscii(sObjectName))
- {
- //Find it
- delete pRootStream;
- return FindObjectValueStreamWithObjectIDAndProperty(rEntry.GetObjectID(), aOleStroageName.c_str());
- }
- }
-
- // Not find
- if(pRootStream)
- {
- delete pRootStream;
- }
-
- return NULL;
-}
-void LtcBenContainer::ReadAswEntry(SvStream * pStream, AswEntry & rEntry)
-{
- char* pBuf = new char[ASWENTRY_SIZE];
- pStream->Read(pBuf, ASWENTRY_SIZE);
- rEntry.Load(pBuf);
- delete[] pBuf;
-}
-////////////////////////////////////////////////////////////////////
-//classs AswEntry
-AswEntry::AswEntry()
-{
- Init();
-}
-void AswEntry::Init()
-{
- memset( this, 0, sizeof (AswEntry));
-}
-void AswEntry::SetName( const String& rName )
-{
- int i;
- for( i = 0; i < rName.Len() && i < 68; i++ )
- nName[ i ] = rName.GetChar( i );
- while( i < 68 )
- nName[ i++ ] = 0;
-}
-void AswEntry::GetName(String & rName) const
-{
- rName = nName;
-}
-void AswEntry::Store( void* pTo )
-{
- SvMemoryStream r( (sal_Char *)pTo, ASWENTRY_SIZE, STREAM_WRITE );
- for( short i = 0; i < 68; i++ )
- r << nName[ i ]; // 00 name as WCHAR
- r<< nMtime[ 0 ] // 42 entry type
- << nMtime[ 1 ] // 43 0 or 1 (tree balance?)
- << nCtime[ 0 ] // 44 left node entry
- << nCtime[ 1 ] // 48 right node entry
- << nAtime[ 0 ] // 44 left node entry
- << nAtime[ 1 ]; // 48 right node entry
- r.Write(&aClsId ,16); // 50 class ID (optional)
- r<< nStatebits // 60 state flags(?)
- << nType
- << nObjectIDRef // 64 modification time
- << nMversion // 6C creation and access time
- << nLversion // 6C creation and access time
- << nReserved[ 0 ] // 74 starting block (either direct or translated)
- << nReserved[ 1 ]; // 78 file size
-}
-void AswEntry::Load( const void* pFrom )
-{
- SvMemoryStream r( (sal_Char *)pFrom, ASWENTRY_SIZE, STREAM_WRITE );
- for( short i = 0; i < 68; i++ )
- r >> nName[ i ]; // 00 name as WCHAR
- r>> nMtime[ 0 ] // 42 entry type
- >> nMtime[ 1 ] // 43 0 or 1 (tree balance?)
- >> nCtime[ 0 ] // 44 left node entry
- >> nCtime[ 1 ] // 48 right node entry
- >> nAtime[ 0 ] // 44 left node entry
- >> nAtime[ 1 ]; // 48 right node entry
- r.Read(&aClsId,16); // 50 class ID (optional)
- r>> nStatebits // 60 state flags(?)
- >> nType
- >> nObjectIDRef // 64 modification time
- >> nMversion // 6C creation and access time
- >> nLversion // 6C creation and access time
- >> nReserved[ 0 ] // 74 starting block (either direct or translated)
- >> nReserved[ 1 ]; // 78 file size
-}
-void AswEntry::SetClassId( const ClsId& r )
-{
- memcpy( &aClsId, &r, sizeof( ClsId ) );
-}
-///////////////////////////////////////////////////////////////////
-}// end namespace OpenStormBento
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/benlist.cxx b/lotuswordpro/source/filter/benlist.cxx
deleted file mode 100644
index c2ec12351..000000000
--- a/lotuswordpro/source/filter/benlist.cxx
+++ /dev/null
@@ -1,119 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-#include "first.hxx"
-namespace OpenStormBento
-{
-
-pCBenNamedObject
-FindNamedObject(pCUtList pList, const char * sName,
- pCBenNamedObjectListElmt * ppPrev)
-{
- pCUtListElmt pTerminating = pList->GetTerminating();
- for (pCUtListElmt pCurr = pList->GetLast(); pCurr != pTerminating;
- pCurr = pCurr->GetPrev())
- {
- pCBenNamedObjectListElmt pCurrNamedObjectListElmt =
- (pCBenNamedObjectListElmt) pCurr;
-
- int Comp = strcmp(sName, pCurrNamedObjectListElmt->GetNamedObject()->
- GetNameCStr());
-
- if (Comp == 0)
- return pCurrNamedObjectListElmt->GetNamedObject();
- else if (Comp < 0)
- continue;
- else
- {
- if (ppPrev != NULL)
- *ppPrev = pCurrNamedObjectListElmt;
- return NULL;
- }
- }
-
- if (ppPrev != NULL)
- *ppPrev = (pCBenNamedObjectListElmt) pTerminating;
- return NULL;
-}
-
-// Assume list is of BenIDListElmt list elements, sorted by ID
-pCBenIDListElmt
-FindID(pCUtList pList, BenObjectID ObjectID, pCBenIDListElmt * ppPrev)
-{
- pCUtListElmt pTerminating = pList->GetTerminating();
- for (pCUtListElmt pCurr = pList->GetLast(); pCurr != pTerminating;
- pCurr = pCurr->GetPrev())
- {
- pCBenIDListElmt pCurrIDListElmt = (pCBenIDListElmt) pCurr;
-
- if (ObjectID == pCurrIDListElmt->GetID())
- return pCurrIDListElmt;
- else if (ObjectID < pCurrIDListElmt->GetID())
- continue;
- else
- {
- if (ppPrev != NULL)
- *ppPrev = pCurrIDListElmt;
- return NULL;
- }
- }
-
- if (ppPrev != NULL)
- *ppPrev = (pCBenIDListElmt) pTerminating;
- return NULL;
-}
-} //end namespace OpenStormBento
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/benname.cxx b/lotuswordpro/source/filter/benname.cxx
deleted file mode 100644
index 1c346bc99..000000000
--- a/lotuswordpro/source/filter/benname.cxx
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-#include "first.hxx"
-namespace OpenStormBento
-{
-// changed to remove warning
-CBenNamedObject::CBenNamedObject(pLtcBenContainer pContainer,
- BenObjectID ObjectID, pCBenObject pPrevObject, const char * sName,
- pCBenNamedObjectListElmt pPrevNamedObjectListElmt) :
- CBenObject(pContainer, ObjectID, pPrevObject), csName(sName),
- cNameListElmt( pPrevNamedObjectListElmt)
-{
- cNameListElmt.SetNamedObject(this);
-}
-
-UtBool CBenNamedObject::IsNamedObject()
-{ return UT_TRUE; }
-
-UtBool CBenNamedObject::IsPropertyName()
-{ return UT_FALSE; }
-
-UtBool CBenNamedObject::IsTypeName()
-{ return UT_FALSE; }
-
-UtBool CBenPropertyName::IsPropertyName()
-{ return UT_TRUE; }
-
-UtBool CBenTypeName::IsTypeName()
-{ return UT_TRUE; }
-} // end namespace OpenStormBento
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/benobj.cxx b/lotuswordpro/source/filter/benobj.cxx
deleted file mode 100644
index fb9f93947..000000000
--- a/lotuswordpro/source/filter/benobj.cxx
+++ /dev/null
@@ -1,131 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-#include "first.hxx"
-namespace OpenStormBento
-{
-
-UtBool
-CBenObject::IsNamedObject()
-{
- return UT_FALSE;
-}
-
-pCBenProperty
-CBenObject::GetNextProperty(pCBenProperty pCurrProperty)
-{
- return (pCBenProperty) cProperties.GetNextOrNULL(pCurrProperty);
-}
-
-pCBenProperty
-CBenObject::UseProperty(BenObjectID PropertyID)
-{
- pCBenIDListElmt pPrev;
- return (pCBenProperty) FindID(&cProperties, PropertyID, &pPrev);
-}
-
-void
-CBenObject::DeleteProperty(pCBenProperty pProperty)
-{
- delete pProperty;
-}
-
-pCBenValue
-CBenObject::UseValue(BenObjectID PropertyID)
-{
- pCBenProperty pProperty = UseProperty(PropertyID);
- if (pProperty == NULL)
- return NULL;
- return pProperty->UseValue();
-}
-
-pCBenValue
-CBenObject::UseValueWithPropertyName(const char * sPropertyName)
-{
- pCBenPropertyName pPropertyName;
- if (GetContainer()->RegisterPropertyName(sPropertyName, &pPropertyName)
- != BenErr_OK)
- return NULL;
-
- return UseValue(pPropertyName->GetID());
-}
-
-pCBenValue
-CBenObject::UseSingleValue()
-{
- if (cProperties.IsEmpty() || cProperties.ContainsAtLeastTwoItems())
- return NULL;
- pCBenProperty pProperty = (pCBenProperty) cProperties.GetFirst();
- return pProperty->UseValue();
-}
-
-BenError
-CBenObject::NewValue(BenObjectID PropertyID, BenObjectID TypeID, pCBenValue *
- ppValue)
-{
- pCBenIDListElmt pPrevProperty;
- pCBenProperty pProperty = (pCBenProperty) FindID(&cProperties,
- PropertyID, &pPrevProperty);
- if (pProperty != NULL)
- return BenErr_PropertyAlreadyExists;
-
- pProperty = new CBenProperty(this, PropertyID, TypeID, pPrevProperty);
- *ppValue = pProperty->UseValue();
-
- return BenErr_OK;
-}
-}// end namespace OpenStormBento
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/bento.hxx b/lotuswordpro/source/filter/bento.hxx
deleted file mode 100644
index eb63a8437..000000000
--- a/lotuswordpro/source/filter/bento.hxx
+++ /dev/null
@@ -1,544 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-#ifndef BENTO_H
-#define BENTO_H
-
-#include <string>
-#include <vector>
-#include "lwpsvstream.hxx"
-
-#define BEN_CC __stdcall
-#ifdef COMP_BENTO
-#define BEN_EXPORT __declspec(dllexport)
-#else
-#define BEN_EXPORT
-#endif
-
-using namespace std;
-
-#include "ut.hxx"
-#include "utlist.hxx"
-#include <tools/stream.hxx> // SvStream definition
-#include <sot/storage.hxx> // SotStorageStream definition, add by 10/24/2005
-
-namespace OpenStormBento
-{
-
-#define BEN_CURR_MAJOR_VERSION 2
-#define BEN_CURR_MINOR_VERSION 0
-#define BEN_MAGIC_BYTES_SIZE 8
-#define BEN_LABEL_SIZE 24
-
-#define BEN_MAGIC_BYTES "\xA4""CM""\xA5""Hdr""\xD7"
-//For Ole2DirectoryStruct, Add by 10/24/2005
-#define BEN_STGTY_STORAGE 1
-#define BEN_STGTY_STREAM 2
-#define ASWENTRY_SIZE 204
-struct ClsId
-{
- sal_Int32 n1;
- sal_Int16 n2, n3;
- sal_uInt8 n4, n5, n6, n7, n8, n9, n10, n11;
-};
-class AswEntry //total length: 204
-{
- sal_uInt16 nName[ 68 ]; //Name of IStorage or IStream referenced by this entry, length = 136
- sal_Int32 nMtime[ 2 ];
- sal_Int32 nCtime[ 2 ];
- sal_Int32 nAtime[ 2 ];
- ClsId aClsId; //CLSID from OLE 2 IStorage::SetClass call
- sal_uInt32 nStatebits; //State bits from OLE 2 IStorage::SetStateBits call
- sal_uInt32 nType; // STGTY_STORAGE: 1 or STGTY_STREAM:2,
- sal_uInt32 nObjectIDRef; //Persistent Bento reference to Bento object for this IStorage or IStream
- sal_uInt32 nMversion;
- sal_uInt32 nLversion;
- sal_uInt32 nReserved[2]; //skip 16 char
-public:
- AswEntry();
- void Init(); // initialize the data
- void SetName( const String& ); // store a name (ASCII, up to 32 chars)
- void GetName( String& rName ) const;
- void Load( const void* );
- void Store( void* );
- sal_uInt32 GetType() const { return nType; }
- void SetType( sal_uInt32 t ) { nType = t;}
- const ClsId& GetClassId() const { return aClsId;}
- void SetClassId( const ClsId& );
- void SetObjectID(sal_uInt32 id) { nObjectIDRef = id;}
- sal_uInt32 GetObjectID() const { return nObjectIDRef;}
-};
-//End by
-
-enum BenError
-{
- BenErr_OK = 0,
- BenErr_NameConflict = 1,
- BenErr_DuplicateObjectID = 2,
- BenErr_UnknownBentoFormatVersion = 3,
- BenErr_NamedObjectError = 4,
- BenErr_NamedObjectIllegalValue = 5,
- BenErr_InvalidTOC = 6,
- BenErr_64BitOffsetNotSupported = 7,
- BenErr_ReadPastEndOfTOC = 8,
- BenErr_ContainerWithNoObjects = 9,
- BenErr_ObjectWithNoProperties = 10,
- BenErr_PropertyWithNoValues = 11,
- BenErr_IllegalInMemoryTOC = 12,
- BenErr_PropertyAlreadyExists = 13,
- BenErr_UnexpectedEndOfFile = 14,
- BenErr_InvalidWriteOffset = 15,
- BenErr_InvalidImmediateWrite = 16,
- BenErr_TOCSeedError = 17,
- BenErr_ReadPastEndOfContainer = 18,
- BenErr_DuplicateName = 19,
- BenErr_BadReferencedList = 20,
- BenErr_IllegalContinuedImmediate = 21,
- BenErr_NotBentoContainer = 22,
- BenErr_PropertyWithMoreThanOneValue = 23
-
- // IMPORTANT - UtStream errors (UtErr_....) are also valid Bento
- // errors. They have codes of 100 and higher. When, say, a Bento
- // container open fails due to an access violation (somebody else, say,
- // has it open exclusive), will get a UtErr code. If define own
- // subclass of UtStream (custom handler), can define own error codes--
- // those should start at 200
-};
-/*
- * These two functions are useless in SODC
- *
-inline UtError BenToUtError(BenError Err)
-{
- if (Err == 0 || Err >= 100)
- return (UtError) Err;
- else return UtErr_Fail;
-}
-
-inline BenError UtToBenError(UtError Err)
-{ UT_ASSERT(Err == 0 || Err >= 100); return (BenError) Err; }
-enum BenSeekMode {
- BenSeek_FromStart = 1,
- BenSeek_FromCurr = 2,
- BenSeek_FromEnd = 3
-};
-*/
-
-UtDefClassP(LtcBenContainer);
-UtDefClassP(CBenIDListElmt);
-UtDefClassP(CBenObject);
-UtDefClassP(CBenProperty);
-UtDefClassP(CBenReference);
-UtDefClassP(CBenValue);
-UtDefClassP(CBenValueSegment);
-UtDefClassP(CBenNamedObjectListElmt);
-UtDefClassP(CBenNamedObject);
-UtDefClassP(CBenPropertyName);
-UtDefClassP(CBenTypeName);
-
-typedef unsigned char BenByte;
-typedef unsigned short BenWord;
-typedef unsigned long BenDWord;
-typedef void * BenDataPtr;
-typedef const void * BenConstDataPtr;
-
-typedef unsigned long BenContainerPos;
-typedef unsigned long BenObjectID;
-typedef unsigned long BenGeneration;
-
-sal_uLong BenOpenContainer(LwpSvStream * pStream, pLtcBenContainer * ppContainer);
-
-class CBenIDListElmt : public CUtListElmt
-{
-public: // Internal methods
- CBenIDListElmt(BenObjectID ID, pCBenIDListElmt pPrev) : CUtListElmt(pPrev)
- { cID = ID; }
- CBenIDListElmt(BenObjectID ID) { cID = ID; }
- BenObjectID GetID() { return cID; }
-
-private: // Data
- BenObjectID cID;
-};
-
-class CBenNamedObjectListElmt : public CUtListElmt
-{
-public: // Methods
- // added to remove warning
- CBenNamedObjectListElmt(pCBenNamedObjectListElmt pPrev) : CUtListElmt(pPrev)
- { cpNamedObject = NULL; }
- void SetNamedObject(pCBenNamedObject pObj)
- {
- cpNamedObject = pObj;
- }
-
- CBenNamedObjectListElmt(pCBenNamedObject pNamedObject,
- pCBenNamedObjectListElmt pPrev) : CUtListElmt(pPrev)
- { cpNamedObject = pNamedObject; }
- pCBenNamedObject GetNamedObject() { return cpNamedObject; }
-
-private: // Data
- pCBenNamedObject cpNamedObject;
-};
-
-class LtcUtBenValueStream : public SvStream
-{
-public:
- LtcUtBenValueStream(pCBenValue pValue);
- ~LtcUtBenValueStream();
-
-public: // Overridden methods
-
- /* added by */
- CBenValue * GetValue(){ return cpValue; };
- sal_uLong GetSize() { return m_ulValueLength; };
-protected: // Overridden methods
-
- virtual sal_uLong GetData( void* pData, sal_uLong nSize );
- virtual sal_uLong PutData( const void* pData, sal_uLong nSize );
- virtual sal_uLong SeekPos( sal_uLong nPos );
- virtual void SetSize( sal_uLong nSize );
- virtual void FlushData();
-
-private: // Data
- pCBenValue cpValue;
- unsigned long cCurrentPosition;
-
- sal_uLong m_ulValueLength; // Added by , sum of length of all sub-valuesegments
-// void GetAmountLeft(sal_uLong * pAmtLeft); useless in SODC
-};
-
-class LtcBenContainer
-{
-public:
- BenError Open();
- void Release(); // Deletes container object--last call
- BenError Close();
- BenError RegisterTypeName(const char * sTypeName,
- pCBenTypeName * ppTypeName);
- BenError RegisterPropertyName(const char * sPropertyName,
- pCBenPropertyName * ppPropertyName);
- // Pass NULL to begin iteration. Done when returns NULL.
- // Objects are returned in order of increasing ID
- pCBenObject GetNextObject(pCBenObject pCurrObject);
- pCBenObject FindObject(BenObjectID ObjectID);
- pCBenObject FindNextObjectWithProperty(pCBenObject pCurrObject,
- BenObjectID PropertyID);
- BenError BEN_EXPORT NewObject(pCBenObject * ppBenObject);
-
-public: // Internal methods
- LtcBenContainer(LwpSvStream * pStream);
- ~LtcBenContainer();
-
- BenError Read(BenDataPtr pBuffer, unsigned long MaxSize,
- unsigned long * pAmtRead);
- BenError ReadKnownSize(BenDataPtr pBuffer, unsigned long Amt);
- BenError SeekToPosition(BenContainerPos Pos);
- BenError SeekFromEnd(long Offset);
-
- BenError GetPosition(BenContainerPos * pPosition);
-
- BenObjectID GetNextAvailObjectID() { return cNextAvailObjectID; }
- void SetNextAvailObjectID(BenObjectID ID) { cNextAvailObjectID = ID; }
- pCUtList GetObjects() { return &cObjects; }
- pCUtList GetNamedObjects() { return &cNamedObjects; }
-
- LtcUtBenValueStream * FindNextValueStreamWithPropertyName(const char * sPropertyName, LtcUtBenValueStream * pCurrentValueStream);
- LtcUtBenValueStream * FindValueStreamWithPropertyName(const char * sPropertyName);
- LtcUtBenValueStream * FindObjectValueStreamWithObjectIDAndProperty(BenObjectID ObjectID, const char * sPropertyName);
- BenError CreateGraphicStreams(std::vector<SvStream *> * pStreamVector) ;
- BenError CreateGraphicStream(SvStream * &pStream, const char *pObjectName);
-
- LtcUtBenValueStream * FindOLEStorageStreamWithObjectName(const char * sObjectName, AswEntry& rDirStruct);
- void ReadAswEntry(SvStream * pStream, AswEntry& rEntry);
-
- BenError GetSize(sal_uLong * pLength);
- LwpSvStream * GetStream()
- {
- return cpStream;
- };
-private: // Data
- CUtOwningList cObjects;
- CUtList cNamedObjects;
- LwpSvStream * cpStream;
- sal_uLong m_ulLength; // Added for TOCRead.cpp
- BenObjectID cNextAvailObjectID; // for new object
-};
-
-class CBenObject : public CBenIDListElmt
-{
-public:
- pCBenProperty GetNextProperty(pCBenProperty pCurrProperty);
- pCBenProperty UseProperty(BenObjectID PropertyID);
- void DeleteProperty(pCBenProperty pProperty);
- pCBenValue UseValue(BenObjectID PropertyID);
- pCBenValue UseSingleValue();
- // Inefficient to use this method if will use property multiple times--
- // instead register property and call UseProperty with property ID
- pCBenValue UseValueWithPropertyName(const char * sPropertyName);
- virtual UtBool IsNamedObject();
- pLtcBenContainer GetContainer() { return cpContainer; }
- BenObjectID GetObjectID() { return GetID(); }
- BenError BEN_EXPORT NewValue(BenObjectID PropertyID, BenObjectID TypeID,
- pCBenValue * ppValue);
-public: // Internal methods
- CBenObject(pLtcBenContainer pContainer, BenObjectID ObjectID,
- pCBenIDListElmt pPrev) : CBenIDListElmt(ObjectID, pPrev)
- { cpContainer = pContainer; }
- pCUtList GetProperties() { return &cProperties; }
-
-private: // Data
- pLtcBenContainer cpContainer;
- CUtOwningList cProperties;
-};
-
-class CBenValue : public CBenIDListElmt
-{
-public:
- unsigned long GetValueSize();
- BenError ReadValueData(BenDataPtr pBuffer,
- unsigned long Offset, unsigned long MaxSize, unsigned long * pAmtRead);
- BenError ReadValueDataKnownSize(BenDataPtr pBuffer,
- unsigned long Offset, unsigned long Amt);
-
- BenError BEN_EXPORT WriteValueData(BenConstDataPtr pBuffer,
- unsigned long Offset, unsigned long Size);
- BenError BEN_EXPORT WriteValueData(BenConstDataPtr pBuffer,
- unsigned long Offset, unsigned long Size, unsigned long * pAmtWritten);
- BenError BEN_EXPORT WriteImmediateValueData(BenConstDataPtr pBuffer,
- unsigned short Size);
- BenError BEN_EXPORT TruncateValueSize(unsigned long NewSize);
- BenError BEN_EXPORT NewReference(BenObjectID ReferencedObjectID,
- pCBenReference pReference);
- BenObjectID BEN_EXPORT GetReferencedObject(pCBenReference pReference);
-
-
- pCBenProperty BEN_EXPORT GetProperty() { return cpProperty; }
-
-public: // Internal methods
- // added to remove WARNING
- CBenValue(BenObjectID TypeID):CBenIDListElmt(TypeID)
- {
- cpProperty = NULL;
- cpReferencedList = NULL;
- }
-
- void SetProperty(pCBenProperty pProperty)
- {
- cpProperty = pProperty;
- }
-
- CBenValue(pCBenProperty pProperty, BenObjectID TypeID) :
- CBenIDListElmt(TypeID)
- {
- cpProperty = pProperty;
- cpReferencedList = NULL;
- }
- BenObjectID GetTypeNameID() { return GetID(); }
- inline pCBenValueSegment GetNextValueSegment(pCBenValueSegment
- pCurrValueSegment);
- inline pLtcBenContainer GetContainer();
- pCUtList GetValueSegments() { return &cValueSegments; }
- BenObjectID GetReferencedListID();
- // Currently, no generation support
- BenGeneration GetGeneration() { return 1; }
-
-private: // Data
- pCBenProperty cpProperty;
- CUtOwningList cValueSegments;
- pCBenValue cpReferencedList;
- unsigned long cReferencedObjectsSize;
-};
-
-class CBenProperty : public CBenIDListElmt
-{
-public:
- // In the Apple Bento, a property can have multiple values, each of a
- // different type. But we never use it that way, so in this code a
- // property has exactly one value
-
- pCBenValue UseValue() { return &cValue; }
- pCBenObject GetBenObject() { return cpObject; }
- pLtcBenContainer GetContainer() { return GetBenObject()->GetContainer(); }
-
-public: // Internal methods
- // changed to remove WARNING here
- CBenProperty(pCBenObject pObject, BenObjectID PropertyID,
- BenObjectID TypeID, pCBenIDListElmt pPrevProperty) :
- CBenIDListElmt(PropertyID, pPrevProperty), cValue(TypeID)
- {
- cpObject = pObject;
- cValue.SetProperty(this);
- }
-
-BenObjectID GetPropertyNameID() { return GetID(); }
-
-private: // Data
- pCBenObject cpObject;
- CBenValue cValue;
-};
-
-// In our implementation, reference is always just the object ID for the
-// object referenced (but you shouldn't assume that)
-#define BEN_REFERENCE_SIZE 4
-
-class CBenReference
-{
-public: // Methods
- BenByte * GetData() { return cData; }
-
-private: // Data
- BenByte cData[BEN_REFERENCE_SIZE];
-};
-
-class CBenValueSegment : public CUtListElmt
-{
-public: // Internal methods
- CBenValueSegment(pCBenValue pValue, BenContainerPos Pos,
- unsigned long Size) : CUtListElmt(pValue->GetValueSegments())
- { cpValue = pValue; cImmediate = UT_FALSE; cPos = Pos;
- cSize = Size; }
- CBenValueSegment(pCBenValue pValue, BenConstDataPtr pImmData,
- unsigned short Size) : CUtListElmt(pValue->GetValueSegments())
- { cpValue = pValue; cImmediate = UT_TRUE;
- UtHugeMemcpy(cImmData, pImmData, Size); cSize = Size; }
- CBenValueSegment(BenContainerPos Pos, unsigned long Size)
- { cpValue = NULL; cImmediate = UT_FALSE; cPos = Pos;
- cSize = Size; }
- CBenValueSegment(BenConstDataPtr pImmData, unsigned short Size)
- { cpValue = NULL; cImmediate = UT_TRUE;
- UtHugeMemcpy(cImmData, pImmData, Size); cSize = Size; }
- UtBool IsLast()
- {
- return cpValue == NULL || cpValue->GetValueSegments()->GetLast() ==
- this;
- }
- UtBool IsImmediate() { return cImmediate; }
- BenContainerPos GetPosition() { return cPos; }
- unsigned long GetSize() { return cSize; }
- void SetSize(unsigned long Size) { cSize = Size; }
- BenByte * GetImmediateData() { return cImmData; }
-
-private: // Data
- pCBenValue cpValue;
- UtBool cImmediate;
- union
- {
- BenContainerPos cPos;
- BenByte cImmData[4];
- };
- unsigned long cSize;
-};
-
-inline pCBenValueSegment CBenValue::GetNextValueSegment(pCBenValueSegment
- pCurrValueSegment)
-{ return (pCBenValueSegment) cValueSegments.GetNextOrNULL(pCurrValueSegment); }
-
-inline pLtcBenContainer CBenValue::GetContainer()
-{ return GetProperty()->GetContainer(); }
-
-class CBenNamedObject : public CBenObject
-{
-public: // Methods
- virtual UtBool IsNamedObject();
- virtual UtBool IsPropertyName();
- virtual UtBool IsTypeName();
-
-public: // Internal methods
- CBenNamedObject(pLtcBenContainer pContainer, BenObjectID ObjectID,
- pCBenObject pPrevObject, const char * sName,
- pCBenNamedObjectListElmt pPrevNamedObjectListElmt);
- const char * GetName() { return csName.data(); }
-
-
- const char * GetNameCStr() { return csName.c_str(); }
-
-
- void SetPosition(BenContainerPos Pos) { cPos = Pos; }
- BenContainerPos GetPosition(void) { return cPos; }
- size_t GetLength(void) { return csName.length()+ 1; }
- pCBenNamedObjectListElmt GetNameListElmt() { return &cNameListElmt; }
-
-private: // Data
- string csName;
- CBenNamedObjectListElmt cNameListElmt;
- BenContainerPos cPos;
-};
-
-class CBenPropertyName : public CBenNamedObject
-{
-public: // Internal methods
- CBenPropertyName(pLtcBenContainer pContainer, BenObjectID ObjectID,
- pCBenObject pPrevObject, const char * sName,
- pCBenNamedObjectListElmt pPrevNamedObjectListElmt) :
- CBenNamedObject(pContainer, ObjectID, pPrevObject, sName,
- pPrevNamedObjectListElmt) { ; }
- virtual UtBool IsPropertyName();
-};
-
-class CBenTypeName : public CBenNamedObject
-{
-public: // Internal methods
- CBenTypeName(pLtcBenContainer pContainer, BenObjectID ObjectID,
- pCBenObject pPrevObject, const char * sName,
- pCBenNamedObjectListElmt pPrevNamedObjectListElmt) :
- CBenNamedObject(pContainer, ObjectID, pPrevObject, sName,
- pPrevNamedObjectListElmt) { ; }
- virtual UtBool IsTypeName();
-};
-
-
-} // end namespace OpenStormBento
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/bentoid.hxx b/lotuswordpro/source/filter/bentoid.hxx
deleted file mode 100644
index 3fa207213..000000000
--- a/lotuswordpro/source/filter/bentoid.hxx
+++ /dev/null
@@ -1,113 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-#ifndef BENTOID_H
-#define BENTOID_H
-
-namespace OpenStormBento
-{
-
-#define BEN_OBJID_TOC 1 // TOC object ID
-#define BEN_PROPID_TOC_SEED 2 // TOC object starting seed
-#define BEN_PROPID_TOC_MIN_SEED 3 // TOC object minimum seed
-#define BEN_PROPID_TOC_OBJECT 4 // TOC object
-#define BEN_PROPID_TOC_CONTAINER 5 // TOC object entire container
-#define BEN_PROPID_TOC_DELETED 6 // TOC object amount deleted
-#define BEN_TYPEID_TOC_TYPE 19 // TOC object property value type
-#define BEN_OBJID_WRITEABLE 20 // Predefined ID's below this value will be
- // written to container TOC. Predefined IDs
- // above this are not written
-#define BEN_TYPEID_7_BIT_ASCII 21 // 7-bit ASCII
-#define BEN_PROPID_GLOBAL_TYPE_NAME 23 // Global type name
-#define BEN_PROPID_GLOBAL_PROPERTY_NAME 24 // Global property name
-#define BEN_PROPID_OBJ_REFERENCES 31 // Referenced objects from an object
-#define BEN_TYPEID_OBJ_REFERENCES_DATA 32 // Reference data
-#define BEN_OBJID_MIN_GENERAL_ID 100 // Min object ID for general std objects
-
-#define BEN_NEW_OBJECT 1 // object + property + type
-#define BEN_NEW_PROPERTY 2 // property + type
-#define BEN_NEW_TYPE 3 // type
-#define BEN_EXPLICIT_GEN 4 // generation
-
-#define BEN_SEGMENT_CODE_START 5
-#define BEN_OFFSET4_LEN4 5 // 4-byte offset + 4-byte length
-#define BEN_CONT_OFFSET4_LEN4 6 // continued 4-byte offset + 4-byte length
-#define BEN_OFFSET8_LEN4 7 // 8-byte offset + 4-byte length
-#define BEN_CONT_OFFSET8_LEN4 8 // continued 8-byte offset + 4-byte length
-#define BEN_IMMEDIATE0 9 // immediate (length = 0)
-#define BEN_IMMEDIATE1 10 // immediate (length = 1)
-#define BEN_IMMEDIATE2 11 // immediate (length = 2)
-#define BEN_IMMEDIATE3 12 // immediate (length = 3)
-#define BEN_IMMEDIATE4 13 // immediate (length = 4)
-#define BEN_CONT_IMMEDIATE4 14 // continued immediate (length = 4)
-#define BEN_SEGMENT_CODE_END 14
-
-#define BEN_REFERENCE_LIST_ID 15 // references recording object ID
-#define BEN_RESERVED4B 16
-#define BEN_RESERVED4C 17
-#define BEN_RESERVED8A 18 // reserved for future use of 8 byte entry
-#define BEN_RESERVED8B 19 // reserved for future use of 8 byte entry
-#define BEN_RESERVED8C 20 // reserved for future use of 8 byte entry
-#define BEN_RESERVED12A 21 // reserved for future use of 12 byte entry
-#define BEN_RESERVED12B 22 // reserved for future use of 12 byte entry
-#define BEN_RESERVED12C 23 // reserved for future use of 12 byte entry
-#define BEN_END_OF_BUFFER 24 // end of current buffer, go to next
-#define BEN_READ_PAST_END_OF_TOC 50 // Our code
-#define BEN_NOOP 0xFF
-
-}// end OpenStormBento namespace
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/benval.cxx b/lotuswordpro/source/filter/benval.cxx
deleted file mode 100644
index 9ff1cbc03..000000000
--- a/lotuswordpro/source/filter/benval.cxx
+++ /dev/null
@@ -1,265 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-#include "first.hxx"
-#include "assert.h"
-namespace OpenStormBento
-{
-
-unsigned long
-CBenValue::GetValueSize()
-{
- unsigned long Size = 0;
- pCBenValueSegment pCurr = NULL;
- while ((pCurr = GetNextValueSegment(pCurr)) != NULL)
- Size += pCurr->GetSize();
- return Size;
-}
-
-BenError
-CBenValue::ReadValueData(BenDataPtr pReadBuffer, unsigned long Offset,
- unsigned long Amt, unsigned long * pAmtRead)
-{
- BenError Err;
- unsigned long SegOffset = 0;
- *pAmtRead = 0;
- pCBenValueSegment pCurrSeg = NULL;
- pLtcBenContainer pContainer = GetContainer();
- BenByteDataPtr pBuffer = (BenByteDataPtr) pReadBuffer;
-
- /// pReadBuffer -- pointer to buffer of read result, allocated outside this function
- /// Offset -- read buffer's start offset address, relative value in the whole value stream
- /// Amt -- read buffer's size
- /// pAmtRead -- return the actual read size
-
- /// SegOffset -- current segment's start address offset, relative value in the whole value stream
-
- while ((pCurrSeg = GetNextValueSegment(pCurrSeg)) != NULL)
- {
- if (Amt == 0) /// whole buffer is full now, so return
- return BenErr_OK;
-
- if (SegOffset <= Offset && Offset < SegOffset + pCurrSeg->GetSize()) /// begin at current segment
- {
- unsigned long OffsetIntoSeg = Offset - SegOffset; /// relative value in this value segment stream
-
- unsigned long AmtThisSeg = UtMin(Amt, pCurrSeg->GetSize() -
- OffsetIntoSeg); /// size read in this segment, it's minimal value between Amt &
- /// remain part from OffsetIntoSeg to the end of this segment
-
- unsigned long AmtReadThisSeg; /// actual read size in this segment
- if (pCurrSeg->IsImmediate())
- {
- UtHugeMemcpy(pBuffer, pCurrSeg->GetImmediateData() +
- OffsetIntoSeg, AmtThisSeg);
- AmtReadThisSeg = AmtThisSeg;
- }
- else
- {
- if ((Err = pContainer->SeekToPosition(pCurrSeg->GetPosition() +
- OffsetIntoSeg)) != BenErr_OK)
- return Err;
-
- if ((Err = pContainer->Read(pBuffer, AmtThisSeg,
- &AmtReadThisSeg)) != BenErr_OK)
- return Err;
- }
-
- *pAmtRead += AmtReadThisSeg;
-
- if (AmtThisSeg != AmtReadThisSeg)
- return BenErr_UnexpectedEndOfFile;
-
- pBuffer += AmtReadThisSeg;
- Offset += AmtReadThisSeg;
- Amt -= AmtReadThisSeg;
- }
-
- SegOffset += pCurrSeg->GetSize();
- }
- return BenErr_OK;
-}
-
-BenError
-CBenValue::ReadValueDataKnownSize(BenDataPtr pBuffer, unsigned long Offset,
- unsigned long Amt)
-{
- unsigned long AmtRead;
- BenError Err = ReadValueData(pBuffer, Offset, Amt, &AmtRead);
-
- if (Err == UtErr_OK && AmtRead != Amt)
- Err = (BenError) UtErr_Fail;
-
- return Err;
-}
-
-BenError
-CBenValue::WriteValueData(BenConstDataPtr /*pWriteBuffer*/, unsigned long /*Offset*/,
- unsigned long /*Amt*/, unsigned long * /*pAmtWritten*/)
-{
- return BenErr_OK;
-}
-
-BenError
-CBenValue::TruncateValueSize(unsigned long NewSize)
-{
- unsigned long SegOffset = 0;
-
- pCBenValueSegment pCurrSeg = GetNextValueSegment(NULL);
- while (pCurrSeg != NULL)
- {
- pCBenValueSegment pNextSeg = GetNextValueSegment(pCurrSeg);
-
- long SegSize = UtMin((long) pCurrSeg->GetSize(), (long) NewSize -
- (long) SegOffset);
-
- if (SegSize <= 0)
- delete pCurrSeg;
- else pCurrSeg->SetSize(SegSize);
-
- SegOffset += SegSize;
- pCurrSeg = pNextSeg;
- }
-
- return BenErr_OK;
-}
-
-BenError
-CBenValue::WriteValueData(BenConstDataPtr pWriteBuffer, unsigned long Offset,
- unsigned long Amt)
-{
- unsigned long AmtWritten;
- return WriteValueData(pWriteBuffer, Offset, Amt, &AmtWritten);
-}
-
-BenError
-CBenValue::WriteImmediateValueData(BenConstDataPtr pBuffer,
- unsigned short Size)
-{
- // Only one write can be an immediate value in current implementation
- if (cValueSegments.GetFirst() != cValueSegments.GetTerminating() ||
- Size > 4)
- return BenErr_InvalidImmediateWrite;
-
- if (Size == 0)
- return BenErr_OK;
-
- new CBenValueSegment(this, pBuffer, Size);
- return BenErr_OK;
-}
-
-BenError
-CBenValue::NewReference(BenObjectID ReferencedObjectID, pCBenReference
- pReference)
-{
- BenError Err;
-
- if (cpReferencedList == NULL)
- {
- pLtcBenContainer pContainer = cpProperty->GetContainer();
-
- pCBenObject pNewObject;
- if ((Err = pContainer->NewObject(&pNewObject)) != BenErr_OK)
- return Err;
-
- pCBenValue pNewValue;
- if ((Err = pNewObject->NewValue(BEN_PROPID_OBJ_REFERENCES,
- BEN_TYPEID_OBJ_REFERENCES_DATA, &pNewValue)) != BenErr_OK)
- {
- delete pNewObject;
- return Err;
- }
-
- cpReferencedList = pNewValue;
- cReferencedObjectsSize = 0;
- }
-
- BenByte Buffer[8];
- UtPutIntelDWord(Buffer, ReferencedObjectID);
- UtPutIntelDWord(Buffer + 4, ReferencedObjectID);
-
- UtPutIntelDWord(pReference->GetData(), ReferencedObjectID);
-
- if ((Err = cpReferencedList->WriteValueData(Buffer,
- cReferencedObjectsSize, 8)) != BenErr_OK)
- return Err;
-
- cReferencedObjectsSize += 8;
- return BenErr_OK;
-}
-
-BenObjectID
-CBenValue::GetReferencedObject(pCBenReference pReference)
-{
- return UtGetIntelDWord(pReference->GetData());
-}
-
-BenObjectID
-CBenValue::GetReferencedListID()
-{
- if (cpReferencedList != NULL)
- return cpReferencedList->GetProperty()->GetBenObject()->GetID();
- else
- {
-#ifdef BENUTIL_SUPPORT
- return cReferencedListID;
-#else
- return 0;
-#endif
- }
-}
-}//end namespace OpenStormBento
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/clone.hxx b/lotuswordpro/source/filter/clone.hxx
deleted file mode 100644
index f671d06a5..000000000
--- a/lotuswordpro/source/filter/clone.hxx
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * Version: MPL 1.1 / GPLv3+ / LGPLv3+
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Initial Developer of the Original Code is
- * Red Hat, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2010 the
- * Initial Developer. All Rights Reserved.
- *
- * Contributor(s): David Tardon <dtardon@redhat.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
- * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
- * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
- * instead of those above.
- */
-
-namespace detail
-{
-
-template<typename T>
-struct has_clone
-{
- template<typename U, U x>
- struct test;
-
- typedef char yes;
- typedef struct { char a[2]; } no;
-
- template<typename U>
- static yes& check_sig(U*, test<U* (U::*)() const, &U::clone>* = 0);
- template<typename U>
- static no& check_sig(...);
-
- enum
- {
- value = sizeof(check_sig<T>(0)) == sizeof(yes)
- };
-};
-
-template<typename T, bool HasClone>
-struct cloner
-{
- static T* clone(T* const other)
- {
- return new T(*other);
- }
-};
-
-template<typename T>
-struct cloner<T, true>
-{
- static T* clone(T* const other)
- {
- return other->clone();
- }
-};
-
-}
-
-/** Creates a new copy of the passed object.
- If other is 0, just returns 0. Otherwise, if other has function
- named clone with signature T* (T::*)() const, the function is called.
- Otherwise, copy constructor is used.
-
- @returns 0 or newly allocated object
- */
-template<typename T>
-T* clone(T* const other)
-{
- return other ? ::detail::cloner<T, ::detail::has_clone<T>::value>::clone(other) : 0;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/explode.cxx b/lotuswordpro/source/filter/explode.cxx
deleted file mode 100644
index 6db3a0b21..000000000
--- a/lotuswordpro/source/filter/explode.cxx
+++ /dev/null
@@ -1,521 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-#include <assert.h>
-#include "explode.hxx"
-#include <math.h>
- const static char Tree1String[][32] = {
- "101",
- "11",
- "100",
- "011",
- "0101",
- "0100",
- "0011",
- "00101",
- "00100",
- "00011",
- "00010",
- "000011",
- "000010",
- "000001",
- "0000001",
- "0000000",
- };
-
- const static char Tree2String[][32] = {
- "11" ,
- "1011" ,
- "1010" ,
- "10011" ,
- "10010" ,
- "10001" ,
- "10000" ,
- "011111" ,
- "011110" ,
- "011101" ,
- "011100" ,
- "011011" ,
- "011010" ,
- "011001" ,
- "011000" ,
- "010111" ,
- "010110" ,
- "010101" ,
- "010100" ,
- "010011" ,
- "010010" ,
- "010001" ,
- "0100001" ,
- "0100000" ,
- "0011111" ,
- "0011110" ,
- "0011101" ,
- "0011100" ,
- "0011011" ,
- "0011010" ,
- "0011001" ,
- "0011000" ,
- "0010111" ,
- "0010110" ,
- "0010101" ,
- "0010100" ,
- "0010011" ,
- "0010010" ,
- "0010001" ,
- "0010000" ,
- "0001111" ,
- "0001110" ,
- "0001101" ,
- "0001100" ,
- "0001011" ,
- "0001010" ,
- "0001001" ,
- "0001000" ,
- "00001111",
- "00001110",
- "00001101",
- "00001100",
- "00001011",
- "00001010",
- "00001001",
- "00001000",
- "00000111",
- "00000110",
- "00000101",
- "00000100",
- "00000011",
- "00000010",
- "00000001",
- "00000000",
- };
-
-Decompression::Decompression(SvStream * pInStream, SvStream * pOutStream)
- : m_pInStream(pInStream)
- , m_pOutStream(pOutStream)
- , m_nCurrent4Byte(0)
- , m_nBitsLeft(0)
- , m_pBuffer(m_Buffer)
- , m_nBytesLeft(0)
- , m_nOutputBufferPos(0)
-{
- if (!m_pInStream || !m_pOutStream )
- {
- assert(sal_False);
- }
- ConstructTree1();
- ConstructTree2();
- fillArray();
-}
-/**
- * @descr read specified bits from input stream
- * @argument iCount - number of bits to be read, less than 31
- * @argument nBits - bits read
- * @return 0 - read OK, otherwise error
- */
-sal_uInt32 Decompression::ReadBits(sal_uInt16 iCount, sal_uInt32 & nBits)
-{
- if ( (iCount == 0) || (iCount > 32 ) )
- {
- return 1;
- }
-
- sal_uInt32 val = 0; /* bit accumulator */
-
- /* load at least need bits into val */
- val = m_nCurrent4Byte;
- while (m_nBitsLeft < iCount)
- {
- if (m_nBytesLeft == 0)
- {
- m_nBytesLeft = m_pInStream->Read(m_Buffer, CHUNK);
- m_pBuffer = m_Buffer;
- if (m_nBytesLeft == 0) return 1;
- }
- val |= (sal_uInt32)(*m_pBuffer++) << m_nBitsLeft; /* load eight bits */
- m_nBytesLeft --;
- m_nBitsLeft += 8;
- }
-
- /* drop need bits and update buffer, always zero to seven bits left */
- m_nCurrent4Byte = val >> iCount;
- m_nBitsLeft -= iCount;
-
- /* return need bits, zeroing the bits above that */
- nBits = val & ((1 << iCount) - 1);
-
- return 0;
-}
-/**
- * @descr decompress input and write output
- * @return 0 - read OK, otherwise error
- */
-sal_Int32 Decompression::explode()
-{
- /* The first 2 bytes are parameters */
- sal_uInt32 P1;
- if (0 != ReadBits(8, P1))/* 0 or 1 */
- return -1;
-
- /* I think this means 0=binary and 1=ascii file, but in RESOURCEs I saw always 0 */
- if (P1 >= 1) // changed per 's review comments
- return -1;
-
- sal_uInt32 P2;
- if (0 != ReadBits(8, P2))
- return -1;
-
- /* must be 4,5 or 6 and it is a parameter for the decompression algorithm */
- if (P2 < 4 || P2 > 6)
- return -2;
-
- m_nOutputBufferPos = 0;
- /* Now, a bit stream follows, which is decoded as described below: */
- /* The algorithm terminates as soon as it runs out of bits. */
- while(sal_True)
- {
- // read 1 bit (take bits from the lowest value (LSB) to the MSB i.e. bit 0, bit 1 etc ...)
- sal_uInt32 iBit;
- if (0 != ReadBits(1, iBit))
- break;
- if ( 0 == (iBit & 0x01) )
- {
- //if the bit is 0 read 8 bits and write it to the output as it is.
- sal_uInt32 symbol;
- if (0 != ReadBits(8, symbol))
- break;
- m_Output[m_nOutputBufferPos++] = (sal_uInt8)symbol;
- if (m_nOutputBufferPos == MAXWIN)
- {
- m_pOutStream->Write(m_Output, m_nOutputBufferPos);
- m_nOutputBufferPos = 0;
- }
- continue;
- }
- // if the bit is 1 we have here a length/distance pair:
- // -decode a number with Hufmman Tree #1; variable bit length, result is 0x00 .. 0x0F -> L1
- sal_uInt32 L1 = Decode(m_Tree1);
- sal_uInt32 Length;
- if (L1 <= 7)
- {
- //if L1 <= 7:
- // LENGTH = L1 + 2
- Length = L1 + 2;
- }
- else
- {
- // if L1 > 7
- // read more (L1-7) bits -> L2
- // LENGTH = L2 + M[L1-7] + 2
- sal_uInt32 L2;
- if (0 != ReadBits((sal_uInt16)(L1 - 7), L2))
- break;
- Length = L2 + 2 + m_iArrayOfM[L1 -7];
- }
- if (Length == 519)
- {
- // end of compressed data
- break;
- }
-
- // - decode another number with Hufmann Tree #2 giving result 0x00..0x3F -> D1
- sal_uInt32 D1 = Decode(m_Tree2);
- sal_uInt32 D2;
- if (Length == 2)
- {
- // if LENGTH == 2
- // D1 = D1 << 2
- // read 2 bits -> D2
- D1 = D1 << 2;
- if (0 != ReadBits(2, D2))
- break;
- }
- else
- {
- // else
- // D1 = D1 << P2 // the parameter 2
- // read P2 bits -> D2
- D1 = D1 << P2;
- if (0 != ReadBits((sal_uInt16)P2, D2))
- break;
- }
- // DISTANCE = (D1 | D2) + 1
- sal_uInt32 distance = (D1 | D2) + 1;
-
- // - now copy LENGTH bytes from (output_ptr-DISTANCE) to output_ptr
- // write current buffer to output
- m_pOutStream->Write(m_Output, m_nOutputBufferPos);
- m_nOutputBufferPos = 0;
-
- // remember current position
- sal_uInt32 nOutputPos = m_pOutStream->Tell();
- if (distance > nOutputPos)
- return -3; // format error
-
- m_pOutStream->Flush();
- // point back to copy position and read bytes
- m_pOutStream->SeekRel((long)-distance);
- sal_uInt8 sTemp[MAXWIN];
- sal_uInt32 nRead = distance > Length? Length:distance;
- m_pOutStream->Read(sTemp, nRead);
- if (nRead != Length)
- {
- // fill the buffer with read content repeatly until full
- for (sal_uInt32 i=nRead; i<Length; i++)
- {
- sTemp[i] = sTemp[i-nRead];
- }
- }
-
- // restore output stream position
- m_pOutStream->Seek(nOutputPos);
-
- // write current buffer to output
- m_pOutStream->Write(sTemp, Length);
- }
- return 0;
-}
-/**
- * @descr bits to string
- * @return
- */
-void Decompression::ToString(sal_uInt32 nBits, sal_Char *pChar, sal_uInt32 nLen)
-{
- sal_uInt32 nBit;
- for (sal_uInt32 i=nLen; i > 0; i--)
- {
- nBit = (nBits >> (i -1) ) & 0x01;
- pChar[nLen - i] = nBit ? '1':'0';
- }
- pChar[nLen] = '\0';
- return;
-}
-
-/**
- * @descr decode tree 1 for length
- * @return the decoded value
- */
-sal_uInt32 Decompression::Decode(HuffmanTreeNode * pRoot)
-{
- sal_uInt32 nRet;
- sal_uInt32 nRead, nReadAlready;
-
- if( 0 != ReadBits(1, nReadAlready))
- return 0; // something wrong
-
- for (sal_uInt16 i=2; i <= 8; i++)
- {
- if ( 0 != ReadBits(1, nRead))
- return 0; // something wrong
-
- nReadAlready = (nReadAlready << 1) | (nRead & 0x01);
-
- sal_Char sCode[16];
- ToString(nReadAlready, sCode, i);
- nRet = pRoot->QueryValue(sCode);
- if (nRet != 0xffffffff)
- {
- break;
- }
- }
- return nRet;
-}
-/**
- * @descr construct tree 1 for length
- * @return
- */
-void Decompression::ConstructTree1()
-{ // Huffman Tree #1
- // The first huffman tree (the Section called Decompression algorithm HUFFMAN) contains the length values. It is described by the following table:
- // value (hex) code (binary)
- // 0 101
- // 1 11
- // 2 100
- // 3 011
- // 4 0101
- // 5 0100
- // 6 0011
- // 7 0010 1
- // 8 0010 0
- // 9 0001 1
- // a 0001 0
- // b 0000 11
- // c 0000 10
- // d 0000 01
- // e 0000 001
- // f 0000 000
- m_Tree1 = new HuffmanTreeNode();
- for (sal_uInt32 i=0; i< 16; i++)
- {
- m_Tree1->InsertNode(i, Tree1String[i]);
- }
- /*
- m_Tree1->InsertNode(0, "101");
- m_Tree1->InsertNode(1, "11");
- m_Tree1->InsertNode(2, "100");
- m_Tree1->InsertNode(3, "011");
- m_Tree1->InsertNode(4, "0101");
- m_Tree1->InsertNode(5, "0100");
- m_Tree1->InsertNode(6, "0011");
- m_Tree1->InsertNode(7, "00101");
- m_Tree1->InsertNode(8, "00100");
- m_Tree1->InsertNode(9, "00011");
- m_Tree1->InsertNode(10, "00010");
- m_Tree1->InsertNode(11, "000011");
- m_Tree1->InsertNode(12, "000010");
- m_Tree1->InsertNode(13, "000001");
- m_Tree1->InsertNode(14, "0000001");
- m_Tree1->InsertNode(15, "0000000");
- */
-}
-/**
- * @descr construct tree 2 for distance
- * @return
- */
-void Decompression::ConstructTree2()
-{
-
- m_Tree2 = new HuffmanTreeNode();
- for (sal_uInt32 i=0; i< 64; i++)
- {
- m_Tree2->InsertNode(i, Tree2String[i]);
- }
- //where bits should be read from the left to the right.
-}
-/**
- * @descr
- * @return
- */
-void Decompression::fillArray()
-{
- m_iArrayOfM[0] = 7;
- for (int i=1; i < 16; i++)
- {
- double dR = 2.0;
- m_iArrayOfM[i] = m_iArrayOfM[i - 1]+ (sal_uInt32)pow(dR, i-1);//2
- }
-}
-
-HuffmanTreeNode::HuffmanTreeNode(sal_uInt32 nValue , HuffmanTreeNode * pLeft , HuffmanTreeNode * pRight )
-{
- value = nValue;
- left = pLeft;
- right = pRight;
-}
-HuffmanTreeNode::~HuffmanTreeNode()
-{
- if (left)
- {
- delete left;
- left = NULL;
- }
- if (right)
- {
- delete right;
- right = NULL;
- }
-}
-
-HuffmanTreeNode * HuffmanTreeNode::InsertNode(sal_uInt32 nValue, const sal_Char * pInCode)
-{
- HuffmanTreeNode *pNew = new HuffmanTreeNode(nValue);
- sal_Char pCode[32];
- strcpy(pCode, pInCode );
-
- // query its parents
- sal_Char cLast = pCode[strlen(pCode) - 1];
- pCode[strlen(pCode) - 1] = '\0';
- HuffmanTreeNode * pParent = QueryNode(pCode);
- if (!pParent)
- {
- pParent = InsertNode(0xffffffff, pCode);
- }
- if (cLast == '0')
- pParent->left = pNew;
- else // (cChar == '1')
- pParent->right = pNew;
-
- return pNew;
-}
-HuffmanTreeNode * HuffmanTreeNode::QueryNode(const sal_Char * pCode)
-{
- sal_uInt32 nLen = strlen(pCode);
-
- HuffmanTreeNode * pNode = this; // this is the root
- for(sal_uInt32 i=0; i<nLen && pNode; i++)
- {
- sal_Char cChar= pCode[i];
- if (cChar == '0')
- {
- pNode = pNode->left;
- }
- else // (cChar == '1')
- {
- pNode = pNode->right;
- }
- }
- return pNode;
-}
-
-sal_uInt32 HuffmanTreeNode::QueryValue(const sal_Char * pCode)
-{
- HuffmanTreeNode * pNode =QueryNode(pCode);
- if (pNode)
- return pNode->value;
-
- return 0xffffffff;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/explode.hxx b/lotuswordpro/source/filter/explode.hxx
deleted file mode 100644
index f7e61b3ca..000000000
--- a/lotuswordpro/source/filter/explode.hxx
+++ /dev/null
@@ -1,128 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-#ifndef _EXPLODE_HXX_
-#define _EXPLODE_HXX_
-
-#include <tools/stream.hxx>
-
-class HuffmanTreeNode
-{
-public:
- HuffmanTreeNode * left;
- HuffmanTreeNode * right;
- sal_uInt32 value;
-
- HuffmanTreeNode(sal_uInt32 value = 0xffffffff, HuffmanTreeNode * left = NULL, HuffmanTreeNode * right = NULL) ;
- ~HuffmanTreeNode() ;
- HuffmanTreeNode * InsertNode(sal_uInt32 nValue, const sal_Char * pInCode);
- HuffmanTreeNode * QueryNode(const sal_Char *pCode);
- sal_uInt32 QueryValue(const sal_Char *pCode);
-};
-
-
-/**
- * @brief
- * define the function type for input read, output write
- */
-#define CHUNK 16384
-#define MAXWIN 4096 /* maximum window size */
-class Decompression
-{
-public:
- Decompression(SvStream * pInStream, SvStream * pOutStream);
- ~Decompression()
- {
- delete m_Tree1;
- delete m_Tree2;
- };
- /**
- * @brief
- * decompress from instream to outstream
- */
- sal_Int32 explode();
- sal_uInt32 ReadBits(sal_uInt16 iCount, sal_uInt32 & nBits) ;
- sal_uInt32 Decode(HuffmanTreeNode * pRoot);
-
- /**
- * @brief
- * compressed/decompressed stream
- */
- SvStream *m_pInStream;
- SvStream *m_pOutStream;
-
- sal_uInt32 m_nCurrent4Byte; // bit buffer
- sal_uInt32 m_nBitsLeft; // number of bits remained in bit buffer
-
- sal_uInt8 m_Buffer[CHUNK]; // input byte buffer
- sal_uInt8 *m_pBuffer; // pointer to input buffer
- sal_uInt32 m_nBytesLeft; // number of bytes remained in byte buffer
-
- sal_uInt8 m_Output[MAXWIN]; // output byte buffer
- sal_uInt32 m_nOutputBufferPos; // pointer to output buffer
-
- sal_uInt32 m_iArrayOfM[16];
-
-
- HuffmanTreeNode *m_Tree1, *m_Tree2;
-
- void ConstructTree1();
- void ConstructTree2();
- void fillArray();
- void ToString(sal_uInt32 nBits, sal_Char *pChar, sal_uInt32 nLen);
-};
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/first.hxx b/lotuswordpro/source/filter/first.hxx
deleted file mode 100644
index aa2b1f534..000000000
--- a/lotuswordpro/source/filter/first.hxx
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-#ifndef FIRST_HXX
-#define FIRST_HXX
-
-#include "bento.hxx" // Public header
-
-//#define ASSERT(cond) UT_ASSERT(cond)
-namespace OpenStormBento
-{
-// String constants
-extern const char gsBenMagicBytes[];
-
-typedef BenByte * BenByteDataPtr;
-typedef const BenByte * BenConstByteDataPtr;
-
-pCBenNamedObject FindNamedObject(pCUtList pList, const char * sName,
- pCBenNamedObjectListElmt * ppPrev);
-
-pCBenIDListElmt FindID(pCUtList pList, BenObjectID ObjectID,
- pCBenIDListElmt * ppPrev);
-} // end namespace
-
-// Private headers
-#include "bentoid.hxx"
-#include "tocread.hxx"
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/genericfilter.cxx b/lotuswordpro/source/filter/genericfilter.cxx
deleted file mode 100644
index d889515ac..000000000
--- a/lotuswordpro/source/filter/genericfilter.cxx
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-#include <stdio.h>
-
-#include <osl/mutex.hxx>
-#include <osl/thread.h>
-#include <cppuhelper/factory.hxx>
-
-#ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#endif
-
-#include "LotusWordProImportFilter.hxx"
-
-using namespace ::rtl;
-using namespace ::cppu;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::registry;
-
-extern "C"
-{
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
- const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
-{
- void * pRet = 0;
-
- OUString implName = OUString::createFromAscii( pImplName );
- if ( pServiceManager && implName.equals(LotusWordProImportFilter_getImplementationName()) )
- {
- Reference< XSingleServiceFactory > xFactory( createSingleFactory(
- reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
- OUString::createFromAscii( pImplName ),
- LotusWordProImportFilter_createInstance, LotusWordProImportFilter_getSupportedServiceNames() ) );
-
- if (xFactory.is())
- {
- xFactory->acquire();
- pRet = xFactory.get();
- }
- }
-
- return pRet;
-}
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/localtime.cxx b/lotuswordpro/source/filter/localtime.cxx
deleted file mode 100644
index 1eee2bfab..000000000
--- a/lotuswordpro/source/filter/localtime.cxx
+++ /dev/null
@@ -1,194 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-#include "localtime.hxx"
-#include <limits.h>
-#include <unicode/timezone.h>
-//End by
-const long DAY_SEC =24 * 60 * 60;
-const long YEAR_SEC = 365 * DAY_SEC;
-const long FOURYEAR_SEC = 4 * YEAR_SEC + DAY_SEC;
-#ifndef LONG_MAX
-const long LONG_MAX=2147483647;
-#endif
-const long TIMEZONE = -28800;
-//01-01-70 was a Thursday
-const long BASE_DOW = 4;
-
-long _lpdays[] = {-1, 30, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365};
-
-long _days[] = {-1, 30, 58, 89, 119, 150, 180, 211, 242, 272, 303, 333, 364};
-
-bool LtgGmTime(long rtime,LtTm& rtm)
-{
- if (rtime < 0)
- {
- return false;
- }
- //is-current-year-a-leap-year flag
- int islpyr = 0;
-
- long tmptim;
- long caltim = rtime;
- tmptim = (long)(caltim / FOURYEAR_SEC);
- caltim -= ((long)tmptim * FOURYEAR_SEC);
-
- //
- //Determine which year of the interval
- //
- // 1970, 1974, 1978,...,etc.
- tmptim = (tmptim * 4) + 70;
-
- if (caltim >= YEAR_SEC)
- {
- //1971, 1975, 1979,...,etc.
- tmptim++;
- caltim -= YEAR_SEC;
-
- if ( caltim >= YEAR_SEC )
- {
- // 1972, 1976, 1980,...,etc.
- tmptim++;
- caltim -= YEAR_SEC;
-
- //Note, it takes 366 days-worth of seconds to get past a leap year.
- if (caltim >= (YEAR_SEC + DAY_SEC))
- {
- //1973, 1977, 1981,...,etc.
- tmptim++;
- caltim -= (YEAR_SEC + DAY_SEC);
- }
- else
- {
- //In a leap year after all, set the flag.
- islpyr++;
- }
- }
- }
-
- //
- //tmptim now holds the value for tm_year. caltim now holds the
- //number of elapsed seconds since the beginning of that year.
- //
- rtm.tm_year = tmptim;
- //
- //Determine days since January 1 (0 - 365). This is the tm_yday value.
- //Leave caltim with number of elapsed seconds in that day.
- //
- rtm.tm_yday = (long)(caltim / DAY_SEC);
- caltim -= (long)(rtm.tm_yday) * DAY_SEC;
- //
- //Determine months since January (0 - 11) and day of month (1 - 31)
- //
- long* mdays;
- if ( islpyr )
- {
- mdays = _lpdays;
- }
- else
- {
- mdays = _days;
- }
-
- for ( tmptim = 1 ; mdays[tmptim] < rtm.tm_yday ; tmptim++ ) ;
-
- rtm.tm_mon = --tmptim;
-
- rtm.tm_mday = rtm.tm_yday - mdays[tmptim];
-
- //
- //Determine days since Sunday (0 - 6)
- //
- rtm.tm_wday = ((long)(rtime / DAY_SEC) + BASE_DOW) % 7;
- //
- //Determine hours since midnight (0 - 23), minutes after the hour
- //(0 - 59), and seconds after the minute (0 - 59).
- //
- rtm.tm_hour = (long)(caltim / 3600);
- caltim -= (long)rtm.tm_hour * 3600;
-
- rtm.tm_min = (long)(caltim / 60);
- rtm.tm_sec = (long)(caltim - (rtm.tm_min) * 60);
-
- rtm.tm_isdst = 0;
-
- //
- //
- //
- //adjust year & month
- rtm.tm_year += 1900;
- ++(rtm.tm_mon);
-
- return true;
-
-};
-bool LtgLocalTime(long rtime,LtTm& rtm)
-{
- if (rtime < 0)
- {
- return false;
- }
-
- if ((rtime > 3 * DAY_SEC)&&(rtime < LONG_MAX - 3 * DAY_SEC))
- {
- TimeZone* pLocalZone = TimeZone::createDefault();
- long offset = (pLocalZone->getRawOffset())/1000;
- long ltime = rtime + offset;
- return LtgGmTime(ltime,rtm);
- }
- return false;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/localtime.hxx b/lotuswordpro/source/filter/localtime.hxx
deleted file mode 100644
index 85b000c75..000000000
--- a/lotuswordpro/source/filter/localtime.hxx
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-#ifndef _LWPTIME_HXX_
-#define _LWPTIME_HXX_
-
-struct LtTm
-{
- long tm_sec; /* seconds after the minute - [0,59] */
- long tm_min; /* minutes after the hour - [0,59] */
- long tm_hour; /* hours since midnight - [0,23] */
- long tm_mday; /* day of the month - [1,31] */
- long tm_mon; /* months since January - [0,11] */
- long tm_year; /* years since 1900 */
- long tm_wday; /* days since Sunday - [0,6] */
- long tm_yday; /* days since January 1 - [0,365] */
- long tm_isdst; /* daylight savings time flag */
-};
-bool LtgGmTime(long rtime,LtTm& rtm);
-bool LtgLocalTime(long rtime,LtTm& rtm);
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwp9reader.cxx b/lotuswordpro/source/filter/lwp9reader.cxx
deleted file mode 100644
index 5cbce8df7..000000000
--- a/lotuswordpro/source/filter/lwp9reader.cxx
+++ /dev/null
@@ -1,263 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-#ifndef _LWP9READER_HXX
-#include "lwp9reader.hxx"
-#endif
-#include "lwpglobalmgr.hxx"
-#include "lwpunoheader.hxx"
-#include "lwparrowstyles.hxx"
-#include "lwpobjhdr.hxx"
-#include "lwpdoc.hxx"
-#include "xfilter/xfstylemanager.hxx"
-#include "lwpdocdata.hxx"
-#include "lwpbookmarkmgr.hxx"
-#include "lwpchangemgr.hxx"
-#include <tools/stream.hxx>
-
-Lwp9Reader::Lwp9Reader (LwpSvStream* pInputStream, IXFStream* pStream)
- : m_pDocStream(pInputStream), m_pStream(pStream), m_LwpFileHdr()
-{}
-
-/**
- * @descr The entrance of Word Pro 9 import filter.
- **/
-void Lwp9Reader::Read()
-{
- LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance(m_pDocStream);
- try
- {
- m_pObjMgr = pGlobal->GetLwpObjFactory();
-
- ReadFileHeader();
- //Does not support Word Pro 96 and previous versions
- if(LwpFileHeader::m_nFileRevision>=0x000B)
- {
- ReadIndex();
- ParseDocument();
- }
- }
- catch(...)
- {
- LwpGlobalMgr::DeleteInstance();
- throw;
- }
- LwpGlobalMgr::DeleteInstance();
-}
-
-/**
- * @descr Read the OLE objects.
- */
-void Lwp9Reader::ReadOleObjects()
-{
-}
-/**
- * @descr Read the LWP7 object.
- */
-void Lwp9Reader::ReadFileHeader()
-{
- m_pDocStream->Seek(LwpSvStream::LWP_STREAM_BASE);
-
- //Remember to initialize the LwpFileHeader::m_nFileRevision first.
- LwpFileHeader::m_nFileRevision = 0;
-
- LwpObjectHeader objHdr;
- objHdr.Read(*m_pDocStream);
- sal_Int64 pos = m_pDocStream->Tell();
- m_LwpFileHdr.Read(m_pDocStream);
- m_pDocStream->Seek(pos+objHdr.GetSize());
-
-}
-
-/**
- * @descr Read the index objects at the end of the WordProData stream
- */
-void Lwp9Reader::ReadIndex()
-{
- sal_Int64 oldpos = m_pDocStream->Tell();
- sal_uInt32 rootoffset = m_LwpFileHdr.GetRootIndexOffset();
- m_pDocStream->Seek(rootoffset + LwpSvStream::LWP_STREAM_BASE);
- m_pObjMgr->ReadIndex(m_pDocStream);
- m_pDocStream->Seek(oldpos);
-}
-
-/**
- * @descr Read all objects
- * This function is replaced by the read on demand model
- * Reserverd for future use
-*/
-void Lwp9Reader::DumpAllObjects()
-{
- sal_Int64 nFileSize = GetFileSize();
- sal_Int64 nFilePos = m_pDocStream->Tell();
-
- while(true)
- {
- LwpObjectHeader objHdr;
- objHdr.Read(*m_pDocStream);
- nFilePos = m_pDocStream->Tell();
- //Stop when reaching the index object
- if(objHdr.GetTag() >= VO_ROOTLEAFOBJINDEX)
- {
- break;
- }
- //Stop when the length exceeds the file length
- if(nFilePos + objHdr.GetSize() > nFileSize)
- {
- assert(false);
- break;
- }
- m_pObjMgr->CreateObject(objHdr.GetTag(), objHdr);
- m_pDocStream->Seek(nFilePos+objHdr.GetSize());
- }
-}
-
-/**
- * @descr Get file size
-*/
-sal_Int64 Lwp9Reader::GetFileSize()
-{
- sal_Int64 pos = m_pDocStream->Tell();
- m_pDocStream->Seek(0);
-
- sal_Int64 size = m_pDocStream->Seek( STREAM_SEEK_TO_END);
- m_pDocStream->Seek(pos);
- return(size);
-}
-
-/**
- * @descr Parse all document content
-*/
-void Lwp9Reader::ParseDocument()
-{
- WriteDocHeader();
-
- //Get root document
- LwpDocument* doc = dynamic_cast<LwpDocument*> ( m_LwpFileHdr.GetDocID()->obj() );
-
- if (!doc)
- return;
-
- //Parse Doc Data
- LwpDocData *pDocData = dynamic_cast<LwpDocData*>((doc->GetDocData())->obj());
- if (pDocData!=NULL)
- pDocData->Parse(m_pStream);
-
- //Register Styles
- RegisteArrowStyles();
- doc->RegisterStyle();
- XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- pXFStyleManager->ToXml(m_pStream);
-
- //Parse document content
- m_pStream->GetAttrList()->Clear();
- m_pStream->StartElement( A2OUSTR("office:body") );
-
- //Parse change list, add by
- LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance();
- LwpChangeMgr* pChangeMgr = pGlobal->GetLwpChangeMgr();
- pChangeMgr->ConvertAllChange(m_pStream);
-
- doc->Parse(m_pStream);
- m_pStream->EndElement(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("office:body")));
-
- WriteDocEnd();
-}
-
-/**
- * @descr Write xml document header
- */
-void Lwp9Reader::WriteDocHeader()
-{
- m_pStream->StartDocument();
-
- IXFAttrList *pAttrList = m_pStream->GetAttrList();
-
- pAttrList->AddAttribute( A2OUSTR("xmlns:office"), A2OUSTR("http://openoffice.org/2000/office") );
- pAttrList->AddAttribute( A2OUSTR("xmlns:style"), A2OUSTR("http://openoffice.org/2000/style") );
- pAttrList->AddAttribute( A2OUSTR("xmlns:text"), A2OUSTR("http://openoffice.org/2000/text") );
- pAttrList->AddAttribute( A2OUSTR("xmlns:table"), A2OUSTR("http://openoffice.org/2000/table") );
- pAttrList->AddAttribute( A2OUSTR("xmlns:draw"), A2OUSTR("http://openoffice.org/2000/drawing") );
-
- pAttrList->AddAttribute( A2OUSTR("xmlns:fo"), A2OUSTR("http://www.w3.org/1999/XSL/Format") );
- pAttrList->AddAttribute( A2OUSTR("xmlns:xlink"), A2OUSTR("http://www.w3.org/1999/xlink") );
- pAttrList->AddAttribute( A2OUSTR("xmlns:number"), A2OUSTR("http://openoffice.org/2000/datastyle") );
- pAttrList->AddAttribute( A2OUSTR("xmlns:svg"), A2OUSTR("http://www.w3.org/2000/svg") );
- pAttrList->AddAttribute( A2OUSTR("xmlns:chart"), A2OUSTR("http://openoffice.org/2000/chart") );
-
- pAttrList->AddAttribute( A2OUSTR("xmlns:dr3d"), A2OUSTR("http://openoffice.org/2000/dr3d") );
- pAttrList->AddAttribute( A2OUSTR("xmlns:math"), A2OUSTR("http://www.w3.org/1998/Math/MathML") );
- pAttrList->AddAttribute( A2OUSTR("xmlns:form"), A2OUSTR("http://openoffice.org/2000/form") );
- pAttrList->AddAttribute( A2OUSTR("xmlns:script"), A2OUSTR("http://openoffice.org/2000/script") );
- pAttrList->AddAttribute( A2OUSTR("xmlns:dc"), A2OUSTR("http://purl.org/dc/elements/1.1/") );
-
- pAttrList->AddAttribute( A2OUSTR("xmlns:meta"), A2OUSTR("http://openoffice.org/2000/meta") );
- pAttrList->AddAttribute( A2OUSTR("office:class"), A2OUSTR("text"));
- pAttrList->AddAttribute( A2OUSTR("office:version"), A2OUSTR("1.0"));
-
- m_pStream->StartElement( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("office:document")) );
- pAttrList->Clear();
-
-}
-/**
- * @descr Write xml document end
- */
-void Lwp9Reader::WriteDocEnd()
-{
- m_pStream->EndElement(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("office:document")));
- m_pStream->EndDocument();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwp9reader.hxx b/lotuswordpro/source/filter/lwp9reader.hxx
deleted file mode 100644
index c93c39356..000000000
--- a/lotuswordpro/source/filter/lwp9reader.hxx
+++ /dev/null
@@ -1,92 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-#ifndef _LWP9READER_HXX
-#define _LWP9READER_HXX
-
-#include "lwpheader.hxx"
-#include "lwpunoheader.hxx"
-#include "lwpsvstream.hxx"
-#include "lwpfilehdr.hxx"
-#include "lwpobjfactory.hxx"
-#include "xfilter/ixfstream.hxx"
-/**
- * @brief Reader framework class for Lotus Word Pro 9 file
-*/
-class Lwp9Reader
-{
- public:
- Lwp9Reader(LwpSvStream* InputStream, IXFStream* pStream);
- ~Lwp9Reader(){}
- private:
- LwpSvStream* m_pDocStream;
- IXFStream* m_pStream;
- LwpObjectFactory* m_pObjMgr;
- LwpFileHeader m_LwpFileHdr; //LWP7 object
- protected:
- sal_Int64 GetFileSize();
- void ReadFileHeader();
- void ReadIndex();
- void DumpAllObjects();
- void ParseDocument();
- void WriteDocHeader();
- void WriteDocEnd();
- void ReadOleObjects();
- public:
- void Read();
-};
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwparrowstyles.hxx b/lotuswordpro/source/filter/lwparrowstyles.hxx
deleted file mode 100644
index bfec100e9..000000000
--- a/lotuswordpro/source/filter/lwparrowstyles.hxx
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-#ifndef _LWPARROWSTYLES_HXX
-#define _LWPARROWSTYLES_HXX
-
-#include "xfilter/xfarrowstyle.hxx"
-#include "xfilter/xfstylemanager.hxx"
-#include "lwpglobalmgr.hxx"
-
-/**
- * @descr Registe arrow styles that are not directly support by SODC.
- * There are three kinds,revsered arrow,revered concave arrow and revsered
- * line arrow. this function should be called before the three arrows be used.
- */
-void RegisteArrowStyles()
-{
- XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- if (!pXFStyleManager)
- return;
- //reversed arrow:
- XFArrowStyle *pArrowStyle100 = new XFArrowStyle();
- pArrowStyle100->SetArrowName( A2OUSTR("arrow100") );
- pArrowStyle100->SetViewbox(A2OUSTR("0 0 140 200"));
- pArrowStyle100->SetSVGPath(A2OUSTR("M0 180 L70 0 L140 180 L120 180 L70 30 L20 180 L0 180"));
- pXFStyleManager->AddStyle(pArrowStyle100);
-
- //reversed arrow:
- XFArrowStyle *pArrowStyle1 = new XFArrowStyle();
- pArrowStyle1->SetArrowName( A2OUSTR("reverse arrow") );
- pArrowStyle1->SetViewbox(A2OUSTR("0 0 140 200"));
- pArrowStyle1->SetSVGPath(A2OUSTR("M0 0 L70 200 L140 0"));
- pXFStyleManager->AddStyle(pArrowStyle1);
-
- //reversed concave arrow
- XFArrowStyle *pArrowStyle2 = new XFArrowStyle();
- pArrowStyle2->SetArrowName( A2OUSTR("reverse concave arrow") );
- pArrowStyle2->SetViewbox(A2OUSTR("0 0 140 200"));
- pArrowStyle2->SetSVGPath(A2OUSTR("M0 0 L80 200 L160 0 L80 100"));
- pXFStyleManager->AddStyle(pArrowStyle2);
-
- //reversed line arrow
- XFArrowStyle *pArrowStyle3 = new XFArrowStyle();
- pArrowStyle3->SetArrowName( A2OUSTR("reverse line arrow") );
- pArrowStyle3->SetViewbox(A2OUSTR("0 0 140 200"));
- pArrowStyle3->SetSVGPath(A2OUSTR("M0 0 L70 200 L140 0L110 0 L70 160 L20 0 L0 0"));
- pXFStyleManager->AddStyle(pArrowStyle3);
-}
-
-#endif
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpatomholder.cxx b/lotuswordpro/source/filter/lwpatomholder.cxx
deleted file mode 100644
index 33c02850c..000000000
--- a/lotuswordpro/source/filter/lwpatomholder.cxx
+++ /dev/null
@@ -1,109 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-#include "lwpatomholder.hxx"
-#include "lwptools.hxx"
-#include <osl/thread.h>
-#include <rtl/textenc.h>
-
-LwpAtomHolder::LwpAtomHolder()
- : m_nAtom(0), m_nAssocAtom(0)
-{}
-
-LwpAtomHolder::~LwpAtomHolder()
-{}
-/**
- * @descr read atomholder from object stream
- * the default encoding used in Word Pro is 1252
-*/
-void LwpAtomHolder::Read(LwpObjectStream *pStrm)
-{
- //Referred to lwp: file40.cpp, QuickReadAtomHolder()
-
- sal_uInt16 diskSize = pStrm->QuickReaduInt16();
- sal_uInt16 len = pStrm->QuickReaduInt16();
-
- if (len == 0 || diskSize == 0) {
- m_nAtom = BAD_ATOM;
- m_nAssocAtom = BAD_ATOM;
- return;
- }
- m_nAtom = m_nAssocAtom = len;
-
- //rtl_TextEncoding rEncode = gsl_getSystemTextEncoding();
- rtl_TextEncoding rEncode = RTL_TEXTENCODING_MS_1252;
- len = LwpTools::QuickReadUnicode(pStrm, m_String, diskSize-sizeof(diskSize), rEncode);
-}
-/**
- * @descr skip the atom holder in object stream
-*/
-void LwpAtomHolder::Skip(LwpObjectStream *pStrm)
-{
- sal_uInt16 holdersize = pStrm->QuickReaduInt16();
- pStrm->SeekRel(holdersize);
- m_nAtom = m_nAssocAtom = BAD_ATOM;
-}
-/**
- * @descr read path atom
- * No use now for lwp filter, just skip the atom
-*/
-void LwpAtomHolder::ReadPathAtom(LwpObjectStream *pStrm)
-{
- //Referred to lwp: file40.cpp, QuickReadPathAtom()
- // TODO: Read the data. Now just skip it. The method to skip is same as above.
- Skip(pStrm);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpatomholder.hxx b/lotuswordpro/source/filter/lwpatomholder.hxx
deleted file mode 100644
index 821d5d48e..000000000
--- a/lotuswordpro/source/filter/lwpatomholder.hxx
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-#ifndef _LWPATOMHOLDER_HXX
-#define _LWPATOMHOLDER_HXX
-
-#include "lwpheader.hxx"
-#include "lwpdefs.hxx"
-#include "lwpobjstrm.hxx"
-/**
- * @brief AtomHolder class of Word Pro to hold a string
-*/
-class LwpAtomHolder
-{
-public:
- LwpAtomHolder();
- ~LwpAtomHolder();
-private:
- sal_Int32 m_nAtom;
- sal_Int32 m_nAssocAtom;
- OUString m_String;
- //OUString m_UniString; //no use temporarily
-public:
- void Read(LwpObjectStream *pStrm);
- void ReadPathAtom(LwpObjectStream *pStrm);
- void Skip(LwpObjectStream *pStrm);
- OUString str(){return m_String;}
- inline sal_Bool HasValue();
-};
-inline sal_Bool LwpAtomHolder::HasValue()
-{
- return (m_nAtom != BAD_ATOM);
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpbackgroundoverride.cxx b/lotuswordpro/source/filter/lwpbackgroundoverride.cxx
deleted file mode 100644
index fee6951a9..000000000
--- a/lotuswordpro/source/filter/lwpbackgroundoverride.cxx
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * Version: MPL 1.1 / GPLv3+ / LGPLv3+
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Initial Developer of the Original Code is
- * Red Hat, Inc.
- * Portions created by the Initial Developer are Copyright (C) 2010 the
- * Initial Developer. All Rights Reserved.
- *
- * Contributor(s): David Tardon <dtardon@redhat.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
- * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
- * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
- * instead of those above.
- */
-
-#include "lwpbackgroundoverride.hxx"
-
-LwpBackgroundOverride::LwpBackgroundOverride(LwpBackgroundOverride const &rOther)
- : LwpOverride(rOther)
- , m_aStuff(rOther.m_aStuff)
-{
-}
-
-LwpBackgroundOverride* LwpBackgroundOverride::clone() const
-{
- return new LwpBackgroundOverride(*this);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpbackgroundoverride.hxx b/lotuswordpro/source/filter/lwpbackgroundoverride.hxx
deleted file mode 100644
index f423cf211..000000000
--- a/lotuswordpro/source/filter/lwpbackgroundoverride.hxx
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-#ifndef _LWPBACKGROUNDOVERRIDE_HXX
-#define _LWPBACKGROUNDOVERRIDE_HXX
-
-
-#include "lwpoverride.hxx"
-#include "lwpbackgroundstuff.hxx"
-
-class LwpObjectStream;
-class LwpBackgroundOverride : public LwpOverride
-{
-
-public:
- LwpBackgroundOverride(){}
- virtual ~LwpBackgroundOverride(){}
-
- virtual LwpBackgroundOverride* clone() const;
-
-public:
- virtual void Read(LwpObjectStream *pStrm)
- {
- if (pStrm->QuickReadBool())
- {
- ReadCommon(pStrm);
-
- m_aStuff.Read(pStrm);
- }
-
- pStrm->SkipExtra();
- }
-
- LwpColor GetBackColor(){ return m_aStuff.m_aFillColor; }
- LwpBackgroundStuff* GetBGStuff() { return &m_aStuff; }
-
-protected:
- LwpBackgroundOverride(LwpBackgroundOverride const& rOther);
-
-private:
- LwpBackgroundOverride& operator=(LwpBackgroundOverride const& rOther); // not implemented
-
-private:
- LwpBackgroundStuff m_aStuff;
-};
-
-#endif
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpbackgroundstuff.cxx b/lotuswordpro/source/filter/lwpbackgroundstuff.cxx
deleted file mode 100644
index d26e0b302..000000000
--- a/lotuswordpro/source/filter/lwpbackgroundstuff.cxx
+++ /dev/null
@@ -1,185 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-/**
- * @file
- * For LWP filter architecture prototype
- * Implemention of class LwpBackgroundStuff.
- */
-
-#include "lwpbackgroundstuff.hxx"
-#include "lwppttntbl.hxx"
-#include "xfilter/xfbgimage.hxx"
-
-#include "tools/stream.hxx"
-#include "vcl/bmpacc.hxx"
-#include "svx/xbitmap.hxx"
-
-
-void LwpBackgroundStuff::Read(LwpObjectStream* pStrm)
-{
- m_nID = pStrm->QuickReaduInt16();
- m_aFillColor.Read(pStrm);
- m_aPatternColor.Read(pStrm);
- pStrm->SkipExtra();
-}
-
-void LwpBackgroundStuff::GetPattern(sal_uInt16 btPttnIndex, sal_uInt8* pPttnArray)
-{
- if (btPttnIndex > 71)
- {
- assert(false);
- return;
- }
- if (pPttnArray)
- {
- assert((2 < btPttnIndex) && (btPttnIndex < 72));
- sal_uInt8* pTempArray = s_pLwpPatternTab[btPttnIndex];
- for(sal_uInt8 i = 0; i < 32; i++)
- {
- pPttnArray[i] = (i%4 == 0) ? pTempArray[7-i/4] : 0;
- }
- }
-}
-
-LwpColor* LwpBackgroundStuff::GetFillColor()
-{
- if (m_nID == BACK_PATTERN)
- {
- return &m_aPatternColor;
- }
-
- return &m_aFillColor;
-}
-
-XFBGImage* LwpBackgroundStuff::GetFillPattern()
-{
- // not pattern fill?
- if (!this->IsPatternFill())
- {
- return NULL;
- }
-
- // get pattern array from pattern table
- sal_uInt8* pPttnArray = new sal_uInt8 [32];
- this->GetPattern(m_nID, pPttnArray);
-
- // create bitmap object from the pattern array
- Bitmap aBmp( Size(8, 8), 1 );
- BitmapWriteAccess* pWA = aBmp.AcquireWriteAccess();
- sal_uInt8* pBuf = pWA->GetBuffer();
- memcpy(pBuf, pPttnArray, 32);
- aBmp.ReleaseAccess(pWA);
-
- if (pPttnArray)
- {
- delete [] pPttnArray;
- pPttnArray = NULL;
- }
-
- // create XOBitmap object from bitmap object
- XOBitmap aXOBitmap;
- aXOBitmap.SetBitmap( aBmp );
- aXOBitmap.Bitmap2Array();
- aXOBitmap.SetBitmapType( XBITMAP_8X8 );
-
- // set back/fore-ground colors
- if (m_aFillColor.IsValidColor() && m_aPatternColor.IsValidColor())
- {
- Color aBackColor(static_cast<sal_uInt8>(m_aFillColor.GetRed()),
- static_cast<sal_uInt8>(m_aFillColor.GetGreen()),
- static_cast<sal_uInt8>(m_aFillColor.GetBlue()));
- Color aForeColor(static_cast<sal_uInt8>(m_aPatternColor.GetRed()),
- static_cast<sal_uInt8>(m_aPatternColor.GetGreen()),
- static_cast<sal_uInt8>(m_aPatternColor.GetBlue()));
-
- if( aXOBitmap.GetBackgroundColor() == COL_BLACK )
- {
- aXOBitmap.SetPixelColor( aBackColor );
- aXOBitmap.SetBackgroundColor( aForeColor );
- }
- else
- {
- aXOBitmap.SetPixelColor( aForeColor );
- aXOBitmap.SetBackgroundColor( aBackColor );
- }
- }
-
- // transfer image data from XOBitmap->SvStream->BYTE-Array
- SvMemoryStream aPicMemStream;
- aXOBitmap.Array2Bitmap();
- aXOBitmap.GetBitmap().Write(aPicMemStream);
- sal_uInt32 nSize = aPicMemStream.GetEndOfData();
- sal_uInt8* pImageBuff = new sal_uInt8 [nSize];
- memcpy(pImageBuff, aPicMemStream.GetData(), nSize);
-
- // create XFBGImage object.
- XFBGImage* pXFBGImage = new XFBGImage();
- pXFBGImage->SetImageData(pImageBuff, nSize);
-
- if (pImageBuff)
- {
- delete [] pImageBuff;
- pImageBuff = NULL;
- }
-
-
- pXFBGImage->SetRepeate();
- // end of add
-
- return pXFBGImage;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpbackgroundstuff.hxx b/lotuswordpro/source/filter/lwpbackgroundstuff.hxx
deleted file mode 100644
index 1321d8640..000000000
--- a/lotuswordpro/source/filter/lwpbackgroundstuff.hxx
+++ /dev/null
@@ -1,167 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-/*************************************************************************
-* @file
-* Backgound object of Wordpro.
-************************************************************************/
-#ifndef _LWPBACKGROUNDSTUFF_HXX
-#define _LWPBACKGROUNDSTUFF_HXX
-#include "lwpcolor.hxx"
-
-/* background patterns */
-#define BACK_TRANSPARENT 0
-#define BACK_FILL 1
-#define BACK_PATTERN 2
-#define BACK_10PCTDOTS 3
-#define BACK_30PCTDOTS 4
-#define BACK_50PCTDOTS 5
-#define BACK_75PCTDOTS 6
-#define BACK_90PCTDOTS 7
-#define BACK_90PCTINVDOTS 8
-#define BACK_75PCTINVDOTS 9
-#define BACK_50PCTINVDOTS 10
-#define BACK_30PCTINVDOTS 11
-#define BACK_10PCTINVDOTS 12
-#define BACK_MARBLES 13
-#define BACK_STARRYNIGHT 14
-#define BACK_DIAGTHICK 15
-#define BACK_DIAGTHIN 16
-#define BACK_DIAGDOUBLE 17
-#define BACK_DIAGDOUBLENARROW 18
-#define BACK_DIAGTRIPLE 19
-#define BACK_DIAGSINGLEWIDE 20
-#define BACK_DIAGTHICKINV 21
-#define BACK_DIAGTHININV 22
-#define BACK_DIAGDOUBLEINV 23
-#define BACK_DIAGDOUBLENARROWINV 24
-#define BACK_DIAGTRIPLEINV 25
-#define BACK_DIAGSINGLEWIDEINV 26
-#define BACK_CHAINLINKSMALLINV 27
-#define BACK_CHAINLINKSMALL 28
-#define BACK_CHAINLINKMEDIUM 29
-#define BACK_CHAINLINKLARGE 30
-#define BACK_HORZSTRIPE1 31
-#define BACK_HORZSTRIPE2 32
-#define BACK_HORZSTRIPE3 33
-#define BACK_HORZSTRIPE4 34
-#define BACK_VERTSTRIPE1 35
-#define BACK_VERTSTRIPE2 36
-#define BACK_VERTSTRIPE3 37
-#define BACK_VERTSTRIPE4 38
-#define BACK_GRIDSMALL 39
-#define BACK_GRIDMEDIUM 40
-#define BACK_GRIDLARGE 41
-#define BACK_BOXDOT 42
-#define BACK_GOLFGREEN 43
-#define BACK_DITZ 44
-#define BACK_HORZWEAVE 45
-#define BACK_APPLEPIE 46
-#define BACK_BRICK 47
-#define BACK_DIAGBRICK 48
-#define BACK_CHECKER1 49
-#define BACK_CHECKER2 50
-#define BACK_CHECKER3 51
-#define BACK_CHECKER4 52
-#define BACK_CHECKER5 53
-#define BACK_SNOWFLAKE 54
-#define BACK_MARGARITA 55
-#define BACK_SIDEHARP 56
-#define BACK_SCALES 57
-#define BACK_TAYLOR 58
-#define BACK_BUBBLES 59
-#define BACK_ARGYLE 60
-#define BACK_INDIAN1 61
-#define BACK_INDIAN3 62
-#define BACK_PEACHPIE 63
-#define BACK_GRADIENT1 64
-#define BACK_GRADIENT2 65
-#define BACK_GRADIENT3 66
-#define BACK_GRADIENT4 67
-#define BACK_GRADIENT5 68
-#define BACK_GRADIENT6 69
-#define BACK_GRADIENT7 70
-#define BACK_GRADIENT8 71
-
-class XFBGImage;
-class LwpBackgroundStuff
-{
-public:
- LwpBackgroundStuff()
- {
- m_nID = 0;
- }
-
-private:
- void GetPattern(sal_uInt16 btPttnIndex, sal_uInt8* pPttnArray);
-
-public:
- void Read(LwpObjectStream *pStrm);
- LwpColor* GetFillColor();
- XFBGImage* GetFillPattern();
-
- inline sal_Bool IsTransparent() {return (m_nID == BACK_TRANSPARENT);}
- inline sal_Bool IsPatternFill() { return (sal_Bool)(m_nID > 2 && m_nID < 72); }
-
- friend class LwpBackgroundOverride;
-private:
- sal_uInt16 m_nID;
- LwpColor m_aFillColor;
- LwpColor m_aPatternColor;
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpbasetype.cxx b/lotuswordpro/source/filter/lwpbasetype.cxx
deleted file mode 100644
index 3356da760..000000000
--- a/lotuswordpro/source/filter/lwpbasetype.cxx
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-#include "lwpbasetype.hxx"
-/**
- * @descr read PonoseNumber from object stream
-*/
-void LwpPanoseNumber::Read(LwpObjectStream *pStrm)
-{
- m_nFamilyType = pStrm->QuickReaduInt8();
- m_nSerifStyle = pStrm->QuickReaduInt8();
- m_nWeight = pStrm->QuickReaduInt8();
- m_nProportion = pStrm->QuickReaduInt8();
- m_nContrast = pStrm->QuickReaduInt8();
- m_nStrokeVariation = pStrm->QuickReaduInt8();
- m_nArmStyle = pStrm->QuickReaduInt8();
- m_nLetterform = pStrm->QuickReaduInt8();
- m_nMidline = pStrm->QuickReaduInt8();
- m_nXHeight = pStrm->QuickReaduInt8();
-
-}
-
-LwpPoint::LwpPoint()
-{
- Reset();
-}
-
-/**
- * @descr read point from object stream
-*/
-void LwpPoint::Read(LwpObjectStream *pStrm)
-{
- m_nX = pStrm->QuickReadInt32();
- m_nY = pStrm->QuickReadInt32();
-}
-/**
- * @descr reset to zero
-*/
-void LwpPoint::Reset()
-{
- m_nX=0L;
- m_nY=0L;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpbasetype.hxx b/lotuswordpro/source/filter/lwpbasetype.hxx
deleted file mode 100644
index 1d4e41cf7..000000000
--- a/lotuswordpro/source/filter/lwpbasetype.hxx
+++ /dev/null
@@ -1,120 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-/*************************************************************************
- * @file
- * basic classes for Word Pro filter,
- * PanoseNumber, Point
- ************************************************************************/
-/*************************************************************************
- * Change History
- Jan 2005 Created
- ************************************************************************/
-
-
-#ifndef _LWPBASETYPE_HXX
-#define _LWPBASETYPE_HXX
-
-#include "lwpobjstrm.hxx"
-#include "lwpheader.hxx"
-
-/**
- * @brief used for lwpfont for font description
-*/
-class LwpPanoseNumber
-{
-public:
- LwpPanoseNumber(){}
- ~LwpPanoseNumber(){}
-public:
- void Read(LwpObjectStream *pStrm);
-private:
- sal_uInt8 m_nFamilyType;
- sal_uInt8 m_nSerifStyle;
- sal_uInt8 m_nWeight;
- sal_uInt8 m_nProportion;
- sal_uInt8 m_nContrast;
- sal_uInt8 m_nStrokeVariation;
- sal_uInt8 m_nArmStyle;
- sal_uInt8 m_nLetterform;
- sal_uInt8 m_nMidline;
- sal_uInt8 m_nXHeight;
-};
-/**
- * @brief point class
-*/
-class LwpPoint
-{
-public:
- LwpPoint();
- void Read(LwpObjectStream *pStrm);
- void Reset();
- inline sal_Int32 GetX() const;
- inline sal_Int32 GetY() const;
- inline void SetX(sal_Int32 nX);
- inline void SetY(sal_Int32 nY);
-protected:
- sal_Int32 m_nX;
- sal_Int32 m_nY;
-};
-
-sal_Int32 LwpPoint::GetX() const {return m_nX;}
-sal_Int32 LwpPoint::GetY() const {return m_nY;}
-void LwpPoint::SetX(sal_Int32 nX){m_nX = nX;}
-void LwpPoint::SetY(sal_Int32 nY){m_nY = nY;}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpbookmarkmgr.cxx b/lotuswordpro/source/filter/lwpbookmarkmgr.cxx
deleted file mode 100644
index 58aa0fea4..000000000
--- a/lotuswordpro/source/filter/lwpbookmarkmgr.cxx
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-#include "lwpbookmarkmgr.hxx"
-
-void LwpBookmarkMgr::AddXFBookmarkStart(OUString sName,XFBookmarkStart* pMark)
-{
- std::map<OUString,XFBookmarkStart*>::iterator iter;
- iter = m_MapStart.find(sName);
- if (iter == m_MapStart.end())//not find
- {
- m_MapStart[sName] = pMark;
- }
- else //have exist the same bookmark name
- {
- XFBookmarkStart* pFind = iter->second;
- OUString totalName = pFind->GetDivision() + A2OUSTR(":");
- totalName += pFind->GetName();
- pFind->SetName(totalName);
- m_MapStart[totalName] = pFind;
- m_MapStart[sName] = pMark;
- }
-}
-void LwpBookmarkMgr::AddXFBookmarkEnd(OUString sName,XFBookmarkEnd* pMark)
-{
- std::map<OUString,XFBookmarkEnd*>::iterator iter;
- iter = m_MapEnd.find(sName);
- if (iter == m_MapEnd.end())//not find
- {
- m_MapEnd[sName] = pMark;
- }
- else //have exist the same bookmark name
- {
- XFBookmarkEnd* pFind = iter->second;
- OUString totalName = pFind->GetDivision() + A2OUSTR(":");
- totalName += pFind->GetName();
- pFind->SetName(totalName);
- m_MapEnd[totalName] = pFind;
- m_MapEnd[sName] = pMark;
- }
-}
-sal_Bool LwpBookmarkMgr::FindBookmark(OUString sName)
-{
- std::map<OUString,XFBookmarkStart*>::iterator iter;
- iter = m_MapStart.find(sName);
- if (iter != m_MapStart.end())
- return sal_True;
- else
- return sal_False;
-}
-
-LwpBookmarkMgr::LwpBookmarkMgr()
-{
- m_MapStart.clear();
- m_MapEnd.clear();
-}
-LwpBookmarkMgr::~LwpBookmarkMgr()
-{
- m_MapStart.clear();
- m_MapEnd.clear();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpbookmarkmgr.hxx b/lotuswordpro/source/filter/lwpbookmarkmgr.hxx
deleted file mode 100644
index 2dbb7827e..000000000
--- a/lotuswordpro/source/filter/lwpbookmarkmgr.hxx
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-/*************************************************************************
- * @file
- * For LWP filter architecture prototype
- ************************************************************************/
-/*************************************************************************
- * Change History
- May 2005 Created
- ************************************************************************/
-#ifndef _LWPBOOKMARKMGR_HXX_
-#define _LWPBOOKMARKMGR_HXX_
-
-#include "lwpfilehdr.hxx"
-#include <map>
-
-#include "xfilter/xfbookmark.hxx"
-
-class LwpBookmarkMgr
-{
-public:
- void AddXFBookmarkEnd(OUString sName,XFBookmarkEnd* pMark);
- void AddXFBookmarkStart(OUString sName,XFBookmarkStart* pMark);
- sal_Bool FindBookmark(OUString sName);
- ~LwpBookmarkMgr();
- LwpBookmarkMgr();
-private:
- std::map<OUString,XFBookmarkStart*> m_MapStart;
- std::map<OUString,XFBookmarkEnd*> m_MapEnd;
-};
-
-#endif
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpborderstuff.cxx b/lotuswordpro/source/filter/lwpborderstuff.cxx
deleted file mode 100644
index ab0dff07c..000000000
--- a/lotuswordpro/source/filter/lwpborderstuff.cxx
+++ /dev/null
@@ -1,255 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-/*************************************************************************
-* @file
-* Border stuff of Wordpro.
-************************************************************************/
-#include "lwpborderstuff.hxx"
-#include "lwpstyledef.hxx"
-#include "lwpfilehdr.hxx"
-#include "lwptools.hxx"
-
-LwpBorderStuff::LwpBorderStuff()
-{
- m_nSides = 0;
- m_nValid = 0;
-
- m_nBoderGroupIDLeft = 0;
- m_nBoderGroupIDRight = 0;
- m_nBoderGroupIDTop = 0;
- m_nBoderGroupIDBottom = 0;
-
- m_nGroupIndent = 0;
-
- m_nWidthLeft = 0;
- m_nWidthTop = 0;
- m_nWidthRight = 0;
- m_nWidthBottom = 0;
-}
-
-void LwpBorderStuff::Read(LwpObjectStream *pStrm)
-{
- m_nSides = pStrm->QuickReaduInt16();
- if( m_nSides&LEFT )
- {
- m_nBoderGroupIDLeft = pStrm->QuickReaduInt16();
- m_nWidthLeft = pStrm->QuickReadInt32();
- m_aColorLeft.Read(pStrm);
-
- if( LwpFileHeader::m_nFileRevision < 0x000b )
- {
- pStrm->SeekRel(8);
- }
- }
-
- if( m_nSides&RIGHT )
- {
- m_nBoderGroupIDRight = pStrm->QuickReaduInt16();
- m_nWidthRight = pStrm->QuickReadInt32();
- m_aColorRight.Read(pStrm);
-
- if( LwpFileHeader::m_nFileRevision < 0x000b )
- {
- pStrm->SeekRel(8);
- }
- }
-
- if( m_nSides&TOP )
- {
- m_nBoderGroupIDTop = pStrm->QuickReaduInt16();
- m_nWidthTop = pStrm->QuickReadInt32();
- m_aColorTop.Read(pStrm);
-
- if( LwpFileHeader::m_nFileRevision < 0x000b )
- {
- pStrm->SeekRel(8);
- }
- }
-
- if( m_nSides&BOTTOM )
- {
- m_nBoderGroupIDBottom = pStrm->QuickReaduInt16();
- m_nWidthBottom = pStrm->QuickReadInt32();
- m_aColorBottom.Read(pStrm);
-
- if( LwpFileHeader::m_nFileRevision < 0x000b )
- {
- pStrm->SeekRel(8);
- }
- }
-
- m_nGroupIndent = pStrm->QuickReadInt32();
- m_nValid = pStrm->QuickReaduInt16();
- pStrm->SkipExtra();
-
- if( LwpFileHeader::m_nFileRevision < 0x0010 )
- {
- if( m_nBoderGroupIDLeft&EXTERNAL_ID )
- {
- m_nBoderGroupIDLeft = BGRP_SOLID;
- }
- if( m_nBoderGroupIDRight&EXTERNAL_ID )
- {
- m_nBoderGroupIDRight = BGRP_SOLID;
- }
- if( m_nBoderGroupIDTop&EXTERNAL_ID )
- {
- m_nBoderGroupIDTop = BGRP_SOLID;
- }
- if( m_nBoderGroupIDBottom&EXTERNAL_ID )
- {
- m_nBoderGroupIDBottom = BGRP_SOLID;
- }
- }
-}
-
-sal_Bool LwpBorderStuff::HasSide(sal_uInt16 side)
-{
- return m_nSides&side;
-}
-
-sal_uInt16 LwpBorderStuff::GetSideType(sal_uInt16 side)
-{
- switch(side)
- {
- case LEFT:
- return m_nBoderGroupIDLeft;
- break;
- case RIGHT:
- return m_nBoderGroupIDRight;
- break;
- case TOP:
- return m_nBoderGroupIDTop;
- break;
- case BOTTOM:
- return m_nBoderGroupIDBottom;
- break;
- }
- // FIXME: this is needed to avoid warning: control reaches end of non-void function
- // a better solution would be to enum value for the parameter side
- return 0;
-}
-
-LwpColor LwpBorderStuff::GetSideColor(sal_uInt16 side)
-{
- switch(side)
- {
- case LEFT:
- return m_aColorLeft;
- break;
- case RIGHT:
- return m_aColorRight;
- break;
- case TOP:
- return m_aColorTop;
- break;
- case BOTTOM:
- return m_aColorBottom;
- break;
- }
- // FIXME: this is needed to avoid warning: control reaches end of non-void function
- // a better solution would be to enum value for the parameter side
- return LwpColor();
-}
-
-float LwpBorderStuff::GetSideWidth(sal_uInt16 side)
-{
- switch(side)
- {
- case LEFT:
- return LwpTools::ConvertToMetric(LwpTools::ConvertFromUnits(m_nWidthLeft));
- break;
- case RIGHT:
- return LwpTools::ConvertToMetric(LwpTools::ConvertFromUnits(m_nWidthRight));
- break;
- case TOP:
- return LwpTools::ConvertToMetric(LwpTools::ConvertFromUnits(m_nWidthTop));
- break;
- case BOTTOM:
- return LwpTools::ConvertToMetric(LwpTools::ConvertFromUnits(m_nWidthBottom));
- break;
- }
- // FIXME: this is needed to avoid warning: control reaches end of non-void function
- // a better solution would be to enum value for the parameter side
- return 0;
-}
-
-LwpBorderStuff& LwpBorderStuff::operator = (const LwpBorderStuff& rOther)
-{
- m_nSides = rOther.m_nSides;
- m_nValid = rOther.m_nValid;
-
- m_nBoderGroupIDLeft = rOther.m_nBoderGroupIDLeft;
- m_nBoderGroupIDRight = rOther.m_nBoderGroupIDRight;
- m_nBoderGroupIDTop = rOther.m_nBoderGroupIDTop;
- m_nBoderGroupIDBottom = rOther.m_nBoderGroupIDBottom;
-
- m_nGroupIndent = rOther.m_nGroupIndent;
-
- m_nWidthLeft = rOther.m_nWidthLeft;
- m_nWidthTop = rOther.m_nWidthTop;
- m_nWidthRight = rOther.m_nWidthRight;
- m_nWidthBottom = rOther.m_nWidthBottom;
-
- m_aColorLeft = rOther.m_aColorLeft;
- m_aColorRight = rOther.m_aColorRight;
- m_aColorTop = rOther.m_aColorTop;
- m_aColorBottom = rOther.m_aColorBottom;
-
- return *this;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpborderstuff.hxx b/lotuswordpro/source/filter/lwpborderstuff.hxx
deleted file mode 100644
index 2c7fde539..000000000
--- a/lotuswordpro/source/filter/lwpborderstuff.hxx
+++ /dev/null
@@ -1,116 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-/*************************************************************************
-* @file
-* Border stuff of Wordpro.
-************************************************************************/
-#ifndef _LWPBORDERSTUFF_HXX
-#define _LWPBORDERSTUFF_HXX
-
-#include "lwpcolor.hxx"
-
-class LwpBorderStuff
-{
-public:
- LwpBorderStuff();
-
- enum BorderType
- {
- NOSIDE = 0,
- LEFT = 1,
- RIGHT = 2,
- TOP = 4,
- BOTTOM = 8,
- ALLSIDE = 15,
- TEMPORARY = 0xff00
- };
-
-public:
- void Read(LwpObjectStream *pStrm);
-
- sal_uInt16 GetSide(){ return m_nSides; }
- sal_Bool HasSide(sal_uInt16 side);
- sal_uInt16 GetSideType(sal_uInt16 side);
- LwpColor GetSideColor(sal_uInt16 side);
- float GetSideWidth(sal_uInt16 side);
- LwpBorderStuff& operator = (const LwpBorderStuff& rOther);
- friend class LwpParaBorderOverride;
-private:
- sal_uInt16 m_nSides;
- sal_uInt16 m_nValid;
-
- sal_uInt16 m_nBoderGroupIDLeft;
- sal_uInt16 m_nBoderGroupIDRight;
- sal_uInt16 m_nBoderGroupIDTop;
- sal_uInt16 m_nBoderGroupIDBottom;
-
- sal_Int32 m_nGroupIndent;
-
- sal_Int32 m_nWidthLeft;
- sal_Int32 m_nWidthTop;
- sal_Int32 m_nWidthRight;
- sal_Int32 m_nWidthBottom;
-
- LwpColor m_aColorLeft;
- LwpColor m_aColorRight;
- LwpColor m_aColorTop;
- LwpColor m_aColorBottom;
-
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpbreaksoverride.cxx b/lotuswordpro/source/filter/lwpbreaksoverride.cxx
deleted file mode 100644
index e40471017..000000000
--- a/lotuswordpro/source/filter/lwpbreaksoverride.cxx
+++ /dev/null
@@ -1,288 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-/*************************************************************************
-* @file
-* Breaks override of Wordpro.
-************************************************************************/
-#include <memory>
-
-#include "clone.hxx"
-#include "lwpbreaksoverride.hxx"
-#include "lwpobjstrm.hxx"
-#include "lwpatomholder.hxx"
-
-
-LwpBreaksOverride::LwpBreaksOverride()
-{
- m_pNextStyle = new LwpAtomHolder();
-}
-
-LwpBreaksOverride::LwpBreaksOverride(LwpBreaksOverride const& rOther)
- : LwpOverride(rOther)
- , m_pNextStyle(0)
-{
- std::auto_ptr<LwpAtomHolder> pNextStyle(::clone(rOther.m_pNextStyle));
- m_pNextStyle = pNextStyle.release();
-}
-
-LwpBreaksOverride::~LwpBreaksOverride()
-{
- if( m_pNextStyle )
- delete m_pNextStyle;
-}
-
-LwpBreaksOverride* LwpBreaksOverride::clone() const
-{
- return new LwpBreaksOverride(*this);
-}
-
-void LwpBreaksOverride::Read(LwpObjectStream *pStrm)
-{
- if (pStrm->QuickReadBool())
- {
- ReadCommon(pStrm);
-
- m_pNextStyle->Read(pStrm);
- }
-
- pStrm->SkipExtra();
-}
-
-//add by , 01/28/2005
-void LwpBreaksOverride::Override(LwpBreaksOverride* pOther)
-{
- if (m_nApply & BO_PAGEBEFORE)
- {
- if (IsPageBreakBeforeOverridden())
- {
- pOther->OverridePageBreakBefore(IsPageBreakBefore());
- }
- else
- {
- pOther->RevertPageBreakBefore();
- }
- }
- if (m_nApply & BO_PAGEAFTER)
- {
- if (IsPageBreakAfterOverridden())
- {
- pOther->OverridePageBreakAfter(IsPageBreakAfter());
- }
- else
- {
- pOther->RevertPageBreakAfter();
- }
- }
- if (m_nApply & BO_KEEPTOGETHER)
- {
- if (IsPageBreakWithinOverridden())
- {
- pOther->OverridePageBreakWithin(IsPageBreakWithin());
- }
- else
- {
- pOther->RevertPageBreakWithin();
- }
- }
- if (m_nApply & BO_COLBEFORE)
- {
- if (IsColumnBreakBeforeOverridden())
- {
- pOther->OverrideColumnBreakBefore(IsColumnBreakBefore());
- }
- else
- {
- pOther->RevertColumnBreakBefore();
- }
- }
- if (m_nApply & BO_COLAFTER)
- {
- if (IsColumnBreakAfterOverridden())
- {
- pOther->OverrideColumnBreakAfter(IsColumnBreakAfter());
- }
- else
- {
- pOther->RevertColumnBreakAfter();
- }
- }
- if (m_nApply & BO_KEEPPREV)
- {
- if (IsKeepWithPreviousOverridden())
- {
- pOther->OverrideKeepWithPrevious(IsKeepWithPrevious());
- }
- else
- {
- pOther->RevertKeepWithPrevious();
- }
- }
- if (m_nApply & BO_KEEPNEXT)
- {
- if (IsKeepWithNextOverridden())
- {
- pOther->OverrideKeepWithNext(IsKeepWithNext());
- }
- else
- {
- pOther->RevertKeepWithNext();
- }
- }
- if (m_nApply & BO_USENEXTSTYLE)
- {
- if (IsUseNextStyleOverridden())
- {
- pOther->OverrideUseNextStyle(IsUseNextStyle());
- }
- else
- {
- pOther->RevertUseNextStyle();
- }
- }
-}
-
-void LwpBreaksOverride::OverridePageBreakBefore(sal_Bool bVal)
-{
- if(bVal)
- {
- LwpOverride::Override(BO_PAGEBEFORE, STATE_ON);
- }
- else
- {
- LwpOverride::Override(BO_PAGEBEFORE, STATE_OFF);
- }
-}
-void LwpBreaksOverride::OverridePageBreakAfter(sal_Bool bVal)
-{
- if(bVal)
- {
- LwpOverride::Override(BO_PAGEAFTER, STATE_ON);
- }
- else
- {
- LwpOverride::Override(BO_PAGEAFTER, STATE_OFF);
- }
-}
-void LwpBreaksOverride::OverridePageBreakWithin(sal_Bool bVal)
-{
- // Note the flipped logic
- if(!bVal)
- {
- LwpOverride::Override(BO_KEEPTOGETHER, STATE_ON);
- }
- else
- {
- LwpOverride::Override(BO_KEEPTOGETHER, STATE_OFF);
- }
-}
-void LwpBreaksOverride::OverrideColumnBreakBefore(sal_Bool bVal)
-{
- if(bVal)
- {
- LwpOverride::Override(BO_COLBEFORE, STATE_ON);
- }
- else
- {
- LwpOverride::Override(BO_COLBEFORE, STATE_OFF);
- }
-}
-void LwpBreaksOverride::OverrideColumnBreakAfter(sal_Bool bVal)
-{
- if(bVal)
- {
- LwpOverride::Override(BO_COLAFTER, STATE_ON);
- }
- else
- {
- LwpOverride::Override(BO_COLAFTER, STATE_OFF);
- }
-}
-void LwpBreaksOverride::OverrideKeepWithNext(sal_Bool bVal)
-{
- if(bVal)
- {
- LwpOverride::Override(BO_KEEPNEXT, STATE_ON);
- }
- else
- {
- LwpOverride::Override(BO_KEEPNEXT, STATE_OFF);
- }
-}
-void LwpBreaksOverride::OverrideKeepWithPrevious(sal_Bool bVal)
-{
- if(bVal)
- {
- LwpOverride::Override(BO_KEEPPREV, STATE_ON);
- }
- else
- {
- LwpOverride::Override(BO_KEEPPREV, STATE_OFF);
- }
-}
-void LwpBreaksOverride::OverrideUseNextStyle(sal_Bool bVal)
-{
- if(bVal)
- {
- LwpOverride::Override(BO_USENEXTSTYLE, STATE_ON);
- }
- else
- {
- LwpOverride::Override(BO_USENEXTSTYLE, STATE_OFF);
- }
-}
-//end add
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpbreaksoverride.hxx b/lotuswordpro/source/filter/lwpbreaksoverride.hxx
deleted file mode 100644
index 293d4dc42..000000000
--- a/lotuswordpro/source/filter/lwpbreaksoverride.hxx
+++ /dev/null
@@ -1,253 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-/*************************************************************************
-* @file
-* Breaks override of Wordpro.
-************************************************************************/
-#ifndef _LWPBREAKSOVERRIDE_HXX
-#define _LWPBREAKSOVERRIDE_HXX
-
-#include "lwpoverride.hxx"
-
-class LwpObjectStream;
-class LwpAtomHolder;
-class LwpBreaksOverride : public LwpOverride
-{
-
-public:
- LwpBreaksOverride();
- virtual ~LwpBreaksOverride();
-
- virtual LwpBreaksOverride* clone() const;
-
- enum
- {
- BO_PAGEBEFORE = 0x01, // page break before this style
- BO_PAGEAFTER = 0x02, // page break after this style
- BO_KEEPTOGETHER = 0x04,
- BO_COLBEFORE = 0x08, // col break before this style
- BO_COLAFTER = 0x10, // col break after this style
- BO_KEEPPREV = 0x20, // not with-PAGE BEF, COL BEF or WITHIN
- BO_KEEPNEXT = 0x40, // not with-PAGE AFT, COL AFT or WITHIN
- BO_USENEXTSTYLE = 0x80, // use next style name
- BO_NEXTSTYLE = 0x100 // next style name
- };
-public:
- virtual void Read(LwpObjectStream *pStrm);
-
- //add by , 01/28/2005
- void Override(LwpBreaksOverride* pOther);
-
- inline sal_Bool IsPageBreakBefore();
- inline sal_Bool IsPageBreakAfter();
- inline sal_Bool IsPageBreakWithin();
- inline sal_Bool IsColumnBreakBefore();
- inline sal_Bool IsColumnBreakAfter();
- inline sal_Bool IsKeepWithNext();
- inline sal_Bool IsKeepWithPrevious();
- inline sal_Bool IsUseNextStyle();
-
- inline sal_Bool IsPageBreakBeforeOverridden();
- inline sal_Bool IsPageBreakAfterOverridden();
- inline sal_Bool IsPageBreakWithinOverridden();
- inline sal_Bool IsColumnBreakBeforeOverridden();
- inline sal_Bool IsColumnBreakAfterOverridden();
- inline sal_Bool IsKeepWithNextOverridden();
- inline sal_Bool IsKeepWithPreviousOverridden();
- inline sal_Bool IsUseNextStyleOverridden();
-
- inline void RevertPageBreakBefore();
- inline void RevertPageBreakAfter();
- inline void RevertPageBreakWithin();
- inline void RevertColumnBreakBefore();
- inline void RevertColumnBreakAfter();
- inline void RevertKeepWithNext();
- inline void RevertKeepWithPrevious();
- inline void RevertUseNextStyle();
-
-
- void OverridePageBreakBefore(sal_Bool bVal);
- void OverridePageBreakAfter(sal_Bool bVal);
- void OverridePageBreakWithin(sal_Bool bVal);
- void OverrideColumnBreakBefore(sal_Bool bVal);
- void OverrideColumnBreakAfter(sal_Bool bVal);
- void OverrideKeepWithNext(sal_Bool bVal);
- void OverrideKeepWithPrevious(sal_Bool bVal);
- void OverrideUseNextStyle(sal_Bool bVal);
-
-
- inline LwpAtomHolder* GetNextStyle();
- //end add
-
-protected:
- LwpBreaksOverride(LwpBreaksOverride const& rOther);
-
-private:
- LwpBreaksOverride& operator=(const LwpBreaksOverride& rOther); // not implemented
-
-private:
- LwpAtomHolder *m_pNextStyle;
-};
-
-inline sal_Bool LwpBreaksOverride::IsPageBreakBefore()
-{
- return (sal_Bool)((m_nValues & BO_PAGEBEFORE) != 0);
-}
-
-inline sal_Bool LwpBreaksOverride::IsPageBreakAfter()
-{
- return (sal_Bool)((m_nValues & BO_PAGEAFTER) != 0);
-}
-inline sal_Bool LwpBreaksOverride::IsPageBreakWithin()
-{
- return (sal_Bool)((m_nValues & BO_KEEPTOGETHER) != 0);
-}
-inline sal_Bool LwpBreaksOverride::IsColumnBreakBefore()
-{
- return (sal_Bool)((m_nValues & BO_COLBEFORE) != 0);
-}
-inline sal_Bool LwpBreaksOverride::IsColumnBreakAfter()
-{
- return (sal_Bool)((m_nValues & BO_COLAFTER) != 0);
-}
-inline sal_Bool LwpBreaksOverride::IsKeepWithNext()
-{
- return (sal_Bool)((m_nValues & BO_KEEPNEXT) != 0);
-}
-inline sal_Bool LwpBreaksOverride::IsKeepWithPrevious()
-{
- return (sal_Bool)((m_nValues & BO_KEEPPREV) != 0);
-}
-inline sal_Bool LwpBreaksOverride::IsUseNextStyle()
-{
- return (sal_Bool)((m_nValues & BO_USENEXTSTYLE) != 0);
-}
-
-inline sal_Bool LwpBreaksOverride::IsPageBreakBeforeOverridden()
-{
- return (sal_Bool)((m_nOverride& BO_PAGEBEFORE) != 0);
-}
-inline sal_Bool LwpBreaksOverride::IsPageBreakAfterOverridden()
-{
- return (sal_Bool)((m_nOverride& BO_PAGEAFTER) != 0);
-}
-inline sal_Bool LwpBreaksOverride::IsPageBreakWithinOverridden()
-{
- return (sal_Bool)((m_nOverride& BO_KEEPTOGETHER) != 0);
-}
-inline sal_Bool LwpBreaksOverride::IsColumnBreakBeforeOverridden()
-{
- return (sal_Bool)((m_nOverride& BO_COLBEFORE) != 0);
-}
-inline sal_Bool LwpBreaksOverride::IsColumnBreakAfterOverridden()
-{
- return (sal_Bool)((m_nOverride& BO_COLAFTER) != 0);
-}
-inline sal_Bool LwpBreaksOverride::IsKeepWithNextOverridden()
-{
- return (sal_Bool)((m_nOverride& BO_KEEPNEXT) != 0);
-}
-inline sal_Bool LwpBreaksOverride::IsKeepWithPreviousOverridden()
-{
- return (sal_Bool)((m_nOverride& BO_KEEPPREV) != 0);
-}
-inline sal_Bool LwpBreaksOverride::IsUseNextStyleOverridden()
-{
- return (sal_Bool)((m_nOverride& BO_USENEXTSTYLE) != 0);
-}
-
-inline void LwpBreaksOverride::RevertPageBreakBefore()
-{
- LwpOverride::Override(BO_PAGEBEFORE, STATE_STYLE);
-}
-inline void LwpBreaksOverride::RevertPageBreakAfter()
-{
- LwpOverride::Override(BO_PAGEAFTER, STATE_STYLE);
-}
-inline void LwpBreaksOverride::RevertPageBreakWithin()
-{
- LwpOverride::Override(BO_KEEPTOGETHER, STATE_STYLE);
-}
-inline void LwpBreaksOverride::RevertColumnBreakBefore()
-{
- LwpOverride::Override(BO_COLBEFORE, STATE_STYLE);
-}
-inline void LwpBreaksOverride::RevertColumnBreakAfter()
-{
- LwpOverride::Override(BO_COLAFTER, STATE_STYLE);
-}
-inline void LwpBreaksOverride::RevertKeepWithNext()
-{
- LwpOverride::Override(BO_KEEPNEXT, STATE_STYLE);
-}
-inline void LwpBreaksOverride::RevertKeepWithPrevious()
-{
- LwpOverride::Override(BO_KEEPPREV, STATE_STYLE);
-}
-inline void LwpBreaksOverride::RevertUseNextStyle()
-{
- LwpOverride::Override(BO_USENEXTSTYLE, STATE_STYLE);
-}
-
-inline LwpAtomHolder* LwpBreaksOverride::GetNextStyle()
-{
- return m_pNextStyle;
-}
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpbulletstylemgr.cxx b/lotuswordpro/source/filter/lwpbulletstylemgr.cxx
deleted file mode 100644
index 551108f96..000000000
--- a/lotuswordpro/source/filter/lwpbulletstylemgr.cxx
+++ /dev/null
@@ -1,333 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-/*************************************************************************
- * @file
- * For LWP filter architecture prototype
- ************************************************************************/
-/*************************************************************************
- * Change History
- Jan 2005 Created
- ************************************************************************/
-#include "lwpbulletstylemgr.hxx"
-#include "lwpdoc.hxx"
-#include "lwpstory.hxx"
-#include "lwpdivinfo.hxx"
-#include "lwppara.hxx"
-#include "lwpsilverbullet.hxx"
-#include "lwptools.hxx"
-#include "lwpparaproperty.hxx"
-#include "xfilter/xfliststyle.hxx"
-#include "xfilter/xfstylemanager.hxx"
-#include "xfilter/xflist.hxx"
-#include "lwpglobalmgr.hxx"
-
-LwpBulletStyleMgr::LwpBulletStyleMgr() :
-m_pBulletList(NULL), m_bContinue(sal_True), m_bIsBulletSkipped(sal_False), m_nCurrentPos(0xFF)
-{
-}
-LwpBulletStyleMgr::~LwpBulletStyleMgr()
-{
- if (m_pBulletList)
- {
- delete m_pBulletList;
- }
-
- m_vIDsPairList.clear();
- m_vStyleNameList.clear();
-}
-
-/**
- * @short Register bullet style to style-list. The function only register the bullet and single customized numbering
- * not inluding the numbering sequence.
- * @param pPara pointer to the current paragraph which has a bullet/numbering.
- * @param pBullOver pointer to the bulletoverride of current paragraph.
- * @param pIndent pointer to the indentoverride of current paragraph.
- */
-rtl::OUString LwpBulletStyleMgr::RegisterBulletStyle(LwpPara* pPara, LwpBulletOverride* pBullOver,
- LwpIndentOverride* pIndent)
-{
- if(!pPara || !pIndent || !pBullOver)
- {
-// assert(false);
- return rtl::OUString();
- }
-
- LwpSilverBullet* pSilverBullet = pPara->GetSilverBullet();
- if (!pSilverBullet)
- {
- assert(false);
- return rtl::OUString();
- }
-
- LwpPara* pBulletPara = pSilverBullet->GetBulletPara();
- if (!pBulletPara)
- {
- assert(false);
- return rtl::OUString();
- }
-
- LwpParaProperty* pProp = pPara->GetProperty(PP_LOCAL_INDENT);
- LwpParaIndentProperty* pIndentProp = NULL;
- LwpObjectID aIndentID;
- if (pProp)
- {
- pIndentProp = static_cast<LwpParaIndentProperty*>(pProp);
- aIndentID = pIndentProp->GetIndentID();
- }
-
- LwpObjectID aBulletID = pBullOver->GetSilverBullet();
- boost::shared_ptr<LwpBulletOverride> pBulletOver(pBullOver->clone());
-
- sal_uInt16 nNameIndex = 0;
- std::vector <OverridePair>::iterator iter;
- for(iter = m_vIDsPairList.begin(); iter != m_vIDsPairList.end(); ++iter)
- {
- if (iter->first->GetSilverBullet() == aBulletID && iter->second == aIndentID
- && iter->first->IsRightAligned() == pBullOver->IsRightAligned())
- {
- return m_vStyleNameList[nNameIndex];
- }
- else
- {
- nNameIndex++;
- }
- }
-
- m_vIDsPairList.push_back(std::make_pair(pBulletOver, aIndentID));
- rtl::OUString aStyleName;
-
- LwpFribPtr* pBulletParaFribs = pBulletPara->GetFribs();
- sal_Bool bIsNumbering = (sal_Bool)(pBulletParaFribs->HasFrib(FRIB_TAG_PARANUMBER) != 0);
-
- enumXFAlignType eAlign = enumXFAlignStart;
- if (pBullOver->IsRightAligned())
- {
- eAlign = enumXFAlignEnd;
- }
-
- XFListStyle* pListStyle = new XFListStyle();
- XFStyleManager* pXFStyleMgr = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
-
- if (!bIsNumbering)
- {
- for (sal_uInt8 nC = 1; nC < 11; nC++)
- {
- pListStyle->SetListBullet(nC, pSilverBullet->GetBulletChar(), pSilverBullet->GetBulletFontName(),
- pSilverBullet->GetPrefix(), pSilverBullet->GetSuffix());
-
- if (pIndent->GetMRest() > 0.001)
- {
- pListStyle->SetListPosition(nC, 0.0,
- LwpTools::ConvertToMetric(LwpTools::ConvertFromUnits(pIndent->GetMRest())), 0.0, eAlign);
- }
- else
- {
- pListStyle->SetListPosition(nC, 0.0,
- 0.0, LwpTools::ConvertToMetric(LwpTools::ConvertFromUnits(pIndent->GetMFirst())), eAlign);
- }
- }
-
- aStyleName = pXFStyleMgr->AddStyle(pListStyle)->GetStyleName();
- }
- else
- {
- ParaNumbering aParaNumbering;
- pBulletPara->GetParaNumber(1, &aParaNumbering);
- LwpFribParaNumber* pParaNumber = aParaNumbering.pParaNumber;
- if (pParaNumber)
- {
- for (sal_uInt8 nPos = 1; nPos < 10; nPos++)
- {
- if (pParaNumber->GetStyleID() != NUMCHAR_other)
- {
- rtl::OUString aPrefix;
- XFNumFmt aFmt;
- if (aParaNumbering.pPrefix)
- {
- aPrefix += aParaNumbering.pPrefix->GetText();
- }
-
- rtl::OUString aNumber = LwpSilverBullet::GetNumCharByStyleID(pParaNumber);
- if (pParaNumber->GetStyleID() == NUMCHAR_01 || pParaNumber->GetStyleID() == NUMCHAR_Chinese4)
- {
- aPrefix += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0"));
- }
- aFmt.SetPrefix(aPrefix);
-
- aFmt.SetFormat(aNumber);
-
- if (aParaNumbering.pSuffix)
- {
- aFmt.SetSuffix(aParaNumbering.pSuffix->GetText());
- }
-
- //set numbering format into the style-list.
- pListStyle->SetListNumber(nPos, aFmt, pParaNumber->GetStart()+1);
-
- }
- else
- {
- rtl::OUString aPrefix, aSuffix;
- if (aParaNumbering.pPrefix)
- {
- aPrefix = aParaNumbering.pPrefix->GetText();
- }
- if (aParaNumbering.pSuffix)
- {
- aSuffix = aParaNumbering.pSuffix->GetText();
- }
-
- pListStyle->SetListBullet(nPos, LwpSilverBullet::GetNumCharByStyleID(pParaNumber).toChar(),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Times New Roman")), aPrefix, aSuffix);
- }
-
- pListStyle->SetListPosition(nPos, 0.0, 0.635, 0.0);
- }
- aStyleName = pXFStyleMgr->AddStyle(pListStyle)->GetStyleName();
- }
-
- }
-
- m_vStyleNameList.push_back(aStyleName);
- return aStyleName;
-
-}
-
-#include "xfilter/xflistitem.hxx"
-//Create nested XFList and XFItems and then add it to XFContentContainer(pCont)
-//Return the inner XFItem created.
-XFContentContainer* LwpBulletStyleMgr::AddBulletList(
- XFContentContainer* pCont, sal_Bool bIsOrdered,
- const rtl::OUString& rStyleName, sal_Int16 nLevel, sal_Bool bIsBulletSkiped)
-{
- assert(nLevel>0);
-
- m_bIsBulletSkipped = bIsBulletSkiped;
-
- //todo: need judge here.
- sal_Bool bContinue = m_bContinue;
-
- XFList* theList;
- XFList* prevList = NULL;
- XFListItem* theItem;
- XFListItem* InnerItem = NULL;
- for (sal_Int8 nC = nLevel-1; nC >= 0; nC--)
- {
- theList = new XFList();
- theItem = new XFListItem();
- theList->Add(theItem);
-
- if (bIsOrdered)
- {
- theList->SetOrdered(sal_True);
- }
- else
- {
- bContinue = sal_False;
- theList->SetOrdered(sal_False);
- }
-
- if (nC == nLevel-1)
- {
- theList->SetContinueNumber(bContinue);
- }
- //Add the outer list to pCont
- if (nC == 0)
- {
- theList->SetStyleName(rStyleName);
- pCont->Add(theList);
- }
-
- if ((nC == nLevel-1) && bIsBulletSkiped)
- {
- theItem->SetIsHeader(sal_True);
-
- theList->SetContinueNumber(sal_True);
- // end of add
- }
-
- if(nC == nLevel-1)
- {
- InnerItem = theItem;
- }
-
- if(prevList)
- {
- theItem->Add(prevList);
- }
- prevList = theList;
- }
- return InnerItem;
-}
-
-rtl::OUString LwpBulletStyleMgr::GetSectionName(LwpPara* pPara)
-{
- LwpObjectID* pStoryID = pPara->GetStoryID();
- if (pStoryID->IsNull())
- {
- return rtl::OUString();
- }
-
- LwpStory* pStory = dynamic_cast<LwpStory*>(pStoryID->obj(VO_STORY));
- if (!pStory)
- {
- return rtl::OUString();
- }
-
- return pStory->GetSectionName();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpbulletstylemgr.hxx b/lotuswordpro/source/filter/lwpbulletstylemgr.hxx
deleted file mode 100644
index 4ca161a7e..000000000
--- a/lotuswordpro/source/filter/lwpbulletstylemgr.hxx
+++ /dev/null
@@ -1,165 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-/*************************************************************************
- * @file
- * For LWP filter architecture prototype
- ************************************************************************/
-/*************************************************************************
- * Change History
- Jan 2005 Created
- ************************************************************************/
-#ifndef _LWPBULLETSTYLEMGR_HXX
-#define _LWPBULLETSTYLEMGR_HXX
-
-#include <boost/scoped_ptr.hpp>
-#include <boost/shared_ptr.hpp>
-
-#include "lwpheader.hxx"
-#include "lwpfoundry.hxx"
-#include "lwpobjid.hxx"
-#include "lwpnumberingoverride.hxx"
-#include <utility>
-#include "xfilter/xfcontentcontainer.hxx"
-
-class XFListStyle;
-class XFList;
-class LwpPara;
-class LwpSilverBullet;
-class XFStyleManager;
-class LwpIndentOverride;
-class LwpBulletOverride;
-class LwpFribParaNumber;
-
-class LwpBulletStyleMgr
-{
-public:
- LwpBulletStyleMgr();
- virtual ~LwpBulletStyleMgr();
- rtl::OUString RegisterBulletStyle(LwpPara* pPara, LwpBulletOverride* pBullOver,
- LwpIndentOverride* pIndent);
- inline void SetFoundry(LwpFoundry* pFoundry);
- inline void SetContinueFlag(sal_Bool bFlag);
- XFContentContainer* AddBulletList(XFContentContainer* pCont, sal_Bool bIsOrdered,
- const rtl::OUString& rStyleName, sal_Int16 nLevel, sal_Bool bIsBulletSkiped);
- inline void SetCurrentPos(sal_uInt16 nNewPos);
- inline void SetCurrentSilverBullet(const LwpObjectID& rNewID);
- inline LwpObjectID GetCurrentSilverBullet();
- inline sal_uInt16 GetCurrentPos() const;
- inline void SetCurrentNumOver(const LwpNumberingOverride& rOther);
- inline LwpNumberingOverride* GetCurrentNumOver();
-
-private:
- rtl::OUString GetSectionName(LwpPara* pPara);
-
-private:
-// std::vector <XFListStyle*> m_aBulletStyleList;
- typedef std::pair<boost::shared_ptr<LwpBulletOverride>, LwpObjectID> OverridePair;
- std::vector <rtl::OUString> m_vStyleNameList;
- std::vector <OverridePair> m_vIDsPairList;
- rtl::OUString m_aCurrentStyleName;
- LwpFoundry* m_pFoundry;
- XFList* m_pBulletList;
-// UChar32 m_nCurrentChar;
-// rtl::OUString m_strCurrentFontName;
-// rtl::OUString m_strCurrentNumberingName;
- sal_Bool m_bContinue;
- sal_Bool m_bIsBulletSkipped;
- LwpObjectID m_aCurrentNumberingID;
- boost::scoped_ptr<LwpNumberingOverride> m_pCurrentNumOverride;
- sal_uInt16 m_nCurrentPos;
-
-};
-
-inline void LwpBulletStyleMgr::SetFoundry(LwpFoundry* pFoundry)
-{
- m_pFoundry = pFoundry;
-}
-inline void LwpBulletStyleMgr::SetContinueFlag(sal_Bool bFlag)
-{
- m_bContinue = bFlag;
-}
-
-inline void LwpBulletStyleMgr::SetCurrentPos(sal_uInt16 nNewPos)
-{
- m_nCurrentPos = nNewPos;
-}
-inline void LwpBulletStyleMgr::SetCurrentSilverBullet(const LwpObjectID& rNewID)
-{
- m_aCurrentNumberingID = rNewID;
-}
-
-inline LwpObjectID LwpBulletStyleMgr::GetCurrentSilverBullet()
-{
- return m_aCurrentNumberingID;
-}
-
-inline sal_uInt16 LwpBulletStyleMgr::GetCurrentPos() const
-{
- return m_nCurrentPos;
-}
-
-inline void LwpBulletStyleMgr::SetCurrentNumOver(const LwpNumberingOverride& rOther)
-{
- m_pCurrentNumOverride.reset(rOther.clone());
-}
-inline LwpNumberingOverride* LwpBulletStyleMgr::GetCurrentNumOver()
-{
- return m_pCurrentNumOverride.get();
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpcelllayout.cxx b/lotuswordpro/source/filter/lwpcelllayout.cxx
deleted file mode 100644
index 434cd3208..000000000
--- a/lotuswordpro/source/filter/lwpcelllayout.cxx
+++ /dev/null
@@ -1,950 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-/**
- * @file
- * For LWP filter architecture prototype - cell layouts
- */
-/*************************************************************************
- * Change History
- April 2005 Created
- ************************************************************************/
-#include "lwpcelllayout.hxx"
-#include "lwpfoundry.hxx"
-#include "lwpobjfactory.hxx"
-#include "lwptblcell.hxx"
-#include "lwptblformula.hxx"
-#include "lwpholder.hxx"
-#include "lwpnumericfmt.hxx"
-#include "lwptable.hxx"
-#include "lwpglobalmgr.hxx"
-
-#include "xfilter/xfstylemanager.hxx"
-#include "xfilter/xfcell.hxx"
-#include "xfilter/xfcellstyle.hxx"
-#include "xfilter/xfcolstyle.hxx"
-
-LwpCellLayout::LwpCellLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm)
- : LwpMiddleLayout(objHdr, pStrm)
- , cType(LDT_NONE)
-{}
-
-LwpCellLayout::~LwpCellLayout()
-{}
-
-/**
- * @short Get table layout pointer, if default cell layout, return NULL
- * @param LwpTableLayout *
- * @return
- */
-LwpTableLayout * LwpCellLayout::GetTableLayout()
-{
- LwpRowLayout * pRow = dynamic_cast<LwpRowLayout *>(GetParent()->obj());
- if(!pRow)
- {
- return NULL;
- }
- LwpTableLayout * pTableLayout = pRow->GetParentTableLayout();
- return pTableLayout;
-}
-/**
- * @short Get table pointer, if default cell layout, return NULL
- * @param LwpTable *
- * @return
- */
-LwpTable * LwpCellLayout::GetTable()
-{
- LwpTableLayout * pTableLayout = GetTableLayout();
- if(!pTableLayout)
- {
- return NULL;
- }
- LwpTable *pTable = pTableLayout->GetTable();
- return pTable;
-}
-/**
- * @short Set current cell layout to cell layout map
- * @param
- * @return
- */
-void LwpCellLayout::SetCellMap()
-{
- // this function is called from LwpTableLayout, so it can't be NULL
- GetTableLayout()->SetWordProCellMap(crowid, ccolid, this);
-}
-/**
- * @short Get actual width of this cell layout
- * @param
- * @return width (cm)
- */
-double LwpCellLayout::GetActualWidth()
-{
- //Get table layout
- LwpTableLayout * pTableLayout = GetTableLayout();
-
- if (pTableLayout == NULL)
- {
- return GetGeometryWidth();
- }
-
- OUString strColStyle = pTableLayout->GetColumnWidth(ccolid);
-
- XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- XFColStyle *pStyle = static_cast<XFColStyle *>(pXFStyleManager->FindStyle(strColStyle));
- if(pStyle)
- {
- return pStyle->GetWidth();
- }
-
- return GetGeometryWidth();
-}
-
-/**
- * @short Apply padding to cell style
- * @param pCellStyle - pointer of XFCellStyle
- * @return
- */
-void LwpCellLayout::ApplyPadding(XFCellStyle *pCellStyle)
-{
- double fLeft = GetMarginsValue(MARGIN_LEFT);
- double fRight = GetMarginsValue(MARGIN_RIGHT);
- double fTop = GetMarginsValue(MARGIN_TOP);
- double fBottom = GetMarginsValue(MARGIN_BOTTOM);
- pCellStyle->SetPadding((float)fLeft,(float)fRight,(float)fTop,(float)fBottom);
-}
-/**
- * @short Apply border to cell style according to cell position, default cell layout won't use this function
- * @param
- * @return pCellStyle - pointer of XFCellStyle
- */
-void LwpCellLayout::ApplyBorders(XFCellStyle *pCellStyle)
-{
- // judge cell border type
- LwpCellBorderType eType = GetCellBorderType(crowid, ccolid, GetTableLayout());
-
- // get left cell and judge if neighbour border is different
- XFBorders * pBorders = GetXFBorders();
- if(!pBorders)
- {
- return;
- }
-
- switch (eType)
- {
- case enumNoBottomBorder:
- pBorders->SetWidth(enumXFBorderBottom, 0);
- break;
- case enumNoLeftBorder:
- pBorders->SetWidth(enumXFBorderLeft, 0);
- break;
- case enumNoLeftNoBottomBorder:
- pBorders->SetWidth(enumXFBorderBottom, 0);
- pBorders->SetWidth(enumXFBorderLeft, 0);
- break;
- case enumWholeBorder:
- break;
- default:
- assert(sal_False);
- }
- pCellStyle->SetBorders(pBorders);
-}
-/**
- * @short Apply watermark to cell style
- * @param pCellStyle - pointer of XFCellStyle
- * @return
- */
-void LwpCellLayout::ApplyWatermark(XFCellStyle *pCellStyle)
-{
- XFBGImage* pBGImage = GetXFBGImage();
- if(pBGImage)
- {
- pCellStyle->SetBackImage(pBGImage);
- }
-}
-
-/**
- * @short Apply pattern fill to cell style
- * @param pCellStyle - pointer of XFCellStyle
- * @return
- */
-void LwpCellLayout::ApplyPatternFill(XFCellStyle* pCellStyle)
-{
- XFBGImage* pXFBGImage = this->GetFillPattern();
- if (pXFBGImage)
- {
- pCellStyle->SetBackImage(pXFBGImage);
- }
-}
-
-/**
- * @short Apply background to cell style
- * @param pCellStyle - pointer of XFCellStyle
- * @return
- */
-void LwpCellLayout::ApplyBackGround(XFCellStyle* pCellStyle)
-{
- if (this->IsPatternFill())
- {
- ApplyPatternFill(pCellStyle);
- }
- else
- {
- ApplyBackColor(pCellStyle);
- }
-}
-/**
- * @short Apply back color to cell style
- * @param pCellStyle - pointer of XFCellStyle
- * @return
- */
-void LwpCellLayout::ApplyBackColor(XFCellStyle *pCellStyle)
-{
- LwpColor* pColor = GetBackColor();
- if(pColor && pColor->IsValidColor())
- {
- XFColor aXFColor(pColor->To24Color());
- pCellStyle->SetBackColor(aXFColor);
- }
-}
-/**
- * @short register style of cell layout
- * @param pCellStyle The style of the cell, which would be applied to the cell.
- * @return
- */
-void LwpCellLayout::ApplyFmtStyle(XFCellStyle *pCellStyle)
-{
- LwpLayoutNumerics* pLayoutNumerics = dynamic_cast<LwpLayoutNumerics*>(cLayNumerics.obj());
- if (!pLayoutNumerics)
- {
- // if current layout doesn't have format, go to based on layout
- LwpCellLayout* pCellLayout = dynamic_cast<LwpCellLayout*>(m_BasedOnStyle.obj());
- if (pCellLayout)
- {
- pLayoutNumerics = dynamic_cast<LwpLayoutNumerics*>(pCellLayout->GetNumericsObject()->obj());
- }
- }
-
- // apply format style
- if (pLayoutNumerics)
- {
- XFStyle* pStyle = pLayoutNumerics->Convert();
- if (pStyle)
- {
- XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- m_NumfmtName = pXFStyleManager->AddStyle(pStyle)->GetStyleName();
- pCellStyle->SetDataStyle(m_NumfmtName);
- }
- }
-
- return;
-}
-/**
- * @short get style name according to cell position, only table default cells use this function
- * @param nRow - default cell position row number
- * @param nCol - default cell position col number
- * @return OUString - registered cell style name
- */
-OUString LwpCellLayout::GetCellStyleName(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout * pTableLayout)
-{
- // judge cell border type
- LwpCellBorderType eType = GetCellBorderType(nRow, nCol, pTableLayout);
- return m_CellStyleNames[eType];
-}
-/**
-* Make the XFCell
-* @date 03/26/2005
-* @param aTableID - ID of the table which this cell belongs to
-* @param bIsTopRow - whether current cell is top row
-* @param bIsRightCol - whether current cell is the rightest column
-* @return XFCell*
-*/
-XFCell* LwpCellLayout::ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uInt16 nCol)
-{
- // if cell layout is aTableID's default cell layout
- // it can't have any content, bypass these code
- LwpTable * pTable = dynamic_cast<LwpTable *>(aTableID.obj());
- if (!pTable)
- {
- assert(sal_False);
- return NULL;
- }
- XFCell * pXFCell = new XFCell();
- OUString aStyleName = m_StyleName;
-
- // if cell layout is aTableID's default cell layout
- // we should judt its style by current positon
- if (*pTable->GetDefaultCellStyle() == *GetObjectID())
- {
- aStyleName = GetCellStyleName(nRow, nCol, pTable->GetTableLayout());
- }
-
- // content of cell
- LwpStory* pStory = dynamic_cast<LwpStory*>(m_Content.obj());
- if (pStory)
- {
- pStory->XFConvert(pXFCell);
- }
-
- ApplyProtect(pXFCell, aTableID);
- pXFCell->SetStyleName(aStyleName);
- return pXFCell;
-}
-
-LwpPara* LwpCellLayout::GetLastParaOfPreviousStory()
-{
- LwpObjectID* pPreStoryID = this->GetPreviousCellStory();
- if (pPreStoryID && !(pPreStoryID->IsNull()))
- {
- LwpStory* pPreStory = dynamic_cast<LwpStory*>(pPreStoryID->obj(VO_STORY));
- return dynamic_cast<LwpPara*>(pPreStory->GetLastPara()->obj(VO_PARA));
- }
- else
- {
- return NULL;
- }
-}
-
-/**
- * @short Get previous cell which used for bullet inside cell
- * @param
- * @return LwpObjectID * - object ID of cell content story
- */
-LwpObjectID * LwpCellLayout::GetPreviousCellStory()
-{
- LwpTable *pTable = GetTable();
- if (!pTable)
- {
- assert(sal_False);
- return NULL;
- }
- sal_uInt16 nRow = crowid;
- sal_uInt16 nCol = ccolid;
-
- // if table is reset paragraph in columns, get cell on the top side of current cell
- if (pTable->IsNumberDown())
- {
- if (nRow == 0)
- {
- return NULL;
- }
- nRow -=1;
- }
- else
- {
- // if not, get cell on the left side of current cell
- if (nCol == 0)
- {
- if (nRow == 0)
- {
- return NULL;
- }
- else
- {
- nRow--;
- nCol = pTable->GetColumn() - 1;
- }
- }
- else
- {
- nCol -=1;
- }
- }
-
- // get the object id pointer of previous cell story
- LwpTableLayout * pTableLayout = GetTableLayout();
- if (!pTableLayout)
- {
- assert(sal_False);
- return NULL;
- }
- return pTableLayout->SearchCellStoryMap(nRow, nCol);
-}
-
-/**
- * @short judge border type by cell neighbour
- * @param nRow
- * @param nCol
- * @param pTableLayout
- * @return LwpCellBorderType
- */
-LwpCellBorderType LwpCellLayout::GetCellBorderType(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout * pTableLayout)
-{
- if (!pTableLayout)
- {
- assert(sal_False);
- return enumWholeBorder;
- }
-
- // get left cell and judge if neighbour border is different
- XFBorders * pBorders = GetXFBorders();
- if(!pBorders)
- {
- return enumWholeBorder;
- }
- XFBorder *pLeftBorder = pBorders->GetLeft();
- XFBorder *pBottomBorder = pBorders->GetBottom();
- sal_Bool bNoLeftBorder = sal_False;
- sal_Bool bNoBottomBorder = sal_False;
-
- LwpCellLayout * pLeftNeighbour = GetCellByRowCol(nRow, GetLeftColID(nCol), pTableLayout);
- if (pLeftNeighbour)
- {
- XFBorders * pNeighbourBorders = pLeftNeighbour->GetXFBorders();
- if (pNeighbourBorders)
- {
- XFBorder * pRightBorder = pNeighbourBorders->GetRight();
- if (*pLeftBorder == *pRightBorder)
- {
- // for these 2 types cell, left border should be ignored for sake of avoiding duplication border
- // but if left border is different with right border of left cell
- // we should not ignored it
- bNoLeftBorder = sal_True;
- }
- delete pNeighbourBorders;
- }
-
- }
-
- LwpCellLayout * pBelowNeighbour = GetCellByRowCol(GetBelowRowID(nRow), nCol, pTableLayout);
- if (pBelowNeighbour) //&& (eType == enumRightNotLastCellBorder || eType == enumLeftNotLastCellBorder) )
- {
- XFBorders * pBelowBorders = pBelowNeighbour->GetXFBorders();
- if (pBelowBorders)
- {
- XFBorder * pTopBorder = pBelowBorders->GetTop();
- if (*pTopBorder == *pBottomBorder)
- {
- // for these 2 types cell, bottom border should be ignored for sake of avoiding duplication border
- // but if bottom border is different with right border of left cell
- // we should not ignored it
- bNoBottomBorder = sal_True;
- }
- delete pBelowBorders;
- }
- }
-
- delete pBorders;
-
- if (bNoBottomBorder)
- {
- if (bNoLeftBorder)
- {
- return enumNoLeftNoBottomBorder;
- }
- return enumNoBottomBorder;
- }
- if (bNoLeftBorder)
- {
- return enumNoLeftBorder;
- }
- return enumWholeBorder;
-}
-
-/**
- * @short Get neighbour cell by specifying ROW+COL
- * @param nRow
- * @param nCol
- * @return LwpCellLayout *
- */
-LwpCellLayout * LwpCellLayout::GetCellByRowCol(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout * pTableLayout)
-{
- return pTableLayout->GetCellByRowCol(nRow, nCol);
-}
-/**
- * @short Register table's default cell layout
- * @param
- * @return
- */
-void LwpCellLayout::RegisterDefaultCell()
-{
- XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- for (sal_uInt16 eLoop = enumWholeBorder; eLoop < enumCellBorderTopLimit; eLoop++)
- {
- // register cell style
- XFCellStyle *pCellStyle = new XFCellStyle();
-
- ApplyPadding(pCellStyle);
- ApplyBackColor(pCellStyle);
- ApplyWatermark(pCellStyle);
- ApplyFmtStyle(pCellStyle);
- pCellStyle->SetAlignType(enumXFAlignNone, GetVerticalAlignmentType());
-
- XFBorders * pBorders = GetXFBorders();
- if (pBorders)
- {
- switch(eLoop)
- {
- case enumNoBottomBorder:
- // _
- //| |
- //
- // remove bottom line
- pBorders->SetWidth(enumXFBorderBottom, 0);
- break;
- case enumNoLeftNoBottomBorder:
- // _
- // |
- //
- // remove left and bottom
- pBorders->SetWidth(enumXFBorderLeft, 0);
- pBorders->SetWidth(enumXFBorderBottom, 0);
- break;
- case enumWholeBorder:
- //--
- //||
- //--
- // nothing to remove
- break;
- case enumNoLeftBorder:
- //
- //| |
- //--
- // remove left line
- pBorders->SetWidth(enumXFBorderLeft, 0);
- break;
- default:
- assert(sal_False);
- }
- pCellStyle->SetBorders(pBorders);
- }
- m_CellStyleNames[eLoop] = pXFStyleManager->AddStyle(pCellStyle)->GetStyleName();
- }
-}
-/**
- * @short Register 4 types of cell style and register content styles
- * @param
- * @param
- * @param
- * @return
- */
-void LwpCellLayout::RegisterStyle()
-{
- LwpVirtualLayout * pParent = dynamic_cast<LwpVirtualLayout *>(GetParent()->obj());
- if (!pParent || pParent->GetLayoutType() != LWP_ROW_LAYOUT)
- {
- // default cell layout, we must register 4 styles for it
- RegisterDefaultCell();
- return;
- }
-
- // register cell style
- XFCellStyle *pCellStyle = new XFCellStyle();
-
- ApplyPadding(pCellStyle);
-// ApplyBackColor(pCellStyle);
- ApplyBackGround(pCellStyle);
- ApplyWatermark(pCellStyle);
- ApplyFmtStyle(pCellStyle);
- ApplyBorders(pCellStyle);
-
- pCellStyle->SetAlignType(enumXFAlignNone, GetVerticalAlignmentType());
-
- XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- m_StyleName = pXFStyleManager->AddStyle(pCellStyle)->GetStyleName();
-
- // content object register styles
- LwpObject * pObj = m_Content.obj();
- if (pObj)
- {
- pObj->SetFoundry(m_pFoundry);
- pObj->RegisterStyle();
- }
-
- //register child layout style
- RegisterChildStyle();
-}
-/**
- * @short Read cell layout
- * @param
- * @return
- */
-void LwpCellLayout::Read()
-{
- LwpObjectStream* pStrm = m_pObjStrm;
-
- LwpMiddleLayout::Read();
-
- // before the layout hierarchy rework
- if (LwpFileHeader::m_nFileRevision < 0x000b)
- {
- assert(sal_False);
- }
- else
- {
- crowid = pStrm->QuickReaduInt16();
- ccolid = (sal_uInt8) pStrm->QuickReaduInt16(); // written as a lushort
-
- sal_uInt16 type;
-
- type = pStrm->QuickReaduInt16();
- pStrm->SkipExtra();
- cType = (LeaderDotType)type;
-
- cLayNumerics.ReadIndexed(pStrm);
- cLayDiagonalLine.ReadIndexed(pStrm);
-
- pStrm->SkipExtra();
- }
-}
-/**
- * @short Get leader char
- * @param none
- * @return char ascii, if none, return 0
- */
-sal_uInt8 LwpCellLayout::GetLeaderChar()
-{
- switch(cType)
- {
- case LDT_NONE:
- return 0;
- case LDT_DOTS:
- return '.';
- case LDT_DASHES:
- return '-';
- case LDT_UNDERSCORES:
- return '_';
- default:
- assert(sal_False);
- }
- return 0;
-}
-/**
-* Apply protect attribute to cell of table
-* @date 04/04/2005
-* @param aTableID - ID of the table which the cell belongs to
-* @param
-* @return XFCell*
-*/
-void LwpCellLayout::ApplyProtect(XFCell * pCell, LwpObjectID aTableID)
-{
- sal_Bool bProtected = sal_False;
- // judge current cell
- if (IsProtected())
- {
- bProtected = sal_True;
- }
- else
- {
- // judge base on
- LwpCellLayout * pBase = dynamic_cast<LwpCellLayout *>(m_BasedOnStyle.obj());
- if (pBase && pBase->IsProtected())
- {
- bProtected = sal_True;
- }
- else
- {
- // judge whole table
- LwpTable * pTable = dynamic_cast<LwpTable *>(aTableID.obj());
- LwpTableLayout * pTableLayout = static_cast<LwpTableLayout *>(pTable->GetTableLayout());
- LwpSuperTableLayout * pSuper = pTableLayout->GetSuperTableLayout();
- if (pSuper && pSuper->IsProtected())
- {
- bProtected = sal_True;
- }
- }
- }
-
- pCell->SetProtect(bProtected);
-}
-
-
-LwpConnectedCellLayout::LwpConnectedCellLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm)
- : LwpCellLayout(objHdr, pStrm)
-{}
-
-LwpConnectedCellLayout::~LwpConnectedCellLayout()
-{}
-/**
- * @short Set current connected cell layout to cell layout map
- * @param pCellLayoutMap - cell layout map reference
- * @return
- */
-void LwpConnectedCellLayout::SetCellMap()
-{
- // this function is called from LwpTableLayout, so it can't be NULL
- LwpTableLayout * pTableLayout = GetTableLayout();
- sal_uInt16 nRowSpan = m_nRealrowspan;
-
- for (sal_uInt16 iLoop = 0; iLoop < nRowSpan; iLoop ++)
- {
- for (sal_uInt16 jLoop = 0; jLoop < cnumcols; jLoop ++)
- pTableLayout->SetWordProCellMap(iLoop + crowid, jLoop + ccolid, this);
- }
-}
-
-/**
- * @short judge border type by cell neighbour
- * @param nRow
- * @param nCol
- * @param pTableLayout
- * @return LwpCellBorderType
- */
-LwpCellBorderType LwpConnectedCellLayout::GetCellBorderType(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout * pTableLayout)
-{
- if (!pTableLayout)
- {
- assert(sal_False);
- return enumWholeBorder;
- }
-
- sal_uInt16 nRowSpan = m_nRealrowspan;
-
- // get left cell and judge if neighbour border is different
- XFBorders * pBorders = GetXFBorders();
- if(!pBorders)
- {
- return enumWholeBorder;
- }
- XFBorder *pLeftBorder = pBorders->GetLeft();
- XFBorder *pBottomBorder = pBorders->GetBottom();
- sal_Bool bNoLeftBorder = sal_True;
- sal_Bool bNoBottomBorder = sal_True;
-
- if (nCol == 0)
- {
- bNoLeftBorder = sal_False;
- }
- else
- {
- for (sal_uInt16 iLoop=0; iLoop < nRowSpan; iLoop++)
- {
- LwpCellLayout * pLeftNeighbour = GetCellByRowCol(nRow+iLoop, GetLeftColID(nCol), pTableLayout);
- if (pLeftNeighbour)
- {
- XFBorders * pNeighbourBorders = pLeftNeighbour->GetXFBorders();
- if (pNeighbourBorders)
- {
- XFBorder * pRightBorder = pNeighbourBorders->GetRight();
- if (*pLeftBorder != *pRightBorder)
- {
- // if left border is different with right border of left cell
- // we should not ignored it
- bNoLeftBorder = sal_False;
- break;
- }
- delete pNeighbourBorders;
- }
- }
- }
- }
-
- if ( (nRow + nRowSpan) == pTableLayout->GetTable()->GetRow() )
- {
- bNoBottomBorder = sal_False;
- }
- else
- {
- for (sal_uInt16 iLoop = 0; iLoop < cnumcols; iLoop ++)
- {
- LwpCellLayout * pBelowNeighbour = GetCellByRowCol(nRow + nRowSpan, nCol+iLoop, pTableLayout);
- if (pBelowNeighbour)
- {
- XFBorders * pBelowBorders = pBelowNeighbour->GetXFBorders();
- if (pBelowBorders)
- {
- XFBorder * pTopBorder = pBelowBorders->GetTop();
- if (*pTopBorder != *pBottomBorder)
- {
- // if bottom border is different with right border of left cell
- // we should not ignored it
- bNoBottomBorder = sal_False;
- break;
- }
- delete pBelowBorders;
- }
- }
- }
- }
- delete pBorders;
-
- if (bNoBottomBorder)
- {
- if (bNoLeftBorder)
- {
- return enumNoLeftNoBottomBorder;
- }
- return enumNoBottomBorder;
- }
- if (bNoLeftBorder)
- {
- return enumNoLeftBorder;
- }
- return enumWholeBorder;
-}
-/**
- * @short Read connected cell layout
- * @param
- * @return
- */
-void LwpConnectedCellLayout::Read()
-{
- LwpCellLayout::Read();
- sal_uInt16 numcols;
-
- cnumrows = m_pObjStrm->QuickReaduInt16();
- numcols = m_pObjStrm->QuickReaduInt16(); // written as a lushort
- cnumcols = (sal_uInt8)numcols;
-
- m_nRealrowspan = cnumrows;
- m_nRealcolspan = cnumcols;
-
- m_pObjStrm->SkipExtra();
-}
-XFCell* LwpConnectedCellLayout::ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uInt16 nCol)
-{
- XFCell * pXFCell = LwpCellLayout::ConvertCell(aTableID, nRow, nCol);
- pXFCell->SetColumnSpaned(cnumcols);
-// if(!m_bSplitFlag)
-// {
-// }
- return pXFCell;
-}
-/**
- * @short parse connected cell layout
- * @param pOutputStream - output stream
- * @return
- */
- void LwpConnectedCellLayout::Parse(IXFStream* /*pOutputStream*/)
-{
-}
-
-LwpHiddenCellLayout::LwpHiddenCellLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm)
- : LwpCellLayout(objHdr, pStrm)
-{}
-
-LwpHiddenCellLayout::~LwpHiddenCellLayout()
-{}
-/**
- * @short Set current hidden cell layout to cell layout map
- * @param
- * @return
- */
-void LwpHiddenCellLayout::SetCellMap()
-{
- return;
-}
-/**
- * @short Read hidden cell layout
- * @param
- * @return
- */
-void LwpHiddenCellLayout::Read()
-{
- LwpCellLayout::Read();
-
- cconnectedlayout.ReadIndexed(m_pObjStrm);
- m_pObjStrm->SkipExtra();
-
-}
-/**
- * @short Convert hidden cell layout
- * @param aTableID - Object ID of table
- * @return XFCell * - pointer to converted cell
- */
-
-XFCell* LwpHiddenCellLayout::ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uInt16 nCol)
-{
- if (!cconnectedlayout.obj())
- return NULL;
- LwpConnectedCellLayout* pConnCell = dynamic_cast<LwpConnectedCellLayout* >(cconnectedlayout.obj());
-
- if (nRow < (pConnCell->GetNumrows()+pConnCell->GetRowID()))
- return NULL;
- // if the hidden cell should be displayed for limit of SODC
- // use the default cell layout
- XFCell* pXFCell = NULL;
- LwpTable *pTable = dynamic_cast<LwpTable *>(aTableID.obj());
- if (pTable)
- {
- LwpCellLayout *pDefault = dynamic_cast<LwpCellLayout *>(pTable->GetDefaultCellStyle()->obj());
- if (pDefault)
- {
- pXFCell = pDefault->ConvertCell(aTableID, nRow, nCol);
- }
- else
- {
- pXFCell = pConnCell->ConvertCell(aTableID, nRow, nCol);
- }
- pXFCell->SetColumnSpaned(pConnCell->GetNumcols());
- }
- else
- {
- assert(sal_False);
- }
- return pXFCell;
-}
-/**
- * @short parse hidden cell layout
- * @param pOutputStream - output stream
- * @return
- */
- void LwpHiddenCellLayout::Parse(IXFStream* /*pOutputStream*/)
-{
-}
-
-
-LwpParallelColumnsBlock::LwpParallelColumnsBlock(LwpObjectHeader &objHdr, LwpSvStream* pStrm):LwpCellLayout(objHdr, pStrm)
-{}
-
-LwpParallelColumnsBlock::~LwpParallelColumnsBlock()
-{}
-
-void LwpParallelColumnsBlock::Read()
-{
- LwpCellLayout::Read();
- m_pObjStrm->SkipExtra();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpcelllayout.hxx b/lotuswordpro/source/filter/lwpcelllayout.hxx
deleted file mode 100644
index f9705c971..000000000
--- a/lotuswordpro/source/filter/lwpcelllayout.hxx
+++ /dev/null
@@ -1,212 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * The Contents of this file are made available subject to the terms of
- * either of the following licenses
- *
- * - GNU Lesser General Public License Version 2.1
- * - Sun Industry Standards Source License Version 1.1
- *
- * Sun Microsystems Inc., October, 2000
- *
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2000 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- *
- * Sun Industry Standards Source License Version 1.1
- * =================================================
- * The contents of this file are subject to the Sun Industry Standards
- * Source License Version 1.1 (the "License"); You may not use this file
- * except in compliance with the License. You may obtain a copy of the
- * License at http://www.openoffice.org/license.html.
- *
- * Software provided under this License is provided on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- * See the License for the specific provisions governing your rights and
- * obligations concerning the Software.
- *
- * The Initial Developer of the Original Code is: IBM Corporation
- *
- * Copyright: 2008 by IBM Corporation
- *
- * All Rights Reserved.
- *
- * Contributor(s): _______________________________________
- *
- *
- ************************************************************************/
-/**
- * @file
- * For LWP filter architecture prototype - cell layouts
- */
-/*************************************************************************
- * Change History
- Mar 2005 Created
- ************************************************************************/
-#ifndef _LWPCELLLAYOUT_HXX
-#define _LWPCELLLAYOUT_HXX
-#include <vector>
-#include <map>
-#include "lwplayout.hxx"
-#include "lwptablelayout.hxx"
-
-typedef enum
-{
- enumWholeBorder = 0,
- enumNoLeftBorder,
- enumNoBottomBorder,
- enumNoLeftNoBottomBorder,
- enumCellBorderTopLimit = 4,
-} LwpCellBorderType;
-
-
-class XFCell;
-class XFCellStyle;
-class LwpCellList;
-class LwpTable;
-class LwpTableLayout;
-/**
- * @brief
- * VO_CELLLAYOUT object
- */
-class LwpCellLayout : public LwpMiddleLayout
-{
-public:
- LwpCellLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
- virtual ~LwpCellLayout();
- virtual LWP_LAYOUT_TYPE GetLayoutType () { return LWP_CELL_LAYOUT;}
- virtual XFCell* ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uInt16 nCol);
- sal_uInt16 GetRowID(){return crowid;}
- sal_uInt8 GetColID(){return ccolid;}
- void RegisterStyle();
- LwpObjectID * GetNumericsObject() {return &cLayNumerics;}
- LwpObjectID * GetPreviousCellStory();
- virtual LwpPara* GetLastParaOfPreviousStory();
- LwpTableLayout * GetTableLayout();
- virtual void SetCellMap(void);
- double GetActualWidth();
- sal_uInt8 GetLeaderChar();
- OUString GetNumfmtName(){return m_NumfmtName;}
-protected:
- void Read();