Issue 106421 - Split svx module
Summary: Split svx module
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: OOO320m2
Hardware: Unknown All
: P3 Trivial (vote)
Target Milestone: OOo 3.3
Assignee: Mathias_Bauer
QA Contact: issues@framework
Depends on:
Reported: 2009-10-29 10:33 UTC by Mathias_Bauer
Modified: 2017-05-20 10:29 UTC (History)
4 users (show)

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


Note You need to log in before you can comment on or make changes to this issue.
Description Mathias_Bauer 2009-10-29 10:33:23 UTC
The svx module delivers four libraries. Two of them are apparently well
separated from the others, so it makes sense to move them out of the module. If
they stayed inside the separation would rot over time, as experience shows.

Plan is to move source/cui into an own module and source/msfilter also into an
own module or to a sub folder in oox.
Comment 1 eric.bachard 2009-10-29 20:24:09 UTC
Comment 2 Mathias_Bauer 2009-10-30 13:20:41 UTC
Perhaps moving msfilterlib to module "filter" also is an option; it would keep
the oox module clean of "binary" stuff.
Comment 3 Mathias_Bauer 2009-10-30 22:00:51 UTC
@ericb: if you find that interesting you might be interested in my split of
svtools in two libraries and the changes I could do after that. Amongst others
this is tracked in issue 103496.
Comment 4 Mathias_Bauer 2009-10-30 22:26:01 UTC
cui split done. List of changes:

M inc/fmhelp.hrc	some HIDs removed for cui
M inc/galctrl.hxx	New method “SetGraphic( const InetURLObject& ) to avoid export
of RIDs
M inc/gallery.hrc	some defines removed as they are used in cui only
M inc/gallery1.hxx	Made IsDefault non-inline (RIDs in Header files are evil)
M inc/galmisc.hxx	now exported header (for cui); added define of ExchangeData
and SgaObjKind; removed some includes to get a minimum of headers exported
M inc/galobj.hxx	SgaObjKind moved to galmisc.hxx
M inc/galtheme.hxx	now exported (for cui); made some method non-inline so that
GalThemeEntry does not need to be exported too; added method to fill all Themes
into listbox without exporting the RIDs of the necessary strings
M inc/helpid.hrc	some defines removed as they are used in cui only
M inc/svx/dlgctrl.hxx	added method to fill LineStyleListBox to avoid using the
same bitmap resource in svx (tbxctrls/itemwin.cxx) and cui (tpline.cxx)
M inc/svx/svxdlg.hxx	removed some integer parameters to avoid using RIDs from
cui; added dtor to force generation of typeinfo in svx 
M inc/unolingu.hxx	missing SVXDLL_EXPORT
M inc/xattr.hxx	now exported (for cui)
M prj/build.lst	no cui and msfilter folder
M prj/d.lst	some more exported headers; headers now sorted alphabetically to
help analysis
M source/customshapes/EnhancedCustomShape2d.cxx	some fixes for exporting of headers
M source/customshapes/EnhancedCustomShape2d.hxx	some fixes for exporting of headers
M source/customshapes/EnhancedCustomShapeFunctionParser.cxx	some fixes for
exporting of headers
M source/dialog/dlgctrl.cxx	added method to fill LineStyleListBox to avoid using
the same bitmap resource in svx (tbxctrls/itemwin.cxx) and cui (tpline.cxx)
M source/dialog/hyperdlg.cxx	removed include of hrc (now in cui)
M source/dialog/	removed stuff moved to cui; removed superfluous
generation of cuilib.hxx and dependency of svxdlg.cxx on it
M source/dialog/svxdlg.cxx	added dtor to force generation of typeinfo in svx 
M source/fmcomp/fmgridcl.cxx	no RID needed anymore for dialog creation
M source/fmcomp/	showcols.src moved to cui
M source/form/fmshell.cxx	no RID needed anymore for dialog creation
M source/form/fmsrcimp.cxx	removed include of fmsearch.hrc (moved to cui)
M source/form/	removed fmsearch.src and tbxform.src (moved to cui)
M source/form/navigatortree.cxx	added include 
M source/form/navigatortreemodel.cxx	added include 
M source/gallery2/galbrws1.cxx	no RIDs in dialog creation calls
M source/gallery2/galbrws2.cxx	no RIDs in dialog creation calls
M source/gallery2/galctrl.cxx	New method “SetGraphic( const InetURLObject& ) to
avoid export of RIDs
M source/gallery2/galexpl.cxx	added include 
M source/gallery2/gallery.src	moved many resources to cui
M source/gallery2/gallery1.cxx	Made IsDefault non-inline (RIDs in Header files
are evil)
M source/gallery2/galtheme.cxx	made some method non-inline so that GalThemeEntry
does not need to be exported too; added method to fill all Themes into listbox
without exporting the RIDs of the necessary strings
M source/gengal/gengal.cxx	how did that ever compile?! Namespace clash between
rtl::Reference and css::uno::Reference fixed
M source/inc/fmresids.hrc	some RIDs moved to cui
M source/inc/fmsrcimp.hxx	now exported (for cui)
M source/inc/fmtools.hxx	now exported (for cui)
M source/options/	moved most resources and optlingu.cxx to cui
M source/tbxctrls/itemwin.cxx	use new base class method to fill linestyle listbox
M source/unogallery/unogalitem.cxx	added include
M util/hidother.src	HID_GALLERY_PREVIEW not in resource file anymore
M util/	cui and removed
A inc/svx/EnhancedCustomShapeFunctionParser.hxx	now exported; moved from parent
R inc/EnhancedCustomShapeFunctionParser.hxx	moved to sub folder

