diff options
author | Thorsten Behrens <tbehrens@novell.com> | 2011-03-12 02:42:58 +0100 |
---|---|---|
committer | Thorsten Behrens <tbehrens@novell.com> | 2011-03-12 02:42:58 +0100 |
commit | e65c0fe553a9d1b85dcacfff7af9df8231427876 (patch) | |
tree | 250636f82248275ef5c1d491e58e4e3cf136cdff /svx/workben | |
parent | 35fbb45086c389f91c0d6ff410d814f7567c1ceb (diff) | |
parent | 4fba42e5f98fcc0fa9addf41a793c1d7f11602c8 (diff) |
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
Conflicts:
avmedia/inc/avmedia/mediaitem.hxx
avmedia/prj/build.lst
avmedia/source/framework/mediaitem.cxx
avmedia/source/gstreamer/gstcommon.hxx
avmedia/source/gstreamer/gstframegrabber.cxx
avmedia/source/gstreamer/gstframegrabber.hxx
avmedia/source/gstreamer/gstmanager.cxx
avmedia/source/gstreamer/gstmanager.hxx
avmedia/source/gstreamer/gstplayer.cxx
avmedia/source/gstreamer/gstplayer.hxx
avmedia/source/gstreamer/gstuno.cxx
avmedia/source/gstreamer/gstwindow.cxx
avmedia/source/gstreamer/gstwindow.hxx
avmedia/source/gstreamer/makefile.mk
avmedia/source/quicktime/quicktimeuno.cxx
avmedia/source/viewer/mediawindow.cxx
avmedia/source/viewer/mediawindow_impl.cxx
avmedia/source/viewer/mediawindow_impl.hxx
avmedia/source/viewer/mediawindowbase_impl.cxx
avmedia/source/win/winuno.cxx
basic/inc/basic/basmgr.hxx
basic/inc/basic/mybasic.hxx
basic/inc/basic/process.hxx
basic/inc/basic/sbmeth.hxx
basic/inc/basic/sbmod.hxx
basic/inc/basic/sbxdef.hxx
basic/inc/basic/sbxvar.hxx
basic/source/app/app.cxx
basic/source/app/app.hxx
basic/source/app/appbased.cxx
basic/source/app/appedit.cxx
basic/source/app/appwin.cxx
basic/source/app/appwin.hxx
basic/source/app/brkpnts.cxx
basic/source/app/brkpnts.hxx
basic/source/app/dialogs.cxx
basic/source/app/dialogs.hxx
basic/source/app/msgedit.cxx
basic/source/app/mybasic.cxx
basic/source/app/process.cxx
basic/source/app/processw.hxx
basic/source/app/textedit.cxx
basic/source/basmgr/basicmanagerrepository.cxx
basic/source/basmgr/basmgr.cxx
basic/source/classes/disas.cxx
basic/source/classes/eventatt.cxx
basic/source/classes/image.cxx
basic/source/classes/sb.cxx
basic/source/classes/sbunoobj.cxx
basic/source/classes/sbxmod.cxx
basic/source/comp/codegen.cxx
basic/source/comp/dim.cxx
basic/source/comp/exprgen.cxx
basic/source/comp/exprnode.cxx
basic/source/comp/exprtree.cxx
basic/source/comp/sbcomp.cxx
basic/source/inc/expr.hxx
basic/source/inc/object.hxx
basic/source/inc/sbunoobj.hxx
basic/source/runtime/dllmgr-x86.cxx
basic/source/runtime/iosys.cxx
basic/source/runtime/makefile.mk
basic/source/runtime/methods.cxx
basic/source/runtime/methods1.cxx
basic/source/runtime/runtime.cxx
basic/source/runtime/stdobj.cxx
basic/source/runtime/step0.cxx
basic/source/runtime/step1.cxx
basic/source/runtime/step2.cxx
basic/source/sbx/sbxarray.cxx
basic/source/sbx/sbxbase.cxx
basic/source/sbx/sbxbool.cxx
basic/source/sbx/sbxbyte.cxx
basic/source/sbx/sbxcoll.cxx
basic/source/sbx/sbxconv.hxx
basic/source/sbx/sbxcurr.cxx
basic/source/sbx/sbxexec.cxx
basic/source/sbx/sbxint.cxx
basic/source/sbx/sbxobj.cxx
basic/source/sbx/sbxscan.cxx
basic/source/sbx/sbxstr.cxx
basic/source/sbx/sbxvals.cxx
basic/source/sbx/sbxvalue.cxx
basic/source/sbx/sbxvar.cxx
basic/workben/mgrtest.cxx
configmgr/prj/build.lst
configmgr/source/access.cxx
configmgr/source/configurationprovider.cxx
configmgr/source/defaultprovider.cxx
configmgr/source/pad.cxx
configmgr/source/services.cxx
configmgr/source/update.cxx
configmgr/source/xmlreader.cxx
configmgr/source/xmlreader.hxx
connectivity/prj/build.lst
connectivity/qa/complex/connectivity/TestCase.java
connectivity/source/cpool/Zregistration.cxx
connectivity/source/drivers/adabas/Bservices.cxx
connectivity/source/drivers/ado/Aservices.cxx
connectivity/source/drivers/calc/Cservices.cxx
connectivity/source/drivers/calc/makefile.mk
connectivity/source/drivers/dbase/DIndex.cxx
connectivity/source/drivers/dbase/DIndexIter.cxx
connectivity/source/drivers/dbase/DNoException.cxx
connectivity/source/drivers/dbase/DTable.cxx
connectivity/source/drivers/dbase/Dservices.cxx
connectivity/source/drivers/dbase/dindexnode.cxx
connectivity/source/drivers/evoab/LNoException.cxx
connectivity/source/drivers/evoab/LServices.cxx
connectivity/source/drivers/evoab2/NServices.cxx
connectivity/source/drivers/file/FNoException.cxx
connectivity/source/drivers/file/FPreparedStatement.cxx
connectivity/source/drivers/file/FResultSet.cxx
connectivity/source/drivers/file/FStatement.cxx
connectivity/source/drivers/file/quotedstring.cxx
connectivity/source/drivers/flat/ETable.cxx
connectivity/source/drivers/flat/Eservices.cxx
connectivity/source/drivers/hsqldb/Hservices.cxx
connectivity/source/drivers/jdbc/jservices.cxx
connectivity/source/drivers/kab/KServices.cxx
connectivity/source/drivers/macab/MacabServices.cxx
connectivity/source/drivers/mozab/MResultSet.cxx
connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
connectivity/source/drivers/mysql/Yservices.cxx
connectivity/source/drivers/odbc/OFunctions.cxx
connectivity/source/drivers/odbc/oservices.cxx
connectivity/source/inc/dbase/DIndexPage.hxx
connectivity/source/inc/file/FTable.hxx
connectivity/source/manager/mregistration.cxx
connectivity/source/parse/PColumn.cxx
desktop/prj/build.lst
desktop/qa/deployment_misc/test_dp_version.cxx
desktop/source/app/app.cxx
desktop/source/app/appfirststart.cxx
desktop/source/app/cmdlineargs.cxx
desktop/source/app/cmdlineargs.hxx
desktop/source/app/sofficemain.cxx
desktop/source/deployment/gui/dp_gui.hrc
desktop/source/deployment/gui/dp_gui_dialog2.cxx
desktop/source/deployment/gui/dp_gui_dialog2.hxx
desktop/source/deployment/gui/dp_gui_updatedialog.cxx
desktop/source/deployment/gui/dp_gui_updatedialog.hxx
desktop/source/deployment/manager/dp_extensionmanager.cxx
desktop/source/deployment/manager/dp_extensionmanager.hxx
desktop/source/deployment/misc/dp_misc.src
desktop/source/deployment/registry/component/dp_component.cxx
desktop/source/deployment/registry/configuration/dp_configuration.cxx
desktop/source/deployment/registry/dp_backend.cxx
desktop/source/deployment/registry/help/dp_help.cxx
desktop/source/deployment/registry/script/dp_script.cxx
desktop/source/migration/pages.cxx
desktop/source/migration/pages.hxx
desktop/source/migration/wizard.cxx
desktop/source/migration/wizard.hrc
desktop/source/migration/wizard.hxx
desktop/source/migration/wizard.src
desktop/source/pkgchk/unopkg/unopkg_shared.h
desktop/source/so_comp/services.cxx
desktop/source/splash/makefile.mk
desktop/source/splash/services_spl.cxx
desktop/source/splash/splash.cxx
drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
editeng/inc/editeng/adjitem.hxx
editeng/inc/editeng/bolnitem.hxx
editeng/inc/editeng/borderline.hxx
editeng/inc/editeng/boxitem.hxx
editeng/inc/editeng/brkitem.hxx
editeng/inc/editeng/brshitem.hxx
editeng/inc/editeng/bulitem.hxx
editeng/inc/editeng/charreliefitem.hxx
editeng/inc/editeng/charrotateitem.hxx
editeng/inc/editeng/charscaleitem.hxx
editeng/inc/editeng/cmapitem.hxx
editeng/inc/editeng/colritem.hxx
editeng/inc/editeng/crsditem.hxx
editeng/inc/editeng/editdata.hxx
editeng/inc/editeng/editeng.hxx
editeng/inc/editeng/editobj.hxx
editeng/inc/editeng/editstat.hxx
editeng/inc/editeng/editview.hxx
editeng/inc/editeng/emphitem.hxx
editeng/inc/editeng/escpitem.hxx
editeng/inc/editeng/fhgtitem.hxx
editeng/inc/editeng/flstitem.hxx
editeng/inc/editeng/fontitem.hxx
editeng/inc/editeng/frmdiritem.hxx
editeng/inc/editeng/fwdtitem.hxx
editeng/inc/editeng/hyznitem.hxx
editeng/inc/editeng/kernitem.hxx
editeng/inc/editeng/langitem.hxx
editeng/inc/editeng/lrspitem.hxx
editeng/inc/editeng/lspcitem.hxx
editeng/inc/editeng/numitem.hxx
editeng/inc/editeng/outliner.hxx
editeng/inc/editeng/paravertalignitem.hxx
editeng/inc/editeng/pmdlitem.hxx
editeng/inc/editeng/postitem.hxx
editeng/inc/editeng/protitem.hxx
editeng/inc/editeng/shaditem.hxx
editeng/inc/editeng/sizeitem.hxx
editeng/inc/editeng/svxacorr.hxx
editeng/inc/editeng/svxfont.hxx
editeng/inc/editeng/svxrtf.hxx
editeng/inc/editeng/swafopt.hxx
editeng/inc/editeng/tstpitem.hxx
editeng/inc/editeng/twolinesitem.hxx
editeng/inc/editeng/txtrange.hxx
editeng/inc/editeng/udlnitem.hxx
editeng/inc/editeng/ulspitem.hxx
editeng/inc/editeng/wghtitem.hxx
editeng/inc/editeng/writingmodeitem.hxx
editeng/inc/editeng/xmlcnitm.hxx
editeng/inc/helpid.hrc
editeng/inc/pch/precompiled_editeng.hxx
editeng/source/editeng/editdbg.cxx
editeng/source/editeng/editdoc.cxx
editeng/source/editeng/editdoc.hxx
editeng/source/editeng/editdoc2.cxx
editeng/source/editeng/editeng.cxx
editeng/source/editeng/editobj.cxx
editeng/source/editeng/editobj2.hxx
editeng/source/editeng/editsel.cxx
editeng/source/editeng/editundo.cxx
editeng/source/editeng/editundo.hxx
editeng/source/editeng/editview.cxx
editeng/source/editeng/edtspell.hxx
editeng/source/editeng/eehtml.cxx
editeng/source/editeng/eehtml.hxx
editeng/source/editeng/eeobj.cxx
editeng/source/editeng/eerdll.cxx
editeng/source/editeng/eertfpar.cxx
editeng/source/editeng/impedit.cxx
editeng/source/editeng/impedit.hxx
editeng/source/editeng/impedit2.cxx
editeng/source/editeng/impedit3.cxx
editeng/source/editeng/impedit4.cxx
editeng/source/editeng/impedit5.cxx
editeng/source/editeng/makefile.mk
editeng/source/items/bulitem.cxx
editeng/source/items/charhiddenitem.cxx
editeng/source/items/flditem.cxx
editeng/source/items/frmitems.cxx
editeng/source/items/makefile.mk
editeng/source/items/numitem.cxx
editeng/source/items/paraitem.cxx
editeng/source/items/svxfont.cxx
editeng/source/items/textitem.cxx
editeng/source/items/writingmodeitem.cxx
editeng/source/items/xmlcnitm.cxx
editeng/source/misc/SvXMLAutoCorrectImport.cxx
editeng/source/misc/svxacorr.cxx
editeng/source/misc/txtrange.cxx
editeng/source/misc/unolingu.cxx
editeng/source/outliner/outleeng.cxx
editeng/source/outliner/outliner.cxx
editeng/source/outliner/outlundo.hxx
editeng/source/outliner/outlvw.cxx
editeng/source/outliner/paralist.cxx
editeng/source/outliner/paralist.hxx
editeng/source/rtf/rtfgrf.cxx
editeng/source/rtf/rtfitem.cxx
editeng/source/rtf/svxrtf.cxx
editeng/source/uno/unoipset.cxx
editeng/util/makefile.mk
embeddedobj/prj/build.lst
embeddedobj/source/commonembedding/miscobj.cxx
eventattacher/prj/build.lst
fileaccess/source/FileAccess.cxx
formula/inc/formula/FormulaCompiler.hxx
formula/inc/formula/token.hxx
formula/inc/formula/tokenarray.hxx
formula/source/core/api/FormulaCompiler.cxx
formula/source/core/api/token.cxx
formula/source/ui/dlg/FormulaHelper.cxx
formula/source/ui/dlg/formula.cxx
formula/source/ui/dlg/parawin.cxx
formula/source/ui/dlg/structpg.cxx
fpicker/prj/d.lst
fpicker/source/aqua/FPentry.cxx
fpicker/source/office/OfficeControlAccess.cxx
fpicker/source/office/iodlg.cxx
fpicker/source/office/iodlg.hxx
fpicker/source/office/iodlg.src
fpicker/source/office/iodlgimp.cxx
fpicker/source/unx/gnome/FPentry.cxx
fpicker/source/unx/gnome/SalGtkFilePicker.cxx
fpicker/source/unx/gnome/SalGtkPicker.cxx
fpicker/source/unx/kde4/KDE4FPEntry.cxx
fpicker/source/win32/filepicker/FPentry.cxx
framework/AllLangResTarget_fwe.mk
framework/inc/dispatch/interaction.hxx
framework/inc/framework/addonmenu.hxx
framework/inc/framework/addonsoptions.hxx
framework/inc/framework/bmkmenu.hxx
framework/inc/framework/imageproducer.hxx
framework/inc/framework/sfxhelperfunctions.hxx
framework/inc/framework/statusbarconfiguration.hxx
framework/inc/framework/titlehelper.hxx
framework/inc/framework/toolboxconfiguration.hxx
framework/inc/threadhelp/lockhelper.hxx
framework/inc/xml/eventsdocumenthandler.hxx
framework/inc/xml/statusbardocumenthandler.hxx
framework/inc/xml/toolboxconfiguration.hxx
framework/inc/xml/toolboxconfigurationdefines.hxx
framework/inc/xml/toolboxdocumenthandler.hxx
framework/prj/build.lst
framework/qa/complex/ModuleManager/makefile.mk
framework/qa/complex/accelerators/makefile.mk
framework/qa/complex/framework/recovery/makefile.mk
framework/qa/complex/imageManager/_XInitialization.java
framework/source/classes/menumanager.cxx
framework/source/dispatch/interaction.cxx
framework/source/fwe/classes/bmkmenu.cxx
framework/source/fwe/helper/actiontriggerhelper.cxx
framework/source/fwe/helper/imageproducer.cxx
framework/source/fwe/xml/menuconfiguration.cxx
framework/source/fwe/xml/toolboxdocumenthandler.cxx
framework/source/helper/uiconfigelementwrapperbase.cxx
framework/source/helper/uielementwrapperbase.cxx
framework/source/inc/pattern/window.hxx
framework/source/jobs/jobdata.cxx
framework/source/layoutmanager/layoutmanager.cxx
framework/source/layoutmanager/panel.hxx
framework/source/loadenv/loadenv.cxx
framework/source/register/registerservices.cxx
framework/source/services/menudocumenthandler.cxx
framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
framework/source/uiconfiguration/uiconfigurationmanager.cxx
framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx
framework/source/uielement/addonstoolbarmanager.cxx
framework/source/uielement/controlmenucontroller.cxx
framework/source/uielement/fontsizemenucontroller.cxx
framework/source/uielement/imagebuttontoolbarcontroller.cxx
framework/source/uielement/macrosmenucontroller.cxx
framework/source/uielement/menubarmanager.cxx
framework/source/uielement/newmenucontroller.cxx
framework/source/uielement/togglebuttontoolbarcontroller.cxx
framework/source/uielement/toolbarmanager.cxx
framework/source/uielement/toolbarsmenucontroller.cxx
framework/test/makefile.mk
framework/test/threadtest/makefile.mk
framework/test/typecfg/makefile.mk
framework/util/guiapps/makefile.mk
framework/util/makefile.mk
idl/inc/bastype.hxx
idl/inc/hash.hxx
idl/inc/lex.hxx
idl/inc/module.hxx
idl/inc/object.hxx
idl/inc/slot.hxx
idl/inc/types.hxx
idl/source/cmptools/hash.cxx
idl/source/cmptools/lex.cxx
idl/source/objects/basobj.cxx
idl/source/objects/bastype.cxx
idl/source/objects/module.cxx
idl/source/objects/object.cxx
idl/source/objects/slot.cxx
idl/source/objects/types.cxx
idl/source/prj/command.cxx
idl/source/prj/database.cxx
idl/source/prj/globals.cxx
idl/source/prj/svidl.cxx
linguistic/inc/linguistic/misc.hxx
linguistic/prj/build.lst
linguistic/source/convdic.cxx
linguistic/source/convdiclist.cxx
linguistic/source/dicimp.cxx
linguistic/source/dlistimp.cxx
linguistic/source/gciterator.cxx
linguistic/source/iprcache.cxx
linguistic/source/lngopt.cxx
linguistic/source/lngprophelp.cxx
linguistic/source/lngsvcmgr.cxx
linguistic/source/lngsvcmgr.hxx
linguistic/source/misc2.cxx
linguistic/workben/sprophelp.cxx
officecfg/registry/data/org/openoffice/VCL.xcu
officecfg/util/makefile.mk
oovbaapi/ooo/vba/XApplicationBase.idl
oovbaapi/ooo/vba/XVBAAppService.idl
oovbaapi/ooo/vba/XVBADocService.idl
oovbaapi/ooo/vba/excel/XApplication.idl
oovbaapi/ooo/vba/excel/XRange.idl
oovbaapi/ooo/vba/excel/XWorkbook.idl
oovbaapi/ooo/vba/excel/XWorksheet.idl
oovbaapi/ooo/vba/word/XApplication.idl
oovbaapi/ooo/vba/word/XGlobals.idl
oovbaapi/ooo/vba/word/XTableOfContents.idl
readlicense_oo/prj/build.lst
scripting/prj/build.lst
scripting/prj/d.lst
scripting/source/basprov/basprov.cxx
scripting/source/basprov/basscript.cxx
scripting/source/basprov/basscript.hxx
scripting/source/dlgprov/dlgprov.cxx
scripting/source/inc/util/util.hxx
scripting/source/protocolhandler/scripthandler.cxx
scripting/source/provider/ProviderCache.cxx
scripting/source/pyprov/makefile.mk
scripting/source/runtimemgr/ScriptNameResolverImpl.cxx
scripting/source/runtimemgr/ScriptRuntimeManager.cxx
scripting/source/runtimemgr/StorageBridge.cxx
scripting/source/storage/ScriptMetadataImporter.cxx
scripting/source/storage/ScriptSecurityManager.cxx
scripting/source/storage/ScriptStorage.cxx
scripting/source/storage/ScriptStorageManager.cxx
sfx2/inc/about.hxx
sfx2/inc/brokenpackageint.hxx
sfx2/inc/docvor.hxx
sfx2/inc/pch/precompiled_sfx2.hxx
sfx2/inc/sfx2/app.hxx
sfx2/inc/sfx2/basmgr.hxx
sfx2/inc/sfx2/bindings.hxx
sfx2/inc/sfx2/childwin.hxx
sfx2/inc/sfx2/ctrlitem.hxx
sfx2/inc/sfx2/dinfdlg.hxx
sfx2/inc/sfx2/dispatch.hxx
sfx2/inc/sfx2/docfilt.hxx
sfx2/inc/sfx2/evntconf.hxx
sfx2/inc/sfx2/fcontnr.hxx
sfx2/inc/sfx2/frame.hxx
sfx2/inc/sfx2/imagemgr.hxx
sfx2/inc/sfx2/imgmgr.hxx
sfx2/inc/sfx2/linksrc.hxx
sfx2/inc/sfx2/macrconf.hxx
sfx2/inc/sfx2/macropg.hxx
sfx2/inc/sfx2/mnuitem.hxx
sfx2/inc/sfx2/mnumgr.hxx
sfx2/inc/sfx2/module.hxx
sfx2/inc/sfx2/msg.hxx
sfx2/inc/sfx2/objsh.hxx
sfx2/inc/sfx2/passwd.hxx
sfx2/inc/sfx2/prnmon.hxx
sfx2/inc/sfx2/request.hxx
sfx2/inc/sfx2/sfx.hrc
sfx2/inc/sfx2/sfxbasemodel.hxx
sfx2/inc/sfx2/sfxhtml.hxx
sfx2/inc/sfx2/sfxresid.hxx
sfx2/inc/sfx2/sfxsids.hrc
sfx2/inc/sfx2/sfxuno.hxx
sfx2/inc/sfx2/shell.hxx
sfx2/inc/sfx2/stbitem.hxx
sfx2/inc/sfx2/styfitem.hxx
sfx2/inc/sfx2/tabdlg.hxx
sfx2/inc/sfx2/tbxctrl.hxx
sfx2/inc/sfx2/tplpitem.hxx
sfx2/inc/sfx2/viewfrm.hxx
sfx2/inc/sfx2/viewsh.hxx
sfx2/inc/sfxbasic.hxx
sfx2/inc/sorgitm.hxx
sfx2/prj/build.lst
sfx2/qa/complex/docinfo/makefile.mk
sfx2/qa/cppunit/makefile.mk
sfx2/sdi/makefile.mk
sfx2/source/appl/app.cxx
sfx2/source/appl/app.hrc
sfx2/source/appl/app.src
sfx2/source/appl/appbas.cxx
sfx2/source/appl/appcfg.cxx
sfx2/source/appl/appchild.cxx
sfx2/source/appl/appmain.cxx
sfx2/source/appl/appmisc.cxx
sfx2/source/appl/appopen.cxx
sfx2/source/appl/appquit.cxx
sfx2/source/appl/appserv.cxx
sfx2/source/appl/appuno.cxx
sfx2/source/appl/childwin.cxx
sfx2/source/appl/fileobj.cxx
sfx2/source/appl/helpinterceptor.cxx
sfx2/source/appl/imagemgr.cxx
sfx2/source/appl/impldde.cxx
sfx2/source/appl/impldde.hxx
sfx2/source/appl/linkmgr2.cxx
sfx2/source/appl/lnkbase2.cxx
sfx2/source/appl/makefile.mk
sfx2/source/appl/module.cxx
sfx2/source/appl/newhelp.cxx
sfx2/source/appl/opengrf.cxx
sfx2/source/appl/sfxdll.cxx
sfx2/source/appl/sfxhelp.cxx
sfx2/source/appl/shutdownicon.cxx
sfx2/source/appl/shutdowniconunx.cxx
sfx2/source/appl/workwin.cxx
sfx2/source/bastyp/fltfnc.cxx
sfx2/source/bastyp/frmhtml.cxx
sfx2/source/bastyp/frmhtmlw.cxx
sfx2/source/bastyp/helper.cxx
sfx2/source/bastyp/minarray.cxx
sfx2/source/bastyp/progress.cxx
sfx2/source/bastyp/sfxhtml.cxx
sfx2/source/config/evntconf.cxx
sfx2/source/control/bindings.cxx
sfx2/source/control/ctrlitem.cxx
sfx2/source/control/dispatch.cxx
sfx2/source/control/macrconf.cxx
sfx2/source/control/macro.cxx
sfx2/source/control/makefile.mk
sfx2/source/control/minfitem.cxx
sfx2/source/control/msg.cxx
sfx2/source/control/msgpool.cxx
sfx2/source/control/objface.cxx
sfx2/source/control/request.cxx
sfx2/source/control/shell.cxx
sfx2/source/control/sorgitm.cxx
sfx2/source/dialog/about.cxx
sfx2/source/dialog/basedlgs.cxx
sfx2/source/dialog/dinfdlg.cxx
sfx2/source/dialog/dinfedt.cxx
sfx2/source/dialog/dockwin.cxx
sfx2/source/dialog/filedlghelper.cxx
sfx2/source/dialog/mailmodel.cxx
sfx2/source/dialog/mailmodelapi.cxx
sfx2/source/dialog/makefile.mk
sfx2/source/dialog/mgetempl.cxx
sfx2/source/dialog/passwd.cxx
sfx2/source/dialog/passwd.hrc
sfx2/source/dialog/printopt.cxx
sfx2/source/dialog/securitypage.cxx
sfx2/source/dialog/splitwin.cxx
sfx2/source/dialog/styfitem.cxx
sfx2/source/dialog/tabdlg.cxx
sfx2/source/dialog/taskpane.cxx
sfx2/source/dialog/templdlg.cxx
sfx2/source/dialog/tplpitem.cxx
sfx2/source/dialog/versdlg.cxx
sfx2/source/doc/QuerySaveDocument.cxx
sfx2/source/doc/SfxDocumentMetaData.cxx
sfx2/source/doc/applet.cxx
sfx2/source/doc/doc.hrc
sfx2/source/doc/doc.src
sfx2/source/doc/docfile.cxx
sfx2/source/doc/docinf.cxx
sfx2/source/doc/doctempl.cxx
sfx2/source/doc/doctemplates.cxx
sfx2/source/doc/docvor.cxx
sfx2/source/doc/guisaveas.cxx
sfx2/source/doc/makefile.mk
sfx2/source/doc/objcont.cxx
sfx2/source/doc/objitem.cxx
sfx2/source/doc/objmisc.cxx
sfx2/source/doc/objserv.cxx
sfx2/source/doc/printhelper.cxx
sfx2/source/doc/sfxacldetect.cxx
sfx2/source/doc/sfxbasemodel.cxx
sfx2/source/inc/applet.hxx
sfx2/source/inc/fltoptint.hxx
sfx2/source/inc/sfxlocal.hrc
sfx2/source/inc/virtmenu.hxx
sfx2/source/inc/workwin.hxx
sfx2/source/menu/mnuitem.cxx
sfx2/source/menu/objmnctl.cxx
sfx2/source/menu/virtmenu.cxx
sfx2/source/notify/eventsupplier.cxx
sfx2/source/notify/makefile.mk
sfx2/source/toolbox/imgmgr.cxx
sfx2/source/toolbox/tbxitem.cxx
sfx2/source/view/frame.cxx
sfx2/source/view/orgmgr.cxx
sfx2/source/view/printer.cxx
sfx2/source/view/prnmon.cxx
sfx2/source/view/viewfrm.cxx
sfx2/source/view/viewprn.cxx
sfx2/source/view/viewsh.cxx
sfx2/util/makefile.mk
sfx2/workben/custompanel/makefile.mk
shell/source/backends/desktopbe/desktopbackend.cxx
shell/source/backends/gconfbe/gconfbackend.cxx
shell/source/backends/kde4be/kde4backend.cxx
shell/source/backends/kdebe/kdebackend.cxx
shell/source/win32/SysShentry.cxx
shell/source/win32/shlxthandler/propsheets/propsheets.cxx
shell/source/win32/simplemail/smplmailentry.cxx
svx/inc/float3d.hrc
svx/inc/fmhelp.hrc
svx/inc/globlmn_tmpl.hrc
svx/inc/helpid.hrc
svx/inc/pch/precompiled_svx.hxx
svx/inc/sjctrl.hxx
svx/inc/srchitem.hxx
svx/inc/svdibrow.hxx
svx/inc/svx/SmartTagItem.hxx
svx/inc/svx/algitem.hxx
svx/inc/svx/camera3d.hxx
svx/inc/svx/chrtitem.hxx
svx/inc/svx/clipfmtitem.hxx
svx/inc/svx/ctredlin.hxx
svx/inc/svx/dbtoolsclient.hxx
svx/inc/svx/deflt3d.hxx
svx/inc/svx/dialogs.hrc
svx/inc/svx/drawitem.hxx
svx/inc/svx/e3ditem.hxx
svx/inc/svx/extrud3d.hxx
svx/inc/svx/flagsdef.hxx
svx/inc/svx/float3d.hxx
svx/inc/svx/frmsel.hxx
svx/inc/svx/gallery.hxx
svx/inc/svx/gallery1.hxx
svx/inc/svx/galtheme.hxx
svx/inc/svx/grfcrop.hxx
svx/inc/svx/hdft.hxx
svx/inc/svx/hlnkitem.hxx
svx/inc/svx/hyprlink.hxx
svx/inc/svx/itemwin.hxx
svx/inc/svx/lathe3d.hxx
svx/inc/svx/linkwarn.hxx
svx/inc/svx/modctrl.hxx
svx/inc/svx/msdffdef.hxx
svx/inc/svx/obj3d.hxx
svx/inc/svx/optgenrl.hxx
svx/inc/svx/optgrid.hxx
svx/inc/svx/pageitem.hxx
svx/inc/svx/paraprev.hxx
svx/inc/svx/postattr.hxx
svx/inc/svx/rotmodit.hxx
svx/inc/svx/ruler.hxx
svx/inc/svx/rulritem.hxx
svx/inc/svx/scene3d.hxx
svx/inc/svx/sdasaitm.hxx
svx/inc/svx/sdasitm.hxx
svx/inc/svx/sdggaitm.hxx
svx/inc/svx/sdmetitm.hxx
svx/inc/svx/sdtaaitm.hxx
svx/inc/svx/sdtaditm.hxx
svx/inc/svx/sdtaitm.hxx
svx/inc/svx/sdtakitm.hxx
svx/inc/svx/sdtfchim.hxx
svx/inc/svx/sdtfsitm.hxx
svx/inc/svx/srchdlg.hxx
svx/inc/svx/svddrag.hxx
svx/inc/svx/svdetc.hxx
svx/inc/svx/svdglue.hxx
svx/inc/svx/svdhlpln.hxx
svx/inc/svx/svdlayer.hxx
svx/inc/svx/svdmark.hxx
svx/inc/svx/svdmodel.hxx
svx/inc/svx/svdoashp.hxx
svx/inc/svx/svdobj.hxx
svx/inc/svx/svdocirc.hxx
svx/inc/svx/svdoedge.hxx
svx/inc/svx/svdogrp.hxx
svx/inc/svx/svdomeas.hxx
svx/inc/svx/svdoole2.hxx
svx/inc/svx/svdorect.hxx
svx/inc/svx/svdotable.hxx
svx/inc/svx/svdotext.hxx
svx/inc/svx/svdovirt.hxx
svx/inc/svx/svdpage.hxx
svx/inc/svx/svdsnpv.hxx
svx/inc/svx/svdtrans.hxx
svx/inc/svx/svdundo.hxx
svx/inc/svx/svimbase.hxx
svx/inc/svx/svx3ditems.hxx
svx/inc/svx/svxdlg.hxx
svx/inc/svx/sxcikitm.hxx
svx/inc/svx/sxekitm.hxx
svx/inc/svx/sxelditm.hxx
svx/inc/svx/sxenditm.hxx
svx/inc/svx/sxmkitm.hxx
svx/inc/svx/sxmtpitm.hxx
svx/inc/svx/sxmuitm.hxx
svx/inc/svx/tabarea.hxx
svx/inc/svx/tabline.hxx
svx/inc/svx/unoprov.hxx
svx/inc/svx/viewlayoutitem.hxx
svx/inc/svx/xbitmap.hxx
svx/inc/svx/xbtmpit.hxx
svx/inc/svx/xcolit.hxx
svx/inc/svx/xfillit0.hxx
svx/inc/svx/xflclit.hxx
svx/inc/svx/xflftrit.hxx
svx/inc/svx/xflgrit.hxx
svx/inc/svx/xflhtit.hxx
svx/inc/svx/xftadit.hxx
svx/inc/svx/xftsfit.hxx
svx/inc/svx/xftshit.hxx
svx/inc/svx/xlineit0.hxx
svx/inc/svx/xlinjoit.hxx
svx/inc/svx/xlnclit.hxx
svx/inc/svx/xlndsit.hxx
svx/inc/svx/xlnedcit.hxx
svx/inc/svx/xlnedit.hxx
svx/inc/svx/xlnedwit.hxx
svx/inc/svx/xlnstcit.hxx
svx/inc/svx/xlnstit.hxx
svx/inc/svx/xlnstwit.hxx
svx/inc/svx/xlnwtit.hxx
svx/inc/svx/xtextit0.hxx
svx/inc/svx/zoomitem.hxx
svx/inc/svx/zoomslideritem.hxx
svx/inc/xpolyimp.hxx
svx/inc/zoom_def.hxx
svx/prj/d.lst
svx/source/accessibility/AccessibleShape.cxx
svx/source/accessibility/DescriptionGenerator.cxx
svx/source/customshapes/EnhancedCustomShapeEngine.cxx
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
svx/source/dialog/_bmpmask.cxx
svx/source/dialog/_contdlg.cxx
svx/source/dialog/connctrl.cxx
svx/source/dialog/contwnd.cxx
svx/source/dialog/ctredlin.cxx
svx/source/dialog/ctredlin.hrc
svx/source/dialog/ctredlin.src
svx/source/dialog/dialcontrol.cxx
svx/source/dialog/dlgctrl.cxx
svx/source/dialog/docrecovery.cxx
svx/source/dialog/fntctrl.cxx
svx/source/dialog/fontwork.cxx
svx/source/dialog/frmsel.cxx
svx/source/dialog/graphctl.cxx
svx/source/dialog/grfflt.cxx
svx/source/dialog/hdft.cxx
svx/source/dialog/hyperdlg.cxx
svx/source/dialog/hyprdlg.hxx
svx/source/dialog/hyprlink.cxx
svx/source/dialog/hyprlink.hxx
svx/source/dialog/hyprlink.src
svx/source/dialog/imapdlg.cxx
svx/source/dialog/imapwnd.cxx
svx/source/dialog/linkwarn.hrc
svx/source/dialog/makefile.mk
svx/source/dialog/optgrid.cxx
svx/source/dialog/orienthelper.cxx
svx/source/dialog/pagectrl.cxx
svx/source/dialog/prtqry.cxx
svx/source/dialog/rlrcitem.cxx
svx/source/dialog/rubydialog.cxx
svx/source/dialog/rulritem.cxx
svx/source/dialog/simptabl.cxx
svx/source/dialog/srchdlg.cxx
svx/source/dialog/svxbmpnumvalueset.cxx
svx/source/dialog/svxruler.cxx
svx/source/dialog/swframeexample.cxx
svx/source/engine3d/float3d.cxx
svx/source/engine3d/float3d.src
svx/source/engine3d/svx3ditems.cxx
svx/source/fmcomp/gridctrl.cxx
svx/source/fmcomp/trace.cxx
svx/source/form/ParseContext.cxx
svx/source/form/datanavi.cxx
svx/source/form/filtnav.cxx
svx/source/form/fmexch.cxx
svx/source/form/fmexpl.cxx
svx/source/form/fmobjfac.cxx
svx/source/form/fmpage.cxx
svx/source/form/fmshell.cxx
svx/source/form/fmshimp.cxx
svx/source/form/fmsrcimp.cxx
svx/source/form/fmvwimp.cxx
svx/source/form/makefile.mk
svx/source/form/tabwin.cxx
svx/source/form/tbxform.cxx
svx/source/form/typemap.cxx
svx/source/gallery2/galbrws1.cxx
svx/source/gallery2/galbrws2.cxx
svx/source/gallery2/galexpl.cxx
svx/source/gallery2/gallery1.cxx
svx/source/gallery2/galtheme.cxx
svx/source/gallery2/makefile.mk
svx/source/gengal/gengal.cxx
svx/source/gengal/makefile.mk
svx/source/inc/fmgroup.hxx
svx/source/intro/about_ooo.hrc
svx/source/intro/iso.src
svx/source/intro/ooo.src
svx/source/items/SmartTagItem.cxx
svx/source/items/algitem.cxx
svx/source/items/chrtitem.cxx
svx/source/items/clipfmtitem.cxx
svx/source/items/customshapeitem.cxx
svx/source/items/drawitem.cxx
svx/source/items/e3ditem.cxx
svx/source/items/grfitem.cxx
svx/source/items/hlnkitem.cxx
svx/source/items/makefile.mk
svx/source/items/pageitem.cxx
svx/source/items/rotmodit.cxx
svx/source/items/viewlayoutitem.cxx
svx/source/items/zoomitem.cxx
svx/source/items/zoomslideritem.cxx
svx/source/src/app.hrc
svx/source/stbctrls/makefile.mk
svx/source/stbctrls/modctrl.cxx
svx/source/stbctrls/xmlsecctrl.cxx
svx/source/stbctrls/zoomctrl.cxx
svx/source/svdraw/clonelist.cxx
svx/source/svdraw/svdattr.cxx
svx/source/svdraw/svdcrtv.cxx
svx/source/svdraw/svdedtv1.cxx
svx/source/svdraw/svdedtv2.cxx
svx/source/svdraw/svdedxv.cxx
svx/source/svdraw/svdetc.cxx
svx/source/svdraw/svdfmtf.cxx
svx/source/svdraw/svdfmtf.hxx
svx/source/svdraw/svdglue.cxx
svx/source/svdraw/svdhdl.cxx
svx/source/svdraw/svdhlpln.cxx
svx/source/svdraw/svdibrow.cxx
svx/source/svdraw/svdlayer.cxx
svx/source/svdraw/svdmodel.cxx
svx/source/svdraw/svdoashp.cxx
svx/source/svdraw/svdobj.cxx
svx/source/svdraw/svdocapt.cxx
svx/source/svdraw/svdocirc.cxx
svx/source/svdraw/svdoedge.cxx
svx/source/svdraw/svdograf.cxx
svx/source/svdraw/svdogrp.cxx
svx/source/svdraw/svdomeas.cxx
svx/source/svdraw/svdomedia.cxx
svx/source/svdraw/svdopath.cxx
svx/source/svdraw/svdotext.cxx
svx/source/svdraw/svdotxdr.cxx
svx/source/svdraw/svdotxed.cxx
svx/source/svdraw/svdotxfl.cxx
svx/source/svdraw/svdotxln.cxx
svx/source/svdraw/svdotxtr.cxx
svx/source/svdraw/svdoutl.cxx
svx/source/svdraw/svdpage.cxx
svx/source/svdraw/svdpagv.cxx
svx/source/svdraw/svdpntv.cxx
svx/source/svdraw/svdpoev.cxx
svx/source/svdraw/svdsnpv.cxx
svx/source/svdraw/svdstr.src
svx/source/svdraw/svdtrans.cxx
svx/source/svdraw/svdundo.cxx
svx/source/svdraw/svdview.cxx
svx/source/svdraw/svdxcgv.cxx
svx/source/table/svdotable.cxx
svx/source/tbxctrls/colorwindow.hxx
svx/source/tbxctrls/extrusioncontrols.cxx
svx/source/tbxctrls/fillctrl.cxx
svx/source/tbxctrls/grafctrl.cxx
svx/source/tbxctrls/itemwin.cxx
svx/source/tbxctrls/layctrl.cxx
svx/source/tbxctrls/lboxctrl.cxx
svx/source/tbxctrls/linectrl.cxx
svx/source/tbxctrls/tbcontrl.cxx
svx/source/tbxctrls/verttexttbxctrl.cxx
svx/source/unodraw/unomod.cxx
svx/source/unodraw/unopage.cxx
svx/source/unodraw/unoprov.cxx
svx/source/unodraw/unoshape.cxx
svx/source/unodraw/unoshtxt.cxx
svx/source/xml/xmlxtexp.cxx
svx/source/xoutdev/_xpoly.cxx
svx/source/xoutdev/xattr.cxx
svx/source/xoutdev/xattr2.cxx
svx/source/xoutdev/xattrbmp.cxx
svx/source/xoutdev/xtabcolr.cxx
svx/util/makefile.mk
svx/workben/edittest.cxx
sysui/desktop/productversion.mk
ucb/prj/build.lst
ucb/source/cacher/cacheserv.cxx
ucb/source/core/ucb1.component
ucb/source/core/ucbserv.cxx
ucb/source/core/ucbstore.cxx
ucb/source/core/ucbstore.hxx
ucb/source/sorter/sortmain.cxx
ucb/source/ucp/file/prov.cxx
ucb/source/ucp/file/shell.cxx
ucb/source/ucp/ftp/ftpservices.cxx
ucb/source/ucp/gio/gio_provider.cxx
ucb/source/ucp/gvfs/gvfs_provider.cxx
ucb/source/ucp/hierarchy/hierarchyservices.cxx
ucb/source/ucp/odma/odma_lib.cxx
ucb/source/ucp/odma/odma_services.cxx
ucb/source/ucp/package/pkgservices.cxx
ucb/source/ucp/tdoc/tdoc_services.cxx
ucb/source/ucp/webdav/ContentProperties.cxx
ucb/source/ucp/webdav/NeonHeadRequest.cxx
ucb/source/ucp/webdav/webdavcontent.cxx
ucb/source/ucp/webdav/webdavservices.cxx
uui/source/iahndl.cxx
uui/source/iahndl.hxx
uui/source/loginerr.hxx
uui/source/nameclashdlg.hxx
uui/source/passcrtdlg.cxx
uui/source/passworddlg.cxx
uui/source/passworddlg.hxx
uui/source/services.cxx
vbahelper/inc/vbahelper/vbahelper.hxx
vbahelper/prj/build.lst
vbahelper/prj/d.lst
vbahelper/source/msforms/makefile.mk
vbahelper/source/msforms/vbauserform.cxx
vbahelper/source/vbahelper/makefile.mk
vbahelper/source/vbahelper/vbaapplicationbase.cxx
vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
vbahelper/source/vbahelper/vbadocumentbase.cxx
vbahelper/source/vbahelper/vbadocumentsbase.cxx
vbahelper/source/vbahelper/vbahelper.cxx
vbahelper/util/makefile.mk
xmlhelp/source/cxxhelp/provider/databases.cxx
xmlhelp/source/cxxhelp/provider/services.cxx
xmlhelp/source/treeview/tvfactory.cxx
xmloff/JunitTest_xmloff_unoapi.mk
xmloff/inc/functional.hxx
xmloff/inc/xmloff/formlayerexport.hxx
xmloff/inc/xmloff/formlayerimport.hxx
xmloff/inc/xmloff/functional.hxx
xmloff/inc/xmloff/shapeimport.hxx
xmloff/inc/xmloff/xmlcnitm.hxx
xmloff/inc/xmloff/xmlnumfi.hxx
xmloff/prj/build.lst
xmloff/source/chart/SchXMLChartContext.cxx
xmloff/source/chart/SchXMLExport.cxx
xmloff/source/chart/SchXMLImport.cxx
xmloff/source/chart/SchXMLLegendContext.hxx
xmloff/source/chart/SchXMLPlotAreaContext.cxx
xmloff/source/core/xmluconv.cxx
xmloff/source/draw/sdxmlexp.cxx
xmloff/source/draw/shapeexport4.cxx
xmloff/source/draw/ximp3dobject.cxx
xmloff/source/draw/ximp3dscene.cxx
xmloff/source/forms/formlayerexport.cxx
xmloff/source/forms/formlayerimport.cxx
xmloff/source/forms/handler/vcl_time_handler.hxx
xmloff/source/forms/layerimport.cxx
xmloff/source/forms/layerimport.hxx
xmloff/source/forms/property_meta_data.hxx
xmloff/source/style/PageHeaderFooterContext.cxx
xmloff/source/style/PageMasterStyleMap.cxx
xmloff/source/style/prstylei.cxx
xmloff/source/style/xmlimppr.cxx
xmloff/source/style/xmlnumfi.cxx
xmloff/source/style/xmlstyle.cxx
xmloff/source/table/tabledesignsimporter.cxx
xmloff/source/text/XMLTextNumRuleInfo.cxx
xmloff/source/text/XMLTextShapeStyleContext.cxx
xmloff/source/text/txtstyle.cxx
xmloff/source/transform/ChartOOoTContext.cxx
xmloff/source/transform/EventOOoTContext.cxx
xmloff/source/transform/TransformerBase.cxx
xmloff/util/makefile.mk
xmlscript/util/xcr.component
Diffstat (limited to 'svx/workben')
-rwxr-xr-x | svx/workben/edittest.cxx | 1795 | ||||
-rwxr-xr-x[-rw-r--r--] | svx/workben/msview/makefile.mk | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | svx/workben/msview/msview.cxx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | svx/workben/msview/msview.xml | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | svx/workben/msview/xmlconfig.cxx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | svx/workben/msview/xmlconfig.hxx | 0 |
6 files changed, 1795 insertions, 0 deletions
diff --git a/svx/workben/edittest.cxx b/svx/workben/edittest.cxx new file mode 100755 index 000000000000..9b2f4f2e2aac --- /dev/null +++ b/svx/workben/edittest.cxx @@ -0,0 +1,1795 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svx.hxx" + +#include <editeng/editeng.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/editview.hxx> +#include <editeng/editobj.hxx> +#include <editeng/editstat.hxx> +#include <eerdll.hxx> +#include <editeng/flditem.hxx> +#include <tools/urlobj.hxx> +#include <svx/svxacorr.hxx> +#include <tools/fsys.hxx> +#include <svx/xpoly.hxx> +#include <svtools/filedlg.hxx> + +#include <vcl/window.hxx> +#include <vcl/svapp.hxx> +#include <vcl/font.hxx> +#include <vcl/sound.hxx> +#include <vcl/print.hxx> +#include <vcl/toolbox.hxx> +#include <vcl/help.hxx> +#include <vcl/scrbar.hxx> +#include <vcl/wrkwin.hxx> +#include <vcl/msgbox.hxx> + +#include <dialdll.hxx> + + +#define SERVICE_SIMPLEREGISTRY "com.sun.star.registry.SimpleRegistry" +#include <comphelper/processfactory.hxx> +#include <comphelper/regpathhelper.hxx> +#include <cppuhelper/servicefactory.hxx> +#include <cppuhelper/bootstrap.hxx> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/lang/XInitialization.hpp> +#include <com/sun/star/registry/XSimpleRegistry.hpp> +#include <sfx2/sfxuno.hxx> + +// SVX +#include <editeng/lrspitem.hxx> +#include <editeng/shdditem.hxx> +#include <editeng/cntritem.hxx> +#include <editeng/crsditem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/lspcitem.hxx> +#include <editeng/escpitem.hxx> +#include <editeng/kernitem.hxx> +#include <editeng/akrnitem.hxx> +#include <editeng/wrlmitem.hxx> +#include <editeng/colritem.hxx> +#include <editeng/ulspitem.hxx> +#include <editeng/postitem.hxx> +#include <editeng/adjitem.hxx> +#include <editeng/wghtitem.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/fontitem.hxx> +#include <fwdtitem.hxx> + +// SVTOOLS +#include <svl/undo.hxx> +#include <svl/itemset.hxx> +#include <svl/itempool.hxx> +#include <svl/poolitem.hxx> +#include <svtools/printdlg.hxx> + +#include <osl/file.hxx> +#include <osl/process.h> +#include <rtl/bootstrap.hxx> + +#define TB_LEFT 1 +#define TB_RIGHT 2 +#define TB_CENTER 3 +#define TB_UNDO 4 +#define TB_REDO 5 +#define TB_FONT1 6 +#define TB_FONT2 7 +#define TB_ITALIC 8 +#define TB_BOLD 9 +#define TB_UNDERLINE 10 +#define TB_BLACK 11 +#define TB_GREEN 12 +#define TB_OPEN 13 +#define TB_SAVE 14 +#define TB_SBL 15 +#define TB_SBSA 16 +#define TB_LR 17 +#define TB_DRAW 18 +#define TB_DEFTAB 19 +#define TB_OPEN2 20 +#define TB_SAVE2 21 +#define TB_STDSEL 33 +#define TB_MOVE 34 +#define TB_PARATTR1 35 +#define TB_ROTATE 38 +#define TB_RED 43 +#define TB_FLAT 46 +#define TB_BINOBJ1 47 +#define TB_BINOBJ3 49 +#define TB_BINOBJ4 50 +#define TB_BINOBJ1b 51 +#define TB_BINOBJ2b 52 +#define TB_ATTRIBS 54 +#define TB_IDLE 55 +#define TB_BLOCK 56 +#define TB_CLONEBIN 57 +#define TB_INSERT 58 +#define TB_PKERN 59 +#define TB_KERN 60 +#define TB_SUPER 61 +#define TB_SUB 62 +#define TB_PRINT 63 +#define TB_FONT 64 +#define TB_COLORS 65 +#define TB_WLM 66 +#define TB_OUTL 67 +#define TB_INSFLD 68 +#define TB_UPDFLD 69 +#define TB_ONLINESPELL 70 +#define TB_REDLINES 71 +#define TB_AUTOCORRECT 72 +#define TB_POLY 73 +#define TB_HYPH 74 + +// VARS... +short nRotation = 0; +USHORT nZoom = 100; +sal_Bool bURLClicked = sal_False; + +using namespace ::com::sun::star::connection; +using namespace ::vos; +using namespace ::rtl; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::registry; +using namespace ::com::sun::star::lang; + + + +Reference< XMultiServiceFactory > createApplicationServiceManager() +{ + Reference< XMultiServiceFactory > xMS; + try + { + Reference< XComponentContext > xComponentContext = ::cppu::defaultBootstrap_InitialComponentContext(); + if ( xComponentContext.is() ) + xMS = xMS.query( xComponentContext->getServiceManager() ); + } + catch( ::com::sun::star::uno::Exception& ) + { + } + + return xMS; +} + +// --- class EditApp ------------------------------------------------- + +SV_DECL_PTRARR_DEL( StringList, String*, 0, 4 ); +SV_IMPL_PTRARR( StringList, String* ); +StringList aSimpleHistory; + +class EditApp : public Application +{ +public: + virtual void Main(); +}; + +class MyEditEngine : public EditEngine +{ +public: + MyEditEngine( SfxItemPool* pPool ) : EditEngine( pPool ) { ; } + virtual String CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rTxtColor, Color*& rFldColor ); + virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ); + virtual void FieldSelected( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ); +}; + +XubString __EXPORT MyEditEngine::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ) +{ + const SvxFieldData* pField = rField.GetField(); + if ( !pField ) + return String( RTL_CONSTASCII_USTRINGPARAM( "<Empty>" ) ); + + if ( pField->ISA( SvxDateField ) ) + return ((const SvxDateField*)pField)->GetFormatted( LANGUAGE_SYSTEM, LANGUAGE_SYSTEM ); + else if ( pField->ISA( SvxURLField ) ) + { + const SvxURLField* pURL = (const SvxURLField*)pField; + if ( !bURLClicked ) + { + delete rpTxtColor; + rpTxtColor = new Color( COL_BLUE ); + } + else + { + delete rpTxtColor; + rpTxtColor = new Color( COL_RED ); + delete rpFldColor; + rpFldColor = new Color( COL_YELLOW ); + } + if ( pURL->GetFormat() == SVXURLFORMAT_URL ) + return pURL->GetURL(); + return pURL->GetRepresentation(); + } + return String( RTL_CONSTASCII_USTRINGPARAM( "???" ) ); +} + +void __EXPORT MyEditEngine::FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ) +{ + EditEngine::FieldClicked( rField, nPara, nPos ); // Falls URL + const SvxFieldData* pField = rField.GetField(); + if ( !pField ) + return; + + if ( pField->ISA( SvxURLField ) ) + { + bURLClicked = TRUE; + UpdateFields(); + } + else + Sound::Beep(); +} + +void __EXPORT MyEditEngine::FieldSelected( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ) +{ + const SvxFieldData* pField = rField.GetField(); + if ( !pField ) + return; + + InfoBox( 0, String( RTL_CONSTASCII_USTRINGPARAM( "Feld selektiert!" ) ) ).Execute(); +} + + +class MyView : public WorkWindow +{ +private: + EditEngine* pEditEngine; + EditView* pEditView; + +public: + MyView( Window* pParent, EditEngine* pEditEngine ); + ~MyView(); + + virtual void Paint( const Rectangle& ); + virtual void Resize(); + virtual void KeyInput( const KeyEvent& rKeyEvt ); + virtual void MouseMove( const MouseEvent& rMEvt ); + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void MouseButtonUp( const MouseEvent& rMEvt ); + virtual void Command( const CommandEvent& rCEvt ); + BOOL Drop( const DropEvent& rEvt ); + BOOL QueryDrop( DropEvent& rEvt ); +}; + +MyView::MyView( Window* pParent, EditEngine* pEE ) : WorkWindow( pParent, WinBits( WB_STDWORK ) ) +{ + pEditEngine = pEE; + pEditView = new EditView( pEditEngine, this ); + pEditEngine->InsertView( pEditView ); + SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Another View..." ) ) ); +// EnableDrop(); + SetBackgroundBrush( Brush( Color( COL_LIGHTBLUE ) ) ); + Show(); +} + +MyView::~MyView() +{ + pEditEngine->RemoveView( pEditView ); + delete pEditView; +} + +void __EXPORT MyView::Paint( const Rectangle& rRec ) +{ + pEditView->Paint( rRec ); +} + +void __EXPORT MyView::Resize() +{ + Size aPaperSz( GetOutputSize() ); +// aPaperSz.Width() /= 2; +// aPaperSz.Height() /= 2; + pEditView->SetOutputArea( Rectangle( Point( 0,0 ), aPaperSz ) ); + pEditView->SetVisArea( Rectangle( Point( 0,0 ), aPaperSz ) ); + Invalidate(); + pEditView->ShowCursor(); +} + +// --- MyView::KeyInput() -------------------------------------- +void __EXPORT MyView::KeyInput( const KeyEvent& rKEvt ) +{ + pEditView->PostKeyEvent( rKEvt ); +} + +void __EXPORT MyView::MouseMove( const MouseEvent& rMEvt ) +{ + Point aPos = PixelToLogic( rMEvt.GetPosPixel() ); + if ( pEditView->GetOutputArea().IsInside( aPos ) ) + SetPointer( pEditView->GetPointer() ); + else + SetPointer( Pointer() ); + + + pEditView->MouseMove( rMEvt ); +} + +void __EXPORT MyView::MouseButtonDown( const MouseEvent& rMEvt ) +{ + pEditView->MouseButtonDown( rMEvt ); +} + +void __EXPORT MyView::MouseButtonUp( const MouseEvent& rMEvt ) +{ + pEditView->MouseButtonUp( rMEvt ); +} + +void __EXPORT MyView::Command( const CommandEvent& rCEvt ) +{ + if ( rCEvt.GetCommand() == COMMAND_STARTDRAG ) + pEditView->Command(rCEvt); +} + +BOOL __EXPORT MyView::Drop( const DropEvent& rEvt ) +{ + return pEditView->Drop( rEvt ); +} + +BOOL __EXPORT MyView::QueryDrop( DropEvent& rEvt ) +{ + return pEditView->QueryDrop( rEvt ); +} + +// --- class EditMainWindow -------------------------------------------- +DECLARE_LIST( ViewList, MyView* ); + +class EditViewWindow : public Window +{ +private: + MyEditEngine* pEditEngine; + EditView* pEditView; + Pointer aStdPtr; + Pointer aURLPtr; + WorkWindow* pTmpWindow; + ViewList aViewList; + + XubString aTestStr; + + +public: + EditViewWindow( Window* pParent ); + ~EditViewWindow(); + + virtual void Paint( const Rectangle& ); + virtual void Resize(); + virtual void KeyInput( const KeyEvent& rKeyEvt ); + virtual void MouseMove( const MouseEvent& rMEvt ); + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void MouseButtonUp( const MouseEvent& rMEvt ); + virtual void Command( const CommandEvent& rCEvt ); + void MarkOutputArea(); + BOOL Drop( const DropEvent& rEvt ); + BOOL QueryDrop( DropEvent& rEvt ); + + EditView* GetEditView() { return pEditView; } +}; + +class EditMainWindow : public WorkWindow +{ +private: + ToolBox aToolBox; + ScrollBar aHScrollBar; + ScrollBar aVScrollBar; + EditViewWindow aViewWin; + Printer* pPrinter; + + WorkWindow* pTmpWindow; + + EditTextObject* pRTFObj; + EditTextObject* pBinObj; + + FileDialog* pFileDialogBox; + FileDialog* pFileDialogBox2; + + +protected: + void SetScrollBars(); + void SetScrollBarRanges(); + void CreatePolygon(); + + virtual void GetFocus(); + +public: + EditMainWindow(); + ~EditMainWindow(); + + virtual void Resize(); + + DECL_LINK( TBSelect, ToolBox * ); + void UpdateToolBox(); + + DECL_LINK( HScrollHdl, ScrollBar * ); + DECL_LINK( VScrollHdl, ScrollBar * ); + DECL_LINK( ShowStatus, EditStatus * ); + void SetTitle(); +}; + + +EditMainWindow::~EditMainWindow() +{ + delete pRTFObj; + delete pBinObj; + delete pFileDialogBox; + delete pFileDialogBox2; + delete pTmpWindow; + delete pPrinter; +} + +EditMainWindow::EditMainWindow() : + WorkWindow( NULL, WB_APP | WB_STDWORK | WB_SVLOOK | WB_CLIPCHILDREN ) , + aViewWin( this ), + aToolBox( this, WinBits( WB_BORDER | WB_SVLOOK | WB_SCROLL | WB_LINESPACING ) ), + aHScrollBar( this, WinBits( WB_HSCROLL | WB_DRAG ) ), + aVScrollBar( this, WinBits( WB_VSCROLL | WB_DRAG ) ) +{ + pRTFObj = 0; + pBinObj = 0; + + pFileDialogBox = new FileDialog( this, WinBits( WB_OPEN | WB_SVLOOK ) ); + pFileDialogBox->SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Open" ) ) ); + pFileDialogBox->AddFilter( String( RTL_CONSTASCII_USTRINGPARAM( "Text" )), String( RTL_CONSTASCII_USTRINGPARAM( "*.txt" ) ) ); + pFileDialogBox->AddFilter( String( RTL_CONSTASCII_USTRINGPARAM( "Rich Text Format" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "*.rtf" ) ) ); + pFileDialogBox->AddFilter( String( RTL_CONSTASCII_USTRINGPARAM( "HTML" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "*.htm;*.html" ) ) ); + pFileDialogBox->SetCurFilter( String( RTL_CONSTASCII_USTRINGPARAM( "Rich Text Format" ) ) ); + + pFileDialogBox2 = new FileDialog( this, WinBits( WB_SAVEAS| WB_SVLOOK ) ); + pFileDialogBox2->SetText( String( RTL_CONSTASCII_USTRINGPARAM( "Save" ) ) ); + pFileDialogBox2->AddFilter( String( RTL_CONSTASCII_USTRINGPARAM( "Text" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "*.txt" ) ) ); + pFileDialogBox2->AddFilter( String( RTL_CONSTASCII_USTRINGPARAM( "Rich Text Format" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "*.rtf" ) ) ); + pFileDialogBox2->AddFilter( String( RTL_CONSTASCII_USTRINGPARAM( "HTML" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "*.htm" ) ) ); + pFileDialogBox2->SetCurFilter( String( RTL_CONSTASCII_USTRINGPARAM( "Rich Text Format" ) ) ); + + pPrinter = new Printer; + pPrinter->SetMapMode( MAP_100TH_MM ); + aViewWin.SetMapMode( pPrinter->GetMapMode() ); + aViewWin.GetEditView()->GetEditEngine()->SetRefDevice( pPrinter ); + + + + pTmpWindow = new WorkWindow( this, WB_STDWORK ); + + aToolBox.SetButtonType( BUTTON_TEXT ); + aToolBox.SetLineCount( 4 ); + + { + aToolBox.InsertItem( TB_OPEN, String( RTL_CONSTASCII_USTRINGPARAM( "Open" ) ) ); + aToolBox.InsertItem( TB_SAVE, String( RTL_CONSTASCII_USTRINGPARAM( "Save" ) ) ); + aToolBox.InsertItem( TB_PRINT, String( RTL_CONSTASCII_USTRINGPARAM( "Print" ) ) ); + aToolBox.InsertSeparator(); + aToolBox.InsertItem( TB_LEFT, String( RTL_CONSTASCII_USTRINGPARAM( "L" ) ) ); + aToolBox.InsertItem( TB_CENTER, String( RTL_CONSTASCII_USTRINGPARAM( "C" ) ) ); + aToolBox.InsertItem( TB_RIGHT, String( RTL_CONSTASCII_USTRINGPARAM( "R" ) ) ); + aToolBox.InsertItem( TB_BLOCK, String( RTL_CONSTASCII_USTRINGPARAM( "B" ) ) ); + aToolBox.InsertSeparator(); + aToolBox.InsertItem( TB_UNDO, String( RTL_CONSTASCII_USTRINGPARAM( "Undo" ) ) ); + aToolBox.InsertItem( TB_REDO, String( RTL_CONSTASCII_USTRINGPARAM( "Redo" ) ) ); + aToolBox.InsertSeparator(); + aToolBox.InsertItem( TB_FONT1, String( RTL_CONSTASCII_USTRINGPARAM( "Font1" ) ) ); + aToolBox.InsertItem( TB_FONT2, String( RTL_CONSTASCII_USTRINGPARAM( "Font2" ) ) ); + aToolBox.InsertItem( TB_DEFTAB, String( RTL_CONSTASCII_USTRINGPARAM( "DefTab" ) ) ); + aToolBox.InsertBreak(); + aToolBox.InsertItem( TB_OPEN2, String( RTL_CONSTASCII_USTRINGPARAM( "Read" ) ) ); + aToolBox.InsertItem( TB_SAVE2, String( RTL_CONSTASCII_USTRINGPARAM( "Write" ) ) ); + aToolBox.InsertSeparator(); + aToolBox.InsertItem( TB_FONT, String( RTL_CONSTASCII_USTRINGPARAM( "XXX" ) ) ); + aToolBox.InsertItem( TB_ITALIC, String( RTL_CONSTASCII_USTRINGPARAM( "K" ) ) ); + aToolBox.InsertItem( TB_BOLD, String( RTL_CONSTASCII_USTRINGPARAM( "F" ) ) ); + aToolBox.InsertItem( TB_UNDERLINE, String( RTL_CONSTASCII_USTRINGPARAM( "U" ) ) ); + aToolBox.InsertItem( TB_SUPER, String( RTL_CONSTASCII_USTRINGPARAM( "SP" ) ) ); + aToolBox.InsertItem( TB_SUB, String( RTL_CONSTASCII_USTRINGPARAM( "SB" ) ) ); + aToolBox.InsertItem( TB_PKERN, String( RTL_CONSTASCII_USTRINGPARAM( "PK" ) ) ); + aToolBox.InsertItem( TB_KERN, String( RTL_CONSTASCII_USTRINGPARAM( "TK" ) ) ); + aToolBox.InsertItem( TB_WLM, String( RTL_CONSTASCII_USTRINGPARAM( "W!" ) ) ); + aToolBox.InsertSeparator(); + aToolBox.InsertItem( TB_BLACK, String( RTL_CONSTASCII_USTRINGPARAM( "Black" ) ) ); + aToolBox.InsertItem( TB_GREEN, String( RTL_CONSTASCII_USTRINGPARAM( "Green" ) ) ); + aToolBox.InsertItem( TB_RED, String( RTL_CONSTASCII_USTRINGPARAM( "Red" ) ) ); + aToolBox.InsertSeparator(); + aToolBox.InsertItem( TB_SBL, String( RTL_CONSTASCII_USTRINGPARAM( "SBL" ) ) ); + aToolBox.InsertItem( TB_SBSA, String( RTL_CONSTASCII_USTRINGPARAM( "SBSA" ) ) ); + aToolBox.InsertItem( TB_LR, String( RTL_CONSTASCII_USTRINGPARAM( "LR" ) ) ); + aToolBox.InsertSeparator(); + aToolBox.InsertItem( TB_DRAW, String( RTL_CONSTASCII_USTRINGPARAM( "Draw!" ) ) ); + aToolBox.InsertItem( TB_ROTATE, String( RTL_CONSTASCII_USTRINGPARAM( "Rotate!" ) ) ); + aToolBox.InsertItem( TB_MOVE, String( RTL_CONSTASCII_USTRINGPARAM( "Move->2" ) ) ); + aToolBox.InsertItem( TB_PARATTR1, String( RTL_CONSTASCII_USTRINGPARAM( "ParaAttr0" ) ) ); + aToolBox.InsertItem( TB_ATTRIBS, String( RTL_CONSTASCII_USTRINGPARAM( "GetAttribs" ) ) ); + aToolBox.InsertSeparator(); + aToolBox.InsertItem( TB_INSFLD, String( RTL_CONSTASCII_USTRINGPARAM( "InsFld" ) ) ); + aToolBox.InsertItem( TB_UPDFLD, String( RTL_CONSTASCII_USTRINGPARAM( "UpdFld" ) ) ); + } + aToolBox.InsertBreak(); + { + aToolBox.InsertItem( TB_ONLINESPELL, String( RTL_CONSTASCII_USTRINGPARAM( "Spell" ) ) ); + aToolBox.InsertItem( TB_REDLINES, String( RTL_CONSTASCII_USTRINGPARAM( "RedLine" ) ) ); + aToolBox.InsertItem( TB_AUTOCORRECT, String( RTL_CONSTASCII_USTRINGPARAM( "Auto*" ) ) ); + aToolBox.InsertItem( TB_HYPH, String( RTL_CONSTASCII_USTRINGPARAM( "Hyph" ) ) ); + aToolBox.InsertItem( TB_STDSEL, String( RTL_CONSTASCII_USTRINGPARAM( "StdSel" ) ) ); + aToolBox.InsertItem( TB_FLAT, String( RTL_CONSTASCII_USTRINGPARAM( "FlatMode" ) ) ); + aToolBox.InsertItem( TB_OUTL, String( RTL_CONSTASCII_USTRINGPARAM( "Ocomphelper" ) ) ); + aToolBox.InsertItem( TB_POLY, String( RTL_CONSTASCII_USTRINGPARAM( "Poly" ) ) ); + aToolBox.InsertItem( TB_COLORS, String( RTL_CONSTASCII_USTRINGPARAM( "Colors" ) )); + aToolBox.InsertItem( TB_IDLE, String( RTL_CONSTASCII_USTRINGPARAM( "Idle!" ) ) ); + aToolBox.InsertItem( TB_INSERT, String( RTL_CONSTASCII_USTRINGPARAM( "Insert" ) ) ); + aToolBox.InsertSeparator(); + aToolBox.InsertItem( TB_BINOBJ1, String( RTL_CONSTASCII_USTRINGPARAM( ">BINObj" ) ) ); + aToolBox.InsertItem( TB_BINOBJ1b, String( RTL_CONSTASCII_USTRINGPARAM( ">>BINObj" ) ) ); + aToolBox.InsertItem( TB_BINOBJ2b, String( RTL_CONSTASCII_USTRINGPARAM( "<<BINObj" ) ) ); + aToolBox.InsertItem( TB_CLONEBIN, String( RTL_CONSTASCII_USTRINGPARAM( "Clone" ) ) ); + aToolBox.InsertSeparator(); + aToolBox.InsertItem( TB_BINOBJ3, String( RTL_CONSTASCII_USTRINGPARAM( "StoreBin" ) ) ); + aToolBox.InsertItem( TB_BINOBJ4, String( RTL_CONSTASCII_USTRINGPARAM( "CreatBin" ) ) ); + } + + aToolBox.SetPosPixel( Point( 0, 0 ) ); + aToolBox.SetSelectHdl( LINK( this, EditMainWindow, TBSelect ) ); + + SetBackgroundBrush( Brush( Color( COL_LIGHTGRAY ) ) ); + + SetPen( PEN_NULL ); + Show(); + + aVScrollBar.SetScrollHdl ( LINK( this, EditMainWindow, VScrollHdl ) ); + aVScrollBar.SetLineSize( 300 ); + aVScrollBar.SetPageSize( 2000 ); + aHScrollBar.SetScrollHdl ( LINK( this, EditMainWindow, HScrollHdl ) ); + aHScrollBar.SetLineSize( 300 ); + aHScrollBar.SetPageSize( 2000 ); + aHScrollBar.Enable(); + aVScrollBar.Enable(); + + aViewWin.GetEditView()->GetEditEngine()->SetStatusEventHdl( LINK( this, EditMainWindow, ShowStatus ) ); + + SetTitle(); + + UpdateToolBox(); + aToolBox.Show(); + aViewWin.Show(); +} + +void EditMainWindow::SetTitle() +{ + String aHeading( String( RTL_CONSTASCII_USTRINGPARAM( "SvEdit! - Zoom " ) ) ); + aHeading += String::CreateFromInt32(nZoom); + aHeading += '%'; + EditEngine* pEditEngine = aViewWin.GetEditView()->GetEditEngine(); + if ( pEditEngine->GetControlWord() & EE_CNTRL_STRETCHING ) + { + USHORT nX, nY; + pEditEngine->GetGlobalCharStretching( nX, nY ); + aHeading += String( RTL_CONSTASCII_USTRINGPARAM( ", Stretch=(" ) ); + aHeading += String::CreateFromInt32(nX); + aHeading += String( RTL_CONSTASCII_USTRINGPARAM( ", " ) ); + aHeading += String::CreateFromInt32(nY); + aHeading += ')'; + } + SetText( aHeading ); +} + +void EditMainWindow::UpdateToolBox() +{ + EditView* pEditView = aViewWin.GetEditView(); + EditEngine* pEditEngine = pEditView->GetEditEngine(); + SfxItemSet aCurSet( pEditView->GetAttribs() ); + + ULONG nControl = pEditEngine->GetControlWord(); + aToolBox.EnableItem( TB_UNDO, (BOOL)pEditEngine->GetUndoManager().GetUndoActionCount() ); + aToolBox.EnableItem( TB_REDO, (BOOL)pEditEngine->GetUndoManager().GetRedoActionCount() ); + aToolBox.EnableItem( TB_BINOBJ2b, (BOOL)(long)pBinObj ); + aToolBox.EnableItem( TB_MOVE, pEditEngine->GetParagraphCount() > 3 ); + aToolBox.CheckItem( TB_ONLINESPELL, nControl & EE_CNTRL_ONLINESPELLING ? TRUE : FALSE ); + aToolBox.CheckItem( TB_AUTOCORRECT, nControl & EE_CNTRL_AUTOCORRECT ? TRUE : FALSE ); +// aToolBox.CheckItem( TB_HYPH, nControl & EE_CNTRL_HYPHENATE ? TRUE : FALSE ); + aToolBox.CheckItem( TB_REDLINES, nControl & EE_CNTRL_NOREDLINES ? FALSE : TRUE ); + aToolBox.CheckItem( TB_STDSEL, pEditView->GetSelectionMode() == EE_SELMODE_STD ); + aToolBox.CheckItem( TB_FLAT, pEditEngine->IsFlatMode() ); + aToolBox.CheckItem( TB_OUTL, ( nControl & EE_CNTRL_OUTLINER ) ? TRUE : FALSE ); + aToolBox.CheckItem( TB_POLY, pEditEngine->GetPolygon() ? TRUE : FALSE ); + aToolBox.CheckItem( TB_COLORS, ( nControl & EE_CNTRL_NOCOLORS ) ? FALSE : TRUE ); + aToolBox.CheckItem( TB_IDLE, pEditEngine->IsIdleFormatterEnabled() ); + aToolBox.CheckItem( TB_INSERT, pEditView->IsInsertMode() ); + + for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_ITEMS_END; nWhich++) + { +// if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF ) +// ; +// else if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_DONTCARE ) +// ; +// else if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_ON ) + { + const SfxPoolItem& rItem = aCurSet.Get( nWhich ); + switch ( nWhich ) + { + case EE_PARA_HYPHENATE: + aToolBox.CheckItem( TB_HYPH, ((SfxBoolItem&)rItem).GetValue() != 0 ); + break; + case EE_PARA_LRSPACE: + aToolBox.CheckItem( TB_LR, ((SvxLRSpaceItem&)rItem).GetTxtLeft() != 0 ); + break; + case EE_PARA_ULSPACE: + aToolBox.CheckItem( TB_SBSA, ((SvxULSpaceItem&)rItem).GetUpper() != 0 ); + break; + case EE_PARA_SBL: + aToolBox.CheckItem( TB_SBL, ((SvxLineSpacingItem&)rItem).GetPropLineSpace() != 100 ); + break; + case EE_PARA_JUST: + { + SvxAdjust e = ((SvxAdjustItem&)rItem).GetAdjust(); + aToolBox.CheckItem( TB_LEFT, e == SVX_ADJUST_LEFT ); + aToolBox.CheckItem( TB_RIGHT, e == SVX_ADJUST_RIGHT); + aToolBox.CheckItem( TB_CENTER, e == SVX_ADJUST_CENTER); + aToolBox.CheckItem( TB_BLOCK, e == SVX_ADJUST_BLOCK ); + } + break; + case EE_PARA_TABS: + break; + case EE_CHAR_COLOR: + { + Color aColor( ((SvxColorItem&)rItem).GetValue() ); + aToolBox.CheckItem( TB_BLACK, aColor == COL_BLACK ); + aToolBox.CheckItem( TB_GREEN, aColor == COL_GREEN ); + aToolBox.CheckItem( TB_RED, aColor == COL_RED ); + } + break; + case EE_CHAR_FONTINFO: + { + FontFamily e = ((SvxFontItem&)rItem).GetFamily(); + aToolBox.CheckItem( TB_FONT1, e == FAMILY_ROMAN ); + aToolBox.CheckItem( TB_FONT2, e == FAMILY_SWISS ); + } + break; + case EE_CHAR_FONTHEIGHT: + break; + case EE_CHAR_WEIGHT: + { + FontWeight e = ((SvxWeightItem&)rItem).GetWeight(); + aToolBox.CheckItem( TB_BOLD, e == WEIGHT_BOLD ); + } + break; + case EE_CHAR_UNDERLINE: + { + aToolBox.CheckItem( TB_UNDERLINE, ((SvxUnderlineItem&)rItem).GetLineStyle() ); + } + break; + case EE_CHAR_WLM: + { + aToolBox.CheckItem( TB_WLM, ((SvxWordLineModeItem&)rItem).GetValue() ); + } + break; + case EE_CHAR_PAIRKERNING: + { + aToolBox.CheckItem( TB_PKERN, ((SvxAutoKernItem&)rItem).GetValue() ); + } + break; + case EE_CHAR_KERNING: + { + aToolBox.CheckItem( TB_KERN, (BOOL)((SvxKerningItem&)rItem).GetValue() ); + } + break; + case EE_CHAR_ESCAPEMENT: + { + aToolBox.CheckItem( TB_SUPER, ((SvxEscapementItem&)rItem).GetEsc() > 0 ); + aToolBox.CheckItem( TB_SUB, ((SvxEscapementItem&)rItem).GetEsc() < 0 ); + } + break; + case EE_CHAR_STRIKEOUT: + break; + case EE_CHAR_ITALIC: + { + FontItalic e = ((SvxPostureItem&)rItem).GetPosture(); + aToolBox.CheckItem( TB_ITALIC, e == ITALIC_NORMAL ); + } + break; + case EE_CHAR_OUTLINE: + break; + case EE_CHAR_SHADOW: + break; + } + } + } +} + +IMPL_LINK( EditMainWindow, TBSelect, ToolBox *, p ) +{ + EditView* pEditView = aViewWin.GetEditView(); + EditEngine* pEditEngine = pEditView->GetEditEngine(); + USHORT nId = aToolBox.GetCurItemId(); + BOOL bChecked = aToolBox.IsItemChecked( nId ); + SfxPoolItem* pNewItem = 0; + switch ( nId ) + { + case TB_LEFT: pNewItem = new SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ); + break; + case TB_RIGHT: pNewItem = new SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ); + break; + case TB_CENTER: pNewItem = new SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ); + break; + case TB_BLOCK: pNewItem = new SvxAdjustItem( SVX_ADJUST_BLOCK, EE_PARA_JUST ); + break; + case TB_HYPH: pNewItem = new SfxBoolItem( EE_PARA_HYPHENATE, !bChecked ); + break; + case TB_UNDO: pEditView->Undo(); + pEditView->ShowCursor(); + break; + case TB_REDO: pEditView->Redo(); + pEditView->ShowCursor(); + break; + case TB_ONLINESPELL: { + ULONG nControl = pEditView->GetEditEngine()->GetControlWord(); + if ( bChecked ) + nControl = nControl & ~EE_CNTRL_ONLINESPELLING; + else + nControl = nControl | EE_CNTRL_ONLINESPELLING; + pEditView->GetEditEngine()->SetControlWord( nControl ); + } + break; + case TB_REDLINES: { + ULONG nControl = pEditView->GetEditEngine()->GetControlWord(); + if ( !bChecked ) + nControl = nControl & ~EE_CNTRL_NOREDLINES; + else + nControl = nControl | EE_CNTRL_NOREDLINES; + pEditView->GetEditEngine()->SetControlWord( nControl ); + } + break; + case TB_AUTOCORRECT: { + ULONG nControl = pEditView->GetEditEngine()->GetControlWord(); + if ( bChecked ) + nControl = nControl & ~EE_CNTRL_AUTOCORRECT; + else + nControl = nControl | EE_CNTRL_AUTOCORRECT; + pEditView->GetEditEngine()->SetControlWord( nControl ); + } + break; + case TB_STDSEL: if ( bChecked ) + pEditView->SetSelectionMode( EE_SELMODE_TXTONLY ); + else + pEditView->SetSelectionMode( EE_SELMODE_STD ); + break; + case TB_FLAT: pEditEngine->SetFlatMode( !pEditEngine->IsFlatMode() ); + break; + case TB_COLORS: { + ULONG nControl = pEditView->GetEditEngine()->GetControlWord(); + if ( bChecked ) + nControl = nControl | EE_CNTRL_NOCOLORS; + else + nControl = nControl & ~EE_CNTRL_NOCOLORS; + pEditView->GetEditEngine()->SetControlWord( nControl ); + } +// aViewWin.Invalidate(); + pEditView->GetEditEngine()->Draw( pEditView->GetWindow(), pEditView->GetOutputArea(), pEditView->GetVisArea().TopLeft() ); + break; + case TB_OUTL: { + ULONG nControl = pEditView->GetEditEngine()->GetControlWord(); + if ( !bChecked ) + nControl = nControl | EE_CNTRL_OUTLINER; + else + nControl = nControl & ~EE_CNTRL_OUTLINER; + pEditView->GetEditEngine()->SetControlWord( nControl ); + } + break; + case TB_POLY: { + if ( !bChecked ) + CreatePolygon(); + else + pEditView->GetEditEngine()->ClearPolygon(); + } + break; + case TB_IDLE: pEditEngine->EnableIdleFormatter( !pEditEngine->IsIdleFormatterEnabled() ); + break; + case TB_INSFLD: { + static BYTE nFld = 0; + if ( nFld > 2 ) + nFld = 0; + if ( nFld == 0 ) + { + SvxFieldItem aFld( SvxURLField( String( RTL_CONSTASCII_USTRINGPARAM( "www.mopo.de" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "Bla" ) ), SVXURLFORMAT_REPR ), EE_FEATURE_FIELD ); + pEditView->InsertField( aFld ); + } + else if ( nFld == 1 ) + pEditView->InsertField( SvxFieldItem( SvxURLField( String( RTL_CONSTASCII_USTRINGPARAM( "www.mopo.de" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "Morgenpost" ) ), SVXURLFORMAT_URL ), EE_FEATURE_FIELD ) ); + else if ( nFld == 2 ) + pEditView->InsertField( SvxFieldItem( SvxDateField( Date( 1,1,1995 ), SVXDATETYPE_FIX, SVXDATEFORMAT_D ), EE_FEATURE_FIELD ) ); + + nFld++; + } + break; + case TB_UPDFLD: pEditEngine->UpdateFields(); + break; + case TB_INSERT: pEditView->SetInsertMode( !pEditView->IsInsertMode() ); + break; + case TB_FONT1: pNewItem = new SvxFontItem( FAMILY_ROMAN, String( RTL_CONSTASCII_USTRINGPARAM( "Times New Roman" ) ), String(), PITCH_DONTKNOW, RTL_TEXTENCODING_MS_1252, EE_CHAR_FONTINFO ); + break; + case TB_FONT2: pNewItem = new SvxFontItem( FAMILY_SWISS, String( RTL_CONSTASCII_USTRINGPARAM( "Helv" ) ), String(), PITCH_DONTKNOW, RTL_TEXTENCODING_MS_1252, EE_CHAR_FONTINFO ); + break; +/* + case TB_FONT: + { + FontDialog* pDlg = new FontDialog( this, WB_SVLOOK ); + pDlg->SetPrinter( pPrinter ); + Font aFont = pEditEngine->CreateFontFromItemSet( pEditView->GetAttribs() ); + MapMode aPntMode( MAP_POINT ); + MapMode aCurrent( aViewWin.GetMapMode() ); + Size aSz( aViewWin.LogicToLogic( aFont.GetSize(), &aCurrent, &aPntMode ) ); + aSz.Width() *= 10; + aSz.Height() *= 10; + aFont.SetSize( aSz ); + pDlg->SetSelectFont( aFont ); + if ( pDlg->Execute() ) + { + Font aNewFont( pDlg->GetSelectFont() ); + aSz = aViewWin.LogicToLogic( aNewFont.GetSize(), &aPntMode, &aCurrent ); + aSz.Width() /= 10; + aSz.Height() /= 10; + aNewFont.SetSize( aSz ); + + SfxItemSet aSet( pEditEngine->GetEmptyItemSet() ); + + pEditEngine->SetFontInfoInItemSet( aSet, aNewFont ); + pEditView->SetAttribs( aSet ); + } + delete pDlg; + } + break; +*/ + case TB_BOLD: if ( bChecked ) + pNewItem = new SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT); + else + pNewItem = new SvxWeightItem( WEIGHT_BOLD, EE_CHAR_WEIGHT); + break; + case TB_ITALIC: if ( bChecked ) + pNewItem = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC ); + else + pNewItem = new SvxPostureItem( ITALIC_NORMAL, EE_CHAR_ITALIC ); + break; + case TB_UNDERLINE: if ( bChecked ) + pNewItem = new SvxUnderlineItem( UNDERLINE_NONE, EE_CHAR_UNDERLINE ); + else + pNewItem = new SvxUnderlineItem( UNDERLINE_SINGLE, EE_CHAR_UNDERLINE ); + break; + case TB_WLM: pNewItem = new SvxWordLineModeItem( !bChecked, EE_CHAR_WLM ); + break; + case TB_PKERN: pNewItem = new SvxAutoKernItem( !bChecked, EE_CHAR_PAIRKERNING ); + break; + case TB_KERN: if ( bChecked ) + pNewItem = new SvxKerningItem( 0, EE_CHAR_KERNING ); + else + pNewItem = new SvxKerningItem( 100, EE_CHAR_KERNING); + break; + case TB_SUPER: if ( bChecked ) + pNewItem = new SvxEscapementItem( SVX_ESCAPEMENT_OFF, EE_CHAR_ESCAPEMENT); + else +// pNewItem = new SvxEscapementItem( SVX_ESCAPEMENT_SUPERSCRIPT, EE_CHAR_ESCAPEMENT); + pNewItem = new SvxEscapementItem( 50, 100, EE_CHAR_ESCAPEMENT ); + break; + case TB_SUB: if ( bChecked ) + pNewItem = new SvxEscapementItem( SVX_ESCAPEMENT_OFF, EE_CHAR_ESCAPEMENT); + else +// pNewItem = new SvxEscapementItem( SVX_ESCAPEMENT_SUBSCRIPT, EE_CHAR_ESCAPEMENT); + pNewItem = new SvxEscapementItem( -50, 100, EE_CHAR_ESCAPEMENT ); + break; + case TB_GREEN: pNewItem = new SvxColorItem( Color(COL_GREEN), EE_CHAR_COLOR); + break; + case TB_RED: pNewItem = new SvxColorItem( Color(COL_RED), EE_CHAR_COLOR); + break; + case TB_BLACK: pNewItem = new SvxColorItem( Color(COL_BLACK), EE_CHAR_COLOR); + break; + case TB_SBL: pNewItem = new SvxLineSpacingItem( 0, EE_PARA_SBL ); + if ( bChecked ) + { + ((SvxLineSpacingItem*)pNewItem)->SetInterLineSpace( 0 ); + } + else + { + ((SvxLineSpacingItem*)pNewItem)->SetPropLineSpace( 150 ); + } + break; + case TB_SBSA: pNewItem = new SvxULSpaceItem( EE_PARA_ULSPACE ); + if ( !bChecked ) + { + ((SvxULSpaceItem*)pNewItem)->SetUpper( 400 ); + ((SvxULSpaceItem*)pNewItem)->SetLower( 400 ); + } + break; + case TB_LR: pNewItem = new SvxLRSpaceItem( EE_PARA_LRSPACE ); + if ( !bChecked ) + { + ((SvxLRSpaceItem*)pNewItem)->SetTxtLeft( 1000 ); + ((SvxLRSpaceItem*)pNewItem)->SetTxtFirstLineOfst( -500 ); + ((SvxLRSpaceItem*)pNewItem)->SetRight( 500 ); + } + break; + case TB_DEFTAB: if ( bChecked ) + pEditEngine->SetDefTab( 2000 ); + else + pEditEngine->SetDefTab( 600 ); + pEditView->ShowCursor(); + aToolBox.CheckItem( nId, !bChecked ); + break; + case TB_DRAW: { + pTmpWindow->SetMapMode( aViewWin.GetMapMode() ); + pTmpWindow->SetBackgroundBrush( Brush( Color( COL_GRAY ) ) ); + pTmpWindow->SetFillInBrush( Brush( Color( COL_LIGHTGRAY ) ) ); + pTmpWindow->Show(); + pTmpWindow->Invalidate(); + pTmpWindow->Update(); + pTmpWindow->DrawText( Point( 20, 20 ), String( RTL_CONSTASCII_USTRINGPARAM( "It's a Test..." ) ) ); + Rectangle aRect( Point( 500, 500 ), Size( 10000, 4000 ) ); + pTmpWindow->DrawRect( aRect ); + pEditEngine->Draw( pTmpWindow, aRect, Point( 0, 0 ) ); + nRotation = 0; + } + break; + case TB_ROTATE: { + nRotation += 100; + if ( nRotation == 3600 ) + nRotation = 0; + pTmpWindow->SetMapMode( aViewWin.GetMapMode() ); + pTmpWindow->SetBackgroundBrush( Brush( Color( COL_LIGHTGRAY ) ) ); + pTmpWindow->SetFillInBrush( Brush( Color( COL_LIGHTGRAY ) ) ); + pTmpWindow->Show(); + pTmpWindow->Invalidate(); + pTmpWindow->Update(); + pTmpWindow->DrawText( Point( 20, 20 ), String( RTL_CONSTASCII_USTRINGPARAM( "It's a Test..." ) ) ); + Rectangle aRect( Point( 500, 500 ), Size( 10000, 4000 ) ); + pEditEngine->Draw( pTmpWindow, Point( 2000, 4000 ), nRotation ); + } + break; + + case TB_MOVE: + { + ESelection aESel = pEditView->GetSelection(); + USHORT nStartPara = Min( aESel.nStartPara, aESel.nEndPara ); + USHORT nEndPara = Max( aESel.nStartPara, aESel.nEndPara ); + pEditView->MoveParagraphs( Range(nStartPara,nEndPara), 2 ); + } + break; + case TB_PARATTR1: + { + pEditEngine->SetUpdateMode( FALSE ); + USHORT nPara = 0; + SfxItemSet aSet( pEditEngine->GetEmptyItemSet() ); + aSet.Put( SvxFontItem( FAMILY_DECORATIVE, String( RTL_CONSTASCII_USTRINGPARAM( "StarBats" ) ), String(),PITCH_DONTKNOW, RTL_TEXTENCODING_MS_1252, EE_CHAR_FONTINFO ) ); + aSet.Put( SvxColorItem( Color(COL_MAGENTA), EE_CHAR_COLOR ) ); + aSet.Put( SvxFontHeightItem(600, 100, EE_CHAR_FONTHEIGHT) ); + aSet.Put( SvxPostureItem( ITALIC_NORMAL, EE_CHAR_ITALIC ) ); + aSet.Put( SvxLRSpaceItem( 0, 0, 1000, 0, EE_PARA_LRSPACE ) ); + pEditView->SetParaAttribs( aSet, nPara ); + pEditEngine->SetUpdateMode( TRUE ); + pEditView->ShowCursor(); + } + break; + case TB_BINOBJ1: + { + delete pBinObj; + pBinObj = pEditEngine->CreateTextObject(); + } + break; + case TB_BINOBJ1b: + { + delete pBinObj; + pBinObj = pEditView->CreateTextObject(); + } + break; + case TB_CLONEBIN: + { + if ( pBinObj ) + { + EditTextObject* p = pBinObj->Clone(); + delete pBinObj; + pBinObj = p; + } + } + break; + case TB_BINOBJ2b: + { + if ( pBinObj ) + { + pEditView->InsertText( *pBinObj ); + } + } + break; + case TB_BINOBJ3: + { + if ( !pFileDialogBox2->Execute() ) + return FALSE; + DirEntry aDirEntry( pFileDialogBox2->GetPath() ); + SvFileStream aStrm( aDirEntry.GetFull(), STREAM_WRITE | STREAM_TRUNC ); + EditTextObject* pTmpObj = pEditEngine->CreateTextObject(); + pTmpObj->Store( aStrm ); + DBG_ASSERT( !aStrm.GetError(), "Store: Error!" ); + delete pTmpObj; + } + break; + case TB_BINOBJ4: + { + if ( !pFileDialogBox->Execute() ) + return FALSE; + DirEntry aDirEntry( pFileDialogBox->GetPath() ); + SvFileStream aStrm( aDirEntry.GetFull(), STREAM_READ ); + delete pBinObj; + pBinObj = EditTextObject::Create( aStrm ); +// EditTextObject* pTmpObj = pEditEngine->CreateTextObject( aStrm ); +// pEditEngine->SetText( *pTmpObj ); +// pEditView->ShowCursor(); +// delete pTmpObj; + } + break; + case TB_OPEN: + case TB_OPEN2: + { + if ( !pFileDialogBox->Execute() ) + return FALSE; + DirEntry aDirEntry( pFileDialogBox->GetPath() ); + aDirEntry.ToAbs(); + String aFileName( aDirEntry.GetFull() ); + SvFileStream aStrm( aFileName, STREAM_READ ); + if ( aStrm.GetError() ) + InfoBox( 0, String( RTL_CONSTASCII_USTRINGPARAM( "StreamError!" ) ) ).Execute(); + Application::EnterWait(); + if ( nId == TB_OPEN ) + { + if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "rtf" ) ) + pEditEngine->Read( aStrm, EE_FORMAT_RTF ); + if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "htm" ) ) + pEditEngine->Read( aStrm, EE_FORMAT_HTML ); + if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "html" ) ) + pEditEngine->Read( aStrm, EE_FORMAT_HTML ); + else if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "bin" ) ) + pEditEngine->Read( aStrm, EE_FORMAT_BIN ); + else + pEditEngine->Read( aStrm, EE_FORMAT_TEXT ); + + pEditView->ShowCursor(); + } + else + { + if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "rtf" ) ) + pEditView->Read( aStrm, EE_FORMAT_RTF ); + else if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "bin" ) ) + pEditView->Read( aStrm, EE_FORMAT_BIN ); + else if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "html" ) ) + pEditView->Read( aStrm, EE_FORMAT_HTML ); + else if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "htm" ) ) + pEditView->Read( aStrm, EE_FORMAT_HTML ); + else + pEditView->Read( aStrm, EE_FORMAT_TEXT ); + } + + Application::LeaveWait(); + + } + break; + case TB_PRINT: + { + pPrinter->SetPageQueueSize( 1 ); + PrintDialog aPrnDlg( this ); + aPrnDlg.SetPrinter( pPrinter ); + if ( aPrnDlg.Execute() ) + { + pPrinter->StartJob( String( RTL_CONSTASCII_USTRINGPARAM( "SvEdit - PrinterTest" ) ) ); + pPrinter->StartPage(); + Size aSz( pEditEngine->CalcTextWidth(), pEditEngine->GetTextHeight() ); + Pen aPen( PEN_SOLID ); + aPen.SetColor( Color( COL_BLACK ) ); + pPrinter->SetPen( aPen ); + Rectangle aR( Point( 2000, 4000 ), aSz ); + pPrinter->DrawRect( aR ); + // So folgt auf IIISi, 75DPI kein Ausdruck! +// pPrinter->SetClipRegion( Region( aR ) ); + pEditEngine->Draw( pPrinter, Point( 2000, 4000 ), nRotation ); +// pPrinter->SetClipRegion(); + pPrinter->EndPage(); + pPrinter->EndJob(); + } + } + break; + case TB_SAVE: + case TB_SAVE2: + { + if ( !pFileDialogBox2->Execute() ) + return FALSE; + DirEntry aDirEntry( pFileDialogBox2->GetPath() ); +// DirEntry aDirEntry( String( RTL_CONSTASCII_USTRINGPARAM( "d:\\xxx.rtf" ) ) ); + SvFileStream aStrm( aDirEntry.GetFull(), STREAM_WRITE | STREAM_TRUNC ); + Application::EnterWait(); + if ( nId == TB_SAVE ) + { + if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "rtf") ) + pEditEngine->Write( aStrm, EE_FORMAT_RTF ); + else if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "bin" ) ) + pEditEngine->Write( aStrm, EE_FORMAT_BIN ); + else if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "html" ) ) + pEditEngine->Write( aStrm, EE_FORMAT_HTML ); + else if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "htm" ) ) + pEditEngine->Write( aStrm, EE_FORMAT_HTML ); + else + pEditEngine->Write( aStrm, EE_FORMAT_TEXT ); + } + else + { + if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "rtf" ) ) + pEditView->Write( aStrm, EE_FORMAT_RTF ); + else if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "bin" ) ) + pEditView->Write( aStrm, EE_FORMAT_BIN ); + else if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "html" ) ) + pEditView->Write( aStrm, EE_FORMAT_HTML ); + else if ( aDirEntry.GetExtension().EqualsIgnoreCaseAscii( "htm" ) ) + pEditView->Write( aStrm, EE_FORMAT_HTML ); + else + pEditView->Write( aStrm, EE_FORMAT_TEXT ); + } + Application::LeaveWait(); + } + break; + case TB_ATTRIBS: + { + SfxItemSet aCurSet = pEditView->GetAttribs(); + XubString aDebStr( String( RTL_CONSTASCII_USTRINGPARAM( "Attribute in Selektion:" ) ) ); + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "\nVorlage:" ) ); + XubString aStyle; +// pEditView->GetStyleSheet( aStyle, eFam ); + aDebStr += aStyle; + for ( USHORT nWhich = EE_ITEMS_START; nWhich <= EE_ITEMS_END; nWhich++) + { + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "\n" ) ); + aDebStr += String::CreateFromInt32( nWhich ); + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "\t" ) ); + if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF ) + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "---" ) ); + else if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_DONTCARE ) + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "XXX" ) ); + else if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_ON ) + { + const SfxPoolItem& rItem = aCurSet.Get( nWhich ); + switch ( nWhich ) + { + case EE_PARA_LRSPACE: + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "FI=" ) ); + aDebStr += String::CreateFromInt32( ((SvxLRSpaceItem&)rItem).GetTxtFirstLineOfst() ); + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( ", LI=" ) ); + aDebStr += String::CreateFromInt32( ((SvxLRSpaceItem&)rItem).GetTxtLeft() ); + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( ", RI=" ) ); + aDebStr += String::CreateFromInt32( ((SvxLRSpaceItem&)rItem).GetRight() ); + break; + case EE_PARA_ULSPACE: + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "SB=" ) ); + aDebStr += String::CreateFromInt32( ((SvxULSpaceItem&)rItem).GetUpper() ); + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( ", SA=" ) ); + aDebStr += String::CreateFromInt32( ((SvxULSpaceItem&)rItem).GetLower() ); + break; + case EE_PARA_SBL: + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "SBL=" ) ); + aDebStr += String::CreateFromInt32( ((SvxLineSpacingItem&)rItem).GetInterLineSpace() ); + break; + case EE_PARA_JUST: + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "SvxAdust=" ) ); + aDebStr += String::CreateFromInt32( (USHORT)((SvxAdjustItem&)rItem).GetAdjust() ); + break; + case EE_PARA_TABS: + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "Tabs = ?" ) ); + break; + case EE_CHAR_COLOR: + { + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "Color= " ) ); + Color aColor( ((SvxColorItem&)rItem).GetValue() ); + aDebStr += String::CreateFromInt32( aColor.GetRed() ); + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( ", " ) ); + aDebStr += String::CreateFromInt32( aColor.GetGreen() ); + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( ", " ) ); + aDebStr += String::CreateFromInt32( aColor.GetBlue() ); + } + break; + case EE_CHAR_FONTINFO: + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "Font=" ) ); + aDebStr += ((SvxFontItem&)rItem).GetFamilyName(); + break; + case EE_CHAR_FONTHEIGHT: + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "Groesse=" ) ); + aDebStr += String::CreateFromInt32( ((SvxFontHeightItem&)rItem).GetHeight() ); + break; + case EE_CHAR_WEIGHT: + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "FontWeight=" ) ); + aDebStr += String::CreateFromInt32( ((SvxWeightItem&)rItem).GetWeight() ); + break; + case EE_CHAR_UNDERLINE: + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "FontUnderline=" ) ); + aDebStr += String::CreateFromInt32( ((SvxUnderlineItem&)rItem).GetLineStyle() ); + break; + case EE_CHAR_WLM: + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "WordLineMode=" ) ); + aDebStr += String::CreateFromInt32( ((SvxWordLineModeItem&)rItem).GetValue() ); + break; + case EE_CHAR_STRIKEOUT: + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "FontStrikeout=" ) ); + aDebStr += String::CreateFromInt32( ((SvxCrossedOutItem&)rItem).GetStrikeout() ); + break; + case EE_CHAR_ITALIC: + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "FontPosture=" ) ); + aDebStr += String::CreateFromInt32( ((SvxPostureItem&)rItem).GetPosture() ); + break; + case EE_CHAR_OUTLINE: + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "FontOutline=" ) ); + aDebStr += String::CreateFromInt32( ((SvxContourItem&)rItem).GetValue() ); + break; + case EE_CHAR_SHADOW: + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "FontShadowed=" ) ); + aDebStr += String::CreateFromInt32( ((SvxShadowedItem&)rItem).GetValue() ); + break; + } + } + else + aDebStr += String( RTL_CONSTASCII_USTRINGPARAM( "?" ) ); + } + InfoBox( 0, aDebStr ).Execute(); + } + break; + } + + if ( pNewItem ) + { + SfxItemSet aSet = pEditView->GetEmptyItemSet(); + aSet.Put( *pNewItem ); + pEditView->SetAttribs( aSet ); + delete pNewItem; + } + UpdateToolBox(); + return 0; +} + +void EditMainWindow::CreatePolygon() +{ + EditView* pEditView = aViewWin.GetEditView(); + Size aSz = pEditView->GetWindow()->GetOutputSize(); + Point aOffset( aSz.Width()/8, aSz.Height()/8 ); + aSz.Width() *= 3; + aSz.Width() /= 4; + aSz.Height() *= 3; + aSz.Height() /= 4; + Polygon aPoly( 5 ); + aPoly.SetPoint( Point( aSz.Width()/2, 0 ), 0 ); + aPoly.SetPoint( Point( aSz.Width(), aSz.Height()/3 ), 1 ); + aPoly.SetPoint( Point( aSz.Width()/2, aSz.Height() ), 2 ); + aPoly.SetPoint( Point( 0, aSz.Height()/2 ), 3 ); + aPoly.SetPoint( Point( aSz.Width()/2, 0 ), 4 ); + PolyPolygon aPPoly( aPoly ); + pEditView->GetEditEngine()->SetPolygon( aPPoly ); + pEditView->SetOutputArea( Rectangle( aOffset, aSz ) ); + ULONG nWord = pEditView->GetControlWord(); + nWord &= ~(EV_CNTRL_AUTOSCROLL); + pEditView->SetControlWord( nWord ); + aViewWin.Invalidate(); +} + +void __EXPORT EditMainWindow::GetFocus() +{ + aViewWin.GrabFocus(); +} + +IMPL_LINK_INLINE_START( EditMainWindow, HScrollHdl, ScrollBar *, pScrl ) +{ + EditView* pEditView = aViewWin.GetEditView(); + pEditView->Scroll( -pScrl->GetDelta(), 0, RGCHK_PAPERSZ1 ); + return 0; +} +IMPL_LINK_INLINE_END( EditMainWindow, HScrollHdl, ScrollBar *, pScrl ) + +IMPL_LINK_INLINE_START( EditMainWindow, VScrollHdl, ScrollBar *, pScrl ) +{ + EditView* pEditView = aViewWin.GetEditView(); + pEditView->Scroll( 0, -pScrl->GetDelta(), RGCHK_PAPERSZ1 ); + return 0; +} +IMPL_LINK_INLINE_END( EditMainWindow, VScrollHdl, ScrollBar *, pScrl ) + +void EditMainWindow::SetScrollBarRanges() +{ + EditView* pEditView = aViewWin.GetEditView(); + long y = pEditView->GetEditEngine()->GetTextHeight(); + long x = pEditView->GetEditEngine()->GetPaperSize().Width(); + + aHScrollBar.SetRange( Range( 0, x ) ); + aVScrollBar.SetRange( Range( 0, y ) ); +} + +void EditMainWindow::SetScrollBars() +{ + EditView* pEditView = aViewWin.GetEditView(); + Size aSz = GetOutputSizePixel(); + Size aRealSz( aSz ); + long nScrollbarWidthPixel = aVScrollBar.GetSizePixel().Width(); + long nTBHeight = aToolBox.GetSizePixel().Height(); + aSz.Height() -= nTBHeight; + Size aOrgSz( aSz ); + + // VScroll... + aSz.Height() += 2; + Point aPoint( ( aSz.Width()- nScrollbarWidthPixel+1 ), -1+nTBHeight); + aSz.Width() = nScrollbarWidthPixel; + aVScrollBar.SetPosSizePixel( aPoint, aSz ); + + // HScroll... + aSz = aOrgSz; + Point aPoint2( 0, aRealSz.Height()-aHScrollBar.GetSizePixel().Height()+1 ); // TB-Height schon drin! + aSz.Width() -= aVScrollBar.GetSizePixel().Width(); + aSz.Width() += 2; + + aSz.Height() = nScrollbarWidthPixel; + aHScrollBar.SetPosSizePixel( aPoint2, aSz ); + + aHScrollBar.SetVisibleSize( pEditView->GetOutputArea().GetWidth() ); + aVScrollBar.SetVisibleSize( pEditView->GetOutputArea().GetHeight() ); + + SetScrollBarRanges(); + + aVScrollBar.Show(); + aHScrollBar.Show(); +} + +void __EXPORT EditMainWindow::Resize() +{ + long nBorder = aVScrollBar.GetSizePixel().Width(); + long nExtra = 10; + Size aTBSz = aToolBox.CalcWindowSizePixel(); + Size aOutSzPixel( GetOutputSizePixel() ); + aToolBox.SetSizePixel( Size( aOutSzPixel.Width(), aTBSz.Height()) ); + + aViewWin.SetSizePixel( Size( aOutSzPixel.Width()-nBorder-2*nExtra, aOutSzPixel.Height()-aTBSz.Height()-2*nExtra-nBorder) ); + + aViewWin.SetPosPixel( Point( nExtra, aTBSz.Height()+nExtra ) ); + + SetScrollBars(); + + EditView* pEditView = aViewWin.GetEditView(); + if ( pEditView && pEditView->GetEditEngine()->GetPolygon() ) + CreatePolygon(); +} + +IMPL_LINK( EditMainWindow, ShowStatus, EditStatus *, pStat ) +{ + EditView* pEditView = aViewWin.GetEditView(); + EditEngine* pEditEngine = pEditView->GetEditEngine(); + if ( ( pStat->GetStatusWord() & EE_STAT_TEXTWIDTHCHANGED ) || ( pStat->GetStatusWord() & EE_STAT_TEXTHEIGHTCHANGED ) ) + { + aViewWin.MarkOutputArea(); + if ( pEditEngine->GetTextHeight() < (ULONG)pEditView->GetOutputArea().GetHeight() ) + { + // Wird durch RGCHK_PAPERSZ1 'geklippt' + if ( !( pEditEngine->GetControlWord() & EE_CNTRL_AUTOPAGESIZE) ) + pEditView->Scroll( -(long)pEditEngine->CalcTextWidth(), -(long)pEditEngine->GetTextHeight(), RGCHK_PAPERSZ1 ); + } + SetScrollBarRanges(); + } + if ( pStat->GetStatusWord() & EE_STAT_HSCROLL ) + aHScrollBar.SetThumbPos( pEditView->GetVisArea().Left() ); + if ( pStat->GetStatusWord() & EE_STAT_VSCROLL ) + aVScrollBar.SetThumbPos( pEditView->GetVisArea().Top() ); + + return 0; +} + + +EditViewWindow::~EditViewWindow() +{ + // erst die angemeldeten Views zerstoeren + // (melden sich selbst ab) + MyView* pView = aViewList.First(); + while ( pView ) + { + delete pView; + pView = aViewList.Next(); + } + + pEditEngine->RemoveView( pEditView ); + delete pEditView; + // Beim Zerstoeren der Styles am Ende, EditEngine noch nicht kaputt, + // wird der Handler gerufen, ich zerstore hier aber schon die View! + pEditEngine->SetStatusEventHdl( Link() ); +// SvxAutoCorrect* pAutoCorrekt = pEditEngine->GetAutoCorrect(); +// pEditEngine->SetAutoCorrect( 0 ); +// delete pAutoCorrekt; + delete pEditEngine; +} + +EditViewWindow::EditViewWindow( Window* pParent ) : + Window( pParent ), aURLPtr( POINTER_HAND ) +{ + SetBackgroundBrush( Brush( Color( COL_WHITE ) ) ); + SetMapMode( MAP_100TH_MM ); +// EnableDrop(); + + SfxItemPool* pPool = EditEngine::CreatePool(); + Font aFont = GetSettings().GetStyleSettings().GetAppFont(); + MapMode aPntMode( MAP_POINT ); + MapMode aCurrent( GetMapMode() ); + Size aSz( LogicToLogic( Size( 12, 0 ), &aPntMode, &aCurrent ) ); + aFont.SetName( String( RTL_CONSTASCII_USTRINGPARAM( "Times New Roman" ) ) ); + pPool->SetPoolDefaultItem( SvxFontItem( aFont.GetFamily(), aFont.GetName(), String(),aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO ) ); + pPool->SetPoolDefaultItem( SvxFontHeightItem( aSz.Width(), 100, EE_CHAR_FONTHEIGHT ) ); + pEditEngine = new MyEditEngine( pPool ); + + Size aPaperSz( 10000,8000 ); + pEditEngine->SetPaperSize( aPaperSz ); + + pEditView = new EditView( pEditEngine, this ); + pEditView->SetBackgroundColor( Color( COL_WHITE ) ); + pEditView->SetOutputArea( Rectangle( Point( 100, 100 ), aPaperSz ) ); + pEditEngine->SetDefaultLanguage( LANGUAGE_ENGLISH ); + pEditEngine->InsertView( pEditView ); + + SetPosSizePixel( Point( 10, 10 ), Size( 600, 400 ) ); + SetPen( PEN_NULL ); + Show(); + + // Feldbefehle grau hinterlegen + ULONG n = pEditEngine->GetControlWord(); + n = n | (EE_CNTRL_MARKFIELDS|EE_CNTRL_AUTOCOMPLETE); + pEditEngine->SetControlWord( n ); + + // Test: Autozentrierung +// ULONG n = pEditEngine->GetControlWord(); +// n = n | EE_CNTRL_AUTOPAGESIZE; +// pEditEngine->SetControlWord( n ); + + // OneLineSpeling +#ifdef WNT +// pEditEngine->CreateSpeller( DirEntry( String( RTL_CONSTASCII_USTRINGPARAM( "n:\\offenv\\wnti" ) ) ), +// DirEntry( String( RTL_CONSTASCII_USTRINGPARAM( "n:\\offenv\\wnti" ) ) ) ); +// pEditEngine->GetSpeller()->SetActualLanguage( LANGUAGE_GERMAN ); +// pEditEngine->GetSpeller()->SetDefaultLanguage( LANGUAGE_GERMAN ); +// pEditEngine->GetSpeller()->SetMinTrail( 2 ); + + // AutoCorrect wird nie zerstoert +// pEditEngine->SetAutoCorrect( new SvxAutoCorrect( String( RTL_CONSTASCII_USTRINGPARAM( "d:\\prj\\office\\autotext\\autocorr.dat" ) ) ) ); +#endif +} + +void __EXPORT EditViewWindow::Paint( const Rectangle& rRec ) +{ + if ( pEditView->GetEditEngine()->GetPolygon() ) + { + // Die Punkte des Polygons beziehen sich auf die View... + MapMode aMapMode( GetMapMode() ); + aMapMode.SetOrigin( pEditView->GetOutputArea().TopLeft() ); + SetMapMode( aMapMode ); + DrawPolyPolygon( *pEditView->GetEditEngine()->GetPolygon() ); + aMapMode.SetOrigin( Point() ); + SetMapMode( aMapMode ); + } + pEditView->Paint( rRec ); + MarkOutputArea(); +} + +void EditViewWindow::MarkOutputArea() +{ + static Rectangle aCurFrame; + Rectangle aOutArea( pEditView->GetOutputArea() ); + aOutArea = LogicToPixel( aOutArea ); + aOutArea.Left()--; + aOutArea.Right()++; + aOutArea.Top()--; + aOutArea.Bottom()++; + aOutArea = PixelToLogic( aOutArea ); + SetPen( Pen( Color( COL_RED ) ) ); + SetFillInBrush( Brush( BRUSH_NULL ) ); + DrawRect( aOutArea ); + if ( !aCurFrame.IsEmpty() ) + { + if ( aCurFrame.Left() < aOutArea.Left() ) + Invalidate( Rectangle( aCurFrame.TopLeft(), Size( aOutArea.Left()-aCurFrame.Left(), aCurFrame.GetHeight() ) ) ); + if ( aCurFrame.Right() > aOutArea.Right() ) + { + long nW = aCurFrame.Right() - aOutArea.Right(); + Point aPos( aCurFrame.TopRight() ); + aPos.X() -= nW; + Invalidate( Rectangle( aPos, Size( nW, aCurFrame.GetHeight() ) ) ); + } + if ( aCurFrame.Top() < aOutArea.Top() ) + Invalidate( Rectangle( aCurFrame.TopLeft(), Size( aCurFrame.GetWidth(), aOutArea.Top() - aCurFrame.Top() ) ) ); + if ( aCurFrame.Bottom() > aOutArea.Bottom() ) + { + long nH = aCurFrame.Bottom() - aOutArea.Bottom(); + Point aPos( aCurFrame.BottomLeft() ); + aPos.Y() -= nH; + Invalidate( Rectangle( aPos, Size( aCurFrame.GetWidth(), nH ) ) ); + } + } + aCurFrame = aOutArea; +} + +void __EXPORT EditViewWindow::Resize() +{ + Size aPaperSz( GetOutputSize() ); + pEditView->SetOutputArea( Rectangle( Point(0,0), aPaperSz ) ); + pEditEngine->SetPaperSize( Size( aPaperSz.Width()*1, aPaperSz.Height()*1 ) ); + pEditView->ShowCursor(); + Invalidate(); +} + +void __EXPORT EditViewWindow::KeyInput( const KeyEvent& rKEvt ) +{ + sal_Unicode nCharCode = rKEvt.GetCharCode(); + + USHORT nCode = rKEvt.GetKeyCode().GetCode(); + // Auswertung fuer besondere Einstellungen.... + if ( ( nCode == KEY_A) && rKEvt.GetKeyCode().IsMod1() ) + pEditView->SetSelection( ESelection( 0, 0, 0xFFFF, 0xFFFF ) ); + else if ( ( nCode == KEY_R ) && rKEvt.GetKeyCode().IsMod2() ) + Invalidate(); + else if ( ( nCode == KEY_L ) && rKEvt.GetKeyCode().IsMod2() ) + { + ULONG n = pEditEngine->GetControlWord(); + n = n | EE_CNTRL_ONECHARPERLINE; + pEditEngine->SetControlWord( n ); + pEditEngine->QuickFormatDoc(); + } + else if ( ( nCode == KEY_Z ) && rKEvt.GetKeyCode().IsMod2() ) + { + pEditView->RemoveAttribs(); + } + else if ( ( nCode == KEY_V ) && rKEvt.GetKeyCode().IsMod2() ) + { + pEditEngine->SetVertical( TRUE ); + Invalidate(); + } + else if ( ( ( nCode == KEY_ADD ) || ( nCode == KEY_SUBTRACT ) )&& rKEvt.GetKeyCode().IsMod2() ) + { + short nDiff = ( nCode == KEY_ADD ) ? (+5) : (-5); + if ( nZoom > 1000 ) + nDiff *= 20; + if ( nZoom <= 25 ) + nDiff /= 5; + if ( ( nZoom + nDiff ) > 0 ) + nZoom += nDiff; + MapMode aMapMode( MAP_100TH_MM, Point(0,0), Fraction(nZoom,100), Fraction(nZoom,100) ); + SetMapMode( aMapMode ); + ((EditMainWindow*)GetParent())->SetTitle(); + + if ( rKEvt.GetKeyCode().IsMod1() ) + { + InfoBox( 0, String( RTL_CONSTASCII_USTRINGPARAM( "ChangingRefMapMode..." ) ) ).Execute(); + pEditEngine->SetRefMapMode( aMapMode ); + } + Invalidate(); + } + else if ( rKEvt.GetKeyCode().IsMod2() && + ( ( nCode == KEY_UP) || ( nCode == KEY_DOWN ) || + ( nCode == KEY_LEFT ) || ( nCode == KEY_RIGHT ) ) ) + { + if( rKEvt.GetKeyCode().IsMod1() ) + { + ULONG nCtrl = pEditEngine->GetControlWord(); + if ( ! ( nCtrl & EE_CNTRL_STRETCHING ) ) + { + nCtrl |= EE_CNTRL_STRETCHING; + pEditEngine->SetControlWord( nCtrl ); + } + USHORT nX, nY; + pEditEngine->GetGlobalCharStretching( nX, nY ); + if ( ( nCode == KEY_DOWN ) && ( nY > 5 ) ) + nY += 5; + else if ( nCode == KEY_UP ) + nY -= 5; + else if ( nCode == KEY_RIGHT ) + nX += 5; + else if ( ( nCode == KEY_LEFT ) && ( nX > 5 ) ) + nX -= 5; + pEditEngine->SetGlobalCharStretching( nX, nY ); + ((EditMainWindow*)GetParent())->SetTitle(); + } + else // ZeichenAttr + { + SfxItemSet aAttrs( pEditView->GetAttribs() ); + SfxItemSet aNewAttrs( pEditEngine->GetEmptyItemSet() ); + const SvxFontWidthItem& rItem = (const SvxFontWidthItem&)aAttrs.Get( EE_CHAR_FONTWIDTH ); + USHORT nProp = rItem.GetProp(); + if ( nCode == KEY_RIGHT ) + nProp += 5; + else if ( ( nCode == KEY_LEFT ) && ( nProp > 5 ) ) + nProp -= 5; + aNewAttrs.Put( SvxFontWidthItem( 0, nProp, EE_CHAR_FONTWIDTH ) ); + pEditView->SetAttribs( aNewAttrs ); + } + } + else if ( ( nCode == KEY_O ) && rKEvt.GetKeyCode().IsMod2() ) + { + MapMode aMapMode( GetMapMode() ); + aMapMode.SetOrigin( Point( 41, 41 ) ); + SetMapMode( aMapMode ); + Invalidate(); + } + else if ( ( nCode == KEY_B ) && rKEvt.GetKeyCode().IsMod2() ) + { + SfxItemSet aSet = pEditView->GetEmptyItemSet(); + aSet.Put( SvxFontHeightItem(800, 100, EE_CHAR_FONTHEIGHT) ); + pEditView->SetAttribs( aSet ); + } + else if ( ( nCode == KEY_P ) && rKEvt.GetKeyCode().IsMod2() ) + { +// ESelection aSel = pEditView->GetSelection(); +// for ( ULONG n = aSel.nStartPara; n <= aSel.nEndPara; n++ ) +// { +// InfoBox( 0, pEditEngine->GetText( n ) ).Execute(); +// } + InfoBox( 0, pEditView->GetSelected() ).Execute(); + + } + else if ( rKEvt.GetKeyCode().IsMod2() && + ( nCode >= KEY_1 ) && ( nCode <= KEY_9 ) ) + { + ULONG nEECtrl = pEditEngine->GetControlWord(); + nEECtrl = nEECtrl | EE_CNTRL_AUTOPAGESIZE; + pEditEngine->SetControlWord( nEECtrl ); + + ULONG nEVCtrl = pEditView->GetControlWord(); + nEVCtrl |= EV_CNTRL_AUTOSIZE; + pEditView->SetControlWord( nEVCtrl ); + + pEditView->SetAnchorMode( (EVAnchorMode)(nCode-KEY_1) ); + pEditView->SetOutputArea( Rectangle( Point(0,0), GetOutputSize() ) ); + pEditEngine->SetMaxAutoPaperSize( GetOutputSize() ); + pEditEngine->SetPaperSize( Size( 0, 0 ) ); + } + else if ( rKEvt.GetKeyCode().IsMod2() && ( nCode == KEY_0 ) ) + { + ULONG nEVCtrl = pEditView->GetControlWord(); + nEVCtrl = nEVCtrl | EV_CNTRL_AUTOSIZE; + pEditView->SetControlWord( nEVCtrl ); + + Size aOutSz( GetOutputSize() ); + Size aPaperSz( aOutSz.Width() / 2, 0 ); + pEditView->SetOutputArea( Rectangle( Point(), aPaperSz ) ); + pEditEngine->SetPaperSize( aPaperSz ); + // Max-Height wird bei View verwendet, + // MinSize/MaxSize nur, wenn AUTOPAGESIZE ( KEY_1 - KEY_9 ) + pEditEngine->SetMaxAutoPaperSize( Size( aOutSz.Width() / 2, aOutSz.Height() / 2 ) ); + pEditEngine->SetMinAutoPaperSize( Size( aOutSz.Width() / 8, aOutSz.Height() / 8 ) ); + } + else if ( ( nCode == KEY_J ) && rKEvt.GetKeyCode().IsMod2() ) + { + Size aTextSz( pEditEngine->CalcTextWidth(), pEditEngine->GetTextHeight() ); + Rectangle aRect( pEditView->GetOutputArea().TopLeft(), aTextSz ); + Brush aTmpBrush( Color( COL_LIGHTBLUE ), BRUSH_25 ); + Brush aOldBrush( GetFillInBrush() ); + SetFillInBrush( aTmpBrush ); + DrawRect( aRect ); + SetFillInBrush( aOldBrush ); + pEditView->Paint( aRect ); + } + else if ( ( nCode == KEY_H ) && rKEvt.GetKeyCode().IsMod2() ) + { + Push(); + Size aSz( pEditEngine->CalcTextWidth(), pEditEngine->GetTextHeight() ); + Pen aPen( PEN_SOLID ); + Brush aBrush( Color( COL_GRAY ), BRUSH_SOLID ); + aPen.SetColor( Color( COL_BLACK ) ); + SetPen( aPen ); + SetFillInBrush( aBrush ); + Rectangle aR( pEditView->GetOutputArea().TopLeft(), aSz ); + DrawRect( aR ); + Pop(); + pEditEngine->Draw( this, pEditView->GetOutputArea() ); + pEditView->ShowCursor( TRUE, TRUE ); + } + + // Eingabe an EditEngine... + else + { + BOOL bDone = pEditView->PostKeyEvent( rKEvt ); + if ( !bDone ) + Window::KeyInput( rKEvt ); + } + + ((EditMainWindow*)GetParent())->UpdateToolBox(); +} + +void __EXPORT EditViewWindow::MouseMove( const MouseEvent& rMEvt ) +{ + Point aPos = PixelToLogic( rMEvt.GetPosPixel() ); + if ( pEditView->GetOutputArea().IsInside( aPos ) ) + { + const SvxFieldItem* pField = pEditView->GetFieldUnderMousePointer(); + if ( pField ) + SetPointer( aURLPtr ); + else + SetPointer( pEditView->GetPointer() ); + +// aPos -= pEditView->GetOutputArea().TopLeft(); +// aPos += pEditView->GetVisArea().TopLeft(); +// if ( pEditView->GetEditEngine()->IsTextPos( aPos, PixelToLogic( Size( 5, 0 ) ).Width() ) ) +// SetPointer( pEditView->GetPointer() ); +// else +// SetPointer( Pointer( POINTER_REFHAND ) ); + + } + else + SetPointer( aStdPtr ); + +// static long x = 0; +// x++; +// DBG_ASSERT( x < 1000, String( RTL_CONSTASCII_USTRINGPARAM( "?" ) ) ); + pEditView->MouseMove( rMEvt ); +} + +void __EXPORT EditViewWindow::MouseButtonDown( const MouseEvent& rMEvt ) +{ + GrabFocus(); + pEditView->MouseButtonDown( rMEvt ); +} + +void __EXPORT EditViewWindow::MouseButtonUp( const MouseEvent& rMEvt ) +{ + pEditView->MouseButtonUp( rMEvt ); + ((EditMainWindow*)GetParent())->UpdateToolBox(); +} + +void __EXPORT EditViewWindow::Command( const CommandEvent& rCEvt ) +{ + if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU ) + { + if( pEditView->IsWrongSpelledWordAtPos( rCEvt.GetMousePosPixel() ) ) + pEditView->ExecuteSpellPopup( rCEvt.GetMousePosPixel() ); + } + else + pEditView->Command(rCEvt); + +} + +BOOL __EXPORT EditViewWindow::Drop( const DropEvent& rEvt ) +{ + return pEditView->Drop( rEvt ); +} + +BOOL __EXPORT EditViewWindow::QueryDrop( DropEvent& rEvt ) +{ + return pEditView->QueryDrop( rEvt ); +} + +// --- aEditApp ------------------------------------------------------ + +void __EXPORT EditApp::Main() +{ +#ifdef WNT + SvFactory::Init(); +#endif + + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xSMgr = createApplicationServiceManager(); + ::comphelper::setProcessServiceFactory( xSMgr ); + + EditDLL aEditDll; + SvxGlobalItemData aItemData; + SvxFieldItem::GetClassManager().SV_CLASS_REGISTER( SvxDateField ); + SvxFieldItem::GetClassManager().SV_CLASS_REGISTER( SvxURLField ); + + Help::EnableQuickHelp(); + + EditMainWindow aWindow; + Execute(); +} + +EditApp aEditApp; diff --git a/svx/workben/msview/makefile.mk b/svx/workben/msview/makefile.mk index 2ce9d573de1c..2ce9d573de1c 100644..100755 --- a/svx/workben/msview/makefile.mk +++ b/svx/workben/msview/makefile.mk diff --git a/svx/workben/msview/msview.cxx b/svx/workben/msview/msview.cxx index a19838eec26b..a19838eec26b 100644..100755 --- a/svx/workben/msview/msview.cxx +++ b/svx/workben/msview/msview.cxx diff --git a/svx/workben/msview/msview.xml b/svx/workben/msview/msview.xml index 6daffa62be2d..6daffa62be2d 100644..100755 --- a/svx/workben/msview/msview.xml +++ b/svx/workben/msview/msview.xml diff --git a/svx/workben/msview/xmlconfig.cxx b/svx/workben/msview/xmlconfig.cxx index 62f414c15460..62f414c15460 100644..100755 --- a/svx/workben/msview/xmlconfig.cxx +++ b/svx/workben/msview/xmlconfig.cxx diff --git a/svx/workben/msview/xmlconfig.hxx b/svx/workben/msview/xmlconfig.hxx index 3bc270fe820d..3bc270fe820d 100644..100755 --- a/svx/workben/msview/xmlconfig.hxx +++ b/svx/workben/msview/xmlconfig.hxx |