svx                             cui

R inc/connect.hrc	A source/tabpages/connect.hrc
R inc/countryid.hxx	A inc/oox/binaryformat/countryid.hxx
R inc/defdlgname.hxx	A source/inc/defdlgname.hxx
R inc/galdlg.hxx	removed (obsolete now); ExchangeData now in galmisc.hxx
R inc/hlmarkwn_def.hxx	A source/inc/hlmarkwn_def.hxx
R inc/mscodec.hxx	A inc/oox/binaryformat/mscodec.hxx
R inc/msoleexp.hxx	A inc/oox/binaryformat/msoleexp.hxx
R inc/multipat.hrc	A source/dialogs/multipat.hrc
R inc/optaccessibility.hrc	A source/options/optaccessibility.hrc
R inc/optasian.hrc	A source/options/optasian.hrc
R inc/optcolor.hrc	A source/options/optcolor.hrc
R inc/optctl.hrc	A source/options/optctl.hrc
R inc/optgenrl.hrc	A source/options/optgenrl.hrc
R inc/optimprove.hrc	A source/options/optimprove.hrc
R inc/optinet2.hrc	A source/options/optinet2.hrc
R inc/optjsearch.hrc	A source/options/optjsearch.hrc
R inc/optpath.hrc	A source/options/optpath.hrc
R inc/optsave.hrc	A source/options/optsave.hrc
R inc/optspell.hrc	A source/options/optspell.hrc
R inc/radiobtnbox.hxx	A source/inc/radiobtnbox.hxx
R inc/svx/optimprove.hxx	A source/inc/optimprove.hxx
R inc/svx/optlingu.hxx	A source/inc/optlingu.hxx
R source/dialog/hyperdlg.src	A source/dialogs/hyperdlg.src
R source/dialog/radiobtnbox.cxx	A source/options/radiobtnbox.cxx
R source/fmcomp/showcols.src	A source/dialogs/showcols.src
R source/form/fmsearch.src	A source/dialogs/fmsearch.src
R source/form/tbxform.src	A source/dialogs/tbxform.src
R source/inc/SpellDialog.hxx	A source/inc/SpellDialog.hxx
R source/inc/eventdlg.hxx	A source/customize/eventdlg.hxx
R source/inc/fmsearch.hrc	A source/dialogs/fmsearch.hrc
R source/inc/hlmarkwn.hrc	A source/dialogs/hlwarkwn.hrc
R source/inc/hlmarkwn.hxx	A source/inc/hlmarkwn.hxx
R source/inc/hyperdlg.hrc	A source/dialogs/hyperdlg.hrc
R source/inc/macropg_impl.hxx	A source/customize/macropg_impl.hxx
R source/inc/optchart.hrc	A source/options/optchart.hrc
R source/inc/optdict.hrc	A source/options/optdict.hrc
R source/options/multipat.src	A source/dialogs/multipat.src
R source/options/optaccessibility.src	A source/options/optaccessibility.src
R source/options/optasian.src	A source/options/optasian.src
R source/options/optchart.src	A source/options/optchart.src
R source/options/optcolor.src	A source/options/optcolor.src
R source/options/optctl.src	A source/options/optctl.src
R source/options/optdict.src	A source/options/optdict.src
R source/options/optgenrl.src	A source/options/optgenrl.src
R source/options/optimprove.src	A source/options/optimprove.src
R source/options/optinet2.src	A source/options/optinet2.src
R source/options/optjsearch.src	A source/options/optjsearch.src
R source/options/optlingu.cxx	A source/options/optlingu.cxx
R source/options/optlingu.hrc	A source/options/optlingu.hrc
R source/options/optlingu.src	A source/options/optlingu.src
R source/options/optpath.src	A source/options/optpath.src
R source/options/optsave.src	A source/options/optsave.src
R source/options/optspell.src	A source/options/optspell.src

R source/cui	                now in cui/
Comment 5 Mathias_Bauer 2009-10-30 22:29:30 UTC
Many resources have been moved (saves ~250 KB memory in startup) that prior to
that still have been in source/dialogs and source/options, also a lot of hrc files.

The only code I could move easily was radiobtnbox.cxx; more investigations in
source/dialogs might reveal more possible saves.
Comment 6 Mathias_Bauer 2009-10-30 23:59:11 UTC
This was an interesting experience, the old build was quite hacky and just
worked because the cui library used svx-internal headers. Moving cui out
revealed that. So the gallery stuff needed to be changed a little bit to avoid
exporting nearly everything (the headers were not well separated) and to avoid
to access its resource IDs directly.

Another interesting effect: the developers who createrd the cuilib in the first
place "forgot" to #undef the SVX_DLLIMPLEMENTATION when the dialog factory was
compiled, so the type info of the base class (the SvxAbstractDialogFactory
interface) was compiled into the svx lib by accident. Without that define set
now the symbol "typeinfo of SvxDialogFactory" was missing. That could be fixed
by explicitly adding a dtor to this interface (that otherwise would be created
anyway, but not exported).
Comment 7 Mathias_Bauer 2009-11-01 13:22:22 UTC
Here's the list of changes for the msfilter move:

M filter/prj/d.lst	new source/msfilter
M solenv/inc/	lib renamed svxmsfilter->msfilter
R svx/source/msfilter/*	moved to filter module
M svx/source/svdraw/	svdfppt.cxx moved to filter module
R svx/source/svdraw/svdfppt.cxx	moved to filter module
M svx/inc/svx/msdffdef.hxx	all real code moved to msdffimp.hxx, only defines left
R svx/inc/countryid.hxx	moved to filter module
R svx/inc/mscodec.hxx	moved to filter module
R svx/inc/msoleexp.hxx	moved to filter module
R svx/inc/svx/escherex.hxx	moved to filter module
R svx/inc/svx/msdffimp.hxx	moved to filter module
R svx/inc/svx/msfiltertracer.hxx	moved to filter module
R svx/inc/svx/msocximex.hxx	moved to filter module
R svx/inc/svx/svdfppt.hxx	moved to filter module
R svx/inc/svxmsbas.hxx	moved to filter module
M svx/prj/build.lst	source/msfilter moved to filter module
M svx/util/	msfilterlib moved to filter module
M sc/source/filter/excel/excimp8.cxx	includes changed
M sc/source/filter/excel/excrecds.cxx	includes changed
M sc/source/filter/excel/expop2.cxx	includes changed
M sc/source/filter/excel/impop.cxx	includes changed
M sc/source/filter/excel/xechart.cxx	includes changed
M sc/source/filter/excel/xestream.cxx	includes changed
M sc/source/filter/excel/xlchart.cxx	includes changed
M sc/source/filter/excel/xltracer.cxx	includes changed
M sc/source/filter/inc/xcl97esc.hxx	includes changed
M sc/source/filter/inc/xestream.hxx	includes changed
M sc/source/filter/inc/xiescher.hxx	includes changed
M sc/source/filter/inc/xistream.hxx	includes changed
M sc/source/filter/xcl97/xcl97esc.cxx	includes changed
M sc/source/filter/xcl97/xcl97rec.cxx	includes changed
M sc/source/ui/docshell/docsh.cxx	includes changed
M sc/util/	lib renamed svxmsfilter->msfilter
M sd/source/filter/eppt/eppt.cxx	includes changed; new C function for SaveVBA
M sd/source/filter/eppt/eppt.hxx	includes changed
M sd/source/filter/eppt/escherex.hxx	includes changed
M sd/source/filter/eppt/pptexanimations.hxx	includes changed
M sd/source/filter/ppt/pptatom.hxx	includes changed
M sd/source/filter/ppt/pptin.cxx	includes changed
M sd/source/filter/ppt/pptin.hxx	includes changed
M sd/source/filter/ppt/pptinanimations.hxx	includes changed
M sd/source/filter/sdpptwrp.cxx	includes changed; new C function for SaveVBA
M sd/source/ui/docshell/docshel4.cxx	removed superfluous include of svxmsbas.hxx
M sd/util/	lib renamed svxmsfilter->msfilter
M sd/util/	new C function for SaveVBA
M sw/inc/shellio.hxx	new functions vor SaveOrDelVBA and GetSaveWarning
M sw/source/filter/basflt/fltini.cxx	new functions vor SaveOrDelVBA and
M sw/source/filter/ww8/escher.hxx	includes changed
M sw/source/filter/ww8/tracer.cxx	includes changed
M sw/source/filter/ww8/wrtww8.cxx	includes changed; new functions vor
SaveOrDelVBA and GetSaveWarning
M sw/source/filter/ww8/wrtww8.hxx	includes changed
M sw/source/filter/ww8/wrtww8gr.cxx	includes changed
M sw/source/filter/ww8/ww8graf.cxx	includes changed
M sw/source/filter/ww8/ww8graf2.cxx	includes changed
M sw/source/filter/ww8/ww8par.cxx	includes changed
M sw/source/filter/ww8/ww8par.hxx	includes changed
M sw/source/filter/ww8/ww8par3.cxx	includes changed
M sw/source/filter/ww8/ww8par4.cxx	includes changed
M sw/source/ui/app/docsh.cxx	includes changed
M sw/util/	lib renamed svxmsfilter->msfilter
M sw/util/	new functions vor SaveOrDelVBA and GetSaveWarning
Comment 8 Mathias_Bauer 2009-11-01 13:28:17 UTC
I moved all code in msdffdef.hxx into msdffimp.hxx, only some #defines stayed
there as svx/source/customshapes uses them.

I moved the svxmsbas completely into msfilter and dropped msfilter-core.
In sd and sw I had to add some wrapper functions and external C functions in
their filter libs (the same way as the import and export functions have been

I didn't move the rtf code into the filter library as it was only one source
(the graphics part) file anyway and this code will be replaced by some new code
in writerfilter sooner or later, so the rtf code now is part of svx-core
completely, not only 2 of 3 files.
Comment 9 eric.bachard 2009-11-02 05:17:07 UTC

Sorry for the delay. Yes, I'm highly interested, and your work is impressive ( I
have added me o CC of issue #103496 too). Glad to see actions in this direction ! 

My problem is, I just won't be able to contribute on that before thursday (so in
3 days), but you can count on me if you need to test, or even experiment, say
contribute. FYI, we present the build system as ClassRooms, and I'd see well you
conclude the cycle - its currently question of 2 or 3 ClassRooms about the build
system-  explaining what you are doing (our logs are read a lot, and very visible).

Comment 10 Mathias_Bauer 2009-11-02 19:40:38 UTC
forgot one changed file for msfilter move:

M filer/prj/build.lst               new msfilter folder
Comment 11 Mathias_Bauer 2009-11-02 19:46:24 UTC
Here's the list of all changes for the resource library split. Main principle
was to make as few defines publicly available as possible and make sure that all
code accessing resources moved into the cui resource that are still public works
I moved all defines in svx/dialogs.hrc that where used only in cui into
I commented all defines that are used in svx (or other modules) and cui accordingly.

Here the changes to get rid of some unneccessary defines:

M reportdesign/source/ui/misc/UITools.cxx
M reportdesign/source/ui/report/ReportController.cxx
M sc/source/ui/app/scmod.cxx
M sc/source/ui/drawfunc/drawsh.cxx
M sc/source/ui/drawfunc/drawsh5.cxx
M sc/source/ui/drawfunc/drtxtob.cxx
M sc/source/ui/miscdlgs/redcom.cxx
M sc/source/ui/view/prevwsh.cxx
M sc/source/ui/view/tabvwsh3.cxx
M sd/source/ui/docshell/docshel2.cxx
M sd/source/ui/func/fuarea.cxx
M sd/source/ui/func/fuline.cxx
M sd/source/ui/func/fulinend.cxx
M sd/source/ui/func/fuscale.cxx
M sd/source/ui/func/futransf.cxx
M sd/source/ui/func/futxtatt.cxx
M sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
M sd/source/ui/view/drviews2.cxx
M sd/source/ui/view/drviewsc.cxx
M sd/source/ui/view/sdview2.cxx
M starmath/source/view.cxx
M sw/source/ui/envelp/mailmrge.cxx
M sw/source/ui/misc/glossary.cxx
M sw/source/ui/shells/drawdlg.cxx
M sw/source/ui/shells/drwbassh.cxx
M sw/source/ui/shells/drwtxtsh.cxx
M sw/source/ui/shells/frmsh.cxx
M sw/source/ui/shells/textfld.cxx
M sw/source/ui/uiview/pview.cxx
M sw/source/ui/uiview/view2.cxx

the new library in scp2:

M scp2/source/ooo/file_library_ooo.scp
M scp2/source/ooo/file_resource_ooo.scp
M scp2/source/ooo/module_lang_template.scp

moving resources and defines to cui:

M svx/inc/svx/dialogs.hrc
M svx/inc/svx/svxdlg.hxx
M svx/inc/svx/svxids.hrc
M svx/source/dialog/grfflt.cxx
M svx/source/dialog/hangulhanja.cxx
M svx/source/dialog/hdft.cxx
M svx/source/dialog/
M svx/source/dialog/sdstring.src
M svx/source/dialog/srchdlg.cxx
M svx/source/items/
M svx/source/svdraw/svdedtv2.cxx
A cui/source/factory/cuiresmgr.cxx
A cui/source/inc/cuires.hrc
A cui/source/inc/dialmgr.hxx
A cui/source/tabpages/frmdirlbox.src
A cui/source/tabpages/strings.src
A svx/source/dialog/svxbmpnumvalueset.src
A svx/source/items/page.src
R svx/source/dialog/frmdirlbox.src
Comment 12 Mathias_Bauer 2009-11-09 14:08:39 UTC
Added dependency on "filter" for all application modules.
Comment 13 Mathias_Bauer 2009-12-03 10:12:09 UTC
Obviously done.