summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xavmedia/inc/avmedia/mediawindow.hxx1
-rwxr-xr-xavmedia/source/framework/soundhandler.cxx1
-rwxr-xr-xavmedia/source/framework/soundhandler.hxx1
-rwxr-xr-xavmedia/source/gstreamer/gstplayer.cxx1
-rwxr-xr-xavmedia/source/gstreamer/gstwindow.cxx34
-rwxr-xr-xavmedia/source/gstreamer/gstwindow.hxx1
-rwxr-xr-xavmedia/source/quicktime/player.cxx2
-rwxr-xr-xavmedia/source/quicktime/player.hxx6
-rwxr-xr-xavmedia/source/quicktime/quicktimecommon.hxx1
-rwxr-xr-xavmedia/source/quicktime/window.cxx2
-rwxr-xr-xavmedia/source/viewer/mediawindowbase_impl.cxx5
-rwxr-xr-xavmedia/source/win/window.cxx1
-rwxr-xr-xbasic/source/app/app.cxx2
-rwxr-xr-xbasic/source/basmgr/basicmanagerrepository.cxx2
-rwxr-xr-xbasic/source/classes/sbxmod.cxx2
-rwxr-xr-xbasic/source/runtime/runtime.cxx2
-rwxr-xr-xbasic/source/uno/dlgcont.cxx8
-rwxr-xr-xbasic/source/uno/namecont.cxx42
-rwxr-xr-xbasic/source/uno/scriptcont.cxx10
-rwxr-xr-xconnectivity/inc/connectivity/DateConversion.hxx20
-rwxr-xr-xconnectivity/source/commontools/DateConversion.cxx4
-rwxr-xr-xconnectivity/source/commontools/FDatabaseMetaDataResultSet.cxx2
-rwxr-xr-xconnectivity/source/commontools/FValue.cxx14
-rwxr-xr-xconnectivity/source/commontools/TSkipDeletedSet.cxx2
-rwxr-xr-xconnectivity/source/commontools/TTableHelper.cxx4
-rwxr-xr-xconnectivity/source/commontools/dbexception.cxx2
-rwxr-xr-xconnectivity/source/commontools/dbtools.cxx8
-rwxr-xr-xconnectivity/source/commontools/dbtools2.cxx4
-rwxr-xr-xconnectivity/source/cpool/ZPoolCollection.cxx2
-rwxr-xr-xconnectivity/source/drivers/adabas/BDriver.cxx2
-rwxr-xr-xconnectivity/source/drivers/ado/AConnection.cxx4
-rwxr-xr-xconnectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx2
-rwxr-xr-xconnectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx2
-rwxr-xr-xconnectivity/source/drivers/ado/adoimp.cxx6
-rwxr-xr-xconnectivity/source/drivers/dbase/DNoException.cxx12
-rwxr-xr-xconnectivity/source/drivers/dbase/DTable.cxx4
-rwxr-xr-xconnectivity/source/drivers/dbase/dindexnode.cxx12
-rwxr-xr-xconnectivity/source/drivers/evoab/LDriver.cxx2
-rwxr-xr-xconnectivity/source/drivers/evoab2/NServices.cxx2
-rwxr-xr-xconnectivity/source/drivers/evoab2/NStatement.cxx4
-rwxr-xr-xconnectivity/source/drivers/file/FConnection.cxx2
-rwxr-xr-xconnectivity/source/drivers/file/FDatabaseMetaData.cxx2
-rwxr-xr-xconnectivity/source/drivers/file/FDateFunctions.cxx4
-rwxr-xr-xconnectivity/source/drivers/file/FResultSet.cxx2
-rwxr-xr-xconnectivity/source/drivers/file/FTable.cxx4
-rwxr-xr-xconnectivity/source/drivers/file/fanalyzer.cxx2
-rwxr-xr-xconnectivity/source/drivers/file/fcomp.cxx8
-rwxr-xr-xconnectivity/source/drivers/hsqldb/HDriver.cxx4
-rwxr-xr-xconnectivity/source/drivers/hsqldb/HStorageAccess.cxx8
-rwxr-xr-xconnectivity/source/drivers/hsqldb/HStorageMap.cxx10
-rwxr-xr-xconnectivity/source/drivers/hsqldb/StorageFileAccess.cxx6
-rwxr-xr-xconnectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx6
-rwxr-xr-xconnectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx2
-rwxr-xr-xconnectivity/source/drivers/jdbc/ResultSet.cxx2
-rwxr-xr-xconnectivity/source/drivers/kab/KDatabaseMetaData.cxx2
-rwxr-xr-xconnectivity/source/drivers/kab/KDriver.cxx2
-rwxr-xr-xconnectivity/source/drivers/macab/MacabDatabaseMetaData.cxx2
-rwxr-xr-xconnectivity/source/drivers/macab/MacabDriver.cxx2
-rwxr-xr-xconnectivity/source/drivers/macab/MacabRecords.cxx2
-rwxr-xr-xconnectivity/source/drivers/mozab/MColumnAlias.cxx2
-rwxr-xr-xconnectivity/source/drivers/mozab/MConnection.cxx6
-rwxr-xr-xconnectivity/source/drivers/mozab/MDriver.cxx2
-rwxr-xr-xconnectivity/source/drivers/mozab/MResultSet.cxx6
-rwxr-xr-xconnectivity/source/drivers/mozab/MResultSetMetaData.cxx2
-rwxr-xr-xconnectivity/source/drivers/mozab/MStatement.cxx2
-rwxr-xr-xconnectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx12
-rwxr-xr-xconnectivity/source/drivers/odbc/ORealDriver.cxx2
-rwxr-xr-xconnectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx2
-rwxr-xr-xconnectivity/source/drivers/odbcbase/OResultSet.cxx6
-rwxr-xr-xconnectivity/source/drivers/odbcbase/OStatement.cxx8
-rwxr-xr-xconnectivity/source/drivers/odbcbase/OTools.cxx2
-rwxr-xr-xconnectivity/source/inc/ado/Aolewrap.hxx2
-rwxr-xr-xconnectivity/source/parse/sqlbison.y4
-rwxr-xr-xconnectivity/source/parse/sqlflex.l2
-rwxr-xr-xconnectivity/source/parse/sqliterator.cxx6
-rwxr-xr-xconnectivity/source/parse/sqlnode.cxx12
-rwxr-xr-xconnectivity/source/sdbcx/VCatalog.cxx2
-rwxr-xr-xconnectivity/source/sdbcx/VIndex.cxx2
-rwxr-xr-xconnectivity/source/sdbcx/VUser.cxx2
-rwxr-xr-xdesktop/source/app/app.cxx6
-rwxr-xr-xdesktop/source/app/check_ext_deps.cxx4
-rwxr-xr-xdesktop/source/deployment/dp_log.cxx4
-rwxr-xr-xdesktop/source/deployment/dp_persmap.cxx4
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_dialog2.cxx8
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx2
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_extlistbox.cxx2
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_theextmgr.cxx2
-rwxr-xr-xdesktop/source/deployment/manager/dp_extensionmanager.cxx4
-rwxr-xr-xdesktop/source/deployment/manager/dp_informationprovider.cxx2
-rwxr-xr-xdesktop/source/deployment/manager/dp_manager.cxx6
-rwxr-xr-xdesktop/source/deployment/manager/dp_managerfac.cxx2
-rwxr-xr-xdesktop/source/deployment/misc/dp_misc.cxx6
-rwxr-xr-xdesktop/source/deployment/misc/dp_platform.cxx2
-rwxr-xr-xdesktop/source/deployment/registry/dp_backend.cxx2
-rwxr-xr-xdesktop/source/deployment/registry/dp_registry.cxx2
-rwxr-xr-xdesktop/source/deployment/registry/package/dp_package.cxx12
-rwxr-xr-xdesktop/source/migration/services/autocorrmigration.cxx2
-rwxr-xr-xdesktop/source/migration/services/basicmigration.cxx2
-rwxr-xr-xdesktop/source/migration/services/jvmfwk.cxx5
-rwxr-xr-xdesktop/source/migration/services/oo3extensionmigration.cxx2
-rwxr-xr-xdesktop/source/migration/services/wordbookmigration.cxx2
-rwxr-xr-xdesktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx2
-rwxr-xr-xdesktop/source/pkgchk/unopkg/unopkg_misc.cxx2
-rwxr-xr-xdrawinglayer/source/primitive2d/metafileprimitive2d.cxx6
-rwxr-xr-xdrawinglayer/source/processor2d/vclmetafileprocessor2d.cxx4
-rwxr-xr-xediteng/inc/editeng/numitem.hxx3
-rwxr-xr-xediteng/inc/editeng/outliner.hxx2
-rwxr-xr-xediteng/inc/editeng/txtrange.hxx28
-rwxr-xr-xediteng/source/accessibility/AccessibleEditableTextPara.cxx4
-rwxr-xr-xediteng/source/editeng/editdoc.cxx11
-rwxr-xr-xediteng/source/editeng/editdoc.hxx1
-rwxr-xr-xediteng/source/editeng/editobj.cxx6
-rwxr-xr-xediteng/source/editeng/editview.cxx15
-rwxr-xr-xediteng/source/editeng/edtspell.cxx3
-rwxr-xr-xediteng/source/editeng/eehtml.cxx3
-rwxr-xr-xediteng/source/editeng/eerdll.cxx5
-rwxr-xr-xediteng/source/editeng/eertfpar.hxx3
-rwxr-xr-xediteng/source/editeng/impedit.cxx4
-rwxr-xr-xediteng/source/editeng/impedit.hxx2
-rwxr-xr-xediteng/source/editeng/impedit2.cxx35
-rw-r--r--editeng/source/editeng/impedit3.cxx875
-rw-r--r--editeng/source/editeng/impedit4.cxx92
-rw-r--r--editeng/source/items/frmitems.cxx26
-rwxr-xr-xediteng/source/items/itemtype.cxx4
-rw-r--r--editeng/source/items/paraitem.cxx2
-rw-r--r--editeng/source/items/textitem.cxx18
-rw-r--r--editeng/source/misc/txtrange.cxx124
-rwxr-xr-xediteng/source/outliner/outlin2.cxx2
-rwxr-xr-xediteng/source/outliner/outlobj.cxx2
-rw-r--r--editeng/source/outliner/outlvw.cxx7
-rw-r--r--editeng/source/rtf/svxrtf.cxx4
-rwxr-xr-xembeddedobj/source/commonembedding/persistence.cxx4
-rwxr-xr-xfpicker/source/office/commonpicker.cxx2
-rwxr-xr-xfpicker/source/win32/filepicker/FilePicker.cxx2
-rwxr-xr-xfpicker/source/win32/filepicker/asynceventnotifier.cxx2
-rwxr-xr-xfpicker/source/win32/filepicker/customcontrolfactory.cxx2
-rwxr-xr-xfpicker/source/win32/filepicker/helppopupwindow.cxx2
-rwxr-xr-xframework/source/services/autorecovery.cxx2
-rwxr-xr-xframework/source/uielement/dropdownboxtoolbarcontroller.cxx2
-rwxr-xr-xframework/source/uielement/menubarmanager.cxx2
-rwxr-xr-xidl/source/objects/object.cxx14
-rwxr-xr-xidl/source/prj/database.cxx2
-rwxr-xr-xlinguistic/source/lngopt.cxx2
-rwxr-xr-xlinguistic/source/lngsvcmgr.cxx44
-rwxr-xr-xlinguistic/source/lngsvcmgr.hxx6
-rwxr-xr-xscripting/source/inc/util/MiscUtils.hxx4
-rwxr-xr-xscripting/source/provider/BrowseNodeFactoryImpl.cxx2
-rwxr-xr-xscripting/source/provider/URIHelper.cxx6
-rwxr-xr-xscripting/source/pyprov/mailmerge.py3
-rwxr-xr-xscripting/source/pyprov/makefile.mk7
-rwxr-xr-xscripting/source/pyprov/pythonscript.py33
-rwxr-xr-xscripting/source/stringresource/stringresource.cxx10
-rwxr-xr-xsfx2/sdi/frmslots.sdi6
-rwxr-xr-xsfx2/source/appl/app.cxx40
-rwxr-xr-xsfx2/source/appl/appcfg.cxx24
-rwxr-xr-xsfx2/source/appl/appchild.cxx20
-rwxr-xr-xsfx2/source/appl/appdde.cxx214
-rwxr-xr-xsfx2/source/appl/appinit.cxx4
-rwxr-xr-xsfx2/source/appl/appmain.cxx43
-rwxr-xr-xsfx2/source/appl/appmisc.cxx26
-rwxr-xr-xsfx2/source/appl/appopen.cxx52
-rwxr-xr-xsfx2/source/appl/appquit.cxx16
-rwxr-xr-xsfx2/source/appl/appreg.cxx6
-rwxr-xr-xsfx2/source/appl/appserv.cxx20
-rwxr-xr-xsfx2/source/appl/appuno.cxx32
-rwxr-xr-xsfx2/source/appl/childwin.cxx46
-rwxr-xr-xsfx2/source/appl/fileobj.cxx99
-rwxr-xr-xsfx2/source/appl/fileobj.hxx3
-rwxr-xr-xsfx2/source/appl/imestatuswindow.cxx8
-rwxr-xr-xsfx2/source/appl/impldde.cxx2
-rwxr-xr-xsfx2/source/appl/linkmgr2.cxx16
-rwxr-xr-xsfx2/source/appl/lnkbase2.cxx69
-rwxr-xr-xsfx2/source/appl/module.cxx4
-rwxr-xr-xsfx2/source/appl/opengrf.cxx6
-rwxr-xr-xsfx2/source/appl/shutdowniconaqua.mm6
-rwxr-xr-xsfx2/source/appl/workwin.cxx5
-rwxr-xr-xsfx2/source/bastyp/fltfnc.cxx5
-rwxr-xr-xsfx2/source/bastyp/frmhtml.cxx2
-rwxr-xr-xsfx2/source/bastyp/frmhtmlw.cxx2
-rwxr-xr-xsfx2/source/bastyp/sfxhtml.cxx6
-rwxr-xr-xsfx2/source/control/bindings.cxx16
-rwxr-xr-xsfx2/source/control/ctrlitem.cxx2
-rwxr-xr-xsfx2/source/control/dispatch.cxx22
-rwxr-xr-xsfx2/source/control/macro.cxx26
-rwxr-xr-xsfx2/source/control/objface.cxx12
-rwxr-xr-xsfx2/source/control/request.cxx314
-rwxr-xr-xsfx2/source/control/shell.cxx526
-rwxr-xr-xsfx2/source/control/statcach.cxx67
-rwxr-xr-xsfx2/source/control/unoctitm.cxx13
-rwxr-xr-xsfx2/source/dialog/about.cxx8
-rwxr-xr-xsfx2/source/dialog/basedlgs.cxx217
-rwxr-xr-xsfx2/source/dialog/dinfdlg.cxx16
-rwxr-xr-xsfx2/source/dialog/dockwin.cxx302
-rwxr-xr-xsfx2/source/dialog/filtergrouping.cxx2
-rwxr-xr-xsfx2/source/dialog/mailmodel.cxx19
-rwxr-xr-xsfx2/source/dialog/mgetempl.cxx155
-rwxr-xr-xsfx2/source/dialog/navigat.cxx4
-rwxr-xr-xsfx2/source/dialog/partwnd.cxx7
-rwxr-xr-xsfx2/source/dialog/splitwin.cxx287
-rwxr-xr-xsfx2/source/dialog/styfitem.cxx6
-rwxr-xr-xsfx2/source/dialog/styledlg.cxx35
-rwxr-xr-xsfx2/source/dialog/tabdlg.cxx415
-rwxr-xr-xsfx2/source/dialog/taskpane.cxx2
-rwxr-xr-xsfx2/source/dialog/templdlg.cxx241
-rwxr-xr-xsfx2/source/dialog/tplcitem.cxx19
-rwxr-xr-xsfx2/source/dialog/tplpitem.cxx6
-rwxr-xr-xsfx2/source/dialog/versdlg.cxx4
-rwxr-xr-xsfx2/source/doc/DocumentMetadataAccess.cxx2
-rwxr-xr-xsfx2/source/doc/Metadatable.cxx22
-rwxr-xr-xsfx2/source/doc/SfxDocumentMetaData.cxx4
-rwxr-xr-xsfx2/source/doc/doc.src2
-rwxr-xr-xsfx2/source/doc/docfac.cxx8
-rwxr-xr-xsfx2/source/doc/docfile.cxx36
-rwxr-xr-xsfx2/source/doc/doctdlg.cxx2
-rwxr-xr-xsfx2/source/doc/doctempl.cxx487
-rwxr-xr-xsfx2/source/doc/doctemplates.cxx8
-rwxr-xr-xsfx2/source/doc/docvor.cxx408
-rwxr-xr-xsfx2/source/doc/frmdescr.cxx2
-rwxr-xr-xsfx2/source/doc/new.cxx10
-rwxr-xr-xsfx2/source/doc/objcont.cxx76
-rwxr-xr-xsfx2/source/doc/objembed.cxx10
-rwxr-xr-xsfx2/source/doc/objmisc.cxx217
-rwxr-xr-xsfx2/source/doc/objserv.cxx44
-rwxr-xr-xsfx2/source/doc/objstor.cxx188
-rwxr-xr-xsfx2/source/doc/objxtor.cxx81
-rwxr-xr-xsfx2/source/doc/printhelper.cxx11
-rwxr-xr-xsfx2/source/doc/sfxbasemodel.cxx6
-rwxr-xr-xsfx2/source/inc/appdata.hxx8
-rwxr-xr-xsfx2/source/inc/mnucfga.hxx2
-rwxr-xr-xsfx2/source/inc/objshimp.hxx14
-rwxr-xr-xsfx2/source/inc/openflag.hxx11
-rwxr-xr-xsfx2/source/inc/sfxtypes.hxx4
-rwxr-xr-xsfx2/source/inc/statcach.hxx18
-rwxr-xr-xsfx2/source/inc/templdgi.hxx10
-rwxr-xr-xsfx2/source/inc/virtmenu.hxx2
-rwxr-xr-xsfx2/source/inc/workwin.hxx33
-rwxr-xr-xsfx2/source/menu/mnuitem.cxx21
-rwxr-xr-xsfx2/source/menu/mnumgr.cxx6
-rwxr-xr-xsfx2/source/menu/objmnctl.cxx23
-rwxr-xr-xsfx2/source/menu/thessubmenu.cxx14
-rwxr-xr-xsfx2/source/menu/thessubmenu.hxx2
-rwxr-xr-xsfx2/source/menu/virtmenu.cxx95
-rwxr-xr-xsfx2/source/statbar/stbitem.cxx157
-rwxr-xr-xsfx2/source/toolbox/tbxitem.cxx70
-rwxr-xr-xsfx2/source/view/frame.cxx71
-rwxr-xr-xsfx2/source/view/frame2.cxx3
-rwxr-xr-xsfx2/source/view/orgmgr.cxx263
-rwxr-xr-xsfx2/source/view/printer.cxx32
-rwxr-xr-xsfx2/source/view/sfxbasecontroller.cxx6
-rwxr-xr-xsfx2/source/view/userinputinterception.cxx2
-rwxr-xr-xsfx2/source/view/viewfrm.cxx346
-rwxr-xr-xsfx2/source/view/viewfrm2.cxx62
-rwxr-xr-xsfx2/source/view/viewprn.cxx68
-rwxr-xr-xsfx2/source/view/viewsh.cxx471
-rwxr-xr-xsfx2/workben/custompanel/ctp_factory.cxx2
-rwxr-xr-xshell/source/cmdmail/cmdmailsuppl.cxx2
-rwxr-xr-xshell/source/unix/sysshell/recently_used_file_handler.cxx6
-rwxr-xr-xshell/source/win32/simplemail/senddoc.cxx4
-rwxr-xr-xsvx/inc/svx/dialogs.hrc17
-rwxr-xr-xsvx/inc/svx/fmpage.hxx2
-rwxr-xr-xsvx/inc/svx/svditer.hxx31
-rwxr-xr-xsvx/inc/svx/unomodel.hxx4
-rwxr-xr-xsvx/source/accessibility/AccessibleTextHelper.cxx18
-rwxr-xr-xsvx/source/accessibility/svxrectctaccessiblecontext.cxx4
-rwxr-xr-xsvx/source/customshapes/EnhancedCustomShape2d.cxx2
-rwxr-xr-xsvx/source/dialog/SpellDialogChildWindow.cxx12
-rwxr-xr-xsvx/source/dialog/rubydialog.cxx2
-rwxr-xr-xsvx/source/dialog/sdstring.src70
-rwxr-xr-xsvx/source/fmcomp/fmgridcl.cxx4
-rwxr-xr-xsvx/source/fmcomp/gridcell.cxx16
-rwxr-xr-xsvx/source/fmcomp/trace.cxx8
-rwxr-xr-xsvx/source/form/dataaccessdescriptor.cxx78
-rwxr-xr-xsvx/source/form/datanavi.cxx4
-rwxr-xr-xsvx/source/form/filtnav.cxx2
-rwxr-xr-xsvx/source/form/fmcontrollayout.cxx2
-rwxr-xr-xsvx/source/form/fmdocumentclassification.cxx2
-rwxr-xr-xsvx/source/form/fmmodel.cxx34
-rwxr-xr-xsvx/source/form/fmpage.cxx35
-rwxr-xr-xsvx/source/form/fmpgeimp.cxx2
-rwxr-xr-xsvx/source/form/fmshell.cxx21
-rwxr-xr-xsvx/source/form/fmshimp.cxx6
-rwxr-xr-xsvx/source/form/fmsrccfg.cxx4
-rwxr-xr-xsvx/source/form/fmsrcimp.cxx4
-rwxr-xr-xsvx/source/form/fmtextcontrolshell.cxx24
-rwxr-xr-xsvx/source/form/fmvwimp.cxx2
-rwxr-xr-xsvx/source/form/formcontrolling.cxx2
-rwxr-xr-xsvx/source/items/algitem.cxx2
-rwxr-xr-xsvx/source/sdr/contact/viewcontactofe3dscene.cxx2
-rwxr-xr-xsvx/source/sdr/contact/viewcontactofsdrpathobj.cxx2
-rwxr-xr-xsvx/source/sdr/contact/viewobjectcontactofunocontrol.cxx6
-rwxr-xr-xsvx/source/sdr/overlay/overlayobject.cxx2
-rwxr-xr-xsvx/source/svdraw/svdcrtv.cxx4
-rwxr-xr-xsvx/source/svdraw/svdedtv.cxx2
-rwxr-xr-xsvx/source/svdraw/svditer.cxx34
-rwxr-xr-xsvx/source/svdraw/svdmodel.cxx2
-rwxr-xr-xsvx/source/svdraw/svdoole2.cxx16
-rwxr-xr-xsvx/source/svdraw/svdopath.cxx2
-rwxr-xr-xsvx/source/svdraw/svdotxln.cxx4
-rwxr-xr-xsvx/source/svdraw/svdpage.cxx2
-rwxr-xr-xsvx/source/svdraw/svdpagv.cxx2
-rwxr-xr-xsvx/source/svdraw/svdview.cxx2
-rwxr-xr-xsvx/source/svdraw/svdxcgv.cxx4
-rwxr-xr-xsvx/source/table/svdotable.cxx2
-rwxr-xr-xsvx/source/table/tabledesign.cxx12
-rwxr-xr-xsvx/source/table/tablehandles.cxx2
-rwxr-xr-xsvx/source/table/tablelayouter.cxx4
-rwxr-xr-xsvx/source/tbxctrls/tbcontrl.cxx4
-rwxr-xr-xsvx/source/unodraw/unomod.cxx9
-rwxr-xr-xsvx/source/unodraw/unoprov.cxx22
-rwxr-xr-xsvx/source/unodraw/unoshap2.cxx2
-rwxr-xr-xsvx/source/unodraw/unoshap4.cxx2
-rwxr-xr-xsvx/source/unodraw/unoshape.cxx6
-rwxr-xr-xsvx/source/xoutdev/xtabbtmp.cxx4
-rwxr-xr-xsvx/source/xoutdev/xtabcolr.cxx4
-rwxr-xr-xsvx/source/xoutdev/xtabdash.cxx3
-rwxr-xr-xsvx/source/xoutdev/xtabgrdt.cxx4
-rwxr-xr-xsvx/source/xoutdev/xtabhtch.cxx4
-rwxr-xr-xsvx/source/xoutdev/xtablend.cxx3
-rwxr-xr-xsvx/workben/msview/xmlconfig.cxx2
-rwxr-xr-xucb/source/core/ucb.cxx28
-rwxr-xr-xucb/source/core/ucbcmds.cxx2
-rwxr-xr-xucb/source/ucp/expand/ucpexpand.cxx4
-rwxr-xr-xucb/source/ucp/ext/ucpext_content.cxx6
-rwxr-xr-xucb/source/ucp/ext/ucpext_datasupplier.cxx6
-rwxr-xr-xucb/source/ucp/file/bc.cxx15
-rwxr-xr-xucb/source/ucp/file/filinpstr.cxx4
-rwxr-xr-xucb/source/ucp/file/filstr.cxx4
-rwxr-xr-xucb/source/ucp/hierarchy/hierarchydatasource.cxx30
-rwxr-xr-xucb/source/ucp/hierarchy/hierarchyprovider.cxx3
-rwxr-xr-xucb/source/ucp/odma/odma_content.cxx2
-rwxr-xr-xucb/source/ucp/odma/odma_inputstream.cxx4
-rwxr-xr-xucb/source/ucp/tdoc/tdoc_content.cxx72
-rwxr-xr-xucb/source/ucp/tdoc/tdoc_datasupplier.cxx2
-rwxr-xr-xucb/source/ucp/tdoc/tdoc_docmgr.cxx6
-rwxr-xr-xucb/source/ucp/tdoc/tdoc_provider.cxx39
-rwxr-xr-xucb/source/ucp/tdoc/tdoc_stgelems.cxx8
-rwxr-xr-xucb/source/ucp/tdoc/tdoc_storage.cxx23
-rwxr-xr-xuui/source/iahndl.cxx13
-rwxr-xr-xvbahelper/inc/vbahelper/vbahelper.hxx8
-rwxr-xr-xvbahelper/source/msforms/vbacontrol.hxx2
-rwxr-xr-xvbahelper/source/vbahelper/vbadocumentbase.cxx2
-rwxr-xr-xxmlhelp/source/cxxhelp/provider/databases.cxx8
-rwxr-xr-xxmlhelp/source/treeview/tvread.cxx2
-rwxr-xr-xxmloff/source/chart/ColorPropertySet.cxx8
-rwxr-xr-xxmloff/source/chart/SchXMLAxisContext.cxx16
-rwxr-xr-xxmloff/source/chart/SchXMLChartContext.cxx6
-rwxr-xr-xxmloff/source/chart/SchXMLExport.cxx22
-rwxr-xr-xxmloff/source/chart/SchXMLImport.cxx8
-rwxr-xr-xxmloff/source/chart/SchXMLLegendContext.cxx6
-rwxr-xr-xxmloff/source/chart/SchXMLPlotAreaContext.cxx8
-rwxr-xr-xxmloff/source/chart/SchXMLSeries2Context.cxx8
-rwxr-xr-xxmloff/source/chart/SchXMLSeriesHelper.cxx8
-rwxr-xr-xxmloff/source/chart/SchXMLTools.cxx10
-rwxr-xr-xxmloff/source/core/RDFaExportHelper.cxx2
-rwxr-xr-xxmloff/source/core/RDFaImportHelper.cxx8
-rwxr-xr-xxmloff/source/core/xmlerror.cxx2
-rwxr-xr-xxmloff/source/core/xmlexp.cxx2
-rwxr-xr-xxmloff/source/core/xmlimp.cxx10
-rwxr-xr-xxmloff/source/draw/XMLNumberStyles.cxx4
-rwxr-xr-xxmloff/source/draw/sdxmlexp.cxx2
-rwxr-xr-xxmloff/source/draw/ximpshap.cxx4
-rwxr-xr-xxmloff/source/forms/elementimport.cxx8
-rwxr-xr-xxmloff/source/forms/layerexport.cxx7
-rwxr-xr-xxmloff/source/forms/layerimport.cxx2
-rwxr-xr-xxmloff/source/forms/layerimport.hxx21
-rwxr-xr-xxmloff/source/forms/propertyimport.cxx7
-rwxr-xr-xxmloff/source/meta/MetaImportComponent.cxx1
-rwxr-xr-xxmloff/source/meta/xmlmetae.cxx1
-rwxr-xr-xxmloff/source/meta/xmlversion.cxx2
-rwxr-xr-xxmloff/source/script/XMLEventExport.cxx4
-rwxr-xr-xxmloff/source/script/XMLEventsImportContext.cxx14
-rwxr-xr-xxmloff/source/script/XMLStarBasicContextFactory.cxx12
-rwxr-xr-xxmloff/source/style/DashStyle.cxx4
-rwxr-xr-xxmloff/source/style/FillStyleContext.cxx2
-rwxr-xr-xxmloff/source/style/GradientStyle.cxx4
-rwxr-xr-xxmloff/source/style/HatchStyle.cxx4
-rwxr-xr-xxmloff/source/style/ImageStyle.cxx21
-rwxr-xr-xxmloff/source/style/MarkerStyle.cxx4
-rwxr-xr-xxmloff/source/style/PagePropertySetContext.cxx10
-rwxr-xr-xxmloff/source/style/TransGradientStyle.cxx4
-rwxr-xr-xxmloff/source/style/XMLPageExport.cxx9
-rwxr-xr-xxmloff/source/style/impastp4.cxx4
-rwxr-xr-xxmloff/source/style/impastpl.hxx3
-rwxr-xr-xxmloff/source/style/styleexp.cxx3
-rwxr-xr-xxmloff/source/style/xmlexppr.cxx10
-rwxr-xr-xxmloff/source/style/xmlimppr.cxx10
-rwxr-xr-xxmloff/source/style/xmlnumi.cxx4
-rwxr-xr-xxmloff/source/style/xmlstyle.cxx18
-rwxr-xr-xxmloff/source/style/xmltabe.cxx4
-rwxr-xr-xxmloff/source/table/XMLTableExport.cxx4
-rwxr-xr-xxmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx2
-rwxr-xr-xxmloff/source/text/XMLIndexTOCContext.cxx2
-rwxr-xr-xxmloff/source/text/XMLSectionExport.cxx6
-rwxr-xr-xxmloff/source/text/XMLTextMarkImportContext.cxx6
-rwxr-xr-xxmloff/source/text/XMLTextNumRuleInfo.cxx2
-rwxr-xr-xxmloff/source/text/XMLTextPropertySetContext.cxx7
-rwxr-xr-xxmloff/source/text/txtimp.cxx25
-rwxr-xr-xxmloff/source/text/txtlists.cxx2
-rwxr-xr-xxmloff/source/text/txtparae.cxx5
-rwxr-xr-xxmloff/source/text/txtparai.cxx5
-rwxr-xr-xxmloff/source/transform/ChartPlotAreaOASISTContext.cxx2
-rwxr-xr-xxmloff/source/transform/ChartPlotAreaOOoTContext.cxx2
-rwxr-xr-xxmloff/source/transform/EventOOoTContext.cxx2
-rwxr-xr-xxmloff/source/transform/StyleOASISTContext.cxx4
-rwxr-xr-xxmloff/source/transform/StyleOOoTContext.cxx8
-rwxr-xr-xxmloff/source/xforms/xformsimport.cxx6
-rwxr-xr-xxmlscript/source/xmldlg_imexp/exp_share.hxx2
-rwxr-xr-xxmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx6
-rwxr-xr-xxmlscript/source/xmldlg_imexp/xmldlg_export.cxx48
-rwxr-xr-xxmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx2
-rwxr-xr-xxmlscript/test/imexp.cxx8
411 files changed, 4517 insertions, 5754 deletions
diff --git a/avmedia/inc/avmedia/mediawindow.hxx b/avmedia/inc/avmedia/mediawindow.hxx
index fd56282d284c..5b56f1fd3aa2 100755
--- a/avmedia/inc/avmedia/mediawindow.hxx
+++ b/avmedia/inc/avmedia/mediawindow.hxx
@@ -82,7 +82,6 @@ namespace avmedia
const ::rtl::OUString& getURL() const;
bool isValid() const;
-//
bool hasPreferredSize() const;
Size getPreferredSize() const;
diff --git a/avmedia/source/framework/soundhandler.cxx b/avmedia/source/framework/soundhandler.cxx
index 872106443732..c8213f6c1301 100755
--- a/avmedia/source/framework/soundhandler.cxx
+++ b/avmedia/source/framework/soundhandler.cxx
@@ -256,7 +256,6 @@ void SAL_CALL SoundHandler::impl_initService()
{
}
-
/*-************************************************************************************************************//**
@short standard ctor
@descr These initialize a new instance of this class with needed informations for work.
diff --git a/avmedia/source/framework/soundhandler.hxx b/avmedia/source/framework/soundhandler.hxx
index 0544ee41071b..d76bd13df5b7 100755
--- a/avmedia/source/framework/soundhandler.hxx
+++ b/avmedia/source/framework/soundhandler.hxx
@@ -119,7 +119,6 @@ class SoundHandler : // interfaces
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () throw( css::uno::RuntimeException );
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw( css::uno::RuntimeException );
-
/* interface XServiceInfo */
virtual ::rtl::OUString SAL_CALL getImplementationName ( ) throw( css::uno::RuntimeException );
virtual sal_Bool SAL_CALL supportsService ( const ::rtl::OUString& sServiceName ) throw( css::uno::RuntimeException );
diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx
index f6ea7295a540..227f1eca8c0c 100755
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -295,7 +295,6 @@ bool Player::create( const ::rtl::OUString& rURL )
bRet = true;
}
-
if( bRet )
maURL = rURL;
else
diff --git a/avmedia/source/gstreamer/gstwindow.cxx b/avmedia/source/gstreamer/gstwindow.cxx
index 4e0f6f3c3dfb..9228f9e6c9a0 100755
--- a/avmedia/source/gstreamer/gstwindow.cxx
+++ b/avmedia/source/gstreamer/gstwindow.cxx
@@ -89,7 +89,6 @@ Window::~Window()
void SAL_CALL Window::update( )
throw (uno::RuntimeException)
{
- //::RedrawWindow( (HWND) mnFrameWnd, NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE );
}
// ------------------------------------------------------------------------------
@@ -105,7 +104,6 @@ sal_Bool SAL_CALL Window::setZoomLevel( media::ZoomLevel eZoomLevel )
if( eZoomLevel != meZoomLevel )
{
meZoomLevel = eZoomLevel;
- //ImplLayoutVideoWindow();
}
bRet = true;
@@ -136,11 +134,6 @@ void SAL_CALL Window::setPointerType( sal_Int32 nPointerType )
void SAL_CALL Window::setPosSize( sal_Int32 /*X*/, sal_Int32 /*Y*/, sal_Int32 /*Width*/, sal_Int32 /*Height*/, sal_Int16 /*Flags*/ )
throw (uno::RuntimeException)
{
-// if( mnFrameWnd )
-// {
-// ::SetWindowPos( (HWND) mnFrameWnd, HWND_TOP, X, Y, Width, Height, 0 );
-// ImplLayoutVideoWindow();
-// }
}
// ------------------------------------------------------------------------------
@@ -154,20 +147,6 @@ awt::Rectangle SAL_CALL Window::getPosSize()
aRet.Width = 320;
aRet.Height = 240;
-// if( mnFrameWnd )
-// {
-// ::RECT aWndRect;
-// long nX = 0, nY = 0, nWidth = 0, nHeight = 0;
-
-// if( ::GetClientRect( (HWND) mnFrameWnd, &aWndRect ) )
-// {
-// aRet.X = aWndRect.left;
-// aRet.Y = aWndRect.top;
-// aRet.Width = aWndRect.right - aWndRect.left + 1;
-// aRet.Height = aWndRect.bottom - aWndRect.top + 1;
-// }
-// }
-
return aRet;
}
@@ -176,15 +155,7 @@ awt::Rectangle SAL_CALL Window::getPosSize()
void SAL_CALL Window::setVisible( sal_Bool /*bVisible*/ )
throw (uno::RuntimeException)
{
-// if( mnFrameWnd )
-// {
-// IVideoWindow* pVideoWindow = const_cast< IVideoWindow* >( mrPlayer.getVideoWindow() );
-// if( pVideoWindow )
-// pVideoWindow->put_Visible( bVisible ? OATRUE : OAFALSE );
-
-// ::ShowWindow( (HWND) mnFrameWnd, bVisible ? SW_SHOW : SW_HIDE );
-// }
}
// ------------------------------------------------------------------------------
@@ -192,8 +163,6 @@ void SAL_CALL Window::setVisible( sal_Bool /*bVisible*/ )
void SAL_CALL Window::setEnable( sal_Bool /*bEnable*/ )
throw (uno::RuntimeException)
{
-// if( mnFrameWnd )
-// ::EnableWindow( (HWND) mnFrameWnd, bEnable );
}
// ------------------------------------------------------------------------------
@@ -201,8 +170,6 @@ void SAL_CALL Window::setEnable( sal_Bool /*bEnable*/ )
void SAL_CALL Window::setFocus( )
throw (uno::RuntimeException)
{
-// if( mnFrameWnd )
-// ::SetFocus( (HWND) mnFrameWnd );
}
// ------------------------------------------------------------------------------
@@ -301,7 +268,6 @@ void SAL_CALL Window::removePaintListener( const uno::Reference< awt::XPaintList
maListeners.removeInterface( getCppuType( &xListener ), xListener );
}
-
// XComponent
// ------------------------------------------------------------------------------
diff --git a/avmedia/source/gstreamer/gstwindow.hxx b/avmedia/source/gstreamer/gstwindow.hxx
index b63e769e3fc1..18b9a7dbd0ae 100755
--- a/avmedia/source/gstreamer/gstwindow.hxx
+++ b/avmedia/source/gstreamer/gstwindow.hxx
@@ -90,7 +90,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
-
private:
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMgr;
diff --git a/avmedia/source/quicktime/player.cxx b/avmedia/source/quicktime/player.cxx
index d2ca846f053a..8b623e93c8ce 100755
--- a/avmedia/source/quicktime/player.cxx
+++ b/avmedia/source/quicktime/player.cxx
@@ -140,7 +140,6 @@ bool Player::create( const ::rtl::OUString& rURL )
NSString* aNSStr = [[[NSString alloc] initWithCharacters: rURL.getStr() length: rURL.getLength()]stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] ;
NSURL* aURL = [NSURL URLWithString:aNSStr ];
-
NSError* pErr = nil;
mpMovie = [QTMovie movieWithURL:aURL error:&pErr];
if(mpMovie)
@@ -423,7 +422,6 @@ awt::Size SAL_CALL Player::getPreferredPlayerWindowSize( )
return aSize;
}
-
// ------------------------------------------------------------------------------
uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( const uno::Sequence< uno::Any >& aArguments )
diff --git a/avmedia/source/quicktime/player.hxx b/avmedia/source/quicktime/player.hxx
index e7b35c9d5017..da9bbfc8ec8b 100755
--- a/avmedia/source/quicktime/player.hxx
+++ b/avmedia/source/quicktime/player.hxx
@@ -52,8 +52,6 @@ public:
bool create( const ::rtl::OUString& rURL );
-// void processMessage( GstMessage *message );
-
// XPlayer
virtual void SAL_CALL start( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL stop( ) throw (::com::sun::star::uno::RuntimeException);
@@ -87,9 +85,7 @@ private:
::rtl::OUString maURL;
QTMovie *mpMovie; // the Movie object
- /* GST
- sal_Bool mbFakeVideo;
- */
+
float mnUnmutedVolume;
double mnStopTime;
diff --git a/avmedia/source/quicktime/quicktimecommon.hxx b/avmedia/source/quicktime/quicktimecommon.hxx
index f0d9996c193f..1c22377efe9a 100755
--- a/avmedia/source/quicktime/quicktimecommon.hxx
+++ b/avmedia/source/quicktime/quicktimecommon.hxx
@@ -78,7 +78,6 @@
// Quicktime 6.4+ in Mac OS X 10.3
#define QT64 0x06400000
-
#endif // _QUICKTIMECOMMOM_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/avmedia/source/quicktime/window.cxx b/avmedia/source/quicktime/window.cxx
index 3f5aa3dc54d5..9b9c14ae2622 100755
--- a/avmedia/source/quicktime/window.cxx
+++ b/avmedia/source/quicktime/window.cxx
@@ -76,7 +76,6 @@ Window::Window( const uno::Reference< lang::XMultiServiceFactory >& i_rxMgr, Pla
::osl::MutexGuard aGuard( ImplGetOwnStaticMutex() );
-
if( mpParentView ) // sanity check
{
@@ -297,7 +296,6 @@ void SAL_CALL Window::removePaintListener( const uno::Reference< awt::XPaintList
maListeners.removeInterface( getCppuType( &xListener ), xListener );
}
-
// XComponent
// ------------------------------------------------------------------------------
diff --git a/avmedia/source/viewer/mediawindowbase_impl.cxx b/avmedia/source/viewer/mediawindowbase_impl.cxx
index 08c4ac7eac23..6c2db96b16a3 100755
--- a/avmedia/source/viewer/mediawindowbase_impl.cxx
+++ b/avmedia/source/viewer/mediawindowbase_impl.cxx
@@ -402,12 +402,7 @@ void MediaWindowBaseImpl::executeMediaItem( const MediaItem& rItem )
case( MEDIASTATE_PLAY ):
case( MEDIASTATE_PLAYFFW ):
{
-/*
- const double fNewRate = ( ( MEDIASTATE_PLAYFFW == rItem.getState() ) ? AVMEDIA_FFW_PLAYRATE : 1.0 );
- if( getRate() != fNewRate )
- setRate( fNewRate );
-*/
if( !isPlaying() )
start();
}
diff --git a/avmedia/source/win/window.cxx b/avmedia/source/win/window.cxx
index f8ddd7866098..a6f0bd85a15c 100755
--- a/avmedia/source/win/window.cxx
+++ b/avmedia/source/win/window.cxx
@@ -371,7 +371,6 @@ void Window::updatePointer()
switch( mnPointerType )
{
case( awt::SystemPointer::CROSS ): pCursorName = IDC_CROSS; break;
- //case( awt::SystemPointer::HAND ): pCursorName = IDC_HAND; break;
case( awt::SystemPointer::MOVE ): pCursorName = IDC_SIZEALL; break;
case( awt::SystemPointer::WAIT ): pCursorName = IDC_WAIT; break;
diff --git a/basic/source/app/app.cxx b/basic/source/app/app.cxx
index 7786914f85df..7ed2f518334f 100755
--- a/basic/source/app/app.cxx
+++ b/basic/source/app/app.cxx
@@ -1853,7 +1853,7 @@ String BasicFrame::GenRealString( const String &aResString )
}
else
{
- DBG_ERROR( CByteString("Unknown replacement in String: ").Append( ByteString( aResult.Copy(nStart,nEnd-nStart), RTL_TEXTENCODING_UTF8 ) ).GetBuffer() );
+ OSL_FAIL( CByteString("Unknown replacement in String: ").Append( ByteString( aResult.Copy(nStart,nEnd-nStart), RTL_TEXTENCODING_UTF8 ) ).GetBuffer() );
nStartPos = nStartPos + StartKenn.Len();
}
}
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx
index f94155d67808..58114be70f5f 100755
--- a/basic/source/basmgr/basicmanagerrepository.cxx
+++ b/basic/source/basmgr/basicmanagerrepository.cxx
@@ -615,7 +615,7 @@ namespace basic
// a BasicManager which is still in our repository is being deleted.
// That's bad, since by definition, we *own* all instances in our
// repository.
- OSL_ENSURE( false, "ImplRepository::Notify: nobody should tamper with the managers, except ourself!" );
+ OSL_FAIL( "ImplRepository::Notify: nobody should tamper with the managers, except ourself!" );
m_aStore.erase( loop );
break;
}
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 55c3d9037ef9..9b5383dd2577 100755
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -182,7 +182,7 @@ DocObjectWrapper::DocObjectWrapper( SbModule* pVar ) : m_pMod( pVar ), mName( pV
}
catch( Exception& )
{
- OSL_ENSURE( false, "DocObjectWrapper::DocObjectWrapper: Caught exception!" );
+ OSL_FAIL( "DocObjectWrapper::DocObjectWrapper: Caught exception!" );
}
}
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 8609c2a2c97d..685ede0848bc 100755
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -984,7 +984,7 @@ SbxVariableRef SbiRuntime::PopVar()
SbxVariableRef xVar = refExprStk->Get( --nExprLvl );
#ifdef DBG_UTIL
if ( xVar->GetName().EqualsAscii( "Cells" ) )
- DBG_TRACE( "" );
+ OSL_TRACE( "" );
#endif
// Methods halten im 0.Parameter sich selbst, also weghauen
if( xVar->IsA( TYPE(SbxMethod) ) )
diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx
index 04df56763a13..5054215fc931 100755
--- a/basic/source/uno/dlgcont.cxx
+++ b/basic/source/uno/dlgcont.cxx
@@ -349,7 +349,7 @@ Any SAL_CALL SfxDialogLibraryContainer::importLibraryElement
//Reference< XMultiServiceFactory > xMSF( comphelper::getProcessServiceFactory() );
//if( !xMSF.is() )
//{
- // OSL_ENSURE( 0, "### couln't get ProcessServiceFactory\n" );
+ // OSL_FAIL( "### couln't get ProcessServiceFactory\n" );
// return aRetAny;
//}
@@ -357,7 +357,7 @@ Any SAL_CALL SfxDialogLibraryContainer::importLibraryElement
OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser") ) ), UNO_QUERY );
if( !xParser.is() )
{
- OSL_ENSURE( 0, "### couln't create sax parser component\n" );
+ OSL_FAIL( "### couln't create sax parser component\n" );
return aRetAny;
}
@@ -365,7 +365,7 @@ Any SAL_CALL SfxDialogLibraryContainer::importLibraryElement
( OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ) ), UNO_QUERY );
if( !xDialogModel.is() )
{
- OSL_ENSURE( 0, "### couln't create com.sun.star.awt.UnoControlDialogModel component\n" );
+ OSL_FAIL( "### couln't create com.sun.star.awt.UnoControlDialogModel component\n" );
return aRetAny;
}
@@ -409,7 +409,7 @@ Any SAL_CALL SfxDialogLibraryContainer::importLibraryElement
}
catch( Exception& )
{
- OSL_ENSURE( 0, "Parsing error\n" );
+ OSL_FAIL( "Parsing error\n" );
SfxErrorContext aEc( ERRCTX_SFX_LOADBASIC, aFile );
sal_uIntPtr nErrorCode = ERRCODE_IO_GENERAL;
ErrorHandler::HandleError( nErrorCode );
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 9479d56e0844..c61015d48422 100755
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -341,21 +341,21 @@ SfxLibraryContainer::SfxLibraryContainer( void )
mxMSF = comphelper::getProcessServiceFactory();
if( !mxMSF.is() )
{
- OSL_ENSURE( 0, "### couln't get ProcessServiceFactory\n" );
+ OSL_FAIL( "### couln't get ProcessServiceFactory\n" );
}
mxSFI = Reference< XSimpleFileAccess >( mxMSF->createInstance
( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")) ), UNO_QUERY );
if( !mxSFI.is() )
{
- OSL_ENSURE( 0, "### couln't create SimpleFileAccess component\n" );
+ OSL_FAIL( "### couln't create SimpleFileAccess component\n" );
}
mxStringSubstitution = Reference< XStringSubstitution >( mxMSF->createInstance
( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.PathSubstitution")) ), UNO_QUERY );
if( !mxStringSubstitution.is() )
{
- OSL_ENSURE( 0, "### couln't create PathSubstitution component\n" );
+ OSL_FAIL( "### couln't create PathSubstitution component\n" );
}
}
@@ -630,7 +630,7 @@ sal_Bool SfxLibraryContainer::init_Impl(
OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser") ) ), UNO_QUERY );
if( !xParser.is() )
{
- OSL_ENSURE( 0, "### couln't create sax parser component\n" );
+ OSL_FAIL( "### couln't create sax parser component\n" );
return sal_False;
}
@@ -785,13 +785,13 @@ sal_Bool SfxLibraryContainer::init_Impl(
catch ( xml::sax::SAXException& e )
{
(void) e; // avoid warning
- OSL_ENSURE( 0, OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ OSL_FAIL( OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
return sal_False;
}
catch ( io::IOException& e )
{
(void) e; // avoid warning
- OSL_ENSURE( 0, OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ OSL_FAIL( OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
return sal_False;
}
@@ -884,7 +884,7 @@ sal_Bool SfxLibraryContainer::init_Impl(
aMessage.append( ::rtl::OUStringToOString( rLib.aName, osl_getThreadTextEncoding() ) );
aMessage.append( "'.\n\nException:" );
aMessage.append( ::rtl::OUStringToOString( ::comphelper::anyToString( aError ), osl_getThreadTextEncoding() ) );
- OSL_ENSURE( false, aMessage.makeStringAndClear().getStr() );
+ OSL_FAIL( aMessage.makeStringAndClear().getStr() );
#endif
}
}
@@ -896,7 +896,7 @@ sal_Bool SfxLibraryContainer::init_Impl(
sal_Bool bLoaded = implLoadLibraryIndexFile( pImplLib, rLib, xLibraryStor, aIndexFileName );
if( bLoaded && aLibName != rLib.aName )
{
- OSL_ENSURE( 0, "Different library names in library"
+ OSL_FAIL( "Different library names in library"
" container and library info files!\n" );
}
if( GbMigrationSuppressErrors && !bLoaded )
@@ -1379,7 +1379,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib,
aMessage.append( "invalid library element '" );
aMessage.append( ::rtl::OUStringToOString( aElementName, osl_getThreadTextEncoding() ) );
aMessage.append( "'." );
- OSL_ENSURE( false, aMessage.makeStringAndClear().getStr() );
+ OSL_FAIL( aMessage.makeStringAndClear().getStr() );
#endif
continue;
}
@@ -1468,7 +1468,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib,
aMessage.append( "invalid library element '" );
aMessage.append( ::rtl::OUStringToOString( aElementName, osl_getThreadTextEncoding() ) );
aMessage.append( "'." );
- OSL_ENSURE( false, aMessage.makeStringAndClear().getStr() );
+ OSL_FAIL( aMessage.makeStringAndClear().getStr() );
#endif
continue;
}
@@ -1521,7 +1521,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib,
OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer") ) ), UNO_QUERY );
if( !xHandler.is() )
{
- OSL_ENSURE( 0, "### couln't create sax-writer component\n" );
+ OSL_FAIL( "### couln't create sax-writer component\n" );
return;
}
@@ -1607,7 +1607,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib,
}
if( !xOut.is() )
{
- OSL_ENSURE( 0, "### couln't open output stream\n" );
+ OSL_FAIL( "### couln't open output stream\n" );
return;
}
@@ -1625,7 +1625,7 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser") ) ), UNO_QUERY );
if( !xParser.is() )
{
- OSL_ENSURE( 0, "### couln't create sax parser component\n" );
+ OSL_FAIL( "### couln't create sax parser component\n" );
return sal_False;
}
@@ -1683,7 +1683,7 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
}
if( !xInput.is() )
{
- // OSL_ENSURE( 0, "### couln't open input stream\n" );
+ // OSL_FAIL( "### couln't open input stream\n" );
return sal_False;
}
@@ -1698,7 +1698,7 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
}
catch( Exception& )
{
- OSL_ENSURE( 0, "Parsing error\n" );
+ OSL_FAIL( "Parsing error\n" );
SfxErrorContext aEc( ERRCTX_SFX_LOADBASIC, aLibInfoPath );
sal_uIntPtr nErrorCode = ERRCODE_IO_GENERAL;
ErrorHandler::HandleError( nErrorCode );
@@ -1893,7 +1893,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
aMessage.append( ::rtl::OUStringToOString( rLib.aName, osl_getThreadTextEncoding() ) );
aMessage.append( "'.\n\nException:" );
aMessage.append( ::rtl::OUStringToOString( ::comphelper::anyToString( aError ), osl_getThreadTextEncoding() ) );
- OSL_ENSURE( false, aMessage.makeStringAndClear().getStr() );
+ OSL_FAIL( aMessage.makeStringAndClear().getStr() );
#endif
return;
}
@@ -1998,7 +1998,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer") ) ), UNO_QUERY );
if( !xHandler.is() )
{
- OSL_ENSURE( 0, "### couln't create sax-writer component\n" );
+ OSL_FAIL( "### couln't create sax-writer component\n" );
return;
}
@@ -2058,7 +2058,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
}
if( !xOut.is() )
{
- OSL_ENSURE( 0, "### couln't open output stream\n" );
+ OSL_FAIL( "### couln't open output stream\n" );
return;
}
@@ -2314,7 +2314,7 @@ void SAL_CALL SfxLibraryContainer::loadLibrary( const OUString& Name )
aMessage.append( ::rtl::OUStringToOString( Name, osl_getThreadTextEncoding() ) );
aMessage.append( "'.\n\nException:" );
aMessage.append( ::rtl::OUStringToOString( ::comphelper::anyToString( aError ), osl_getThreadTextEncoding() ) );
- OSL_ENSURE( false, aMessage.makeStringAndClear().getStr() );
+ OSL_FAIL( aMessage.makeStringAndClear().getStr() );
#endif
return;
}
@@ -2364,7 +2364,7 @@ void SAL_CALL SfxLibraryContainer::loadLibrary( const OUString& Name )
aMessage.append( "couln't open library element stream - attempted to open library '" );
aMessage.append( ::rtl::OUStringToOString( Name, osl_getThreadTextEncoding() ) );
aMessage.append( "'." );
- OSL_ENSURE( false, aMessage.makeStringAndClear().getStr() );
+ OSL_FAIL( aMessage.makeStringAndClear().getStr() );
#endif
return;
}
@@ -3206,7 +3206,7 @@ rtl::OUString ScriptExtensionIterator::nextBasicOrDialogLibrary( bool& rbPureDia
break;
}
case END_REACHED:
- OSL_ENSURE( false, "ScriptExtensionIterator::nextBasicOrDialogLibrary(): Invalid case END_REACHED" );
+ OSL_FAIL( "ScriptExtensionIterator::nextBasicOrDialogLibrary(): Invalid case END_REACHED" );
break;
}
}
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index ebfc68863ea0..eacf1de91a9a 100755
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -198,7 +198,7 @@ void SAL_CALL SfxScriptLibraryContainer::writeLibraryElement
OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer") ) ), UNO_QUERY );
if( !xHandler.is() )
{
- OSL_ENSURE( 0, "### couln't create sax-writer component\n" );
+ OSL_FAIL( "### couln't create sax-writer component\n" );
return;
}
@@ -255,7 +255,7 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement
OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser") ) ), UNO_QUERY );
if( !xParser.is() )
{
- OSL_ENSURE( 0, "### couln't create sax parser component\n" );
+ OSL_FAIL( "### couln't create sax parser component\n" );
return aRetAny;
}
@@ -684,7 +684,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib,
aMessage.append( "invalid library element '" );
aMessage.append( ::rtl::OUStringToOString( aElementName, osl_getThreadTextEncoding() ) );
aMessage.append( "'." );
- OSL_ENSURE( false, aMessage.makeStringAndClear().getStr() );
+ OSL_FAIL( aMessage.makeStringAndClear().getStr() );
#endif
continue;
}
@@ -770,7 +770,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib,
aMessage.append( "invalid library element '" );
aMessage.append( ::rtl::OUStringToOString( aElementName, osl_getThreadTextEncoding() ) );
aMessage.append( "'." );
- OSL_ENSURE( false, aMessage.makeStringAndClear().getStr() );
+ OSL_FAIL( aMessage.makeStringAndClear().getStr() );
#endif
continue;
}
@@ -936,7 +936,7 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary
}
catch( uno::Exception& )
{
- OSL_ENSURE( 0, "### couln't open sub storage for library\n" );
+ OSL_FAIL( "### couln't open sub storage for library\n" );
return sal_False;
}
}
diff --git a/connectivity/inc/connectivity/DateConversion.hxx b/connectivity/inc/connectivity/DateConversion.hxx
index cbab67251e4a..45afacfdbe68 100755
--- a/connectivity/inc/connectivity/DateConversion.hxx
+++ b/connectivity/inc/connectivity/DateConversion.hxx
@@ -41,52 +41,52 @@ namespace connectivity
public:
static sal_Int32 toINT32(const ::com::sun::star::util::Date&)
{
- OSL_ENSURE(0,"Please use DBConversion instead!");
+ OSL_FAIL("Please use DBConversion instead!");
return 0;
}
static sal_Int32 toINT32(const ::com::sun::star::util::Time&)
{
- OSL_ENSURE(0,"Please use DBConversion instead!");
+ OSL_FAIL("Please use DBConversion instead!");
return 0;
}
static sal_Int64 toINT64(const ::com::sun::star::util::DateTime&)
{
- OSL_ENSURE(0,"Please use DBConversion instead!");
+ OSL_FAIL("Please use DBConversion instead!");
return 0;
}
static sal_Int32 getMsFromTime(const ::com::sun::star::util::Time&)
{
- OSL_ENSURE(0,"Please use DBConversion instead!");
+ OSL_FAIL("Please use DBConversion instead!");
return 0;
}
static double toDouble(const ::com::sun::star::util::Date&)
{
- OSL_ENSURE(0,"Please use DBConversion instead!");
+ OSL_FAIL("Please use DBConversion instead!");
return 0;
}
static double toDouble(const ::com::sun::star::util::Time&)
{
- OSL_ENSURE(0,"Please use DBConversion instead!");
+ OSL_FAIL("Please use DBConversion instead!");
return 0;
}
static double toDouble(const ::com::sun::star::util::DateTime&)
{
- OSL_ENSURE(0,"Please use DBConversion instead!");
+ OSL_FAIL("Please use DBConversion instead!");
return 0;
}
static ::com::sun::star::util::Date toDate(double,const ::com::sun::star::util::Date& =::com::sun::star::util::Date(01,01,1900))
{
- OSL_ENSURE(0,"Please use DBConversion instead!");
+ OSL_FAIL("Please use DBConversion instead!");
return ::com::sun::star::util::Date();
}
static ::com::sun::star::util::Time toTime(double)
{
- OSL_ENSURE(0,"Please use DBConversion instead!");
+ OSL_FAIL("Please use DBConversion instead!");
return ::com::sun::star::util::Time();
}
static ::com::sun::star::util::DateTime toDateTime(double,const ::com::sun::star::util::Date& =::com::sun::star::util::Date(01,01,1900))
{
- OSL_ENSURE(0,"Please use DBConversion instead!");
+ OSL_FAIL("Please use DBConversion instead!");
return ::com::sun::star::util::DateTime();
}
};
diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx
index cd335987c121..7170ee48a501 100755
--- a/connectivity/source/commontools/DateConversion.cxx
+++ b/connectivity/source/commontools/DateConversion.cxx
@@ -217,7 +217,7 @@ using namespace ::com::sun::star::beans;
}
catch ( const Exception& )
{
- OSL_ENSURE(0,"TypeConversion Error");
+ OSL_FAIL("TypeConversion Error");
}
}
else
@@ -428,7 +428,7 @@ double DBTypeConversion::getValue( const Reference< XColumn >& i_column, const D
}
catch (const Exception& )
{
- OSL_ENSURE(false, "DBTypeConversion::getFormattedValue: caught an exception while asking for the format key!");
+ OSL_FAIL("DBTypeConversion::getValue: caught an exception while asking for the format key!");
}
if (!nKey)
diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
index 96ab611142c0..231ebb75fcc1 100755
--- a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
@@ -121,7 +121,7 @@ void ODatabaseMetaDataResultSet::setType(MetaDataResultSetType _eType)
case eBestRowIdentifier: setBestRowIdentifierMap(); break;
case eVersionColumns: setVersionColumnsMap(); break;
default:
- OSL_ENSURE(0,"Wrong type!");
+ OSL_FAIL("Wrong type!");
}
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx
index 0be8ea3f49f6..797cad9de343 100755
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -260,7 +260,7 @@ void ORowSetValue::setTypeKind(sal_Int32 _eType)
break;
default:
(*this) = getAny();
- OSL_ENSURE(0,"ORowSetValue:operator==(): UNSPUPPORTED TYPE!");
+ OSL_FAIL("ORowSetValue:operator==(): UNSPUPPORTED TYPE!");
}
}
@@ -865,7 +865,7 @@ bool ORowSetValue::operator==(const ORowSetValue& _rRH) const
break;
default:
bRet = false;
- OSL_ENSURE(0,"ORowSetValue::operator==(): UNSPUPPORTED TYPE!");
+ OSL_FAIL("ORowSetValue::operator==(): UNSPUPPORTED TYPE!");
break;
}
return bRet;
@@ -958,7 +958,7 @@ Any ORowSetValue::makeAny() const
}
break;
default:
- OSL_ENSURE(0,"ORowSetValue::makeAny(): UNSPUPPORTED TYPE!");
+ OSL_FAIL("ORowSetValue::makeAny(): UNSPUPPORTED TYPE!");
rValue = getAny();
break;
}
@@ -2171,7 +2171,7 @@ void ORowSetValue::impl_fill( const sal_Int32 _nType, sal_Bool _bNullable, const
setTypeKind(DataType::OTHER);
break;
default:
- OSL_ENSURE( false, "ORowSetValue::fill: unsupported type!" );
+ OSL_FAIL( "ORowSetValue::fill: unsupported type!" );
(*this) = _rValueSource.getObject();
break;
}
@@ -2289,7 +2289,7 @@ void ORowSetValue::fill(const Any& _rValue)
if ( _rValue >>= aDummy )
(*this) = aDummy;
else
- OSL_ENSURE( false, "ORowSetValue::fill: unsupported sequence type!" );
+ OSL_FAIL( "ORowSetValue::fill: unsupported sequence type!" );
break;
}
@@ -2311,7 +2311,7 @@ void ORowSetValue::fill(const Any& _rValue)
(*this) = aDateTime;
}
else
- OSL_ENSURE( false, "ORowSetValue::fill: unsupported structure!" );
+ OSL_FAIL( "ORowSetValue::fill: unsupported structure!" );
break;
}
@@ -2340,7 +2340,7 @@ void ORowSetValue::fill(const Any& _rValue)
break;
default:
- OSL_ENSURE(0,"Unknown type");
+ OSL_FAIL("Unknown type");
break;
}
}
diff --git a/connectivity/source/commontools/TSkipDeletedSet.cxx b/connectivity/source/commontools/TSkipDeletedSet.cxx
index 90dbf8c6487e..15f30a592d24 100755
--- a/connectivity/source/commontools/TSkipDeletedSet.cxx
+++ b/connectivity/source/commontools/TSkipDeletedSet.cxx
@@ -252,7 +252,7 @@ sal_Int32 OSkipDeletedSet::getMappedPosition(sal_Int32 _nPos) const
/*TInt2IntMap::const_iterator aFind = m_aBookmarks.find(_nPos);
OSL_ENSURE(aFind != m_aBookmarks.end(),"OSkipDeletedSet::getMappedPosition() invalid bookmark!");
return aFind->second;*/
- OSL_ENSURE(0,"Why!");
+ OSL_FAIL("Why!");
return -1;
}
// -----------------------------------------------------------------------------
diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx
index 6a8161da314b..5d3027a627b1 100755
--- a/connectivity/source/commontools/TTableHelper.cxx
+++ b/connectivity/source/commontools/TTableHelper.cxx
@@ -245,7 +245,7 @@ namespace
// if that's not the case, normalize it
if ( bGaps || bDuplicates )
{
- OSL_ENSURE( false, "lcl_sanitizeColumnDescs: database did provide invalid ORDINAL_POSITION values!" );
+ OSL_FAIL( "lcl_sanitizeColumnDescs: database did provide invalid ORDINAL_POSITION values!" );
OrdinalPosition nNormalizedPosition = 1;
for ( ::std::vector< ColumnDesc >::iterator normalize = _rColumns.begin();
@@ -589,7 +589,7 @@ sdbcx::TKeyProperties OTableHelper::getKeyProperties(const ::rtl::OUString& _sNa
}
else // only a fall back
{
- OSL_ENSURE(0,"No key with the given name found");
+ OSL_FAIL("No key with the given name found");
pKeyProps.reset(new sdbcx::KeyProperties());
}
diff --git a/connectivity/source/commontools/dbexception.cxx b/connectivity/source/commontools/dbexception.cxx
index ea96f9cb0c9e..e79f0dda4d49 100755
--- a/connectivity/source/commontools/dbexception.cxx
+++ b/connectivity/source/commontools/dbexception.cxx
@@ -239,7 +239,7 @@ void SQLExceptionInfo::append( TYPE _eType, const ::rtl::OUString& _rErrorMessag
case SQL_WARNING: aAppend <<= SQLWarning(); break;
case SQL_CONTEXT: aAppend <<= SQLContext(); break;
default:
- OSL_ENSURE( false, "SQLExceptionInfo::append: invalid exception type: this will crash!" );
+ OSL_FAIL( "SQLExceptionInfo::append: invalid exception type: this will crash!" );
break;
}
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 9ee1581c5c3b..37d1fa51a440 100755
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -500,7 +500,7 @@ SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const R
}
catch(Exception&)
{
- OSL_ENSURE(0,"EXception when we set the new active connection!");
+ OSL_FAIL("EXception when we set the new active connection!");
}
}
}
@@ -1439,7 +1439,7 @@ namespace
_xTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)) >>= _out_rName;
}
else
- OSL_ENSURE( false, "::dbtools::lcl_getTableNameComponents: this is no table object!" );
+ OSL_FAIL( "::dbtools::lcl_getTableNameComponents: this is no table object!" );
}
}
@@ -1547,12 +1547,12 @@ void showError(const SQLExceptionInfo& _rInfo,
xErrorDialog->execute();
else
{
- OSL_ENSURE(0,"dbtools::showError: no XExecutableDialog found!");
+ OSL_FAIL("dbtools::showError: no XExecutableDialog found!");
}
}
catch(Exception&)
{
- OSL_ENSURE(0,"showError: could not display the error message!");
+ OSL_FAIL("showError: could not display the error message!");
}
}
}
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index 0e35af8434b1..d955ef225c03 100755
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -469,7 +469,7 @@ namespace
}
catch(SQLException&)
{
- OSL_ENSURE( false, "lcl_createSDBCXColumn: caught an exception!" );
+ OSL_FAIL( "lcl_createSDBCXColumn: caught an exception!" );
}
}
@@ -762,7 +762,7 @@ sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData,
Privilege::INSERT |
Privilege::SELECT;
else
- OSL_ENSURE(0,"Could not collect the privileges !");
+ OSL_FAIL("Could not collect the privileges !");
}
return nPrivileges;
}
diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx
index 9ebdd3f08272..97f3eeee6a0c 100755
--- a/connectivity/source/cpool/ZPoolCollection.cxx
+++ b/connectivity/source/cpool/ZPoolCollection.cxx
@@ -512,7 +512,7 @@ void SAL_CALL OPoolCollection::disposing( const EventObject& Source ) throw (Run
}
catch(const Exception&)
{
- OSL_ENSURE(0,"Exception caught");
+ OSL_FAIL("Exception caught");
}
}
}
diff --git a/connectivity/source/drivers/adabas/BDriver.cxx b/connectivity/source/drivers/adabas/BDriver.cxx
index f692d50b8069..bb72894d621c 100755
--- a/connectivity/source/drivers/adabas/BDriver.cxx
+++ b/connectivity/source/drivers/adabas/BDriver.cxx
@@ -821,7 +821,7 @@ oslGenericFunction ODriver::getOdbcFunction(sal_Int32 _nIndex) const
pFunction = (oslGenericFunction)pODBC3SQLNativeSql;
break;
default:
- OSL_ENSURE(0,"Function unknown!");
+ OSL_FAIL("Function unknown!");
}
return pFunction;
}
diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx
index 37fb4f981240..a5bb2c190186 100755
--- a/connectivity/source/drivers/ado/AConnection.cxx
+++ b/connectivity/source/drivers/ado/AConnection.cxx
@@ -355,7 +355,7 @@ void SAL_CALL OConnection::setTransactionIsolation( sal_Int32 level ) throw(SQLE
eIso = adXactSerializable;
break;
default:
- OSL_ENSURE(0,"OConnection::setTransactionIsolation invalid level");
+ OSL_FAIL("OConnection::setTransactionIsolation invalid level");
return;
}
m_pAdoConnection->put_IsolationLevel(eIso);
@@ -387,7 +387,7 @@ sal_Int32 SAL_CALL OConnection::getTransactionIsolation( ) throw(SQLException,
nRet = TransactionIsolation::SERIALIZABLE;
break;
default:
- OSL_ENSURE(0,"OConnection::setTransactionIsolation invalid level");
+ OSL_FAIL("OConnection::setTransactionIsolation invalid level");
}
ADOS::ThrowException(*m_pAdoConnection,*this);
return nRet;
diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx
index 8bde02cd5239..e8acf0ad3613 100755
--- a/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx
+++ b/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx
@@ -535,7 +535,7 @@ KeyTypeEnum OAdoKey::Map2KeyRule(const sal_Int32& _eNum)
eNum = adKeyUnique;
break;
default:
- OSL_ENSURE( false, "OAdoKey::Map2KeyRule: invalid key type!" );
+ OSL_FAIL( "OAdoKey::Map2KeyRule: invalid key type!" );
}
return eNum;
}
diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx
index 589fd04f6675..0290e29cbfef 100755
--- a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx
@@ -763,7 +763,7 @@ void ODatabaseMetaDataResultSet::setFastPropertyValue_NoBroadcast(
throw Exception();
break;
default:
- OSL_ENSURE(0,"setFastPropertyValue_NoBroadcast: Illegal handle value!");
+ OSL_FAIL("setFastPropertyValue_NoBroadcast: Illegal handle value!");
}
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/ado/adoimp.cxx b/connectivity/source/drivers/ado/adoimp.cxx
index de0d53b50e97..73b00faefe01 100755
--- a/connectivity/source/drivers/ado/adoimp.cxx
+++ b/connectivity/source/drivers/ado/adoimp.cxx
@@ -132,7 +132,7 @@ sal_Int32 ADOS::MapADOType2Jdbc(DataTypeEnum eType)
case adVariant:
nType = DataType::OTHER; break;
default:
- OSL_ENSURE(0,"MapADOType2Jdbc: Unknown Type!");
+ OSL_FAIL("MapADOType2Jdbc: Unknown Type!");
;
}
return nType;
@@ -165,7 +165,7 @@ DataTypeEnum ADOS::MapJdbc2ADOType(sal_Int32 _nType,sal_Int32 _nJetEngine)
case DataType::TINYINT: return isJetEngine(_nJetEngine) ? adUnsignedTinyInt : adTinyInt;break;
case DataType::OBJECT: return adGUID; break;
default:
- OSL_ENSURE(0,"MapJdbc2ADOType: Unknown Type!");
+ OSL_FAIL("MapJdbc2ADOType: Unknown Type!");
;
}
return adEmpty;
@@ -264,7 +264,7 @@ sal_Int32 ADOS::mapAdoType2Object(ObjectTypeEnum objType)
nType = PrivilegeObject::COLUMN;
break;
default:
- OSL_ENSURE( false, "ADOS::mapAdoType2Object: privilege type cannot be translated!" );
+ OSL_FAIL( "ADOS::mapAdoType2Object: privilege type cannot be translated!" );
break;
}
return nType;
diff --git a/connectivity/source/drivers/dbase/DNoException.cxx b/connectivity/source/drivers/dbase/DNoException.cxx
index df0fa5af0fd8..b130547e9265 100755
--- a/connectivity/source/drivers/dbase/DNoException.cxx
+++ b/connectivity/source/drivers/dbase/DNoException.cxx
@@ -498,7 +498,7 @@ SvStream& connectivity::dbase::operator << (SvStream &rStream, const ONDXPage& r
void ONDXPage::PrintPage()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ONDXPage::PrintPage" );
- DBG_TRACE4("\nSDB: -----------Page: %d Parent: %d Count: %d Child: %d-----",
+ OSL_TRACE("\nSDB: -----------Page: %d Parent: %d Count: %d Child: %d-----",
nPagePos, HasParent() ? aParent->GetPagePos() : 0 ,nCount, aChild.GetPagePos());
for (sal_uInt16 i = 0; i < nCount; i++)
@@ -510,18 +510,18 @@ void ONDXPage::PrintPage()
if (rKey.getValue().isNull())
{
- DBG_TRACE2("SDB: [%d,NULL,%d]",rKey.GetRecord(), rNode.GetChild().GetPagePos());
+ OSL_TRACE("SDB: [%d,NULL,%d]",rKey.GetRecord(), rNode.GetChild().GetPagePos());
}
else if (rIndex.getHeader().db_keytype)
{
- DBG_TRACE3("SDB: [%d,%f,%d]",rKey.GetRecord(), rKey.getValue().getDouble(),rNode.GetChild().GetPagePos());
+ OSL_TRACE("SDB: [%d,%f,%d]",rKey.GetRecord(), rKey.getValue().getDouble(),rNode.GetChild().GetPagePos());
}
else
{
- DBG_TRACE3("SDB: [%d,%s,%d]",rKey.GetRecord(), (const char* )ByteString(rKey.getValue().getString().getStr(), rIndex.m_pTable->getConnection()->getTextEncoding()).GetBuffer(),rNode.GetChild().GetPagePos());
+ OSL_TRACE("SDB: [%d,%s,%d]",rKey.GetRecord(), (const char* )ByteString(rKey.getValue().getString().getStr(), rIndex.m_pTable->getConnection()->getTextEncoding()).GetBuffer(),rNode.GetChild().GetPagePos());
}
}
- DBG_TRACE("SDB: -----------------------------------------------\n");
+ OSL_TRACE("SDB: -----------------------------------------------\n");
if (!IsLeaf())
{
#if OSL_DEBUG_LEVEL > 1
@@ -533,7 +533,7 @@ void ONDXPage::PrintPage()
}
#endif
}
- DBG_TRACE("SDB: ===============================================\n");
+ OSL_TRACE("SDB: ===============================================\n");
}
#endif
// -----------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 5397bc4a036f..5630800b47f2 100755
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -600,7 +600,7 @@ sal_Bool ODbaseTable::ReadMemoHeader()
(*m_pMemoStream) >> m_aMemoHeader.db_size;
break;
default:
- OSL_ENSURE( false, "ODbaseTable::ReadMemoHeader: unsupported memo type!" );
+ OSL_FAIL( "ODbaseTable::ReadMemoHeader: unsupported memo type!" );
break;
}
return sal_True;
@@ -2270,7 +2270,7 @@ void ODbaseTable::alterColumn(sal_Int32 index,
}
catch(const Exception&)
{
- OSL_ENSURE(0,"ODbaseTable::alterColumn: Exception occurred!");
+ OSL_FAIL("ODbaseTable::alterColumn: Exception occurred!");
throw;
}
}
diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx
index 487c0b740b87..53a384ad6853 100755
--- a/connectivity/source/drivers/dbase/dindexnode.cxx
+++ b/connectivity/source/drivers/dbase/dindexnode.cxx
@@ -896,7 +896,7 @@ SvStream& connectivity::dbase::operator << (SvStream &rStream, const ONDXPage& r
//------------------------------------------------------------------
void ONDXPage::PrintPage()
{
- DBG_TRACE4("\nSDB: -----------Page: %d Parent: %d Count: %d Child: %d-----",
+ OSL_TRACE("\nSDB: -----------Page: %d Parent: %d Count: %d Child: %d-----",
nPagePos, HasParent() ? aParent->GetPagePos() : 0 ,nCount, aChild.GetPagePos());
for (sal_uInt16 i = 0; i < nCount; i++)
@@ -908,18 +908,18 @@ void ONDXPage::PrintPage()
if (rKey.getValue().isNull())
{
- DBG_TRACE2("SDB: [%d,NULL,%d]",rKey.GetRecord(), rNode.GetChild().GetPagePos());
+ OSL_TRACE("SDB: [%d,NULL,%d]",rKey.GetRecord(), rNode.GetChild().GetPagePos());
}
else if (rIndex.getHeader().db_keytype)
{
- DBG_TRACE3("SDB: [%d,%f,%d]",rKey.GetRecord(), rKey.getValue().getDouble(),rNode.GetChild().GetPagePos());
+ OSL_TRACE("SDB: [%d,%f,%d]",rKey.GetRecord(), rKey.getValue().getDouble(),rNode.GetChild().GetPagePos());
}
else
{
- DBG_TRACE3("SDB: [%d,%s,%d]",rKey.GetRecord(), (const char* )ByteString(rKey.getValue().getString().getStr(), rIndex.m_pTable->getConnection()->getTextEncoding()).GetBuffer(),rNode.GetChild().GetPagePos());
+ OSL_TRACE("SDB: [%d,%s,%d]",rKey.GetRecord(), (const char* )ByteString(rKey.getValue().getString().getStr(), rIndex.m_pTable->getConnection()->getTextEncoding()).GetBuffer(),rNode.GetChild().GetPagePos());
}
}
- DBG_TRACE("SDB: -----------------------------------------------\n");
+ OSL_TRACE("SDB: -----------------------------------------------\n");
if (!IsLeaf())
{
#if OSL_DEBUG_LEVEL > 1
@@ -931,7 +931,7 @@ void ONDXPage::PrintPage()
}
#endif
}
- DBG_TRACE("SDB: ===============================================\n");
+ OSL_TRACE("SDB: ===============================================\n");
}
#endif
// -----------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/evoab/LDriver.cxx b/connectivity/source/drivers/evoab/LDriver.cxx
index 637203e787d9..53ac9fc3ec39 100755
--- a/connectivity/source/drivers/evoab/LDriver.cxx
+++ b/connectivity/source/drivers/evoab/LDriver.cxx
@@ -233,7 +233,7 @@ sal_Bool SAL_CALL OEvoabDriver::acceptsURL( const ::rtl::OUString& url )
if ( nFileErr != osl_File_E_None )
{
::rtl::OUString sErr = translateFileErrorMessage( nFileErr);
- OSL_ENSURE(false, ::rtl::OUStringToOString( sErr, RTL_TEXTENCODING_ASCII_US ).getStr());
+ OSL_FAIL(::rtl::OUStringToOString( sErr, RTL_TEXTENCODING_ASCII_US ).getStr());
}
::rtl::OUString aVersionInfo;
if ( nFileErr == osl_File_E_None && nBytesRead > 0 && nBytesRead <= 256)
diff --git a/connectivity/source/drivers/evoab2/NServices.cxx b/connectivity/source/drivers/evoab2/NServices.cxx
index d028755081e2..87e0831513e4 100755
--- a/connectivity/source/drivers/evoab2/NServices.cxx
+++ b/connectivity/source/drivers/evoab2/NServices.cxx
@@ -79,7 +79,7 @@ struct ProviderRequest
}
catch(::com::sun::star::uno::Exception)
{
- OSL_ENSURE(0,"Service Creation Exception");
+ OSL_FAIL("Service Creation Exception");
}
return xRet.is();
}
diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx
index 2ea738ad3419..30773e4ea665 100755
--- a/connectivity/source/drivers/evoab2/NStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NStatement.cxx
@@ -477,10 +477,10 @@ rtl::OUString OCommonStatement::getTableName()
OSQLParseNode::getTableComponents( pNodeForTableName, aCatalog, aSchema, aTableName,NULL);
}
else
- OSL_ENSURE( false, "odd table layout" );
+ OSL_FAIL( "odd table layout" );
}
else
- OSL_ENSURE( false, "unusual table layout" );
+ OSL_FAIL( "unusual table layout" );
}
return aTableName;
}
diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx
index 2626c1d29a30..aa5a5108c7d5 100755
--- a/connectivity/source/drivers/file/FConnection.cxx
+++ b/connectivity/source/drivers/file/FConnection.cxx
@@ -198,7 +198,7 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
}
else
{
- OSL_ENSURE(0,"OConnection::construct: ::ucbhelper::Content isn't a folde nor a document! How that?!");
+ OSL_FAIL("OConnection::construct: ::ucbhelper::Content isn't a folde nor a document! How that?!");
throw SQLException();
}
}
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index cd738291e1a5..4a98491450ba 100755
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -89,7 +89,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns(
const ::rtl::OUString& /*columnNamePattern*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "ODatabaseMetaData::getColumns" );
- OSL_ENSURE(0,"Should be overloaded!");
+ OSL_FAIL("Should be overloaded!");
return new ODatabaseMetaDataResultSet( ODatabaseMetaDataResultSet::eColumns );
}
diff --git a/connectivity/source/drivers/file/FDateFunctions.cxx b/connectivity/source/drivers/file/FDateFunctions.cxx
index 792cb2d8bddb..a6be589f5328 100755
--- a/connectivity/source/drivers/file/FDateFunctions.cxx
+++ b/connectivity/source/drivers/file/FDateFunctions.cxx
@@ -70,7 +70,7 @@ ORowSetValue OOp_DayOfWeek::operate(const ORowSetValue& lhs) const
nRet = 1;
break;
default:
- OSL_ENSURE(0,"Error in enum values for date");
+ OSL_FAIL("Error in enum values for date");
}
return nRet;
}
@@ -136,7 +136,7 @@ ORowSetValue OOp_DayName::operate(const ORowSetValue& lhs) const
sRet = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Sunday"));
break;
default:
- OSL_ENSURE(0,"Error in enum values for date");
+ OSL_FAIL("Error in enum values for date");
}
return sRet;
}
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index d0056768663e..58d6baad649e 100755
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -1615,7 +1615,7 @@ sal_Bool OResultSet::OpenImpl()
m_nRowCountResult = 1;
break;
default:
- OSL_ENSURE( false, "OResultSet::OpenImpl: unsupported statement type!" );
+ OSL_FAIL( "OResultSet::OpenImpl: unsupported statement type!" );
break;
}
diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx
index 2d31ff691e17..ddf70610939b 100755
--- a/connectivity/source/drivers/file/FTable.cxx
+++ b/connectivity/source/drivers/file/FTable.cxx
@@ -226,13 +226,13 @@ sal_Bool OFileTable::UpdateRow(OValueRefVector& /*rRow*/, OValueRefRow& /*pOrgRo
void OFileTable::addColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& /*descriptor*/)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OFileTable::addColumn" );
- OSL_ENSURE( false, "OFileTable::addColumn: not implemented!" );
+ OSL_FAIL( "OFileTable::addColumn: not implemented!" );
}
// -----------------------------------------------------------------------------
void OFileTable::dropColumn(sal_Int32 /*_nPos*/)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OFileTable::dropColumn" );
- OSL_ENSURE( false, "OFileTable::addColumn: not implemented!" );
+ OSL_FAIL( "OFileTable::addColumn: not implemented!" );
}
// -----------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx
index a69f521aff67..6cc7b6eaccb3 100755
--- a/connectivity/source/drivers/file/fanalyzer.cxx
+++ b/connectivity/source/drivers/file/fanalyzer.cxx
@@ -270,7 +270,7 @@ void OSQLAnalyzer::describeParam(::rtl::Reference<OSQLColumns> rParameterColumns
if (IS_TYPE(OOperandResult,pOperand))
delete pOperand;
else
- OSL_ENSURE(0,"Illegal here!");
+ OSL_FAIL("Illegal here!");
rParameterColumns = aNewParamColumns;
}
diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx
index e8464c4740d7..bd920d356034 100755
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@ -274,7 +274,7 @@ OOperand* OPredicateCompiler::execute_COMPARE(OSQLParseNode* pPredicateNode) th
else if (pPrec->getNodeType() == SQL_NODE_GREAT)
ePredicateType = SQLFilterOperator::GREATER;
else
- OSL_ENSURE( false, "OPredicateCompiler::execute_COMPARE: unexpected node type!" );
+ OSL_FAIL( "OPredicateCompiler::execute_COMPARE: unexpected node type!" );
execute(pPredicateNode->getChild(0));
execute(pPredicateNode->getChild(2));
@@ -471,7 +471,7 @@ OOperand* OPredicateCompiler::execute_Operand(OSQLParseNode* pPredicateNode) thr
}
catch(Exception &)
{
- OSL_ENSURE(0,"OPredicateCompiler::execute_Operand Exception");
+ OSL_FAIL("OPredicateCompiler::execute_Operand Exception");
}
}
else if (SQL_ISRULE(pPredicateNode,parameter))
@@ -778,7 +778,7 @@ OOperand* OPredicateCompiler::executeFunction(OSQLParseNode* pPredicateNode)
pOperator = new OOp_Second();
break;
default:
- OSL_ENSURE(0,"Error in switch!");
+ OSL_FAIL("Error in switch!");
}
break;
case SQL_TOKEN_CHAR:
@@ -866,7 +866,7 @@ OOperand* OPredicateCompiler::executeFunction(OSQLParseNode* pPredicateNode)
pOperator = new OOp_Week();
break;
default:
- OSL_ENSURE(0,"Error in switch!");
+ OSL_FAIL("Error in switch!");
}
}
break;
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index 0fc2a71ac10d..6756fd5a8447 100755
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -654,7 +654,7 @@ namespace connectivity
}
catch(Exception&)
{
- OSL_ENSURE( false, "ODriverDelegator::preCommit: caught an exception!" );
+ OSL_FAIL( "ODriverDelegator::preCommit: caught an exception!" );
}
}
}
@@ -805,7 +805,7 @@ namespace connectivity
// second round, this time without matching the country
return lcl_getCollationForLocale( _rLocaleString, true );
- OSL_ENSURE( false, "lcl_getCollationForLocale: unknown locale string, falling back to Latin1_General!" );
+ OSL_FAIL( "lcl_getCollationForLocale: unknown locale string, falling back to Latin1_General!" );
return "Latin1_General";
}
diff --git a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
index 1ce47beb572f..04f15cab4a21 100755
--- a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
@@ -92,7 +92,7 @@ SAL_DLLPUBLIC_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_NativeStor
}
catch(Exception&)
{
- OSL_ENSURE( false, "NativeStorageAccess::close: caught an exception while flushing!" );
+ OSL_FAIL( "NativeStorageAccess::close: caught an exception while flushing!" );
}
#ifdef HSQLDB_DBG
{
@@ -443,7 +443,7 @@ void write_to_storage_stream_from_buffer( JNIEnv* env, jobject /*obj_this*/, jst
if (JNI_FALSE != env->ExceptionCheck())
{
env->ExceptionClear();
- OSL_ENSURE(0,"ExceptionClear");
+ OSL_FAIL("ExceptionClear");
}
OSL_ENSURE(buf,"buf is NULL");
if ( buf && len > 0 && len <= env->GetArrayLength(buffer))
@@ -466,7 +466,7 @@ void write_to_storage_stream_from_buffer( JNIEnv* env, jobject /*obj_this*/, jst
}
catch(Exception& e)
{
- OSL_ENSURE(0,"Exception caught! : write [BII)V");
+ OSL_FAIL("Exception caught! : write [BII)V");
StorageContainer::throwJavaException(e,env);
}
}
@@ -525,7 +525,7 @@ void write_to_storage_stream( JNIEnv* env, jobject /*obj_this*/, jstring name, j
}
catch(Exception& e)
{
- OSL_ENSURE(0,"Exception catched! : writeBytes(aData);");
+ OSL_FAIL("Exception catched! : writeBytes(aData);");
StorageContainer::throwJavaException(e,env);
}
}
diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
index 6dbf7a30bbbe..f8bc5c53b0ce 100755
--- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
@@ -85,7 +85,7 @@ namespace connectivity
catch(const Exception& e)
{
OSL_UNUSED( e );
- OSL_ENSURE(0,"Could not dispose OutputStream");
+ OSL_FAIL("Could not dispose OutputStream");
}
m_xOutputStream.clear();
}
@@ -93,7 +93,7 @@ namespace connectivity
catch(Exception& ex)
{
OSL_UNUSED( ex );
- OSL_ENSURE(0,"Exception catched!");
+ OSL_FAIL("Exception catched!");
}
}
// -----------------------------------------------------------------------------
@@ -158,7 +158,7 @@ namespace connectivity
if (JNI_FALSE != env->ExceptionCheck())
{
env->ExceptionClear();
- OSL_ENSURE(0,"ExceptionClear");
+ OSL_FAIL("ExceptionClear");
}
::rtl::OUString aStr;
if ( jstr )
@@ -175,7 +175,7 @@ namespace connectivity
if (JNI_FALSE != env->ExceptionCheck())
{
env->ExceptionClear();
- OSL_ENSURE(0,"ExceptionClear");
+ OSL_FAIL("ExceptionClear");
}
return aStr;
}
@@ -313,7 +313,7 @@ namespace connectivity
if ( _nMode < 16 )
sMessage += "0";
sMessage += ::rtl::OString::valueOf( _nMode, 16 ).toAsciiUpperCase();
- OSL_ENSURE( false, sMessage.getStr() );
+ OSL_FAIL( sMessage.getStr() );
#endif
StorageContainer::throwJavaException(e,env);
}
diff --git a/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx b/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx
index 5a51e6d9bb7f..9bd28fa0b0d4 100755
--- a/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx
+++ b/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx
@@ -91,7 +91,7 @@ SAL_DLLPUBLIC_EXPORT jboolean JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Storag
}
catch(Exception& e)
{
- OSL_ENSURE(0,"Exception catched! : Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_isStreamElement");
+ OSL_FAIL("Exception catched! : Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_isStreamElement");
if (JNI_FALSE != env->ExceptionCheck())
env->ExceptionClear();
::rtl::OString cstr( ::rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_JAVA_UTF8 ) );
@@ -130,7 +130,7 @@ SAL_DLLPUBLIC_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageFil
}
catch(Exception& e)
{
- OSL_ENSURE(0,"Exception catched! : Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_removeElement");
+ OSL_FAIL("Exception catched! : Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_removeElement");
StorageContainer::throwJavaException(e,env);
}
}
@@ -173,7 +173,7 @@ SAL_DLLPUBLIC_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageFil
}
catch(Exception& e)
{
- OSL_ENSURE(0,"Exception catched! : Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_renameElement");
+ OSL_FAIL("Exception catched! : Java_com_sun_star_sdbcx_comp_hsqldb_StorageFileAccess_renameElement");
StorageContainer::throwJavaException(e,env);
}
}
diff --git a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
index b9b78a675936..28711c7bf277 100755
--- a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
+++ b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
@@ -191,7 +191,7 @@ SAL_DLLPUBLIC_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNa
}
catch(Exception& e)
{
- OSL_ENSURE(0,"Exception catched! : skip();");
+ OSL_FAIL("Exception catched! : skip();");
StorageContainer::throwJavaException(e,env);
}
}
@@ -234,7 +234,7 @@ SAL_DLLPUBLIC_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNat
}
catch(Exception& e)
{
- OSL_ENSURE(0,"Exception caught! : available();");
+ OSL_FAIL("Exception caught! : available();");
StorageContainer::throwJavaException(e,env);
}
}
@@ -278,7 +278,7 @@ SAL_DLLPUBLIC_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNat
}
catch(Exception& e)
{
- OSL_ENSURE(0,"Exception catched! : skip();");
+ OSL_FAIL("Exception catched! : skip();");
StorageContainer::throwJavaException(e,env);
}
diff --git a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx
index 4ef88ff7bdca..8bae08b4bf30 100755
--- a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx
+++ b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx
@@ -213,7 +213,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb
}
catch(Exception&)
{
- OSL_ENSURE( false, "StorageNativeOutputStream::sync: could not flush output stream!" );
+ OSL_FAIL( "StorageNativeOutputStream::sync: could not flush output stream!" );
}
}
}
diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx
index 09e28dbac4c1..a2d9d453f20a 100755
--- a/connectivity/source/drivers/jdbc/ResultSet.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSet.cxx
@@ -865,7 +865,7 @@ void SAL_CALL java_sql_ResultSet::updateObject( sal_Int32 columnIndex, const ::c
void SAL_CALL java_sql_ResultSet::updateNumericObject( sal_Int32 columnIndex, const ::com::sun::star::uno::Any& x, sal_Int32 scale ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::updateNumericObject" );
- // OSL_ENSURE(0,"java_sql_ResultSet::updateNumericObject: NYI");
+ // OSL_FAIL("java_sql_ResultSet::updateNumericObject: NYI");
try
{
SDBThreadAttach t;
diff --git a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx
index e27ce35bce04..870b46ed3546 100755
--- a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx
@@ -1075,7 +1075,7 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getCrossReference(
// -------------------------------------------------------------------------
Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getUDTs( const Any&, const ::rtl::OUString&, const ::rtl::OUString&, const Sequence< sal_Int32 >& ) throw(SQLException, RuntimeException)
{
- OSL_ENSURE(0,"Not implemented yet!");
+ OSL_FAIL("Not implemented yet!");
throw SQLException();
}
// -----------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/kab/KDriver.cxx b/connectivity/source/drivers/kab/KDriver.cxx
index 20105d9b5db0..8c5554082078 100755
--- a/connectivity/source/drivers/kab/KDriver.cxx
+++ b/connectivity/source/drivers/kab/KDriver.cxx
@@ -106,7 +106,7 @@ namespace
if ( !_rFunction )
{ // did not find the symbol
- OSL_ENSURE( false, ::rtl::OString( "lcl_getFunctionFromModuleOrUnload: could not find the symbol " ) + ::rtl::OString( _pAsciiSymbolName ) );
+ OSL_FAIL( ::rtl::OString( "lcl_getFunctionFromModuleOrUnload: could not find the symbol " ) + ::rtl::OString( _pAsciiSymbolName ) );
osl_unloadModule( _rModule );
_rModule = NULL;
}
diff --git a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
index 896a5ca04c91..dcb776b6d3c2 100755
--- a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
@@ -1119,7 +1119,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getCrossReference(
// -------------------------------------------------------------------------
Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getUDTs( const Any&, const ::rtl::OUString&, const ::rtl::OUString&, const Sequence< sal_Int32 >& ) throw(SQLException, RuntimeException)
{
- OSL_ENSURE(0,"Not implemented yet!");
+ OSL_FAIL("Not implemented yet!");
throw SQLException();
}
// -----------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/macab/MacabDriver.cxx b/connectivity/source/drivers/macab/MacabDriver.cxx
index ed6c40867c2a..92d3e0f16963 100755
--- a/connectivity/source/drivers/macab/MacabDriver.cxx
+++ b/connectivity/source/drivers/macab/MacabDriver.cxx
@@ -84,7 +84,7 @@ namespace
if ( !_rFunction )
{ // did not find the symbol
- OSL_ENSURE( false, ::rtl::OString( "lcl_getFunctionFromModuleOrUnload: could not find the symbol " ) + ::rtl::OString( _pAsciiSymbolName ) );
+ OSL_FAIL( ::rtl::OString( "lcl_getFunctionFromModuleOrUnload: could not find the symbol " ) + ::rtl::OString( _pAsciiSymbolName ) );
osl_unloadModule( _rModule );
_rModule = NULL;
}
diff --git a/connectivity/source/drivers/macab/MacabRecords.cxx b/connectivity/source/drivers/macab/MacabRecords.cxx
index 93cbca5b79f6..86d34a808355 100755
--- a/connectivity/source/drivers/macab/MacabRecords.cxx
+++ b/connectivity/source/drivers/macab/MacabRecords.cxx
@@ -448,7 +448,7 @@ MacabHeader *MacabRecords::createHeaderForRecordType(const CFArrayRef _records,
else
{
// Couldn't find a required property...
- OSL_ENSURE(false, ::rtl::OString("MacabRecords::createHeaderForRecordType: could not find required property: ") +
+ OSL_FAIL(::rtl::OString("MacabRecords::createHeaderForRecordType: could not find required property: ") +
::rtl::OUStringToOString(CFStringToOUString(requiredProperties[i]), RTL_TEXTENCODING_ASCII_US));
}
}
diff --git a/connectivity/source/drivers/mozab/MColumnAlias.cxx b/connectivity/source/drivers/mozab/MColumnAlias.cxx
index 211a7c307542..4585bddd6331 100755
--- a/connectivity/source/drivers/mozab/MColumnAlias.cxx
+++ b/connectivity/source/drivers/mozab/MColumnAlias.cxx
@@ -174,7 +174,7 @@ void OColumnAlias::initialize( const ::com::sun::star::uno::Reference< ::com::su
AliasMap::const_iterator pos = m_aAliasMap.find( _rAlias );
if ( pos == m_aAliasMap.end() )
{
- OSL_ENSURE( false, "OColumnAlias::getProgrammaticNameOrFallbackToUTF8Alias: no programmatic name for this alias!" );
+ OSL_FAIL( "OColumnAlias::getProgrammaticNameOrFallbackToUTF8Alias: no programmatic name for this alias!" );
return ::rtl::OUStringToOString( _rAlias, RTL_TEXTENCODING_UTF8 );
}
return pos->second.programmaticAsciiName;
diff --git a/connectivity/source/drivers/mozab/MConnection.cxx b/connectivity/source/drivers/mozab/MConnection.cxx
index df121ffeacce..943bb7cc774e 100755
--- a/connectivity/source/drivers/mozab/MConnection.cxx
+++ b/connectivity/source/drivers/mozab/MConnection.cxx
@@ -573,11 +573,11 @@ void OConnection::throwSQLException( const ErrorDescriptor& _rError, const Refer
"$1$", sParameter
) );
::dbtools::throwGenericSQLException( sError, _rxContext );
- OSL_ENSURE( false, "OConnection::throwSQLException: unreachable (1)!" );
+ OSL_FAIL( "OConnection::throwSQLException: unreachable (1)!" );
}
throwGenericSQLException( _rError.getResId(), _rxContext );
- OSL_ENSURE( false, "OConnection::throwSQLException: unreachable (2)!" );
+ OSL_FAIL( "OConnection::throwSQLException: unreachable (2)!" );
}
if ( _rError.getErrorCondition() != 0 )
@@ -588,7 +588,7 @@ void OConnection::throwSQLException( const ErrorDescriptor& _rError, const Refer
aErrorHelper.raiseException( _rError.getErrorCondition(), _rxContext, sParameter );
else
aErrorHelper.raiseException( _rError.getErrorCondition(), _rxContext);
- OSL_ENSURE( false, "OConnection::throwSQLException: unreachable (3)!" );
+ OSL_FAIL( "OConnection::throwSQLException: unreachable (3)!" );
}
throwGenericSQLException( STR_UNSPECIFIED_ERROR, _rxContext );
diff --git a/connectivity/source/drivers/mozab/MDriver.cxx b/connectivity/source/drivers/mozab/MDriver.cxx
index e78ed7dab7f0..082a2bb9331e 100755
--- a/connectivity/source/drivers/mozab/MDriver.cxx
+++ b/connectivity/source/drivers/mozab/MDriver.cxx
@@ -283,7 +283,7 @@ namespace
if ( !_rFunction )
{ // did not find the symbol
- OSL_ENSURE( false, ::rtl::OString( "lcl_getFunctionFromModuleOrUnload: could not find the symbol " ) + ::rtl::OString( _pAsciiSymbolName ) );
+ OSL_FAIL( ::rtl::OString( "lcl_getFunctionFromModuleOrUnload: could not find the symbol " ) + ::rtl::OString( _pAsciiSymbolName ) );
osl_unloadModule( _rModule );
_rModule = NULL;
}
diff --git a/connectivity/source/drivers/mozab/MResultSet.cxx b/connectivity/source/drivers/mozab/MResultSet.cxx
index b233e19a8c56..9a891affdd08 100755
--- a/connectivity/source/drivers/mozab/MResultSet.cxx
+++ b/connectivity/source/drivers/mozab/MResultSet.cxx
@@ -172,7 +172,7 @@ void OResultSet::methodEntry()
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
if ( !m_pTable )
{
- OSL_ENSURE( false, "OResultSet::methodEntry: looks like we're disposed, but how is this possible?" );
+ OSL_FAIL( "OResultSet::methodEntry: looks like we're disposed, but how is this possible?" );
throw DisposedException( ::rtl::OUString(), *this );
}
}
@@ -642,7 +642,7 @@ sal_Bool OResultSet::convertFastPropertyValue(
const Any& /*rValue*/ )
throw (::com::sun::star::lang::IllegalArgumentException)
{
- OSL_ENSURE( false, "OResultSet::convertFastPropertyValue: not implemented!" );
+ OSL_FAIL( "OResultSet::convertFastPropertyValue: not implemented!" );
switch(nHandle)
{
case PROPERTY_ID_ISBOOKMARKABLE:
@@ -663,7 +663,7 @@ void OResultSet::setFastPropertyValue_NoBroadcast(
)
throw (Exception)
{
- OSL_ENSURE( false, "OResultSet::setFastPropertyValue_NoBroadcast: not implemented!" );
+ OSL_FAIL( "OResultSet::setFastPropertyValue_NoBroadcast: not implemented!" );
switch(nHandle)
{
case PROPERTY_ID_ISBOOKMARKABLE:
diff --git a/connectivity/source/drivers/mozab/MResultSetMetaData.cxx b/connectivity/source/drivers/mozab/MResultSetMetaData.cxx
index 99894fb750e1..042207f6618e 100755
--- a/connectivity/source/drivers/mozab/MResultSetMetaData.cxx
+++ b/connectivity/source/drivers/mozab/MResultSetMetaData.cxx
@@ -175,7 +175,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isSearchable( sal_Int32 column ) throw(SQL
if ( !m_pTable || !m_pTable->getConnection() )
{
- OSL_ENSURE( false, "OResultSetMetaData::isSearchable: suspicious: called without table or connection!" );
+ OSL_FAIL( "OResultSetMetaData::isSearchable: suspicious: called without table or connection!" );
return sal_False;
}
diff --git a/connectivity/source/drivers/mozab/MStatement.cxx b/connectivity/source/drivers/mozab/MStatement.cxx
index 709676b21966..2070f8da37c8 100755
--- a/connectivity/source/drivers/mozab/MStatement.cxx
+++ b/connectivity/source/drivers/mozab/MStatement.cxx
@@ -255,7 +255,7 @@ OCommonStatement::StatementType OCommonStatement::parseSql( const ::rtl::OUStrin
}
getOwnConnection()->throwSQLException( STR_QUERY_TOO_COMPLEX, *this );
- OSL_ENSURE( false, "OCommonStatement::parseSql: unreachable!" );
+ OSL_FAIL( "OCommonStatement::parseSql: unreachable!" );
return eSelect;
}
diff --git a/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx b/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx
index 4af7668e4ec2..7f625c59a1b7 100755
--- a/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx
+++ b/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx
@@ -188,7 +188,7 @@ namespace connectivity { namespace mozab {
// -------------------------------------------------------------------
NS_IMETHODIMP MLdapAttributeMap::GetAttributes(const nsACString & aProperty, PRUint32* aCount, char*** aAttrs)
{
- OSL_ENSURE( false, "MLdapAttributeMap::GetAttributes: not implemented!" );
+ OSL_FAIL( "MLdapAttributeMap::GetAttributes: not implemented!" );
(void)aProperty;
(void)aCount;
(void)aAttrs;
@@ -220,7 +220,7 @@ namespace connectivity { namespace mozab {
// -------------------------------------------------------------------
NS_IMETHODIMP MLdapAttributeMap::SetAttributeList(const nsACString & aProperty, const nsACString & aAttributeList, PRBool allowInconsistencies)
{
- OSL_ENSURE( false, "MLdapAttributeMap::SetAttributeList: not implemented!" );
+ OSL_FAIL( "MLdapAttributeMap::SetAttributeList: not implemented!" );
(void)aProperty;
(void)aAttributeList;
(void)allowInconsistencies;
@@ -230,7 +230,7 @@ namespace connectivity { namespace mozab {
// -------------------------------------------------------------------
NS_IMETHODIMP MLdapAttributeMap::GetProperty(const nsACString & aAttribute, nsACString & _retval)
{
- OSL_ENSURE( false, "MLdapAttributeMap::GetProperty: not implemented!" );
+ OSL_FAIL( "MLdapAttributeMap::GetProperty: not implemented!" );
(void)aAttribute;
(void)_retval;
return NS_ERROR_NOT_IMPLEMENTED;
@@ -266,7 +266,7 @@ namespace connectivity { namespace mozab {
// -------------------------------------------------------------------
NS_IMETHODIMP MLdapAttributeMap::SetFromPrefs(const nsACString & aPrefBranchName)
{
- OSL_ENSURE( false, "MLdapAttributeMap::SetFromPrefs: not implemented!" );
+ OSL_FAIL( "MLdapAttributeMap::SetFromPrefs: not implemented!" );
(void)aPrefBranchName;
return NS_ERROR_NOT_IMPLEMENTED;
}
@@ -396,7 +396,7 @@ namespace connectivity { namespace mozab {
_card.SetPreferMailFormat(format);
}
else
- OSL_ENSURE( false, "MLdapAttributeMap::fillCardFromResult: unexpected property without default setters!" );
+ OSL_FAIL( "MLdapAttributeMap::fillCardFromResult: unexpected property without default setters!" );
}
}
}
@@ -439,7 +439,7 @@ namespace connectivity { namespace mozab {
}
}
else
- OSL_ENSURE( false, "MLdapAttributeMap::fillResultFromCard: unexpected property without default getters!" );
+ OSL_FAIL( "MLdapAttributeMap::fillResultFromCard: unexpected property without default getters!" );
}
_result.insert( prop->first, resultValue );
diff --git a/connectivity/source/drivers/odbc/ORealDriver.cxx b/connectivity/source/drivers/odbc/ORealDriver.cxx
index 1bca9cccc78a..c786df3e9b89 100755
--- a/connectivity/source/drivers/odbc/ORealDriver.cxx
+++ b/connectivity/source/drivers/odbc/ORealDriver.cxx
@@ -330,7 +330,7 @@ oslGenericFunction ORealObdcDriver::getOdbcFunction(sal_Int32 _nIndex) const
pFunction = (oslGenericFunction)pODBC3SQLNativeSql;
break;
default:
- OSL_ENSURE(0,"Function unknown!");
+ OSL_FAIL("Function unknown!");
}
return pFunction;
}
diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
index 8d880caa534f..55f7548d5f70 100755
--- a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
@@ -795,7 +795,7 @@ void ODatabaseMetaDataResultSet::setFastPropertyValue_NoBroadcast( sal_Int32 nHa
case PROPERTY_ID_FETCHSIZE:
throw Exception();
default:
- OSL_ENSURE(0,"setFastPropertyValue_NoBroadcast: Illegal handle value!");
+ OSL_FAIL("setFastPropertyValue_NoBroadcast: Illegal handle value!");
}
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx
index e93a465cea3b..e789f4bd111b 100755
--- a/connectivity/source/drivers/odbcbase/OResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx
@@ -320,7 +320,7 @@ TVoidPtr OResultSet::allocBindColumn(sal_Int32 _nType,sal_Int32 _nColumnIndex)
aPair = TVoidPtr(reinterpret_cast< sal_Int64 >(new sal_Int8[m_aRow[_nColumnIndex].getSequence().getLength()]),_nType);
break;
default:
- OSL_ENSURE(0,"Unknown type");
+ OSL_FAIL("Unknown type");
aPair = TVoidPtr(0,_nType);
}
return aPair;
@@ -1605,7 +1605,7 @@ sal_Bool OResultSet::move(IResultSetHelper::Movement _eCursorPosition, sal_Int32
if ( aIter->second == _nOffset )
return moveToBookmark(makeAny(aIter->first));
}
- OSL_ENSURE(0,"Bookmark not found!");
+ OSL_FAIL("Bookmark not found!");
}
return sal_False;
}
@@ -1740,7 +1740,7 @@ void OResultSet::fillNeededData(SQLRETURN _nRet)
break;
}
default:
- OSL_ENSURE(0,"Not supported at the moment!");
+ OSL_FAIL("Not supported at the moment!");
}
nRet = N3SQLParamData(m_aStatementHandle,&pColumnIndex);
}
diff --git a/connectivity/source/drivers/odbcbase/OStatement.cxx b/connectivity/source/drivers/odbcbase/OStatement.cxx
index 51689b44e2b5..8a92fa87911c 100755
--- a/connectivity/source/drivers/odbcbase/OStatement.cxx
+++ b/connectivity/source/drivers/odbcbase/OStatement.cxx
@@ -64,7 +64,7 @@ using namespace ::comphelper;
} \
catch(SQLException&) \
{ \
- OSL_ENSURE(0,"Exception in odbc catched"); \
+ OSL_FAIL("Exception in odbc catched"); \
}
#endif
@@ -839,7 +839,7 @@ void OStatement_Base::setResultSetType(sal_Int32 _par0)
nSet = SQL_SENSITIVE;
break;
default:
- OSL_ENSURE( false, "OStatement_Base::setResultSetType: invalid result set type!" );
+ OSL_FAIL( "OStatement_Base::setResultSetType: invalid result set type!" );
break;
}
@@ -1048,7 +1048,7 @@ void OStatement_Base::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const A
setEscapeProcessing( ::comphelper::getBOOL( rValue ) );
break;
default:
- OSL_ENSURE( false, "OStatement_Base::setFastPropertyValue_NoBroadcast: what property?" );
+ OSL_FAIL( "OStatement_Base::setFastPropertyValue_NoBroadcast: what property?" );
break;
}
}
@@ -1093,7 +1093,7 @@ void OStatement_Base::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const
rValue <<= getEscapeProcessing();
break;
default:
- OSL_ENSURE( false, "OStatement_Base::getFastPropertyValue: what property?" );
+ OSL_FAIL( "OStatement_Base::getFastPropertyValue: what property?" );
break;
}
}
diff --git a/connectivity/source/drivers/odbcbase/OTools.cxx b/connectivity/source/drivers/odbcbase/OTools.cxx
index 8ae72766fc04..d9eb8647d485 100755
--- a/connectivity/source/drivers/odbcbase/OTools.cxx
+++ b/connectivity/source/drivers/odbcbase/OTools.cxx
@@ -433,7 +433,7 @@ void OTools::ThrowException(OConnection* _pConnection,
case SQL_ERROR: break;
- case SQL_INVALID_HANDLE: OSL_ENSURE(0,"SdbODBC3_SetStatus: SQL_INVALID_HANDLE");
+ case SQL_INVALID_HANDLE: OSL_FAIL("SdbODBC3_SetStatus: SQL_INVALID_HANDLE");
throw SQLException();
}
diff --git a/connectivity/source/inc/ado/Aolewrap.hxx b/connectivity/source/inc/ado/Aolewrap.hxx
index 79371befcb7f..46dcf18668e6 100755
--- a/connectivity/source/inc/ado/Aolewrap.hxx
+++ b/connectivity/source/inc/ado/Aolewrap.hxx
@@ -190,7 +190,7 @@ namespace connectivity
#if OSL_DEBUG_LEVEL > 0
::rtl::OString sTemp("Unknown Item: ");
sTemp += ::rtl::OString(sStr.getStr(),sStr.getLength(),osl_getThreadTextEncoding());
- OSL_ENSURE(0,sTemp);
+ OSL_FAIL(sTemp);
#endif
}
else
diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y
index 498f9aad900f..dbfbd7ad1322 100755
--- a/connectivity/source/parse/sqlbison.y
+++ b/connectivity/source/parse/sqlbison.y
@@ -3949,7 +3949,7 @@ OParseContext::~OParseContext()
case ERROR_INVALID_TABLE_EXIST: aMsg = ERROR_STR_INVALID_TABLE_EXIST; break;
case ERROR_INVALID_QUERY_EXIST: aMsg = ERROR_STR_INVALID_QUERY_EXIST; break;
default:
- OSL_ENSURE( false, "OParseContext::getErrorMessage: unknown error code!" );
+ OSL_FAIL( "OParseContext::getErrorMessage: unknown error code!" );
break;
}
return aMsg;
@@ -3987,7 +3987,7 @@ OParseContext::~OParseContext()
case KEY_INTERSECTION:aKeyword = KEY_STR_INTERSECTION; break;
case KEY_NONE: break;
default:
- OSL_ENSURE( false, "OParseContext::getIntlKeywordAscii: unknown key!" );
+ OSL_FAIL( "OParseContext::getIntlKeywordAscii: unknown key!" );
break;
}
return aKeyword;
diff --git a/connectivity/source/parse/sqlflex.l b/connectivity/source/parse/sqlflex.l
index 8a4f5e577908..c959230c0da9 100755
--- a/connectivity/source/parse/sqlflex.l
+++ b/connectivity/source/parse/sqlflex.l
@@ -565,7 +565,7 @@ sal_Int32 mapEnumToToken(IParseContext::InternationalKeyCode _eKeyCode )
case IParseContext::KEY_FUSION: nTokenID = SQL_TOKEN_FUSION; break;
case IParseContext::KEY_INTERSECTION: nTokenID = SQL_TOKEN_INTERSECTION; break;
default:
- OSL_ENSURE( false, "mapEnumToToken: unsupported key!" );
+ OSL_FAIL( "mapEnumToToken: unsupported key!" );
}
return nTokenID;
}
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index f3f4ff179e02..59c7287fcdd8 100755
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -376,7 +376,7 @@ OSQLTable OSQLParseTreeIterator::impl_locateRecordSource( const ::rtl::OUString&
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseTreeIterator::impl_locateRecordSource" );
if ( !_rComposedName.getLength() )
{
- OSL_ENSURE( false, "OSQLParseTreeIterator::impl_locateRecordSource: no object name at all?" );
+ OSL_FAIL( "OSQLParseTreeIterator::impl_locateRecordSource: no object name at all?" );
return OSQLTable();
}
@@ -605,7 +605,7 @@ const OSQLParseNode* OSQLParseTreeIterator::getTableNode( OSQLTables& _rTables,
}
else
{
- OSL_ENSURE( false, "OSQLParseTreeIterator::getTableNode: subquery which is no select_statement: not yet implemented!" );
+ OSL_FAIL( "OSQLParseTreeIterator::getTableNode: subquery which is no select_statement: not yet implemented!" );
}
}
}
@@ -614,7 +614,7 @@ const OSQLParseNode* OSQLParseTreeIterator::getTableNode( OSQLTables& _rTables,
pTableNameNode = pTableRef->getChild(0);
}
else
- OSL_ENSURE( false, "OSQLParseTreeIterator::getTableNode: unhandled case!" );
+ OSL_FAIL( "OSQLParseTreeIterator::getTableNode: unhandled case!" );
}
return pTableNameNode;
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index 9ccad33c6c4a..c69017e0744b 100755
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -314,7 +314,7 @@ void OSQLParseNode::parseNodeToStr(::rtl::OUString& rString,
}
catch( const SQLException& )
{
- OSL_ENSURE( false, "OSQLParseNode::parseNodeToStr: this should not throw!" );
+ OSL_FAIL( "OSQLParseNode::parseNodeToStr: this should not throw!" );
// our callers don't expect this method to throw anything. The only known situation
// where impl_parseNodeToString_throw can throw is when there is a cyclic reference
// in the sub queries, but this cannot be the case here, as we do not parse to
@@ -702,7 +702,7 @@ void OSQLParseNode::impl_parseLikeNodeToString_throw( ::rtl::OUStringBuffer& rSt
}
catch ( Exception& )
{
- OSL_ENSURE( false, "OSQLParseNode::impl_parseLikeNodeToString_throw Exception occurred!" );
+ OSL_FAIL( "OSQLParseNode::impl_parseLikeNodeToString_throw Exception occurred!" );
}
if ( !m_aChildren[0]->isLeaf() )
{
@@ -775,7 +775,7 @@ sal_Bool OSQLParseNode::getTableComponents(const OSQLParseNode* _pTableNode,
}
else
{
- OSL_ENSURE(0,"Error in parse tree!");
+ OSL_FAIL("Error in parse tree!");
}
}
return _rTable.getLength() != 0;
@@ -1216,7 +1216,7 @@ OSQLParseNode* OSQLParser::predicateTree(::rtl::OUString& rErrorMessage, const :
}
catch ( Exception& )
{
- OSL_ENSURE(0,"DateFormatKey");
+ OSL_FAIL("DateFormatKey");
}
}
@@ -1980,7 +1980,7 @@ void OSQLParseNode::negateSearchCondition(OSQLParseNode*& pSearchCondition,sal_B
pNewComparison = new OSQLParseNode(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("=")),SQL_NODE_EQUAL,SQL_EQUAL);
break;
default:
- OSL_ENSURE( false, "OSQLParseNode::negateSearchCondition: unexpected node type!" );
+ OSL_FAIL( "OSQLParseNode::negateSearchCondition: unexpected node type!" );
break;
}
pSearchCondition->replace(pComparison, pNewComparison);
@@ -2369,7 +2369,7 @@ void OSQLParseNode::showParseTree( ::rtl::OUStringBuffer& _inout_rBuffer, sal_uI
default:
OSL_TRACE( "-- %i", int( m_eNodeType ) );
- OSL_ENSURE( false, "OSQLParser::ShowParseTree: unzulaessiger NodeType" );
+ OSL_FAIL( "OSQLParser::ShowParseTree: unzulaessiger NodeType" );
}
}
}
diff --git a/connectivity/source/sdbcx/VCatalog.cxx b/connectivity/source/sdbcx/VCatalog.cxx
index f49c9e4fdbeb..8ea37b7cb216 100755
--- a/connectivity/source/sdbcx/VCatalog.cxx
+++ b/connectivity/source/sdbcx/VCatalog.cxx
@@ -61,7 +61,7 @@ OCatalog::OCatalog(const Reference< XConnection> &_xConnection) : OCatalog_BASE(
}
catch(const Exception&)
{
- OSL_ENSURE(0,"No Metadata available!");
+ OSL_FAIL("No Metadata available!");
}
}
//-----------------------------------------------------------------------------
diff --git a/connectivity/source/sdbcx/VIndex.cxx b/connectivity/source/sdbcx/VIndex.cxx
index e05b6e43056b..3326952d231d 100755
--- a/connectivity/source/sdbcx/VIndex.cxx
+++ b/connectivity/source/sdbcx/VIndex.cxx
@@ -177,7 +177,7 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OIndex::getColumn
}
catch( const Exception& )
{
- OSL_ENSURE( false, "OIndex::getColumns: caught an exception!" );
+ OSL_FAIL( "OIndex::getColumns: caught an exception!" );
}
return const_cast<OIndex*>(this)->m_pColumns;
diff --git a/connectivity/source/sdbcx/VUser.cxx b/connectivity/source/sdbcx/VUser.cxx
index 1b4a9b132c90..7bcdd52f8541 100755
--- a/connectivity/source/sdbcx/VUser.cxx
+++ b/connectivity/source/sdbcx/VUser.cxx
@@ -176,7 +176,7 @@ void SAL_CALL OUser::revokePrivileges( const ::rtl::OUString& /*objName*/, sal_I
// -----------------------------------------------------------------------------
void SAL_CALL OUser::setName( const ::rtl::OUString& /*aName*/ ) throw(::com::sun::star::uno::RuntimeException)
{
- OSL_ENSURE( false, "OUser::setName: not implemented!" );
+ OSL_FAIL( "OUser::setName: not implemented!" );
// not allowed to throw an SQLException here ...
}
// -----------------------------------------------------------------------------
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 37853116bb03..3134b03d87ba 100755
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -464,7 +464,7 @@ static bool needsSynchronization(
}
else if (err1 != ::osl::File::E_None)
{
- OSL_ENSURE(0, "Cannot access lastsynchronized in user layer");
+ OSL_FAIL("Cannot access lastsynchronized in user layer");
return true; //sync just in case
}
@@ -478,7 +478,7 @@ static bool needsSynchronization(
}
else if (err2 != ::osl::File::E_None)
{
- OSL_ENSURE(0, "Cannot access file lastsynchronized in base layer");
+ OSL_FAIL("Cannot access file lastsynchronized in base layer");
return true; //sync just in case
}
@@ -718,7 +718,7 @@ void Desktop::Init()
// We need to have service factory before going further.
if( !::comphelper::getProcessServiceFactory().is())
{
- OSL_ENSURE(0, "Service factory should have been crated in soffice_main().");
+ OSL_FAIL("Service factory should have been crated in soffice_main().");
SetBootstrapError( BE_UNO_SERVICEMANAGER );
}
diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx
index 20bad6f4504a..54adffc91faf 100755
--- a/desktop/source/app/check_ext_deps.cxx
+++ b/desktop/source/app/check_ext_deps.cxx
@@ -254,7 +254,7 @@ static bool impl_checkDependencies( const uno::Reference< uno::XComponentContext
if ( !xExtensionManager.is() )
{
- OSL_ENSURE( 0, "Could not get the Extension Manager!" );
+ OSL_FAIL( "Could not get the Extension Manager!" );
return true;
}
@@ -301,7 +301,7 @@ static bool impl_checkDependencies( const uno::Reference< uno::XComponentContext
catch ( uno::RuntimeException & ) { throw; }
catch ( uno::Exception & exc) {
(void) exc;
- OSL_ENSURE( 0, ::rtl::OUStringToOString( exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+ OSL_FAIL( ::rtl::OUStringToOString( exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
if ( bRegistered )
diff --git a/desktop/source/deployment/dp_log.cxx b/desktop/source/deployment/dp_log.cxx
index 0fc8b08a15b7..24a8b7b40c0d 100755
--- a/desktop/source/deployment/dp_log.cxx
+++ b/desktop/source/deployment/dp_log.cxx
@@ -89,7 +89,7 @@ void ProgressLogImpl::disposing()
}
catch (Exception & exc) {
(void) exc;
- OSL_ENSURE( 0, OUStringToOString(
+ OSL_FAIL( OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
@@ -153,7 +153,7 @@ void ProgressLogImpl::log_write( OString const & text )
}
catch (io::IOException & exc) {
(void) exc;
- OSL_ENSURE( 0, OUStringToOString(
+ OSL_FAIL( OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
diff --git a/desktop/source/deployment/dp_persmap.cxx b/desktop/source/deployment/dp_persmap.cxx
index 78d4a64d3242..92e4080063f9 100755
--- a/desktop/source/deployment/dp_persmap.cxx
+++ b/desktop/source/deployment/dp_persmap.cxx
@@ -61,7 +61,7 @@ void PersistentMap::throw_rtexc( int err, char const * pmsg ) const
buf.append( OUString( msg.getStr(), msg.getLength(),
osl_getThreadTextEncoding() ) );
const OUString msg_(buf.makeStringAndClear());
- OSL_ENSURE( 0, rtl::OUStringToOString(
+ OSL_FAIL( rtl::OUStringToOString(
msg_, RTL_TEXTENCODING_UTF8 ).getStr() );
throw RuntimeException( msg_, Reference<XInterface>() );
}
@@ -74,7 +74,7 @@ PersistentMap::~PersistentMap()
}
catch (DbException & exc) {
(void) exc; // avoid warnings
- OSL_ENSURE( 0, DbEnv::strerror( exc.get_errno() ) );
+ OSL_FAIL( DbEnv::strerror( exc.get_errno() ) );
}
}
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index f39242d9f005..785601c5599f 100755
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -941,7 +941,7 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker()
xFilterManager->appendFilter( iPos->first, iPos->second );
}
catch (lang::IllegalArgumentException & exc) {
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
(void) exc;
}
@@ -969,7 +969,7 @@ IMPL_LINK( ExtMgrDialog, HandleCancelBtn, void*, EMPTYARG )
}
catch ( uno::RuntimeException & )
{
- OSL_ENSURE( 0, "### unexpected RuntimeException!" );
+ OSL_FAIL( "### unexpected RuntimeException!" );
}
}
return 1;
@@ -1384,7 +1384,7 @@ IMPL_LINK( UpdateRequiredDialog, HandleCancelBtn, void*, EMPTYARG )
}
catch ( uno::RuntimeException & )
{
- OSL_ENSURE( 0, "### unexpected RuntimeException!" );
+ OSL_FAIL( "### unexpected RuntimeException!" );
}
}
return 1;
@@ -1692,7 +1692,7 @@ bool UpdateRequiredDialog::isEnabled( const uno::Reference< deployment::XPackage
catch ( uno::RuntimeException & ) { throw; }
catch ( uno::Exception & exc) {
(void) exc;
- OSL_ENSURE( 0, ::rtl::OUStringToOString( exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+ OSL_FAIL( ::rtl::OUStringToOString( exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
bRegistered = false;
}
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index a5f3dc60cfa0..84f3e0ec6444 100755
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -894,7 +894,7 @@ void ExtensionCmdQueue::Thread::_addExtension( ::rtl::Reference< ProgressCmdEnv
OUString sName;
if ( ! (anyTitle >>= sName) )
{
- OSL_ENSURE(0, "Could not get file name for extension.");
+ OSL_FAIL("Could not get file name for extension.");
return;
}
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index 17650b7a92d1..eed7226ab48f 100755
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -986,7 +986,7 @@ long ExtensionBox_Impl::addEntry( const uno::Reference< deployment::XPackage > &
}
else if ( !m_bInCheckMode )
{
- OSL_ENSURE( 0, "ExtensionBox_Impl::addEntry(): Will not add duplicate entries" );
+ OSL_FAIL( "ExtensionBox_Impl::addEntry(): Will not add duplicate entries" );
}
}
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index 8adda1f85431..c86d3e2ba90b 100755
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -361,7 +361,7 @@ PackageState TheExtensionManager::getPackageState( const uno::Reference< deploym
}
catch ( uno::Exception & exc) {
(void) exc;
- OSL_ENSURE( 0, ::rtl::OUStringToOString( exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+ OSL_FAIL( ::rtl::OUStringToOString( exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
return NOT_AVAILABLE;
}
}
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index f1236a5406dc..8bff15a1c6ef 100755
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -1368,7 +1368,7 @@ sal_Bool ExtensionManager::synchronize(
{
//We catch the exception, so we can write the lastmodified file
//so we will no repeat this everytime OOo starts.
- OSL_ENSURE(0, "Extensions Manager: synchronize");
+ OSL_FAIL("Extensions Manager: synchronize");
}
OUString lastSyncBundled(RTL_CONSTASCII_USTRINGPARAM(
"$BUNDLED_EXTENSIONS_USER/lastsynchronized"));
@@ -1526,7 +1526,7 @@ bool singleton_entries(
}
catch (registry::InvalidRegistryException & exc) {
(void) exc; // avoid warnings
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
return false;
}
diff --git a/desktop/source/deployment/manager/dp_informationprovider.cxx b/desktop/source/deployment/manager/dp_informationprovider.cxx
index 75fd006814bb..1988b2498e31 100755
--- a/desktop/source/deployment/manager/dp_informationprovider.cxx
+++ b/desktop/source/deployment/manager/dp_informationprovider.cxx
@@ -360,7 +360,7 @@ bool singleton_entries(
}
catch (registry::InvalidRegistryException & exc) {
(void) exc; // avoid warnings
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
return false;
}
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index 1158056e64c8..a82b69439b60 100755
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -621,7 +621,7 @@ OUString PackageManagerImpl::detectMediaType(
if (throw_exc)
throw;
(void) exc;
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
@@ -1097,13 +1097,13 @@ PackageManagerImpl::getDeployedPackages_(
catch (lang::IllegalArgumentException & exc) {
// ignore
(void) exc; // avoid warnings
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
catch (deployment::DeploymentException& exc) {
// ignore
(void) exc; // avoid warnings
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
diff --git a/desktop/source/deployment/manager/dp_managerfac.cxx b/desktop/source/deployment/manager/dp_managerfac.cxx
index cb2f3b7f4387..d84abbf0f926 100755
--- a/desktop/source/deployment/manager/dp_managerfac.cxx
+++ b/desktop/source/deployment/manager/dp_managerfac.cxx
@@ -99,7 +99,7 @@ bool singleton_entries(
}
catch (registry::InvalidRegistryException & exc) {
(void) exc; // avoid warnings
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
return false;
}
diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx
index ba7952364663..1a46cdda3d5a 100755
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -160,7 +160,7 @@ bool compareExtensionFolderWithLastSynchronizedFile(
}
else if (err1 != ::osl::File::E_None)
{
- OSL_ENSURE(0, "Cannot access extension folder");
+ OSL_FAIL("Cannot access extension folder");
return true; //sync just in case
}
@@ -174,7 +174,7 @@ bool compareExtensionFolderWithLastSynchronizedFile(
}
else if (err2 != ::osl::File::E_None)
{
- OSL_ENSURE(0, "Cannot access file lastsynchronized");
+ OSL_FAIL("Cannot access file lastsynchronized");
return true; //sync just in case
}
@@ -389,7 +389,7 @@ bool office_is_running()
}
else
{
- OSL_ENSURE(0, "NOT osl_Process_E_None ");
+ OSL_FAIL("NOT osl_Process_E_None ");
//if osl_getExecutable file than we take the risk of creating a pipe
ret = existsOfficePipe();
}
diff --git a/desktop/source/deployment/misc/dp_platform.cxx b/desktop/source/deployment/misc/dp_platform.cxx
index eefe9282c69d..d191dd680aa0 100755
--- a/desktop/source/deployment/misc/dp_platform.cxx
+++ b/desktop/source/deployment/misc/dp_platform.cxx
@@ -202,7 +202,7 @@ namespace
ret = checkOSandCPU(OUSTR("DragonFly"), OUSTR("X86_64"));
else
{
- OSL_ENSURE(0, "Extension Manager: The extension supports an unknown platform. "
+ OSL_FAIL("Extension Manager: The extension supports an unknown platform. "
"Check the platform element in the description.xml");
ret = false;
}
diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx
index a57ea2a6bbb4..06b8b68c6f68 100755
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -681,7 +681,7 @@ void Package::processPackage_impl(
}
}
catch (RuntimeException &) {
- OSL_ENSURE( 0, "### unexpected RuntimeException!" );
+ OSL_FAIL( "### unexpected RuntimeException!" );
throw;
}
catch (CommandFailedException &) {
diff --git a/desktop/source/deployment/registry/dp_registry.cxx b/desktop/source/deployment/registry/dp_registry.cxx
index 16d89523dbf8..9e799dd2d559 100755
--- a/desktop/source/deployment/registry/dp_registry.cxx
+++ b/desktop/source/deployment/registry/dp_registry.cxx
@@ -297,7 +297,7 @@ void PackageRegistryImpl::insertBackend(
xBackend, UNO_QUERY_THROW )->
getImplementationName() );
buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\"!") );
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
buf.makeStringAndClear(),
RTL_TEXTENCODING_UTF8 ) );
}
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index 7390460cdacb..10377e502029 100755
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -918,7 +918,7 @@ void BackendImpl::PackageImpl::processPackage_(
}
catch (Exception &)
{
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
::comphelper::anyToString(
::cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 ).getStr() );
@@ -1009,7 +1009,7 @@ OUString BackendImpl::PackageImpl::getDescription()
}
catch ( css::deployment::DeploymentException& )
{
- OSL_ENSURE( 0, ::rtl::OUStringToOString( ::comphelper::anyToString( ::cppu::getCaughtException() ), RTL_TEXTENCODING_UTF8 ).getStr() );
+ OSL_FAIL( ::rtl::OUStringToOString( ::comphelper::anyToString( ::cppu::getCaughtException() ), RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
@@ -1137,14 +1137,14 @@ void BackendImpl::PackageImpl::exportTo(
}
// xxx todo: think about exception specs:
catch (deployment::DeploymentException &) {
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
::comphelper::anyToString(
::cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 ).getStr() );
}
catch (lang::IllegalArgumentException & exc) {
(void) exc;
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
@@ -1213,7 +1213,7 @@ void BackendImpl::PackageImpl::exportTo(
makeURL( m_url_expanded, OUSTR("META-INF/manifest.xml") ),
xCmdEnv, false ) )
{
- OSL_ENSURE( 0, "### missing META-INF/manifest.xml file!" );
+ OSL_FAIL( "### missing META-INF/manifest.xml file!" );
return;
}
@@ -1437,7 +1437,7 @@ void BackendImpl::PackageImpl::scanBundle(
makeURL( m_url_expanded, OUSTR("META-INF/manifest.xml") ),
xCmdEnv, false /* no throw */ ))
{
- OSL_ENSURE( 0, "### missing META-INF/manifest.xml file!" );
+ OSL_FAIL( "### missing META-INF/manifest.xml file!" );
return;
}
diff --git a/desktop/source/migration/services/autocorrmigration.cxx b/desktop/source/migration/services/autocorrmigration.cxx
index b6e8a13b4335..2fd53751a71f 100755
--- a/desktop/source/migration/services/autocorrmigration.cxx
+++ b/desktop/source/migration/services/autocorrmigration.cxx
@@ -246,7 +246,7 @@ namespace migration
{
if ( !(aValue.Value >>= m_sSourceDir) )
{
- OSL_ENSURE( false, "AutocorrectionMigration::initialize: argument UserData has wrong type!" );
+ OSL_FAIL( "AutocorrectionMigration::initialize: argument UserData has wrong type!" );
}
m_sSourceDir += sSourceSubDir;
break;
diff --git a/desktop/source/migration/services/basicmigration.cxx b/desktop/source/migration/services/basicmigration.cxx
index 33b9cf9a4ef7..2d4530cf1a9a 100755
--- a/desktop/source/migration/services/basicmigration.cxx
+++ b/desktop/source/migration/services/basicmigration.cxx
@@ -235,7 +235,7 @@ namespace migration
{
if ( !(aValue.Value >>= m_sSourceDir) )
{
- OSL_ENSURE( false, "BasicMigration::initialize: argument UserData has wrong type!" );
+ OSL_FAIL( "BasicMigration::initialize: argument UserData has wrong type!" );
}
m_sSourceDir += sSourceUserBasic;
break;
diff --git a/desktop/source/migration/services/jvmfwk.cxx b/desktop/source/migration/services/jvmfwk.cxx
index 05c359c500a0..53c3596ae4f4 100755
--- a/desktop/source/migration/services/jvmfwk.cxx
+++ b/desktop/source/migration/services/jvmfwk.cxx
@@ -301,8 +301,7 @@ void SAL_CALL JavaMigration::initialize( const css::uno::Sequence< css::uno::Any
{
if ( !(aValue.Value >>= m_sUserDir) )
{
- OSL_ENSURE(
- false,
+ OSL_FAIL(
"[Service implementation " IMPL_NAME
"] XInitialization::initialize: Argument UserData has wrong type.");
}
@@ -344,7 +343,7 @@ void JavaMigration::migrateJavarc()
{
if (jfw_setSelectedJRE(aInfo) != JFW_E_NONE)
{
- OSL_ENSURE(0, "[Service implementation " IMPL_NAME
+ OSL_FAIL("[Service implementation " IMPL_NAME
"] XJob::execute: jfw_setSelectedJRE failed.");
fprintf(stderr, "\nCannot migrate Java. An error occurred.\n");
}
diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx
index 3eb779b2be32..43d1036b65a7 100755
--- a/desktop/source/migration/services/oo3extensionmigration.cxx
+++ b/desktop/source/migration/services/oo3extensionmigration.cxx
@@ -419,7 +419,7 @@ void OO3ExtensionMigration::initialize( const Sequence< Any >& aArguments ) thro
{
if ( !(aValue.Value >>= m_sSourceDir) )
{
- OSL_ENSURE( false, "ExtensionMigration::initialize: argument UserData has wrong type!" );
+ OSL_FAIL( "ExtensionMigration::initialize: argument UserData has wrong type!" );
}
}
else if ( aValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ExtensionBlackList" ) ) )
diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx
index 3e36003725d1..116f47104f63 100755
--- a/desktop/source/migration/services/wordbookmigration.cxx
+++ b/desktop/source/migration/services/wordbookmigration.cxx
@@ -283,7 +283,7 @@ bool IsUserWordbook( const ::rtl::OUString& rFile )
{
if ( !(aValue.Value >>= m_sSourceDir) )
{
- OSL_ENSURE( false, "WordbookMigration::initialize: argument UserData has wrong type!" );
+ OSL_FAIL( "WordbookMigration::initialize: argument UserData has wrong type!" );
}
m_sSourceDir += sSourceSubDir;
break;
diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
index 09ad55cac8e4..f39364ae4dd9 100755
--- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
@@ -155,7 +155,7 @@ CommandEnvironmentImpl::~CommandEnvironmentImpl()
}
catch (RuntimeException & exc) {
(void) exc;
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, osl_getThreadTextEncoding() ).getStr() );
}
}
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
index 67c6306a3c9f..0d5e57318e36 100755
--- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
@@ -105,7 +105,7 @@ OptionInfo const * getOptionInfo(
}
}
}
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
opt, osl_getThreadTextEncoding() ).getStr() );
return 0;
}
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index d205981205aa..5d3e5181855d 100755
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -2115,7 +2115,7 @@ namespace
case META_TEXTRECT_ACTION :
{
/** CHECKED, WORKS WELL */
- // OSL_ENSURE(false, "META_TEXTRECT_ACTION requested (!)");
+ // OSL_FAIL("META_TEXTRECT_ACTION requested (!)");
const MetaTextRectAction* pA = (const MetaTextRectAction*)pAction;
const Rectangle& rRectangle = pA->GetRect();
const sal_uInt32 nStringLength(pA->GetText().Len());
@@ -2729,7 +2729,7 @@ namespace
}
default :
{
- OSL_ENSURE(false, "interpretMetafile: META_MAPMODE_ACTION with unsupported MapUnit (!)");
+ OSL_FAIL("interpretMetafile: META_MAPMODE_ACTION with unsupported MapUnit (!)");
break;
}
}
@@ -3147,7 +3147,7 @@ namespace
}
default:
{
- OSL_ENSURE(false, "Unknown MetaFile Action (!)");
+ OSL_FAIL("Unknown MetaFile Action (!)");
break;
}
}
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index c0cc47c4a41e..c7e856a63eb2 100755
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -850,7 +850,7 @@ namespace drawinglayer
}
catch(const uno::Exception&)
{
- OSL_ENSURE(false, "VclMetafileProcessor2D: No access to printable flag of Control, caught an exception!");
+ OSL_FAIL("VclMetafileProcessor2D: No access to printable flag of Control, caught an exception!");
}
}
@@ -927,7 +927,7 @@ namespace drawinglayer
}
catch( const uno::Exception& )
{
- OSL_ENSURE(false, "VclMetafileProcessor2D: Printing of Control failed, caught an exception!");
+ OSL_FAIL("VclMetafileProcessor2D: Printing of Control failed, caught an exception!");
}
}
diff --git a/editeng/inc/editeng/numitem.hxx b/editeng/inc/editeng/numitem.hxx
index 3fdc66fa7f0b..32d771cf00ac 100755
--- a/editeng/inc/editeng/numitem.hxx
+++ b/editeng/inc/editeng/numitem.hxx
@@ -362,9 +362,6 @@ inline SvxNodeNum& SvxNodeNum::operator=( const SvxNodeNum& rCpy )
return *this;
}
-/* --------------------------------------------------
- *
- * --------------------------------------------------*/
SvxNumRule* SvxConvertNumRule( const SvxNumRule* pRule, sal_uInt16 nLevel, SvxNumRuleType eType );
#endif
diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx
index 2898e5ac9af2..f65c29a5848f 100755
--- a/editeng/inc/editeng/outliner.hxx
+++ b/editeng/inc/editeng/outliner.hxx
@@ -286,7 +286,7 @@ public:
Rectangle GetVisArea() const;
- List* CreateSelectionList();
+ void CreateSelectionList (std::vector<Paragraph*> &aSelList) ;
// Retruns the number of selected paragraphs
sal_uLong Select( Paragraph* pParagraph,
diff --git a/editeng/inc/editeng/txtrange.hxx b/editeng/inc/editeng/txtrange.hxx
index 76c49002b160..54e80ff3997f 100755
--- a/editeng/inc/editeng/txtrange.hxx
+++ b/editeng/inc/editeng/txtrange.hxx
@@ -29,22 +29,20 @@
#ifndef _MyTXTRANGE_HXX
#define _MyTXTRANGE_HXX
-#ifndef _TXTRANGE_HXX
-#define _SVSTDARR_sal_BoolS
-#define _SVSTDARR_LONGS
-#include <svl/svstdarr.hxx>
-#endif
#include "editeng/editengdllapi.h"
+#include "tools/solar.h"
+#include "tools/gen.hxx"
+
+#include <deque>
class PolyPolygon;
-class Range;
class Rectangle;
namespace basegfx {
class B2DPolyPolygon;
}
-typedef SvLongs* SvLongsPtr;
+typedef std::deque<long>* LongDqPtr;
/*************************************************************************
|*
@@ -53,13 +51,18 @@ typedef SvLongs* SvLongsPtr;
*************************************************************************/
class EDITENG_DLLPUBLIC TextRanger
{
- Range *pRangeArr;
- SvLongsPtr *pCache;
+ //! The RangeCache class is used to cache the result of a single range calculation.
+ struct RangeCache
+ {
+ Range range; //!< Range for which we calculated results.
+ std::deque<long> results; //!< Calculated results for the range.
+ RangeCache(const Range& rng) : range(rng) {};
+ };
+ std::deque<RangeCache> mRangeCache; //!< Cached range calculations.
PolyPolygon *mpPolyPolygon; // Surface polygon
PolyPolygon *mpLinePolyPolygon; // Line polygon
Rectangle *pBound; // Comprehensive rectangle
sal_uInt16 nCacheSize; // Cache-Size
- sal_uInt16 nCacheIdx; // Cache-Index
sal_uInt16 nRight; // Distance Contour-Text
sal_uInt16 nLeft; // Distance Text-Contour
sal_uInt16 nUpper; // Distance Contour-Text
@@ -77,11 +80,12 @@ class EDITENG_DLLPUBLIC TextRanger
TextRanger( const TextRanger& ); // not implemented
const Rectangle& _GetBoundRect();
public:
- TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon,
+ TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon,
+ const basegfx::B2DPolyPolygon* pLinePolyPolygon,
sal_uInt16 nCacheSize, sal_uInt16 nLeft, sal_uInt16 nRight,
sal_Bool bSimple, sal_Bool bInner, sal_Bool bVert = sal_False );
~TextRanger();
- SvLongsPtr GetTextRanges( const Range& rRange );
+ LongDqPtr GetTextRanges( const Range& rRange );
sal_uInt16 GetRight() const { return nRight; }
sal_uInt16 GetLeft() const { return nLeft; }
sal_uInt16 GetUpper() const { return nUpper; }
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index cbc7da65dd4a..9a785af062ca 100755
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -897,7 +897,7 @@ namespace accessibility
#ifdef DBG_UTIL
if( !mxParent.is() )
- DBG_TRACE( "AccessibleEditableTextPara::getAccessibleParent: no frontend set, did somebody forgot to call AccessibleTextHelper::SetEventSource()?");
+ OSL_TRACE( "AccessibleEditableTextPara::getAccessibleParent: no frontend set, did somebody forgot to call AccessibleTextHelper::SetEventSource()?");
#endif
return mxParent;
@@ -1963,7 +1963,7 @@ namespace accessibility
PropertyState eState = aPropSet._getPropertyState( pProperties->Name, mnParagraphIndex );
if ( eState == PropertyState_AMBIGUOUS_VALUE )
{
- OSL_ENSURE( false, "ambiguous property value encountered" );
+ OSL_FAIL( "ambiguous property value encountered" );
}
//if (eState == PropertyState_DIRECT_VALUE)
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index c745d50db675..e463c09f2ba2 100755
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -525,7 +525,6 @@ Size EditLine::CalcTextSize( ParaPortion& rParaPortion )
}
break;
case PORTIONKIND_TAB:
-// case PORTIONKIND_EXTRASPACE:
{
aSz.Width() += pPortion->GetSize().Width();
}
@@ -708,9 +707,7 @@ ContentNode::ContentNode( const XubString& rStr, const ContentAttribs& rContentA
ContentNode::~ContentNode()
{
DBG_DTOR( EE_ContentNode, 0 );
-#ifndef SVX_LIGHT
delete pWrongList;
-#endif
}
void ContentNode::ExpandAttribs( sal_uInt16 nIndex, sal_uInt16 nNew, SfxItemPool& rItemPool )
@@ -838,13 +835,11 @@ void ContentNode::ExpandAttribs( sal_uInt16 nIndex, sal_uInt16 nNew, SfxItemPool
if ( bResort )
aCharAttribList.ResortAttribs();
-#ifndef SVX_LIGHT
if ( pWrongList )
{
sal_Bool bSep = ( GetChar( nIndex ) == ' ' ) || IsFeature( nIndex );
pWrongList->TextInserted( nIndex, nNew, bSep );
}
-#endif // !SVX_LIGHT
#ifdef EDITDEBUG
DBG_ASSERT( CheckOrderedList( aCharAttribList.GetAttribs(), sal_True ), "Expand: Start List distorted" );
@@ -931,10 +926,8 @@ void ContentNode::CollapsAttribs( sal_uInt16 nIndex, sal_uInt16 nDeleted, SfxIte
if ( bResort )
aCharAttribList.ResortAttribs();
-#ifndef SVX_LIGHT
if ( pWrongList )
pWrongList->TextDeleted( nIndex, nDeleted );
-#endif // !SVX_LIGHT
#ifdef EDITDEBUG
DBG_ASSERT( CheckOrderedList( aCharAttribList.GetAttribs(), sal_True ), "Collaps: Start list distorted" );
@@ -1083,18 +1076,14 @@ void ContentNode::SetStyleSheet( SfxStyleSheet* pS, sal_Bool bRecalcFont )
void ContentNode::DestroyWrongList()
{
-#ifndef SVX_LIGHT
delete pWrongList;
-#endif
pWrongList = NULL;
}
void ContentNode::CreateWrongList()
{
DBG_ASSERT( !pWrongList, "WrongList already exist!" );
-#ifndef SVX_LIGHT
pWrongList = new WrongList;
-#endif
}
void ContentNode::SetWrongList( WrongList* p )
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx
index 569a69e01cee..6cea7ddba7d7 100755
--- a/editeng/source/editeng/editdoc.hxx
+++ b/editeng/source/editeng/editdoc.hxx
@@ -349,7 +349,6 @@ public:
#define PORTIONKIND_LINEBREAK 2
#define PORTIONKIND_FIELD 3
#define PORTIONKIND_HYPHENATOR 4
-// #define PORTIONKIND_EXTRASPACE 5
#define DELMODE_SIMPLE 0
#define DELMODE_RESTOFWORD 1
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index 3e7f7332dab2..99eacb52f5f0 100755
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -211,10 +211,8 @@ ContentInfo::ContentInfo( const ContentInfo& rCopyFrom, SfxItemPool& rPoolToUse
}
pWrongs = NULL;
-#ifndef SVX_LIGHT
if ( rCopyFrom.GetWrongList() )
pWrongs = rCopyFrom.GetWrongList()->Clone();
-#endif // !SVX_LIGHT
}
ContentInfo::~ContentInfo()
@@ -226,9 +224,7 @@ ContentInfo::~ContentInfo()
delete pAttr;
}
aAttribs.Remove( 0, aAttribs.Count() );
-#ifndef SVX_LIGHT
delete pWrongs;
-#endif
}
// #i102062#
@@ -877,14 +873,12 @@ void BinTextObject::ClearPortionInfo()
sal_Bool BinTextObject::HasOnlineSpellErrors() const
{
-#ifndef SVX_LIGHT
for ( sal_uInt16 n = 0; n < aContents.Count(); n++ )
{
ContentInfo* p = aContents.GetObject( n );
if ( p->GetWrongList() && p->GetWrongList()->Count() )
return sal_True;
}
-#endif // !SVX_LIGHT
return sal_False;
}
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index e7f6089d0c86..4e1bcf8af865 100755
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -601,7 +601,6 @@ sal_uLong EditView::Read( SvStream& rInput, const String& rBaseURL, EETextFormat
return rInput.GetError();
}
-#ifndef SVX_LIGHT
sal_uLong EditView::Write( SvStream& rOutput, EETextFormat eFormat )
{
DBG_CHKTHIS( EditView, 0 );
@@ -610,7 +609,6 @@ sal_uLong EditView::Write( SvStream& rOutput, EETextFormat eFormat )
ShowCursor();
return rOutput.GetError();
}
-#endif
void EditView::Cut()
{
@@ -936,30 +934,22 @@ void EditView::CompleteAutoCorrect( Window* pFrameWin )
EESpellState EditView::StartSpeller( sal_Bool bMultipleDoc )
{
-#ifdef SVX_LIGHT
- return EE_SPELL_NOSPELLER;
-#else
DBG_CHKTHIS( EditView, 0 );
DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
if ( !PIMPEE->GetSpeller().is() )
return EE_SPELL_NOSPELLER;
return PIMPEE->Spell( this, bMultipleDoc );
-#endif
}
EESpellState EditView::StartThesaurus()
{
-#ifdef SVX_LIGHT
- return EE_SPELL_NOSPELLER;
-#else
DBG_CHKTHIS( EditView, 0 );
DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
if ( !PIMPEE->GetSpeller().is() )
return EE_SPELL_NOSPELLER;
return PIMPEE->StartThesaurus( this );
-#endif
}
@@ -967,12 +957,9 @@ void EditView::StartTextConversion(
LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont,
sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc )
{
-#ifdef SVX_LIGHT
-#else
DBG_CHKTHIS( EditView, 0 );
DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
PIMPEE->Convert( this, nSrcLang, nDestLang, pDestFont, nOptions, bIsInteractive, bMultipleDoc );
-#endif
}
@@ -1028,7 +1015,6 @@ static Image lcl_GetImageFromPngUrl( const OUString &rFileUrl )
void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack )
{
-#ifndef SVX_LIGHT
DBG_CHKTHIS( EditView, 0 );
DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
@@ -1302,7 +1288,6 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack )
SetSelection( aOldSel );
}
}
-#endif
}
void EditView::SpellIgnoreWord()
diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx
index 772e61f0e30c..ba4cd3012a3c 100755
--- a/editeng/source/editeng/edtspell.cxx
+++ b/editeng/source/editeng/edtspell.cxx
@@ -110,9 +110,6 @@ void EditSpellWrapper::SpellStart( SvxSpellArea eArea )
else if ( eArea == SVX_SPELL_BODY )
{
; // Is handled by the App through SpellNextDocument
-
- // pSpellInfo->bSpellToEnd = sal_True;
- // pSpellInfo->aSpellTo = pImpEE->CreateEPaM( pImpEE->GetEditDoc().GetEndPaM() );
}
else
{
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index 955703ba8566..30bc31feb6da 100755
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -197,8 +197,6 @@ void EditHTMLParser::NextToken( int nToken )
if ( !bInPara )
StartPara( sal_False );
- // if ( bInPara || pCurAnchor )
-
String aText = aToken;
if ( aText.Len() && ( aText.GetChar( 0 ) == ' ' )
&& ThrowAwayBlank() && !IsReadPRE() )
@@ -567,6 +565,7 @@ void EditHTMLParser::ImpSetAttribs( const SfxItemSet& rItems, EditSelection* pSe
sal_uInt16 nEndNode = pImpEditEngine->GetEditDoc().GetPos( pEN );
DBG_ASSERT( nStartNode == nEndNode, "ImpSetAttribs: Several paragraphs?" );
#endif
+
if ( ( aStartPaM.GetIndex() == 0 ) && ( aEndPaM.GetIndex() == aEndPaM.GetNode()->Len() ) )
{
// Has to be merged:
diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx
index 922fbf3f3bf6..e69db37d9f44 100755
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -160,12 +160,7 @@ SfxPoolItem** GlobalEditData::GetDefItems()
ppDefItems[43] = new SvxEmphasisMarkItem( EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK );
ppDefItems[44] = new SvxCharReliefItem( RELIEF_NONE, EE_CHAR_RELIEF );
ppDefItems[45] = new SfxVoidItem( EE_CHAR_RUBI_DUMMY );
-#ifndef SVX_LIGHT
ppDefItems[46] = new SvXMLAttrContainerItem( EE_CHAR_XMLATTRIBS );
-#else
- // no need to have alien attributes persistent
- ppDefItems[46] = new SfxVoidItem( EE_CHAR_XMLATTRIBS );
-#endif // #ifndef SVX_LIGHT
ppDefItems[47] = new SvxOverlineItem( UNDERLINE_NONE, EE_CHAR_OVERLINE );
// Features
diff --git a/editeng/source/editeng/eertfpar.hxx b/editeng/source/editeng/eertfpar.hxx
index 5f8ced33df60..30cb2bef94ec 100755
--- a/editeng/source/editeng/eertfpar.hxx
+++ b/editeng/source/editeng/eertfpar.hxx
@@ -33,8 +33,6 @@
#include <editdoc.hxx>
#include <impedit.hxx>
-#ifndef SVX_LIGHT
-
class EditNodeIdx : public SvxNodeIdx
{
private:
@@ -125,7 +123,6 @@ SV_DECL_REF( EditRTFParser )
SV_IMPL_REF( EditRTFParser );
-#endif // !SVX_LIGH
#endif //_EERTFPAR_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index f6f57a9176a9..6f38cd995840 100755
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -1102,7 +1102,6 @@ void ImpEditView::SetInsertMode( sal_Bool bInsert )
sal_Bool ImpEditView::IsWrongSpelledWord( const EditPaM& rPaM, sal_Bool bMarkIfWrong )
{
sal_Bool bIsWrong = sal_False;
-#ifndef SVX_LIGHT
if ( rPaM.GetNode()->GetWrongList() )
{
EditSelection aSel = pEditEngine->pImpEditEngine->SelectWord( rPaM, ::com::sun::star::i18n::WordType::DICTIONARY_WORD );
@@ -1114,14 +1113,12 @@ sal_Bool ImpEditView::IsWrongSpelledWord( const EditPaM& rPaM, sal_Bool bMarkIfW
DrawSelection();
}
}
-#endif // !SVX_LIGHT
return bIsWrong;
}
String ImpEditView::SpellIgnoreOrAddWord( sal_Bool bAdd )
{
String aWord;
-#ifndef SVX_LIGHT
if ( pEditEngine->pImpEditEngine->GetSpeller().is() )
{
EditPaM aPaM = GetEditSelection().Max();
@@ -1162,7 +1159,6 @@ String ImpEditView::SpellIgnoreOrAddWord( sal_Bool bAdd )
pEditEngine->pImpEditEngine->StartOnlineSpellTimer();
}
}
-#endif // !SVX_LIGHT
return aWord;
}
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 6b79488eaced..0737685834cd 100755
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -1108,14 +1108,12 @@ inline void ImpEditEngine::IdleFormatAndUpdate( EditView* pCurView )
aIdleFormatter.DoIdleFormat( pCurView );
}
-#ifndef SVX_LIGHT
inline EditUndoManager& ImpEditEngine::GetUndoManager()
{
if ( !pUndoManager )
pUndoManager = new EditUndoManager( this );
return *pUndoManager;
}
-#endif
inline ParaPortion* ImpEditEngine::FindParaPortion( ContentNode* pNode ) const
{
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 92b588ffe4fb..2ed5f1672b50 100755
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -265,10 +265,8 @@ void ImpEditEngine::InitDoc( sal_Bool bKeepParaAttribs )
GetEditEnginePtr()->ParagraphInserted( 0 );
}
-#ifndef SVX_LIGHT
if ( GetStatus().DoOnlineSpelling() )
aEditDoc.GetObject( 0 )->CreateWrongList();
-#endif // !SVX_LIGHT
}
EditPaM ImpEditEngine::DeleteSelected( EditSelection aSel )
@@ -763,9 +761,7 @@ void ImpEditEngine::SetText( const XubString& rText )
if( !rText.Len() ) // otherwise it must be invalidated later, !bFormatted is enough.
nCurTextHeight = 0;
EnableUndo( bUndoCurrentlyEnabled );
-#ifndef SVX_LIGHT
DBG_ASSERT( !HasUndoManager() || !GetUndoManager().GetUndoActionCount(), "Undo after SetText?" );
-#endif
}
@@ -2121,21 +2117,17 @@ void ImpEditEngine::ImpRemoveChars( const EditPaM& rPaM, sal_uInt16 nChars, Edit
EditCharAttrib* pAttr = rAttribs[nAttr];
if ( ( pAttr->GetEnd() >= nStart ) && ( pAttr->GetStart() < nEnd ) )
{
-#ifndef SVX_LIGHT
EditSelection aSel( rPaM );
aSel.Max().GetIndex() = aSel.Max().GetIndex() + nChars;
EditUndoSetAttribs* pAttrUndo = CreateAttribUndo( aSel, GetEmptyItemSet() );
InsertUndo( pAttrUndo );
-#endif
break; // for
}
}
if ( pCurUndo && ( CreateEditPaM( pCurUndo->GetEPaM() ) == rPaM ) )
pCurUndo->GetStr() += aStr;
-#ifndef SVX_LIGHT
else
InsertUndo( new EditUndoRemoveChars( this, CreateEPaM( rPaM ), aStr ) );
-#endif
}
aEditDoc.RemoveChars( rPaM, nChars );
@@ -2274,7 +2266,6 @@ EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pR
GetEditEnginePtr()->ParagraphConnected( aEditDoc.GetPos( pLeft ), aEditDoc.GetPos( pRight ) );
-#ifndef SVX_LIGHT
if ( IsUndoEnabled() && !IsInUndo() )
{
InsertUndo( new EditUndoConnectParas( this,
@@ -2282,7 +2273,6 @@ EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pR
pLeft->GetContentAttribs().GetItems(), pRight->GetContentAttribs().GetItems(),
pLeft->GetStyleSheet(), pRight->GetStyleSheet(), bBackward ) );
}
-#endif
if ( bBackward )
{
@@ -2300,7 +2290,6 @@ EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pR
DBG_ASSERT( pRightPortion, "Blind Portion in ImpConnectParagraphs(2)" );
DBG_ASSERT( nParagraphTobeDeleted == GetParaPortions().GetPos( pRightPortion ), "NodePos != PortionPos?" );
-#ifndef SVX_LIGHT
if ( GetStatus().DoOnlineSpelling() )
{
xub_StrLen nEnd = pLeft->Len();
@@ -2320,7 +2309,6 @@ EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pR
}
}
}
-#endif
if ( IsCallParaInsertedOrDeleted() )
GetEditEnginePtr()->ParagraphDeleted( nParagraphTobeDeleted );
@@ -2526,11 +2514,9 @@ void ImpEditEngine::ImpRemoveParagraph( sal_uInt16 nPara )
if ( pNextNode )
ParaAttribsChanged( pNextNode );
-#ifndef SVX_LIGHT
if ( IsUndoEnabled() && !IsInUndo() )
InsertUndo( new EditUndoDelContent( this, pNode, nPara ) );
else
-#endif
{
aEditDoc.RemoveItemsFromPool( pNode );
if ( pNode->GetStyleSheet() )
@@ -2543,7 +2529,6 @@ EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c,
sal_Bool bOverwrite, Window* pFrameWin )
{
EditSelection aSel( rCurSel );
-#ifndef SVX_LIGHT
SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect();
if ( pAutoCorrect )
{
@@ -2597,7 +2582,6 @@ EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c,
// shared we need to reset the value to it's original state.
pAutoCorrect->SetAutoCorrFlag( CptlSttSntnc, bOldCptlSttSntnc );
}
-#endif // !SVX_LIGHT
return aSel.Max();
}
@@ -2750,10 +2734,8 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS
nEnd -= ( aLine.Len() - nMaxNewChars ); // Then the characters end up in the next paragraph.
aLine.Erase( nMaxNewChars ); // Delete the Rest...
}
-#ifndef SVX_LIGHT
if ( IsUndoEnabled() && !IsInUndo() )
InsertUndo( new EditUndoInsertChars( this, CreateEPaM( aPaM ), aLine ) );
-#endif
// Tabs ?
if ( aLine.Search( '\t' ) == STRING_NOTFOUND )
aPaM = aEditDoc.InsertText( aPaM, aLine );
@@ -2805,10 +2787,8 @@ EditPaM ImpEditEngine::ImpFastInsertText( EditPaM aPaM, const XubString& rStr )
if ( ( aPaM.GetNode()->Len() + rStr.Len() ) < MAXCHARSINPARA )
{
-#ifndef SVX_LIGHT
if ( IsUndoEnabled() && !IsInUndo() )
InsertUndo( new EditUndoInsertChars( this, CreateEPaM( aPaM ), rStr ) );
-#endif
aPaM = aEditDoc.InsertText( aPaM, rStr );
TextModified();
@@ -2832,10 +2812,8 @@ EditPaM ImpEditEngine::ImpInsertFeature( EditSelection aCurSel, const SfxPoolIte
if ( aPaM.GetIndex() >= 0xfffe )
return aPaM;
-#ifndef SVX_LIGHT
if ( IsUndoEnabled() && !IsInUndo() )
InsertUndo( new EditUndoInsertFeature( this, CreateEPaM( aPaM ), rItem ) );
-#endif
aPaM = aEditDoc.InsertFeature( aPaM, rItem );
ParaPortion* pPortion = FindParaPortion( aPaM.GetNode() );
@@ -2866,14 +2844,11 @@ EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, sal_Bool bKeepEn
return rPaM;
}
-#ifndef SVX_LIGHT
if ( IsUndoEnabled() && !IsInUndo() )
InsertUndo( new EditUndoSplitPara( this, aEditDoc.GetPos( rPaM.GetNode() ), rPaM.GetIndex() ) );
-#endif
EditPaM aPaM( aEditDoc.InsertParaBreak( rPaM, bKeepEndingAttribs ) );
-#ifndef SVX_LIGHT
if ( GetStatus().DoOnlineSpelling() )
{
xub_StrLen nEnd = rPaM.GetNode()->Len();
@@ -2905,8 +2880,6 @@ EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, sal_Bool bKeepEn
pRWrongs->SetValid(); // otherwise 0 - 0xFFFF
pRWrongs->MarkInvalid( 0, 1 ); // Only test the first word
}
-#endif // !SVX_LIGHT
-
ParaPortion* pPortion = FindParaPortion( rPaM.GetNode() );
DBG_ASSERT( pPortion, "Blind Portion in ImpInsertParaBreak" );
@@ -2928,7 +2901,6 @@ EditPaM ImpEditEngine::ImpInsertParaBreak( const EditPaM& rPaM, sal_Bool bKeepEn
EditPaM ImpEditEngine::ImpFastInsertParagraph( sal_uInt16 nPara )
{
-#ifndef SVX_LIGHT
if ( IsUndoEnabled() && !IsInUndo() )
{
if ( nPara )
@@ -2939,16 +2911,13 @@ EditPaM ImpEditEngine::ImpFastInsertParagraph( sal_uInt16 nPara )
else
InsertUndo( new EditUndoSplitPara( this, 0, 0 ) );
}
-#endif
ContentNode* pNode = new ContentNode( aEditDoc.GetItemPool() );
// If flat mode, then later no Font is set:
pNode->GetCharAttribs().GetDefFont() = aEditDoc.GetDefFont();
-#ifndef SVX_LIGHT
if ( GetStatus().DoOnlineSpelling() )
pNode->CreateWrongList();
-#endif // !SVX_LIGHT
aEditDoc.Insert( pNode, nPara );
@@ -3607,7 +3576,6 @@ void ImpEditEngine::SetActiveView( EditView* pView )
uno::Reference< datatransfer::XTransferable > ImpEditEngine::CreateTransferable( const EditSelection& rSelection ) const
{
-#ifndef SVX_LIGHT
EditSelection aSelection( rSelection );
aSelection.Adjust( GetEditDoc() );
@@ -3649,9 +3617,6 @@ uno::Reference< datatransfer::XTransferable > ImpEditEngine::CreateTransferable(
}
return xDataObj;
-#else
- return uno::Reference< datatransfer::XTransferable >();
-#endif
}
EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransferable >& rxDataObj, const String& rBaseURL, const EditPaM& rPaM, sal_Bool bUseSpecial )
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 75861a39580a..fc1e8ce05be7 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -172,8 +172,7 @@ void lcl_DrawRedLines(
sal_Bool bVertical,
sal_Bool bIsRightToLeft )
{
-#ifndef SVX_LIGHT
- // Aber nur, wenn Font nicht zu klein...
+ // But only if font is not too small ...
long nHght = pOutDev->LogicToPixel( Size( 0, nFontHeight ) ).Height();
if( WRONG_SHOW_MIN < nHght )
{
@@ -192,7 +191,7 @@ void lcl_DrawRedLines(
if ( nStart >= nMaxEnd )
break;
- if ( nStart < nIndex ) // Wurde korrigiert
+ if ( nStart < nIndex ) // Corrected
nStart = nIndex;
if ( nEnd > nMaxEnd )
nEnd = nMaxEnd;
@@ -244,7 +243,6 @@ void lcl_DrawRedLines(
bWrong = sal_False;
}
}
-#endif // !SVX_LIGHT
}
Point lcl_ImplCalcRotatedPos( Point rPos, Point rOrigin, double nSin, double nCos )
@@ -293,7 +291,7 @@ void ImpEditEngine::UpdateViews( EditView* pCurView )
if ( !GetUpdateMode() || IsFormatting() || aInvalidRec.IsEmpty() )
return;
- DBG_ASSERT( IsFormatted(), "UpdateViews: Doc nicht formatiert!" );
+ DBG_ASSERT( IsFormatted(), "UpdateViews: Doc not formatted!" );
for ( sal_uInt16 nView = 0; nView < aEditViews.Count(); nView++ )
{
@@ -307,7 +305,7 @@ void ImpEditEngine::UpdateViews( EditView* pCurView )
if ( !aClipRec.IsEmpty() )
{
- // in Fensterkoordinaten umwandeln....
+ // convert to window coordinates ....
aClipRec = pView->pImpEditView->GetWindowPos( aClipRec );
if ( ( pView == pCurView ) )
@@ -360,7 +358,7 @@ IMPL_LINK_INLINE_END( ImpEditEngine, IdleFormatHdl, Timer *, EMPTYARG )
void ImpEditEngine::CheckIdleFormatter()
{
aIdleFormatter.ForceTimeout();
- // Falls kein Idle, aber trotzdem nicht formatiert:
+ // If not idle, but still not formatted:
if ( !IsFormatted() )
FormatDoc();
}
@@ -381,7 +379,7 @@ void ImpEditEngine::FormatDoc()
bIsFormatting = sal_True;
- // Dann kann ich auch den Spell-Timer starten...
+ // Then I can also start the spell-timer ...
if ( GetStatus().DoOnlineSpelling() )
StartOnlineSpellTimer();
@@ -390,10 +388,10 @@ void ImpEditEngine::FormatDoc()
Font aOldFont( GetRefDevice()->GetFont() );
- // Hier schon, damit nicht jedesmal in CreateLines...
+ // Here already, so that not always in CreateLines...
sal_Bool bMapChanged = ImpCheckRefMapMode();
- aInvalidRec = Rectangle(); // leermachen
+ aInvalidRec = Rectangle(); // make empty
for ( sal_uInt16 nPara = 0; nPara < GetParaPortions().Count(); nPara++ )
{
ParaPortion* pParaPortion = GetParaPortions().GetObject( nPara );
@@ -408,17 +406,13 @@ void ImpEditEngine::FormatDoc()
pParaPortion->MarkSelectionInvalid( 0, pParaPortion->GetNode()->Len() );
}
}
- // bei MustRepaint() sollte keine Formatierung noetig sein!
- // 23.1.95: Evtl. ist sie durch eine andere Aktion aber doch
- // ungueltig geworden!
-// if ( pParaPortion->MustRepaint() || CreateLines( nPara ) )
+ // No formatting should be necessary for MustRepaint()!
if ( ( pParaPortion->MustRepaint() && !pParaPortion->IsInvalid() )
|| CreateLines( nPara, nY ) )
{
if ( !bGrow && GetTextRanger() )
{
- // Bei einer Aenderung der Hoehe muss alles weiter unten
- // neu formatiert werden...
+ // For a change in height all below must be reformatted ...
for ( sal_uInt16 n = nPara+1; n < GetParaPortions().Count(); n++ )
{
ParaPortion* pPP = GetParaPortions().GetObject( n );
@@ -432,10 +426,10 @@ void ImpEditEngine::FormatDoc()
pParaPortion->SetMustRepaint( sal_False );
}
- // InvalidRec nur einmal setzen...
+ // InvalidRec set only once...
if ( aInvalidRec.IsEmpty() )
{
- // Bei Paperwidth 0 (AutoPageSize) bleibt es sonst Empty()...
+ // For Paperwidth 0 (AutoPageSize) it would otherwise be Empty()...
long nWidth = Max( (long)1, ( !IsVertical() ? aPaperSize.Width() : aPaperSize.Height() ) );
Range aInvRange( GetInvalidYOffsets( pParaPortion ) );
aInvalidRec = Rectangle( Point( 0, nY+aInvRange.Min() ),
@@ -453,9 +447,8 @@ void ImpEditEngine::FormatDoc()
nY += pParaPortion->GetHeight();
}
- // Man kann auch durch UpdateMode An=>AUS=>AN in die Formatierung gelangen...
- // Optimierung erst nach Vobis-Auslieferung aktivieren...
-// if ( !aInvalidRec.IsEmpty() )
+ // One can also get into the formatting through UpdateMode ON=>OFF=>ON...
+ // enable optimization first after Vobis delivery ...
{
sal_uInt32 nNewHeight = CalcTextHeight();
long nDiff = nNewHeight - nCurTextHeight;
@@ -467,7 +460,7 @@ void ImpEditEngine::FormatDoc()
if ( aInvalidRec.IsEmpty() )
{
aInvalidRec.Top() = 0;
- // Left und Right werden nicht ausgewertet, aber wegen IsEmpty gesetzt.
+ // Left and Right are not evaluated, are however set due to IsEmpty.
aInvalidRec.Left() = 0;
aInvalidRec.Right() = !IsVertical() ? aPaperSize.Width() : aPaperSize.Height();
}
@@ -505,7 +498,7 @@ void ImpEditEngine::FormatDoc()
if ( bMapChanged )
GetRefDevice()->Pop();
- CallStatusHdl(); // Falls Modified...
+ CallStatusHdl(); // If Modified...
LeaveBlockNotifications();
}
@@ -543,27 +536,26 @@ void ImpEditEngine::CheckAutoPageSize()
if ( GetStatus().AutoPageHeight() )
aPaperSize.Height() = (long) !IsVertical() ? GetTextHeight() : CalcTextWidth( sal_True );
- SetValidPaperSize( aPaperSize ); //Min, Max beruecksichtigen
+ SetValidPaperSize( aPaperSize ); // consider Min, Max
if ( aPaperSize != aPrevPaperSize )
{
if ( ( !IsVertical() && ( aPaperSize.Width() != aPrevPaperSize.Width() ) )
|| ( IsVertical() && ( aPaperSize.Height() != aPrevPaperSize.Height() ) ) )
{
- // Falls davor zentriert/rechts oder Tabs...
+ // If ahead is centered / right or tabs ...
aStatus.GetStatusWord() |= !IsVertical() ? EE_STAT_TEXTWIDTHCHANGED : EE_STAT_TEXTHEIGHTCHANGED;
for ( sal_uInt16 nPara = 0; nPara < GetParaPortions().Count(); nPara++ )
{
- // Es brauchen nur Absaetze neu formatiert werden,
- // die nicht linksbuendig sind.
- // Die Hoehe kann sich hier nicht mehr aendern.
+ // Only paragraphs which are not aligned to the left need to be
+ // reformatted, the height can not be changed here anymore.
ParaPortion* pParaPortion = GetParaPortions().GetObject( nPara );
ContentNode* pNode = pParaPortion->GetNode();
SvxAdjust eJustification = GetJustification( nPara );
if ( eJustification != SVX_ADJUST_LEFT )
{
pParaPortion->MarkSelectionInvalid( 0, pNode->Len() );
- CreateLines( nPara, 0 ); // 0: Bei AutoPageSize kein TextRange!
+ CreateLines( nPara, 0 ); // 0: For AutoPageSize no TextRange!
}
}
}
@@ -600,20 +592,20 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
{
ParaPortion* pParaPortion = GetParaPortions().GetObject( nPara );
- // sal_Bool: Aenderung der Hoehe des Absatzes Ja/Nein - sal_True/sal_False
- DBG_ASSERT( pParaPortion->GetNode(), "Portion ohne Node in CreateLines" );
- DBG_ASSERT( pParaPortion->IsVisible(), "Unsichtbare Absaetze nicht formatieren!" );
- DBG_ASSERT( pParaPortion->IsInvalid(), "CreateLines: Portion nicht invalid!" );
+ // sal_Bool: Changes in the height of paragraph Yes / No - sal_True/sal_False
+ DBG_ASSERT( pParaPortion->GetNode(), "Portion without Node in CreateLines" );
+ DBG_ASSERT( pParaPortion->IsVisible(), "Invisible paragraphs not formatted!" );
+ DBG_ASSERT( pParaPortion->IsInvalid(), "CreateLines: Portion not invalid!" );
sal_Bool bProcessingEmptyLine = ( pParaPortion->GetNode()->Len() == 0 );
sal_Bool bEmptyNodeWithPolygon = ( pParaPortion->GetNode()->Len() == 0 ) && GetTextRanger();
// ---------------------------------------------------------------
- // Schnelle Sonderbehandlung fuer leere Absaetze...
+ // Fast special treatment for empty paragraphs ...
// ---------------------------------------------------------------
if ( ( pParaPortion->GetNode()->Len() == 0 ) && !GetTextRanger() )
{
- // schnelle Sonderbehandlung...
+ // fast special treatment ...
if ( pParaPortion->GetTextPortions().Count() )
pParaPortion->GetTextPortions().Reset();
if ( pParaPortion->GetLines().Count() )
@@ -623,10 +615,10 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
}
// ---------------------------------------------------------------
- // Initialisierung......
+ // Initialization ......
// ---------------------------------------------------------------
- // Immer fuer 100% formatieren:
+ // Always format for 100%:
sal_Bool bMapChanged = ImpCheckRefMapMode();
if ( pParaPortion->GetLines().Count() == 0 )
@@ -636,7 +628,7 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
}
// ---------------------------------------------------------------
- // Absatzattribute holen......
+ // Get Paragraph attributes ......
// ---------------------------------------------------------------
ContentNode* const pNode = pParaPortion->GetNode();
@@ -651,9 +643,6 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&) pNode->GetContentAttribs().GetItem( EE_PARA_SBL );
const sal_Bool bScriptSpace = ((const SvxScriptSpaceItem&) pNode->GetContentAttribs().GetItem( EE_PARA_ASIANCJKSPACING )).GetValue();
-// const sal_uInt16 nInvalidEnd = ( pParaPortion->GetInvalidDiff() > 0 )
-// ? pParaPortion->GetInvalidPosStart() + pParaPortion->GetInvalidDiff()
-// : pNode->Len();
const short nInvalidDiff = pParaPortion->GetInvalidDiff();
const sal_uInt16 nInvalidStart = pParaPortion->GetInvalidPosStart();
const sal_uInt16 nInvalidEnd = nInvalidStart + Abs( nInvalidDiff );
@@ -668,15 +657,15 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
}
else if ( ( pParaPortion->IsSimpleInvalid() ) && ( nInvalidDiff < 0 ) )
{
- // pruefen, ob loeschen ueber Portiongrenzen erfolgte...
- sal_uInt16 nStart = nInvalidStart; // DOPPELT !!!!!!!!!!!!!!!
- sal_uInt16 nEnd = nStart - nInvalidDiff; // neg.
+ // check if delete over the portion boundaries was done ...
+ sal_uInt16 nStart = nInvalidStart; // DOUBLE !!!!!!!!!!!!!!!
+ sal_uInt16 nEnd = nStart - nInvalidDiff; // negative
bQuickFormat = sal_True;
sal_uInt16 nPos = 0;
sal_uInt16 nPortions = pParaPortion->GetTextPortions().Count();
for ( sal_uInt16 nTP = 0; nTP < nPortions; nTP++ )
{
- // Es darf kein Start/Ende im geloeschten Bereich liegen.
+ // There must be no start / end in the deleted area.
TextPortion* const pTP = pParaPortion->GetTextPortions()[ nTP ];
nPos = nPos + pTP->GetLen();
if ( ( nPos > nStart ) && ( nPos < nEnd ) )
@@ -690,9 +679,7 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
// SW disables TEXT_LAYOUT_COMPLEX_DISABLED, so maybe I have to enable it...
- // #114278# Saving both layout mode and language (since I'm
- // potentially changing both)
-
+ // Saving both layout mode and language (since I'm potentially changing both)
GetRefDevice()->Push( PUSH_TEXTLAYOUTMODE|PUSH_TEXTLANGUAGE );
ImplInitLayoutMode( GetRefDevice(), nPara, 0xFFFF );
@@ -707,33 +694,33 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
}
else if ( bQuickFormat )
{
- // schnellere Methode:
+ // faster Method:
RecalcTextPortion( pParaPortion, nInvalidStart, nInvalidDiff );
}
- else // nRealInvalidStart kann vor InvalidStart liegen, weil Portions geloescht....
+ else // nRealInvalidStart can be before InvalidStart, since Portions were deleted....
{
CreateTextPortions( pParaPortion, nRealInvalidStart );
}
// ---------------------------------------------------------------
- // Zeile mit InvalidPos suchen, eine Zeile davor beginnen...
- // Zeilen flaggen => nicht removen !
+ // Search for line with InvalidPos, start one line before
+ // Flag the line => do not remove it !
// ---------------------------------------------------------------
sal_uInt16 nLine = pParaPortion->GetLines().Count()-1;
for ( sal_uInt16 nL = 0; nL <= nLine; nL++ )
{
EditLine* pLine = pParaPortion->GetLines().GetObject( nL );
- if ( pLine->GetEnd() > nRealInvalidStart ) // nicht nInvalidStart!
+ if ( pLine->GetEnd() > nRealInvalidStart ) // not nInvalidStart!
{
nLine = nL;
break;
}
pLine->SetValid();
}
- // Eine Zeile davor beginnen...
- // Wenn ganz hinten getippt wird, kann sich die Zeile davor nicht aendern.
+ // Begin one line before...
+ // If it is typed at the end, the line in front cannot change.
if ( nLine && ( !pParaPortion->IsSimpleInvalid() || ( nInvalidEnd < pNode->Len() ) || ( nInvalidDiff <= 0 ) ) )
nLine--;
@@ -747,11 +734,11 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
if ( aBulletArea.Right() > 0 )
pParaPortion->SetBulletX( (sal_uInt16) GetXValue( aBulletArea.Right() ) );
else
- pParaPortion->SetBulletX( 0 ); // Falls Bullet falsch eingestellt.
+ pParaPortion->SetBulletX( 0 ); // if Bullet is set incorrectly
}
// ---------------------------------------------------------------
- // Ab hier alle Zeilen durchformatieren...
+ // Reformat all lines from here ...
// ---------------------------------------------------------------
sal_uInt16 nDelFromLine = 0xFFFF;
sal_Bool bLineBreak = sal_False;
@@ -763,7 +750,7 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
sal_Bool bCalcCharPositions = sal_True;
sal_Int32* pBuf = new sal_Int32[ pNode->Len() ];
- sal_Bool bSameLineAgain = sal_False; // Fuer TextRanger, wenn sich die Hoehe aendert.
+ sal_Bool bSameLineAgain = sal_False; // For TextRanger, if the height changes.
TabInfo aCurrentTab;
sal_Bool bForceOneRun = bEmptyNodeWithPolygon;
@@ -786,8 +773,6 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
if ( !nLine && ( pParaPortion->GetBulletX() > nStartX ) )
{
-// TL_NFLR nStartX += nFI; // Vielleicht reicht der LI?
-// TL_NFLR if ( pParaPortion->GetBulletX() > nStartX )
nStartX = pParaPortion->GetBulletX();
}
}
@@ -801,20 +786,20 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
nMaxLineWidth -= GetXValue( rLRItem.GetRight() );
nMaxLineWidth -= nStartX;
- // Wenn PaperSize == long_max, kann ich keinen neg. Erstzeileneinzug
- // abziehen (Overflow)
+ // If PaperSize == long_max, one cannot take away any negative
+ // first line indent. (Overflow)
if ( ( nMaxLineWidth < 0 ) && ( nStartX < 0 ) )
nMaxLineWidth = ( !IsVertical() ? aPaperSize.Width() : aPaperSize.Height() ) - GetXValue( rLRItem.GetRight() );
- // Wenn jetzt noch kleiner 0, kann es nur der rechte Rand sein.
+ // If still less than 0, it may be just the right edge.
if ( nMaxLineWidth <= 0 )
nMaxLineWidth = 1;
- // Problem: Da eine Zeile _vor_ der ungueltigen Position mit der
- // Formatierung begonnen wird, werden hier leider auch die Positionen
- // neu bestimmt...
- // Loesungsansatz:
- // Die Zeile davor kann nur groesser werden, nicht kleiner
+ // Problem:
+ // Since formatting starts a line _before_ the invalid position,
+ // the positions unfortunately have to be redefined ...
+ // Solution:
+ // The line before can only become longer, not smaller
// => ...
if ( bCalcCharPositions )
pLine->GetCharPosArray().Remove( 0, pLine->GetCharPosArray().Count() );
@@ -823,10 +808,10 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
sal_uInt16 nTmpPortion = pLine->GetStartPortion();
long nTmpWidth = 0;
long nXWidth = nMaxLineWidth;
- if ( nXWidth <= nTmpWidth ) // while muss 1x durchlaufen werden
+ if ( nXWidth <= nTmpWidth ) // while has to be looped once
nXWidth = nTmpWidth+1;
- SvLongsPtr pTextRanges = 0;
+ LongDqPtr pTextRanges = 0;
long nTextExtraYOffset = 0;
long nTextXOffset = 0;
long nTextLineHeight = 0;
@@ -845,7 +830,7 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
nTextLineHeight = ImplCalculateFontIndependentLineSpacing( aTmpFont.GetHeight() );
else
nTextLineHeight = aTmpFont.GetPhysTxtSize( GetRefDevice(), String() ).Height();
- // Metriken koennen groesser sein
+ // Metrics can be greater
FormatterFontMetric aTempFormatterMetrics;
RecalcFormatterFontMetrics( aTempFormatterMetrics, aTmpFont );
sal_uInt16 nLineHeight = aTempFormatterMetrics.GetHeight();
@@ -869,16 +854,15 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
pTextRanges = GetTextRanger()->GetTextRanges( Range( nYOff, nYOff + nYDiff ) );
DBG_ASSERT( pTextRanges, "GetTextRanges?!" );
long nMaxRangeWidth = 0;
- // Den breitesten Bereich verwenden...
- // Der breiteste Bereich koennte etwas verwirren, also
- // generell den ersten. Am besten mal richtig mit Luecken.
-// for ( sal_uInt16 n = 0; n < pTextRanges->Count(); )
- if ( pTextRanges->Count() )
+ // Use the widest range ...
+ // The widest range could be a bit confusing, so normally it
+ // is the first one. Best with gaps.
+ if ( pTextRanges->size() )
{
sal_uInt16 n = 0;
- long nA = pTextRanges->GetObject( n++ );
- long nB = pTextRanges->GetObject( n++ );
- DBG_ASSERT( nA <= nB, "TextRange verdreht?" );
+ long nA = pTextRanges->at(n++);
+ long nB = pTextRanges->at(n++);
+ DBG_ASSERT( nA <= nB, "TextRange distorted?" );
long nW = nB - nA;
if ( nW > nMaxRangeWidth )
{
@@ -891,8 +875,8 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
nMaxLineWidth = nXWidth - nStartX - GetXValue( rLRItem.GetRight() );
else
{
- // Weiter unten im Polygon versuchen.
- // Unterhalb des Polygons die Paperbreite verwenden.
+ // Try further down in the polygon.
+ // Below the polygon use the Paper Width.
nTextExtraYOffset += Max( (long)(nTextLineHeight / 10), (long)1 );
if ( ( nTextY + nTextExtraYOffset ) > GetTextRanger()->GetBoundRect().Bottom() )
{
@@ -904,7 +888,7 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
}
}
- // Portion suchen, die nicht mehr in Zeile passt....
+ // search for Portion that no longer fits in line ....
TextPortion* pPortion = 0;
sal_Bool bBrokenLine = sal_False;
bLineBreak = sal_False;
@@ -915,8 +899,8 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
pPortion = pParaPortion->GetTextPortions().GetObject( nTmpPortion );
if ( pPortion->GetKind() == PORTIONKIND_HYPHENATOR )
{
- // Portion wegschmeissen, ggf. die davor korrigieren, wenn
- // die Hyph-Portion ein Zeichen geschluckt hat...
+ // Throw away a Portion, if necessary correct the one before,
+ // if the Hyph portion has swallowed a character ...
pParaPortion->GetTextPortions().Remove( nTmpPortion );
if ( nTmpPortion && pPortion->GetLen() )
{
@@ -929,11 +913,11 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
pPrev->GetSize().Width() = (-1);
}
delete pPortion;
- DBG_ASSERT( nTmpPortion < pParaPortion->GetTextPortions().Count(), "Keine Portion mehr da!" );
+ DBG_ASSERT( nTmpPortion < pParaPortion->GetTextPortions().Count(), "No more Portions left!" );
pPortion = pParaPortion->GetTextPortions().GetObject( nTmpPortion );
}
DBG_ASSERT( pPortion->GetKind() != PORTIONKIND_HYPHENATOR, "CreateLines: Hyphenator-Portion!" );
- DBG_ASSERT( pPortion->GetLen() || bProcessingEmptyLine, "Leere Portion in CreateLines ?!" );
+ DBG_ASSERT( pPortion->GetLen() || bProcessingEmptyLine, "Empty Portion in CreateLines ?!" );
(void)bProcessingEmptyLine;
if ( pNextFeature && ( pNextFeature->GetStart() == nTmpPos ) )
{
@@ -944,10 +928,9 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
{
long nOldTmpWidth = nTmpWidth;
- // Tab-Pos suchen...
+ // Search for Tab-Pos...
long nCurPos = nTmpWidth+nStartX;
-// nCurPos -= rLRItem.GetTxtLeft(); // Tabs relativ zu LI
- // Skalierung rausrechnen
+ // consider scaling
if ( aStatus.DoStretch() && ( nStretchX != 100 ) )
nCurPos = nCurPos*100/nStretchX;
@@ -969,7 +952,7 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_CENTER ) ||
( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_DECIMAL ) )
{
- // Bei LEFT/DEFAULT wird dieses Tab nicht mehr betrachtet.
+ // For LEFT / DEFAULT this tab is not considered.
aCurrentTab.bValid = sal_True;
aCurrentTab.nStartPosX = nTmpWidth;
aCurrentTab.nCharPos = nTmpPos;
@@ -980,21 +963,20 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
pPortion->SetExtraValue( aCurrentTab.aTabStop.GetFill() );
pPortion->GetSize().Width() = aCurrentTab.nTabPos - (nTmpWidth+nStartX);
- // #90520# Height needed...
+ // Height needed...
SeekCursor( pNode, nTmpPos+1, aTmpFont );
pPortion->GetSize().Height() = aTmpFont.QuickGetTextSize( GetRefDevice(), String(), 0, 0, NULL ).Height();
- DBG_ASSERT( pPortion->GetSize().Width() >= 0, "Tab falsch berechnet!" );
+ DBG_ASSERT( pPortion->GetSize().Width() >= 0, "Tab incorrectly calculated!" );
nTmpWidth = aCurrentTab.nTabPos-nStartX;
- // Wenn dies das erste Token in der Zeile ist,
- // und nTmpWidth > aPaperSize.Width, habe ich eine
- // Endlos-Schleife!
+ // If this is the first token on the line,
+ // and nTmpWidth > aPaperSize.Width, => infinite loop!
if ( ( nTmpWidth >= nXWidth ) && ( nTmpPortion == pLine->GetStartPortion() ) )
{
- // Aber was jetzt ?
- // Tab passend machen
+ // What now?
+ // make the tab fitting
pPortion->GetSize().Width() = nXWidth-nOldTmpWidth;
nTmpWidth = nXWidth-1;
bEOL = sal_True;
@@ -1017,7 +999,6 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
break;
case EE_FEATURE_FIELD:
{
-// long nCurWidth = nTmpWidth;
SeekCursor( pNode, nTmpPos+1, aTmpFont );
sal_Unicode cChar = 0; // later: NBS?
aTmpFont.SetPhysFont( GetRefDevice() );
@@ -1027,16 +1008,15 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
if ( bCalcCharPositions || !pPortion->HasValidSize() )
{
pPortion->GetSize() = aTmpFont.QuickGetTextSize( GetRefDevice(), aFieldValue, 0, aFieldValue.Len(), 0 );
- // Damit kein Scrollen bei ueberlangen Feldern
+ // So no scrolling for oversized fields
if ( pPortion->GetSize().Width() > nXWidth )
pPortion->GetSize().Width() = nXWidth;
}
nTmpWidth += pPortion->GetSize().Width();
pLine->GetCharPosArray().Insert( pPortion->GetSize().Width(), nTmpPos-pLine->GetStart() );
pPortion->GetKind() = cChar ? PORTIONKIND_TEXT : PORTIONKIND_FIELD;
- // Wenn dies das erste Token in der Zeile ist,
- // und nTmpWidth > aPaperSize.Width, habe ich eine
- // Endlos-Schleife!
+ // If this is the first token on the line,
+ // and nTmpWidth > aPaperSize.Width, => infinite loop!
if ( ( nTmpWidth >= nXWidth ) && ( nTmpPortion == pLine->GetStartPortion() ) )
{
nTmpWidth = nXWidth-1;
@@ -1048,7 +1028,7 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
bCompressedChars = sal_False;
}
break;
- default: OSL_FAIL( "Was fuer ein Feature ?" );
+ default: OSL_FAIL( "What feature?" );
}
pNextFeature = pNode->GetCharAttribs().FindFeature( pNextFeature->GetStart() + 1 );
}
@@ -1073,8 +1053,8 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
if ( bCalcCharPositions )
{
sal_uInt16 nLen = pPortion->GetLen();
- // Es wird am Anfang generell das Array geplaettet
- // => Immer einfach schnelles insert.
+ // The array is generally flattened at the beginning
+ // => Always simply quick inserts.
sal_uInt16 nPos = nTmpPos - pLine->GetStart();
pLine->GetCharPosArray().Insert( pBuf, nLen, nPos );
}
@@ -1118,7 +1098,6 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
long nW = nWidthAfterTab; // Length before tab position
if ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_RIGHT )
{
-// nW = nWidthAfterTab;
}
else if ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_CENTER )
{
@@ -1126,7 +1105,6 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
}
else if ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_DECIMAL )
{
-// nW = nWidthAfterTab;
String aText = GetSelected( EditSelection( EditPaM( pParaPortion->GetNode(), nTmpPos ),
EditPaM( pParaPortion->GetNode(), nTmpPos + pPortion->GetLen() ) ) );
sal_uInt16 nDecPos = aText.Search( aCurrentTab.aTabStop.GetDecimal() );
@@ -1163,11 +1141,11 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
aCurrentTab.bValid = sal_False;
- // das war evtl. eine Portion zu weit:
+ // this was possibly a portion too far:
sal_Bool bFixedEnd = sal_False;
if ( aStatus.OneCharPerLine() )
{
- // Zustand vor Portion: ( bis auf nTmpWidth )
+ // State before Portion (apart from nTmpWidth):
nPortionEnd = nTmpPos;
nTmpPos -= pPortion ? pPortion->GetLen() : 0;
nPortionStart = nTmpPos;
@@ -1176,14 +1154,14 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
bEOL = sal_True;
bEOC = sal_False;
- // Und jetzt genau ein Zeichen:
+ // And now just one character:
nTmpPos++;
nTmpPortion++;
nPortionEnd = nTmpPortion;
- // Eine Nicht-Feature-Portion muss gebrochen werden
+ // one Non-Feature-Portion has to be wrapped
if ( pPortion->GetLen() > 1 )
{
- DBG_ASSERT( pPortion && (pPortion->GetKind() == PORTIONKIND_TEXT), "Len>1, aber keine TextPortion?" );
+ DBG_ASSERT( pPortion && (pPortion->GetKind() == PORTIONKIND_TEXT), "Len>1, but no TextPortion?" );
nTmpWidth -= pPortion ? pPortion->GetSize().Width() : 0;
sal_uInt16 nP = SplitTextPortion( pParaPortion, nTmpPos, pLine );
TextPortion* p = pParaPortion->GetTextPortions().GetObject( nP );
@@ -1216,8 +1194,8 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
break;
default:
{
- // Ein Feature wird nicht umgebrochen:
- DBG_ASSERT( ( pPortion->GetKind() == PORTIONKIND_LINEBREAK ), "Was fuer ein Feature ?" );
+ // A feature is not wrapped:
+ DBG_ASSERT( ( pPortion->GetKind() == PORTIONKIND_LINEBREAK ), "What Feature ?" );
bEOL = sal_True;
bFixedEnd = sal_True;
}
@@ -1228,7 +1206,7 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
bEOL = sal_True;
bEOC = sal_True;
pLine->SetEnd( nPortionEnd );
- DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "Keine TextPortions?" );
+ DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "No TextPortions?" );
pLine->SetEndPortion( (sal_uInt16)pParaPortion->GetTextPortions().Count() - 1 );
}
@@ -1246,11 +1224,11 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
{
pLine->SetEnd( nPortionStart+1 );
pLine->SetEndPortion( nTmpPortion-1 );
- bEOC = sal_False; // wurde oben gesetzt, vielleich mal die if's umstellen?
+ bEOC = sal_False; // was set above, maybe change the sequence of the if's?
}
else if ( !bEOL )
{
- DBG_ASSERT( pPortion && ((nPortionEnd-nPortionStart) == pPortion->GetLen()), "Doch eine andere Portion?!" );
+ DBG_ASSERT( pPortion && ((nPortionEnd-nPortionStart) == pPortion->GetLen()), "However, another portion?!" );
long nRemainingWidth = nMaxLineWidth - nTmpWidth;
sal_Bool bCanHyphenate = ( aTmpFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL );
if ( bCompressedChars && pPortion && ( pPortion->GetLen() > 1 ) && pPortion->GetExtraInfos() && pPortion->GetExtraInfos()->bCompressed )
@@ -1264,11 +1242,10 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
}
// ------------------------------------------------------------------
- // Zeile fertig => justieren
+ // Line finished => adjust
// ------------------------------------------------------------------
- // CalcTextSize sollte besser durch ein kontinuierliches
- // Registrieren ersetzt werden !
+ // CalcTextSize should be replaced by a continuous registering!
Size aTextSize = pLine->CalcTextSize( *pParaPortion );
if ( aTextSize.Height() == 0 )
@@ -1284,16 +1261,15 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
pLine->SetHeight( (sal_uInt16)aTextSize.Height() );
}
- // Die Fontmetriken koennen nicht kontinuierlich berechnet werden,
- // wenn der Font sowieso eingestellt ist, weil ggf. ein grosser Font
- // erst nach dem Umbrechen ploetzlich in der naechsten Zeile landet
- // => Font-Metriken zu gross.
+ // The font metrics can not be calculated continuously, if the font is
+ // set anyway, because a large font only after wrapping suddenly ends
+ // up in the next line => Font metrics too big.
FormatterFontMetric aFormatterMetrics;
sal_uInt16 nTPos = pLine->GetStart();
for ( sal_uInt16 nP = pLine->GetStartPortion(); nP <= pLine->GetEndPortion(); nP++ )
{
TextPortion* pTP = pParaPortion->GetTextPortions().GetObject( nP );
- // #95819# problem with hard font height attribute, when everthing but the line break has this attribute
+ // problem with hard font height attribute, when everthing but the line break has this attribute
if ( pTP->GetKind() != PORTIONKIND_LINEBREAK )
{
SeekCursor( pNode, nTPos+1, aTmpFont );
@@ -1311,7 +1287,7 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
bSameLineAgain = sal_False;
if ( GetTextRanger() && ( pLine->GetHeight() > nTextLineHeight ) )
{
- // Nochmal mit der anderen Groesse aufsetzen!
+ // put down with the other size!
bSameLineAgain = sal_True;
}
@@ -1324,7 +1300,7 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
sal_uInt16 nTxtHeight = pLine->GetHeight();
if ( nTxtHeight < nMinHeight )
{
- // Der Ascent muss um die Differenz angepasst werden:
+ // The Ascent has to be adjusted for the difference:
long nDiff = nMinHeight - nTxtHeight;
pLine->SetMaxAscent( (sal_uInt16)(pLine->GetMaxAscent() + nDiff) );
pLine->SetHeight( nMinHeight, nTxtHeight );
@@ -1332,9 +1308,9 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
}
else if ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP )
{
- if ( nPara || IsFixedCellHeight() || pLine->GetStartPortion() ) // Nicht die aller erste Zeile
+ if ( nPara || IsFixedCellHeight() || pLine->GetStartPortion() ) // Not the very first line
{
- // #100508# There are documents with PropLineSpace 0, why?
+ // There are documents with PropLineSpace 0, why?
// (cmc: re above question :-) such documents can be seen by importing a .ppt
if ( rLSItem.GetPropLineSpace() && ( rLSItem.GetPropLineSpace() != 100 ) )
{
@@ -1342,7 +1318,7 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
sal_Int32 nH = nTxtHeight;
nH *= rLSItem.GetPropLineSpace();
nH /= 100;
- // Der Ascent muss um die Differenz angepasst werden:
+ // The Ascent has to be adjusted for the difference:
long nDiff = pLine->GetHeight() - nH;
if ( nDiff > pLine->GetMaxAscent() )
nDiff = pLine->GetMaxAscent();
@@ -1353,27 +1329,13 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
}
}
-
- // #80582# - Bullet should not influence line height
-// if ( !nLine )
-// {
-// long nBulletHeight = aBulletArea.GetHeight();
-// if ( nBulletHeight > (long)pLine->GetHeight() )
-// {
-// long nDiff = nBulletHeight - (long)pLine->GetHeight();
-// // nDiff auf oben und unten verteilen.
-// pLine->SetMaxAscent( (sal_uInt16)(pLine->GetMaxAscent() + nDiff/2) );
-// pLine->SetHeight( (sal_uInt16)nBulletHeight );
-// }
-// }
-
if ( ( !IsVertical() && aStatus.AutoPageWidth() ) ||
( IsVertical() && aStatus.AutoPageHeight() ) )
{
- // Wenn die Zeile in die aktuelle Papierbreite passt, muss
- // diese Breite fuer die Ausrichting verwendet werden.
- // Wenn sie nicht passt oder sie die Papierbreite aendert,
- // wird bei Justification != LEFT sowieso noch mal formatiert.
+ // If the row fits within the current paper width, then this width
+ // has to be used for the Alignment. If it does not fit or if it
+ // will change the paper width, it will be formatted again for
+ // Justification! = LEFT anyway.
long nMaxLineWidthFix = ( !IsVertical() ? aPaperSize.Width() : aPaperSize.Height() )
- GetXValue( rLRItem.GetRight() ) - nStartX;
if ( aTextSize.Width() < nMaxLineWidthFix )
@@ -1408,7 +1370,7 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
case SVX_ADJUST_CENTER:
{
long n = ( nMaxLineWidth - aTextSize.Width() ) / 2;
- n += nStartX; // Einrueckung bleibt erhalten.
+ n += nStartX; // Indentation is kept.
if ( n > 0 )
pLine->SetStartPosX( (sal_uInt16)n );
else
@@ -1418,11 +1380,10 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
break;
case SVX_ADJUST_RIGHT:
{
- // Bei automatisch umgebrochenen Zeilen, die ein Blank
- // am Ende enthalten, darf das Blank nicht ausgegeben werden!
-
+ // For automatically wrapped lines, which has a blank at the end
+ // the blank must not be displayed!
long n = nMaxLineWidth - aTextSize.Width();
- n += nStartX; // Einrueckung bleibt erhalten.
+ n += nStartX; // Indentation is kept.
if ( n > 0 )
pLine->SetStartPosX( (sal_uInt16)n );
else
@@ -1446,12 +1407,12 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
}
// -----------------------------------------------------------------
- // pruefen, ob die Zeile neu ausgegeben werden muss...
+ // Check whether the line must be re-issued ...
// -----------------------------------------------------------------
pLine->SetInvalid();
- // Wenn eine Portion umgebrochen wurde sind ggf. viel zu viele Positionen
- // im CharPosArray:
+ // If a portion was wrapped there may be far too many positions in
+ // CharPosArray:
if ( bCalcCharPositions )
{
sal_uInt16 nLen = pLine->GetLen();
@@ -1471,14 +1432,13 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
}
}
- // Fuer kleiner 0 noch ueberlegen!
- if ( pParaPortion->IsSimpleInvalid() /* && ( nInvalidDiff > 0 ) */ )
+ // for <0 think over !
+ if ( pParaPortion->IsSimpleInvalid() )
{
- // Aenderung durch einfache Textaenderung...
- // Formatierung nicht abbrechen, da Portions evtl. wieder
- // gesplittet werden muessen!
- // Wenn irgendwann mal abbrechbar, dann fogende Zeilen Validieren!
- // Aber ggf. als Valid markieren, damit weniger Ausgabe...
+ // Change through simple Text changes ...
+ // Do mot cancel formatting since Portions possibly have to be split
+ // again! If at some point cancelable, then validate the following
+ // line! But if applicable, mark as valid, so there is less output...
if ( pLine->GetEnd() < nInvalidStart )
{
if ( *pLine == aSaveLine )
@@ -1508,10 +1468,9 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
}
else if ( bCalcCharPositions && bQuickFormat && ( nEnd > nInvalidEnd) )
{
- // Wenn die ungueltige Zeile so endet, dass die naechste an
- // der 'gleichen' Textstelle wie vorher beginnt, also nicht
- // anders umgebrochen wird, brauche ich dort auch nicht die
- // textbreiten neu bestimmen:
+ // If the invalid line ends so that the next begins on the
+ // 'same' passage as before, i.e. not wrapped differently,
+ // then the text width does not have to be determined anew:
if ( nEnd == ( aSaveLine.GetEnd() + nInvalidDiff ) )
{
bCalcCharPositions = sal_False;
@@ -1525,12 +1484,12 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
if ( !bSameLineAgain )
{
- nIndex = pLine->GetEnd(); // naechste Zeile Start = letzte Zeile Ende
- // weil nEnd hinter das letzte Zeichen zeigt!
+ nIndex = pLine->GetEnd(); // next line start = last line end
+ // as nEnd points to the last charecter!
sal_uInt16 nEndPortion = pLine->GetEndPortion();
- // Naechste Zeile oder ggf. neue Zeile....
+ // Next line or maybe a new line....
pLine = 0;
if ( nLine < pParaPortion->GetLines().Count()-1 )
pLine = pParaPortion->GetLines().GetObject( ++nLine );
@@ -1572,7 +1531,7 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
if ( nDelFromLine != 0xFFFF )
pParaPortion->GetLines().DeleteFromLine( nDelFromLine );
- DBG_ASSERT( pParaPortion->GetLines().Count(), "Keine Zeile nach CreateLines!" );
+ DBG_ASSERT( pParaPortion->GetLines().Count(), "No line after CreateLines!" );
if ( bLineBreak == sal_True )
CreateAndInsertEmptyLine( pParaPortion, nStartPosY );
@@ -1616,7 +1575,7 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn
if ( aBulletArea.Right() > 0 )
pParaPortion->SetBulletX( (sal_uInt16) GetXValue( aBulletArea.Right() ) );
else
- pParaPortion->SetBulletX( 0 ); // Falls Bullet falsch eingestellt.
+ pParaPortion->SetBulletX( 0 ); // If Bullet set incorrectly.
if ( pParaPortion->GetBulletX() > nStartX )
{
nStartX = (short)GetXValue( rLRItem.GetTxtLeft() + rLRItem.GetTxtFirstLineOfst() + nSpaceBeforeAndMinLabelWidth );
@@ -1669,7 +1628,7 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn
sal_uInt16 nTxtHeight = pTmpLine->GetHeight();
if ( nTxtHeight < nMinHeight )
{
- // Der Ascent muss um die Differenz angepasst werden:
+ // The Ascent has to be adjusted for the difference:
long nDiff = nMinHeight - nTxtHeight;
pTmpLine->SetMaxAscent( (sal_uInt16)(pTmpLine->GetMaxAscent() + nDiff) );
pTmpLine->SetHeight( nMinHeight, nTxtHeight );
@@ -1678,9 +1637,9 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn
else if ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP )
{
sal_uInt16 nPara = GetParaPortions().GetPos( pParaPortion );
- if ( nPara || IsFixedCellHeight() || pTmpLine->GetStartPortion() ) // Nicht die aller erste Zeile
+ if ( nPara || IsFixedCellHeight() || pTmpLine->GetStartPortion() ) // Not the very first line
{
- // #100508# There are documents with PropLineSpace 0, why?
+ // There are documents with PropLineSpace 0, why?
// (cmc: re above question :-) such documents can be seen by importing a .ppt
if ( rLSItem.GetPropLineSpace() && ( rLSItem.GetPropLineSpace() != 100 ) )
{
@@ -1688,7 +1647,7 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn
sal_Int32 nH = nTxtHeight;
nH *= rLSItem.GetPropLineSpace();
nH /= 100;
- // Der Ascent muss um die Differenz angepasst werden:
+ // The Ascent has to be adjusted for the difference:
long nDiff = pTmpLine->GetHeight() - nH;
if ( nDiff > pTmpLine->GetMaxAscent() )
nDiff = pTmpLine->GetMaxAscent();
@@ -1705,21 +1664,19 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn
if ( nMinHeight > (long)pTmpLine->GetHeight() )
{
long nDiff = nMinHeight - (long)pTmpLine->GetHeight();
- // nDiff auf oben und unten verteilen.
+ // distribute nDiff upwards and downwards
pTmpLine->SetMaxAscent( (sal_uInt16)(pTmpLine->GetMaxAscent() + nDiff/2) );
pTmpLine->SetHeight( (sal_uInt16)nMinHeight );
}
}
else
{
- // -2: Die neue ist bereits eingefuegt.
+ // -2: The new one is already inserted.
#ifdef DBG_UTIL
EditLine* pLastLine = pParaPortion->GetLines().GetObject( pParaPortion->GetLines().Count()-2 );
- DBG_ASSERT( pLastLine, "Weicher Umbruch, keine Zeile ?!" );
- DBG_ASSERT( pLastLine->GetEnd() == pParaPortion->GetNode()->Len(), "Doch anders?" );
+ DBG_ASSERT( pLastLine, "soft wrap no line?!" );
+ DBG_ASSERT( pLastLine->GetEnd() == pParaPortion->GetNode()->Len(), "different anyway?" );
#endif
-// pTmpLine->SetStart( pLastLine->GetEnd() );
-// pTmpLine->SetEnd( pLastLine->GetEnd() );
sal_uInt16 nPos = (sal_uInt16) pParaPortion->GetTextPortions().Count() - 1 ;
pTmpLine->SetStartPortion( nPos );
pTmpLine->SetEndPortion( nPos );
@@ -1731,12 +1688,9 @@ sal_Bool ImpEditEngine::FinishCreateLines( ParaPortion* pParaPortion )
// CalcCharPositions( pParaPortion );
pParaPortion->SetValid();
long nOldHeight = pParaPortion->GetHeight();
-// sal_uInt16 nPos = GetParaPortions().GetPos( pParaPortion );
-// DBG_ASSERT( nPos != USHRT_MAX, "FinishCreateLines: Portion nicht in Liste!" );
-// ParaPortion* pPrev = nPos ? GetParaPortions().GetObject( nPos-1 ) : 0;
CalcHeight( pParaPortion );
- DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "FinishCreateLines: Keine Text-Portion?" );
+ DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "FinishCreateLines: No Text-Portion?" );
sal_Bool bRet = ( pParaPortion->GetHeight() != nOldHeight );
return bRet;
}
@@ -1810,12 +1764,12 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
nBreakPos = nMaxBreakPos;
}
- // #101795# nBreakPos can never be outside the portion, even not with hangig punctuation
+ // nBreakPos can never be outside the portion, even not with hangig punctuation
if ( nBreakPos > nMaxBreakPos )
nBreakPos = nMaxBreakPos;
// BUG in I18N - the japanese dot is in the next line!
- // !!! Testen!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ // !!! Test!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
if ( (nBreakPos + ( aUserOptions.allowPunctuationOutsideMargin ? 0 : 1 ) ) <= nMaxBreakPos )
{
sal_Unicode cFirstInNextLine = ( (nBreakPos+1) < pNode->Len() ) ? pNode->GetChar( nBreakPos ) : 0;
@@ -1826,18 +1780,14 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
bHangingPunctuation = ( nBreakPos > nMaxBreakPos ) ? sal_True : sal_False;
pLine->SetHangingPunctuation( bHangingPunctuation );
- #ifndef SVX_LIGHT
- // Egal ob Trenner oder nicht: Das Wort nach dem Trenner durch
- // die Silbentrennung jagen...
- // nMaxBreakPos ist das letzte Zeichen was in die Zeile passt,
- // nBreakPos ist der Wort-Anfang
- // Ein Problem gibt es, wenn das Dok so schmal ist, dass ein Wort
- // auf mehr als Zwei Zeilen gebrochen wird...
+ // Whether a separator or not, push the word after the separator through
+ // hyphenation ... NMaxBreakPos is the last character that fits into
+ // the line, nBreakPos is the beginning of the word.
+ // There is a problem if the Doc is so narrow that a word is broken
+ // into more than two lines ...
if ( !bHangingPunctuation && bCanHyphenate && GetHyphenator().is() )
{
i18n::Boundary aBoundary = _xBI->getWordBoundary( *pNode, nBreakPos, GetLocale( EditPaM( pNode, nBreakPos ) ), ::com::sun::star::i18n::WordType::DICTIONARY_WORD, sal_True );
-// sal_uInt16 nWordStart = nBreakPos;
-// sal_uInt16 nBreakPos_OLD = nBreakPos;
sal_uInt16 nWordStart = nBreakPos;
sal_uInt16 nWordEnd = (sal_uInt16) aBoundary.endPos;
DBG_ASSERT( nWordEnd > nWordStart, "ImpBreakLine: Start >= End?" );
@@ -1845,10 +1795,9 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
sal_uInt16 nWordLen = nWordEnd - nWordStart;
if ( ( nWordEnd >= nMaxBreakPos ) && ( nWordLen > 3 ) )
{
- // #104415# May happen, because getLineBreak may differ from getWordBoudary with DICTIONARY_WORD
- // DBG_ASSERT( nWordEnd >= nMaxBreakPos, "Hyph: Break?" );
+ // May happen, because getLineBreak may differ from getWordBoudary with DICTIONARY_WORD
String aWord( *pNode, nWordStart, nWordLen );
- sal_uInt16 nMinTrail = nWordEnd-nMaxBreakPos+1; //+1: Vor dem angeknacksten Buchstaben
+ sal_uInt16 nMinTrail = nWordEnd-nMaxBreakPos+1; //+1: Before the dickey letter
Reference< XHyphenatedWord > xHyphWord;
if (xHyphenator.is())
xHyphWord = xHyphenator->hyphenate( aWord, aLocale, aWord.Len() - nMinTrail, Sequence< PropertyValue >() );
@@ -1868,27 +1817,25 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
{
String aAlt( xHyphWord->getHyphenatedWord() );
- // Wir gehen von zwei Faellen aus, die nun
- // vorliegen koennen:
- // 1) packen wird zu pak-ken
- // 2) Schiffahrt wird zu Schiff-fahrt
- // In Fall 1 muss ein Zeichen ersetzt werden,
- // in Fall 2 wird ein Zeichen hinzugefuegt.
- // Die Identifikation wird erschwert durch Worte wie
- // "Schiffahrtsbrennesseln", da der Hyphenator alle
- // Position des Wortes auftrennt und "Schifffahrtsbrennnesseln"
- // ermittelt. Wir koennen also eigentlich nicht unmittelbar vom
- // Index des AlternativWord auf aWord schliessen.
-
- // Das ganze geraffel wird durch eine Funktion am
- // Hyphenator vereinfacht werden, sobald AMA sie einbaut...
+ // We expect the two cases, which might exist now:
+ // 1) packen becomes pak-ken
+ // 2) Schiffahrt becomes Schiff-fahrt
+ // In case 1, a character has to be replaced
+ // in case 2 a character is added.
+ // The identification is complicated by long
+ // compound words because the Hyphenator separates
+ // all position of the word.
+ // "Schiffahrtsbrennesseln" -> "Schifffahrtsbrennnesseln"
+ // We can thus actually not directly connect the index of the
+ // AlternativeWord to aWord. The whole issue will be simplified
+ // by a function in the Hyphenator as soon as AMA builds this in...
sal_uInt16 nAltStart = _nWordLen - 1;
sal_uInt16 nTxtStart = nAltStart - (aAlt.Len() - aWord.Len());
sal_uInt16 nTxtEnd = nTxtStart;
sal_uInt16 nAltEnd = nAltStart;
- // Die Bereiche zwischen den nStart und nEnd ist
- // die Differenz zwischen Alternativ- und OriginalString.
+ // The regions between the nStart and nEnd is the
+ // difference between alternative and original string.
while( nTxtEnd < aWord.Len() && nAltEnd < aAlt.Len() &&
aWord.GetChar(nTxtEnd) != aAlt.GetChar(nAltEnd) )
{
@@ -1896,7 +1843,7 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
++nAltEnd;
}
- // Wenn ein Zeichen hinzugekommen ist, dann bemerken wir es jetzt:
+ // If a character is added, then we notice it now:
if( nAltEnd > nTxtEnd && nAltStart == nAltEnd &&
aWord.GetChar( nTxtEnd ) == aAlt.GetChar(nAltEnd) )
{
@@ -1905,7 +1852,7 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
++nTxtEnd;
}
- DBG_ASSERT( ( nAltEnd - nAltStart ) == 1, "Alternate: Falsche Annahme!" );
+ DBG_ASSERT( ( nAltEnd - nAltStart ) == 1, "Alternate: Wrong assumption!" );
if ( nTxtEnd > nTxtStart )
cAlternateReplChar = aAlt.GetChar( nAltStart );
@@ -1922,26 +1869,24 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
}
}
- #endif // !SVX_LIGHT
-
if ( nBreakPos <= pLine->GetStart() )
{
- // keine Trenner in Zeile => abhacken !
+ // No separator in line => Chop!
nBreakPos = nMaxBreakPos;
- // MT: I18N nextCharacters !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ // I18N nextCharacters !
if ( nBreakPos <= pLine->GetStart() )
- nBreakPos = pLine->GetStart() + 1; // Sonst Endlosschleife!
+ nBreakPos = pLine->GetStart() + 1; // Otherwise infinite loop!
}
}
- // die angeknackste Portion ist die End-Portion
+ // the dickey portion is the end portion
pLine->SetEnd( nBreakPos );
sal_uInt16 nEndPortion = SplitTextPortion( pParaPortion, nBreakPos, pLine );
if ( !bCompressBlank && !bHangingPunctuation )
{
- // #96187# When justification is not SVX_ADJUST_LEFT, it's important to compress
+ // When justification is not SVX_ADJUST_LEFT, it's important to compress
// the trailing space even if there is enough room for the space...
// Don't check for SVX_ADJUST_LEFT, doesn't matter to compress in this case too...
DBG_ASSERT( nBreakPos > pLine->GetStart(), "ImpBreakLines - BreakPos not expected!" );
@@ -1952,15 +1897,15 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
if ( bCompressBlank || bHangingPunctuation )
{
TextPortion* pTP = pParaPortion->GetTextPortions().GetObject( nEndPortion );
- DBG_ASSERT( pTP->GetKind() == PORTIONKIND_TEXT, "BlankRubber: Keine TextPortion!" );
- DBG_ASSERT( nBreakPos > pLine->GetStart(), "SplitTextPortion am Anfang der Zeile?" );
+ DBG_ASSERT( pTP->GetKind() == PORTIONKIND_TEXT, "BlankRubber: No TextPortion!" );
+ DBG_ASSERT( nBreakPos > pLine->GetStart(), "SplitTextPortion at the beginning of the line?" );
sal_uInt16 nPosInArray = nBreakPos - 1 - pLine->GetStart();
pTP->GetSize().Width() = ( nPosInArray && ( pTP->GetLen() > 1 ) ) ? pLine->GetCharPosArray()[ nPosInArray-1 ] : 0;
pLine->GetCharPosArray()[ nPosInArray ] = pTP->GetSize().Width();
}
else if ( bHyphenated )
{
- // Eine Portion fuer den Trenner einbauen...
+ // A portion for inserting the separator ...
TextPortion* pHyphPortion = new TextPortion( 0 );
pHyphPortion->GetKind() = PORTIONKIND_HYPHENATOR;
String aHyphText( CH_HYPH );
@@ -1971,7 +1916,7 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
pPrev->SetLen( pPrev->GetLen() - 1 );
pHyphPortion->SetLen( 1 );
pHyphPortion->SetExtraValue( cAlternateReplChar );
- // Breite der Portion davor korrigieren:
+ // Correct width of the portion above:
pPrev->GetSize().Width() =
pLine->GetCharPosArray()[ nBreakPos-1 - pLine->GetStart() - 1 ];
}
@@ -1981,7 +1926,7 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
aHyphText.Insert( cAlternateExtraChar, 0 );
}
- // Breite der Hyph-Portion ermitteln:
+ // Determine the width of the Hyph-Portion:
SvxFont aFont;
SeekCursor( pParaPortion->GetNode(), nBreakPos, aFont );
aFont.SetPhysFont( GetRefDevice() );
@@ -1995,13 +1940,13 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine, long nRemainingSpace )
{
- DBG_ASSERT( nRemainingSpace > 0, "AdjustBlocks: Etwas zuwenig..." );
- DBG_ASSERT( pLine, "AdjustBlocks: Zeile ?!" );
+ DBG_ASSERT( nRemainingSpace > 0, "AdjustBlocks: Somewhat too little..." );
+ DBG_ASSERT( pLine, "AdjustBlocks: Line ?!" );
if ( ( nRemainingSpace < 0 ) || pLine->IsEmpty() )
return ;
const sal_uInt16 nFirstChar = pLine->GetStart();
- const sal_uInt16 nLastChar = pLine->GetEnd() -1; // Last zeigt dahinter
+ const sal_uInt16 nLastChar = pLine->GetEnd() -1; // Last points behind
ContentNode* pNode = pParaPortion->GetNode();
DBG_ASSERT( nLastChar < pNode->Len(), "AdjustBlocks: Out of range!" );
@@ -2047,9 +1992,9 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine,
if ( !aPositions.Count() )
return;
- // Wenn das letzte Zeichen ein Blank ist, will ich es nicht haben!
- // Die Breite muss auf die Blocker davor verteilt werden...
- // Aber nicht, wenn es das einzige ist
+ // If the last character is a blank, it is rejected!
+ // The width must be distributed to the blockers in front...
+ // But not if it is the only one.
if ( ( pNode->GetChar( nLastChar ) == ' ' ) && ( aPositions.Count() > 1 ) && ( MsLangId::getPrimaryLanguage( GetLanguage( EditPaM( pNode, nLastChar ) ) ) != LANGUAGE_ARABIC_PRIMARY_ONLY ) )
{
aPositions.Remove( aPositions.Count()-1, 1 );
@@ -2060,12 +2005,12 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine,
long nBlankWidth = nRealWidth;
if ( nLastChar > nPortionStart )
nBlankWidth -= pLine->GetCharPosArray()[nLastChar-nFirstChar-1];
- // Evtl. ist das Blank schon in ImpBreakLine abgezogen worden:
+ // Possibly the blank has already been deducted in ImpBreakLine:
if ( nRealWidth == pLastPortion->GetSize().Width() )
{
- // Beim letzten Zeichen muss die Portion hinter dem Blank aufhoeren
- // => Korrektur vereinfachen:
- DBG_ASSERT( ( nPortionStart + pLastPortion->GetLen() ) == ( nLastChar+1 ), "Blank doch nicht am Portion-Ende?!" );
+ // For the last character the portion must stop behind the blank
+ // => Simplify correction:
+ DBG_ASSERT( ( nPortionStart + pLastPortion->GetLen() ) == ( nLastChar+1 ), "Blank actually not at the end of the portion!?");
pLastPortion->GetSize().Width() -= nBlankWidth;
nRemainingSpace += nBlankWidth;
}
@@ -2076,11 +2021,11 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine,
const long nMore4Everyone = nRemainingSpace / nGaps;
long nSomeExtraSpace = nRemainingSpace - nMore4Everyone*nGaps;
- DBG_ASSERT( nSomeExtraSpace < (long)nGaps, "AdjustBlocks: ExtraSpace zu gross" );
+ DBG_ASSERT( nSomeExtraSpace < (long)nGaps, "AdjustBlocks: ExtraSpace too large" );
DBG_ASSERT( nSomeExtraSpace >= 0, "AdjustBlocks: ExtraSpace < 0 " );
- // Die Positionen im Array und die Portion-Breiten korrigieren:
- // Letztes Zeichen wird schon nicht mehr beachtet...
+ // Correct the positions in the Array and the portion widths:
+ // Last character won't be considered ...
for ( sal_uInt16 n = 0; n < aPositions.Count(); n++ )
{
sal_uInt16 nChar = aPositions[n];
@@ -2090,7 +2035,7 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine,
nPortion = pParaPortion->GetTextPortions().FindPortion( nChar, nPortionStart, true );
TextPortion* pLastPortion = pParaPortion->GetTextPortions()[ nPortion ];
- // Die Breite der Portion:
+ // The width of the portion:
pLastPortion->GetSize().Width() += nMore4Everyone;
if ( nSomeExtraSpace )
pLastPortion->GetSize().Width()++;
@@ -2233,10 +2178,9 @@ void ImpEditEngine::ImpFindKashidas( ContentNode* pNode, sal_uInt16 nStart, sal_
sal_uInt16 ImpEditEngine::SplitTextPortion( ParaPortion* pPortion, sal_uInt16 nPos, EditLine* pCurLine )
{
- DBG_ASSERT( pPortion, "SplitTextPortion: Welche ?" );
+ DBG_ASSERT( pPortion, "SplitTextPortion: Which ?" );
- // Die Portion bei nPos wird geplittet, wenn bei nPos nicht
- // sowieso ein Wechsel ist
+ // The portion at nPos is split, if there is not a transition at nPos anyway
if ( nPos == 0 )
return 0;
@@ -2250,12 +2194,8 @@ sal_uInt16 ImpEditEngine::SplitTextPortion( ParaPortion* pPortion, sal_uInt16 nP
nTmpPos = nTmpPos + pTP->GetLen();
if ( nTmpPos >= nPos )
{
- if ( nTmpPos == nPos ) // dann braucht nichts geteilt werden
+ if ( nTmpPos == nPos ) // then nothing needs to be split
{
- // Skip Portions with ExtraSpace
-// while ( ( (nSplitPortion+1) < nPortions ) && (pPortion->GetTextPortions().GetObject(nSplitPortion+1)->GetKind() == PORTIONKIND_EXTRASPACE ) )
-// nSplitPortion++;
-
return nSplitPortion;
}
pTextPortion = pTP;
@@ -2263,18 +2203,18 @@ sal_uInt16 ImpEditEngine::SplitTextPortion( ParaPortion* pPortion, sal_uInt16 nP
}
}
- DBG_ASSERT( pTextPortion, "Position ausserhalb des Bereichs!" );
- DBG_ASSERT( pTextPortion->GetKind() == PORTIONKIND_TEXT, "SplitTextPortion: Keine TextPortion!" );
+ DBG_ASSERT( pTextPortion, "Position outside the area!" );
+ DBG_ASSERT( pTextPortion->GetKind() == PORTIONKIND_TEXT, "SplitTextPortion: No TextPortion!" );
sal_uInt16 nOverlapp = nTmpPos - nPos;
pTextPortion->GetLen() = pTextPortion->GetLen() - nOverlapp;
TextPortion* pNewPortion = new TextPortion( nOverlapp );
pPortion->GetTextPortions().Insert( pNewPortion, nSplitPortion+1 );
- // Groessen setzen:
+ // Set sizes
if ( pCurLine )
{
- // Kein neues GetTextSize, sondern Werte aus Array verwenden:
- DBG_ASSERT( nPos > pCurLine->GetStart(), "SplitTextPortion am Anfang der Zeile?" );
+ // No new GetTextSize, instead use values from the Array:
+ DBG_ASSERT( nPos > pCurLine->GetStart(), "SplitTextPortion at the beginning of the line?" );
pTextPortion->GetSize().Width() = pCurLine->GetCharPosArray()[ nPos-pCurLine->GetStart()-1 ];
if ( pTextPortion->GetExtraInfos() && pTextPortion->GetExtraInfos()->bCompressed )
@@ -2301,7 +2241,7 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_uInt16& r
{
sal_uInt16 nStartPos = rStart;
ContentNode* pNode = pParaPortion->GetNode();
- DBG_ASSERT( pNode->Len(), "CreateTextPortions sollte nicht fuer leere Absaetze verwendet werden!" );
+ DBG_ASSERT( pNode->Len(), "CreateTextPortions should not be used for empty paragraphs!" );
SortedPositions aPositions;
aPositions.Insert( (sal_uInt32) 0 );
@@ -2310,8 +2250,8 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_uInt16& r
EditCharAttrib* pAttrib = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
while ( pAttrib )
{
- // Start und Ende in das Array eintragen...
- // Die InsertMethode laesst keine doppelten Werte zu....
+ // Insert Start and End into the Array...
+ // The Insert method does not allow for duplicate values....
aPositions.Insert( pAttrib->GetStart() );
aPositions.Insert( pAttrib->GetEnd() );
nAttr++;
@@ -2344,9 +2284,9 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_uInt16& r
aPositions.Insert( mpIMEInfos->aPos.GetIndex() + mpIMEInfos->nLen );
}
- // Ab ... loeschen:
- // Leider muss die Anzahl der TextPortions mit aPositions.Count()
- // nicht uebereinstimmen, da evtl. Zeilenumbrueche...
+ // From ... Delete:
+ // Unfortunately, the number of text portions does not have to match
+ // aPositions.Count(), since there might be line breaks...
sal_uInt16 nPortionStart = 0;
sal_uInt16 nInvPortion = 0;
sal_uInt16 nP;
@@ -2362,18 +2302,18 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_uInt16& r
break;
}
}
- DBG_ASSERT( nP < pParaPortion->GetTextPortions().Count() || !pParaPortion->GetTextPortions().Count(), "Nichts zum loeschen: CreateTextPortions" );
+ DBG_ASSERT( nP < pParaPortion->GetTextPortions().Count() || !pParaPortion->GetTextPortions().Count(), "Nothing to delete: CreateTextPortions" );
if ( nInvPortion && ( nPortionStart+pParaPortion->GetTextPortions().GetObject(nInvPortion)->GetLen() > nStartPos ) )
{
- // lieber eine davor...
- // Aber nur wenn es mitten in der Portion war, sonst ist es evtl.
- // die einzige in der Zeile davor !
+ // prefer one in front ...
+ // But only if it was in the middle of the portion of, otherwise it
+ // might be the only one in the row in front!
nInvPortion--;
nPortionStart = nPortionStart - pParaPortion->GetTextPortions().GetObject(nInvPortion)->GetLen();
}
pParaPortion->GetTextPortions().DeleteFromPortion( nInvPortion );
- // Eine Portion kann auch durch einen Zeilenumbruch entstanden sein:
+ // A portion may also have been formed by a line break:
aPositions.Insert( nPortionStart );
sal_uInt16 nInvPos;
@@ -2389,35 +2329,34 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_uInt16& r
pParaPortion->GetTextPortions().Insert( pNew, pParaPortion->GetTextPortions().Count());
}
- DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "Keine Portions?!" );
+ DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "No Portions?!" );
#ifdef EDITDEBUG
- DBG_ASSERT( pParaPortion->DbgCheckTextPortions(), "Portions kaputt?" );
+ DBG_ASSERT( pParaPortion->DbgCheckTextPortions(), "Portion is broken?" );
#endif
}
void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nStartPos, short nNewChars )
{
- DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "Keine Portions!" );
- DBG_ASSERT( nNewChars, "RecalcTextPortion mit Diff == 0" );
+ DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "No Portions!" );
+ DBG_ASSERT( nNewChars, "RecalcTextPortion with Diff == 0" );
ContentNode* const pNode = pParaPortion->GetNode();
if ( nNewChars > 0 )
{
- // Wenn an nStartPos ein Attribut beginnt/endet, faengt eine neue Portion
- // an, ansonsten wird die Portion an nStartPos erweitert.
-
+ // If an Attribute begins/ends at nStartPos, then a new portion starts
+ // otherwise the portion is extended at nStartPos.
if ( pNode->GetCharAttribs().HasBoundingAttrib( nStartPos ) || IsScriptChange( EditPaM( pNode, nStartPos ) ) )
{
sal_uInt16 nNewPortionPos = 0;
if ( nStartPos )
nNewPortionPos = SplitTextPortion( pParaPortion, nStartPos ) + 1;
- // Eine leere Portion kann hier stehen, wenn der Absatz leer war,
- // oder eine Zeile durch einen harten Zeilenumbruch entstanden ist.
+ // A blank portion may be here, if the paragraph was empty,
+ // or if a line was created by a hard line break.
if ( ( nNewPortionPos < pParaPortion->GetTextPortions().Count() ) &&
!pParaPortion->GetTextPortions()[nNewPortionPos]->GetLen() )
{
- DBG_ASSERT( pParaPortion->GetTextPortions()[nNewPortionPos]->GetKind() == PORTIONKIND_TEXT, "Leere Portion war keine TextPortion!" );
+ DBG_ASSERT( pParaPortion->GetTextPortions()[nNewPortionPos]->GetKind() == PORTIONKIND_TEXT, "the empty portion was no TextPortion!" );
sal_uInt16 & r =
pParaPortion->GetTextPortions()[nNewPortionPos]->GetLen();
r = r + nNewChars;
@@ -2434,19 +2373,20 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt
const sal_uInt16 nTP = pParaPortion->GetTextPortions().
FindPortion( nStartPos, nPortionStart );
TextPortion* const pTP = pParaPortion->GetTextPortions()[ nTP ];
- DBG_ASSERT( pTP, "RecalcTextPortion: Portion nicht gefunden" );
+ DBG_ASSERT( pTP, "RecalcTextPortion: Portion not found" );
pTP->GetLen() = pTP->GetLen() + nNewChars;
pTP->GetSize().Width() = (-1);
}
}
else
{
- // Portion schrumpfen oder ggf. entfernen.
- // Vor Aufruf dieser Methode muss sichergestellt sein, dass
- // keine Portions in dem geloeschten Bereich lagen!
+ // Shrink or remove portion if necessary.
+ // Before calling this method it must be ensured that no portions were
+ // in the deleted area!
- // Es darf keine reinragende oder im Bereich startende Portion geben,
- // also muss nStartPos <= nPos <= nStartPos - nNewChars(neg.) sein
+ // There must be no portions extending into the area or portions starting in
+ // the area, so it must be:
+ // nStartPos <= nPos <= nStartPos - nNewChars(neg.)
sal_uInt16 nPortion = 0;
sal_uInt16 nPos = 0;
sal_uInt16 nEnd = nStartPos-nNewChars;
@@ -2457,16 +2397,16 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt
pTP = pParaPortion->GetTextPortions()[ nPortion ];
if ( ( nPos+pTP->GetLen() ) > nStartPos )
{
- DBG_ASSERT( nPos <= nStartPos, "Start falsch!" );
- DBG_ASSERT( nPos+pTP->GetLen() >= nEnd, "End falsch!" );
+ DBG_ASSERT( nPos <= nStartPos, "Wrong Start!" );
+ DBG_ASSERT( nPos+pTP->GetLen() >= nEnd, "Wrong End!" );
break;
}
nPos = nPos + pTP->GetLen();
}
- DBG_ASSERT( pTP, "RecalcTextPortion: Portion nicht gefunden" );
+ DBG_ASSERT( pTP, "RecalcTextPortion: Portion not found" );
if ( ( nPos == nStartPos ) && ( (nPos+pTP->GetLen()) == nEnd ) )
{
- // Portion entfernen;
+ // Remove portion;
sal_uInt8 nType = pTP->GetKind();
pParaPortion->GetTextPortions().Remove( nPortion );
delete pTP;
@@ -2475,7 +2415,7 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt
TextPortion* pNext = pParaPortion->GetTextPortions()[ nPortion ];
if ( pNext && !pNext->GetLen() )
{
- // Dummy-Portion entfernen
+ // Remove dummy portion
pParaPortion->GetTextPortions().Remove( nPortion );
delete pNext;
}
@@ -2483,18 +2423,18 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt
}
else
{
- DBG_ASSERT( pTP->GetLen() > (-nNewChars), "Portion zu klein zum schrumpfen!" );
+ DBG_ASSERT( pTP->GetLen() > (-nNewChars), "Portion too small to shrink! ");
pTP->GetLen() = pTP->GetLen() + nNewChars;
}
- // ganz am Schluss darf keine HYPHENATOR-Portion stehen bleiben...
- DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "RecalcTextPortions: Keine mehr da!" );
+ // No HYPHENATOR portion is allowed to get stuck right at the end...
+ DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "RecalcTextPortions: Nothing left! ");
sal_uInt16 nLastPortion = pParaPortion->GetTextPortions().Count() - 1;
pTP = pParaPortion->GetTextPortions().GetObject( nLastPortion );
if ( pTP->GetKind() == PORTIONKIND_HYPHENATOR )
{
- // Portion wegschmeissen, ggf. die davor korrigieren, wenn
- // die Hyph-Portion ein Zeichen geschluckt hat...
+ // Discard portion; if possible, correct the ones before,
+ // if the Hyphenator portion has swallowed one character...
pParaPortion->GetTextPortions().Remove( nLastPortion );
if ( nLastPortion && pTP->GetLen() )
{
@@ -2507,7 +2447,7 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt
}
}
#ifdef EDITDEBUG
- DBG_ASSERT( pParaPortion->DbgCheckTextPortions(), "Portions kaputt?" );
+ DBG_ASSERT( pParaPortion->DbgCheckTextPortions(), "Portions are broken?" );
#endif
}
@@ -2562,9 +2502,9 @@ void ImpEditEngine::SetFixedCellHeight( sal_Bool bUseFixedCellHeight )
void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rFont, OutputDevice* pOut, sal_uInt16 nIgnoreWhich )
{
- // Es war mal geplant, SeekCursor( nStartPos, nEndPos, ... ), damit nur
- // ab der StartPosition neu gesucht wird.
- // Problem: Es mussten zwei Listen beruecksichtigt/gefuehrt werden:
+ // It was planned, SeekCursor( nStartPos, nEndPos, ... ), so that it would
+ // only be searched anew at the StartPosition.
+ // Problem: There would be two lists to consider/handle:
// OrderedByStart,OrderedByEnd.
if ( nPos > pNode->Len() )
@@ -2617,17 +2557,15 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rF
EditCharAttrib* pAttrib = GetAttrib( rAttribs, nAttr );
while ( pAttrib && ( pAttrib->GetStart() <= nPos ) )
{
- // Beim Seeken nicht die Attr beruecksichtigen, die dort beginnen!
- // Leere Attribute werden beruecksichtigt( verwendet), da diese
- // gerade eingestellt wurden.
- // 12.4.95: Doch keine Leeren Attribute verwenden:
- // - Wenn gerade eingestellt und leer => keine Auswirkung auf Font
- // In einem leeren Absatz eingestellte Zeichen werden sofort wirksam.
+ // when seeking, ignore attributes which start there! Empty attributes
+ // are considered (used) as these are just set. But do not use empty
+ // attributes: When just set and empty => no effect on font
+ // In a blank paragraph, set characters take effect immediately.
if ( ( pAttrib->Which() != nIgnoreWhich ) &&
( ( ( pAttrib->GetStart() < nPos ) && ( pAttrib->GetEnd() >= nPos ) )
|| ( !pNode->Len() ) ) )
{
- DBG_ASSERT( ( pAttrib->Which() >= EE_CHAR_START ) && ( pAttrib->Which() <= EE_FEATURE_END ), "Unglueltiges Attribut in Seek() " );
+ DBG_ASSERT( ( pAttrib->Which() >= EE_CHAR_START ) && ( pAttrib->Which() <= EE_FEATURE_END ), "Invalid Attribute in Seek() " );
if ( IsScriptItemValid( pAttrib->Which(), nScriptType ) )
{
pAttrib->SetFont( rFont, pOut );
@@ -2658,20 +2596,18 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rF
if ( aStatus.DoNotUseColors() )
{
- // Hack fuer DL,weil JOE staendig die Pooldefaults verbiegt!
- // const SvxColorItem& rColorItem = (const SvxColorItem&)aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_COLOR );
rFont.SetColor( /* rColorItem.GetValue() */ COL_BLACK );
}
if ( aStatus.DoStretch() || ( nRelWidth != 100 ) )
{
- // Fuer das aktuelle Ausgabegeraet, weil es sonst bei einem
- // Drucker als RefDev auf dem Bildschirm #?!@' aussieht!
+ // For the current Output device, because otherwise if RefDev=Printer its looks
+ // ugly on the screen!
OutputDevice* pDev = pOut ? pOut : GetRefDevice();
rFont.SetPhysFont( pDev );
FontMetric aMetric( pDev->GetFontMetric() );
- // Fuer die Hoehe nicht die Metriken nehmen, da das bei
- // Hoch-/Tiefgestellt schief geht.
+ // For the height do not consider the metrics, because it will go
+ // wrong at Superscript/Subscript.
Size aRealSz( aMetric.GetSize().Width(), rFont.GetSize().Height() );
if ( aStatus.DoStretch() )
{
@@ -2692,23 +2628,22 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rF
aRealSz.Width() *= nStretchX;
aRealSz.Width() /= 100;
- // Auch das Kerning: (long wegen Zwischenergebnis)
+ // Also the Kerning: (long due to handle Interim results)
long nKerning = rFont.GetFixKerning();
/*
- Die Ueberlegung war: Wenn neg. Kerning, aber StretchX = 200
- => Nicht das Kerning verdoppelt, also die Buchstaben weiter
- zusammenziehen
+ The consideration was: If negative kerning, but StretchX = 200
+ => Do not double the kerning, thus pull the letters closer together
---------------------------
Kern StretchX =>Kern
---------------------------
>0 <100 < (Proportional)
<0 <100 < (Proportional)
>0 >100 > (Proportional)
- <0 >100 < (Der Betrag, also Antiprop)
+ <0 >100 < (The amount, thus disproportional)
*/
if ( ( nKerning < 0 ) && ( nStretchX > 100 ) )
{
- // Antiproportional
+ // disproportional
nKerning *= 100;
nKerning /= nStretchX;
}
@@ -2728,7 +2663,7 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rF
aRealSz.Width() /= 100;
}
rFont.SetSize( aRealSz );
- // Font wird nicht restauriert...
+ // Font is not restored ...
}
if ( ( ( rFont.GetColor() == COL_AUTO ) || ( IsForceAutoColor() ) ) && pOut )
@@ -2785,9 +2720,9 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rF
void ImpEditEngine::RecalcFormatterFontMetrics( FormatterFontMetric& rCurMetrics, SvxFont& rFont )
{
- // Fuer Zeilenhoehe bei Hoch/Tief erstmal ohne Propr!
+ // for line height at high / low first without Propr!
sal_uInt16 nPropr = rFont.GetPropr();
- DBG_ASSERT( ( nPropr == 100 ) || rFont.GetEscapement(), "Propr ohne Escape?!" );
+ DBG_ASSERT( ( nPropr == 100 ) || rFont.GetEscapement(), "Propr without Escape?!" );
if ( nPropr != 100 )
{
rFont.SetPropr( 100 );
@@ -2804,52 +2739,35 @@ void ImpEditEngine::RecalcFormatterFontMetrics( FormatterFontMetric& rCurMetrics
if ( IsFixedCellHeight() )
{
-/* creating correct proportional ascent and descent values lead to problems if different fonts are used
- in the same portion, it results in a bigger linespacing.
- sal_Int32 f = nAscent + nDescent;
- if ( f )
- {
- sal_Int32 nHeight = ImplCalculateFontIndependentLineSpacing( rFont.GetHeight() );
- nAscent = (sal_Int16)(( nHeight * nAscent ) / f );
- nDescent = (sal_Int16)(nHeight - nAscent);
- }
-*/
nAscent = sal::static_int_cast< sal_uInt16 >( rFont.GetHeight() );
nDescent= sal::static_int_cast< sal_uInt16 >( ImplCalculateFontIndependentLineSpacing( rFont.GetHeight() ) - nAscent );
}
else
{
sal_uInt16 nIntLeading = ( aMetric.GetIntLeading() > 0 ) ? (sal_uInt16)aMetric.GetIntLeading() : 0;
- // Fonts ohne Leading bereiten Probleme
+ // Fonts without leading cause problems
if ( ( nIntLeading == 0 ) && ( pRefDev->GetOutDevType() == OUTDEV_PRINTER ) )
{
- // Da schaun wir mal, was fuer eine Leading ich auf dem
- // Bildschirm erhalte
+ // Lets see what Leading one gets on the screen
VirtualDevice* pVDev = GetVirtualDevice( pRefDev->GetMapMode(), pRefDev->GetDrawMode() );
rFont.SetPhysFont( pVDev );
aMetric = pVDev->GetFontMetric();
- // Damit sich die Leading nicht wieder rausrechnet,
- // wenn die ganze Zeile den Font hat, nTmpLeading.
-
- // 4/96: Kommt bei HP Laserjet 4V auch nicht hin
- // => Werte komplett vom Bildschirm holen.
- // sal_uInt16 nTmpLeading = (sal_uInt16)aMetric.GetLeading();
- // nAscent += nTmpLeading;
+ // This is so that the Leading does not count itself out again,
+ // if the whole line has the font, nTmpLeading.
nAscent = (sal_uInt16)aMetric.GetAscent();
nDescent = (sal_uInt16)aMetric.GetDescent();
- // nLeading = (sal_uInt16)aMetric.GetLeading();
}
}
if ( nAscent > rCurMetrics.nMaxAscent )
rCurMetrics.nMaxAscent = nAscent;
if ( nDescent > rCurMetrics.nMaxDescent )
rCurMetrics.nMaxDescent= nDescent;
- // Sonderbehandlung Hoch/Tief:
+ // Special treatment of high/low:
if ( rFont.GetEscapement() )
{
- // Jetzt unter Beruecksichtigung von Escape/Propr
- // Ascent oder Descent ggf vergroessern
+ // Now in consideration of Escape/Propr
+ // possibly enlarge Ascent or Descent
short nDiff = (short)(rFont.GetSize().Height()*rFont.GetEscapement()/100L);
if ( rFont.GetEscapement() > 0 )
{
@@ -2857,7 +2775,7 @@ void ImpEditEngine::RecalcFormatterFontMetrics( FormatterFontMetric& rCurMetrics
if ( nAscent > rCurMetrics.nMaxAscent )
rCurMetrics.nMaxAscent = nAscent;
}
- else // muss < 0 sein
+ else // has to be < 0
{
nDescent = (sal_uInt16) (((long)nDescent)*nPropr/100 - nDiff);
if ( nDescent > rCurMetrics.nMaxDescent )
@@ -2880,15 +2798,15 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
EditLine* pLine;
Point aTmpPos;
Point aRedLineTmpPos;
- DBG_ASSERT( GetParaPortions().Count(), "Keine ParaPortion?!" );
+ DBG_ASSERT( GetParaPortions().Count(), "No ParaPortion?!" );
SvxFont aTmpFont( GetParaPortions()[0]->GetNode()->GetCharAttribs().GetDefFont() );
Font aOldFont( pOutDev->GetFont() );
vcl::PDFExtOutDevData* pPDFExtOutDevData = PTR_CAST( vcl::PDFExtOutDevData, pOutDev->GetExtOutDevData() );
- // Bei gedrehtem Text wird aStartPos als TopLeft angesehen, da andere
- // Informationen fehlen, und sowieso das ganze Object ungescrollt
- // dargestellt wird.
- // Das Rechteck ist unendlich gross.
+ // In the case of rotated text is aStartPos considered TopLeft because
+ // other information is missing, and since the whole object is shown anyway
+ // un-scrolled.
+ // The rectangle is infinite.
Point aOrigin( aStartPos );
double nCos = 0.0, nSin = 0.0;
if ( nOrientation )
@@ -2903,22 +2821,17 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
GDIMetaFile* pMtf = pOutDev->GetConnectMetaFile();
const bool bMetafileValid( pMtf != NULL );
- // Fuer OnlineSpelling:
-// EditPaM aCursorPos;
-// if( GetStatus().DoOnlineSpelling() && pActiveView )
-// aCurPos = pActiveView->pImpEditView->GetEditSelections().Max();
-
long nVertLineSpacing = CalcVertLineSpacing(aStartPos);
// --------------------------------------------------
- // Ueber alle Absaetze...
+ // Over all the paragraphs ...
// --------------------------------------------------
for ( sal_uInt16 n = 0; n < GetParaPortions().Count(); n++ )
{
ParaPortion* pPortion = GetParaPortions().GetObject( n );
DBG_ASSERT( pPortion, "NULL-Pointer in TokenList in Paint" );
- // falls beim Tippen Idle-Formatierung, asynchrones Paint.
- // Unsichtbare Portions koennen ungueltig sein.
+ // if when typing idle formatting, asynchronous Paint.
+ // Invisible Portions may be invalid.
if ( pPortion->IsVisible() && pPortion->IsInvalid() )
return;
@@ -2933,7 +2846,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
{
// --------------------------------------------------
- // Ueber die Zeilen des Absatzes...
+ // Over the lines of the paragraph ...
// --------------------------------------------------
sal_uInt16 nLines = pPortion->GetLines().Count();
sal_uInt16 nLastLine = nLines-1;
@@ -2951,7 +2864,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
for ( sal_uInt16 nLine = 0; nLine < nLines; nLine++ )
{
pLine = pPortion->GetLines().GetObject(nLine);
- DBG_ASSERT( pLine, "NULL-Pointer im Zeileniterator in UpdateViews" );
+ DBG_ASSERT( pLine, "NULL-Pointer in the line iterator in UpdateViews" );
aTmpPos = aStartPos;
if ( !IsVertical() )
{
@@ -2979,46 +2892,33 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
// does, too. No change for not-layouting (painting).
if(0 == nLine) // && !bStripOnly)
{
- // VERT???
GetEditEnginePtr()->PaintingFirstLine( n, aParaStart, aTmpPos.Y(), aOrigin, nOrientation, pOutDev );
}
// --------------------------------------------------
- // Ueber die Portions der Zeile...
+ // Over the Portions of the line ...
// --------------------------------------------------
nIndex = pLine->GetStart();
for ( sal_uInt16 y = pLine->GetStartPortion(); y <= pLine->GetEndPortion(); y++ )
{
- DBG_ASSERT( pPortion->GetTextPortions().Count(), "Zeile ohne Textportion im Paint!" );
+ DBG_ASSERT( pPortion->GetTextPortions().Count(), "Line without Textportion in Paint!" );
TextPortion* pTextPortion = pPortion->GetTextPortions().GetObject( y );
- DBG_ASSERT( pTextPortion, "NULL-Pointer im Portioniterator in UpdateViews" );
+ DBG_ASSERT( pTextPortion, "NULL-Pointer in Portion iterator in UpdateViews" );
long nPortionXOffset = GetPortionXOffset( pPortion, pLine, y );
if ( !IsVertical() )
{
aTmpPos.X() = aStartPos.X() + nPortionXOffset;
if ( aTmpPos.X() > aClipRec.Right() )
- break; // Keine weitere Ausgabe in Zeile noetig
+ break; // No further output in line necessary
}
else
{
aTmpPos.Y() = aStartPos.Y() + nPortionXOffset;
if ( aTmpPos.Y() > aClipRec.Bottom() )
- break; // Keine weitere Ausgabe in Zeile noetig
+ break; // No further output in line necessary
}
- // R2L replaces with obove...
- // New position after processing R2L text...
-// R2L if ( nR2LWidth && !pTextPortion->GetRightToLeft() )
-// R2L {
-// R2L if ( !IsVertical() )
-// R2L aTmpPos.X() += nR2LWidth;
-// R2L else
-// R2L aTmpPos.Y() += nR2LWidth;
-// R2L
-// R2L nR2LWidth = 0;
-// R2L }
-
switch ( pTextPortion->GetKind() )
{
case PORTIONKIND_TEXT:
@@ -3169,8 +3069,8 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
else if ( pTextPortion->GetKind() == PORTIONKIND_FIELD )
{
EditCharAttrib* pAttr = pPortion->GetNode()->GetCharAttribs().FindFeature( nIndex );
- DBG_ASSERT( pAttr, "Feld nicht gefunden" );
- DBG_ASSERT( pAttr && pAttr->GetItem()->ISA( SvxFieldItem ), "Feld vom falschen Typ!" );
+ DBG_ASSERT( pAttr, "Field not found");
+ DBG_ASSERT( pAttr && pAttr->GetItem()->ISA( SvxFieldItem ), "Field of the wrong type! ");
aText = ((EditCharAttribField*)pAttr)->GetFieldValue();
nTextStart = 0;
nTextLen = aText.Len();
@@ -3223,24 +3123,6 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
if (pTextPortion->IsRightToLeft())
aRedLineTmpPos.X() += pTextPortion->GetSize().Width();
-//L2R if ( pTextPortion->GetRightToLeft() )
-//L2R {
-//L2R sal_uInt16 nNextPortion = y+1;
-//L2R while ( nNextPortion <= pLine->GetEndPortion() )
-//L2R {
-//L2R TextPortion* pNextTextPortion = pPortion->GetTextPortions().GetObject( nNextPortion );
-//L2R if ( pNextTextPortion->GetRightToLeft() )
-//L2R {
-//L2R if ( !IsVertical() )
-//L2R aOutPos.X() += pNextTextPortion->GetSize().Width();
-//L2R else
-//L2R aOutPos.Y() += pNextTextPortion->GetSize().Width();
-//L2R }
-//L2R else
-//L2R break;
-//L2R nNextPortion++;
-//L2R }
-//L2R }
if ( bStripOnly )
{
EEngineData::WrongSpellVector aWrongSpellVector;
@@ -3339,7 +3221,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
short nEsc = aTmpFont.GetEscapement();
if ( nOrientation )
{
- // Bei Hoch/Tief selbst Hand anlegen:
+ // In case of high/low do it yourself:
if ( aTmpFont.GetEscapement() )
{
long nDiff = aTmpFont.GetSize().Height() * aTmpFont.GetEscapement() / 100L;
@@ -3356,23 +3238,25 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
aTmpFont.SetPhysFont( pOutDev );
}
- // nur ausgeben, was im sichtbaren Bereich beginnt:
- // Wichtig, weil Bug bei einigen Grafikkarten bei transparentem Font, Ausgabe bei neg.
+
+ // Take only what begins in the visible range:
+ // Important, because of a bug in some graphic cards
+ // when transparent font, output when negative
if ( nOrientation || ( !IsVertical() && ( ( aTmpPos.X() + nTxtWidth ) >= nFirstVisXPos ) )
|| ( IsVertical() && ( ( aTmpPos.Y() + nTxtWidth ) >= nFirstVisYPos ) ) )
{
if ( nEsc && ( ( aTmpFont.GetUnderline() != UNDERLINE_NONE ) ) )
{
- // Das Hoch/Tief ohne Underline malen, das Underline
- // auf der BaseLine der Original-Fonthoehe ausgeben...
-
- // Aber nur, wenn davor auch Unterstrichen!
+ // Paint the high/low without underline,
+ // Display the Underline on the
+ // base line of the original font height ...
+ // But only if there was something underlined before!
sal_Bool bSpecialUnderline = sal_False;
EditCharAttrib* pPrev = pPortion->GetNode()->GetCharAttribs().FindAttrib( EE_CHAR_ESCAPEMENT, nIndex );
if ( pPrev )
{
SvxFont aDummy;
- // Unterstreichung davor?
+ // Underscore in front?
if ( pPrev->GetStart() )
{
SeekCursor( pPortion->GetNode(), pPrev->GetStart(), aDummy );
@@ -3471,7 +3355,6 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
}
-#ifndef SVX_LIGHT
if ( GetStatus().DoOnlineSpelling() && pPortion->GetNode()->GetWrongList()->HasWrongs() && pTextPortion->GetLen() )
{
{//#105750# adjust LinePos for superscript or subscript text
@@ -3490,7 +3373,6 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
lcl_DrawRedLines( pOutDev, aTmpFont.GetSize().Height(), aRedLineTmpPos, nIndex, nIndex + pTextPortion->GetLen(), pDXArray, pPortion->GetNode()->GetWrongList(), nOrientation, aOrigin, IsVertical(), pTextPortion->IsRightToLeft() );
pOutDev->SetLineColor( aOldColor );
}
-#endif // !SVX_LIGHT
}
pOutDev->Pop();
@@ -3498,23 +3380,11 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
if ( pTmpDXArray )
delete[] pTmpDXArray;
-// R2L if ( !pTextPortion->GetRightToLeft() )
-// R2L {
-// R2L if ( !IsVertical() )
-// R2L aTmpPos.X() += nTxtWidth;
-// R2L else
-// R2L aTmpPos.Y() += nTxtWidth;
-// R2L }
-// R2L else
-// R2L {
-// R2L nR2LWidth += nTxtWidth;
-// R2L }
-
if ( pTextPortion->GetKind() == PORTIONKIND_FIELD )
{
EditCharAttrib* pAttr = pPortion->GetNode()->GetCharAttribs().FindFeature( nIndex );
- DBG_ASSERT( pAttr, "Feld nicht gefunden" );
- DBG_ASSERT( pAttr && pAttr->GetItem()->ISA( SvxFieldItem ), "Feld vom falschen Typ!" );
+ DBG_ASSERT( pAttr, "Field not found" );
+ DBG_ASSERT( pAttr && pAttr->GetItem()->ISA( SvxFieldItem ), "Wrong type of field!" );
// add a meta file comment if we record to a metafile
if( bMetafileValid )
@@ -3533,7 +3403,6 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
}
break;
-// case PORTIONKIND_EXTRASPACE:
case PORTIONKIND_TAB:
{
if ( pTextPortion->GetExtraValue() && ( pTextPortion->GetExtraValue() != ' ' ) )
@@ -3547,9 +3416,9 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
if( nCharWidth )
nChars = pTextPortion->GetSize().Width() / nCharWidth;
if ( nChars < 2 )
- nChars = 2; // wird durch DrawStretchText gestaucht.
+ nChars = 2; // is compressed by DrawStretchText.
else if ( nChars == 2 )
- nChars = 3; // sieht besser aus
+ nChars = 3; // looks better
String aText;
aText.Fill( (sal_uInt16)nChars, pTextPortion->GetExtraValue() );
@@ -3589,7 +3458,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
aStartPos.X() -= nSBL;
}
- // keine sichtbaren Aktionen mehr?
+ // no more visible actions?
if ( !IsVertical() && ( aStartPos.Y() >= aClipRec.Bottom() ) )
break;
else if ( IsVertical() && ( aStartPos.X() <= aClipRec.Left() ) )
@@ -3617,7 +3486,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
if ( pPDFExtOutDevData )
pPDFExtOutDevData->EndStructureElement();
- // keine sichtbaren Aktionen mehr?
+ // no more visible actions?
if ( !IsVertical() && ( aStartPos.Y() > aClipRec.Bottom() ) )
break;
if ( IsVertical() && ( aStartPos.X() < aClipRec.Left() ) )
@@ -3629,13 +3498,13 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRec, sal_Bool bUseVirtDev )
{
- DBG_ASSERT( pView, "Keine View - Kein Paint!" );
+ DBG_ASSERT( pView, "No View - No Paint!" );
DBG_CHKOBJ( GetEditEnginePtr(), EditEngine, 0 );
if ( !GetUpdateMode() || IsInUndo() )
return;
- // Schnittmenge aus Paintbereich und OutputArea.
+ // Intersection of paint area and output area.
Rectangle aClipRec( pView->GetOutputArea() );
aClipRec.Intersection( rRec );
@@ -3656,7 +3525,7 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRec, sal_Bool b
aClipRecPixel.Bottom() += 1;
}
- // Wenn aClipRecPixel > XXXX, dann invalidieren ?!
+ // If aClipRecPixel > XXXX, then invalidate?!
VirtualDevice* pVDev = GetVirtualDevice( pOutWin->GetMapMode(), pOutWin->GetDrawMode() );
pVDev->SetDigitLanguage( GetRefDevice()->GetDigitLanguage() );
@@ -3698,8 +3567,8 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRec, sal_Bool b
}
else
{
- // Das VirtDev kann bei einem Resize sehr gross werden =>
- // irgendwann mal kleiner machen!
+ // The VirtDev can become very big during a Resize =>
+ // eventually make it smaller!
if ( ( aOutSz.Height() > ( aClipRecPixel.GetHeight() + RESDIFF ) ) ||
( aOutSz.Width() > ( aClipRecPixel.GetWidth() + RESDIFF ) ) )
{
@@ -3710,15 +3579,15 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRec, sal_Bool b
pVDev->Erase();
}
}
- DBG_ASSERT( bVDevValid, "VDef konnte nicht vergroessert werden!" );
+ DBG_ASSERT( bVDevValid, "VDef could not be enlarged!" );
if ( !bVDevValid )
{
Paint( pView, rRec, sal_False /* ohne VDev */ );
return;
}
- // PaintRect fuer VDev nicht mit alignter Groesse,
- // da sonst die Zeile darunter auch ausgegeben werden muss:
+ // PaintRect for VDev not with aligned size,
+ // Otherwise, the line below must also be printed out:
Rectangle aTmpRec( Point( 0, 0 ), aClipRec.GetSize() );
aClipRec = pOutWin->PixelToLogic( aClipRecPixel );
@@ -3746,12 +3615,11 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRec, sal_Bool b
if ( GetTextRanger() )
{
// Some problems here with push/pop, why?!
-// pOutWin->Push( PUSH_CLIPREGION|PUSH_MAPMODE );
bClipRegion = pOutWin->IsClipRegion();
aOldRegion = pOutWin->GetClipRegion();
- // Wie bekomme ich das Polygon an die richtige Stelle????
- // Das Polygon bezieht sich auf die View, nicht auf das Window
- // => Origin umsetzen...
+ // How do I get the polygon to the right place??
+ // The polygon is based on the view, not the Window
+ // => reset origin...
aOldMapMode = pOutWin->GetMapMode();
Point aOrigin = aOldMapMode.GetOrigin();
Point aViewPos = pView->GetOutputArea().TopLeft();
@@ -3768,7 +3636,6 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRec, sal_Bool b
if ( GetTextRanger() )
{
-// pOutWin->Pop();
if ( bClipRegion )
pOutWin->SetClipRegion( aOldRegion );
else
@@ -3795,9 +3662,10 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRec, sal_Bool b
aStartPos.Y() -= pView->GetVisDocLeft();
}
- // Wenn Doc-Breite < OutputArea,Width, nicht umgebrochene Felder,
- // stehen die Felder sonst �ber, wenn > Zeile.
- // ( Oben nicht, da dort bereits Doc-Breite von Formatierung mit drin )
+ // If Doc-width < Output Area,Width and not wrapped fields,
+ // the fields usually protrude if > line.
+ // (Not at the top, since there the Doc-width from formatting is already
+ // there)
if ( !IsVertical() && ( pView->GetOutputArea().GetWidth() > GetPaperSize().Width() ) )
{
long nMaxX = pView->GetOutputArea().Left() + GetPaperSize().Width();
@@ -3825,8 +3693,8 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRec, sal_Bool b
void ImpEditEngine::InsertContent( ContentNode* pNode, sal_uInt16 nPos )
{
- DBG_ASSERT( pNode, "NULL-Poointer in InsertContent! " );
- DBG_ASSERT( IsInUndo(), "InsertContent nur fuer Undo()!" );
+ DBG_ASSERT( pNode, "NULL-Pointer in InsertContent! " );
+ DBG_ASSERT( IsInUndo(), "InsertContent only for Undo()!" );
ParaPortion* pNew = new ParaPortion( pNode );
GetParaPortions().Insert( pNew, nPos );
aEditDoc.Insert( pNode, nPos );
@@ -3837,9 +3705,9 @@ void ImpEditEngine::InsertContent( ContentNode* pNode, sal_uInt16 nPos )
EditPaM ImpEditEngine::SplitContent( sal_uInt16 nNode, sal_uInt16 nSepPos )
{
ContentNode* pNode = aEditDoc.SaveGetObject( nNode );
- DBG_ASSERT( pNode, "Ungueltiger Node in SplitContent" );
- DBG_ASSERT( IsInUndo(), "SplitContent nur fuer Undo()!" );
- DBG_ASSERT( nSepPos <= pNode->Len(), "Index im Wald: SplitContent" );
+ DBG_ASSERT( pNode, "Invalid Node in SplitContent" );
+ DBG_ASSERT( IsInUndo(), "SplitContent only for Undo()!" );
+ DBG_ASSERT( nSepPos <= pNode->Len(), "Index out of range: SplitContent" );
EditPaM aPaM( pNode, nSepPos );
return ImpInsertParaBreak( aPaM );
}
@@ -3848,9 +3716,9 @@ EditPaM ImpEditEngine::ConnectContents( sal_uInt16 nLeftNode, sal_Bool bBackward
{
ContentNode* pLeftNode = aEditDoc.SaveGetObject( nLeftNode );
ContentNode* pRightNode = aEditDoc.SaveGetObject( nLeftNode+1 );
- DBG_ASSERT( pLeftNode, "Ungueltiger linker Node in ConnectContents" );
- DBG_ASSERT( pRightNode, "Ungueltiger rechter Node in ConnectContents" );
- DBG_ASSERT( IsInUndo(), "ConnectContent nur fuer Undo()!" );
+ DBG_ASSERT( pLeftNode, "Invalid left node in ConnectContents ");
+ DBG_ASSERT( pRightNode, "Invalid right node in ConnectContents ");
+ DBG_ASSERT( IsInUndo(), "ConnectContent only for Undo()!" );
return ImpConnectParagraphs( pLeftNode, pRightNode, bBackward );
}
@@ -3858,23 +3726,12 @@ void ImpEditEngine::SetUpdateMode( sal_Bool bUp, EditView* pCurView, sal_Bool bF
{
sal_Bool bChanged = ( GetUpdateMode() != bUp );
- // Beim Umschalten von sal_True auf sal_False waren alle Selektionen sichtbar,
- // => Wegmalen
- // Umgekehrt waren alle unsichtbar => malen
-
-// DrawAllSelections(); sieht im Outliner schlecht aus !
-// EditView* pView = aEditViewList.First();
-// while ( pView )
-// {
-// DBG_CHKOBJ( pView, EditView, 0 );
-// pView->pImpEditView->DrawSelection();
-// pView = aEditViewList.Next();
-// }
-
- // Wenn !bFormatted, also z.B. nach SetText, braucht bei UpdateMode sal_True
- // nicht sofort formatiert werden, weil warscheinlich noch Text kommt.
- // Spaetestens bei einem Paint / CalcTextWidth wird formatiert.
-
+ // When switching from sal_True to sal_False, all selections were visible,
+ // => paint over
+ // the other hand, were all invisible => paint
+ // If !bFormatted, e.g. after SetText, then if UpdateMode=sal_True
+ // formatting is not needed immediately, probably because more text is coming.
+ // At latest it is formatted at a Paint/CalcTextWidth.
bUpdate = bUp;
if ( bUpdate && ( bChanged || bForceUpdate ) )
FormatAndUpdate( pCurView );
@@ -3883,22 +3740,20 @@ void ImpEditEngine::SetUpdateMode( sal_Bool bUp, EditView* pCurView, sal_Bool bF
void ImpEditEngine::ShowParagraph( sal_uInt16 nParagraph, sal_Bool bShow )
{
ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph );
- DBG_ASSERT( pPPortion, "ShowParagraph: Absatz existiert nicht!" );
+ DBG_ASSERT( pPPortion, "ShowParagraph: Paragraph does not exist! ");
if ( pPPortion && ( pPPortion->IsVisible() != bShow ) )
{
pPPortion->SetVisible( bShow );
if ( !bShow )
{
- // Als deleted kenzeichnen, damit keine Selektion auf diesem
- // Absatz beginnt oder endet...
+ // Mark as deleted, so that no selection will end or begin at
+ // this paragraph...
DeletedNodeInfo* pDelInfo = new DeletedNodeInfo( (sal_uIntPtr)pPPortion->GetNode(), nParagraph );
aDeletedNodes.Insert( pDelInfo, aDeletedNodes.Count() );
UpdateSelections();
- // Dann kriege ich den unteren Bereich nicht invalidiert,
- // wenn UpdateMode = sal_False!
- // Wenn doch, dann vor SetVisible auf sal_False merken!
-// nCurTextHeight -= pPPortion->GetHeight();
+ // The region below will not be invalidated if UpdateMode = sal_False!
+ // If anyway, then save as sal_False before SetVisible !
}
if ( bShow && ( pPPortion->IsInvalid() || !pPPortion->nHeight ) )
@@ -3908,7 +3763,7 @@ void ImpEditEngine::ShowParagraph( sal_uInt16 nParagraph, sal_Bool bShow )
if ( pPPortion->IsInvalid() )
{
Font aOldFont( GetRefDevice()->GetFont() );
- CreateLines( nParagraph, 0 ); // 0: Kein TextRanger
+ CreateLines( nParagraph, 0 ); // 0: No TextRanger
if ( aStatus.DoRestoreFont() )
GetRefDevice()->SetFont( aOldFont );
}
@@ -3937,7 +3792,7 @@ void ImpEditEngine::ShowParagraph( sal_uInt16 nParagraph, sal_Bool bShow )
sal_Bool ImpEditEngine::IsParagraphVisible( sal_uInt16 nParagraph )
{
ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph );
- DBG_ASSERT( pPPortion, "IsParagraphVisible: Absatz existiert nicht!" );
+ DBG_ASSERT( pPPortion, "IsParagraphVisible: Paragraph does not exist! ");
if ( pPPortion )
return pPPortion->IsVisible();
return sal_False;
@@ -3945,7 +3800,7 @@ sal_Bool ImpEditEngine::IsParagraphVisible( sal_uInt16 nParagraph )
EditSelection ImpEditEngine::MoveParagraphs( Range aOldPositions, sal_uInt16 nNewPos, EditView* pCurView )
{
- DBG_ASSERT( GetParaPortions().Count() != 0, "Keine Absaetze gefunden: MoveParagraphs" );
+ DBG_ASSERT( GetParaPortions().Count() != 0, "No paragraphs found: MoveParagraphs" );
if ( GetParaPortions().Count() == 0 )
return EditSelection();
aOldPositions.Justify();
@@ -3955,20 +3810,20 @@ EditSelection ImpEditEngine::MoveParagraphs( Range aOldPositions, sal_uInt16 nNe
if ( nNewPos >= GetParaPortions().Count() )
nNewPos = GetParaPortions().Count() - 1;
- // Dort, wo der Absatz eingefuegt wurde, muss richtig gepainted werden:
- // Dort, wo der Absatz entfernt wurde, muss richtig gepainted werden:
- // ( Und dazwischen entsprechend auch...)
+ // Where the paragraph was inserted it has to be properly redrawn:
+ // Where the paragraph was removed it has to be properly redrawn:
+ // ( and correspondingly in between as well...)
if ( pCurView && ( GetUpdateMode() == sal_True ) )
{
- // in diesem Fall kann ich direkt neu malen, ohne die
- // Portions zu Invalidieren.
+ // in this case one can redraw directly whithout invalidating the
+ // Portions
sal_uInt16 nFirstPortion = Min( (sal_uInt16)aOldPositions.Min(), nNewPos );
sal_uInt16 nLastPortion = Max( (sal_uInt16)aOldPositions.Max(), nNewPos );
ParaPortion* pUpperPortion = GetParaPortions().SaveGetObject( nFirstPortion );
ParaPortion* pLowerPortion = GetParaPortions().SaveGetObject( nLastPortion );
- aInvalidRec = Rectangle(); // leermachen
+ aInvalidRec = Rectangle(); // make empty
aInvalidRec.Left() = 0;
aInvalidRec.Right() = aPaperSize.Width();
aInvalidRec.Top() = GetParaPortions().GetYOffset( pUpperPortion );
@@ -3978,7 +3833,7 @@ EditSelection ImpEditEngine::MoveParagraphs( Range aOldPositions, sal_uInt16 nNe
}
else
{
- // aber der oberen ungueltigen Position neu painten...
+ // redraw from the upper invalid position
sal_uInt16 nFirstInvPara = Min( (sal_uInt16)aOldPositions.Min(), nNewPos );
InvalidateFromParagraph( nFirstInvPara );
}
@@ -3987,9 +3842,8 @@ EditSelection ImpEditEngine::MoveParagraphs( Range aOldPositions, sal_uInt16 nNe
void ImpEditEngine::InvalidateFromParagraph( sal_uInt16 nFirstInvPara )
{
- // Es werden nicht die folgenden Absaetze invalidiert,
- // da ResetHeight() => Groessenanderung => alles folgende wird
- // sowieso neu ausgegeben.
+ // The following paragraphs are not invalidated, since ResetHeight()
+ // => size change => all the following are re-issued anyway.
ParaPortion* pTmpPortion;
if ( nFirstInvPara != 0 )
{
@@ -4015,19 +3869,19 @@ void ImpEditEngine::CallStatusHdl()
{
if ( aStatusHdlLink.IsSet() && aStatus.GetStatusWord() )
{
- // Der Status muss vor Call zurueckgesetzt werden,
- // da im Hdl evtl. weitere Fags gesetzt werden...
+ // The Status has to be reset before the Call,
+ // since other Flags might be set in the handler...
EditStatus aTmpStatus( aStatus );
aStatus.Clear();
aStatusHdlLink.Call( &aTmpStatus );
- aStatusTimer.Stop(); // Falls von Hand gerufen...
+ aStatusTimer.Stop(); // If called by hand ...
}
}
ContentNode* ImpEditEngine::GetPrevVisNode( ContentNode* pCurNode )
{
ParaPortion* pPortion = FindParaPortion( pCurNode );
- DBG_ASSERT( pPortion, "GetPrevVisibleNode: Keine passende Portion!" );
+ DBG_ASSERT( pPortion, "GetPrevVisibleNode: No matching portion!" );
pPortion = GetPrevVisPortion( pPortion );
if ( pPortion )
return pPortion->GetNode();
@@ -4037,7 +3891,7 @@ ContentNode* ImpEditEngine::GetPrevVisNode( ContentNode* pCurNode )
ContentNode* ImpEditEngine::GetNextVisNode( ContentNode* pCurNode )
{
ParaPortion* pPortion = FindParaPortion( pCurNode );
- DBG_ASSERT( pPortion, "GetNextVisibleNode: Keine passende Portion!" );
+ DBG_ASSERT( pPortion, "GetNextVisibleNode: No matching portion!" );
pPortion = GetNextVisPortion( pPortion );
if ( pPortion )
return pPortion->GetNode();
@@ -4047,7 +3901,7 @@ ContentNode* ImpEditEngine::GetNextVisNode( ContentNode* pCurNode )
ParaPortion* ImpEditEngine::GetPrevVisPortion( ParaPortion* pCurPortion )
{
sal_uInt16 nPara = GetParaPortions().GetPos( pCurPortion );
- DBG_ASSERT( nPara < GetParaPortions().Count() , "Portion nicht gefunden: GetPrevVisPortion" );
+ DBG_ASSERT( nPara < GetParaPortions().Count() , "Portion not found: GetPrevVisPortion" );
ParaPortion* pPortion = nPara ? GetParaPortions()[--nPara] : 0;
while ( pPortion && !pPortion->IsVisible() )
pPortion = nPara ? GetParaPortions()[--nPara] : 0;
@@ -4058,7 +3912,7 @@ ParaPortion* ImpEditEngine::GetPrevVisPortion( ParaPortion* pCurPortion )
ParaPortion* ImpEditEngine::GetNextVisPortion( ParaPortion* pCurPortion )
{
sal_uInt16 nPara = GetParaPortions().GetPos( pCurPortion );
- DBG_ASSERT( nPara < GetParaPortions().Count() , "Portion nicht gefunden: GetPrevVisNode" );
+ DBG_ASSERT( nPara < GetParaPortions().Count() , "Portion not found: GetPrevVisNode" );
ParaPortion* pPortion = GetParaPortions().SaveGetObject( ++nPara );
while ( pPortion && !pPortion->IsVisible() )
pPortion = GetParaPortions().SaveGetObject( ++nPara );
@@ -4122,7 +3976,7 @@ EditPaM ImpEditEngine::InsertParagraph( sal_uInt16 nPara )
ContentNode* pNode = GetEditDoc().SaveGetObject( nPara-1 );
if ( !pNode )
pNode = GetEditDoc().SaveGetObject( GetEditDoc().Count() - 1 );
- DBG_ASSERT( pNode, "Kein einziger Absatz in InsertParagraph ?" );
+ DBG_ASSERT( pNode, "Not a single paragraph in InsertParagraph ?" );
aPaM = EditPaM( pNode, pNode->Len() );
}
else
@@ -4138,7 +3992,7 @@ EditSelection* ImpEditEngine::SelectParagraph( sal_uInt16 nPara )
{
EditSelection* pSel = 0;
ContentNode* pNode = GetEditDoc().SaveGetObject( nPara );
- DBG_ASSERTWARNING( pNode, "Absatz existiert nicht: SelectParagraph" );
+ DBG_ASSERTWARNING( pNode, "Paragraph does not exist: SelectParagraph" );
if ( pNode )
pSel = new EditSelection( EditPaM( pNode, 0 ), EditPaM( pNode, pNode->Len() ) );
@@ -4213,9 +4067,9 @@ void ImpEditEngine::DoStretchChars( sal_uInt16 nX, sal_uInt16 nY )
if ( nX != 100 )
{
- // Fontbreite
+ // Font width
SvxCharScaleWidthItem* pNewWidth = (SvxCharScaleWidthItem*) pNode->GetContentAttribs().GetItem( EE_CHAR_FONTWIDTH ).Clone();
- sal_uInt32 nProp = pNewWidth->GetValue(); // sal_uInt32, kann temporaer gross werden
+ sal_uInt32 nProp = pNewWidth->GetValue(); // sal_uInt32, can get big temporary
nProp *= nX;
nProp /= 100;
pNewWidth->SetValue( (sal_uInt16)nProp );
@@ -4234,8 +4088,8 @@ void ImpEditEngine::DoStretchChars( sal_uInt16 nX, sal_uInt16 nY )
}
else if ( nKerning < 0 )
{
- // Bei Negativen Werten:
- // Bei Stretching > 100 muessen die Werte kleiner werden und umgekehrt.
+ // For negative values:
+ // For stretching > 100 the values must become smaller and vice versa
nKerning *= 100;
nKerning /= nX;
}
@@ -4248,7 +4102,7 @@ void ImpEditEngine::DoStretchChars( sal_uInt16 nX, sal_uInt16 nY )
if ( nY != 100 )
{
- // Fonthoehe
+ // Font height
for ( int nItem = 0; nItem < 3; nItem++ )
{
sal_uInt16 nItemId = EE_CHAR_FONTHEIGHT;
@@ -4268,7 +4122,7 @@ void ImpEditEngine::DoStretchChars( sal_uInt16 nX, sal_uInt16 nY )
delete pNewHeight;
}
- // Absatzabstaende
+ // Paragraph spacing
const SvxULSpaceItem& rULSpaceItem =
(const SvxULSpaceItem&)pNode->GetContentAttribs().GetItem( EE_PARA_ULSPACE );
SvxULSpaceItem* pNewUL = (SvxULSpaceItem*)rULSpaceItem.Clone();
@@ -4288,8 +4142,8 @@ void ImpEditEngine::DoStretchChars( sal_uInt16 nX, sal_uInt16 nY )
SetParaAttribs( nPara, aTmpSet );
- // harte Attribute:
- sal_uInt16 nLastEnd = 0; // damit nach entfernen und neu nicht nochmal
+ // hard attributes:
+ sal_uInt16 nLastEnd = 0; // so not again after removing them and new
CharAttribArray& rAttribs = pNode->GetCharAttribs().GetAttribs();
sal_uInt16 nAttribs = rAttribs.Count();
for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ )
@@ -4328,8 +4182,8 @@ void ImpEditEngine::DoStretchChars( sal_uInt16 nX, sal_uInt16 nY )
}
else if ( nKerning < 0 )
{
- // Bei Negativen Werten:
- // Bei Stretching > 100 muessen die Werte kleiner werden und umgekehrt.
+ // For negative values:
+ // For stretching > 100 the values must become smaller and vice versa.
nKerning *= 100;
nKerning /= nX;
}
@@ -4567,7 +4421,6 @@ sal_Bool ImpEditEngine::ImplCalcAsianCompression( ContentNode* pNode, TextPortio
DBG_ASSERT( pTextPortion->GetLen(), "ImplCalcAsianCompression - Empty Portion?" );
// Percent is 1/100 Percent...
-
if ( n100thPercentFromMax == 10000 )
pTextPortion->SetExtraInfos( NULL );
@@ -4596,7 +4449,6 @@ sal_Bool ImpEditEngine::ImplCalcAsianCompression( ContentNode* pNode, TextPortio
}
pTextPortion->GetExtraInfos()->nMaxCompression100thPercent = n100thPercentFromMax;
pTextPortion->GetExtraInfos()->nAsianCompressionTypes |= nType;
-// pTextPortion->GetExtraInfos()->nCompressedChars++;
long nOldCharWidth;
if ( (n+1) < nPortionLen )
@@ -4616,12 +4468,10 @@ sal_Bool ImpEditEngine::ImplCalcAsianCompression( ContentNode* pNode, TextPortio
if ( bCompressPunctuation )
{
- // pTextPortion->GetExtraInfos()->nComressionWeight += 5;
nCompress = nOldCharWidth / 2;
}
else // Kana
{
- // pTextPortion->GetExtraInfos()->nComressionWeight += 1;
nCompress = nOldCharWidth / 10;
}
@@ -4639,7 +4489,7 @@ sal_Bool ImpEditEngine::ImplCalcAsianCompression( ContentNode* pNode, TextPortio
// Special handling for rightpunctuation: For the 'compression' we must
- // start th eoutput before the normal char position....
+ // start the output before the normal char position....
if ( bManipulateDXArray && ( pTextPortion->GetLen() > 1 ) )
{
if ( !pTextPortion->GetExtraInfos()->pOrgDXArray )
@@ -4695,7 +4545,6 @@ void ImpEditEngine::ImplExpandCompressedPortions( EditLine* pLine, ParaPortion*
{
sal_Bool bFoundCompressedPortion = sal_False;
long nCompressed = 0;
-// long nCompressWeight = 0;
TextPortionList aCompressedPortions;
sal_uInt16 nPortion = pLine->GetEndPortion();
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 2cd3e5e7d114..c4bbd3879600 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -147,7 +147,6 @@ EditPaM ImpEditEngine::ReadText( SvStream& rInput, EditSelection aSel )
EditPaM ImpEditEngine::ReadXML( SvStream& rInput, EditSelection aSel )
{
-#ifndef SVX_LIGHT
if ( aSel.HasRange() )
aSel = ImpDeleteSelection( aSel );
@@ -156,15 +155,10 @@ EditPaM ImpEditEngine::ReadXML( SvStream& rInput, EditSelection aSel )
::SvxReadXML( *GetEditEnginePtr(), rInput, aESel );
return aSel.Max();
-#else
- return EditPaM();
-#endif
}
EditPaM ImpEditEngine::ReadRTF( SvStream& rInput, EditSelection aSel )
{
-#ifndef SVX_LIGHT
-
#if defined (EDITDEBUG) && !defined( UNX )
SvFileStream aRTFOut( String( RTL_CONSTASCII_USTRINGPARAM ( "d:\\rtf_in.rtf" ) ), STREAM_WRITE );
aRTFOut << rInput;
@@ -192,15 +186,10 @@ EditPaM ImpEditEngine::ReadRTF( SvStream& rInput, EditSelection aSel )
return aSel.Min();
}
return xPrsr->GetCurPaM();
-#else
- return EditPaM();
-#endif
}
EditPaM ImpEditEngine::ReadHTML( SvStream& rInput, const String& rBaseURL, EditSelection aSel, SvKeyValueIterator* pHTTPHeaderAttrs )
{
-#ifndef SVX_LIGHT
-
if ( aSel.HasRange() )
aSel = ImpDeleteSelection( aSel );
@@ -212,9 +201,6 @@ EditPaM ImpEditEngine::ReadHTML( SvStream& rInput, const String& rBaseURL, EditS
return aSel.Min();
}
return xPrsr->GetCurSelection().Max();
-#else
- return EditPaM();
-#endif
}
EditPaM ImpEditEngine::ReadBin( SvStream& rInput, EditSelection aSel )
@@ -230,7 +216,6 @@ EditPaM ImpEditEngine::ReadBin( SvStream& rInput, EditSelection aSel )
return aLastPaM;
}
-#ifndef SVX_LIGHT
void ImpEditEngine::Write( SvStream& rOutput, EETextFormat eFormat, EditSelection aSel )
{
if ( !rOutput.IsWritable() )
@@ -254,7 +239,6 @@ void ImpEditEngine::Write( SvStream& rOutput, EETextFormat eFormat, EditSelectio
}
}
}
-#endif
sal_uInt32 ImpEditEngine::WriteText( SvStream& rOutput, EditSelection aSel )
{
@@ -332,7 +316,6 @@ sal_uInt32 ImpEditEngine::WriteBin( SvStream& rOutput, EditSelection aSel, sal_B
return 0;
}
-#ifndef SVX_LIGHT
sal_uInt32 ImpEditEngine::WriteXML( SvStream& rOutput, EditSelection aSel )
{
ESelection aESel = CreateESel( aSel );
@@ -341,7 +324,6 @@ sal_uInt32 ImpEditEngine::WriteXML( SvStream& rOutput, EditSelection aSel )
return 0;
}
-#endif
static sal_uInt16 getStylePos( const SfxStyles& rStyles, SfxStyleSheet* pSheet )
{
@@ -358,7 +340,6 @@ static sal_uInt16 getStylePos( const SfxStyles& rStyles, SfxStyleSheet* pSheet )
sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
{
-#ifndef SVX_LIGHT
DBG_ASSERT( GetUpdateMode(), "WriteRTF for UpdateMode = sal_False!" );
CheckIdleFormatter();
if ( !IsFormatted() )
@@ -720,9 +701,6 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
#endif
return rOutput.GetError();
-#else
- return 0;
-#endif
}
@@ -1129,11 +1107,9 @@ EditTextObject* ImpEditEngine::CreateBinTextObject( EditSelection aSel, SfxItemP
pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
}
-#ifndef SVX_LIGHT
// If possible online spelling
if ( bAllowBigObjects && bOnlyFullParagraphs && pNode->GetWrongList() )
pC->SetWrongList( pNode->GetWrongList()->Clone() );
-#endif // !SVX_LIGHT
}
@@ -1200,9 +1176,7 @@ void ImpEditEngine::SetText( const EditTextObject& rTextObject )
InsertText( rTextObject, EditSelection( aPaM, aPaM ) );
SetVertical( rTextObject.IsVertical() );
-#ifndef SVX_LIGHT
DBG_ASSERT( !HasUndoManager() || !GetUndoManager().GetUndoActionCount(), "From where comes the Undo in SetText ?!" );
-#endif
SetUpdateMode( _bUpdate );
EnableUndo( _bUndo );
}
@@ -1386,13 +1360,11 @@ EditSelection ImpEditEngine::InsertBinTextObject( BinTextObject& rTextObject, Ed
aPaM.GetNode()->CreateDefFont();
}
-#ifndef SVX_LIGHT
if ( bNewContent && GetStatus().DoOnlineSpelling() && pC->GetWrongList() )
{
aPaM.GetNode()->DestroyWrongList(); // otherwise MLK, if list exists...
aPaM.GetNode()->SetWrongList( pC->GetWrongList()->Clone() );
}
-#endif // !SVX_LIGHT
// Wrap when followed by other ...
if ( n < ( nContents-1) )
@@ -1431,10 +1403,8 @@ LanguageType ImpEditEngine::GetLanguage( const EditPaM& rPaM, sal_uInt16* pEndPo
Reference< XSpellChecker1 > ImpEditEngine::GetSpeller()
{
-#ifndef SVX_LIGHT
if ( !xSpeller.is() )
xSpeller = SvxGetSpellChecker();
-#endif
return xSpeller;
}
@@ -1459,10 +1429,6 @@ SpellInfo * ImpEditEngine::CreateSpellInfo( const EditSelection &rSel, bool bMul
EESpellState ImpEditEngine::Spell( EditView* pEditView, sal_Bool bMultipleDoc )
{
-#ifdef SVX_LIGHT
- return EE_SPELL_NOSPELLER;
-#else
-
DBG_ASSERTWARNING( xSpeller.is(), "No Spell checker set!" );
if ( !xSpeller.is() )
@@ -1504,15 +1470,11 @@ EESpellState ImpEditEngine::Spell( EditView* pEditView, sal_Bool bMultipleDoc )
delete pSpellInfo;
pSpellInfo = 0;
return eState;
-#endif
}
sal_Bool ImpEditEngine::HasConvertibleTextPortion( LanguageType nSrcLang )
{
-#ifdef SVX_LIGHT
- return sal_False;
-#else
sal_Bool bHasConvTxt = sal_False;
sal_uInt16 nParas = pEditEngine->GetParagraphCount();
@@ -1542,7 +1504,6 @@ sal_Bool ImpEditEngine::HasConvertibleTextPortion( LanguageType nSrcLang )
}
}
-#endif
return bHasConvTxt;
}
@@ -1553,9 +1514,6 @@ void ImpEditEngine::Convert( EditView* pEditView,
{
// modified version of ImpEditEngine::Spell
-#ifdef SVX_LIGHT
-#else
-
// In MultipleDoc always from the front / rear ...
if ( bMultipleDoc )
pEditView->pImpEditView->SetEditSelection( aEditDoc.GetStartPaM() );
@@ -1635,7 +1593,6 @@ void ImpEditEngine::Convert( EditView* pEditView,
}
delete pConvInfo;
pConvInfo = 0;
-#endif
}
@@ -1684,11 +1641,6 @@ void ImpEditEngine::ImpConvert( rtl::OUString &rConvTxt, LanguageType &rConvTxtL
String aRes;
LanguageType nResLang = LANGUAGE_NONE;
-#ifdef SVX_LIGHT
- rConvTxt = rtl::OUString();
- rConvTxtLang = LANGUAGE_NONE;
-#else
-
/* ContentNode* pLastNode = */ aEditDoc.SaveGetObject( aEditDoc.Count()-1 );
EditPaM aPos( CreateEditPaM( pConvInfo->aConvContinue ) );
@@ -1844,16 +1796,11 @@ void ImpEditEngine::ImpConvert( rtl::OUString &rConvTxt, LanguageType &rConvTxtL
rConvTxt = aRes;
if (rConvTxt.getLength())
rConvTxtLang = nResLang;
-#endif
}
Reference< XSpellAlternatives > ImpEditEngine::ImpSpell( EditView* pEditView )
{
-#ifdef SVX_LIGHT
- return Reference< XSpellAlternatives >();
-#else
-
DBG_ASSERT( xSpeller.is(), "No spell checker set!" );
ContentNode* pLastNode = aEditDoc.SaveGetObject( (aEditDoc.Count()-1) );
@@ -1916,7 +1863,6 @@ Reference< XSpellAlternatives > ImpEditEngine::ImpSpell( EditView* pEditView )
pEditView->pImpEditView->DrawSelection();
pEditView->ShowCursor( sal_True, sal_False );
return xSpellAlt;
-#endif
}
void ImpEditEngine::EndSpelling()
@@ -1982,8 +1928,6 @@ bool ImpEditEngine::SpellSentence(EditView& rEditView,
::svx::SpellPortions& rToFill,
bool /*bIsGrammarChecking*/ )
{
-#ifdef SVX_LIGHT
-#else
bool bRet = false;
EditSelection aCurSel( rEditView.pImpEditView->GetEditSelection() );
if(!pSpellInfo)
@@ -2037,7 +1981,6 @@ bool ImpEditEngine::SpellSentence(EditView& rEditView,
//set the selection to the end of the current sentence
rEditView.pImpEditView->SetEditSelection(aSentencePaM.Max());
}
-#endif
return bRet;
}
@@ -2048,8 +1991,6 @@ void ImpEditEngine::AddPortion(
::svx::SpellPortions& rToFill,
bool bIsField)
{
-#ifdef SVX_LIGHT
-#else
if(rSel.HasRange())
{
svx::SpellPortion aPortion;
@@ -2064,7 +2005,6 @@ void ImpEditEngine::AddPortion(
pSpellInfo->aLastSpellContentSelections.push_back(rSel);
}
-#endif
}
// Adds one or more portions of text to the SpellPortions depending on language changes
@@ -2074,8 +2014,6 @@ void ImpEditEngine::AddPortionIterated(
Reference< XSpellAlternatives > xAlt,
::svx::SpellPortions& rToFill)
{
-#ifdef SVX_LIGHT
-#else
if(rSel.Min() != rSel.Max())
{
if(xAlt.is())
@@ -2137,15 +2075,12 @@ void ImpEditEngine::AddPortionIterated(
AddPortion(aSelection, xAlt, rToFill, bIsField);
}
}
-#endif
}
void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
const ::svx::SpellPortions& rNewPortions,
bool bRecheck )
{
-#ifdef SVX_LIGHT
-#else
// Note: rNewPortions.size() == 0 is valid and happens when the whole
// sentence got removed in the dialog
@@ -2266,25 +2201,19 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
FormatAndUpdate();
aEditDoc.SetModified(sal_True);
}
-#endif
}
void ImpEditEngine::PutSpellingToSentenceStart( EditView& rEditView )
{
-#ifdef SVX_LIGHT
-#else
if( pSpellInfo && pSpellInfo->aLastSpellContentSelections.size() )
{
rEditView.pImpEditView->SetEditSelection( pSpellInfo->aLastSpellContentSelections.begin()->Min() );
}
-
-#endif
}
void ImpEditEngine::DoOnlineSpelling( ContentNode* pThisNodeOnly, sal_Bool bSpellAtCursorPos, sal_Bool bInteruptable )
{
-#ifndef SVX_LIGHT
/*
It will iterate over all the paragraphs, paragraphs with only
invalidated wrong list will be checked ...
@@ -2484,7 +2413,6 @@ void ImpEditEngine::DoOnlineSpelling( ContentNode* pThisNodeOnly, sal_Bool bSpel
}
if ( bRestartTimer )
aOnlineSpellTimer.Start();
-#endif // !SVX_LIGHT
}
@@ -2492,7 +2420,6 @@ EESpellState ImpEditEngine::HasSpellErrors()
{
DBG_ASSERT( xSpeller.is(), "No spell checker set!" );
-#ifndef SVX_LIGHT
ContentNode* pLastNode = aEditDoc.SaveGetObject( aEditDoc.Count() - 1 );
EditSelection aCurSel( aEditDoc.GetStartPaM() );
@@ -2517,14 +2444,12 @@ EESpellState ImpEditEngine::HasSpellErrors()
}
aCurSel = WordRight( aCurSel.Max(), ::com::sun::star::i18n::WordType::DICTIONARY_WORD );
}
-#endif
return EE_SPELL_ERRORFOUND;
}
EESpellState ImpEditEngine::StartThesaurus( EditView* pEditView )
{
-#ifndef SVX_LIGHT
EditSelection aCurSel( pEditView->pImpEditView->GetEditSelection() );
if ( !aCurSel.HasRange() )
aCurSel = SelectWord( aCurSel, ::com::sun::star::i18n::WordType::DICTIONARY_WORD );
@@ -2548,16 +2473,12 @@ EESpellState ImpEditEngine::StartThesaurus( EditView* pEditView )
delete pDlg;
return EE_SPELL_OK;
-#else
- return EE_SPELL_NOSPELLER;
-#endif
}
sal_uInt16 ImpEditEngine::StartSearchAndReplace( EditView* pEditView, const SvxSearchItem& rSearchItem )
{
sal_uInt16 nFound = 0;
-#ifndef SVX_LIGHT
EditSelection aCurSel( pEditView->pImpEditView->GetEditSelection() );
// FIND_ALL is not possible without multiple selection.
@@ -2615,7 +2536,6 @@ sal_uInt16 ImpEditEngine::StartSearchAndReplace( EditView* pEditView, const SvxS
pEditView->ShowCursor( sal_True, sal_False );
}
}
-#endif // !SVX_LIGHT
return nFound;
}
@@ -2654,7 +2574,6 @@ sal_Bool ImpEditEngine::Search( const SvxSearchItem& rSearchItem, EditView* pEdi
sal_Bool ImpEditEngine::ImpSearch( const SvxSearchItem& rSearchItem,
const EditSelection& rSearchSelection, const EditPaM& rStartPos, EditSelection& rFoundSel )
{
-#ifndef SVX_LIGHT
util::SearchOptions aSearchOptions( rSearchItem.GetSearchOptions() );
aSearchOptions.Locale = GetLocale( rStartPos );
@@ -2721,13 +2640,11 @@ sal_Bool ImpEditEngine::ImpSearch( const SvxSearchItem& rSearchItem,
return sal_True;
}
}
-#endif // !SVX_LIGHT
return sal_False;
}
sal_Bool ImpEditEngine::HasText( const SvxSearchItem& rSearchItem )
{
-#ifndef SVX_LIGHT
SvxSearchItem aTmpItem( rSearchItem );
aTmpItem.SetBackward( sal_False );
aTmpItem.SetSelection( sal_False );
@@ -2736,18 +2653,13 @@ sal_Bool ImpEditEngine::HasText( const SvxSearchItem& rSearchItem )
EditSelection aDummySel( aStartPaM );
EditSelection aFoundSel;
return ImpSearch( aTmpItem, aDummySel, aStartPaM, aFoundSel );
-#else
- return sal_False;
-#endif
}
void ImpEditEngine::SetAutoCompleteText( const String& rStr, sal_Bool bClearTipWindow )
{
-#ifndef SVX_LIGHT
aAutoCompleteText = rStr;
if ( bClearTipWindow && pActiveView )
Help::ShowQuickHelp( pActiveView->GetWindow(), Rectangle(), String(), 0 );
-#endif // !SVX_LIGHT
}
@@ -3005,7 +2917,6 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
if (aChanges.size() > 0)
{
-#ifndef SVX_LIGHT
// Create a single UndoAction on Demand for all the changes ...
if ( !pUndo && IsUndoEnabled() && !IsInUndo() )
{
@@ -3032,7 +2943,6 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
else
pUndo->SetText( CreateBinTextObject( aSel, NULL ) );
}
-#endif
// now apply the changes from end to start to leave the offsets of the
// yet unchanged text parts remain the same.
@@ -3061,14 +2971,12 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
}
}
-#ifndef SVX_LIGHT
if ( pUndo )
{
ESelection aESel( CreateESel( aNewSel ) );
pUndo->SetNewSelection( aESel );
InsertUndo( pUndo );
}
-#endif
if ( bChanges )
{
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index df9ec282f467..b6f0cd2ee601 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -325,7 +325,6 @@ SfxItemPresentation SvxSizeItem::GetPresentation
XubString& rText, const IntlWrapper *pIntl
) const
{
-#ifndef SVX_LIGHT
switch ( ePres )
{
case SFX_ITEM_PRESENTATION_NONE:
@@ -351,7 +350,6 @@ SfxItemPresentation SvxSizeItem::GetPresentation
default: ;//prevent warning
}
-#endif // !SVX_LIGHT
return SFX_ITEM_PRESENTATION_NONE;
}
@@ -578,7 +576,6 @@ SfxItemPresentation SvxLRSpaceItem::GetPresentation
XubString& rText, const IntlWrapper* pIntl
) const
{
-#ifndef SVX_LIGHT
switch ( ePres )
{
case SFX_ITEM_PRESENTATION_NONE:
@@ -644,7 +641,6 @@ SfxItemPresentation SvxLRSpaceItem::GetPresentation
}
default: ;//prevent warning
}
-#endif // !SVX_LIGHT
return SFX_ITEM_PRESENTATION_NONE;
}
@@ -935,7 +931,6 @@ SfxItemPresentation SvxULSpaceItem::GetPresentation
XubString& rText, const IntlWrapper *pIntl
) const
{
-#ifndef SVX_LIGHT
switch ( ePres )
{
case SFX_ITEM_PRESENTATION_NONE:
@@ -977,7 +972,6 @@ SfxItemPresentation SvxULSpaceItem::GetPresentation
}
default: ;//prevent warning
}
-#endif
return SFX_ITEM_PRESENTATION_NONE;
}
@@ -1074,7 +1068,6 @@ SfxItemPresentation SvxPrintItem::GetPresentation
XubString& rText, const IntlWrapper *
) const
{
-#ifndef SVX_LIGHT
switch ( ePres )
{
case SFX_ITEM_PRESENTATION_NONE:
@@ -1093,7 +1086,6 @@ SfxItemPresentation SvxPrintItem::GetPresentation
}
default: ;//prevent warning
}
-#endif // !SVX_LIGHT
return SFX_ITEM_PRESENTATION_NONE;
}
@@ -1131,7 +1123,6 @@ SfxItemPresentation SvxOpaqueItem::GetPresentation
XubString& rText, const IntlWrapper *
) const
{
-#ifndef SVX_LIGHT
switch ( ePres )
{
case SFX_ITEM_PRESENTATION_NONE:
@@ -1150,7 +1141,6 @@ SfxItemPresentation SvxOpaqueItem::GetPresentation
}
default: ;//prevent warning
}
-#endif // !SVX_LIGHT
return SFX_ITEM_PRESENTATION_NONE;
}
@@ -1216,7 +1206,6 @@ SfxItemPresentation SvxProtectItem::GetPresentation
XubString& rText, const IntlWrapper *
) const
{
-#ifndef SVX_LIGHT
switch ( ePres )
{
case SFX_ITEM_PRESENTATION_NONE:
@@ -1247,7 +1236,6 @@ SfxItemPresentation SvxProtectItem::GetPresentation
}
default: ;//prevent warning
}
-#endif // !SVX_LIGHT
return SFX_ITEM_PRESENTATION_NONE;
}
@@ -1441,7 +1429,6 @@ SfxItemPresentation SvxShadowItem::GetPresentation
XubString& rText, const IntlWrapper *pIntl
) const
{
-#ifndef SVX_LIGHT
switch ( ePres )
{
case SFX_ITEM_PRESENTATION_NONE:
@@ -1482,7 +1469,6 @@ SfxItemPresentation SvxShadowItem::GetPresentation
}
default: ;//prevent warning
}
-#endif
return SFX_ITEM_PRESENTATION_NONE;
}
@@ -1618,7 +1604,6 @@ XubString SvxBorderLine::GetValueString( SfxMapUnit eSrcUnit,
const IntlWrapper* pIntl,
sal_Bool bMetricStr) const
{
-#ifndef SVX_LIGHT
sal_uInt16 nResId = 0;
if ( 0 == nDistance )
@@ -1698,9 +1683,6 @@ XubString SvxBorderLine::GetValueString( SfxMapUnit eSrcUnit,
}
aStr += sal_Unicode(')');
return aStr;
-#else
- return UniString();
-#endif
}
bool SvxBorderLine::HasPriority( const SvxBorderLine& rOtherLine ) const
@@ -2151,7 +2133,6 @@ SfxItemPresentation SvxBoxItem::GetPresentation
XubString& rText, const IntlWrapper *pIntl
) const
{
-#ifndef SVX_LIGHT
switch ( ePres )
{
case SFX_ITEM_PRESENTATION_NONE:
@@ -2280,7 +2261,6 @@ SfxItemPresentation SvxBoxItem::GetPresentation
}
default: ;//prevent warning
}
-#endif // !SVX_LIGHT
return SFX_ITEM_PRESENTATION_NONE;
}
@@ -3002,7 +2982,6 @@ SfxItemPresentation SvxFmtBreakItem::GetPresentation
XubString& rText, const IntlWrapper *
) const
{
-#ifndef SVX_LIGHT
switch ( ePres )
{
case SFX_ITEM_PRESENTATION_NONE:
@@ -3015,7 +2994,6 @@ SfxItemPresentation SvxFmtBreakItem::GetPresentation
return ePres;
default: ;//prevent warning
}
-#endif // !SVX_LIGHT
return SFX_ITEM_PRESENTATION_NONE;
}
@@ -3156,7 +3134,6 @@ SfxItemPresentation SvxFmtKeepItem::GetPresentation
XubString& rText, const IntlWrapper *
) const
{
-#ifndef SVX_LIGHT
switch ( ePres )
{
case SFX_ITEM_PRESENTATION_NONE:
@@ -3175,7 +3152,6 @@ SfxItemPresentation SvxFmtKeepItem::GetPresentation
}
default: ;//prevent warning
}
-#endif
return SFX_ITEM_PRESENTATION_NONE;
}
@@ -3310,7 +3286,6 @@ SfxItemPresentation SvxLineItem::GetPresentation
XubString& rText, const IntlWrapper *pIntl
) const
{
-#ifndef SVX_LIGHT
rText.Erase();
switch ( ePres )
@@ -3327,7 +3302,6 @@ SfxItemPresentation SvxLineItem::GetPresentation
}
default: ;//prevent warning
}
-#endif
return SFX_ITEM_PRESENTATION_NONE;
}
diff --git a/editeng/source/items/itemtype.cxx b/editeng/source/items/itemtype.cxx
index 0d169e4b0b00..ea8808ce7517 100755
--- a/editeng/source/items/itemtype.cxx
+++ b/editeng/source/items/itemtype.cxx
@@ -146,8 +146,6 @@ XubString GetSvxString( sal_uInt16 nId )
return EE_RESSTR( nId );
}
-#ifndef SVX_LIGHT
-
// -----------------------------------------------------------------------
XubString GetColorString( const Color& rCol )
@@ -187,8 +185,6 @@ XubString GetColorString( const Color& rCol )
return sStr;
}
-#endif
-
// -----------------------------------------------------------------------
sal_uInt16 GetMetricId( SfxMapUnit eUnit )
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx
index 7e1bfa4843fb..b35c9657098f 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -1149,7 +1149,6 @@ SfxItemPresentation SvxTabStopItem::GetPresentation
if ( ePres > SFX_ITEM_PRESENTATION_NONE )
{
-#ifndef SVX_LIGHT
sal_Bool bComma = sal_False;
for ( sal_uInt16 i = 0; i < Count(); ++i )
@@ -1165,7 +1164,6 @@ SfxItemPresentation SvxTabStopItem::GetPresentation
bComma = sal_True;
}
}
-#endif
}
return ePres;
}
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 6e22a05110aa..ac2e0fd530d3 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -1061,7 +1061,6 @@ SfxItemPresentation SvxFontHeightItem::GetPresentation
XubString& rText, const IntlWrapper *pIntl
) const
{
-#ifndef SVX_LIGHT
switch ( ePres )
{
case SFX_ITEM_PRESENTATION_NONE:
@@ -1089,7 +1088,6 @@ SfxItemPresentation SvxFontHeightItem::GetPresentation
}
default: ; //prevent warning
}
-#endif
return SFX_ITEM_PRESENTATION_NONE;
}
@@ -1122,12 +1120,10 @@ void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, const sal_uInt16 nNewP
{
DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
-#ifndef SVX_LIGHT
if( SFX_MAPUNIT_RELATIVE != eUnit )
nHeight = nNewHeight + ::ItemToControl( (short)nNewProp, eUnit,
SFX_FUNIT_TWIP );
else
-#endif // !SVX_LIGHT
if( 100 != nNewProp )
nHeight = sal_uInt32(( nNewHeight * nNewProp ) / 100 );
else
@@ -1142,14 +1138,12 @@ void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, sal_uInt16 nNewProp,
{
DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
-#ifndef SVX_LIGHT
if( SFX_MAPUNIT_RELATIVE != eMetric )
nHeight = nNewHeight +
::ControlToItem( ::ItemToControl((short)nNewProp, eMetric,
SFX_FUNIT_TWIP ), SFX_FUNIT_TWIP,
eCoreMetric );
else
-#endif // !SVX_LIGHT
if( 100 != nNewProp )
nHeight = sal_uInt32(( nNewHeight * nNewProp ) / 100 );
else
@@ -1268,7 +1262,6 @@ SfxItemPresentation SvxFontWidthItem::GetPresentation
XubString& rText, const IntlWrapper *pIntl
) const
{
-#ifndef SVX_LIGHT
switch ( ePres )
{
case SFX_ITEM_PRESENTATION_NONE:
@@ -1289,7 +1282,6 @@ SfxItemPresentation SvxFontWidthItem::GetPresentation
}
default: ; //prevent warning
}
-#endif
return SFX_ITEM_PRESENTATION_NONE;
}
@@ -1364,7 +1356,6 @@ SfxItemPresentation SvxTextLineItem::GetPresentation
XubString& rText, const IntlWrapper * /*pIntl*/
) const
{
-#ifndef SVX_LIGHT
switch ( ePres )
{
case SFX_ITEM_PRESENTATION_NONE:
@@ -1378,7 +1369,6 @@ SfxItemPresentation SvxTextLineItem::GetPresentation
return ePres;
default: ; //prevent warning
}
-#endif
return SFX_ITEM_PRESENTATION_NONE;
}
@@ -2055,7 +2045,6 @@ SfxItemPresentation SvxColorItem::GetPresentation
XubString& rText, const IntlWrapper * /*pIntl*/
) const
{
-#ifndef SVX_LIGHT
switch ( ePres )
{
case SFX_ITEM_PRESENTATION_NONE:
@@ -2067,7 +2056,6 @@ SfxItemPresentation SvxColorItem::GetPresentation
return ePres;
default: ; //prevent warning
}
-#endif
return SFX_ITEM_PRESENTATION_NONE;
}
@@ -2195,7 +2183,6 @@ SfxItemPresentation SvxKerningItem::GetPresentation
XubString& rText, const IntlWrapper *pIntl
) const
{
-#ifndef SVX_LIGHT
switch ( ePres )
{
case SFX_ITEM_PRESENTATION_NONE:
@@ -2223,7 +2210,6 @@ SfxItemPresentation SvxKerningItem::GetPresentation
}
default: ; //prevent warning
}
-#endif
return SFX_ITEM_PRESENTATION_NONE;
}
@@ -2608,7 +2594,6 @@ SfxItemPresentation SvxLanguageItem::GetPresentation
XubString& rText, const IntlWrapper * /*pIntl*/
) const
{
-#ifndef SVX_LIGHT
switch ( ePres )
{
case SFX_ITEM_PRESENTATION_NONE:
@@ -2623,7 +2608,6 @@ SfxItemPresentation SvxLanguageItem::GetPresentation
}
default: ; //prevent warning
}
-#endif // !SVX_LIGHT
return SFX_ITEM_PRESENTATION_NONE;
}
@@ -3390,7 +3374,7 @@ bool SvxCharScaleWidthItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberI
return true;
}
- DBG_ERROR( "SvxCharScaleWidthItem::PutValue - Wrong type!" );
+ OSL_TRACE( "SvxCharScaleWidthItem::PutValue - Wrong type!" );
return false;
}
diff --git a/editeng/source/misc/txtrange.cxx b/editeng/source/misc/txtrange.cxx
index d5cff87239c5..fae50995f2f4 100644
--- a/editeng/source/misc/txtrange.cxx
+++ b/editeng/source/misc/txtrange.cxx
@@ -38,12 +38,12 @@
#include <vector>
-TextRanger::TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon,
- sal_uInt16 nCacheSz, sal_uInt16 nLft, sal_uInt16 nRght, sal_Bool bSimpl, sal_Bool bInnr,
- sal_Bool bVert ) :
+TextRanger::TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon,
+ const basegfx::B2DPolyPolygon* pLinePolyPolygon,
+ sal_uInt16 nCacheSz, sal_uInt16 nLft, sal_uInt16 nRght,
+ sal_Bool bSimpl, sal_Bool bInnr, sal_Bool bVert ) :
pBound( NULL ),
nCacheSize( nCacheSz ),
- nCacheIdx( 0 ),
nRight( nRght ),
nLeft( nLft ),
nUpper( 0 ),
@@ -56,10 +56,6 @@ TextRanger::TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, const baseg
#ifdef DBG_UTIL
bFlag3 = bFlag4 = bFlag5 = bFlag6 = bFlag7 = sal_False;
#endif
- pRangeArr = new Range[ nCacheSize ];
- pCache = new SvLongsPtr[ nCacheSize ];
- memset( pRangeArr, 0, nCacheSize * sizeof( Range ) );
- memset( pCache, 0, nCacheSize * sizeof( SvLongsPtr ) );
sal_uInt32 nCount(rPolyPolygon.count());
mpPolyPolygon = new PolyPolygon( (sal_uInt16)nCount );
@@ -89,10 +85,7 @@ TextRanger::TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, const baseg
TextRanger::~TextRanger()
{
- for( sal_uInt16 i = 0; i < nCacheSize; ++i )
- delete pCache[i];
- delete[] pCache;
- delete[] pRangeArr;
+ mRangeCache.clear();
delete mpPolyPolygon;
delete mpLinePolyPolygon;
}
@@ -106,17 +99,16 @@ void TextRanger::SetVertical( sal_Bool bNew )
if( IsVertical() != bNew )
{
bVertical = bNew;
- for( sal_uInt16 i = 0; i < nCacheSize; ++i )
- delete pCache[i];
- memset( pRangeArr, 0, nCacheSize * sizeof( Range ) );
- memset( pCache, 0, nCacheSize * sizeof( SvLongsPtr ) );
+ mRangeCache.clear();
}
}
+//! SvxBoundArgs is used to perform temporary calculations on a range array.
+//! Temporary instances are created in TextRanger::GetTextRanges()
class SvxBoundArgs
{
std::vector<bool> aBoolArr;
- SvLongs *pLongArr;
+ LongDqPtr pLongArr;
TextRanger *pTextRanger;
long nMin;
long nMax;
@@ -149,7 +141,7 @@ class SvxBoundArgs
inline long A( const Point& rP ) const { return bRotate ? rP.Y() : rP.X(); }
inline long B( const Point& rP ) const { return bRotate ? rP.X() : rP.Y(); }
public:
- SvxBoundArgs( TextRanger* pRanger, SvLongs *pLong, const Range& rRange );
+ SvxBoundArgs( TextRanger* pRanger, LongDqPtr pLong, const Range& rRange );
void NotePoint( const long nA ) { NoteMargin( nA - nStart, nA + nEnd ); }
void NoteMargin( const long nL, const long nR )
{ if( nMin > nL ) nMin = nL; if( nMax < nR ) nMax = nR; }
@@ -166,7 +158,7 @@ public:
sal_uInt8 GetAct() const { return nAct; }
};
-SvxBoundArgs::SvxBoundArgs( TextRanger* pRanger, SvLongs *pLong,
+SvxBoundArgs::SvxBoundArgs( TextRanger* pRanger, LongDqPtr pLong,
const Range& rRange )
: pLongArr( pLong ), pTextRanger( pRanger ),
nTop( rRange.Min() ), nBottom( rRange.Max() ),
@@ -189,7 +181,7 @@ SvxBoundArgs::SvxBoundArgs( TextRanger* pRanger, SvLongs *pLong,
}
nUpper = nTop - nUpDiff;
nLower = nBottom + nLowDiff;
- pLongArr->Remove( 0, pLongArr->Count() );
+ pLongArr->clear();
}
long SvxBoundArgs::CalcMax( const Point& rPt1, const Point& rPt2,
@@ -262,7 +254,7 @@ void SvxBoundArgs::NoteRange( sal_Bool bToggle )
if( !bClosed )
bToggle = sal_False;
sal_uInt16 nIdx = 0;
- sal_uInt16 nCount = pLongArr->Count();
+ sal_uInt16 nCount = pLongArr->size();
DBG_ASSERT( nCount == 2 * aBoolArr.size(), "NoteRange: Incompatible Sizes" );
while( nIdx < nCount && (*pLongArr)[ nIdx ] < nMin )
++nIdx;
@@ -270,9 +262,9 @@ void SvxBoundArgs::NoteRange( sal_Bool bToggle )
// No overlap with existing intervals?
if( nIdx == nCount || ( !bOdd && nMax < (*pLongArr)[ nIdx ] ) )
{ // Then a new one is inserted ...
- pLongArr->Insert( nMin, nIdx );
- pLongArr->Insert( nMax, nIdx + 1 );
- aBoolArr.insert( aBoolArr.begin() + nIdx / 2, bToggle );
+ pLongArr->insert( pLongArr->begin() + nIdx, nMin );
+ pLongArr->insert( pLongArr->begin() + nIdx + 1, nMax );
+ aBoolArr.insert( aBoolArr.begin() + (nIdx/2), bToggle );
}
else
{ // expand an existing interval ...
@@ -297,7 +289,7 @@ void SvxBoundArgs::NoteRange( sal_Bool bToggle )
nMaxIdx = nIdx / 2; // From here on is nMaxIdx the Index in BoolArray.
if( nDiff )
{
- (*pLongArr).Remove( nIdx + 1, nDiff );
+ pLongArr->erase( pLongArr->begin() + nIdx + 1, pLongArr->begin() + nIdx + 1 + nDiff );
nDiff /= 2;
sal_uInt16 nStop = nMaxIdx + nDiff;
for( sal_uInt16 i = nMaxIdx; i < nStop; ++i )
@@ -419,7 +411,7 @@ void SvxBoundArgs::Calc( const PolyPolygon& rPoly )
}
if( !bMultiple )
{
- DBG_ASSERT( pLongArr->Count() == 0, "I said: Simple!" );
+ DBG_ASSERT( pLongArr->size() == 0, "I said: Simple!" );
if( nAct )
{
if( bInner )
@@ -430,15 +422,15 @@ void SvxBoundArgs::Calc( const PolyPolygon& rPoly )
nTmpMax = nMax - 2 * nEnd;
if( nTmpMin <= nTmpMax )
{
- pLongArr->Insert( nTmpMin, 0 );
- pLongArr->Insert( nTmpMax, 1 );
+ pLongArr->push_front(nTmpMax);
+ pLongArr->push_front(nTmpMin);
}
}
}
else
{
- pLongArr->Insert( nMin, 0 );
- pLongArr->Insert( nMax, 1 );
+ pLongArr->push_front(nMax);
+ pLongArr->push_front(nMin);
}
}
}
@@ -463,7 +455,7 @@ void SvxBoundArgs::Add()
while( nBoolIdx < nCount && !aBoolArr[ nBoolIdx++ ] &&
(!bInner || nBoolIdx < nCount ) )
next += 2;
- pLongArr->Remove( nLongIdx, next );
+ pLongArr->erase( pLongArr->begin() + nLongIdx, pLongArr->begin() + nLongIdx + next );
next /= 2;
nBoolIdx = nBoolIdx - next;
nCount = nCount - next;
@@ -478,23 +470,23 @@ void SvxBoundArgs::Add()
bDelete = nBoolIdx < nCount && aBoolArr[ nBoolIdx ];
nLongIdx += 2;
DBG_ASSERT( nLongIdx == 2*nBoolIdx+1, "BoundArgs: Array-Idx Confusion" );
- DBG_ASSERT( aBoolArr.size()*2 == pLongArr->Count(),
+ DBG_ASSERT( aBoolArr.size()*2 == pLongArr->size(),
"BoundArgs: Array-Count: Confusion" );
}
}
- if( 0 != ( nCount = pLongArr->Count() ) )
+ if( 0 != ( nCount = pLongArr->size() ) )
{
if( bInner )
{
- pLongArr->Remove( 0, 1 );
- pLongArr->Remove( pLongArr->Count() - 1, 1 );
+ pLongArr->pop_front();
+ pLongArr->pop_back();
// Here the line is held inside a large rectangle for "simple"
// contour wrap. Currently (April 1999) the EditEngine evaluates
// only the first rectangle. If it one day is able to output a line
// in several parts, it may be advisable to delete the following lines.
- if( pTextRanger->IsSimple() && pLongArr->Count() > 2 )
- pLongArr->Remove( 1, pLongArr->Count() - 2 );
+ if( pTextRanger->IsSimple() && pLongArr->size() > 2 )
+ pLongArr->erase( pLongArr->begin() + 1, pLongArr->end() - 1 );
}
}
@@ -504,22 +496,22 @@ void SvxBoundArgs::Concat( const PolyPolygon* pPoly )
{
SetConcat( sal_True );
DBG_ASSERT( pPoly, "Nothing to do?" );
- SvLongs *pOld = pLongArr;
- pLongArr = new SvLongs( 2, 8 );
+ LongDqPtr pOld = pLongArr;
+ pLongArr = new std::deque<long>();
aBoolArr.clear();
bInner = sal_False;
- Calc( *pPoly );
- sal_uInt16 nCount = pLongArr->Count();
+ Calc( *pPoly ); // Note that this updates pLongArr, which is why we swapped it out earlier.
+ sal_uInt16 nCount = pLongArr->size();
sal_uInt16 nIdx = 0;
sal_uInt16 i = 0;
sal_Bool bSubtract = pTextRanger->IsInner();
while( i < nCount )
{
- sal_uInt16 nOldCount = pOld->Count();
+ sal_uLong nOldCount = pOld->size();
if( nIdx == nOldCount )
{ // Reached the end of the old Array...
if( !bSubtract )
- pOld->Insert( pLongArr, nIdx, i, USHRT_MAX );
+ pOld->insert( pOld->begin() + nIdx, pLongArr->begin() + i, pLongArr->end() );
break;
}
long nLeft = (*pLongArr)[ i++ ];
@@ -530,7 +522,7 @@ void SvxBoundArgs::Concat( const PolyPolygon* pPoly )
if( nLeftPos >= nOldCount )
{ // The current interval belongs to the end of the old array ...
if( !bSubtract )
- pOld->Insert( pLongArr, nOldCount, i - 2, USHRT_MAX );
+ pOld->insert( pOld->begin() + nOldCount, pLongArr->begin() + i - 2, pLongArr->end() );
break;
}
sal_uInt16 nRightPos = nLeftPos - 1;
@@ -539,7 +531,7 @@ void SvxBoundArgs::Concat( const PolyPolygon* pPoly )
if( nRightPos < nLeftPos )
{ // The current interval belongs between two old intervals
if( !bSubtract )
- pOld->Insert( pLongArr, nRightPos, i - 2, i );
+ pOld->insert( pOld->begin() + nRightPos, pLongArr->begin() + i - 2, pLongArr->begin() + i );
nIdx = nRightPos + 2;
}
else if( bSubtract ) // Subtract, if necessary separate
@@ -549,16 +541,16 @@ void SvxBoundArgs::Concat( const PolyPolygon* pPoly )
{ // Now we split the left part...
if( nLeft - 1 > nOld )
{
- pOld->Insert( nOld, nLeftPos - 1 );
- pOld->Insert( nLeft - 1, nLeftPos );
+ pOld->insert( pOld->begin() + nLeftPos - 1, nOld );
+ pOld->insert( pOld->begin() + nLeftPos, nLeft - 1 );
nLeftPos += 2;
nRightPos += 2;
}
}
if( nRightPos - nLeftPos > 1 )
- pOld->Remove( nLeftPos, nRightPos - nLeftPos - 1 );
+ pOld->erase( pOld->begin() + nLeftPos, pOld->begin() + nRightPos - 1 );
if( ++nRight >= ( nOld = (*pOld)[ nLeftPos ] ) )
- pOld->Remove( nLeftPos - 1, 2 );
+ pOld->erase( pOld->begin() + nLeftPos - 1, pOld->begin() + nLeftPos + 1 );
else
(*pOld)[ nLeftPos - 1 ] = nRight;
}
@@ -569,7 +561,7 @@ void SvxBoundArgs::Concat( const PolyPolygon* pPoly )
if( nRight > (*pOld)[ nRightPos - 1 ] )
(*pOld)[ nRightPos - 1 ] = nRight;
if( nRightPos - nLeftPos > 1 )
- pOld->Remove( nLeftPos, nRightPos - nLeftPos - 1 );
+ pOld->erase( pOld->begin() + nLeftPos, pOld->begin() + nRightPos - 1 );
}
nIdx = nLeftPos - 1;
@@ -647,26 +639,26 @@ void SvxBoundArgs::NoteUpLow( long nA, const sal_uInt8 nArea )
}
}
-SvLongsPtr TextRanger::GetTextRanges( const Range& rRange )
+LongDqPtr TextRanger::GetTextRanges( const Range& rRange )
{
DBG_ASSERT( rRange.Min() || rRange.Max(), "Zero-Range not allowed, Bye Bye" );
- sal_uInt16 nIndex = 0;
- while( nIndex < nCacheSize && rRange != pRangeArr[ nIndex ] )
- ++nIndex;
- if( nIndex >= nCacheSize )
+ //Can we find the result we need in the cache?
+ for (std::deque<RangeCache>::iterator it = mRangeCache.begin(); it < mRangeCache.end(); ++it)
{
- ++nCacheIdx;
- nCacheIdx %= nCacheSize;
- pRangeArr[ nCacheIdx ] = rRange;
- if( !pCache[ nCacheIdx ] )
- pCache[ nCacheIdx ] = new SvLongs( 2, 8 );
- nIndex = nCacheIdx;
- SvxBoundArgs aArg( this, pCache[ nCacheIdx ], rRange );
- aArg.Calc( *mpPolyPolygon );
- if( mpLinePolyPolygon )
- aArg.Concat( mpLinePolyPolygon );
+ if (it->range == rRange)
+ return &(it->results);
}
- return pCache[ nIndex ];
+ //Calculate a new result
+ RangeCache rngCache(rRange);
+ SvxBoundArgs aArg( this, &(rngCache.results), rRange );
+ aArg.Calc( *mpPolyPolygon );
+ if( mpLinePolyPolygon )
+ aArg.Concat( mpLinePolyPolygon );
+ //Add new result to the cache
+ mRangeCache.push_back(rngCache);
+ if (mRangeCache.size() > nCacheSize)
+ mRangeCache.pop_front();
+ return &(mRangeCache.back().results);
}
const Rectangle& TextRanger::_GetBoundRect()
diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx
index ede47dc2b6e1..401effdbd20f 100755
--- a/editeng/source/outliner/outlin2.cxx
+++ b/editeng/source/outliner/outlin2.cxx
@@ -419,10 +419,8 @@ void Outliner::UndoActionEnd( sal_uInt16 nId )
void Outliner::InsertUndo( EditUndo* pUndo )
{
-#ifndef SVX_LIGHT
DBG_CHKTHIS(Outliner,0);
pEditEngine->GetUndoManager().AddUndoAction( pUndo, sal_False );
-#endif
}
sal_Bool Outliner::IsInUndo()
diff --git a/editeng/source/outliner/outlobj.cxx b/editeng/source/outliner/outlobj.cxx
index b57ec1be337f..989c6d0b4f17 100755
--- a/editeng/source/outliner/outlobj.cxx
+++ b/editeng/source/outliner/outlobj.cxx
@@ -225,7 +225,7 @@ const ParagraphData& OutlinerParaObject::GetParagraphData(sal_uInt32 nIndex) con
}
else
{
- OSL_ENSURE(false, "OutlinerParaObject::GetParagraphData: Access out of range (!)");
+ OSL_FAIL("OutlinerParaObject::GetParagraphData: Access out of range (!)");
static ParagraphData aEmptyParagraphData;
return aEmptyParagraphData;
}
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index b25a6b884ee0..9e685870037f 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -1038,18 +1038,17 @@ void OutlinerView::PasteSpecial()
}
}
-List* OutlinerView::CreateSelectionList()
+void OutlinerView::CreateSelectionList (std::vector<Paragraph*> &aSelList)
{
DBG_CHKTHIS( OutlinerView, 0 );
ParaRange aParas = ImpGetSelectedParagraphs( sal_True );
- List* pSelList = new List;
+
for ( sal_uInt16 nPara = aParas.nStartPara; nPara <= aParas.nEndPara; nPara++ )
{
Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
- pSelList->Insert( pPara, LIST_APPEND );
+ aSelList.push_back(pPara);
}
- return pSelList;
}
SfxStyleSheet* OutlinerView::GetStyleSheet() const
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index 4d882a797671..0b934cd22e8c 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -261,11 +261,9 @@ INSINGLECHAR:
bNewGroup = false;
break;
case RTF_INFO:
-#ifndef SVX_LIGHT
if (bReadDocInfo && bNewDoc && m_xDocProps.is())
ReadInfo();
else
-#endif
SkipGroup();
break;
@@ -691,7 +689,6 @@ util::DateTime SvxRTFParser::GetDateTimeStamp( )
void SvxRTFParser::ReadInfo( const sal_Char* pChkForVerNo )
{
-#ifndef SVX_LIGHT
int _nOpenBrakets = 1, nToken; // the first was already detected earlier!!
DBG_ASSERT(m_xDocProps.is(),
"SvxRTFParser::ReadInfo: no DocumentProperties");
@@ -791,7 +788,6 @@ void SvxRTFParser::ReadInfo( const sal_Char* pChkForVerNo )
nVersionNo = nVersNo;
SkipToken( -1 ); // the closing brace is evaluated "above"
-#endif
}
diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx
index 36589bc357b9..708142c679d5 100755
--- a/embeddedobj/source/commonembedding/persistence.cxx
+++ b/embeddedobj/source/commonembedding/persistence.cxx
@@ -327,7 +327,7 @@ void OCommonEmbeddedObject::EmbedAndReparentDoc_Impl( const uno::Reference< util
}
catch( const lang::NoSupportException & )
{
- OSL_ENSURE( false, "OCommonEmbeddedObject::EmbedAndReparentDoc: cannot set parent at document!" );
+ OSL_FAIL( "OCommonEmbeddedObject::EmbedAndReparentDoc: cannot set parent at document!" );
}
}
@@ -1075,7 +1075,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry(
m_pDocHolder->SetOutplaceFrameProperties( aOutFrameProps );
}
else
- OSL_ENSURE( false, "OCommonEmbeddedObject::setPersistentEntry: illegal type for argument 'OutplaceFrameProperties'!" );
+ OSL_FAIL( "OCommonEmbeddedObject::setPersistentEntry: illegal type for argument 'OutplaceFrameProperties'!" );
}
else if ( lObjArgs[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ModuleName" ) ) )
{
diff --git a/fpicker/source/office/commonpicker.cxx b/fpicker/source/office/commonpicker.cxx
index 71a0fd0a6a11..f360770dea4b 100755
--- a/fpicker/source/office/commonpicker.cxx
+++ b/fpicker/source/office/commonpicker.cxx
@@ -465,7 +465,7 @@ namespace svt
}
else
{
- DBG_ERROR(
+ OSL_FAIL(
( ::rtl::OString( "OCommonPicker::initialize: unknown argument type at position " )
+= ::rtl::OString::valueOf( (sal_Int32)( pArguments - _rArguments.getConstArray() ) )
).getStr()
diff --git a/fpicker/source/win32/filepicker/FilePicker.cxx b/fpicker/source/win32/filepicker/FilePicker.cxx
index 545c54b9fa3f..0f7dda31a26c 100755
--- a/fpicker/source/win32/filepicker/FilePicker.cxx
+++ b/fpicker/source/win32/filepicker/FilePicker.cxx
@@ -238,7 +238,7 @@ rtl::OUString SAL_CALL CFilePicker::helpRequested(FilePickerEvent aEvent) const
}
catch(uno::RuntimeException&)
{
- OSL_ENSURE( false, "RuntimeException during event dispatching" );
+ OSL_FAIL( "RuntimeException during event dispatching" );
}
}
}
diff --git a/fpicker/source/win32/filepicker/asynceventnotifier.cxx b/fpicker/source/win32/filepicker/asynceventnotifier.cxx
index 02805f007a8e..eeba8c595940 100755
--- a/fpicker/source/win32/filepicker/asynceventnotifier.cxx
+++ b/fpicker/source/win32/filepicker/asynceventnotifier.cxx
@@ -180,7 +180,7 @@ void SAL_CALL CAsyncEventNotifier::shutdown()
// we are waiting infinite, so error will
// be better detected in form of deadlocks
if (WaitForSingleObject(m_hThread, INFINITE) == WAIT_FAILED) {
- OSL_ENSURE(false, "Waiting for thread termination failed!");
+ OSL_FAIL("Waiting for thread termination failed!");
}
// lock mutex again to reset m_hThread
diff --git a/fpicker/source/win32/filepicker/customcontrolfactory.cxx b/fpicker/source/win32/filepicker/customcontrolfactory.cxx
index d21afa49a7c9..c933821641d6 100755
--- a/fpicker/source/win32/filepicker/customcontrolfactory.cxx
+++ b/fpicker/source/win32/filepicker/customcontrolfactory.cxx
@@ -50,7 +50,7 @@ CCustomControl* CCustomControlFactory::CreateCustomControl(HWND aControlHandle,
TCHAR aClsName[256];
ZeroMemory(aClsName,sizeof(aClsName));
if (GetClassName(aControlHandle,aClsName,sizeof(aClsName)) == 0) {
- OSL_ENSURE(false,"Invalid window handle");
+ OSL_FAIL("Invalid window handle");
}
if (0 == _tcsicmp(aClsName,TEXT("button")))
diff --git a/fpicker/source/win32/filepicker/helppopupwindow.cxx b/fpicker/source/win32/filepicker/helppopupwindow.cxx
index f1faf3928416..46021a49777b 100755
--- a/fpicker/source/win32/filepicker/helppopupwindow.cxx
+++ b/fpicker/source/win32/filepicker/helppopupwindow.cxx
@@ -608,7 +608,7 @@ void SAL_CALL CHelpPopupWindow::UnregisterWindowClass( )
if ( !UnregisterClass(
(LPCTSTR)MAKELONG( s_ClassAtom, 0 ), m_hInstance ) )
{
- OSL_ENSURE( false, "unregister window class failed" );
+ OSL_FAIL( "unregister window class failed" );
}
s_ClassAtom = 0;
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 816806405a8c..ebc332ad8190 100755
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -1712,7 +1712,7 @@ void AutoRecovery::implts_registerDocument(const css::uno::Reference< css::frame
(!aNew.FactoryURL.getLength())
)
{
- OSL_ENSURE( false, "AutoRecovery::implts_registerDocument: this should not happen anymore!" );
+ OSL_FAIL( "AutoRecovery::implts_registerDocument: this should not happen anymore!" );
// nowadays, the Basic IDE should already die on the "supports XDocumentRecovery" check. And no other known
// document type fits in here ...
return;
diff --git a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
index 06c0c51e1ec7..30b5f4c3489c 100755
--- a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
@@ -191,7 +191,7 @@ throw ( RuntimeException )
Sequence<PropertyValue> DropdownToolbarController::getExecuteArgs(sal_Int16 KeyModifier) const
{
Sequence<PropertyValue> aArgs( 2 );
- ::rtl::OUString aSelectedText = m_pListBoxControl->GetText();
+ ::rtl::OUString aSelectedText = m_pListBoxControl->GetSelectEntry();
// Add key modifier to argument list
aArgs[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "KeyModifier" ));
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 10ed484d407b..f2d90c4e0696 100755
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -1637,7 +1637,7 @@ void MenuBarManager::RetrieveShortcuts( std::vector< MenuItemHandler* >& aMenuSh
if ( m_xModuleAcceleratorManager.is() )
impl_RetrieveShortcutsFromConfiguration( xModuleAccelCfg, aSeq, aMenuShortCuts );
if ( m_xDocAcceleratorManager.is() )
- impl_RetrieveShortcutsFromConfiguration( xGlobalAccelCfg, aSeq, aMenuShortCuts );
+ impl_RetrieveShortcutsFromConfiguration( xDocAccelCfg, aSeq, aMenuShortCuts );
}
}
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index a53a2713bdc8..a08e3e430d91 100755
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -325,7 +325,7 @@ sal_Bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInS
if ( !rAttr.GetRef() && rAttr.IsA( TYPE( SvMetaSlot ) ) )
{
OSL_FAIL( "Neuer Slot : " );
- DBG_ERROR( rAttr.GetSlotId().GetBuffer() );
+ OSL_FAIL( rAttr.GetSlotId().GetBuffer() );
}
for( sal_uLong n = 0; n < aAttrList.Count(); n++ )
@@ -337,9 +337,9 @@ sal_Bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInS
if( pS->GetSlotId().GetValue() != rAttr.GetSlotId().GetValue() )
{
OSL_FAIL( "Gleicher Name in MetaClass : " );
- DBG_ERROR( pS->GetName().GetBuffer() );
- DBG_ERROR( pS->GetSlotId().GetBuffer() );
- DBG_ERROR( rAttr.GetSlotId().GetBuffer() );
+ OSL_FAIL( pS->GetName().GetBuffer() );
+ OSL_FAIL( pS->GetSlotId().GetBuffer() );
+ OSL_FAIL( rAttr.GetSlotId().GetBuffer() );
ByteString aStr( "Attribute's " );
aStr += pS->GetName();
@@ -356,9 +356,9 @@ sal_Bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInS
if( nId1 == nId2 && nId1 != 0 )
{
OSL_FAIL( "Gleiche Id in MetaClass : " );
- DBG_ERROR( ByteString::CreateFromInt32( pS->GetSlotId().GetValue() ).GetBuffer() );
- DBG_ERROR( pS->GetSlotId().GetBuffer() );
- DBG_ERROR( rAttr.GetSlotId().GetBuffer() );
+ OSL_FAIL( ByteString::CreateFromInt32( pS->GetSlotId().GetValue() ).GetBuffer() );
+ OSL_FAIL( pS->GetSlotId().GetBuffer() );
+ OSL_FAIL( rAttr.GetSlotId().GetBuffer() );
ByteString aStr( "Attribute " );
aStr += pS->GetName();
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index 0531d686e50c..40831709fe65 100755
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -489,7 +489,7 @@ SvMetaAttribute * SvIdlDataBase::ReadKnownAttr
ByteString aStr( "Nicht gefunden : " );
aStr += pTok->GetString();
- DBG_ERROR( aStr.GetBuffer() );
+ OSL_FAIL( aStr.GetBuffer() );
}
}
diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx
index 57e91251de1b..8fa1ff68a42a 100755
--- a/linguistic/source/lngopt.cxx
+++ b/linguistic/source/lngopt.cxx
@@ -304,7 +304,7 @@ OUString LinguOptions::GetName( sal_Int32 nWID )
if (0 <= nWID && nWID < nLen && aWID_Name[ nWID ].nWID == nWID)
aRes = OUString::createFromAscii(aWID_Name[nWID].pPropertyName);
else
- OSL_ENSURE(false, "lng : unknown WID");
+ OSL_FAIL("lng : unknown WID");
return aRes;
}
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index fa1d72fe1385..00c0d96eba86 100755
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -46,8 +46,6 @@
#include <comphelper/extract.hxx>
#include <rtl/logfile.hxx>
-#include <boost/checked_delete.hpp>
-
#include "lngsvcmgr.hxx"
#include "lngopt.hxx"
#include "linguistic/misc.hxx"
@@ -256,7 +254,7 @@ void LngSvcMgr::SetAvailableCfgServiceLists( LinguDispatcher &rDispatcher,
size_t nAvailSvcs = rAvailSvcs.size();
for (size_t m = 0; m < nAvailSvcs; ++m)
{
- const SvcInfo &rSvcInfo = *rAvailSvcs[m];
+ const SvcInfo &rSvcInfo = rAvailSvcs[m];
if (rSvcInfo.aSvcImplName == pImplNames[k] &&
rSvcInfo.HasLanguage( nLang ))
{
@@ -604,14 +602,6 @@ LngSvcMgr::LngSvcMgr() :
EnableNotification( aNames );
}
-void LngSvcMgr::clearSvcInfoArray(SvcInfoArray* pInfo)
-{
- if (pInfo)
- {
- std::for_each(pInfo->begin(), pInfo->end(), boost::checked_deleter<SvcInfo>());
- delete pInfo;
- }
-}
LngSvcMgr::~LngSvcMgr()
{
@@ -619,10 +609,10 @@ LngSvcMgr::~LngSvcMgr()
// will be freed in the destructor of the respective Reference's
// xSpellDsp, xGrammarDsp, xHyphDsp, xThesDsp
- clearSvcInfoArray(pAvailSpellSvcs);
- clearSvcInfoArray(pAvailGrammarSvcs);
- clearSvcInfoArray(pAvailHyphSvcs);
- clearSvcInfoArray(pAvailThesSvcs);
+ delete pAvailSpellSvcs;
+ delete pAvailGrammarSvcs;
+ delete pAvailHyphSvcs;
+ delete pAvailThesSvcs;
}
@@ -659,7 +649,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
if (0 == rName.compareTo( aSpellCheckerList, aSpellCheckerList.getLength() ))
{
// delete old cached data, needs to be acquired new on demand
- clearSvcInfoArray(pAvailSpellSvcs); pAvailSpellSvcs = 0;
+ delete pAvailSpellSvcs; pAvailSpellSvcs = 0;
OUString aNode( aSpellCheckerList );
if (lcl_SeqHasString( aSpellCheckerListEntries, aKeyText ))
@@ -684,7 +674,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
else if (0 == rName.compareTo( aGrammarCheckerList, aGrammarCheckerList.getLength() ))
{
// delete old cached data, needs to be acquired new on demand
- clearSvcInfoArray(pAvailGrammarSvcs); pAvailGrammarSvcs = 0;
+ delete pAvailGrammarSvcs; pAvailGrammarSvcs = 0;
OUString aNode( aGrammarCheckerList );
if (lcl_SeqHasString( aGrammarCheckerListEntries, aKeyText ))
@@ -712,7 +702,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
else if (0 == rName.compareTo( aHyphenatorList, aHyphenatorList.getLength() ))
{
// delete old cached data, needs to be acquired new on demand
- clearSvcInfoArray(pAvailHyphSvcs); pAvailHyphSvcs = 0;
+ delete pAvailHyphSvcs; pAvailHyphSvcs = 0;
OUString aNode( aHyphenatorList );
if (lcl_SeqHasString( aHyphenatorListEntries, aKeyText ))
@@ -737,7 +727,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
else if (0 == rName.compareTo( aThesaurusList, aThesaurusList.getLength() ))
{
// delete old cached data, needs to be acquired new on demand
- clearSvcInfoArray(pAvailThesSvcs); pAvailThesSvcs = 0;
+ delete pAvailThesSvcs; pAvailThesSvcs = 0;
OUString aNode( aThesaurusList );
if (lcl_SeqHasString( aThesaurusListEntries, aKeyText ))
@@ -1409,7 +1399,7 @@ uno::Sequence< OUString > SAL_CALL
{
// don't used cached data here (force re-evaluation in order to have downloaded dictionaries
// already found without the need to restart the office
- clearSvcInfoArray(pAvailSpellSvcs); pAvailSpellSvcs = 0;
+ delete pAvailSpellSvcs; pAvailSpellSvcs = 0;
GetAvailableSpellSvcs_Impl();
pInfoArray = pAvailSpellSvcs;
}
@@ -1417,7 +1407,7 @@ uno::Sequence< OUString > SAL_CALL
{
// don't used cached data here (force re-evaluation in order to have downloaded dictionaries
// already found without the need to restart the office
- clearSvcInfoArray(pAvailGrammarSvcs); pAvailGrammarSvcs = 0;
+ delete pAvailGrammarSvcs; pAvailGrammarSvcs = 0;
GetAvailableGrammarSvcs_Impl();
pInfoArray = pAvailGrammarSvcs;
}
@@ -1425,7 +1415,7 @@ uno::Sequence< OUString > SAL_CALL
{
// don't used cached data here (force re-evaluation in order to have downloaded dictionaries
// already found without the need to restart the office
- clearSvcInfoArray(pAvailHyphSvcs); pAvailHyphSvcs = 0;
+ delete pAvailHyphSvcs; pAvailHyphSvcs = 0;
GetAvailableHyphSvcs_Impl();
pInfoArray = pAvailHyphSvcs;
}
@@ -1433,7 +1423,7 @@ uno::Sequence< OUString > SAL_CALL
{
// don't used cached data here (force re-evaluation in order to have downloaded dictionaries
// already found without the need to restart the office
- clearSvcInfoArray(pAvailThesSvcs); pAvailThesSvcs = 0;
+ delete pAvailThesSvcs; pAvailThesSvcs = 0;
GetAvailableThesSvcs_Impl();
pInfoArray = pAvailThesSvcs;
}
@@ -1447,13 +1437,13 @@ uno::Sequence< OUString > SAL_CALL
sal_uInt16 nCnt = 0;
LanguageType nLanguage = LocaleToLanguage( rLocale );
- for (size_t i = 0; i < nMaxCnt; ++i)
+ for (size_t i = 0; i < nMaxCnt; ++i)
{
- const SvcInfo *pInfo = (*pInfoArray)[i];
+ const SvcInfo &rInfo = (*pInfoArray)[i];
if (LANGUAGE_NONE == nLanguage
- || (pInfo && pInfo->HasLanguage( nLanguage )))
+ || rInfo.HasLanguage( nLanguage ))
{
- pImplName[ nCnt++ ] = pInfo->aSvcImplName;
+ pImplName[ nCnt++ ] = rInfo.aSvcImplName;
}
}
diff --git a/linguistic/source/lngsvcmgr.hxx b/linguistic/source/lngsvcmgr.hxx
index a23cd326409d..2ca73df51749 100755
--- a/linguistic/source/lngsvcmgr.hxx
+++ b/linguistic/source/lngsvcmgr.hxx
@@ -41,6 +41,8 @@
#include <com/sun/star/linguistic2/XAvailableLocales.hpp>
#include <unotools/configitem.hxx>
+#include <boost/ptr_container/ptr_vector.hpp>
+
#include "linguistic/misc.hxx"
#include "defs.hxx"
@@ -105,7 +107,7 @@ class LngSvcMgr :
LngSvcMgrListenerHelper * pListenerHelper;
- typedef std::vector< SvcInfo * > SvcInfoArray;
+ typedef boost::ptr_vector< SvcInfo > SvcInfoArray;
SvcInfoArray * pAvailSpellSvcs;
SvcInfoArray * pAvailGrammarSvcs;
SvcInfoArray * pAvailHyphSvcs;
@@ -138,8 +140,6 @@ class LngSvcMgr :
void SetAvailableCfgServiceLists( LinguDispatcher &rDispatcher,
const SvcInfoArray &rAvailSvcs );
- static void clearSvcInfoArray(SvcInfoArray *pInfo);
-
// utl::ConfigItem (to allow for listening of changes of relevant properties)
virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString > &rPropertyNames );
virtual void Commit();
diff --git a/scripting/source/inc/util/MiscUtils.hxx b/scripting/source/inc/util/MiscUtils.hxx
index 149f46e8d53c..50d693302589 100755
--- a/scripting/source/inc/util/MiscUtils.hxx
+++ b/scripting/source/inc/util/MiscUtils.hxx
@@ -115,11 +115,11 @@ public:
}
catch ( css::lang::IllegalArgumentException const & )
{
- OSL_ENSURE( false, "Invalid document model!" );
+ OSL_FAIL( "Invalid document model!" );
}
}
- OSL_ENSURE( false, "Unable to obtain URL for document model!" );
+ OSL_FAIL( "Unable to obtain URL for document model!" );
return rtl::OUString();
}
static css::uno::Reference< css::frame::XModel > tDocUrlToModel( const ::rtl::OUString& url )
diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
index 434e7d962eb4..135410b37c9a 100755
--- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx
+++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
@@ -418,7 +418,7 @@ public:
}
catch( uno::Exception& )
{
- OSL_ENSURE( false, "DefaultBrowseNode::DefaultBrowseNode: Caught exception!" );
+ OSL_FAIL( "DefaultBrowseNode::DefaultBrowseNode: Caught exception!" );
}
OSL_ENSURE( m_xAggProxy.is(),
"DefaultBrowseNode::DefaultBrowseNode: Wrapped BrowseNode cannot be aggregated!" );
diff --git a/scripting/source/provider/URIHelper.cxx b/scripting/source/provider/URIHelper.cxx
index e5ab80f838cf..d114ea963dcf 100755
--- a/scripting/source/provider/URIHelper.cxx
+++ b/scripting/source/provider/URIHelper.cxx
@@ -78,8 +78,7 @@ ScriptingFrameworkURIHelper::ScriptingFrameworkURIHelper(
}
catch (uno::Exception&)
{
- OSL_ENSURE(false,
- "Scripting Framework error initialising XSimpleFileAccess");
+ OSL_FAIL("Scripting Framework error initialising XSimpleFileAccess");
}
try
@@ -92,8 +91,7 @@ ScriptingFrameworkURIHelper::ScriptingFrameworkURIHelper(
}
catch (uno::Exception&)
{
- OSL_ENSURE(false,
- "Scripting Framework error initialising XUriReferenceFactory");
+ OSL_FAIL("Scripting Framework error initialising XUriReferenceFactory");
}
}
diff --git a/scripting/source/pyprov/mailmerge.py b/scripting/source/pyprov/mailmerge.py
index 8fd697fee96e..4654ad35fc1f 100755
--- a/scripting/source/pyprov/mailmerge.py
+++ b/scripting/source/pyprov/mailmerge.py
@@ -42,7 +42,6 @@ from email.Utils import formatdate
from email.Utils import parseaddr
import sys, smtplib, imaplib, poplib
-
dbg = False
class PyMailSMTPService(unohelper.Base, XSmtpService):
@@ -232,6 +231,7 @@ class PyMailIMAPService(unohelper.Base, XMailService):
self.supportedtypes = ('Insecure', 'Ssl')
self.server = None
self.connectioncontext = None
+ self.notify = EventObject()
if dbg:
print >> sys.stderr, "PyMailIMAPService init"
def addConnectionListener(self, xListener):
@@ -300,6 +300,7 @@ class PyMailPOP3Service(unohelper.Base, XMailService):
self.supportedtypes = ('Insecure', 'Ssl')
self.server = None
self.connectioncontext = None
+ self.notify = EventObject()
if dbg:
print >> sys.stderr, "PyMailPOP3Service init"
def addConnectionListener(self, xListener):
diff --git a/scripting/source/pyprov/makefile.mk b/scripting/source/pyprov/makefile.mk
index f534cb5b3b53..d7f477688640 100755
--- a/scripting/source/pyprov/makefile.mk
+++ b/scripting/source/pyprov/makefile.mk
@@ -35,6 +35,7 @@ TARGET=pyprov
.INCLUDE : settings.mk
# --- Targets ------------------------------------------------------
+.IF "$(DISABLE_PYTHON)" != "TRUE"
ALL : ALLTAR \
$(DLLDEST)$/officehelper.py \
$(DLLDEST)$/mailmerge.py
@@ -73,3 +74,9 @@ $(MISC)/pythonscript.component .ERRREMOVE : \
$(SOLARENV)/bin/createcomponent.xslt pythonscript.component
.ENDIF
+
+.ELSE
+
+.INCLUDE : target.mk
+
+.ENDIF
diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py
index 2ca46b0ef37e..3eed63c5d937 100755
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -48,7 +48,7 @@ def getLogTarget():
if len( userInstallation ) > 0:
systemPath = uno.fileUrlToSystemPath( userInstallation + "/Scripts/python/log.txt" )
ret = file( systemPath , "a" )
- except Exception,e:
+ except:
print "Exception during creation of pythonscript logfile: "+ lastException2String() + "\n, delagating log to stdout\n"
return ret
@@ -81,7 +81,7 @@ class Logger(LogLevel):
encfile(msg) +
"\n" )
self.target.flush()
- except Exception,e:
+ except:
print "Error during writing to stdout: " +lastException2String() + "\n"
log = Logger( getLogTarget() )
@@ -90,6 +90,8 @@ log.debug( "pythonscript loading" )
#from com.sun.star.lang import typeOfXServiceInfo, typeOfXTypeProvider
from com.sun.star.uno import RuntimeException
+from com.sun.star.lang import IllegalArgumentException
+from com.sun.star.container import NoSuchElementException
from com.sun.star.lang import XServiceInfo
from com.sun.star.io import IOException
from com.sun.star.ucb import CommandAbortedException, XCommandEnvironment, XProgressHandler
@@ -437,7 +439,7 @@ class ScriptBrowseNode( unohelper.Base, XBrowseNode , XPropertySet, XInvocation,
ret = not self.provCtx.sfa.isReadOnly( self.uri )
log.isDebugLevel() and log.debug( "ScriptBrowseNode.getPropertyValue called for " + name + ", returning " + str(ret) )
- except Exception,e:
+ except:
log.error( "ScriptBrowseNode.getPropertyValue error " + lastException2String())
raise
@@ -451,7 +453,7 @@ class ScriptBrowseNode( unohelper.Base, XBrowseNode , XPropertySet, XInvocation,
def getIntrospection( self ):
return None
- def invoke( self, name, params, outparamindex, outparams ):
+ def invoke( self, name ):
if name == "Editable":
servicename = "com.sun.star.awt.DialogProvider"
ctx = self.provCtx.scriptContext.getComponentContext()
@@ -506,7 +508,7 @@ class ScriptBrowseNode( unohelper.Base, XBrowseNode , XPropertySet, XInvocation,
# log.isDebugLevel() and log.debug("Save is not implemented yet")
# text = self.editor.getControl("EditorTextField").getText()
# log.isDebugLevel() and log.debug("Would save: " + text)
- except Exception,e:
+ except:
# TODO: add an error box here !
log.error( lastException2String() )
@@ -547,7 +549,7 @@ class FileBrowseNode( unohelper.Base, XBrowseNode ):
self.provCtx, self.uri, self.name, i ))
ret = tuple( scriptNodeList )
log.isDebugLevel() and log.debug( "returning " +str(len(ret)) + " ScriptChildNodes on " + self.uri )
- except Exception, e:
+ except:
text = lastException2String()
log.error( "Error while evaluating " + self.uri + ":" + text )
raise
@@ -556,7 +558,7 @@ class FileBrowseNode( unohelper.Base, XBrowseNode ):
def hasChildNodes(self):
try:
return len(self.getChildNodes()) > 0
- except Exception, e:
+ except:
return False
def getType( self):
@@ -659,7 +661,7 @@ def getPathesFromPackage( rootUrl, sfa ):
if not isPyFileInPath( sfa, i ):
handler.urlList.remove(i)
ret = tuple( handler.urlList )
- except UnoException, e:
+ except UnoException:
text = lastException2String()
log.debug( "getPathesFromPackage " + fileUrl + " Exception: " +text )
pass
@@ -685,7 +687,7 @@ class DummyProgressHandler( unohelper.Base, XProgressHandler ):
log.isDebugLevel() and log.debug( "pythonscript: DummyProgressHandler.push " + str( status ) )
def update( self,status ):
log.isDebugLevel() and log.debug( "pythonscript: DummyProgressHandler.update " + str( status ) )
- def pop( self ):
+ def pop( self, event ):
log.isDebugLevel() and log.debug( "pythonscript: DummyProgressHandler.push " + str( event ) )
class CommandEnvironment(unohelper.Base, XCommandEnvironment):
@@ -768,7 +770,7 @@ class PackageBrowseNode( unohelper.Base, XBrowseNode ):
return tuple( browseNodeList )
def hasChildNodes( self ):
- return len( self.mapPackageName2Path ) > 0
+ return len( self.provCtx.mapPackageName2Path ) > 0
def getType( self ):
return CONTAINER
@@ -784,7 +786,7 @@ class PythonScript( unohelper.Base, XScript ):
def __init__( self, func, mod ):
self.func = func
self.mod = mod
- def invoke(self, args, out, outindex ):
+ def invoke(self, args ):
log.isDebugLevel() and log.debug( "PythonScript.invoke " + str( args ) )
try:
ret = self.func( *args )
@@ -902,7 +904,7 @@ class PythonScriptProvider( unohelper.Base, XBrowseNode, XScriptProvider, XNameC
log.isDebugLevel() and log.debug( "got func " + str( func ) )
return PythonScript( func, mod )
- except Exception, e:
+ except:
text = lastException2String()
log.error( text )
raise ScriptFrameworkErrorException( text, self, scriptUri, LANGUAGENAME, 0 )
@@ -934,7 +936,7 @@ class PythonScriptProvider( unohelper.Base, XBrowseNode, XScriptProvider, XNameC
ret = self.provCtx.isUrlInPackage( uri )
log.debug( "hasByName " + uri + " " +str( ret ) )
return ret
- except Exception, e:
+ except:
text = lastException2String()
log.debug( "Error in hasByName:" + text )
return False
@@ -962,8 +964,9 @@ class PythonScriptProvider( unohelper.Base, XBrowseNode, XScriptProvider, XNameC
def replaceByName( self, name, value ):
log.debug( "replaceByName called " + str( name ) + " " + str( value ))
- removeByName( name )
- insertByName( name )
+ uri = expandUri( name )
+ self.removeByName( name )
+ self.insertByName( name, value )
log.debug( "replaceByName called" + str( uri ) + " successful" )
def getElementType( self ):
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index db57c6b7ca39..cb60dc182975 100755
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -1558,7 +1558,7 @@ Reference< io::XInputStream > BinaryInput::getInputStreamForSection( sal_Int32 n
}
}
else
- OSL_ENSURE( false, "BinaryInput::getInputStreamForSection(): Read past end" );
+ OSL_FAIL( "BinaryInput::getInputStreamForSection(): Read past end" );
return xIn;
}
@@ -1568,7 +1568,7 @@ void BinaryInput::seek( sal_Int32 nPos )
if( nPos <= m_nSize )
m_nCurPos = nPos;
else
- OSL_ENSURE( false, "BinaryInput::seek(): Position past end" );
+ OSL_FAIL( "BinaryInput::seek(): Position past end" );
}
@@ -1581,7 +1581,7 @@ sal_Int16 BinaryInput::readInt16( void )
nRet += 256 * sal_Int16( sal_uInt8( m_pData[m_nCurPos++] ) );
}
else
- OSL_ENSURE( false, "BinaryInput::readInt16(): Read past end" );
+ OSL_FAIL( "BinaryInput::readInt16(): Read past end" );
return nRet;
}
@@ -1599,7 +1599,7 @@ sal_Int32 BinaryInput::readInt32( void )
}
}
else
- OSL_ENSURE( false, "BinaryInput::readInt32(): Read past end" );
+ OSL_FAIL( "BinaryInput::readInt32(): Read past end" );
return nRet;
}
@@ -1613,7 +1613,7 @@ sal_Unicode BinaryInput::readUnicodeChar( void )
nRet += 256 * sal_uInt8( m_pData[m_nCurPos++] );
}
else
- OSL_ENSURE( false, "BinaryInput::readUnicodeChar(): Read past end" );
+ OSL_FAIL( "BinaryInput::readUnicodeChar(): Read past end" );
sal_Unicode cRet = nRet;
return cRet;
diff --git a/sfx2/sdi/frmslots.sdi b/sfx2/sdi/frmslots.sdi
index 33a6fbce671a..c17b2b190c08 100755
--- a/sfx2/sdi/frmslots.sdi
+++ b/sfx2/sdi/frmslots.sdi
@@ -276,12 +276,12 @@ interface Window
ExecMethod = ExecView_Impl;
]
- // Nur f"ur Gestalter: Slot mu\s vorhanden sein
+ // Only for Designers: Slot must be present
SID_STYLE_NEW
[
]
- // Nur f"ur Gestalter: Slot mu\s vorhanden sein
+ // Only for Designers: Slot must be present
SID_STYLE_DRAGHIERARCHIE
[
]
@@ -328,7 +328,7 @@ interface BrowseWindow : Window
{
SID_ACTIVATE // ole(no) api(final/play/rec)
[
- // Implementierung in Subklassen
+ // Implementations in Subclasses
]
SID_NEWWINDOW // ole(no) api(play/rec)
[
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 41b12bdd2749..b954e9f5e7a9 100755
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -285,15 +285,16 @@ SfxApplication* SfxApplication::GetOrCreate()
SfxApplication *pNew = new SfxApplication;
//TODO/CLEANUP
- //ist das Mutex-Handling OK?
+ // Is the Mutex-Handling OK?
static ::osl::Mutex aProtector;
::osl::MutexGuard aGuard2( aProtector );
RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mb93783) ::SfxApplication::SetApp" );
pApp = pNew;
- // at the moment a bug may occur when Initialize_Impl returns sal_False, but this is only temporary because all code that may cause such a
- // fault will be moved outside the SFX
+ // at the moment a bug may occur when Initialize_Impl returns FALSE,
+ // but this is only temporary because all code that may cause such
+ // a fault will be moved outside the SFX
pApp->Initialize_Impl();
::framework::SetImageProducer( GetImage );
@@ -341,7 +342,7 @@ SfxApplication::SfxApplication()
#else
if( !InitializeDde() )
{
- ByteString aStr( "Kein DDE-Service moeglich. Fehler: " );
+ ByteString aStr( "No DDE-Service possible. Error: " );
if( GetDdeService() )
aStr += ByteString::CreateFromInt32(GetDdeService()->GetError());
else
@@ -379,16 +380,15 @@ SfxApplication::~SfxApplication()
const String& SfxApplication::GetLastDir_Impl() const
-/* [Beschreibung]
+/* [Description]
- Interne Methode, mit der im SFx das zuletzt mit der Methode
- <SfxApplication::SetLastDir_Impl()> gesetzte Verzeichnis
- zurueckgegeben wird.
+ Internal method by which the last set directory with the method
+ <SfxApplication::SetLastDir_Impl()> in SFX is returned.
- Dieses ist i.d.R. das zuletzt durch den SfxFileDialog
- angesprochene Verzeichnis.
+ This is usually the most recently addressed by the
+ SfxFileDialog directory.
- [Querverweis]
+ [Cross-reference]
<SfxApplication::SetLastDir_Impl()>
*/
@@ -398,11 +398,11 @@ const String& SfxApplication::GetLastDir_Impl() const
const String& SfxApplication::GetLastSaveDirectory() const
-/* [Beschreibung]
+/* [Description]
- Wie <SfxApplication::GetLastDir_Impl()>, nur extern
+ As <SfxApplication::GetLastDir_Impl()>, only external
- [Querverweis]
+ [Cross-reference]
<SfxApplication::GetLastDir_Impl()>
*/
@@ -414,15 +414,15 @@ const String& SfxApplication::GetLastSaveDirectory() const
void SfxApplication::SetLastDir_Impl
(
- const String& rNewDir /* kompletter Verzeichnis-Pfad als String */
- )
+ const String& rNewDir /* Complete directory path as a string */
+)
-/* [Beschreibung]
+/* [Description]
- Interne Methode, mit der ein Verzeichnis-Pfad gesetzt wird, der
- zuletzt (z.B. durch den SfxFileDialog) angesprochen wurde.
+ Internal Method, by which a directory path is set that was last addressed
+ (eg by the SfxFileDialog).
- [Querverweis]
+ [Cross-reference]
<SfxApplication::GetLastDir_Impl()>
*/
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 8974a6c6e586..8387c5854b73 100755
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -154,7 +154,7 @@ IMPL_LINK(SfxEventAsyncer_Impl, TimerHdl, Timer*, pAsyncTimer)
{
ByteString aTmp( "SfxEvent: ");
aTmp += ByteString( String( aHint.GetEventName() ), RTL_TEXTENCODING_UTF8 );
- DBG_TRACE( aTmp.GetBuffer() );
+ OSL_TRACE( "%s", aTmp.GetBuffer() );
}
#endif
SFX_APP()->Broadcast( aHint );
@@ -171,7 +171,7 @@ sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet )
{
sal_Bool bRet = sal_False;
SfxItemPool &rPool = GetPool();
- String aTRUEStr('1');
+ String asal_TrueStr('1');
const sal_uInt16 *pRanges = rSet.GetRanges();
SvtSaveOptions aSaveOptions;
@@ -514,7 +514,7 @@ sal_Bool SfxApplication::IsSecureURL( const INetURLObject& rURL, const String* p
return SvtSecurityOptions().IsSecureURL( rURL.GetMainURL( INetURLObject::NO_DECODE ), *pReferer );
}
//--------------------------------------------------------------------
-// TODO/CLEANUP: wieso zwei SetOptions Methoden?
+// TODO/CLEANUP: Why two SetOptions Methods?
void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
{
const SfxPoolItem *pItem = 0;
@@ -602,14 +602,14 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
aSaveOptions.SetDocInfoSave(((const SfxBoolItem *)pItem)->GetValue());
}
- // offende Dokumente merken
+ // Mark open Documents
if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_WORKINGSET), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
aSaveOptions.SetSaveWorkingSet(((const SfxBoolItem *)pItem)->GetValue());
}
- // Fenster-Einstellung speichern
+ // Save window settings
if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_SAVEDOCVIEW), sal_True, &pItem))
{
DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
@@ -694,16 +694,16 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
sal_uInt16 nUndoCount = ((const SfxUInt16Item*)pItem)->GetValue();
aUndoOptions.SetUndoCount( nUndoCount );
- // um alle Undo-Manager zu erwischen: "uber alle Frames iterieren
+ // To catch all Undo-Managers: Iterate over all Frames
for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst();
pFrame;
pFrame = SfxViewFrame::GetNext(*pFrame) )
{
- // den Dispatcher des Frames rausholen
+ // Get the Dispatcher of the Frames
SfxDispatcher *pDispat = pFrame->GetDispatcher();
pDispat->Flush();
- // "uber alle SfxShells auf dem Stack des Dispatchers iterieren
+ // Iterate over all SfxShells on the Dispatchers Stack
sal_uInt16 nIdx = 0;
for ( SfxShell *pSh = pDispat->GetShell(nIdx);
pSh;
@@ -811,7 +811,7 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
#endif
}
- // geaenderte Daten speichern
+ // Store changed data
aInetOptions.flush();
}
@@ -820,7 +820,7 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet)
{
SvtPathOptions aPathOptions;
- // Daten werden in DocInfo und IniManager gespeichert
+ // Data is saved in DocInfo and IniManager
const SfxPoolItem *pItem = 0;
SfxItemPool &rPool = GetPool();
@@ -919,7 +919,7 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet)
//--------------------------------------------------------------------
-// alle Dokumente speichern
+// Save all Documents
sal_Bool SfxApplication::SaveAll_Impl(sal_Bool bPrompt, sal_Bool bAutoSave)
{
@@ -986,7 +986,7 @@ void SfxApplication::NotifyEvent( const SfxEventHint& rEventHint, bool bSynchron
{
ByteString aTmp( "SfxEvent: ");
aTmp += ByteString( String( rEventHint.GetEventName() ), RTL_TEXTENCODING_UTF8 );
- DBG_TRACE( aTmp.GetBuffer() );
+ OSL_TRACE( "%s", aTmp.GetBuffer() );
}
#endif
Broadcast(rEventHint);
diff --git a/sfx2/source/appl/appchild.cxx b/sfx2/source/appl/appchild.cxx
index 79f5d108e4ef..08a5fc054425 100755
--- a/sfx2/source/appl/appchild.cxx
+++ b/sfx2/source/appl/appchild.cxx
@@ -78,7 +78,7 @@ void SfxApplication::RegisterChildWindowContext_Impl( SfxModule *pMod, sal_uInt1
SfxChildWinFactory *pF = NULL;
if ( pMod )
{
- // Modul "ubergeben, ChildwindowFactory dort suchen
+ // Abandon Module, search there for ChildwindowFactory
pFactories = pMod->GetChildWinFactories_Impl();
if ( pFactories )
{
@@ -88,7 +88,7 @@ void SfxApplication::RegisterChildWindowContext_Impl( SfxModule *pMod, sal_uInt1
SfxChildWinFactory *pFac = (*pFactories)[nFactory];
if ( nId == pFac->nId )
{
- // Factory gefunden, Context dort registrieren
+ // Factory found, registrer Context here.
pF = pFac;
break;
}
@@ -98,9 +98,9 @@ void SfxApplication::RegisterChildWindowContext_Impl( SfxModule *pMod, sal_uInt1
if ( !pF )
{
- // Factory an der Application suchen
- DBG_ASSERT( pAppData_Impl, "Keine AppDaten!" );
- DBG_ASSERT( pAppData_Impl->pFactArr, "Keine Factories!" );
+ // Search for Factory in the Application
+ DBG_ASSERT( pAppData_Impl, "No AppData!" );
+ DBG_ASSERT( pAppData_Impl->pFactArr, "No Factories!" );
pFactories = pAppData_Impl->pFactArr;
sal_uInt16 nCount = pFactories->Count();
@@ -111,10 +111,10 @@ void SfxApplication::RegisterChildWindowContext_Impl( SfxModule *pMod, sal_uInt1
{
if ( pMod )
{
- // Wenn der Context von einem Modul registriert wurde,
- // mu\s die ChildwindowFactory auch dort zur Verf"ugung
- // stehen, sonst m"u\ste sich die Contextfactory im DLL-Exit
- // wieder abmelden !
+ // If the context of a module has been registered, then the
+ // ChildWindowFactory must also be available there,
+ // else the ContextFactory would have be unsubscribed on
+ // DLL-exit
pF = new SfxChildWinFactory( pFac->pCtor, pFac->nId,
pFac->nPos );
pMod->RegisterChildWindow( pF );
@@ -134,7 +134,7 @@ void SfxApplication::RegisterChildWindowContext_Impl( SfxModule *pMod, sal_uInt1
return;
}
- OSL_FAIL( "Kein ChildWindow fuer diesen Context!" );
+ OSL_FAIL( "No ChildWindow for this Context!" );
}
//--------------------------------------------------------------------
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 50bf2107563d..c3fb0e9dfc92 100755
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -107,7 +107,6 @@ public:
virtual sal_Bool Execute( const String* );
virtual sal_Bool StartAdviseLoop();
virtual sal_Bool MakeItem( const String& rItem );
-
};
@@ -119,15 +118,14 @@ SV_IMPL_PTRARR( SfxDdeDocTopics_Impl, SfxDdeDocTopic_Impl *)
sal_Bool SfxAppEvent_Impl( ApplicationEvent &rAppEvent,
const String &rCmd, const String &rEvent )
-/* [Beschreibung]
-
- Pr"uft, ob 'rCmd' das Event 'rEvent' ist (ohne '(') und baut
- aus diesem dann ein <ApplicationEvent> zusammen, das per
- <Application::AppEvent()> ausgef"uhrt werden kann. Ist 'rCmd' das
- angegegeben Event 'rEvent', dann wird TRUE zur"uckgegeben, sonst FALSE.
+/* [Description]
+ Checks if 'rCmd' of the event 'rEvent' is (without '(') and then assemble
+ this data into a <ApplicationEvent>, which can be excecuted through
+ <Application::AppEvent()>. If 'rCmd' is the given event 'rEvent', then
+ TRUE is returned, otherwise FALSE.
- [Beispiel]
+ [Example]
rCmd = "Open(\"d:\doc\doc.sdw\")"
rEvent = "Open"
@@ -142,7 +140,7 @@ sal_Bool SfxAppEvent_Impl( ApplicationEvent &rAppEvent,
aData.Erase( 0, aEvent.Len() );
if ( aData.Len() > 2 )
{
- // in das ApplicationEvent-Format wandeln
+ // Transform into the ApplicationEvent Format
aData.Erase( aData.Len()-1, 1 );
for ( sal_uInt16 n = 0; n < aData.Len(); ++n )
{
@@ -166,31 +164,30 @@ sal_Bool SfxAppEvent_Impl( ApplicationEvent &rAppEvent,
long SfxApplication::DdeExecute
(
- const String& rCmd // in unserer BASIC-Syntax formuliert
+ const String& rCmd // Expressed in our BASIC-Syntax
)
-/* [Beschreibung]
+/* Description]
- Diese Methode kann vom Applikationsentwickler "uberladen werden,
- um an seine SfxApplication-Subklasse gerichtete DDE-Kommandos
- zu empfangen.
+ This method can be overloaded by application developers, to receive
+ DDE-commands directed to thier SfxApplication subclass.
- Die Basisimplementierung versteht die API-Funktionalit"at der
- betreffenden SfxApplication-Subklasse in BASIC-Syntax. R"uckgabewerte
- k"onnen dabei leider nicht "ubertragen werden.
+ The base implementation understands the API functionality of the
+ relevant SfxApplication subclass in BASIC syntax. Return values can
+ not be transferred, unfortunately.
*/
{
- // Print oder Open-Event?
+ // Print or Open-Event?
ApplicationEvent aAppEvent;
if ( SfxAppEvent_Impl( aAppEvent, rCmd, DEFINE_CONST_UNICODE("Print") ) ||
SfxAppEvent_Impl( aAppEvent, rCmd, DEFINE_CONST_UNICODE("Open") ) )
GetpApp()->AppEvent( aAppEvent );
else
{
- // alle anderen per BASIC
+ // all others are BASIC
StarBASIC* pBasic = GetBasic();
- ENSURE_OR_RETURN( pBasic, "where's my basic?", 0 );
+ DBG_ASSERT( pBasic, "Where is the Basic???" );
SbxVariable* pRet = pBasic->Execute( rCmd );
if( !pRet )
{
@@ -205,18 +202,17 @@ long SfxApplication::DdeExecute
long SfxApplication::DdeGetData
(
- const String&, // das anzusprechende Item
+ const String&, // the Item to be addressed
const String&, // in: Format
- ::com::sun::star::uno::Any& // out: angeforderte Daten
+ ::com::sun::star::uno::Any& // out: requested data
)
-/* [Beschreibung]
+/* [Description]
- Diese Methode kann vom Applikationsentwickler "uberladen werden,
- um an seine SfxApplication-Subklasse gerichtete DDE-Daten-Anforderungen
- zu empfangen.
+ This method can be overloaded by application developers, to receive
+ DDE-data-requests directed to thier SfxApplication subclass.
- Die Basisimplementierung liefert keine Daten und gibt 0 zur"uck.
+ The base implementation provides no data and returns 0.
*/
{
@@ -227,18 +223,17 @@ long SfxApplication::DdeGetData
long SfxApplication::DdeSetData
(
- const String&, // das anzusprechende Item
+ const String&, // the Item to be addressed
const String&, // in: Format
- const ::com::sun::star::uno::Any& // out: angeforderte Daten
+ const ::com::sun::star::uno::Any& // out: requested data
)
-/* [Beschreibung]
+/* [Description]
- Diese Methode kann vom Applikationsentwickler "uberladen werden,
- um an seine SfxApplication-Subklasse gerichtete DDE-Daten
- zu empfangen.
+ This method can be overloaded by application developers, to receive
+ DDE-data directed to thier SfxApplication subclass.
- Die Basisimplementierung nimmt keine Daten entgegen und liefert 0 zur"uck.
+ The base implementation is not receiving any data and returns 0.
*/
{
@@ -249,15 +244,15 @@ long SfxApplication::DdeSetData
::sfx2::SvLinkSource* SfxApplication::DdeCreateLinkSource
(
- const String& // das zu erzeugende Item
+ const String& // the Item to be addressed
)
-/* [Beschreibung]
+/* [Description]
- Diese Methode kann vom Applikationsentwickler "uberladen werden,
- um an seiner SfxApplication-Subklasse einen DDE-Hotlink einzurichten
+ This method can be overloaded by application developers, to establish
+ a DDE-hotlink to thier SfxApplication subclass.
- Die Basisimplementierung erzeugt keinen und liefert 0 zur"uck.
+ The base implementation is not generate a link and returns 0.
*/
{
@@ -268,21 +263,20 @@ long SfxApplication::DdeSetData
long SfxObjectShell::DdeExecute
(
- const String& rCmd // in unserer BASIC-Syntax formuliert
+ const String& rCmd // Expressed in our BASIC-Syntax
)
-/* [Beschreibung]
+/* [Description]
- Diese Methode kann vom Applikationsentwickler "uberladen werden,
- um an seine SfxObjectShell-Subklasse gerichtete DDE-Kommandos
- zu empfangen.
+ This method can be overloaded by application developers, to receive
+ DDE-commands directed to the thier SfxApplication subclass.
- Die Basisimplementierung f"uhrt nichts aus und liefert 0 zur"uck.
+ The base implementation does nothing and returns 0.
*/
{
StarBASIC* pBasic = GetBasic();
- DBG_ASSERT( pBasic, "Wo ist mein Basic???" ) ;
+ DBG_ASSERT( pBasic, "Where is the Basic???" ) ;
SbxVariable* pRet = pBasic->Execute( rCmd );
if( !pRet )
{
@@ -297,18 +291,17 @@ long SfxObjectShell::DdeExecute
long SfxObjectShell::DdeGetData
(
- const String&, // das anzusprechende Item
+ const String&, // the Item to be addressed
const String&, // in: Format
- ::com::sun::star::uno::Any& // out: angeforderte Daten
+ ::com::sun::star::uno::Any& // out: requested data
)
-/* [Beschreibung]
+/* [Description]
- Diese Methode kann vom Applikationsentwickler "uberladen werden,
- um an seine SfxObjectShell-Subklasse gerichtete DDE-Daten-Anforderungen
- zu empfangen.
+ This method can be overloaded by application developers, to receive
+ DDE-data-requests directed to thier SfxApplication subclass.
- Die Basisimplementierung liefert keine Daten und gibt 0 zur"uck.
+ The base implementation provides no data and returns 0.
*/
{
@@ -319,18 +312,17 @@ long SfxObjectShell::DdeGetData
long SfxObjectShell::DdeSetData
(
- const String&, // das anzusprechende Item
+ const String&, // the Item to be addressed
const String&, // in: Format
- const ::com::sun::star::uno::Any& // out: angeforderte Daten
+ const ::com::sun::star::uno::Any& // out: requested data
)
-/* [Beschreibung]
+/* [Description]
- Diese Methode kann vom Applikationsentwickler "uberladen werden,
- um an seine SfxObjectShell-Subklasse gerichtete DDE-Daten
- zu empfangen.
+ This method can be overloaded by application developers, to receive
+ DDE-data directed to thier SfxApplication subclass.
- Die Basisimplementierung nimmt keine Daten entgegen und liefert 0 zur"uck.
+ The base implementation is not receiving any data and returns 0.
*/
{
@@ -340,15 +332,15 @@ long SfxObjectShell::DdeSetData
//--------------------------------------------------------------------
::sfx2::SvLinkSource* SfxObjectShell::DdeCreateLinkSource
(
- const String& // das zu erzeugende Item
+ const String& // the Item to be addressed
)
-/* [Beschreibung]
+/* [Description]
- Diese Methode kann vom Applikationsentwickler "uberladen werden,
- um an seiner SfxObjectShell-Subklasse einen DDE-Hotlink einzurichten
+ This method can be overloaded by application developers, to establish
+ a DDE-hotlink to thier SfxApplication subclass.
- Die Basisimplementierung erzeugt keinen und liefert 0 zur"uck.
+ The base implementation is not generate a link and returns 0.
*/
{
@@ -376,19 +368,18 @@ void SfxObjectShell::ReconnectDdeLinks(SfxObjectShell& rServer)
long SfxViewFrame::DdeExecute
(
- const String& rCmd // in unserer BASIC-Syntax formuliert
+ const String& rCmd // Expressed in our BASIC-Syntax
)
-/* [Beschreibung]
+/* [Description]
- Diese Methode kann vom Applikationsentwickler "uberladen werden,
- um an seine SfxViewFrame-Subklasse gerichtete DDE-Kommandos
- zu empfangen.
+ This method can be overloaded by application developers, to receive
+ DDE-commands directed to the thier SfxApplication subclass.
- Die Basisimplementierung versteht die API-Funktionalit"at des
- betreffenden SfxViewFrame, der darin dargestellten SfxViewShell und
- der betreffenden SfxObjectShell-Subklasse in BASIC-Syntax.
- R"uckgabewerte k"onnen dabei leider nicht "ubertragen werden.
+ The base implementation understands the API functionality of the
+ relevant SfxViewFrame, which is shown and the relevant SfxViewShell
+ and the relevant SfxApplication subclass in BASIC syntax. Return
+ values can not be transferred, unfortunately.
*/
{
@@ -402,18 +393,17 @@ long SfxViewFrame::DdeExecute
long SfxViewFrame::DdeGetData
(
- const String&, // das anzusprechende Item
+ const String&, // the Item to be addressed
const String&, // in: Format
- ::com::sun::star::uno::Any& // out: angeforderte Daten
+ ::com::sun::star::uno::Any& // out: requested data
)
-/* [Beschreibung]
+/* [Description]
- Diese Methode kann vom Applikationsentwickler "uberladen werden,
- um an seine SfxViewFrame-Subklasse gerichtete DDE-Daten-Anforderungen
- zu empfangen.
+ This method can be overloaded by application developers, to receive
+ DDE-data-requests directed to thier SfxApplication subclass.
- Die Basisimplementierung liefert keine Daten und gibt 0 zur"uck.
+ The base implementation provides no data and returns 0.
*/
{
@@ -424,18 +414,17 @@ long SfxViewFrame::DdeGetData
long SfxViewFrame::DdeSetData
(
- const String& , // das anzusprechende Item
- const String& , // in: Format
- const ::com::sun::star::uno::Any& // out: angeforderte Daten
+ const String&, // the Item to be addressed
+ const String&, // in: Format
+ const ::com::sun::star::uno::Any& // out: requested data
)
-/* [Beschreibung]
+/* [Description]
- Diese Methode kann vom Applikationsentwickler "uberladen werden,
- um an seine SfxViewFrame-Subklasse gerichtete DDE-Daten
- zu empfangen.
+ This method can be overloaded by application developers, to receive
+ DDE-data directed to thier SfxApplication subclass.
- Die Basisimplementierung nimmt keine Daten entgegen und liefert 0 zur"uck.
+ The base implementation is not receiving any data and returns 0.
*/
{
@@ -446,15 +435,15 @@ long SfxViewFrame::DdeSetData
::sfx2::SvLinkSource* SfxViewFrame::DdeCreateLinkSource
(
- const String& // das zu erzeugende Item
+ const String& // the Item to be addressed
)
-/* [Beschreibung]
+/* [Description]
- Diese Methode kann vom Applikationsentwickler "uberladen werden,
- um an seiner SfxViewFrame-Subklasse einen DDE-Hotlink einzurichten
+ This method can be overloaded by application developers, to establish
+ a DDE-hotlink to thier SfxApplication subclass.
- Die Basisimplementierung erzeugt keinen und liefert 0 zur"uck.
+ The base implementation is not generate a link and returns 0.
*/
{
@@ -466,7 +455,7 @@ long SfxViewFrame::DdeSetData
sal_Bool SfxApplication::InitializeDde()
{
DBG_ASSERT( !pAppData_Impl->pDdeService,
- "Dde kann nicht mehrfach initialisiert werden" );
+ "Dde can not be initialized multiple times" );
pAppData_Impl->pDdeService = new ImplDdeService( Application::GetAppName() );
int nError = pAppData_Impl->pDdeService->GetError();
@@ -474,10 +463,10 @@ sal_Bool SfxApplication::InitializeDde()
{
pAppData_Impl->pDocTopics = new SfxDdeDocTopics_Impl;
- // wir wollen auf jedenfall RTF unterstuetzen!
+ // we certainly want to support RTF!
pAppData_Impl->pDdeService->AddFormat( FORMAT_RTF );
- // Config-Pfad als Topic wegen Mehrfachstart
+ // Config path as a topic becauseof multiple starts
INetURLObject aOfficeLockFile( SvtPathOptions().GetUserConfigPath() );
aOfficeLockFile.insertName( DEFINE_CONST_UNICODE( "soffice.lck" ) );
String aService( SfxDdeServiceName_Impl(
@@ -502,19 +491,18 @@ void SfxAppData_Impl::DeInitDDE()
void SfxApplication::AddDdeTopic( SfxObjectShell* pSh )
{
- DBG_ASSERT( pAppData_Impl->pDocTopics, "es gibt gar keinen Dde-Service" );
- //OV: Im Serverbetrieb ist DDE abgeklemmt!
+ DBG_ASSERT( pAppData_Impl->pDocTopics, "There is no Dde-Service" );
+ //OV: DDE is disconnected in server mode!
if( !pAppData_Impl->pDocTopics )
return;
- // doppeltes Eintragen verhindern
+ // prevent double submit
String sShellNm;
sal_Bool bFnd = sal_False;
for( sal_uInt16 n = pAppData_Impl->pDocTopics->Count(); n; )
if( (*pAppData_Impl->pDocTopics)[ --n ]->pSh == pSh )
{
- // falls das Document unbenannt wurde, ist trotzdem ein
- // neues Topics anzulegen!
+ // If the document is untitled, is still a new Topic is created!
if( !bFnd )
{
bFnd = sal_True;
@@ -533,8 +521,8 @@ void SfxApplication::AddDdeTopic( SfxObjectShell* pSh )
void SfxApplication::RemoveDdeTopic( SfxObjectShell* pSh )
{
- DBG_ASSERT( pAppData_Impl->pDocTopics, "es gibt gar keinen Dde-Service" );
- //OV: Im Serverbetrieb ist DDE abgeklemmt!
+ DBG_ASSERT( pAppData_Impl->pDocTopics, "There is no Dde-Service" );
+ //OV: DDE is disconnected in server mode!
if( !pAppData_Impl->pDocTopics )
return;
@@ -561,14 +549,14 @@ DdeService* SfxApplication::GetDdeService()
sal_Bool ImplDdeService::MakeTopic( const String& rNm )
{
- // Workaround gegen Event nach unserem Main() unter OS/2
- // passierte wenn man beim Beenden aus dem OffMgr die App neu startet
+ // Workaround for Event after Main() under OS/2
+ // happens when exiting starts the App again
if ( !Application::IsInExecute() )
return sal_False;
- // das Topic rNm wird gesucht, haben wir es ?
- // erstmal nur ueber die ObjectShells laufen und die mit dem
- // Namen heraussuchen:
+ // The Topic rNm is sought, do we have it?
+ // First only loop over the ObjectShells to find those
+ // with the specific name:
sal_Bool bRet = sal_False;
String sNm( rNm );
sNm.ToLowerAscii();
@@ -578,7 +566,7 @@ sal_Bool ImplDdeService::MakeTopic( const String& rNm )
{
String sTmp( pShell->GetTitle(SFX_TITLE_FULLNAME) );
sTmp.ToLowerAscii();
- if( sTmp == sNm ) // die wollen wir haben
+ if( sTmp == sNm )
{
SFX_APP()->AddDdeTopic( pShell );
bRet = sal_True;
@@ -594,9 +582,7 @@ sal_Bool ImplDdeService::MakeTopic( const String& rNm )
if ( aWorkPath.GetNewAbsURL( rNm, &aFile ) &&
SfxContentHelper::IsDocument( aFile.GetMainURL( INetURLObject::NO_DECODE ) ) )
{
- // File vorhanden
-
- // dann versuche die Datei zu laden:
+ // File exists? then try to load it:
SfxStringItem aName( SID_FILE_NAME, aFile.GetMainURL( INetURLObject::NO_DECODE ) );
SfxBoolItem aNewView(SID_OPEN_NEW_VIEW, sal_True);
@@ -705,7 +691,7 @@ sal_Bool SfxDdeDocTopic_Impl::StartAdviseLoop()
::sfx2::SvLinkSource* pNewObj = pSh->DdeCreateLinkSource( GetCurItem() );
if( pNewObj )
{
- // dann richten wir auch einen entsprechenden SvBaseLink ein
+ // then we also establish a corresponding SvBaseLink
String sNm, sTmp( Application::GetAppName() );
::sfx2::MakeLnkName( sNm, &sTmp, pSh->GetTitle(SFX_TITLE_FULLNAME), GetCurItem() );
new ::sfx2::SvBaseLink( sNm, OBJECT_DDE_EXTERN, pNewObj );
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 1748a9fac469..fe682c3e30e4 100755
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -253,8 +253,8 @@ bool SfxApplication::Initialize_Impl()
#ifdef DBG_UTIL
- // Der SimplerErrorHandler dient Debugzwecken. In der Product werden
- // nichtgehandelte Fehler durch Errorcode 1 an SFX gegeben.
+ // The SimplerErrorHandler is for debugging. In the Product errors
+ // not processed are given to SFX as Errorcode 1.
new SimpleErrorHandler;
#endif
new SfxErrorHandler(RID_ERRHDL, ERRCODE_AREA_TOOLS, ERRCODE_AREA_LIB1);
diff --git a/sfx2/source/appl/appmain.cxx b/sfx2/source/appl/appmain.cxx
index b2017fa94887..00ec4e88ecdd 100755
--- a/sfx2/source/appl/appmain.cxx
+++ b/sfx2/source/appl/appmain.cxx
@@ -98,18 +98,19 @@ void SfxApplication::Init
(
)
-/* [Beschreibung]
-
- Diese virtuelle Methode wird vom SFx aus Application:a:Main() gerufen,
- bevor Execute() ausgef"uhrt wird und
- - das Intro bereits angezeigt ist,
- - das Applikationsfenster exisitiert, aber noch hidden ist,
- - die Bindings bereits existieren (Controller sind anmeldbar),
- - der Ini- und Config-Manager bereits existiert,
- - die Standard-Controller bereits exisitieren,
- - die SFx-Shells ihre Interfaces bereits registriert haben.
-
- [Querverweise]
+/* [Description]
+
+ This virtual method is called from SFx through Application::Main(),
+ before Execute() is called and:
+ - the Intro is already displayed,
+ - the Applications window exists, but it is still hidden,
+ - the Bindings already exist (Controller can be registered),
+ - the Init and Config-Manager already exists,
+ - the Standard-Controller already exists,
+ - the SFx-Shells have alredy registered their Interfaces.
+
+ [Cross-reference]
+
<SfxApplication::Exit()>
<SfxApplication::OpenClients()>
*/
@@ -120,17 +121,17 @@ void SfxApplication::Init
void SfxApplication::Exit()
-/* [Beschreibung]
+/* [Description]
- Diese virtuelle Methode wird vom SFx aus Application::Main() gerufen,
- nachdem Execute() beendet ist und
- - die Konfiguration (SfxConfigManager) bereits gespeichert wurde,
- - die Fensterpostionen etc. in den SfxIniManager geschrieben wurden,
- - das Applikationsfenster noch existiert, aber hidden ist
- - s"amtliche Dokumente und deren Views bereits geschlossen sind.
- - Dispatcher, Bindings etc. bereits zerst"ort sind
+ This virtual method is called from SFx through Application::Main(),
+ after Execute() has finished and
+ - the configuration (SfxConfigManager) was already saved,
+ - the window postions etc. in the SfxIniManager were written,
+ - the Application widow still exists, but is hidden
+ - all Documents and their Views already are closed.
+ - Dispatcher, Bindings etc. already destroyed.
- [Querverweise]
+ [Cross-reference]
<SfxApplication::Init(int,char*[])>
*/
diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx
index ce7c4f8e5547..93abf1c813f8 100755
--- a/sfx2/source/appl/appmisc.cxx
+++ b/sfx2/source/appl/appmisc.cxx
@@ -154,13 +154,12 @@ SFX_IMPL_INTERFACE(SfxApplication,SfxShell,SfxResId(RID_DESKTOP))
//--------------------------------------------------------------------
SfxProgress* SfxApplication::GetProgress() const
-/* [Beschreibung]
+/* [Description]
- Liefert den f"ur die gesamte Applikation laufenden SfxProgress
- oder 0, falls keiner f"ur die gesamte Applikation l"auft.
+ Returns the running SfxProgress for the entire application or 0 if
+ none is running for the entire application.
-
- [Querverweise]
+ [Cross-reference]
<SfxProgress::GetActiveProgress(SfxViewFrame*)>
<SfxViewFrame::GetProgress()const>
@@ -178,7 +177,7 @@ SvUShorts* SfxApplication::GetDisabledSlotList_Impl()
SvUShorts* pList = pAppData_Impl->pDisabledSlotList;
if ( !pList )
{
- // Gibt es eine Slotdatei ?
+ // Is there a slot file?
INetURLObject aUserObj( SvtPathOptions().GetUserConfigPath() );
aUserObj.insertName( DEFINE_CONST_UNICODE( "slots.cfg" ) );
SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( aUserObj.GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READ );
@@ -194,7 +193,7 @@ SvUShorts* SfxApplication::GetDisabledSlotList_Impl()
sal_Bool bSlots = ( pStream && !pStream->GetError() );
if( bSlots && bSlotsEnabled )
{
- // SlotDatei einlesen
+ // Read Slot file
String aTitle;
pStream->ReadByteString(aTitle);
if ( aTitle.CompareToAscii("SfxSlotFile" ) == COMPARE_EQUAL )
@@ -214,21 +213,20 @@ SvUShorts* SfxApplication::GetDisabledSlotList_Impl()
pStream->ReadByteString(aTitle);
if ( aTitle.CompareToAscii("END" ) != COMPARE_EQUAL || pStream->GetError() )
{
- // Lesen schief gegangen
+ // Read failed
DELETEZ( pList );
bError = sal_True;
}
}
else
{
- // Streamerkennung fehlgeschlagen
+ // Stream detection failure
bError = sal_True;
}
}
else if ( bSlots != bSlotsEnabled )
{
- // Wenn kein Slotlist-Eintrag, dann darf auch keine SlotDatei
- // vorhanden sein
+ // If no slot list entry, then no slot file shall exist
bError = sal_True;
}
@@ -244,9 +242,9 @@ SvUShorts* SfxApplication::GetDisabledSlotList_Impl()
if ( bError )
{
- // Wenn ein Sloteintrag vorhanden ist, aber keine oder eine fehlerhafte
- // SlotDatei, oder aber eine Slotdatei, aber kein Sloteintrag, dann
- // gilt dies als fehlerhafte Konfiguration
+ // If an entry slot is present, but no or faulty slot file, or a slot
+ // file, but no slot entry, then this is considered to be a
+ // misconfiguration
new SfxSpecialConfigError_Impl( String( SfxResId( RID_SPECIALCONFIG_ERROR ) ) );
}
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 2b3f35d06170..20b6746476d8 100755
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -153,45 +153,45 @@ void SAL_CALL SfxOpenDocStatusListener_Impl::disposing( const EventObject& ) thr
SfxObjectShellRef SfxApplication::DocAlreadyLoaded
(
- const String& rName, // Name des Dokuments mit Pfad
- sal_Bool bSilent, // sal_True: nicht nach neuer Sicht fragen
- sal_Bool bActivate, // soll bestehende Sicht aktiviert werden
+ const String& rName, // Name of Documents including path
+ sal_Bool bSilent, // sal_True: do not ask for a new view
+ sal_Bool bActivate, // existing view to be activated
sal_Bool bForbidVisible,
const String* pPostStr
)
-/* [Beschreibung]
+/* [Description]
- Stellt fest, ob ein Dokument mit dem Namen 'rName' bereits geladen
- ist und liefert einen Pointer darauf zu"uck.
+ Determines whether a document with the name 'rName' already is loaded and
+ returns a pointer to this document.
- Ist das Dokument noch nicht geladen, wird ein 0-Pointer zur"uckgeliefert.
+ If the document is not loaded, a 0-pointer is returned.
*/
{
- // zu suchenden Namen als URL aufbereiten
+ // prepare to search for names as URL
INetURLObject aUrlToFind( rName );
DBG_ASSERT( aUrlToFind.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL" );
String aPostString;
if ( pPostStr )
aPostString = *pPostStr;
- // noch offen?
+ // still open?
SfxObjectShellRef xDoc;
if ( !aUrlToFind.HasError() )
{
- // dann bei den normal geoeffneten Docs
+ // then with the normally open Documents
if ( !xDoc.Is() )
{
- xDoc = SfxObjectShell::GetFirst( 0, sal_False ); // auch hidden Docs
+ xDoc = SfxObjectShell::GetFirst( 0, sal_False ); // also hidden Documents
while( xDoc.Is() )
{
if ( xDoc->GetMedium() &&
xDoc->GetCreateMode() == SFX_CREATE_MODE_STANDARD &&
!xDoc->IsAbortingImport() && !xDoc->IsLoading() )
{
- // Vergleiche anhand der URLs
+ // Comparisons between URLs
INetURLObject aUrl( xDoc->GetMedium()->GetName() );
if ( !aUrl.HasError() && aUrl == aUrlToFind &&
(!bForbidVisible || !SfxViewFrame::GetFirst( xDoc, sal_True )) &&
@@ -205,11 +205,10 @@ SfxObjectShellRef SfxApplication::DocAlreadyLoaded
}
}
- // gefunden?
+ // Found?
if ( xDoc.Is() && bActivate )
{
- DBG_ASSERT(
- !bForbidVisible, "Unsichtbares kann nicht aktiviert werden" );
+ DBG_ASSERT(!bForbidVisible, "Invisible can not be enabled" );
SfxViewFrame* pFrame;
for( pFrame = SfxViewFrame::GetFirst( xDoc );
@@ -302,17 +301,16 @@ private:
sal_uInt32 CheckPasswd_Impl
(
SfxObjectShell* pDoc,
- SfxItemPool& /*rPool*/, // Pool, falls ein Set erzeugt werden mus
- SfxMedium* pFile // das Medium, dessen Passwort gfs. erfragt werden soll
+ SfxItemPool& /*rPool*/, // Pool, if a Set has to be created
+ SfxMedium* pFile // the Medium and its Password shold be obtained
)
-/* [Beschreibung]
+/* [Description]
- Zu einem Medium das Passwort erfragen; funktioniert nur, wenn es sich
- um einen Storage handelt.
- Wenn in der Documentinfo das Passwort-Flag gesetzt ist, wird
- das Passwort vom Benutzer per Dialog erfragt und an dem Set
- des Mediums gesetzt; das Set wird, wenn nicht vorhanden, erzeugt.
+ Ask for the password for a medium, only works if it concerns storage.
+ If the password flag is set in the Document Info, then the password is
+ requested through a user dialogue and the set at the Set of the medium.
+ If the set does not exist the it is created.
*/
{
sal_uIntPtr nRet = ERRCODE_NONE;
@@ -569,7 +567,7 @@ void SfxApplication::NewDocExec_Impl( SfxRequest& rReq )
{
DBG_MEMTEST();
- // keine Parameter vom BASIC nur Factory angegeben?
+ // No Parameter from BASIC only Factory given?
SFX_REQUEST_ARG(rReq, pTemplNameItem, SfxStringItem, SID_TEMPLATE_NAME, sal_False);
SFX_REQUEST_ARG(rReq, pTemplFileNameItem, SfxStringItem, SID_FILE_NAME, sal_False);
SFX_REQUEST_ARG(rReq, pTemplRegionNameItem, SfxStringItem, SID_TEMPLATE_REGIONNAME, sal_False);
@@ -577,7 +575,7 @@ void SfxApplication::NewDocExec_Impl( SfxRequest& rReq )
SfxObjectShellLock xDoc;
String aTemplateRegion, aTemplateName, aTemplateFileName;
- sal_Bool bDirect = sal_False; // "uber FileName anstelle Region/Template
+ sal_Bool bDirect = sal_False; // through FileName instead of Region/Template
SfxErrorContext aEc(ERRCTX_SFX_NEWDOC);
if ( !pTemplNameItem && !pTemplFileNameItem )
{
@@ -813,8 +811,8 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
rReq.RemoveItem( SID_FILE_NAME );
rReq.AppendItem( SfxStringItem( SID_FILE_NAME, aURL ) );
- // synchron ausf"uhren, damit beim Reschedulen nicht schon das n"achste Dokument
- // geladen wird
+ // Run synchronous, so that not the next document is loaded
+ // when rescheduling
// TODO/LATER: use URLList argument and always remove one document after another, each step in asychronous execution, until finished
// but only if reschedule is a problem
GetDispatcher_Impl()->Execute( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, *rReq.GetArgs() );
diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx
index 6a42effd35ff..993406e41399 100755
--- a/sfx2/source/appl/appquit.cxx
+++ b/sfx2/source/appl/appquit.cxx
@@ -72,13 +72,13 @@ sal_Bool SfxApplication::QueryExit_Impl()
{
sal_Bool bQuit = sal_True;
- // will trotzdem noch jemand, den man nicht abschiessen kann, die App haben?
+ // Does some instance, that can not be shut down, still require the app?
if ( !bQuit )
{
- // nicht wirklich beenden, nur minimieren
+ // Not really exit, only minimize
InfoBox aInfoBox( NULL, SfxResId(MSG_CANT_QUIT) );
aInfoBox.Execute();
- DBG_TRACE( "QueryExit => FALSE (in use)" );
+ OSL_TRACE( "QueryExit => sal_False (in use)" );
return sal_False;
}
@@ -94,14 +94,14 @@ void SfxApplication::Deinitialize()
StarBASIC::Stop();
- // ggf. BASIC speichern
+ // Save BASIC if possible
BasicManager* pBasMgr = BasicManagerRepository::getApplicationBasicManager( false );
if ( pBasMgr && pBasMgr->IsModified() )
SaveBasicManager();
SaveBasicAndDialogContainer();
- pAppData_Impl->bDowning = sal_True; // wegen Timer aus DecAliveCount und QueryExit
+ pAppData_Impl->bDowning = sal_True; // due to Timer from DecAliveCount and QueryExit
DELETEZ( pAppData_Impl->pTemplates );
@@ -122,8 +122,8 @@ void SfxApplication::Deinitialize()
// call derived application-exit
Exit();
- // Controller u."a. freigeben
- // dabei sollten auch restliche Komponenten ( Beamer! ) verschwinden
+ // Release Controller and others
+ // then the remaining components should alse disapear ( Beamer! )
BasicManagerRepository::resetApplicationBasicManager();
pAppData_Impl->pBasicManager->reset( NULL );
// this will also delete pBasMgr
@@ -137,7 +137,7 @@ void SfxApplication::Deinitialize()
SfxResId::DeleteResMgr();
DELETEZ(pAppData_Impl->pOfaResMgr);
- // ab hier d"urfen keine SvObjects mehr existieren
+ // from here no SvObjects have to exists
DELETEZ(pAppData_Impl->pMatcher);
DELETEX(pAppData_Impl->pSlotPool);
diff --git a/sfx2/source/appl/appreg.cxx b/sfx2/source/appl/appreg.cxx
index 5cacf651ec99..743c783471a3 100755
--- a/sfx2/source/appl/appreg.cxx
+++ b/sfx2/source/appl/appreg.cxx
@@ -92,7 +92,7 @@ void SfxApplication::RegisterToolBoxControl_Impl( SfxModule *pMod, SfxTbxCtrlFac
if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
(pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) )
{
- DBG_WARNING("TbxController-Registrierung ist nicht eindeutig!");
+ DBG_WARNING("TbxController registration is not clearly defined!");
}
}
#endif
@@ -117,7 +117,7 @@ void SfxApplication::RegisterStatusBarControl_Impl( SfxModule *pMod, SfxStbCtrlF
if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
(pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) )
{
- DBG_WARNING("StbController-Registrierung ist nicht eindeutig!");
+ DBG_WARNING("StbController registration is not clearly defined!");
}
}
#endif
@@ -142,7 +142,7 @@ void SfxApplication::RegisterMenuControl_Impl( SfxModule *pMod, SfxMenuCtrlFacto
if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
(pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) )
{
- DBG_WARNING("MenuController-Registrierung ist nicht eindeutig!");
+ DBG_WARNING("MenuController register is not clearly defined!");
}
}
#endif
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 7b621ccae9c0..e3c7fd09be5c 100755
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -249,7 +249,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
if this dialog is closed by the user ...
So we ignore this request now and wait for a new user decision.
*/
- DBG_TRACE1( "QueryExit => FALSE (DispatchLevel == %u)", Application::GetDispatchLevel() );
+ OSL_TRACE( "QueryExit => sal_False (DispatchLevel == %u)", Application::GetDispatchLevel() );
return;
}
@@ -265,7 +265,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
// if terminate() was successful, SfxApplication is now dead!
pAppData_Impl->bInQuit = sal_False;
- // Returnwert setzten, ggf. terminieren
+ // Set return value, terminate if possible
rReq.SetReturnValue( SfxBoolItem( rReq.GetSlot(), bTerminated ) );
return;
}
@@ -437,13 +437,12 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case SID_HELPTIPS:
{
- // Parameter aus werten
+ // Evaluate Parameter
SFX_REQUEST_ARG(rReq, pOnItem, SfxBoolItem, SID_HELPTIPS, sal_False);
bool bOn = pOnItem
? ((SfxBoolItem*)pOnItem)->GetValue()
: !Help::IsQuickHelpEnabled();
- // ausf"uhren
if ( bOn )
Help::EnableQuickHelp();
else
@@ -452,7 +451,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
Invalidate(SID_HELPTIPS);
bDone = true;
- // ggf. recorden
+ // Record if possible
if ( !rReq.IsAPI() )
rReq.AppendItem( SfxBoolItem( SID_HELPTIPS, bOn) );
break;
@@ -465,13 +464,12 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
}
case SID_HELPBALLOONS:
{
- // Parameter auswerten
+ // Evaluate Parameter
SFX_REQUEST_ARG(rReq, pOnItem, SfxBoolItem, SID_HELPBALLOONS, sal_False);
bool bOn = pOnItem
? ((SfxBoolItem*)pOnItem)->GetValue()
: !Help::IsBalloonHelpEnabled();
- // ausf"uhren
if ( bOn )
Help::EnableBalloonHelp();
else
@@ -480,7 +478,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
Invalidate(SID_HELPBALLOONS);
bDone = true;
- // ggf. recorden
+ // Record if possible
if ( !rReq.IsAPI() )
rReq.AppendItem( SfxBoolItem( SID_HELPBALLOONS, bOn) );
break;
@@ -602,7 +600,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
rtl::OUStringBuffer aBuf( aToolbarResName );
aBuf.append( pToolbarName->GetValue() );
- // Parameter auswerten
+ // Evaluate Parameter
rtl::OUString aToolbarName( aBuf.makeStringAndClear() );
sal_Bool bShow( !xLayoutManager->isElementVisible( aToolbarName ));
@@ -636,7 +634,7 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
const sal_uInt16 *pRanges = rSet.GetRanges();
- DBG_ASSERT(pRanges && *pRanges, "Set ohne Bereich");
+ DBG_ASSERT(pRanges && *pRanges, "Set without range");
while ( *pRanges )
{
for(sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
@@ -1335,7 +1333,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
void SfxApplication::OfaState_Impl(SfxItemSet &rSet)
{
const sal_uInt16 *pRanges = rSet.GetRanges();
- DBG_ASSERT(pRanges && *pRanges, "Set ohne Bereich");
+ DBG_ASSERT(pRanges && *pRanges, "Set without Region");
while ( *pRanges )
{
for(sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 5cb08dbadecf..252b3f6ab8e2 100755
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -220,7 +220,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
#ifdef DBG_UTIL
ByteString aStr( "No creator method for item: ");
aStr += ByteString::CreateFromInt32( nSlotId );
- DBG_ERROR( aStr.GetBuffer() );
+ OSL_FAIL( aStr.GetBuffer() );
#endif
return;
}
@@ -244,7 +244,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
{
ByteString aStr( "Property not convertable: ");
aStr += pSlot->pUnoName;
- DBG_ERROR( aStr.GetBuffer() );
+ OSL_FAIL( aStr.GetBuffer() );
}
#endif
}
@@ -254,7 +254,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
// for a simple property there can be only one parameter and its name *must* match
ByteString aStr( "Property name does not match: ");
aStr += ByteString( aName, RTL_TEXTENCODING_UTF8 );
- DBG_ERROR( aStr.GetBuffer() );
+ OSL_FAIL( aStr.GetBuffer() );
}
#endif
else
@@ -297,7 +297,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
{
ByteString aDbgStr( "Property not convertable: ");
aDbgStr += pSlot->pUnoName;
- DBG_ERROR( aDbgStr.GetBuffer() );
+ OSL_FAIL( aDbgStr.GetBuffer() );
}
#endif
break;
@@ -310,7 +310,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
// there was a parameter with a name that didn't match to any of the members
ByteString aStr( "Property name does not match: ");
aStr += ByteString( String(rPropValue.Name), RTL_TEXTENCODING_UTF8 );
- DBG_ERROR( aStr.GetBuffer() );
+ OSL_FAIL( aStr.GetBuffer() );
}
#endif
}
@@ -338,7 +338,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
#ifdef DBG_UTIL
ByteString aStr( "No creator method for argument: ");
aStr += rArg.pName;
- DBG_ERROR( aStr.GetBuffer() );
+ OSL_FAIL( aStr.GetBuffer() );
#endif
return;
}
@@ -368,7 +368,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
{
ByteString aStr( "Property not convertable: ");
aStr += rArg.pName;
- DBG_ERROR( aStr.GetBuffer() );
+ OSL_FAIL( aStr.GetBuffer() );
}
#endif
break;
@@ -397,7 +397,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
{
ByteString aStr( "Property not convertable: ");
aStr += rArg.pName;
- DBG_ERROR( aStr.GetBuffer() );
+ OSL_FAIL( aStr.GetBuffer() );
}
#endif
}
@@ -436,7 +436,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
#ifdef DBG_UTIL
ByteString aDbgStr( "Property not convertable: ");
aDbgStr += rArg.pName;
- DBG_ERROR( aDbgStr.GetBuffer() );
+ OSL_FAIL( aDbgStr.GetBuffer() );
#endif
}
@@ -961,7 +961,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
// we will not rely on the "toggle" ability of some property slots
ByteString aStr( "Processing property slot without argument: ");
aStr += ByteString::CreateFromInt32( nSlotId );
- DBG_ERROR( aStr.GetBuffer() );
+ OSL_FAIL( aStr.GetBuffer() );
}
#endif
@@ -1281,7 +1281,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
{
ByteString aStr( "Item not convertable: ");
aStr += ByteString::CreateFromInt32(nSlotId);
- DBG_ERROR( aStr.GetBuffer() );
+ OSL_FAIL( aStr.GetBuffer() );
}
}
else
@@ -1304,7 +1304,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
aStr += ByteString::CreateFromInt32( pType->aAttrib[n-1].nAID );
aStr += " not convertable in slot: ";
aStr += ByteString::CreateFromInt32(nSlotId);
- DBG_ERROR( aStr.GetBuffer() );
+ OSL_FAIL( aStr.GetBuffer() );
}
}
}
@@ -1330,7 +1330,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
{
ByteString aStr( "Item not convertable: ");
aStr += ByteString::CreateFromInt32(rArg.nSlotId);
- DBG_ERROR( aStr.GetBuffer() );
+ OSL_FAIL( aStr.GetBuffer() );
}
}
else
@@ -1353,7 +1353,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
aStr += ByteString::CreateFromInt32( rArg.pType->aAttrib[n-1].nAID );
aStr += " not convertable in slot: ";
aStr += ByteString::CreateFromInt32(rArg.nSlotId);
- DBG_ERROR( aStr.GetBuffer() );
+ OSL_FAIL( aStr.GetBuffer() );
}
}
}
@@ -1429,13 +1429,13 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
pValue[nActProp].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sFrame));
if ( pItem->ISA( SfxUsrAnyItem ) )
{
- OSL_ENSURE( false, "TransformItems: transporting an XFrame via an SfxUsrAnyItem is not deprecated!" );
+ OSL_FAIL( "TransformItems: transporting an XFrame via an SfxUsrAnyItem is not deprecated!" );
pValue[nActProp++].Value = static_cast< const SfxUsrAnyItem* >( pItem )->GetValue();
}
else if ( pItem->ISA( SfxUnoFrameItem ) )
pValue[nActProp++].Value <<= static_cast< const SfxUnoFrameItem* >( pItem )->GetFrame();
else
- OSL_ENSURE( false, "TransformItems: invalid item type for SID_FILLFRAME!" );
+ OSL_FAIL( "TransformItems: invalid item type for SID_FILLFRAME!" );
}
if ( rSet.GetItemState( SID_TEMPLATE, sal_False, &pItem ) == SFX_ITEM_SET )
{
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 4be2c1008214..3473514de3fc 100755
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -213,8 +213,8 @@ SfxChildWindow* SfxChildWindow::CreateChildWindow( sal_uInt16 nId,
SfxChildWinFactory* pFact=0;
sal_uInt16 nOldMode = Application::GetSystemWindowMode();
- // Zuerst ChildWindow im SDT suchen; "Uberlagerungen m"ussen mit einem
- // ChildWindowContext realisiert werden
+ // First search for ChildWindow in SDT; "Overloading has to be realized
+ // by using ChildWindowContext
SfxApplication *pApp = SFX_APP();
{
SfxChildWinFactArr_Impl &rFactories = pApp->GetChildWinFactories_Impl();
@@ -276,12 +276,12 @@ SfxChildWindow* SfxChildWindow::CreateChildWindow( sal_uInt16 nId,
if ( pChild )
pChild->SetFactory_Impl( pFact );
- DBG_ASSERT(pFact && (pChild || !rInfo.bVisible), "ChildWindow-Typ nicht registriert!");
+ DBG_ASSERT(pFact && (pChild || !rInfo.bVisible), "ChildWindow-Typ not registered!");
if ( pChild && !pChild->pWindow )
{
DELETEZ(pChild);
- DBG_WARNING("ChildWindow hat kein Fenster!");
+ DBG_WARNING("ChildWindow has no Window!");
}
return pChild;
@@ -392,15 +392,15 @@ void SfxChildWindow::InitializeChildWinFactory_Impl( sal_uInt16 nId, SfxChildWin
if ( aWinData.Len() )
{
- // Nach Versionskennung suchen
+ // Search for version ID
if ( aWinData.GetChar((sal_uInt16)0) != 0x0056 ) // 'V' = 56h
- // Keine Versionskennung, daher nicht verwenden
+ // A version ID, so do not use
return;
- // 'V' l"oschen
+ // Delete 'V'
aWinData.Erase(0,1);
- // Version lesen
+ // Read version
char cToken = ',';
sal_uInt16 nPos = aWinData.Search( cToken );
sal_uInt16 nActVersion = (sal_uInt16)aWinData.Copy( 0, nPos + 1 ).ToInt32();
@@ -409,7 +409,7 @@ void SfxChildWindow::InitializeChildWinFactory_Impl( sal_uInt16 nId, SfxChildWin
aWinData.Erase(0,nPos+1);
- // Sichtbarkeit laden: ist als ein char codiert
+ // Load Visibility: is coded as a char
rInfo.bVisible = (aWinData.GetChar(0) == 0x0056); // 'V' = 56h
aWinData.Erase(0,1);
nPos = aWinData.Search( cToken );
@@ -418,7 +418,7 @@ void SfxChildWindow::InitializeChildWinFactory_Impl( sal_uInt16 nId, SfxChildWin
sal_uInt16 nNextPos = aWinData.Search( cToken, 2 );
if ( nNextPos != STRING_NOTFOUND )
{
- // es gibt noch Extra-Information
+ // there is extra information
rInfo.nFlags = (sal_uInt16)aWinData.Copy( nPos+1, nNextPos - nPos - 1 ).ToInt32();
aWinData.Erase( nPos, nNextPos-nPos+1 );
rInfo.aExtraString = aWinData;
@@ -447,7 +447,7 @@ void SfxChildWindow::CreateContext( sal_uInt16 nContextId, SfxBindings& rBinding
pFact = rFactories[nFactory];
if ( pFact->nId == GetType() )
{
- DBG_ASSERT( pFact->pArr, "Kein Kontext angemeldet!" );
+ DBG_ASSERT( pFact->pArr, "No context registered!" );
if ( !pFact->pArr )
break;
@@ -479,7 +479,7 @@ void SfxChildWindow::CreateContext( sal_uInt16 nContextId, SfxBindings& rBinding
pFact = rFactories[nFactory];
if ( pFact->nId == GetType() )
{
- DBG_ASSERT( pFact->pArr, "Kein Kontext angemeldet!" );
+ DBG_ASSERT( pFact->pArr, "No context registered!" );
if ( !pFact->pArr )
break;
@@ -504,7 +504,7 @@ void SfxChildWindow::CreateContext( sal_uInt16 nContextId, SfxBindings& rBinding
if ( !pCon )
{
- OSL_FAIL( "Kein geeigneter Context gefunden!" );
+ OSL_FAIL( "No suitable context found! ");
return;
}
@@ -539,7 +539,7 @@ FloatingWindow* SfxChildWindowContext::GetFloatingWindow() const
}
else
{
- OSL_FAIL("Kein FloatingWindow-Context!");
+ OSL_FAIL("No FloatingWindow-Context!");
return NULL;
}
}
@@ -613,7 +613,7 @@ sal_Bool SfxChildWinInfo::GetExtraData_Impl
sal_uInt16 *pPos
) const
{
- // ung"ultig?
+ // invalid?
if ( !aExtraString.Len() )
return sal_False;
String aStr;
@@ -621,8 +621,8 @@ sal_Bool SfxChildWinInfo::GetExtraData_Impl
if ( nPos == STRING_NOTFOUND )
return sal_False;
- // Versuche, den Alignment-String "ALIGN:(...)" einzulesen; wenn
- // er nicht vorhanden ist, liegt eine "altere Version vor
+ // Try to read the alignment string "ALIGN :(...)", but if
+ // it is not present, then use an older version
if ( nPos != STRING_NOTFOUND )
{
sal_uInt16 n1 = aExtraString.Search('(', nPos);
@@ -631,20 +631,20 @@ sal_Bool SfxChildWinInfo::GetExtraData_Impl
sal_uInt16 n2 = aExtraString.Search(')', n1);
if ( n2 != STRING_NOTFOUND )
{
- // Alignment-String herausschneiden
+ // Cut out Alignment string
aStr = aExtraString.Copy(nPos, n2 - nPos + 1);
aStr.Erase(nPos, n1-nPos+1);
}
}
}
- // Zuerst das Alignment extrahieren
+ // First extract the Alignment
if ( !aStr.Len() )
return sal_False;
if ( pAlign )
*pAlign = (SfxChildAlignment) (sal_uInt16) aStr.ToInt32();
- // Dann das LastAlignment
+ // then the LastAlignment
nPos = aStr.Search(',');
if ( nPos == STRING_NOTFOUND )
return sal_False;
@@ -652,10 +652,10 @@ sal_Bool SfxChildWinInfo::GetExtraData_Impl
if ( pLastAlign )
*pLastAlign = (SfxChildAlignment) (sal_uInt16) aStr.ToInt32();
- // Dann die Splitting-Informationen
+ // Then the splitting information
nPos = aStr.Search(',');
if ( nPos == STRING_NOTFOUND )
- // Dockt nicht in einem Splitwindow
+ // No docking in a Splitwindow
return sal_True;
aStr.Erase(0, nPos+1);
Point aChildPos;
@@ -699,8 +699,6 @@ void SfxChildWindow::Hide()
}
}
-
-
void SfxChildWindow::Show( sal_uInt16 nFlags )
{
switch ( pWindow->GetType() )
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index 6380194e403d..b16b673136ec 100755
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -110,9 +110,9 @@ sal_Bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
case FILETYPE_TEXT:
if( FORMAT_FILE == nFmt )
{
- // das Medium muss in der Applikation geoffnet werden, um die
- // relativen Datei Links aufzuloesen!!!! Wird ueber den
- // LinkManager und damit von dessen Storage erledigt.
+ // The media in the application must be opened to lookup the
+ // relative file links!! This is done through the link manager
+ // of the Storage.
rData <<= rtl::OUString( sFileNm );
}
break;
@@ -127,18 +127,15 @@ sal_Bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
{
Graphic aGrf;
- // falls das Nativformat doch erwuenscht ist, muss am
- // Ende das Flag zurueckgesetzt werden.
-// wird einzig und allein im sw/ndgrf.cxx benutzt, wenn der Link vom
-// GraphicNode entfernt wird.
+ // If the native format is reqested, has to be reset at the
+ // end of the flag. Is solely in the sw/ndgrf.cxx used when
+ // the link is removed form GraphicNode.
sal_Bool bOldNativFormat = bNativFormat;
- // falls gedruckt werden soll, warten wir bis die
- // Daten vorhanden sind
+ // If about to print, waiting for the data to be available
if( bGetSynchron )
{
- // testhalber mal ein LoadFile rufen um das nach-
- // laden ueberahaupt anzustossen
+ // call a LoadFile every second time to test the loading
if( !xMed.Is() )
LoadFile_Impl();
@@ -154,13 +151,10 @@ sal_Bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
}
if( pDownLoadData ||
- ( !bWaitForData && ( xMed.Is() || // wurde als URL geladen
+ ( !bWaitForData && ( xMed.Is() || // was loaded as URL
( bSynchron && LoadFile_Impl() && xMed.Is() ) )) )
{
- // falls
-
- // falls es uebers Internet gesogen wurde, nicht
- // wieder versuchen
+ // If it was loaded from the Internet, do not retry
if( !bGetSynchron )
bLoadAgain = !xMed->IsRemote();
bLoadError = !GetGraphic_Impl( aGrf, xMed->GetInStream() );
@@ -206,7 +200,7 @@ sal_Bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
bNativFormat = bOldNativFormat;
- // alles fertig?
+ // Everything ready?
if( xMed.Is() && !bSynchron && bClearMedium )
{
xMed.Clear();
@@ -223,16 +217,12 @@ sal_Bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
return sal_True/*0 != aTypeList.Count()*/;
}
-
-
-
sal_Bool SvFileObject::Connect( sfx2::SvBaseLink* pLink )
{
if( !pLink || !pLink->GetLinkManager() )
return sal_False;
- // teste doch mal, ob nicht ein anderer Link mit der gleichen
- // Verbindung schon existiert
+ // Test if not another link of the same connection already exists
pLink->GetLinkManager()->GetDisplayNames( pLink, 0, &sFileNm, 0, &sFilter );
if( OBJECT_CLIENT_GRF == pLink->GetObjType() )
@@ -270,19 +260,18 @@ sal_Bool SvFileObject::Connect( sfx2::SvBaseLink* pLink )
SetUpdateTimeout( 0 );
- // und jetzt bei diesem oder gefundenem Pseudo-Object anmelden
+ // and now register by this or other found Pseudo-Object
AddDataAdvise( pLink, SotExchange::GetFormatMimeType( pLink->GetContentType()), 0 );
return sal_True;
}
-
sal_Bool SvFileObject::LoadFile_Impl()
{
- // wir sind noch im Laden!!
+ // We are still at Loading!!
if( bWaitForData || !bLoadAgain || xMed.Is() || pDownLoadData )
return sal_False;
- // z.Z. nur auf die aktuelle DocShell
+ // at the moment on the current DocShell
xMed = new SfxMedium( sFileNm, STREAM_STD_READ, sal_True );
SvLinkSource::StreamToLoadFrom aStreamToLoadFrom =
getStreamToLoadFrom();
@@ -305,7 +294,7 @@ sal_Bool SvFileObject::LoadFile_Impl()
bClearMedium = !xMed.Is();
if( bClearMedium )
- xMed = xTmpMed; // falls gleich im DownLoad schon schluss ist
+ xMed = xTmpMed; // If already finished in DownLoad
return bDataReady;
}
@@ -315,7 +304,7 @@ sal_Bool SvFileObject::LoadFile_Impl()
bLoadAgain = !xMed->IsRemote();
bWaitForData = sal_False;
- // Grafik ist fertig, also DataChanged von der Statusaederung schicken:
+ // Graphic is finished, also send DataChanged of the Status change:
SendStateChg_Impl( xMed->GetInStream() && xMed->GetInStream()->GetError()
? sfx2::LinkManager::STATE_LOAD_ERROR : sfx2::LinkManager::STATE_LOAD_OK );
return sal_True;
@@ -333,7 +322,7 @@ sal_Bool SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream )
String aEmptyStr;
int nRes;
- // vermeiden, dass ein native Link angelegt wird
+ // To avoid that a native link is created
if( ( !pStream || !pDownLoadData ) && !rGrf.IsLink() &&
!rGrf.GetContext() && !bNativFormat )
rGrf.SetLink( GfxLink() );
@@ -369,7 +358,7 @@ sal_Bool SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream )
}
else if( sal_False )
{
- // Timer aufsetzen, um zurueck zukehren
+ // Set up Timer, to return back
pDownLoadData->aTimer.Start();
}
}
@@ -383,14 +372,14 @@ sal_Bool SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream )
{
if( xMed.Is() && !pStream )
{
- DBG_WARNING3( "GrafikFehler [%d] - [%s] URL[%s]",
+ DBG_WARNING3( "Graphic error [%d] - [%s] URL[%s]",
nRes,
xMed->GetPhysicalName().GetBuffer(),
sFileNm.GetBuffer() );
}
else
{
- DBG_WARNING2( "GrafikFehler [%d] - [%s]",
+ DBG_WARNING2( "Graphic error [%d] - [%s]",
nRes, sFileNm.GetBuffer() );
}
}
@@ -457,7 +446,7 @@ void SvFileObject::Edit( Window* pParent, sfx2::SvBaseLink* pLink, const Link& r
{
case OBJECT_CLIENT_GRF:
{
- nType = FILETYPE_GRF; // falls noch nicht gesetzt
+ nType = FILETYPE_GRF; // If not set already
SvxOpenGraphicDialog aDlg(SfxResId(RID_SVXSTR_EDITGRFLINK));
aDlg.EnableLink(sal_False);
@@ -516,19 +505,18 @@ void SvFileObject::Edit( Window* pParent, sfx2::SvBaseLink* pLink, const Link& r
IMPL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void*, EMPTYARG )
{
- // wenn wir von hier kommen, kann es kein Fehler mehr sein
+ // When we come form here there it can not be an error no more.
pThis->bLoadError = sal_False;
pThis->bWaitForData = sal_False;
pThis->bInCallDownLoad = sal_False;
if( !pThis->bInNewData && !pThis->bDataReady )
{
- // Grafik ist fertig, also DataChanged von der Status-
- // aederung schicken:
+ // Graphic is finished, also send DataChanged from Status change
pThis->bDataReady = sal_True;
pThis->SendStateChg_Impl( sfx2::LinkManager::STATE_LOAD_OK );
- // und dann nochmal die Daten senden
+ // and then send the data again
pThis->NotifyDataChanged();
}
@@ -561,7 +549,7 @@ IMPL_STATIC_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef*, pDelMed )
IMPL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void*, EMPTYARG )
{
- // wenn wir von hier kommen, kann es kein Fehler mehr sein
+ // When we come form here there it can not be an error no more.
if( pThis->bInNewData )
return 0;
@@ -572,13 +560,11 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void*, EMPTYARG )
{
pThis->pDownLoadData = new Impl_DownLoadData(
STATIC_LINK( pThis, SvFileObject, LoadGrfNewData_Impl ) );
-
- // Null-Link setzen, damit keine temporaeren Grafiken
- // rausgeswapt werden; der Filter prueft, ob schon
- // ein Link gesetzt ist => falls dies zutrifft, wird
- // _kein_ neuer Link gesetzt; der Link muss hier gesetzt werden,
- // (bevor das erste Mal gefiltert wird), um zu verhindern,
- // dass der Kontext zurueckgesetzt wird (aynchrones Laden)
+ // Set Zero-link, so that no temporary graphics can be swapped out,
+ // the filter checks whether a link is set already => if so, is _no_
+ // new link set, the link here must be set (before it is first
+ // filtered), to prevent, that the context will be reset
+ // (aynchronous loading)
if( !pThis->bNativFormat )
{
static GfxLink aDummyLink;
@@ -594,7 +580,7 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void*, EMPTYARG )
if( ERRCODE_IO_PENDING == pStrm->GetError() )
pStrm->ResetError();
- // im DataChanged ein DataReady?
+ // a DataReady in DataChanged?
else if( pThis->bWaitForData && pThis->pDownLoadData )
{
pThis->bLoadError = sal_True;
@@ -603,8 +589,7 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void*, EMPTYARG )
if( pThis->bDataReady )
{
- // Grafik ist fertig, also DataChanged von der Status-
- // aederung schicken:
+ // Graphic is finished, also send DataChanged from Status change
pThis->SendStateChg_Impl( pStrm->GetError() ? sfx2::LinkManager::STATE_LOAD_ERROR : sfx2::LinkManager::STATE_LOAD_OK );
}
@@ -638,14 +623,14 @@ IMPL_LINK( SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
return 0;
}
-/* [Beschreibung]
+/* [Description]
+
+ The method determines whether the data-object can be read from a DDE.
- Die Methode stellt fest, ob aus einem DDE-Object die Daten gelesen
- werden kann.
- Zurueckgegeben wird:
- ERRCODE_NONE wenn sie komplett gelesen wurde
- ERRCODE_SO_PENDING wenn sie noch nicht komplett gelesen wurde
- ERRCODE_SO_FALSE sonst
+ The following can be returned:
+ ERRCODE_NONE if it has been completely read
+ ERRCODE_SO_PENDING if it has not been completely read
+ ERRCODE_SO_FALSE otherwise
*/
sal_Bool SvFileObject::IsPending() const
{
@@ -678,10 +663,10 @@ sal_Bool SvFileObject::IsDataComplete() const
void SvFileObject::CancelTransfers()
{
- // und aus dem Cache austragen, wenn man mitten im Laden ist
+ // unsubscribe from the cache if in the middle of loading
if( !bDataReady )
{
- // nicht noch mal aufsetzen
+ // Do not set-up again
bLoadAgain = sal_False;
bDataReady = bLoadError = bWaitForData = sal_True;
SendStateChg_Impl( sfx2::LinkManager::STATE_LOAD_ABORT );
diff --git a/sfx2/source/appl/fileobj.hxx b/sfx2/source/appl/fileobj.hxx
index 6b4ff850ec53..ceb0f14ea1bc 100755
--- a/sfx2/source/appl/fileobj.hxx
+++ b/sfx2/source/appl/fileobj.hxx
@@ -83,8 +83,7 @@ public:
virtual sal_Bool Connect( sfx2::SvBaseLink* );
virtual void Edit( Window *, sfx2::SvBaseLink *, const Link& rEndEditHdl );
- // erfrage ob das man direkt auf die Daten zugreifen kann oder ob das
- // erst angestossen werden muss
+ // Ask whether you can access data directly or whether it has to be triggered
virtual sal_Bool IsPending() const;
virtual sal_Bool IsDataComplete() const;
diff --git a/sfx2/source/appl/imestatuswindow.cxx b/sfx2/source/appl/imestatuswindow.cxx
index b5126744aa50..092ace28428b 100755
--- a/sfx2/source/appl/imestatuswindow.cxx
+++ b/sfx2/source/appl/imestatuswindow.cxx
@@ -78,7 +78,7 @@ void ImeStatusWindow::init()
}
catch (css::uno::Exception &)
{
- OSL_ENSURE(false, "com.sun.star.uno.Exception");
+ OSL_FAIL("com.sun.star.uno.Exception");
// Degrade gracefully and use the VCL-supplied default if no
// configuration is available.
}
@@ -96,7 +96,7 @@ bool ImeStatusWindow::isShowing()
}
catch (css::uno::Exception &)
{
- OSL_ENSURE(false, "com.sun.star.uno.Exception");
+ OSL_FAIL("com.sun.star.uno.Exception");
// Degrade gracefully and use the VCL-supplied default if no
// configuration is available.
}
@@ -122,7 +122,7 @@ void ImeStatusWindow::show(bool bShow)
}
catch (css::uno::Exception &)
{
- OSL_ENSURE(false, "com.sun.star.uno.Exception");
+ OSL_FAIL("com.sun.star.uno.Exception");
}
}
@@ -143,7 +143,7 @@ ImeStatusWindow::~ImeStatusWindow()
}
catch (css::uno::Exception &)
{
- OSL_ENSURE(false, "com.sun.star.uno.RuntimeException");
+ OSL_FAIL("com.sun.star.uno.RuntimeException");
}
}
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index 20afe00dce15..0aa33ae82c5a 100755
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -237,8 +237,6 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink )
pConnection = new DdeConnection( sServer, sTopic );
if( pConnection->GetError() )
{
- // kann man denn das System-Topic ansprechen ?
- // dann ist der Server oben, kennt nur nicht das Topic!
// Is it possible to address the system-Topic?
// then the server is up, it just does not know the topic!
if( sTopic.EqualsIgnoreCaseAscii( "SYSTEM" ) )
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 7855bfe0ecb3..410640750ec3 100755
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -119,11 +119,7 @@ void LinkManager::CloseCachedComps()
maCachedComps.clear();
}
-/************************************************************************
-|* LinkManager::Remove()
-|*
-|* Description
-*************************************************************************/
+//--------------------------------------------------------------------------
void LinkManager::Remove( SvBaseLink *pLink )
{
@@ -343,7 +339,7 @@ void LinkManager::UpdateAllLinks(
if( USHRT_MAX == nFndPos )
continue; // was not available!
- // Graphic-Links not to update jet
+ // Graphic-Links not to update yet
if( !pLink->IsVisible() ||
( !bUpdateGrfLinks && OBJECT_CLIENT_GRF == pLink->GetObjType() ))
continue;
@@ -361,11 +357,7 @@ void LinkManager::UpdateAllLinks(
CloseCachedComps();
}
-/************************************************************************
-|* SvBaseLink::CreateObject()
-|*
-|* Description
-*************************************************************************/
+//--------------------------------------------------------------------------
SvLinkSourceRef LinkManager::CreateObj( SvBaseLink * pLink )
{
@@ -522,7 +514,7 @@ sal_uIntPtr LinkManager::RegisterStatusInfoId()
// nFormat = Exchange::RegisterFormatName( "StatusInfo vom SvxInternalLink" );
nFormat = SotExchange::RegisterFormatName(
String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM(
- "StatusInfo vom SvxInternalLink" )));
+ "StatusInfo from SvxInternalLink" )));
}
return nFormat;
}
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index 8fae3ed17fa8..598b08988cbb 100755
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -29,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sfx2.hxx"
-
#include <sfx2/lnkbase.hxx>
#include <sot/exchange.hxx>
#include <com/sun/star/uno/Any.hxx>
@@ -131,12 +130,7 @@ public:
sal_Bool IsInDTOR() const { return bIsInDTOR; }
};
-
-/************************************************************************
-|* SvBaseLink::SvBaseLink()
-|*
-|* Description
-*************************************************************************/
+//--------------------------------------------------------------------------
SvBaseLink::SvBaseLink()
{
@@ -147,11 +141,7 @@ SvBaseLink::SvBaseLink()
bWasLastEditOK = sal_False;
}
-/************************************************************************
-|* SvBaseLink::SvBaseLink()
-|*
-|* Description
-*************************************************************************/
+//--------------------------------------------------------------------------
SvBaseLink::SvBaseLink( sal_uInt16 nUpdateMode, sal_uIntPtr nContentType )
{
@@ -167,11 +157,7 @@ SvBaseLink::SvBaseLink( sal_uInt16 nUpdateMode, sal_uIntPtr nContentType )
pImplData->ClientType.bIntrnlLnk = sal_False;
}
-/************************************************************************
-|* SvBaseLink::SvBaseLink()
-|*
-|* Description
-*************************************************************************/
+//--------------------------------------------------------------------------
SvBaseLink::SvBaseLink( const String& rLinkName, sal_uInt16 nObjectType, SvLinkSource* pObj )
{
@@ -208,11 +194,7 @@ SvBaseLink::SvBaseLink( const String& rLinkName, sal_uInt16 nObjectType, SvLinkS
xObj = pObj;
}
-/************************************************************************
-|* SvBaseLink::~SvBaseLink()
-|*
-|* Description
-*************************************************************************/
+//--------------------------------------------------------------------------
SvBaseLink::~SvBaseLink()
{
@@ -242,11 +224,7 @@ IMPL_LINK( SvBaseLink, EndEditHdl, String*, _pNewName )
return 0;
}
-/************************************************************************
-|* SvBaseLink::SetObjType()
-|*
-|* Description
-*************************************************************************/
+//--------------------------------------------------------------------------
void SvBaseLink::SetObjType( sal_uInt16 nObjTypeP )
{
@@ -256,33 +234,21 @@ void SvBaseLink::SetObjType( sal_uInt16 nObjTypeP )
nObjType = nObjTypeP;
}
-/************************************************************************
-|* SvBaseLink::SetName()
-|*
-|* Description
-*************************************************************************/
+//--------------------------------------------------------------------------
void SvBaseLink::SetName( const String & rNm )
{
aLinkName = rNm;
}
-/************************************************************************
-|* SvBaseLink::GetName()
-|*
-|* Description
-*************************************************************************/
+//--------------------------------------------------------------------------
String SvBaseLink::GetName() const
{
return aLinkName;
}
-/************************************************************************
-|* SvBaseLink::SetObj()
-|*
-|* Description
-*************************************************************************/
+//--------------------------------------------------------------------------
void SvBaseLink::SetObj( SvLinkSource * pObj )
{
@@ -293,11 +259,7 @@ void SvBaseLink::SetObj( SvLinkSource * pObj )
xObj = pObj;
}
-/************************************************************************
-|* SvBaseLink::SetLinkSourceName()
-|*
-|* Description
-*************************************************************************/
+//--------------------------------------------------------------------------
void SvBaseLink::SetLinkSourceName( const String & rLnkNm )
{
@@ -315,23 +277,14 @@ void SvBaseLink::SetLinkSourceName( const String & rLnkNm )
ReleaseRef(); // should be superfluous
}
-/************************************************************************
-|* SvBaseLink::GetLinkSourceName()
-|*
-|* Description
-*************************************************************************/
+//--------------------------------------------------------------------------
String SvBaseLink::GetLinkSourceName() const
{
return aLinkName;
}
-
-/************************************************************************
-|* SvBaseLink::SetUpdateMode()
-|*
-|* Description
-*************************************************************************/
+//--------------------------------------------------------------------------
void SvBaseLink::SetUpdateMode( sal_uInt16 nMode )
{
diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx
index 939de61fec1e..1a92d59ea464 100755
--- a/sfx2/source/appl/module.cxx
+++ b/sfx2/source/appl/module.cxx
@@ -197,7 +197,7 @@ SfxSlotPool* SfxModule::GetSlotPool() const
void SfxModule::RegisterChildWindow(SfxChildWinFactory *pFact)
{
- DBG_ASSERT( pImpl, "No real Modul!" );
+ DBG_ASSERT( pImpl, "No real Module!" );
if (!pImpl->pFactArr)
pImpl->pFactArr = new SfxChildWinFactArr_Impl;
@@ -221,7 +221,7 @@ void SfxModule::RegisterChildWindow(SfxChildWinFactory *pFact)
void SfxModule::RegisterChildWindowContext( sal_uInt16 nId,
SfxChildWinContextFactory *pFact)
{
- DBG_ASSERT( pImpl, "No real Modul!" );
+ DBG_ASSERT( pImpl, "No real Module!" );
sal_uInt16 nCount = pImpl->pFactArr->Count();
for (sal_uInt16 nFactory=0; nFactory<nCount; ++nFactory)
diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx
index a3d917725456..0eb111dae184 100755
--- a/sfx2/source/appl/opengrf.cxx
+++ b/sfx2/source/appl/opengrf.cxx
@@ -214,7 +214,7 @@ void SvxOpenGraphicDialog::EnableLink( sal_Bool state )
catch(IllegalArgumentException)
{
#ifdef DBG_UTIL
- DBG_ERROR( "Cannot enable \"link\" checkbox" );
+ OSL_FAIL( "Cannot enable \"link\" checkbox" );
#endif
}
}
@@ -233,7 +233,7 @@ void SvxOpenGraphicDialog::AsLink(sal_Bool bState)
catch(IllegalArgumentException)
{
#ifdef DBG_UTIL
- DBG_ERROR( "Cannot check \"link\" checkbox" );
+ OSL_FAIL( "Cannot check \"link\" checkbox" );
#endif
}
}
@@ -254,7 +254,7 @@ sal_Bool SvxOpenGraphicDialog::IsAsLink() const
catch(IllegalArgumentException)
{
#ifdef DBG_UTIL
- DBG_ERROR( "Cannot access \"link\" checkbox" );
+ OSL_FAIL( "Cannot access \"link\" checkbox" );
#endif
}
diff --git a/sfx2/source/appl/shutdowniconaqua.mm b/sfx2/source/appl/shutdowniconaqua.mm
index 8ce1927f80bf..f30f940e8bac 100755
--- a/sfx2/source/appl/shutdowniconaqua.mm
+++ b/sfx2/source/appl/shutdowniconaqua.mm
@@ -450,7 +450,7 @@ void aqua_init_systray()
if( [NSApp respondsToSelector: @selector(setDockIconClickHandler:)] )
[NSApp performSelector:@selector(setDockIconClickHandler:) withObject: pExecute];
else
- DBG_ERROR( "setDockIconClickHandler selector failed on NSApp\n" );
+ OSL_FAIL( "setDockIconClickHandler selector failed on NSApp\n" );
}
@@ -497,10 +497,10 @@ void aqua_init_systray()
[NSApp performSelector:@selector(addDockMenuItem:) withObject: pDockSubMenu];
}
else
- DBG_ERROR( "addDockMenuItem selector failed on NSApp\n" );
+ OSL_FAIL( "addDockMenuItem selector failed on NSApp\n" );
}
else
- DBG_ERROR( "addFallbackMenuItem selector failed on NSApp\n" );
+ OSL_FAIL( "addFallbackMenuItem selector failed on NSApp\n" );
}
}
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index afab6bc6331d..5036790bfe70 100755
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -597,7 +597,7 @@ SfxWorkWindow::SfxWorkWindow( Window *pWin, SfxBindings& rB, SfxWorkWindow* pPar
m_aProgressBarResName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/progressbar/progressbar" ))
{
DBG_CTOR(SfxWorkWindow, 0);
- DBG_ASSERT (pBindings, "Keine Bindings!");
+ DBG_ASSERT (pBindings, "No Bindings!");
pBindings->SetWorkWindow_Impl( this );
@@ -1028,7 +1028,7 @@ SfxChild_Impl* SfxWorkWindow::RegisterChild_Impl( Window& rWindow,
SfxChildAlignment eAlign, sal_Bool bCanGetFocus )
{
DBG_CHKTHIS(SfxWorkWindow, 0);
- DBG_ASSERT( pChilds->Count() < 255, "too many childs" );
+ DBG_ASSERT( pChilds->Count() < 255, "too many children" );
DBG_ASSERT( SfxChildAlignValid(eAlign), "invalid align" );
DBG_ASSERT( !FindChild_Impl(rWindow), "child registered more than once" );
@@ -2531,7 +2531,6 @@ SfxChildWindow* SfxWorkWindow::GetChildWindow_Impl(sal_uInt16 nId)
void SfxWorkWindow::ResetChildWindows_Impl()
{
-
for ( sal_uInt16 n = 0; n < pChildWins->Count(); ++n )
{
(*pChildWins)[n]->nId = 0;
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index fc284d4c2d19..533320e64acd 100755
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -217,7 +217,7 @@ const SfxFilter* SfxFilterContainer::GetDefaultFilter_Impl( const String& rName
const SfxFilter* pFilter = aMatcher.GetFilter4FilterName(sDefaultFilter);
if (
- (pFilter ) &&
+ (pFilter) &&
(pFilter->GetServiceName().CompareIgnoreCaseToAscii( sServiceName ) != COMPARE_EQUAL)
)
{
@@ -369,7 +369,6 @@ sal_uInt32 SfxFilterMatcher::GuessFilterIgnoringContent(
::rtl::OUString sTypeName;
try
{
- //!MBA: nmust, ndont?
sTypeName = xDetection->queryTypeByURL( rMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) );
}
catch( Exception& )
@@ -399,7 +398,7 @@ if( nErr == 1 || nErr == USHRT_MAX || nErr == ULONG_MAX ) \
aText += ' '; \
aText += ByteString(U2S(pFilter->GetFilterName())); \
} \
- DBG_ERROR( aText.GetBuffer() ); \
+ OSL_FAIL( aText.GetBuffer() ); \
nErr = ERRCODE_ABORT; \
}
diff --git a/sfx2/source/bastyp/frmhtml.cxx b/sfx2/source/bastyp/frmhtml.cxx
index 6ea2f1b50d98..6ebd346e4e5e 100755
--- a/sfx2/source/bastyp/frmhtml.cxx
+++ b/sfx2/source/bastyp/frmhtml.cxx
@@ -72,7 +72,7 @@ void SfxFrameHTMLParser::ParseFrameOptions( SfxFrameDescriptor *pFrame, const HT
// MIB 07/15/1997: Netscape seems to set marginwidth to 0 as soon as
// marginheight is set, and vice versa. Due to bug #41665# let us also
- // do like that for now. Netscape does however not aallow for a direct
+ // do like that for now. Netscape does however not allow for a direct
// seting to 0, while IE4.0 does
// We will not mimic that bug !
sal_Bool bMarginWidth = sal_False, bMarginHeight = sal_False;
diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx
index cc2fd26d2bea..6d12c0e09e2b 100755
--- a/sfx2/source/bastyp/frmhtmlw.cxx
+++ b/sfx2/source/bastyp/frmhtmlw.cxx
@@ -304,7 +304,7 @@ void SfxFrameHTMLWriter::Out_FrameDescriptor(
}
}
- // frame border (MS+Netscape-Erweiterung)
+ // frame border (MS+Netscape-Extension)
aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoBorder")) );
if ( (aAny >>= bVal) && !bVal )
{
diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx
index 24e0bbc630b6..ce3b19725727 100755
--- a/sfx2/source/bastyp/sfxhtml.cxx
+++ b/sfx2/source/bastyp/sfxhtml.cxx
@@ -81,7 +81,7 @@ SfxHTMLParser::SfxHTMLParser( SvStream& rStream, sal_Bool bIsNewDoc,
nMetaTags( 0 )
{
DBG_ASSERT( RTL_TEXTENCODING_DONTKNOW == GetSrcEncoding( ),
- "SfxHTMLParser::SfxHTMLParser: Wo kommt der ZS her?" );
+ "SfxHTMLParser::SfxHTMLParser: From where comes ZS?" );
DBG_ASSERT( !IsSwitchToUCS2(),
"SfxHTMLParser::SfxHTMLParser: Switch to UCS2?" );
@@ -291,7 +291,7 @@ sal_Bool SfxHTMLParser::FinishFileDownload( String& rStr )
if( bOK )
{
SvStream* pStream = pDLMedium->GetInStream();
- DBG_ASSERT( pStream, "Kein In-Stream vom Medium erhalten" );
+ DBG_ASSERT( pStream, "No In-Stream received from Medium" );
SvMemoryStream aStream;
if( pStream )
@@ -299,7 +299,7 @@ sal_Bool SfxHTMLParser::FinishFileDownload( String& rStr )
aStream.Seek( STREAM_SEEK_TO_END );
DBG_ASSERT( aStream.Tell() < STRING_MAXLEN,
- "File zu lang fuer einen String, Ende abgeschnitten" );
+ "File too long for a string, cut off the end" );
xub_StrLen nLen = aStream.Tell() < STRING_MAXLEN
? (xub_StrLen)aStream.Tell()
: STRING_MAXLEN;
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 16111796d32f..9d7c805e6fa9 100755
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -247,7 +247,7 @@ SfxBindings::~SfxBindings()
/* [Description]
Destructor of the SfxBindings class. The one, for each <SfxApplication>
- existing Instance is automaticaölly destroyed by the <SfxApplication>
+ existing Instance is automatically destroyed by the <SfxApplication>
after the execution of <SfxApplication::Exit()>.
The still existing <SfxControllerItem> instances, which are registered
@@ -786,7 +786,7 @@ void SfxBindings::InvalidateShell
sal_False
the inherited and not overloaded Slot-Ids were
invalidiert */
- //! MI: for now alwayds bDeep
+ // for now always bDeep
)
{
DBG_ASSERT( !pImp->bInUpdate, "SfxBindings::Invalidate while in update" );
@@ -800,8 +800,8 @@ void SfxBindings::InvalidateShell
DBG_PROFSTART(SfxBindingsInvalidateAll);
DBG_MEMTEST();
- // Jetzt schon flushen, wird in GetShellLevel(rSh) sowieso gemacht; wichtig,
- // damit pImp->bAll(Msg)Dirty korrekt gesetzt ist
+ // flush now already, it is done in GetShellLevel (rsh) anyway,
+ // important so that is set correctly: pimp-> ball(Msg)Dirty
pDispatcher->Flush();
if ( !pDispatcher ||
@@ -1235,7 +1235,7 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell
if ( SFX_KIND_ENUM == pSlot->GetKind() )
{
// for Enum-Slots, the Master has to be excecuted with the value
- // of the enums Wert
+ // of the enums
const SfxSlot *pRealSlot = pShell->GetInterface()->GetRealSlot(pSlot);
const sal_uInt16 nSlotId = pRealSlot->GetSlotId();
aReq.SetSlot( nSlotId );
@@ -1294,7 +1294,7 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell
{
// Create one Status-Item for each Factory
SfxPoolItem *pNewItem = pSlot->GetType()->CreateItem();
- DBG_ASSERT( pNewItem, "Toggle an Slot ohne ItemFactory" );
+ DBG_ASSERT( pNewItem, "Toggle to slot without ItemFactory" );
pNewItem->SetWhich( nWhich );
if ( pNewItem->ISA(SfxBoolItem) )
@@ -1392,7 +1392,7 @@ SfxItemSet* SfxBindings::CreateSet_Impl
DBG_MEMTEST();
DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
- DBG_ASSERT( !pImp->bMsgDirty, "CreateSet_Impl mit dirty MessageServer" );
+ DBG_ASSERT( !pImp->bMsgDirty, "CreateSet_Impl with dirty MessageServer" );
const SfxSlotServer* pMsgSvr = pCache->GetSlotServer(*pDispatcher, pImp->xProv);
if(!pMsgSvr || !pDispatcher)
@@ -1587,7 +1587,7 @@ void SfxBindings::UpdateControllers_Impl
{
DBG_ASSERT(pSlave, "Wrong SlaveSlot binding!");
DBG_ASSERT(SFX_KIND_ENUM == pSlave->GetKind(),"non enum slaves aren't allowed");
- DBG_ASSERT(pSlave->GetMasterSlotId() == pSlot->GetSlotId(),"falscher MasterSlot!");
+ DBG_ASSERT(pSlave->GetMasterSlotId() == pSlot->GetSlotId(),"Wrong MasterSlot!");
// Binding exist for function ?
SfxStateCache *pEnumCache = GetStateCache( pSlave->GetSlotId() );
diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx
index 5e4bd6561d9b..331baf83480f 100755
--- a/sfx2/source/control/ctrlitem.cxx
+++ b/sfx2/source/control/ctrlitem.cxx
@@ -197,7 +197,7 @@ void SfxControllerItem::UpdateSlot()
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxControllerItem, 0);
- DBG_ASSERT(pBindings, "Keine Bindings");
+ DBG_ASSERT(pBindings, "No Bindings");
pBindings->Update( GetId() );
}
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 013fabd5651d..64aac4862c52 100755
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -409,7 +409,7 @@ SfxDispatcher::~SfxDispatcher()
#ifdef DBG_UTIL
ByteString sTemp( "Delete Dispatcher " );
sTemp += ByteString::CreateFromInt64( (sal_uIntPtr)this );
- DBG_TRACE( sTemp.GetBuffer() );
+ OSL_TRACE( "%s", sTemp.GetBuffer() );
DBG_ASSERT( !pImp->bActive, "deleting active Dispatcher" );
#endif
@@ -508,7 +508,7 @@ void SfxDispatcher::Pop
pImp->aToDoStack.Push( SfxToDo_Impl(bPush, bDelete, bUntil, rShell) );
if ( bFlushed )
{
- DBG_TRACE("Unflushed dispatcher!");
+ OSL_TRACE("Unflushed dispatcher!");
bFlushed = sal_False;
pImp->bUpdated = sal_False;
@@ -745,7 +745,7 @@ void SfxDispatcher::DoActivate_Impl( sal_Bool bMDI, SfxViewFrame* /* pOld */ )
#ifdef DBG_UTIL
ByteString sTemp("Activate Dispatcher ");
sTemp += ByteString::CreateFromInt64( (sal_uIntPtr) this );
- DBG_TRACE(sTemp.GetBuffer());
+ OSL_TRACE( "%s", sTemp.GetBuffer());
DBG_ASSERT( !pImp->bActive, "Activation error" );
#endif
pImp->bActive = sal_True;
@@ -762,7 +762,7 @@ void SfxDispatcher::DoActivate_Impl( sal_Bool bMDI, SfxViewFrame* /* pOld */ )
#ifdef DBG_UTIL
ByteString sTemp("Non-MDI-Activate Dispatcher");
sTemp += ByteString::CreateFromInt64( (sal_uIntPtr) this );
- DBG_TRACE( sTemp.GetBuffer() );
+ OSL_TRACE( "%s", sTemp.GetBuffer() );
#endif
}
@@ -833,7 +833,7 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew )
if ( bMDI )
{
- DBG_TRACE(ByteString("Deactivate Dispatcher ").Append(ByteString::CreateFromInt64( (sal_uIntPtr) this )).GetBuffer());
+ OSL_TRACE(ByteString("Deactivate Dispatcher ").Append(ByteString::CreateFromInt64( (sal_uIntPtr) this )).GetBuffer());
DBG_ASSERT( pImp->bActive, "Deactivate error" );
pImp->bActive = sal_False;
@@ -854,7 +854,7 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew )
}
}
else {
- DBG_TRACE( ByteString ("Non-MDI-DeActivate Dispatcher").Append(ByteString::CreateFromInt64( (sal_uIntPtr) this )).GetBuffer() );
+ OSL_TRACE( ByteString ("Non-MDI-DeActivate Dispatcher").Append(ByteString::CreateFromInt64( (sal_uIntPtr) this )).GetBuffer() );
}
if ( IsAppDispatcher() && !pSfxApp->IsDowning() )
@@ -1841,7 +1841,7 @@ void SfxDispatcher::FlushImpl()
DBG_MEMTEST();
SFX_STACK(SfxDispatcher::FlushImpl);
- DBG_TRACE("Flushing dispatcher!");
+ OSL_TRACE("Flushing dispatcher!");
#ifdef DBG_UTIL
ByteString aMsg( "SfxDispatcher(" );
@@ -1922,7 +1922,7 @@ void SfxDispatcher::FlushImpl()
pImp->bFlushing = sal_False;
pImp->bUpdated = sal_False; // not only when bModify, if Doc/Template-Config
bFlushed = sal_True;
- DBG_TRACE("Successfully flushed dispatcher!");
+ OSL_TRACE("Successfully flushed dispatcher!");
// Activate the Shells and possible delete them in the 2nd round
for ( nToDo = aToDoCopy.Count()-1; nToDo >= 0; --nToDo )
@@ -2624,15 +2624,15 @@ void SfxDispatcher::DebugOutput_Impl() const
DbgGetData()->nTraceOut = DBG_OUT_FILE;
if (bFlushed)
- DBG_TRACE("Flushed");
+ OSL_TRACE("Flushed");
if (pImp->bUpdated)
- DBG_TRACE("Updated");
+ OSL_TRACE("updated");
for ( sal_uInt16 nShell = pImp->aStack.Count(); nShell > 0; --nShell )
{
SfxShell *pShell = GetShell(nShell-1);
const SfxInterface *pIFace = pShell->GetInterface();
- DBG_TRACE (pIFace->GetClassName());
+ OSL_TRACE("%s", pIFace->GetClassName());
}
DbgGetData()->nTraceOut = nOld;
diff --git a/sfx2/source/control/macro.cxx b/sfx2/source/control/macro.cxx
index 46f0e5dd8f79..d14ac4b7790f 100755
--- a/sfx2/source/control/macro.cxx
+++ b/sfx2/source/control/macro.cxx
@@ -73,14 +73,10 @@ SfxMacroStatement::SfxMacroStatement
/* [Description]
- Dieser Konstruktor der Klasse SfxMacroStatement erzeugt ein Statement,
- bei dem ein Objekt angesprochen wird, welches durch 'rShell' angegeben
- ist. Dabei erfolgt die Addressierung je nach 'bAbsolute' absolut,
- also z.B. als '[mydoc.sdc]' oder relativ, also z.B. 'ActiveDocument'.
-
- This constructor of the SfxMacroStatement class generate a statement in
+ This constructor of the SfxMacroStatement class generates a statement in
which an object is brought up, which is given by 'rShell'. Thus It is
- addressing the ever after 'bAbsolute' absolute, for example, as '[mydoc.sdc]', or relative, that is 'active document'.
+ addressing the always after 'bAbsolute' absolute, for example, as
+ '[mydoc.sdc]', or relative, that is 'active document'.
Depending on the subclass of 'rShell', the following terms:
@@ -90,14 +86,14 @@ SfxMacroStatement::SfxMacroStatement
SfxViewFrame' | '[mydoc.sdc:1]' 'ActiveWindow'
SfxViewShell' | '[mydoc.sdc:1]' 'AvtiveWindow'
SfxObjectShell' | '[mydoc.sdc]' 'ActiveDocument'
- sonstige (Sub-Shells) | '[mydoc.sdc:1]' 'ActiveWindow'
-
- Dabei sind 'StarCalc' stellvertretend fuer den Namen der Applikation
- (Application::GetAppName()const). In der absoluten Fassung könnte
- die Selektion auch deskriptiv z.B. als 'CellSelection("A5-D8")')
- angesprochen werden, dazu mu\ jedoch vom Anwendungsprogrammierer der
- Konstruktor <SfxMacroStatement::SfxMacroStatement(const String&,
- const SfxSlot&,sal_Bool,SfxArguments*)> verwendet werden.
+ Other (Sub-Shells) | '[mydoc.sdc:1]' 'ActiveWindow'
+
+ Thus 'StarCalc' is a proxy for the name of the application
+ (Application::GetAppName()const). In the absolute sense of the selection
+ could be addressed as descriptive as in 'cell selection ("A5-D8")'), to do this
+ the application programmer must however use the constructor
+ <SfxMacroStatement::SfxMacroStatement(const String&,
+ const SfxSlot&,sal_Bool,SfxArguments*)>.
For the so-called object is then, depending on the type of slots,
expressed as an assignment to one of its properties or calling its methods.
diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx
index 8538e064418d..f942b17e4dc0 100755
--- a/sfx2/source/control/objface.cxx
+++ b/sfx2/source/control/objface.cxx
@@ -245,7 +245,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, sal_uInt16 nSlotCount )
aStr += ByteString::CreateFromInt32(pMasterSlot->GetSlotId());
aStr += " , ";
aStr += ByteString::CreateFromInt32(pSlave->GetSlotId());
- DBG_ERROR(aStr.GetBuffer());
+ OSL_FAIL(aStr.GetBuffer());
}
if ( pSlave->nMasterSlotId != pMasterSlot->GetSlotId() )
@@ -254,7 +254,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, sal_uInt16 nSlotCount )
aStr += ByteString::CreateFromInt32(pMasterSlot->GetSlotId());
aStr += " , ";
aStr += ByteString::CreateFromInt32(pSlave->GetSlotId());
- DBG_ERROR(aStr.GetBuffer());
+ OSL_FAIL(aStr.GetBuffer());
}
pSlave = pSlave->pNextSlot;
@@ -271,7 +271,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, sal_uInt16 nSlotCount )
aStr += ByteString::CreateFromInt32(pIter->GetSlotId());
aStr += " , ";
aStr += ByteString::CreateFromInt32(pIter->pLinkedSlot->GetSlotId());
- DBG_ERROR(aStr.GetBuffer());
+ OSL_FAIL(aStr.GetBuffer());
}
}
@@ -285,7 +285,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, sal_uInt16 nSlotCount )
aStr += ByteString::CreateFromInt32(pCurSlot->GetSlotId());
aStr += " , ";
aStr += ByteString::CreateFromInt32(pIter->GetSlotId());
- DBG_ERROR(aStr.GetBuffer());
+ OSL_FAIL(aStr.GetBuffer());
}
}
while ( pCurSlot != pIter );
@@ -383,7 +383,7 @@ const SfxSlot* SfxInterface::GetRealSlot( sal_uInt16 nSlotId ) const
{
if(pGenoType)
return pGenoType->GetRealSlot(nSlotId);
- OSL_FAIL("fremder Slot");
+ OSL_FAIL("unkonown Slot");
return 0;
}
@@ -622,7 +622,7 @@ sal_uInt32 SfxInterface::GetObjectBarFeature ( sal_uInt16 nNo ) const
#ifdef DBG_UTIL
sal_uInt16 nObjBarCount = pImpData->pObjectBars->Count();
- DBG_ASSERT( nNo<nObjBarCount,"Objectbar ist unknown!" );
+ DBG_ASSERT( nNo<nObjBarCount,"Objectbar is unknown!" );
#endif
return (*pImpData->pObjectBars)[nNo]->nFeature;
}
diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx
index 32c454c1f1f1..c99badd04d46 100755
--- a/sfx2/source/control/request.cxx
+++ b/sfx2/source/control/request.cxx
@@ -60,23 +60,23 @@ using namespace ::com::sun::star;
struct SfxRequest_Impl: public SfxListener
-/* [Beschreibung]
+/* [Description]
- Implementations-Struktur der Klasse <SfxRequest>.
+ Implementation structur of the <SfxRequest> class.
*/
{
- SfxRequest* pAnti; // Owner wegen sterbendem Pool
- String aTarget; // ggf. von App gesetztes Zielobjekt
- SfxItemPool* pPool; // ItemSet mit diesem Pool bauen
- SfxPoolItem* pRetVal; // R"uckgabewert geh"ort sich selbst
- SfxShell* pShell; // ausgef"uhrt an dieser Shell
- const SfxSlot* pSlot; // ausgef"uhrter Slot
- sal_uInt16 nModifier; // welche Modifier waren gedrueckt?
- sal_Bool bDone; // "uberhaupt ausgef"uhrt
- sal_Bool bIgnored; // vom User abgebrochen
- sal_Bool bCancelled; // nicht mehr zustellen
- sal_Bool bUseTarget; // aTarget wurde von Applikation gesetzt
+ SfxRequest* pAnti; // Owner because of dying pool
+ String aTarget; // if possible from target object set by App
+ SfxItemPool* pPool; // ItemSet build with this pool
+ SfxPoolItem* pRetVal; // Return value belongs to itself
+ SfxShell* pShell; // run from this shell
+ const SfxSlot* pSlot; // executed Slot
+ sal_uInt16 nModifier; // which Modifier was pressed?
+ sal_Bool bDone; // at all executed
+ sal_Bool bIgnored; // Cancelled by the User
+ sal_Bool bCancelled; // no longer notify
+ sal_Bool bUseTarget; // aTarget was set by Application
sal_uInt16 nCallMode; // Synch/Asynch/API/Record
sal_Bool bAllowRecording;
SfxAllItemSet* pInternalArgs;
@@ -133,11 +133,11 @@ SfxRequest::~SfxRequest()
{
DBG_MEMTEST();
- // nicht mit Done() marktierte Requests mit 'rem' rausschreiben
+ // Leave out Done() marked requests with 'rem'
if ( pImp->xRecorder.is() && !pImp->bDone && !pImp->bIgnored )
pImp->Record( uno::Sequence < beans::PropertyValue >() );
- // Objekt abr"aumen
+ // Clear object
delete pArgs;
if ( pImp->pRetVal )
DeleteItemOnIdle(pImp->pRetVal);
@@ -186,13 +186,13 @@ SfxRequest::SfxRequest
)
-/* [Beschreibung]
+/* [Description]
- Mit diesem Konstruktor k"onnen Events, die nicht "uber den SfxDispatcher
- gelaufen sind (z.B aus KeyInput() oder Mouse-Events) nachtr"aglich
- recorded werden. Dazu wird eine SfxRequest-Instanz mit diesem Konstruktor
- erzeugt und dann genauso verfahren, wie mit einem SfxRequest, der in
- eine <Slot-Execute-Methode> als Parameter gegeben wird.
+ With this constructor events can subsequently be recorded that are not run
+ across SfxDispatcher (eg from KeyInput() or mouse events). For this, a
+ SfxRequest instance is created by this constructor and then proceed
+ exactly as with a SfxRequest that in a <Slot-Execute-Method> is given as a
+ parameter.
*/
: nSlot(nSlotId),
@@ -221,7 +221,7 @@ SfxRequest::SfxRequest
{
ByteString aStr( "Recording unsupported slot: ");
aStr += ByteString::CreateFromInt32( pImp->pPool->GetSlotId(nSlotId) );
- DBG_ERROR( aStr.GetBuffer() );
+ OSL_FAIL( aStr.GetBuffer() );
}
#endif
}
@@ -231,9 +231,9 @@ SfxRequest::SfxRequest
SfxRequest::SfxRequest
(
- sal_uInt16 nSlotId, // auszuf"uhrende <Slot-Id>
+ sal_uInt16 nSlotId, // executed <Slot-Id>
SfxCallMode nMode, // Synch/API/...
- SfxItemPool& rPool // ggf. f"ur das SfxItemSet f"ur Parameter
+ SfxItemPool& rPool // necessary for the SfxItemSet for parameters
)
// creates a SfxRequest without arguments
@@ -256,10 +256,10 @@ SfxRequest::SfxRequest
SfxRequest::SfxRequest
(
- const SfxSlot* pSlot, // auszuf"uhrende <Slot-Id>
+ const SfxSlot* pSlot, // executed <Slot-Id>
const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& rArgs,
SfxCallMode nMode, // Synch/API/...
- SfxItemPool& rPool // ggf. f"ur das SfxItemSet f"ur Parameter
+ SfxItemPool& rPool // necessary for the SfxItemSet for parameters
)
: nSlot(pSlot->GetSlotId()),
pArgs(new SfxAllItemSet(rPool)),
@@ -344,16 +344,15 @@ const SfxItemSet* SfxRequest::GetInternalArgs_Impl() const
void SfxRequest_Impl::Record
(
- const uno::Sequence < beans::PropertyValue >& rArgs // aktuelle Parameter
+ const uno::Sequence < beans::PropertyValue >& rArgs // current Parameter
)
-/* [Beschreibung]
+/* [Description]
- Interne Hilfsmethode zum erzeugen einer <SfxMacroStatement>-Instanz,
- welche den bereits ausgef"uhrten SfxRequest wiederholbar beschreibt.
-
- Die erzeugte Instanz, auf die ein Pointer zur"uckgeliefert wird
- geht in das Eigentum des Aufrufers "uber.
+ Internal helper method to create a <SfxMacroStatement> Instance, which
+ repeatable describes the just executed SfxRequest. The ownership of thr
+ created instance, to which a pointer is returned, is handed over to the
+ caller.
*/
{
@@ -408,19 +407,17 @@ void SfxRequest_Impl::Record
void SfxRequest::Record_Impl
(
- SfxShell& rSh, // die <SfxShell>, die den Request ausgef"uhrt hat
- const SfxSlot& rSlot, // der <SfxSlot>, der den Request ausgef"uhrt hat
- com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > xRecorder, // der Recorder, mit dem aufgezeichnet wird
+ SfxShell& rSh, // the <SfxShell>, which has excecuted the Request
+ const SfxSlot& rSlot, // the <SfxSlot>, which has executed the Request
+ com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > xRecorder,
SfxViewFrame* pViewFrame
)
-/* [Beschreibung]
-
- Diese interne Methode markiert den SfxRequest als in dem angegebenen
- SfxMakro aufzuzeichnen.
+/* [Description]
- Pointer auf die Parameter werden in Done() wieder verwendet, m"usseb
- dann also noch leben.
+ This internal method marks the specified SfxMakro SfxRequest as recorded in
+ SfxMakro. Pointer to the parameters in Done() is used again, thus has to
+ still be alive.
*/
{
@@ -466,9 +463,9 @@ void SfxRequest::RemoveItem( sal_uInt16 nID )
const SfxPoolItem* SfxRequest::GetArg
(
- sal_uInt16 nSlotId, // Slot-Id oder Which-Id des Parameters
- bool bDeep, // false: nicht in Parent-ItemSets suchen
- TypeId aType // != 0: RTTI Pruefung mit Assertion
+ sal_uInt16 nSlotId, // Slot-Id or Which-Id of the parameters
+ bool bDeep, // sal_False: do not seach in the Parent-ItemSets
+ TypeId aType // != 0: RTTI check with Assertion
) const
{
return GetItem( pArgs, nSlotId, bDeep, aType );
@@ -479,22 +476,19 @@ const SfxPoolItem* SfxRequest::GetArg
const SfxPoolItem* SfxRequest::GetItem
(
const SfxItemSet* pArgs,
- sal_uInt16 nSlotId, // Slot-Id oder Which-Id des Parameters
- bool bDeep, // false: nicht in Parent-ItemSets suchen
- TypeId aType // != 0: RTTI Pruefung mit Assertion
+ sal_uInt16 nSlotId, // Slot-Id or Which-Id of the parameters
+ bool bDeep, // sal_False: do not seach in the Parent-ItemSets
+ TypeId aType // != 0: RTTI check with Assertion
)
-/* [Beschreibung]
-
- Mit dieser Methode wird der Zugriff auf einzelne Parameter im
- SfxRequest wesentlich vereinfacht. Insbesondere wird die Typpr"ufung
- (per Assertion) durchgef"uhrt, wodurch die Applikations-Sourcen
- wesentlich "ubersichtlicher werden. In der PRODUCT-Version wird
- eine 0 zur"uckgegeben, wenn das gefundene Item nicht von der
- angegebenen Klasse ist.
+/* [Description]
+ With this method the access to individual parameters in the SfxRequest is
+ simplified. In particular the type-examination (by Assertion) is performed,
+ whereby the application source code will be much clearer. In the product-
+ version is a 0 returned, if the found item is not of the specified class.
- [Beispiel]
+ [Example]
void MyShell::Execute( SfxRequest &rReq )
{
@@ -503,12 +497,12 @@ const SfxPoolItem* SfxRequest::GetItem
case SID_MY:
{
...
- // ein Beispiel ohne Verwendung des Makros
+ // An Example on not using the macros
const SfxInt32Item *pPosItem = (const SfxUInt32Item*)
rReq.GetArg( SID_POS, sal_False, TYPE(SfxInt32Item) );
sal_uInt16 nPos = pPosItem ? pPosItem->GetValue() : 0;
- // ein Beispiel mit Verwendung des Makros
+ // An Example on using the macros
SFX_REQUEST_ARG(rReq, pSizeItem, SfxInt32Item, SID_SIZE, sal_False);
sal_uInt16 nSize = pSizeItem ? pPosItem->GetValue() : 0;
@@ -523,24 +517,24 @@ const SfxPoolItem* SfxRequest::GetItem
{
if ( pArgs )
{
- // ggf. in Which-Id umrechnen
+ // Which may be converted to ID
sal_uInt16 nWhich = pArgs->GetPool()->GetWhich(nSlotId);
- // ist das Item gesetzt oder bei bDeep==TRUE verf"ugbar?
+ // Is the item set or available at bDeep == sal_True?
const SfxPoolItem *pItem = 0;
if ( ( bDeep ? SFX_ITEM_AVAILABLE : SFX_ITEM_SET )
<= pArgs->GetItemState( nWhich, bDeep, &pItem ) )
{
- // stimmt der Typ "uberein?
+ // Compare type
if ( !pItem || pItem->IsA(aType) )
return pItem;
- // Item da aber falsch => Programmierfehler
+ // Item of wrong type => Programming error
OSL_FAIL( "invalid argument type" );
}
}
- // keine Parameter, nicht gefunden oder falschen Typ gefunden
+ // No Parameter, not found or wrong type
return 0;
}
@@ -548,7 +542,7 @@ const SfxPoolItem* SfxRequest::GetItem
void SfxRequest::SetReturnValue(const SfxPoolItem &rItem)
{
- DBG_ASSERT(!pImp->pRetVal, "Returnwert mehrfach setzen?");
+ DBG_ASSERT(!pImp->pRetVal, "Set Return value multiple times?");
if(pImp->pRetVal)
delete pImp->pRetVal;
pImp->pRetVal = rItem.Clone();
@@ -565,47 +559,42 @@ const SfxPoolItem* SfxRequest::GetReturnValue() const
void SfxRequest::Done
(
- const SfxItemSet& rSet, /* von der Applikation mitgeteilte Parameter,
- die z.B. in einem Dialog vom Benuter
- erfragt wurden, ggf. 0 falls keine
- Parameter gesetzt wurden */
+ const SfxItemSet& rSet, /* parameters passed on by the application,
+ that for example were asked for by the user
+ in a dialogue, 0 if no parameters have been
+ set */
- bool bKeep /* true (default)
- 'rSet' wird gepeichert und ist "uber
- GetArgs() abfragbar
+ bool bKeep /* true (default)
+ 'rSet' is saved and GetArgs() queriable.
false
- 'rSet' wird nicht kopiert (schneller) */
+ 'rSet' is not copied (faster) */
)
-/* [Beschreibung]
+/* [Description]
- Diese Methode mu\s in der <Execute-Methode> des <SfxSlot>s gerufen
- werden, der den SfxRequest ausgef"uhrt hat, wenn die Ausf"uhrung
- tats"achlich stattgefunden hat. Wird 'Done()' nicht gerufen, gilt
- der SfxRequest als abgebrochen.
+ This method must be called in the <Execute-Method> of the <SfxSlot>s, which
+ has performed the SfxRequest when the execution actually took place. If
+ 'Done()' is not called, then the SfxRequest is considered canceled.
- Etwaige Returnwerte werden nur durchgereicht, wenn 'Done()' gerufen
- wurde. Ebenso werden beim Aufzeichnen von Makros nur echte
- Statements erzeugt, wenn 'Done()' gerufen wurde; f"ur SfxRequests,
- die nicht derart gekennzeichnet wurden, wird anstelle dessen eine
- auf die abgebrochene Funktion hinweisende Bemerkung ('rem') eingf"ugt.
+ Any return values are passed only when 'Done()' was called. Similar, when
+ recording a macro only true statements are generated if 'Done()' was
+ called; for SfxRequests that were not identified as such will instead
+ be commented out by inserting ('rem').
+ [Note]
- [Anmerkung]
-
- 'Done()' wird z.B. nicht gerufen, wenn ein durch die Funktion gestarteter
- Dialog vom Benutzer abgebrochen wurde oder das Ausf"uhren aufgrund
- eines falschen Kontextes (ohne Verwendung separater <SfxShell>s)
- nicht durchgef"uhrt werden konnte. 'Done()' mu\s sehr wohl gerufen
- werden, wenn das Ausf"uhren der Funktion zu einem regul"aren Fehler
- f"uhrte (z.B. Datei konnte nicht ge"offnet werden).
+ 'Done ()' is not called, for example when a dialoge started by the function
+ was canceled by the user or if the execution could not be performed due to
+ a wrong context (without use of separate <SfxShell>s). 'Done ()' will be
+ launched, when executing the function led to a regular error
+ (for example, file could not be opened).
*/
{
Done_Impl( &rSet );
- // ggf. Items merken, damit StarDraw sie abfragen kann
+ // Keep items if possible, so they can be queried by StarDraw.
if ( bKeep )
{
if ( !pArgs )
@@ -657,10 +646,10 @@ sal_Bool SfxRequest::IsCancelled() const
void SfxRequest::Cancel()
-/* [Beschreibung]
+/* [Description]
- Markiert diesen Request als nicht mehr auszufuehren. Wird z.B. gerufen,
- wenn das Ziel (genauer dessen Pool) stirbt.
+ Marks this request as no longer executable. For example, if called when
+ the target (more precisely, its pool) dies.
*/
{
@@ -674,22 +663,20 @@ void SfxRequest::Cancel()
void SfxRequest::Ignore()
-/* [Beschreibung]
-
- Wird diese Methode anstelle von <SfxRequest::Done()> gerufen, dann
- wird dieser Request nicht recorded.
+/* [Description]
+ If this method is called instead of <SfxRequest::Done()>, then this
+ request is not recorded.
- [Bespiel]
+ [Example]
- Das Selektieren von Tools im StarDraw soll nicht aufgezeichnet werden,
- dieselben Slots sollen aber zum erzeugen der von den Tools zu
- erzeugenden Objekte verwendet werde. Also kann nicht NoRecord
- angegeben werden, dennoch soll u.U. nicht aufgezeichnet werden.
+ The selecting of tools in StarDraw should not be recorded, but the same
+ slots are to be used from the generation of the tools to the generated
+ objects. Thus can NoRecords not be specified, i.e. should not be recorded.
*/
{
- // als tats"achlich ausgef"uhrt markieren
+ // Mark as actually executed
pImp->bIgnored = sal_True;
}
@@ -697,55 +684,56 @@ void SfxRequest::Ignore()
void SfxRequest::Done_Impl
(
- const SfxItemSet* pSet /* von der Applikation mitgeteilte Parameter,
- die z.B. in einem Dialog vom Benuter
- erfragt wurden, ggf. 0 falls keine
- Parameter gesetzt wurden */
+ const SfxItemSet* pSet /* parameters passed on by the application,
+ that for example were asked for by the user
+ in a dialogue, 0 if no parameters have been
+ set */
+
)
-/* [Beschreibung]
+/* [Description]
- Interne Methode zum als 'done' markieren des SfxRequest und zum Auswerten
- der Parameter in 'pSet' falls aufgezeichnet wird.
+ Internal method to mark SfxRequest with 'done' and to evaluate the
+ parameters in 'pSet' in case it is recorded.
*/
{
- // als tats"achlich ausgef"uhrt markieren
+ // Mark as actually executed
pImp->bDone = sal_True;
- // nicht Recorden
+ // not Recording
if ( !pImp->xRecorder.is() )
return;
- // wurde ein anderer Slot ausgef"uhrt als angefordert (Delegation)
+ // was running a different slot than requested (Delegation)
if ( nSlot != pImp->pSlot->GetSlotId() )
{
- // Slot neu suchen
+ // Search Slot again
pImp->pSlot = pImp->pShell->GetInterface()->GetSlot(nSlot);
DBG_ASSERT( pImp->pSlot, "delegated SlotId not found" );
- if ( !pImp->pSlot ) // Hosentr"ger und G"urtel
+ if ( !pImp->pSlot ) // playing it safe
return;
}
- // record-f"ahig?
- // neues Recorden verwendet UnoName!
+ // recordable?
+ // new Recording uses UnoName!
if ( !pImp->pSlot->pUnoName )
{
ByteString aStr( "Recording not exported slot: ");
aStr += ByteString::CreateFromInt32( pImp->pSlot->GetSlotId() );
- DBG_ERROR( aStr.GetBuffer() );
+ OSL_FAIL( aStr.GetBuffer() );
}
- if ( !pImp->pSlot->pUnoName ) // Hosentr"ger und G"urtel
+ if ( !pImp->pSlot->pUnoName ) // playing it safe
return;
- // "ofters ben"otigte Werte
+ // often required values
SfxItemPool &rPool = pImp->pShell->GetPool();
// Property-Slot?
if ( !pImp->pSlot->IsMode(SFX_SLOT_METHOD) )
{
- // des Property als SfxPoolItem besorgen
+ // get the property as SfxPoolItem
const SfxPoolItem *pItem;
sal_uInt16 nWhich = rPool.GetWhich(pImp->pSlot->GetSlotId());
SfxItemState eState = pSet ? pSet->GetItemState( nWhich, sal_False, &pItem ) : SFX_ITEM_UNKNOWN;
@@ -754,7 +742,7 @@ void SfxRequest::Done_Impl
{
ByteString aStr( "Recording property not available: ");
aStr += ByteString::CreateFromInt32( pImp->pSlot->GetSlotId() );
- DBG_ERROR( aStr.GetBuffer() );
+ OSL_FAIL( aStr.GetBuffer() );
}
#endif
uno::Sequence < beans::PropertyValue > aSeq;
@@ -763,7 +751,7 @@ void SfxRequest::Done_Impl
pImp->Record( aSeq );
}
- // alles in ein einziges Statement aufzeichnen?
+ // record everything in a single statement?
else if ( pImp->pSlot->IsMode(SFX_SLOT_RECORDPERSET) )
{
uno::Sequence < beans::PropertyValue > aSeq;
@@ -772,27 +760,27 @@ void SfxRequest::Done_Impl
pImp->Record( aSeq );
}
- // jedes Item als einzelnes Statement recorden
+ // record each item as a single statement
else if ( pImp->pSlot->IsMode(SFX_SLOT_RECORDPERITEM) )
{
if ( pSet )
{
- // "uber die Items iterieren
+ // iterate over Items
SfxItemIter aIter(*pSet);
for ( const SfxPoolItem* pItem = aIter.FirstItem(); pItem; pItem = aIter.NextItem() )
{
- // die Slot-Id f"ur das einzelne Item ermitteln
+ // to determine the slot ID for the individual item
sal_uInt16 nSlotId = rPool.GetSlotId( pItem->Which() );
if ( nSlotId == nSlot )
{
- // mit Hosentr"ager und G"urtel reparieren des falschen Flags
+ // play it safe; repair the wrong flags
OSL_FAIL( "recursion RecordPerItem - use RecordPerSet!" );
SfxSlot *pSlot = (SfxSlot*) pImp->pSlot;
pSlot->nFlags &= ~((sal_uIntPtr)SFX_SLOT_RECORDPERITEM);
pSlot->nFlags &= SFX_SLOT_RECORDPERSET;
}
- // einen Sub-Request recorden
+ // Record a Sub-Request
SfxRequest aReq( pImp->pViewFrame, nSlotId );
if ( aReq.pImp->pSlot )
aReq.AppendItem( *pItem );
@@ -801,7 +789,7 @@ void SfxRequest::Done_Impl
}
else
{
- HACK(hierueber nochmal nachdenken)
+ //HACK(think about this again)
pImp->Record( uno::Sequence < beans::PropertyValue >() );
}
}
@@ -811,18 +799,16 @@ void SfxRequest::Done_Impl
sal_Bool SfxRequest::IsDone() const
-/* [Beschreibung]
-
- Mit dieser Methode kann abgefragt werden, ob der SfxRequest tats"achlich
- ausgef"uhrt wurde oder nicht. Wurde ein SfxRequest nicht ausgef"uhrt,
- liegt dies z.B. daran, da\s der Benutzer abgebrochen hat oder
- der Kontext f"ur diesen Request falsch war, dieses aber nicht "uber
- eine separate <SfxShell> realisiert wurde.
+/* [Description]
- SfxRequest-Instanzen, die hier sal_False liefern, werden nicht recorded.
+ With this method it can be queried whether the SfxRequest was actually
+ executed or not. If a SfxRequest was not executed, then this is for example
+ because it was canceled by the user or the context for this request was
+ wrong, this was not implemented on a separate <SfxShell>.
+ SfxRequest instances that return sal_False will not be recorded.
- [Querverweise]
+ [Cross-reference]
<SfxRequest::Done(const SfxItemSet&)>
<SfxRequest::Done()>
@@ -836,10 +822,10 @@ sal_Bool SfxRequest::IsDone() const
SfxMacro* SfxRequest::GetRecordingMacro()
-/* [Beschreibung]
+/* [Description]
- Mit dieser Methode kann abgefragt werden, ob und in welchem <SfxMacro>
- die SfxRequests gerade aufgezeichnet werden.
+ With this method it can be queried as to whether and to what <SfxMacro>
+ the SfxRequests is being recorded.
*/
{
@@ -850,12 +836,13 @@ SfxMacro* SfxRequest::GetRecordingMacro()
com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > SfxRequest::GetMacroRecorder( SfxViewFrame* pView )
-/* [Beschreibung]
+/* [Description]
- Hier wird versucht einen Recorder fuer dispatch() Aufrufe vom Frame zu bekommen.
- Dieser ist dort per Property an einem Supplier verfuegbar - aber nur dann, wenn
- recording angeschaltet wurde.
- (Siehe auch SfxViewFrame::MiscExec_Impl() und SID_RECORDING)
+ This recorder is an attempt for dispatch () to get calls from the Frame.
+ This is then available through a property by a supplier but only when
+ recording was turned on.
+
+ (See also SfxViewFrame::MiscExec_Impl() and SID_RECORDING)
*/
{
@@ -887,10 +874,10 @@ sal_Bool SfxRequest::HasMacroRecorder( SfxViewFrame* pView )
sal_Bool SfxRequest::IsAPI() const
-/* [Beschreibung]
+/* [Description]
- Liefert sal_True, wenn dieser SfxRequest von einer API (z.B. BASIC)
- erzeugt wurde, sonst sal_False.
+ Returns sal_True if this SfxRequest was generated by an API (for example BASIC),
+ otherwise sal_False.
*/
{
@@ -902,13 +889,13 @@ sal_Bool SfxRequest::IsAPI() const
bool SfxRequest::IsRecording() const
-/* [Beschreibung]
+/* [Description]
- Liefert sal_True, wenn dieser SfxRequest recorded werden soll, d.h.
- 1. zu Zeit ein Makro aufgezeichnet wird
- 2. dieser Request "uberhaupt aufgezeichnet wird
- 3. der Request nicht von reiner API (z.B. BASIC) ausgeht,
- sonst sal_False.
+ Returns sal_True if this SfxRequest is to be recorded ie
+ 1. Currently a macro is beeing recorded
+ 2. This request is even recorded
+ 3. the request did not originate from a pure API (for example BASIC),
+ otherwise sal_False.
*/
{
@@ -931,19 +918,18 @@ sal_uInt16 SfxRequest::GetModifier() const
void SfxRequest::SetTarget( const String &rTarget )
-/* [Beschreibung]
-
- Mit dieser Methode kann das zu recordende Zielobjekt umgesetzt werden.
+/* [Description]
+ With this method the recording of the target object can be implemented.
- [Beispiel]
+ [Example]
- Die BASIC-Methode 'Open' wird zwar von der Shell 'Application' ausgef"uhrt,
- aber am Objekt 'Documents' (global) recorded:
+ The BASIC-Methode 'Open' is although executed by the Shell 'Application'
+ but recorded on the Objekt 'Documents' (global):
rReq.SetTarget( "Documents" );
- Dies f"uhrt dann zu:
+ This then leads to:
Documents.Open( ... )
*/
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index f02fa16e8bdb..ecebb51c40b2 100755
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -74,11 +74,12 @@ using namespace com::sun::star;
//=========================================================================
struct SfxShell_Impl: public SfxBroadcaster
{
- String aObjectName;// Name des Sbx-Objects
- SfxItemArray_Impl aItems; // Datenaustausch auf Item-Basis
- SfxViewShell* pViewSh; // SfxViewShell falls Shell ViewFrame/ViewShell/SubShell ist
- SfxViewFrame* pFrame; // Frame, falls <UI-aktiv>
- SfxRepeatTarget* pRepeatTarget;
+ String aObjectName; // Name of Sbx-Objects
+ SfxItemArray_Impl aItems; // Data exchange on Item level
+ SfxViewShell* pViewSh; // SfxViewShell if Shell is
+ // ViewFrame/ViewShell/SubShell list
+ SfxViewFrame* pFrame; // Frame, if <UI-active>
+ SfxRepeatTarget* pRepeatTarget; // SbxObjectRef xParent;
sal_Bool bInAppBASIC;
sal_Bool bActive;
sal_uIntPtr nDisableFlags;
@@ -86,6 +87,7 @@ struct SfxShell_Impl: public SfxBroadcaster
svtools::AsynchronLink* pExecuter;
svtools::AsynchronLink* pUpdater;
SfxVerbSlotArr_Impl aSlotArr;
+
com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor > aVerbList;
SfxShell_Impl() : pExecuter( 0 ), pUpdater( 0 ) {}
~SfxShell_Impl() { delete pExecuter; delete pUpdater;}
@@ -96,10 +98,10 @@ struct SfxShell_Impl: public SfxBroadcaster
String SfxShellIdent_Impl( const SfxShell *pSh )
-/* [Beschreibung]
+/* [Description]
- Interne Hilfesfunktion. Liefert einen die SfxShell 'pSh' beschreibenden
- String zur"uck. Z.B.: SfxApplication[StarWriter]
+ Internal helper function. Returns a SfxShell 'pSh' descriptive string.
+ For instance: SfxApplication [StarWriter]
*/
{
@@ -130,11 +132,11 @@ void SfxShell::EmptyStateStub(SfxShell *, SfxItemSet &)
SfxShell::SfxShell()
-/* [Beschreibung]
+/* [Description]
- Der Konstruktor der Klasse SfxShell initialisierung nur einfache
- Typen, das dazugeh"orige SbxObject wird erst on-demand erzeugt.
- Daher ist das Anlegen einer SfxShell Instanz sehr billig.
+ The constructor of the SfxShell class initializes only simple types,
+ the corresponding SbxObject is only created on-demand. Therefore,
+ the application of a SfxShell instance is very cheap.
*/
: pImp(0),
@@ -156,11 +158,11 @@ SfxShell::SfxShell()
SfxShell::SfxShell( SfxViewShell *pViewSh )
-/* [Beschreibung]
+/* [Description]
- Der Konstruktor der Klasse SfxShell initialisierung nur einfache
- Typen, das dazugeh"orige SbxObject wird erst on-demand erzeugt.
- Daher ist das Anlegen einer SfxShell Instanz sehr billig.
+ The constructor of the SfxShell class initializes only simple types,
+ the corresponding SbxObject is only created on-demand. Therefore,
+ the application of a SfxShell instance is very cheap.
*/
: pImp(0),
@@ -181,11 +183,11 @@ SfxShell::SfxShell( SfxViewShell *pViewSh )
SfxShell::~SfxShell()
-/* [Beschreibung]
+/* [Description]
- Die Verbindungs zu einem ggf. zugeh"origen SbxObject wird gel"ost.
- Das SbxObject existiert ggf. weiter, kann aber keine Funktionen
- mehr ausf"uhren und keine Properties mehr bereitstellen.
+ The connection to a possible corresponding SbxObject is dissolved.
+ The SbxObject may continoue to exist, but can not any longer perform
+ any functions and can not provide any properties.
*/
{
@@ -197,10 +199,10 @@ SfxShell::~SfxShell()
void SfxShell::SetName( const String &rName )
-/* [Beschreibung]
+/* [Description]
- Setzt den Namen des Shell-Objekts. Mit diesem Namen kann die
- SfxShell-Instanz vom BASIC aus angesprochen werden.
+ Sets the name of the Shell object. With this name, the SfxShell instance
+ of BASIC can be expressed.
*/
{
@@ -211,10 +213,10 @@ void SfxShell::SetName( const String &rName )
const String& SfxShell::GetName() const
-/* [Beschreibung]
+/* [Description]
- Liefert den Namen des Shell-Objekts. Mit diesem Namen kann die
- SfxShell-Instanz vom BASIC aus angesprochen werden.
+ Returns the name of the Shell object. With this name, the SfxShell instance
+ of BASIC can be expressed.
*/
{
@@ -225,11 +227,11 @@ const String& SfxShell::GetName() const
SvGlobalName SfxShell::GetGlobalName() const
-/* [Beschreibung]
+/* [Description]
- Liefert den Global Unique Identifier des Shell-Objekts. Mit diesem
- Namen kann die SfxShell-Instanz z.B. via OLE Automation angesprochen
- werden, bzw. in der Registration-Database gefunden werden.
+ Provides the Global Unique Identifier of the Shell object. With this name
+ can the SfxShell instance for example be expressed via OLE Automation, or
+ be found in the Registration Database.
*/
{
@@ -240,14 +242,13 @@ SvGlobalName SfxShell::GetGlobalName() const
SfxDispatcher* SfxShell::GetDispatcher() const
-/* [Beschreibung]
+/* [Description]
- Diese Methode liefert einen Pointer auf den <SfxDispatcher>, in
- dem die SfxShell gerade <UI-aktiv> ist bzw. einen 0-Pointer, wenn
- sie gerade nicht UI-aktiv ist.
+ This method returns a pointer to the <SfxDispatcher>, when the SfxShell
+ is currently <UI-active> or a NULL-pointer if it is not UI-active.
- Der zur"uckgegebene Pointer ist nur im unmittelbaren Kontext des
- Methodenaufrufs g"ultig.
+ The returned pointer is only valid in the immediate context of the method
+ call.
*/
{
@@ -258,10 +259,11 @@ SfxDispatcher* SfxShell::GetDispatcher() const
SfxViewShell* SfxShell::GetViewShell() const
-/* [Beschreibung]
+/* [Description]
- Liefert bei SubShells die SfxViewShell, in der sie liegen. Sonst und
- falls nicht vom App-Entwickler angegeben liefert diese Methode 0.
+ Returns the SfxViewShell in which they are located in the subshells.
+ Otherwise, and if not specified by the App developer, this method
+ returns NULL.
*/
{
@@ -272,25 +274,23 @@ SfxViewShell* SfxShell::GetViewShell() const
SfxViewFrame* SfxShell::GetFrame() const
-/* [Beschreibung]
-
- Diese Methode liefert einen Pointer auf den <SfxViewFrame>, dem diese
- SfxShell-Instanz zugeordnet ist oder in dem sie zur Zeit <UI-aktiv> ist.
- Ein 0-Pointer wird geliefert, wenn diese SfxShell-OInstanz gerade nicht
- UI-aktiv ist und auch keinem SfxViewFrame fest zugeordnet ist.
+/* [Description]
- Der zur"uckgegebene Pointer ist nur im unmittelbaren Kontext des
- Methodenaufrufs g"ultig.
+ This method returns a pointer to the <SfxViewFrame> to which this SfxShell
+ instance is associated or in which they currently is <UI-active>.
+ A NULL pointer is returned if this SfxShell instance is not UI-active at
+ the moment and also no SfxViewFrame is permanently assigned.
+ The returned pointer is only valid in the immediate context of the method
+ call.
- [Anmerkung]
+ [Note]
- Nur Instanzen von Subklasse von SfxApplication und SfxObjectShell sollten
- hier einen 0-Pointer liefern. Ansonsten liegt ein Fehler im Anwendungs-
- programm vor (falscher Ctor von SfxShell gerufen).
+ Only instances of a subclass of SfxApplication and SfxObjectShell
+ should here provide a NULL-pointer. Otherwise, there is an error in the
+ application program (wrong constructor was called from SfxShell).
-
- [Querverweise]
+ [Cross-reference]
<SfxViewShell::GetViewFrame()const>
*/
@@ -307,21 +307,19 @@ SfxViewFrame* SfxShell::GetFrame() const
const SfxPoolItem* SfxShell::GetItem
(
- sal_uInt16 nSlotId // Slot-Id des zu erfragenden <SfxPoolItem>s
+ sal_uInt16 nSlotId // Slot-Id of the querying <SfxPoolItem>s
) const
-/* [Beschreibung]
-
- Mit dieser Methode kann auf beliebige Objekte von Subklassen von
- <SfxPoolItem> zugegriffen werden. Diese Austauschtechnik wird ben"otigt,
- wenn z.B. spezielle <SfxToolBoxControl> Subklassen Zugriff auf
- bestimmte Daten z.B. der <SfxObjectShell> ben"otigen.
+/* [Description]
- Die zur"uckgelieferte Instanz geh"ort der jeweilige SfxShell und
- darf nur im unmittelbaren Kontext des Methodenaufrufs verwendet werden.
+ With this method any objects of <SfxPoolItemu> subclasses can be accessed.
+ This exchange method is needed if, for example special <SfxToolBoxControl>
+ subclasses need access to certain data such as the <SfxObjectShell>.
+ The returned instance belongs to the particular SfxShell and may be
+ used only in the immediate context of the method call.
- [Querverweise]
+ [Cross-reference]
<SfxShell::PutItem(const SfxPoolItem&)>
<SfxShell::RemoveItem(sal_uInt16)>
@@ -338,19 +336,17 @@ const SfxPoolItem* SfxShell::GetItem
void SfxShell::RemoveItem
(
- sal_uInt16 nSlotId // Slot-Id des zu l"oschenden <SfxPoolItem>s
+ sal_uInt16 nSlotId // Slot-Id of the deleting <SfxPoolItem>s
)
-/* [Beschreibung]
+/* [Description]
- Mit dieser Methode k"onnen die allgemein zur Verf"ugung gestellten
- Instanzen von Subklassen von <SfxPoolItem> aus der SfxShell entfernt
- werden.
+ With this method the general available subclasses instances of
+ <cSfxPoolItem> from the SfxShell are removed.
- Die gespeicherte Instanz wird gel"oscht.
+ The stored instance is deleted.
-
- [Querverweise]
+ [Cross-reference]
<SfxShell::PutItem(const SfxPoolItem&)>
<SfxShell::GetItem(sal_uInt16)>
@@ -360,12 +356,12 @@ void SfxShell::RemoveItem
for ( sal_uInt16 nPos = 0; nPos < pImp->aItems.Count(); ++nPos )
if ( pImp->aItems.GetObject(nPos)->Which() == nSlotId )
{
- // Item entfernen und l"oschen
+ // Remove and delete Item
SfxPoolItem *pItem = pImp->aItems.GetObject(nPos);
delete pItem;
pImp->aItems.Remove(nPos);
- // falls aktiv Bindings benachrichtigen
+ // if active, notify Bindings
SfxDispatcher *pDispat = GetDispatcher();
if ( pDispat )
{
@@ -379,23 +375,20 @@ void SfxShell::RemoveItem
void SfxShell::PutItem
(
- const SfxPoolItem& rItem /* Instanz, von der eine Kopie erstellt wird,
- die in der SfxShell in einer Liste
- gespeichert wird. */
+ const SfxPoolItem& rItem /* Instance, of which a copy is created,
+ which is stored in the SfxShell in a list. */
)
-/* [Beschreibung]
-
- Mit dieser Methode k"onnen beliebige Objekte von Subklassen von
- <SfxPoolItem> zur Verf"ugung gestellt werden. Diese Austauschtechnik
- wird ben"otigt, wenn z.B. spezielle <SfxToolBoxControl> Subklassen
- Zugriff auf bestimmte Daten z.B. der <SfxObjectShell> ben"otigen.
+/* [Description]
- Falls ein SfxPoolItem mit derselben Slot-Id exisitert, wird dieses
- automatisch gel"oscht.
+ With this method, any objects of subclasses of <SfxPoolItem> can be made
+ available. This exchange technology is needed if, for example, special
+ <SfxToolBoxControl> Subclasses need access to certain data such as the
+ <SfxObjectShell>
+ If a SfxPoolItem exists with the same slot ID, it is deleted automatically.
- [Querverweise]
+ [Cross-reference]
<SfxShell::RemoveItem(sal_uInt16)>
<SfxShell::GetItem(sal_uInt16)>
@@ -406,7 +399,7 @@ void SfxShell::PutItem
DBG_ASSERT( SfxItemPool::IsSlot( rItem.Which() ),
"items with Which-Ids aren't allowed here" );
- // MSC auf WNT/W95 machte hier Mist, Vorsicht bei Umstellungen
+ // MSC made a mess here of WNT/W95, beware of changes
const SfxPoolItem *pItem = rItem.Clone();
SfxPoolItemHint aItemHint( (SfxPoolItem*) pItem );
const sal_uInt16 nWhich = rItem.Which();
@@ -416,12 +409,12 @@ void SfxShell::PutItem
{
if ( (*ppLoopItem)->Which() == nWhich )
{
- // Item austauschen
+ // Replace Item
delete *ppLoopItem;
pImp->aItems.Remove(nPos);
pImp->aItems.Insert( (SfxPoolItemPtr) pItem, nPos );
- // falls aktiv Bindings benachrichtigen
+ // if active, notify Bindings
SfxDispatcher *pDispat = GetDispatcher();
if ( pDispat )
{
@@ -447,15 +440,14 @@ void SfxShell::PutItem
SfxInterface* SfxShell::GetInterface() const
-/* [Beschreibung]
+/* [Description]
- Mit dieser virtuellen Methode, die durch das Makro <SFX_DECL_INTERFACE>
- von jeder Subclass mit eigenen Slots automatisch "uberladen wird, kann
- auf die zu der Subklasse geh"orende <SfxInterface>-Instanz zugegriffen
- werden.
+ With this virtual method, which is automatically overloaded by each subclass
+ with its own slots through the macro <SFX_DECL_INTERFACE>, one can access
+ each of the <SfxInterface> instance beloning to the subclass.
- Die Klasse SfxShell selbst hat noch kein eigenes SfxInterface
- (keine Slots), daher wird ein 0-Pointer zur"uckgeliefert.
+ The class SfxShell itself has no own SfxInterface (no slots), therefore a
+ NULL-pointer is returned.
*/
{
@@ -466,10 +458,10 @@ SfxInterface* SfxShell::GetInterface() const
SfxBroadcaster* SfxShell::GetBroadcaster()
-/* [Beschreibung]
+/* [Description]
- Liefert einen SfxBroadcaster f"ur diese SfxShell-Instanz bis die
- Klasse SfxShell von SfxBroadcaster abgeleitet ist.
+ Returns a SfxBroadcaster for this SfxShell instance until the class of
+ SfxShell is derived by SfxBroadcaster.
*/
{
@@ -480,14 +472,13 @@ SfxBroadcaster* SfxShell::GetBroadcaster()
::svl::IUndoManager* SfxShell::GetUndoManager()
-/* [Beschreibung]
+/* [Description]
- Jede Subclass von SfxShell kann "uber einen <SfxUndoManager> verf"ugen.
- Dieser kann in den abgeleiteten Klasse mit <SfxShell:SetUndoManager()>
- gesetzt werden.
+ Each Subclass of SfxShell can hava a <SfxUndoManager>. This can be set in
+ the derived class with <SfxShell:SetUndoManager()>.
- Die Klasse SfxShell selbst hat noch keinen SfxUndoManager, es wird
- daher ein 0-Pointer zur"uckgeliefert.
+ The class SfxShell itself does not have a SfxUndoManager, a NULL-pointer
+ is therefore returned.
*/
{
@@ -498,17 +489,17 @@ SfxBroadcaster* SfxShell::GetBroadcaster()
void SfxShell::SetUndoManager( ::svl::IUndoManager *pNewUndoMgr )
-/* [Beschreibung]
+/* [Description]
- Setzt einen <SfxUndoManager> f"ur diese <SfxShell> Instanz. F"ur das
- Undo wird immer nur der Undo-Manager an der jeweils oben auf dem
- Stack des <SfxDispatcher> liegenden SfxShell verwendet.
+ Sets a <SfxUndoManager> for this <SfxShell> Instance. For the undo
+ is only the undo-manager used for SfxShell at the top of the stack of each
+ <SfxDispatcher>.
- Am "ubergebenen <SfxUndoManager> wird automatisch die aktuelle
- Max-Undo-Action-Count Einstellung aus den Optionen gesetzt.
+ On the given <SfxUndoManager> is automatically the current
+ Max-Undo-Action-Count setting set form the options.
- 'pNewUndoMgr' mu\s bis zum Dtor dieser SfxShell-Instanz oder bis
- zum n"achsten 'SetUndoManager()' existieren.
+ 'pNewUndoMgr' must exist until the Destuctor of SfxShell instance is called
+ or until the next 'SetUndoManager()'.
*/
{
@@ -527,20 +518,17 @@ void SfxShell::SetUndoManager( ::svl::IUndoManager *pNewUndoMgr )
SfxRepeatTarget* SfxShell::GetRepeatTarget() const
-/* [Beschreibung]
+/* [Description]
- Liefert einen Pointer auf die <SfxRepeatTarget>-Instanz, die
- als RepeatTarget bei SID_REPEAT verwendet wird, wenn der
- von dieser SfxShell gelieferte <SfxUndoManager> angesprochen wird.
- Der R"uckgabewert kann 0 sein.
+ Returns a pointer to the <SfxRepeatTarget> instance that is used in
+ SID_REPEAT as repeat target when it is adressed from the <SfxUndoManager>
+ supplied by this SfxShell. The return value can be NULL.
+ [Note]
- [Anmerkung]
-
- Eine Ableitung von <SfxShell> oder einer ihrer Subklassen von
- <SfxRepeatTarget> ist nicht zu empfehlen, da Compiler-Fehler
- provoziert werden (wegen Call-to-Pointer-to-Member-Function to
- subclass).
+ A derivation of <SfxShell> or one of its subclasses of <SfxRepeatTarget>
+ is not recommended, as compiler errors are provoked.
+ (due to Call-to-Pointer-to-Member-Function to the subclass).
*/
{
@@ -551,21 +539,18 @@ SfxRepeatTarget* SfxShell::GetRepeatTarget() const
void SfxShell::SetRepeatTarget( SfxRepeatTarget *pTarget )
-/* [Beschreibung]
-
- Setzt den die <SfxRepeatTarget>-Instanz, die bei SID_REPEAT als
- RepeatTarget verwendet wird, wenn der von dieser SfxShell gelieferte
- <SfxUndoManager> angesprochen wird. Durch 'pTarget==0' wird SID_REPEAT
- f"ur diese SfxShell disabled. Die Instanz '*pTarget' mu\s so lange
- leben, wie sie angemeldet ist.
+/* [Description]
+ Sets the <SfxRepeatTarget> instance that is used in SID_REPEAT as
+ RepeatTarget, when the current supplied by this <SfxUndoManager> is
+ addressed. By 'pTarget==0' the SID_REPEAT is disabled for this SfxShell.
+ The instance '*pTarget' must live as long as it is registered.
- [Anmerkung]
+ [Note]
- Eine Ableitung von <SfxShell> oder einer ihrer Subklassen von
- <SfxRepeatTarget> ist nicht zu empfehlen, da Compiler-Fehler
- provoziert werden (wegen Call-to-Pointer-to-Member-Function to
- subclass).
+ A derivation of <SfxShell> or one of its subclasses of <SfxRepeatTarget>
+ is not recommended, as compiler errors are provoked.
+ (due to Call-to-Pointer-to-Member-Function to the subclass).
*/
{
@@ -576,19 +561,20 @@ void SfxShell::SetRepeatTarget( SfxRepeatTarget *pTarget )
void SfxShell::Invalidate
(
- sal_uInt16 nId /* Zu invalidierende Slot-Id oder Which-Id.
- Falls diese 0 ist (default), werden
- alle z.Zt. von dieser Shell bedienten
- Slot-Ids invalidiert. */
+ sal_uInt16 nId /* Invalidated Slot-Id or Which-Id.
+ If these are 0 (default), then all
+ by this Shell currently handled Slot-Ids are
+ invalidated. */
)
-/* [Beschreibung]
+/* [Description]
- Mit dieser Methode k"onnen Slots der Subclasses "uber die Slot-Id
- oder alternativ "uber die Which-Id invalidiert werden. Slot-Ids,
- die von der Subclass ererbt sind, werden ebenfalls invalidert.
+ With this method can the slots of the subclasses be invalidated through the
+ slot Id or alternatively through the Which ID. Slot IDs, which are
+ inherited by the subclass are also invalidert.
+
+ [Cross-reference]
- [Querverweise]
<SfxBindings::Invalidate(sal_uInt16)>
<SfxBindings::InvalidateAll(sal_Bool)>
*/
@@ -617,11 +603,11 @@ void SfxShell::Invalidate_Impl( SfxBindings& rBindings, sal_uInt16 nId )
const SfxSlot *pSlot = pIF->GetSlot(nId);
if ( pSlot )
{
- // bei Enum-Slots ist der Master-Slot zu invalidieren
+ // At Enum-Slots invalidate the Master-Slot
if ( SFX_KIND_ENUM == pSlot->GetKind() )
pSlot = pSlot->GetLinkedSlot();
- // den Slot selbst und ggf. auch alle Slave-Slots invalidieren
+ // Invalidate the Slot itself and possible also all Slave-Slots
rBindings.Invalidate( pSlot->GetSlotId() );
for ( const SfxSlot *pSlave = pSlot->GetLinkedSlot();
pSlave && pIF->ContainsSlot_Impl( pSlave ) &&
@@ -645,15 +631,15 @@ void SfxShell::Invalidate_Impl( SfxBindings& rBindings, sal_uInt16 nId )
void SfxShell::DoActivate_Impl( SfxViewFrame *pFrame, sal_Bool bMDI )
-/* [Beschreibung]
+/* [Description]
- Diese Methode steuert die Aktivierung der SfxShell-Instanz. Zun"achst
- wird durch Aufruf der virtuellen Methode <SfxShell::Activate(sal_Bool)>
- der Subclass die M"oglichkeit gegeben, auf das Event zu reagieren.
+ This method controls the activation of SfxShell instance. First, by calling
+ the virtual method <SfxShell::Activate(sal_Bool)> which gives the subclass the
+ opportunity to respond to the event.
- Bei bMDI == TRUE wird das zugeh"orige SbxObject 'scharfgeschaltet',
- so da\s Methoden des Objekts unqualifiziert (ohne den Namen des Objekts)
- vom BASIC gefunden werden.
+ When bMDI == TRUE, the associated SbxObject is being 'armed', so that
+ unqualified methods of the object (without the name of the object)
+ from BASIC are found.
*/
{
@@ -674,12 +660,12 @@ void SfxShell::DoActivate_Impl( SfxViewFrame *pFrame, sal_Bool bMDI )
if ( bMDI )
{
- // Frame merken, in dem aktiviert wird
+ // Remember Frame, in which it was activated
pImp->pFrame = pFrame;
pImp->bActive = sal_True;
}
- // Subklasse benachrichtigen
+ // Notify Subclass
Activate(bMDI);
}
@@ -687,16 +673,14 @@ void SfxShell::DoActivate_Impl( SfxViewFrame *pFrame, sal_Bool bMDI )
void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, sal_Bool bMDI )
-/* [Beschreibung]
+/* [Description]
- Diese Methode steuert die Deaktivierung der SfxShell-Instanz. Bei
- bMDI == TRUE wird zun"achst das SbxObject in einen Status versetzt,
- so da\s Methoden vom BASIC aus nur noch qualifiziert gerufen werden
- k"onnen.
+ This method controls the deactivation of the SfxShell instance. When
+ bMDI == TRUE the SbxObject is first set to a status that only qualified
+ BASIC methods can be called.
- Dann erh"alt in jedem Fall die Subclass durch Aufruf der virtuellen
- Methode <SfxShell::Deactivate(sal_Bool)> die M"oglichkeit auf das Event
- zu reagieren.
+ Then the subclass gets the opportunity in every case to respond to the
+ event by calling the virtual method <SfxShell::Deactivate(sal_Bool)>.
*/
{
@@ -715,15 +699,16 @@ void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, sal_Bool bMDI )
DbgTrace( aMsg.GetBuffer() );
#endif
- // nur wenn er vom Frame kommt (nicht z.B. pop der BASIC-IDE vom AppDisp)
+ // Only when it comes from a Frame
+ // (not when for instance by poping BASIC-IDE from AppDisp)
if ( bMDI && pImp->pFrame == pFrame )
{
- // austragen
+ // deliver
pImp->pFrame = 0;
pImp->bActive = sal_False;
}
- // Subklasse benachrichtigen
+ // Notify Subclass
Deactivate(bMDI);
}
@@ -739,28 +724,27 @@ sal_Bool SfxShell::IsActive() const
void SfxShell::Activate
(
sal_Bool /*bMDI*/ /* TRUE
- der <SfxDispatcher>, auf dem die SfxShell sich
- befindet, ist aktiv geworden oder die SfxShell
- Instanz wurde auf einen aktiven SfxDispatcher
- gepusht. (vergl. SystemWindow::IsMDIActivate())
+ the <SfxDispatcher>, on which the SfxShell is
+ located, is activated or the SfxShell instance
+ was pushed on an active SfxDispatcher.
+ (compare with SystemWindow::IsMDIActivate())
FALSE
- das zum <SfxViewFrame>, auf dessen SfxDispatcher
- sich die SfxShell Instanz befindet, wurde
- aktiviert.
- (z.B. durch einen geschlossenen Dialog) */
+ the <SfxViewFrame>, on which SfxDispatcher
+ the SfxShell instance is located, was
+ activated. (for example by a closing dialoge) */
)
-/* [Beschreibung]
+/* [Description]
- Virtuelle Methode, die beim Aktivieren der SfxShell Instanz gerufen
- wird, um den Subclasses die Gelegenheit zu geben, auf das Aktivieren
- zu reagieren.
+ Virtual method that is called when enabling the SfxShell instance,
+ in order to give the Subclasses the opportunity to respond to the
+ to the enabling.
- Die Basisimplementation ist leer und braucht nicht gerufen zu werden.
+ The base implementation is empty and does not need to be called.
+ [Cross-reference]
- [Querverweise]
StarView SystemWindow::Activate(sal_Bool)
*/
@@ -772,28 +756,27 @@ void SfxShell::Activate
void SfxShell::Deactivate
(
sal_Bool /*bMDI*/ /* TRUE
- der <SfxDispatcher>, auf dem die SfxShell sich
- befindet, ist inaktiv geworden oder die SfxShell
- Instanz wurde auf einen aktiven SfxDispatcher
- gepoppt. (vergl. SystemWindow::IsMDIActivate())
+ the <SfxDispatcher>, on which the SfxShell is
+ located, is inactivated or the SfxShell instance
+ was popped on an active SfxDispatcher.
+ (compare with SystemWindow::IsMDIActivate())
FALSE
- das zum <SfxViewFrame>, auf dessen SfxDispatcher
- sich die SfxShell Instanz befindet, wurde
- deaktiviert. (z.B. durch einen Dialog) */
+ the <SfxViewFrame>, on which SfxDispatcher
+ the SfxShell instance is located, was
+ deactivated. (for example by a dialoge) */
)
-/* [Beschreibung]
+/* [Description]
- Virtuelle Methode, die beim Deaktivieren der SfxShell Instanz gerufen
- wird, um den Subclasses die Gelegenheit zu geben, auf das Deaktivieren
- zu reagieren.
+ Virtual method that is called when disabling the SfxShell instance,
+ to give the Subclasses the opportunity to respond to the disabling.
- Die Basisimplementation ist leer und braucht nicht gerufen zu werden.
+ The base implementation is empty and does not need to be called.
+ [Cross-reference]
- [Querverweise]
StarView SystemWindow::Dectivate(sal_Bool)
*/
@@ -804,15 +787,16 @@ void SfxShell::ParentActivate
(
)
-/* [Beschreibung]
+/* [Description]
+
+ A parent of the <SfxDispatcher> on which the SfxShell is located, has
+ become active, or the SfxShell instance was pushed on a <SfxDispatcher>,
+ which parent is active.
- Ein Parent des <SfxDispatcher>, auf dem die SfxShell sich befindet,
- ist aktiv geworden, oder die SfxShell Instanz wurde auf einen
- <SfxDispatcher> gepusht, dessen parent aktiv ist.
+ The base implementation is empty and does not need to be called.
- Die Basisimplementation ist leer und braucht nicht gerufen zu werden.
+ [Cross-reference]
- [Querverweise]
SfxShell::Activate()
*/
{
@@ -824,14 +808,15 @@ void SfxShell::ParentDeactivate
(
)
-/* [Beschreibung]
+/* [Description]
- Der aktive Parent des <SfxDispatcher>, auf dem die SfxShell sich befindet,
- ist deaktiviert worden.
+ The active parent of the <SfxDispatcher> on which the SfxShell is located,
+ has been disabled.
- Die Basisimplementation ist leer und braucht nicht gerufen zu werden.
+ The base implementation is empty and does not need to be called.
+
+ [Cross-reference]
- [Querverweise]
SfxShell::Deactivate()
*/
{
@@ -841,11 +826,11 @@ void SfxShell::ParentDeactivate
ResMgr* SfxShell::GetResMgr() const
-/* [Beschreibung]
+/* [Description]
- Diese Methode liefert den ResMgr der <Resource-DLL>, die von der
- SfxShell-Instanz verwendet wird. Ist dies ein 0-Pointer, so
- ist der aktuelle Resource-Manager zu verwenden.
+ This method provides the ResMgr of the <Resource-DLL> that are used by
+ the SfxShell instance. If this is a NULL-pointer, then the current
+ resource manager is to be used.
*/
{
@@ -856,13 +841,13 @@ ResMgr* SfxShell::GetResMgr() const
bool SfxShell::CanExecuteSlot_Impl( const SfxSlot &rSlot )
-/* [Beschreibung]
+/* [Description]
- Diese Methode stellt durch Aufruf der Statusfunktion fest,
- ob 'rSlot' aktuell ausgef"uhrt werden kann.
+ This method determines by calling the status function whether 'rSlot'
+ can be executed currently.
*/
{
- // Slot-Status holen
+ // Get Slot status
SfxItemPool &rPool = GetPool();
const sal_uInt16 nId = rSlot.GetWhich( rPool );
SfxItemSet aSet(rPool, nId, nId);
@@ -879,8 +864,9 @@ long ShellCall_Impl( void* pObj, void* pArg )
return 0;
}
-/* [Beschreibung]
- Asynchrones ExecuteSlot fuer das RELOAD
+/* [Description]
+
+ Asynchronous ExecuteSlot for the RELOAD
*/
//--------------------------------------------------------------------
@@ -900,24 +886,23 @@ const SfxPoolItem* SfxShell::ExecuteSlot( SfxRequest& rReq, sal_Bool bAsync )
const SfxPoolItem* SfxShell::ExecuteSlot
(
- SfxRequest &rReq, // der weiterzuleitende <SfxRequest>
- const SfxInterface* pIF // default = 0 bedeutet virtuell besorgen
+ SfxRequest &rReq, // the relayed <SfxRequest>
+ const SfxInterface* pIF // default = 0 means get virtually
)
-/* [Beschreibung]
+/* [Description]
- Diese Methode erm"oglicht das Weiterleiten eines <SfxRequest> an
- die angegebene Basis-<SfxShell>.
+ This method allows you to forward a <SfxRequest> to the specified
+ base <SfxShell>.
+ [Example]
- [Beispiel]
+ In a derived class of SfxViewShell the SID_PRINTDOCDIRECT will be
+ intercepted. Under certain circumstances a query should appear before
+ you print, and the request will be aborted if necessary.
- In einer von SfxViewShell abgeleiteten Klasse soll SID_PRINTDOCDIRECT
- abgefangen werden. Unter bestimmten Umst"anden soll vor dem Drucken
- eine Abfrage erscheinen, und der Request soll ggf. abgebrochen werden.
-
- Dazu ist in der IDL dieser Subklasse der o.g. Slot einzutragen. Die
- Execute-Methode enth"alt dann skizziert:
+ Also in the IDL of this subclass of the above slot is entered. The status
+ method will contain in outline:
void SubViewShell::Exec( SfxRequest &rReq )
{
@@ -929,11 +914,10 @@ const SfxPoolItem* SfxShell::ExecuteSlot
}
}
- Es braucht i.d.R. kein rReq.Done() gerufen zu werden, da das bereits
- die Implementierung der SfxViewShell erledigt bzw. abgebrochen wurde.
-
+ It usually takes no rReq.Done() to be called as that is already completed
+ in implementation of the SfxViewShell, for instance it has been canceled.
- [Querverweise]
+ [Cross-reference]
<SfxShell::GetSlotState(sal_uInt16,const SfxInterface*,SfxItemSet*)>
*/
@@ -961,34 +945,33 @@ const SfxPoolItem* SfxShell::ExecuteSlot
const SfxPoolItem* SfxShell::GetSlotState
(
- sal_uInt16 nSlotId, // Slot-Id des zu befragenden Slots
- const SfxInterface* pIF, // default = 0 bedeutet virtuell besorgen
- SfxItemSet* pStateSet // SfxItemSet der Slot-State-Methode
+ sal_uInt16 nSlotId, // Slot-Id to the Slots in question
+ const SfxInterface* pIF, // default = 0 means get virtually
+ SfxItemSet* pStateSet // SfxItemSet of the Slot-State method
)
-/* [Beschreibung]
+/* [Description]
- Diese Methode liefert den Status des Slots mit der angegebenen Slot-Id
- "uber das angegebene Interface.
+ This method returns the status of the slot with the specified slot ID
+ on the specified interface.
- Ist der Slot disabled oder in dieser SfxShell (und deren Parent-Shells)
- nicht bekannt, wird ein 0-Pointer zur"uckgeliefert.
+ If the slot is disabled or in this SfxShell (and their parent shells) are
+ not known, a Null-pointer is returned.
- Hat der Slot keinen Status, wird ein SfxVoidItem zur"uckgeliefert.
+ If the slot does not have a Status, a SfxVoidItem is returned.
- Der Status wird bei pStateSet != 0 gleich in diesem Set gesetzt, so
- da\s <SfxShell>-Subklassen Slots-"uberladen und auch bei der
- Status-Methode die Basis-Implementierung rufen k"onnen.
+ The status is set directly in this Set when pStateSet != 0 , so that
+ overloaded Slots of the <SfxShell> Subclasses and also in the Status
+ method of the base implementation can be called.
+ [Example]
- [Beispiel]
+ In a derived class of SfxViewShell the SID_PRINTDOCDIRECT will be
+ intercepted. Under certain circumstances a query should appear before
+ you print, and the request will be aborted if necessary.
- In einer von SfxViewShell abgeleiteten Klasse soll SID_PRINTDOCDIRECT
- abgefangen werden. Unter bestimmten Umst"anden soll vor dem Drucken
- eine Abfrage erscheinen, und der Request soll ggf. abgebrochen werden.
-
- Dazu ist in der IDL dieser Subklasse der o.g. Slot einzutragen. Die
- Status-Methode enth"alt dann skizziert:
+ Also in the IDL of this subclass of the above slot is entered. The status
+ method will contain in outline:
void SubViewShell::PrintState( SfxItemSet &rState )
{
@@ -998,14 +981,13 @@ const SfxPoolItem* SfxShell::GetSlotState
...
}
-
- [Querverweise]
+ [Cross-reference]
<SfxShell::ExecuteSlot(SfxRequest&)>
*/
{
- // Slot am angegebenen Interface besorgen
+ // Get Slot on the given Interface
if ( !pIF )
pIF = GetInterface();
SfxItemState eState;
@@ -1017,21 +999,21 @@ const SfxPoolItem* SfxShell::GetSlotState
if ( !pSlot )
pSlot = pIF->GetSlot(nSlotId);
if ( pSlot )
- // ggf. auf Which-Id mappen
+ // Map on Which-Id if possible
nSlotId = pSlot->GetWhich( rPool );
- // Item und Item-Status besorgen
+ // Get Item and Item status
const SfxPoolItem *pItem = NULL;
- SfxItemSet aSet( rPool, nSlotId, nSlotId ); // pItem stirbt sonst zu fr"uh
+ SfxItemSet aSet( rPool, nSlotId, nSlotId ); // else pItem dies too soon
if ( pSlot )
{
- // Status-Methode rufen
+ // Call Status method
SfxStateFunc pFunc = pSlot->GetStateFnc();
if ( pFunc )
CallState( pFunc, aSet );
eState = aSet.GetItemState( nSlotId, sal_True, &pItem );
- // ggf. Default-Item besorgen
+ // get default Item if possible
if ( eState == SFX_ITEM_DEFAULT )
{
if ( SfxItemPool::IsWhich(nSlotId) )
@@ -1043,7 +1025,7 @@ const SfxPoolItem* SfxShell::GetSlotState
else
eState = SFX_ITEM_UNKNOWN;
- // Item und Item-Status auswerten und ggf. in pStateSet mitpflegen
+ // Evaluate Item and item status and possibly maintain them in pStateSet
SfxPoolItem *pRetItem = 0;
if ( eState <= SFX_ITEM_DISABLED )
{
@@ -1077,12 +1059,12 @@ void SfxShell::SetVerbs(const com::sun::star::uno::Sequence < com::sun::star::em
{
SfxViewShell *pViewSh = PTR_CAST ( SfxViewShell, this);
- DBG_ASSERT(pViewSh, "SetVerbs nur an der ViewShell aufrufen!");
+ DBG_ASSERT(pViewSh, "Only call SetVerbs at the ViewShell!");
if ( !pViewSh )
return;
- // Zun"achst alle Statecaches dirty machen, damit keiner mehr versucht,
- // die Slots zu benutzen
+ // First make all Statecaches dirty, so that no-one no longer tries to use
+ // the Slots
{
SfxBindings *pBindings =
pViewSh->GetViewFrame()->GetDispatcher()->GetBindings();
@@ -1098,7 +1080,7 @@ void SfxShell::SetVerbs(const com::sun::star::uno::Sequence < com::sun::star::em
for (sal_Int32 n=0; n<aVerbs.getLength(); n++)
{
sal_uInt16 nSlotId = SID_VERB_START + nr++;
- DBG_ASSERT(nSlotId <= SID_VERB_END, "Zuviele Verben!");
+ DBG_ASSERT(nSlotId <= SID_VERB_END, "To many Verbs!");
if (nSlotId > SID_VERB_END)
break;
@@ -1106,8 +1088,8 @@ void SfxShell::SetVerbs(const com::sun::star::uno::Sequence < com::sun::star::em
pNewSlot->nSlotId = nSlotId;
pNewSlot->nGroupId = 0;
- // Verb-Slots m"ussen asynchron ausgef"uhrt werden, da sie w"ahrend
- // des Ausf"uhrens zerst"ort werden k"onnten
+ // Verb slots must be executed asynchronously, so that they can be
+ // destroyed while executing.
pNewSlot->nFlags = SFX_SLOT_ASYNCHRON | SFX_SLOT_CONTAINER;
pNewSlot->nMasterSlotId = 0;
pNewSlot->nValue = 0;
@@ -1136,8 +1118,8 @@ void SfxShell::SetVerbs(const com::sun::star::uno::Sequence < com::sun::star::em
if (pViewSh)
{
- // Der Status von SID_OBJECT wird im Controller direkt an der Shell
- // abgeholt, es reicht also, ein neues StatusUpdate anzuregen
+ // The status of SID_OBJECT is collected in the controller directly on
+ // the Shell, it is thus enough to encourage a new status update
SfxBindings *pBindings = pViewSh->GetViewFrame()->GetDispatcher()->
GetBindings();
pBindings->Invalidate( SID_OBJECT, sal_True, sal_True );
@@ -1193,9 +1175,9 @@ const SfxSlot* SfxShell::GetVerbSlot_Impl(sal_uInt16 nId) const
{
com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor > rList = pImp->aVerbList;
- DBG_ASSERT(nId >= SID_VERB_START && nId <= SID_VERB_END,"Falsche VerbId!");
+ DBG_ASSERT(nId >= SID_VERB_START && nId <= SID_VERB_END,"Wrong VerbId!");
sal_uInt16 nIndex = nId - SID_VERB_START;
- DBG_ASSERT(nIndex < rList.getLength(),"Falsche VerbId!");
+ DBG_ASSERT(nIndex < rList.getLength(),"Wrong VerbId!");
if (nIndex < rList.getLength())
return pImp->aSlotArr[nIndex];
@@ -1246,13 +1228,13 @@ void SfxShell::UIFeatureChanged()
SfxViewFrame *pFrame = GetFrame();
if ( pFrame && pFrame->IsVisible() )
{
- // Auch dann Update erzwingen, wenn Dispatcher schon geupdated ist,
- // sonst bleibt evtl. irgendwas in den gebunkerten Tools stecken.
- // Asynchron aufrufen, um Rekursionen zu vermeiden
+ // Also force an update, if dispatcher is already updated otherwise
+ // something my get stuck in the bunkered tools. Asynchronous call to
+ // prevent recursion.
if ( !pImp->pUpdater )
pImp->pUpdater = new svtools::AsynchronLink( Link( this, DispatcherUpdate_Impl ) );
- // Mehrfachaufrufe gestattet
+ // Multiple views allowed
pImp->pUpdater->Call( pFrame->GetDispatcher(), sal_True );
}
}
diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx
index dfdb67ed0947..5db7ffd1f1e9 100755
--- a/sfx2/source/control/statcach.cxx
+++ b/sfx2/source/control/statcach.cxx
@@ -200,10 +200,7 @@ void BindDispatch_Impl::Dispatch( uno::Sequence < beans::PropertyValue > aProps,
}
//--------------------------------------------------------------------
-
-/* Dieser Konstruktor fuer einen ungueltigen Cache, der sich also
- bei der ersten Anfrage zun"achst updated.
- */
+// This constructor for an invalid cache that is updated in the first request.
SfxStateCache::SfxStateCache( sal_uInt16 nFuncId ):
pDispatch( 0 ),
@@ -222,16 +219,13 @@ SfxStateCache::SfxStateCache( sal_uInt16 nFuncId ):
}
//--------------------------------------------------------------------
-
-/* Der Destruktor pr"uft per Assertion, ob noch Controller angemeldet
- sind.
- */
+// The Destructor checks by assertion, even if controllers are registered.
SfxStateCache::~SfxStateCache()
{
DBG_MEMTEST();
DBG_DTOR(SfxStateCache, 0);
- DBG_ASSERT( pController == 0 && pInternalController == 0, "es sind noch Controller angemeldet" );
+ DBG_ASSERT( pController == 0 && pInternalController == 0, "there are still Controllers registered" );
if ( !IsInvalidItem(pLastItem) )
delete pLastItem;
if ( pDispatch )
@@ -259,7 +253,6 @@ void SfxStateCache::Invalidate( sal_Bool bWithMsg )
}
//--------------------------------------------------------------------
-
// gets the corresponding function from the dispatcher or the cache
const SfxSlotServer* SfxStateCache::GetSlotServer( SfxDispatcher &rDispat , const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > & xProv )
@@ -356,24 +349,22 @@ const SfxSlotServer* SfxStateCache::GetSlotServer( SfxDispatcher &rDispat , cons
//--------------------------------------------------------------------
-// Status setzen in allen Controllern
+// Set Status in all Controllers
void SfxStateCache::SetState
(
- SfxItemState eState, // <SfxItemState> von 'pState'
- const SfxPoolItem* pState, // Status des Slots, ggf. 0 oder -1
+ SfxItemState eState, // <SfxItemState> from 'pState'
+ const SfxPoolItem* pState, // Slot Status, 0 or -1
sal_Bool bMaybeDirty
)
-/* [Beschreibung]
+/* [Description]
- Diese Methode verteilt die Status auf alle an dieser SID gebundenen
- <SfxControllerItem>s. Ist der Wert derselbe wie zuvor und wurde in-
- zwischen weder ein Controller angemeldet, noch ein Controller invalidiert,
- dann wird kein Wert weitergeleitet. Dadurch wird z.B. Flackern in
- ListBoxen vermieden.
+ This method distributes the status of all of this SID bound
+ <SfxControllerItem>s. If the value is the same as before, and if neither
+ controller was registered nor invalidated inbetween, then no value is
+ passed. This way the flickering is for example avoided in ListBoxes.
*/
-
{
SetState_Impl( eState, pState, bMaybeDirty );
}
@@ -407,7 +398,7 @@ void SfxStateCache::SetVisibleState( sal_Bool bShow )
bDeleteItem = sal_True;
}
- // Controller updaten
+ // Update Controller
if ( !pDispatch && pController )
{
for ( SfxControllerItem *pCtrl = pController;
@@ -428,8 +419,8 @@ void SfxStateCache::SetVisibleState( sal_Bool bShow )
void SfxStateCache::SetState_Impl
(
- SfxItemState eState, // <SfxItemState> von 'pState'
- const SfxPoolItem* pState, // Status des Slots, ggf. 0 oder -1
+ SfxItemState eState, // <SfxItemState> from 'pState'
+ const SfxPoolItem* pState, // Slot Status, 0 or -1
sal_Bool bMaybeDirty
)
{
@@ -437,8 +428,8 @@ void SfxStateCache::SetState_Impl
DBG_MEMTEST();
DBG_CHKTHIS(SfxStateCache, 0);
- // wenn zwischen Enter- und LeaveRegistrations ein hartes Update kommt
- // k"onnen zwischenzeitlich auch Cached ohne Controller exisitieren
+ // If a hard update occurs between enter- and leave-registrations is a
+ // can also intermediate Cached exist without controller.
if ( !pController && !pInternalController )
return;
@@ -448,7 +439,7 @@ void SfxStateCache::SetState_Impl
DBG_ASSERT( SfxControllerItem::GetItemState(pState) == eState, "invalid SfxItemState" );
DBG_PROFSTART(SfxStateCacheSetState);
- // m"ussen die Controller "uberhaupt benachrichtigt werden?
+ // does the controller have to be notified at all?
bool bNotify = bItemDirty;
if ( !bItemDirty )
{
@@ -464,7 +455,7 @@ void SfxStateCache::SetState_Impl
if ( bNotify )
{
- // Controller updaten
+ // Update Controller
if ( !pDispatch && pController )
{
for ( SfxControllerItem *pCtrl = pController;
@@ -476,7 +467,7 @@ void SfxStateCache::SetState_Impl
if ( pInternalController )
((SfxDispatchController_Impl *)pInternalController)->StateChanged( nId, eState, pState, &aSlotServ );
- // neuen Wert merken
+ // Remember new value
if ( !IsInvalidItem(pLastItem) )
DELETEZ(pLastItem);
if ( pState && !IsInvalidItem(pState) )
@@ -493,22 +484,21 @@ void SfxStateCache::SetState_Impl
//--------------------------------------------------------------------
-
-// alten Status in allen Controllern nochmal setzen
+// Set old status again in all the controllers
void SfxStateCache::SetCachedState( sal_Bool bAlways )
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxStateCache, 0);
- DBG_ASSERT(pController==NULL||pController->GetId()==nId, "Cache mit falschem ControllerItem" );
+ DBG_ASSERT(pController==NULL||pController->GetId()==nId, "Cache with wrong ControllerItem" );
DBG_PROFSTART(SfxStateCacheSetState);
- // nur updaten wenn cached item vorhanden und auch verarbeitbar
- // (Wenn der State gesendet wird, mu\s sichergestellt sein, da\s ein
- // Slotserver vorhanden ist, s. SfxControllerItem::GetCoreMetric() )
+ // Only update if cached item exists and also able to process.
+ // (If the State is sent, it must be ensured that a SlotServer is present,
+ // see SfxControllerItem:: GetCoreMetric())
if ( bAlways || ( !bItemDirty && !bSlotDirty ) )
{
- // Controller updaten
+ // Update Controller
if ( !pDispatch && pController )
{
for ( SfxControllerItem *pCtrl = pController;
@@ -520,7 +510,7 @@ void SfxStateCache::SetCachedState( sal_Bool bAlways )
if ( pInternalController )
((SfxDispatchController_Impl *)pInternalController)->StateChanged( nId, eLastState, pLastItem, &aSlotServ );
- // Controller sind jetzt ok
+ // Controller is now ok
bCtrlDirty = sal_True;
}
@@ -529,8 +519,7 @@ void SfxStateCache::SetCachedState( sal_Bool bAlways )
//--------------------------------------------------------------------
-
-// FloatingWindows in allen Controls mit dieser Id zerstoeren
+// Destroy FloatingWindows in all Controls with this Id
void SfxStateCache::DeleteFloatingWindows()
{
@@ -540,7 +529,7 @@ void SfxStateCache::DeleteFloatingWindows()
SfxControllerItem *pNextCtrl=0;
for ( SfxControllerItem *pCtrl=pController; pCtrl; pCtrl=pNextCtrl )
{
- DBG_TRACE((ByteString("pCtrl: ").Append(ByteString::CreateFromInt64((sal_uIntPtr)pCtrl))).GetBuffer());
+ OSL_TRACE((ByteString("pCtrl: ").Append(ByteString::CreateFromInt64((sal_uIntPtr)pCtrl))).GetBuffer());
pNextCtrl = pCtrl->GetItemLink();
pCtrl->DeleteFloatingWindow();
}
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 011ece8532cd..ebb1635afae4 100755
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -105,7 +105,7 @@ SfxUnoControllerItem::SfxUnoControllerItem( SfxControllerItem *pItem, SfxBinding
: pCtrlItem( pItem )
, pBindings( &rBind )
{
- DBG_ASSERT( !pCtrlItem || !pCtrlItem->IsBound(), "ControllerItem fehlerhaft!" );
+ DBG_ASSERT( !pCtrlItem || !pCtrlItem->IsBound(), "ControllerItem is incorrect!" );
aCommand.Complete = rCmd;
Reference < XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.URLTransformer"))), UNO_QUERY );
@@ -131,18 +131,17 @@ void SfxUnoControllerItem::UnBind()
void SAL_CALL SfxUnoControllerItem::statusChanged(const ::com::sun::star::frame::FeatureStateEvent& rEvent) throw ( ::com::sun::star::uno::RuntimeException )
{
SolarMutexGuard aGuard;
- DBG_ASSERT( pCtrlItem, "Dispatch hat den StatusListener nicht entfern!" );
+ DBG_ASSERT( pCtrlItem, "Dispatch has not removed the StatusListener!" );
if ( rEvent.Requery )
{
- // Fehler kann nur passieren, wenn das alte Dispatch fehlerhaft implementiert
- // ist, also removeStatusListener nicht gefunzt hat. Aber sowas soll
- // ja vorkommen ...
- // Also besser vor ReleaseDispatch gegen Abflug sch"utzen!
+ // Error can only happen if the old Dispatch is implemented incorrectly
+ // i.e. removeStatusListener did not work. But such things can happen...
+ // So protect before ReleaseDispatch from release!
::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > aRef( (::cppu::OWeakObject*)this, ::com::sun::star::uno::UNO_QUERY );
ReleaseDispatch();
if ( pCtrlItem )
- GetNewDispatch(); // asynchron ??
+ GetNewDispatch(); // asynchronous ??
}
else if ( pCtrlItem )
{
diff --git a/sfx2/source/dialog/about.cxx b/sfx2/source/dialog/about.cxx
index 83319fc9aa84..c5622fa99c73 100755
--- a/sfx2/source/dialog/about.cxx
+++ b/sfx2/source/dialog/about.cxx
@@ -102,7 +102,7 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
// load image from module path
aAppLogo = SfxApplication::GetApplicationLogo();
- // Transparenter Font
+ // Transparent Font
Font aFont = GetFont();
aFont.SetTransparent( TRUE );
SetFont( aFont );
@@ -119,7 +119,7 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
#endif
aVersionText.SetText( sVersion );
- // Initialisierung fuer Aufruf Entwickler
+ // Initialization call for developers
if ( aAccelStr.Len() && ByteString(U2S(aAccelStr)).IsAlphaAscii() )
{
Accelerator *pAccel = 0, *pPrevAccel = 0, *pFirstAccel = 0;
@@ -229,7 +229,7 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
FreeResource();
- // explizite Help-Id
+ // explicit Help-Id
SetHelpId( SID_ABOUT );
}
@@ -237,7 +237,7 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
AboutDialog::~AboutDialog()
{
- // L"oschen des Entwickleraufrufs
+ // Clearing the developers call
if ( !aAccelList.empty() )
{
GetpApp()->RemoveAccel( aAccelList.front() );
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index f46f9cea85ae..03e7ef58ea03 100755
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -137,10 +137,10 @@ void SfxModalDialog::SetDialogData_Impl()
void SfxModalDialog::GetDialogData_Impl()
-/* [Beschreibung]
+/* [Description]
- Hilfsfunktion; liest die Dialogposition aus der Ini-Datei
- und setzt diese am "ubergebenen Window.
+ Helper function, reads the dialogue position from the ini file and
+ puts them on the transfered window.
*/
{
@@ -167,11 +167,10 @@ void SfxModalDialog::init()
SfxModalDialog::SfxModalDialog(Window* pParent, const ResId &rResId )
-/* [Beschreibung]
+/* [Description]
- Konstruktor der allgemeinen Basisklasse f"ur modale Dialoge;
- ResId wird als ID im ini-file verwendet.
- Die dort gespeicherte Position wird gesetzt.
+ Constructor of the general base class for modal Dialoge;
+ ResId is used as ID in ini-file. The saved position from there is set.
*/
: ModalDialog(pParent, rResId),
@@ -187,11 +186,11 @@ SfxModalDialog::SfxModalDialog(Window* pParent, const ResId &rResId )
SfxModalDialog::SfxModalDialog(Window* pParent,
sal_uInt32 nUniqueId,
WinBits nWinStyle) :
-/* [Beschreibung]
+/* [Description]
- Konstruktor der allgemeinen Basisklasse f"ur modale Dialoge;
- ID f"ur das ini-file wird explizit "ubergeben.
- Die dort gespeicherte Position wird gesetzt.
+ Constructor of the general base class for modal Dialoge;
+ The ID for the ini-file wird explicilty handed over.
+ The saved position from there is set.
*/
ModalDialog(pParent, nWinStyle),
@@ -206,9 +205,9 @@ SfxModalDialog::SfxModalDialog(Window* pParent,
SfxModalDialog::~SfxModalDialog()
-/* [Beschreibung]
+/* [Description]
- Dtor; schreibt Dialogposition in das ini-file
+ Destructor; writes the Dialog position in the ini-file.
*/
{
@@ -283,12 +282,12 @@ void SfxModelessDialog::StateChanged( StateChangedType nStateChange )
void SfxModelessDialog::Initialize(SfxChildWinInfo *pInfo)
-/* [Beschreibung]
+/* [Description]
- Initialisierung der Klasse SfxModelessDialog "uber ein SfxChildWinInfo.
- Die Initialisierung erfolgt erst in einem 2.Schritt
- nach dem ctor und sollte vom ctor der abgeleiteten Klasse
- oder von dem des SfxChildWindows aufgerufen werden.
+ Initialization of the class SfxModelessDialog via a SfxChildWinInfo.
+ The initialization is done only in a 2nd step after the constructor, this
+ constructor should be called from the derived class or from the
+ SfxChildWindows.
*/
{
@@ -297,12 +296,11 @@ void SfxModelessDialog::Initialize(SfxChildWinInfo *pInfo)
void SfxModelessDialog::Resize()
-/* [Beschreibung]
+/* [Description]
- Diese virtuelle Methode der Klasse FloatingWindow merkt sich ggf. eine
- ver"anderte Gr"o\se.
- Wird diese Methode von einer abgeleiteten Klasse "uberschrieben, mu\s
- auch SfxFloatingWindow::Resize() gerufen werden.
+ This virtual method of the class FloatingWindow keeps track if a change
+ in size has been made. When this method is overridden by a derived class,
+ then the SfxFloatingWindow: Resize() must also be called.
*/
{
@@ -386,10 +384,10 @@ SfxModelessDialog::SfxModelessDialog( SfxBindings *pBindinx,
long SfxModelessDialog::Notify( NotifyEvent& rEvt )
-/* [Beschreibung]
+/* [Description]
- Wenn ein ModelessDialog aktiviert wird, wird sein ViewFrame aktiviert.
- Notwendig ist das bei PlugInFrames.
+ If a ModelessDialog is enabled its ViewFrame wil be activated.
+ This is necessary by PluginInFrames.
*/
{
@@ -415,9 +413,9 @@ long SfxModelessDialog::Notify( NotifyEvent& rEvt )
}
else if( rEvt.GetType() == EVENT_KEYINPUT )
{
- // KeyInput zuerst f"ur Dialogfunktionen zulassen ( TAB etc. )
+ // First, allow KeyInput for Dialog functions ( TAB etc. )
if ( !ModelessDialog::Notify( rEvt ) && SfxViewShell::Current() )
- // dann auch global g"ultige Acceleratoren verwenden
+ // then also for valid global accelerators.
return SfxViewShell::Current()->GlobalKeyInput_Impl( *rEvt.GetKeyEvent() );
return sal_True;
}
@@ -429,9 +427,9 @@ long SfxModelessDialog::Notify( NotifyEvent& rEvt )
SfxModelessDialog::~SfxModelessDialog()
-/* [Beschreibung]
+/* [Description]
- Dtor
+ Destructor
*/
{
@@ -444,19 +442,16 @@ SfxModelessDialog::~SfxModelessDialog()
sal_Bool SfxModelessDialog::Close()
-/* [Beschreibung]
-
- Das Fenster wird geschlossen, indem das ChildWindow durch Ausf"uhren des
- ChildWindow-Slots zerst"ort wird.
- Wird diese Methode von einer abgeleiteten Klasse "uberschrieben, mu\s
- danach SfxModelessDialogWindow::Close() gerufen werden, wenn nicht das
- Close() mit "return sal_False" abgebrochen wird.
+/* [Description]
+ The window is closed when the ChildWindow is destroyed by running the
+ ChildWindow-slots. If this is method is overridden by a derived class
+ method, then the SfxModelessDialogWindow: Close() must be called afterwards
+ if the Close() was not cancelled with "return sal_False".
*/
{
- // Execute mit Parametern, da Toggle von einigen ChildWindows ignoriert
- // werden kann
+ // Execute with Parameters, since Toggle is ignored by some ChildWindows.
SfxBoolItem aValue( pImp->pMgr->GetType(), sal_False);
pBindings->GetDispatcher_Impl()->Execute(
pImp->pMgr->GetType(),
@@ -468,14 +463,13 @@ sal_Bool SfxModelessDialog::Close()
void SfxModelessDialog::FillInfo(SfxChildWinInfo& rInfo) const
-/* [Beschreibung]
+/* [Description]
- F"ullt ein SfxChildWinInfo mit f"ur SfxModelessDialof spezifischen Daten,
- damit sie in die INI-Datei geschrieben werden koennen.
- Es wird angenommen, da\s rInfo alle anderen evt. relevanten Daten in
- der ChildWindow-Klasse erh"alt.
- ModelessDialogs haben keine spezifischen Informationen, so dass die
- Basisimplementierung nichts tut und daher nicht gerufen werden mu\s.
+ Fills a SfxChildWinInfo with specific data from SfxModelessDialog,
+ so that it can be written in the INI file. It is assumed that rinfo
+ receives all other possible relevant data in the ChildWindow class.
+ ModelessDialogs have no specific information, so that the base
+ implementation does nothing and therefore must not be called.
*/
{
@@ -488,10 +482,10 @@ void SfxModelessDialog::FillInfo(SfxChildWinInfo& rInfo) const
long SfxFloatingWindow::Notify( NotifyEvent& rEvt )
-/* [Beschreibung]
+/* [Description]
- Wenn ein ModelessDialog aktiviert wird, wird sein ViewFrame aktiviert.
- Notwendig ist das bei PlugInFrames.
+ If a ModelessDialog is enabled, its ViewFrame will be activated.
+ This necessary for the PluginInFrames.
*/
{
@@ -520,9 +514,9 @@ long SfxFloatingWindow::Notify( NotifyEvent& rEvt )
}
else if( rEvt.GetType() == EVENT_KEYINPUT )
{
- // KeyInput zuerst f"ur Dialogfunktionen zulassen
+ // First, allow KeyInput for Dialog functions
if ( !FloatingWindow::Notify( rEvt ) && SfxViewShell::Current() )
- // dann auch global g"ultige Acceleratoren verwenden
+ // then also for valid global accelerators.
return SfxViewShell::Current()->GlobalKeyInput_Impl( *rEvt.GetKeyEvent() );
return sal_True;
}
@@ -573,19 +567,16 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
sal_Bool SfxFloatingWindow::Close()
-/* [Beschreibung]
-
- Das Fenster wird geschlossen, indem das ChildWindow durch Ausf"uhren des
- ChildWindow-Slots zerst"ort wird.
- Wird diese Methode von einer abgeleiteten Klasse "uberschrieben, mu\s
- danach SfxFloatingWindow::Close() gerufen werden, wenn nicht das Close()
- mit "return sal_False" abgebrochen wird.
+/* [Description]
+ The window is closed when the ChildWindow is destroyed by running the
+ ChildWindow-slots. If this is method is overridden by a derived class
+ method, then the SfxModelessDialogWindow: Close) must be called afterwards
+ if the Close() was not cancelled with "return sal_False".
*/
{
- // Execute mit Parametern, da Toggle von einigen ChildWindows ignoriert
- // werden kann
+ // Execute with Parameters, since Toggle is ignored by some ChildWindows.
SfxBoolItem aValue( pImp->pMgr->GetType(), sal_False);
pBindings->GetDispatcher_Impl()->Execute(
pImp->pMgr->GetType(),
@@ -597,9 +588,9 @@ sal_Bool SfxFloatingWindow::Close()
SfxFloatingWindow::~SfxFloatingWindow()
-/* [Beschreibung]
+/* [Description]
- Dtor
+ Destructor
*/
{
@@ -612,12 +603,11 @@ SfxFloatingWindow::~SfxFloatingWindow()
void SfxFloatingWindow::Resize()
-/* [Beschreibung]
+/* [Description]
- Diese virtuelle Methode der Klasse FloatingWindow merkt sich ggf. eine
- ver"anderte Gr"o\se.
- Wird diese Methode von einer abgeleiteten Klasse "uberschrieben, mu\s
- auch SfxFloatingWindow::Resize() gerufen werden.
+ This virtual method of the class FloatingWindow keeps track if a change
+ in size has been made. When this method is overridden by a derived class,
+ then the SfxFloatingWindow: Resize() must also be called.
*/
{
@@ -676,12 +666,12 @@ void SfxFloatingWindow::StateChanged( StateChangedType nStateChange )
void SfxFloatingWindow::Initialize(SfxChildWinInfo *pInfo)
-/* [Beschreibung]
+/* [Description]
- Initialisierung der Klasse SfxFloatingWindow "uber ein SfxChildWinInfo.
- Die Initialisierung erfolgt erst in einem 2.Schritt
- nach dem ctor und sollte vom ctor der abgeleiteten Klasse
- oder von dem des SfxChildWindows aufgerufen werden.
+ Initialization of a class SfxFloatingWindow through a SfxChildWinInfo.
+ The initialization is done only in a 2nd step after the constructor and
+ should be called by the constructor of the derived class or from the
+ SfxChildWindows.
*/
{
pImp->aWinState = pInfo->aWinState;
@@ -691,15 +681,13 @@ void SfxFloatingWindow::Initialize(SfxChildWinInfo *pInfo)
void SfxFloatingWindow::FillInfo(SfxChildWinInfo& rInfo) const
-/* [Beschreibung]
+/* [Description]
- F"ullt ein SfxChildWinInfo mit f"ur SfxFloatingWindow spezifischen Daten,
- damit sie in die INI-Datei geschrieben werden koennen.
- Es wird angenommen, da\s rInfo alle anderen evt. relevanten Daten in
- der ChildWindow-Klasse erh"alt.
- Eingetragen werden hier gemerkte Gr"o\se und das ZoomIn-Flag.
- Wird diese Methode "uberschrieben, mu\s zuerst die Basisimplementierung
- gerufen werden.
+ Fills a SfxChildWinInfo with specific data from SfxFloatingWindow,
+ so that it can be written in the INI file. It is assumed that rinfo
+ receives all other possible relevant data in the ChildWindow class.
+ Insertions are marked with size and the ZoomIn flag.
+ If this method is overridden, the base implementation must be called first.
*/
{
@@ -712,9 +700,9 @@ void SfxFloatingWindow::FillInfo(SfxChildWinInfo& rInfo) const
IMPL_LINK( SfxSingleTabDialog, OKHdl_Impl, Button *, EMPTYARG )
-/* [Beschreibung]
+/* [Description]
- Ok_Handler; f"ur die gesetzte Page wird FillItemSet() gerufen.
+ Ok_Handler; FillItemSet() is called for setting of Page.
*/
{
@@ -744,7 +732,7 @@ IMPL_LINK( SfxSingleTabDialog, OKHdl_Impl, Button *, EMPTYARG )
if ( bModified )
{
- // auch noch schnell User-Daten im IniManager abspeichern
+ // Save user data in IniManager.
pImpl->m_pSfxPage->FillUserData();
String sData( pImpl->m_pSfxPage->GetUserData() );
SvtViewOptions aPageOpt( E_TABPAGE, String::CreateFromInt32( GetUniqId() ) );
@@ -765,10 +753,10 @@ SfxSingleTabDialog::SfxSingleTabDialog
sal_uInt16 nUniqueId
) :
-/* [Beschreibung]
+/* [Description]
- Konstruktor der allgemeinen Basisklasse f"ur SingleTab-Dialoge;
- ID f"ur das ini-file wird "ubergeben.
+ Constructor of the general base class for SingleTab-Dialoge;
+ ID for the ini-file is handed over.
*/
SfxModalDialog( pParent, nUniqueId, WinBits( WB_STDMODAL | WB_3DLOOK ) ),
@@ -778,7 +766,7 @@ SfxSingleTabDialog::SfxSingleTabDialog
pHelpBtn ( 0 ),
pImpl ( new SingleTabDlgImpl )
{
- DBG_WARNING( "please use the ctor with ViewFrame" );
+ DBG_WARNING( "please use the constructor with ViewFrame" );
SetInputSet( &rSet );
}
@@ -791,11 +779,11 @@ SfxSingleTabDialog::SfxSingleTabDialog
const SfxItemSet* pInSet
)
-/* [Beschreibung]
+/* [Description]
- Konstruktor der allgemeinen Basisklasse f"ur SingleTab-Dialoge;
- ID f"ur das ini-file wird "ubergeben.
- Sollte nicht mehr benutzt werden.
+ Constructor of the general base class for SingleTab-Dialoge;
+ ID for the ini-file is handed over.
+ Deprecated.
*/
: SfxModalDialog( pParent, nUniqueId, WinBits( WB_STDMODAL | WB_3DLOOK ) ),
@@ -805,7 +793,7 @@ SfxSingleTabDialog::SfxSingleTabDialog
pHelpBtn ( 0 ),
pImpl ( new SingleTabDlgImpl )
{
- DBG_WARNING( "bitte den Ctor mit ViewFrame verwenden" );
+ DBG_WARNING( "please use the constructor with ViewFrame" );
SetInputSet( pInSet );
}
@@ -818,11 +806,11 @@ SfxSingleTabDialog::SfxSingleTabDialog
const String& rInfoURL
)
-/* [Beschreibung]
+/* [Description]
- Konstruktor der allgemeinen Basisklasse f"ur SingleTab-Dialoge;
- ID f"ur das ini-file wird "ubergeben.
- */
+ Constructor of the general base class for SingleTab-Dialoge;
+ ID for the ini-file is handed over.
+*/
: SfxModalDialog( pParent, nUniqueId, WinBits( WB_STDMODAL | WB_3DLOOK ) ),
@@ -882,7 +870,7 @@ void SfxSingleTabDialog::SetPage( TabPage* pNewPage )
if ( pImpl->m_pTabPage )
{
- // Gr"ossen und Positionen anpassen
+ // Adjust size and position.
pImpl->m_pTabPage->SetPosPixel( Point() );
Size aOutSz( pImpl->m_pTabPage->GetSizePixel() );
Size aOffSz = LogicToPixel( Size( RSC_SP_CTRL_X, RSC_SP_CTRL_Y ), MAP_APPFONT );
@@ -911,10 +899,10 @@ void SfxSingleTabDialog::SetPage( TabPage* pNewPage )
pOKBtn->Show();
pImpl->m_pTabPage->Show();
- // Text der TabPage in den Dialog setzen
+ // Set TabPage text in the Dialog
SetText( pImpl->m_pTabPage->GetText() );
- // Dialog bekommt HelpId der TabPage
+ // Dialog recieves the HelpId of TabPage
SetHelpId( pImpl->m_pTabPage->GetHelpId() );
SetUniqueId( pImpl->m_pTabPage->GetUniqueId() );
}
@@ -924,12 +912,11 @@ void SfxSingleTabDialog::SetPage( TabPage* pNewPage )
void SfxSingleTabDialog::SetTabPage( SfxTabPage* pTabPage,
GetTabPageRanges pRangesFunc )
-/* [Beschreibung]
+/* [Description]
- Setzen einer (neuen) TabPage; eine bereits vorhandene Page
- wird gel"oscht.
- Die "ubergebene Page wird durch Aufruf von Reset() mit dem
- initial "ubergebenen Itemset initialisiert.
+ Insert a (new) TabPage; an existing page is deleted.
+ The passed on page is initialized with the initially given Itemset
+ through calling Reset().
*/
{
@@ -952,7 +939,7 @@ void SfxSingleTabDialog::SetTabPage( SfxTabPage* pTabPage,
if ( pImpl->m_pSfxPage )
{
- // erstmal die User-Daten besorgen, dann erst Reset()
+ // First obtain the user data, only then Reset()
SvtViewOptions aPageOpt( E_TABPAGE, String::CreateFromInt32( GetUniqId() ) );
String sUserData;
Any aUserItem = aPageOpt.GetUserItem( USERITEM_NAME );
@@ -963,7 +950,7 @@ void SfxSingleTabDialog::SetTabPage( SfxTabPage* pTabPage,
pImpl->m_pSfxPage->Reset( *GetInputItemSet() );
pImpl->m_pSfxPage->Show();
- // Gr"ossen und Positionen anpassen
+ // Adjust size and position
pImpl->m_pSfxPage->SetPosPixel( Point() );
Size aOutSz( pImpl->m_pSfxPage->GetSizePixel() );
Size aBtnSiz = LogicToPixel( Size( 50, 14 ), MAP_APPFONT );
@@ -981,10 +968,10 @@ void SfxSingleTabDialog::SetTabPage( SfxTabPage* pTabPage,
if ( Help::IsContextHelpEnabled() )
pHelpBtn->Show();
- // Text der TabPage in den Dialog setzen
+ // Set TabPage text in the Dialog
SetText( pImpl->m_pSfxPage->GetText() );
- // Dialog bekommt HelpId der TabPage
+ // Dialog recieves the HelpId of TabPage
SetHelpId( pImpl->m_pSfxPage->GetHelpId() );
SetUniqueId( pImpl->m_pSfxPage->GetUniqueId() );
}
@@ -998,7 +985,7 @@ void SfxSingleTabDialog::SetInfoLink( const Link& rLink )
}
//--------------------------------------------------------------------
-// Vergleichsfunktion fuer qsort
+// Comparison function for qsort
#ifdef WNT
int __cdecl BaseDlgsCmpUS_Impl( const void* p1, const void* p2 )
@@ -1016,15 +1003,15 @@ extern "C" int BaseDlgsCmpUS_Impl( const void* p1, const void* p2 )
// -----------------------------------------------------------------------
/*
- Bildet das Set "uber die Ranges der Page. Die Page muss die statische
- Methode f"ur das Erfragen ihrer Ranges bei SetTabPage angegeben haben,
- liefert also ihr Set onDemand.
+ Creates the set over the Page range. the page must register the static
+ method for querys on the range in SetTabPage, so the Set is delivered
+ onDemand.
*/
const sal_uInt16* SfxSingleTabDialog::GetInputRanges( const SfxItemPool& rPool )
{
if ( GetInputItemSet() )
{
- OSL_FAIL( "Set bereits vorhanden!" );
+ OSL_FAIL( "Set already exists!" );
return GetInputItemSet()->GetRanges();
}
@@ -1042,13 +1029,13 @@ const sal_uInt16* SfxSingleTabDialog::GetInputRanges( const SfxItemPool& rPool )
aUS.Insert( pTmpRanges, nLen, aUS.Count() );
}
- //! Doppelte Ids entfernen?
+ //! Remove duplicate IDs?
sal_uInt16 nCount = aUS.Count();
for ( sal_uInt16 i = 0; i < nCount; ++i )
aUS[i] = rPool.GetWhich( aUS[i]) ;
- // sortieren
+ // sort
if ( aUS.Count() > 1 )
qsort( (void*)aUS.GetData(), aUS.Count(), sizeof(sal_uInt16), BaseDlgsCmpUS_Impl );
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 52fbc865d4f1..086fcc226537 100755
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -671,7 +671,7 @@ SfxTabPage *SfxDocumentDescPage::Create(Window *pParent, const SfxItemSet &rItem
sal_Bool SfxDocumentDescPage::FillItemSet(SfxItemSet &rSet)
{
- // Pruefung, ob eine Aenderung vorliegt
+ // Test whether a change is present
const sal_Bool bTitleMod = aTitleEd.IsModified();
const sal_Bool bThemeMod = aThemaEd.IsModified();
const sal_Bool bKeywordsMod = aKeywordsEd.IsModified();
@@ -681,7 +681,7 @@ sal_Bool SfxDocumentDescPage::FillItemSet(SfxItemSet &rSet)
return sal_False;
}
- // Erzeugung der Ausgabedaten
+ // Generating the output data
const SfxPoolItem* pItem = NULL;
SfxDocumentInfoItem* pInfo = NULL;
SfxTabDialog* pDlg = GetTabDialog();
@@ -1023,7 +1023,7 @@ sal_Bool SfxDocumentPage::FillItemSet( SfxItemSet& rSet )
void SfxDocumentPage::Reset( const SfxItemSet& rSet )
{
- // Bestimmung der Dokumentinformationen
+ // Determine the document information
const SfxDocumentInfoItem *pInfoItem =
&(const SfxDocumentInfoItem &)rSet.Get(SID_DOCINFO);
@@ -1061,7 +1061,7 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet )
}
else
{
- DBG_ASSERT( pItem->IsA( TYPE( SfxStringItem ) ), "SfxDocumentPage:<SfxStringItem> erwartet" );
+ DBG_ASSERT( pItem->IsA( TYPE( SfxStringItem ) ), "SfxDocumentPage:<SfxStringItem> expected" );
aName = ( ( SfxStringItem* ) pItem )->GetValue();
}
aNameED.SetText( aName );
@@ -1501,13 +1501,13 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( Window* pParent,
DBG_ASSERT( pURLItem, "No BaseURL provided for InternetTabPage!" );
#endif
- // Bestimmung des Titels
+ // Determine the Titels
const SfxPoolItem* pItem = 0;
String aTitle( GetText() );
if ( SFX_ITEM_SET !=
rItemSet.GetItemState( SID_EXPLORER_PROPS_START, sal_False, &pItem ) )
{
- // Dateiname
+ // File name
String aFile( pInfoItem->GetValue() );
INetURLObject aURL;
@@ -1527,12 +1527,12 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( Window* pParent,
else
{
DBG_ASSERT( pItem->IsA( TYPE( SfxStringItem ) ),
- "SfxDocumentInfoDialog:<SfxStringItem> erwartet" );
+ "SfxDocumentInfoDialog:<SfxStringItem> expected" );
aTitle += ( ( SfxStringItem* ) pItem )->GetValue();
}
SetText( aTitle );
- // Eigenschaftenseiten
+ // Property Pages
AddTabPage(TP_DOCINFODESC, SfxDocumentDescPage::Create, 0);
AddTabPage(TP_DOCINFODOC, SfxDocumentPage::Create, 0);
AddTabPage(TP_CUSTOMPROPERTIES, SfxCustomPropertiesPage::Create, 0);
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 58d09bf48a53..a2afa03773c6 100755
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -450,8 +450,8 @@ friend class SfxDockingWindow;
sal_Bool bSplitable;
Timer aMoveTimer;
- // Folgende members sind nur in der Zeit von StartDocking bis EndDocking
- // g"ultig:
+ // The following members are only valid in the time from startDocking to
+ // EndDocking:
sal_Bool bEndDocked;
Size aSplitSize;
long nHorizontalSize;
@@ -478,12 +478,11 @@ friend class SfxDockingWindow;
void SfxDockingWindow::Resize()
-/* [Beschreibung]
+/* [Description]
- Diese virtuelle Methode der Klasse DockingWindow merkt sich ggf. eine
- ver"anderte FloatingSize.
- Wird diese Methode von einer abgeleiteten Klasse "uberschrieben, mu\s
- auch SfxDockingWindow::Resize() gerufen werden.
+ This virtual method of the class FloatingWindow keeps track of changes in
+ FloatingSize. If this method is overridden by a derived class,
+ then the SfxFloatingWindow: Resize() must also be called.
*/
{
DockingWindow::Resize();
@@ -529,13 +528,13 @@ void SfxDockingWindow::Resize()
sal_Bool SfxDockingWindow::PrepareToggleFloatingMode()
-/* [Beschreibung]
+/* [Description]
- Diese virtuelle Methode der Klasse DockingWindow erm"oglicht ein Eingreifen
- in das Umschalten des floating mode.
- Wird diese Methode von einer abgeleiteten Klasse "uberschrieben, mu\s
- danach SfxDockingWindow::PrepareToggleFloatingMode() gerufen werden,
- wenn nicht FALSE zur"uckgegeben wird.
+ This virtual method of the class DockingWindow makes it possible to
+ intervene in the switching of the floating mode.
+ If this method is overridden by a derived class,
+ then the SfxDockingWindow::PrepareToggleFloatingMode() must be called
+ afterwards, if not FALSE is returned.
*/
{
@@ -550,13 +549,13 @@ sal_Bool SfxDockingWindow::PrepareToggleFloatingMode()
if (!IsFloatingMode())
{
- // Testen, ob FloatingMode erlaubt ist
+ // Test, if FloatingMode is permitted.
if ( CheckAlignment(GetAlignment(),SFX_ALIGN_NOALIGNMENT) != SFX_ALIGN_NOALIGNMENT )
return sal_False;
if ( pImp->pSplitWin )
{
- // Das DockingWindow sitzt in einem SplitWindow und wird abgerissen
+ // The DockingWindow is inside a SplitWindow and will be teared of.
pImp->pSplitWin->RemoveWindow(this/*, sal_False*/);
pImp->pSplitWin = 0;
}
@@ -565,11 +564,11 @@ sal_Bool SfxDockingWindow::PrepareToggleFloatingMode()
{
pImp->aWinState = GetFloatingWindow()->GetWindowState();
- // Testen, ob es erlaubt ist, anzudocken
+ // Test if it is allowed to dock,
if (CheckAlignment(GetAlignment(),pImp->GetLastAlignment()) == SFX_ALIGN_NOALIGNMENT)
return sal_False;
- // Testen, ob das Workwindow gerade ein Andocken erlaubt
+ // Test, if the Workwindow allows for docking at the moment.
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
if ( !pWorkWin->IsDockingAllowed() || !pWorkWin->IsInternalDockingAllowed() )
return sal_False;
@@ -582,24 +581,22 @@ sal_Bool SfxDockingWindow::PrepareToggleFloatingMode()
void SfxDockingWindow::ToggleFloatingMode()
-/* [Beschreibung]
+/* [Description]
- Diese virtuelle Methode der Klasse DockingWindow setzt die internen
- Daten des SfxDockingWindow und sorgt f"ur korrektes Alignment am
- parent window.
- Durch PrepareToggleFloatMode und Initialize ist sichergestellt, da\s
- pImp->GetLastAlignment() immer eine erlaubtes Alignment liefert.
- Wird diese Methode von einer abgeleiteten Klasse "uberschrieben, mu\s
- zuerst SfxDockingWindow::ToggleFloatingMode() gerufen werden.
+ This virtual method of the DockingWindow class sets the internal data of
+ the SfxDockingWindow and ensures the correct alignment on the parent window.
+ Through PrepareToggleFloatMode and Initialize it is ensured that
+ pImp-> GetLastAlignment() always delivers an allowed alignment. If this
+ method is overloaded from a derived class, then first the
+ SfxDockingWindow:: ToggleFloatingMode() must be called.
*/
{
if ( !pImp->bConstructed || !pMgr )
- return; // Kein Handler-Aufruf
+ return; // No Handler call
- // Altes Alignment merken und dann umschalten.
- // Sv hat jetzt schon umgeschaltet, aber Alignment am SfxDockingWindow
- // ist noch das alte!
- // Was war ich bisher ?
+ // Remember old alignment and then switch.
+ // SV has already switched, but the alignment SfxDockingWindow is still
+ // the old one. What I was before?
SfxChildAlignment eLastAlign = GetAlignment();
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
@@ -619,16 +616,17 @@ void SfxDockingWindow::ToggleFloatingMode()
{
if (pImp->GetDockAlignment() == eLastAlign)
{
- // Wenn ToggleFloatingMode aufgerufen wurde, das DockAlignment
- // aber noch unver"andert ist, mu\s das ein Toggeln durch DClick
- // gewesen sein, also LastAlignment verwenden
+ // If ToggleFloatingMode was called, but the DockAlignment still
+ // is unchanged, then this means that it must have been a toggling
+ // through DClick, so use last alignment
SetAlignment (pImp->GetLastAlignment());
if ( !pImp->bSplitable )
SetSizePixel( CalcDockingSize(GetAlignment()) );
}
else
{
- // Toggeln wurde durch Draggen ausgel"ost
+
+ // Toggling was triggered by dragging
pImp->nLine = pImp->nDockLine;
pImp->nPos = pImp->nDockPos;
SetAlignment (pImp->GetDockAlignment());
@@ -636,13 +634,13 @@ void SfxDockingWindow::ToggleFloatingMode()
if ( pImp->bSplitable )
{
- // Das DockingWindow kommt jetzt in ein SplitWindow
+ // The DockingWindow is now in a SplitWindow
pImp->pSplitWin = pWorkWin->GetSplitWindow_Impl(GetAlignment());
- // Das LastAlignment ist jetzt immer noch das zuletzt angedockte
+ // The LastAlignment is still the last docked
SfxSplitWindow *pSplit = pWorkWin->GetSplitWindow_Impl(pImp->GetLastAlignment());
- DBG_ASSERT( pSplit, "LastAlignment kann nicht stimmen!" );
+ DBG_ASSERT( pSplit, "LastAlignment is not correct!" );
if ( pSplit && pSplit != pImp->pSplitWin )
pSplit->ReleaseWindow_Impl(this);
if ( pImp->GetDockAlignment() == eLastAlign )
@@ -654,14 +652,14 @@ void SfxDockingWindow::ToggleFloatingMode()
}
}
- // altes Alignment festhalten f"ur n"achstes Togglen; erst jetzt setzen
- // wg. Abmelden beim SplitWindow!
+ // Keep the old alignment for the next toggle; set it only now due to the
+ // unregister SplitWindow!
pImp->SetLastAlignment(eLastAlign);
- // DockAlignment zur"ucksetzen, falls noch EndDocking gerufen wird
+ // Reset DockAlignment, if EndDocking is still called
pImp->SetDockAlignment(GetAlignment());
- // SfxChildWindow korrekt andocken bzw. entdocken
+ // Dock or undock SfxChildWindow correctly.
if ( pMgr )
pWorkWin->ConfigChild_Impl( eIdent, SFX_TOGGLEFLOATMODE, pMgr->GetType() );
}
@@ -670,12 +668,12 @@ void SfxDockingWindow::ToggleFloatingMode()
void SfxDockingWindow::StartDocking()
-/* [Beschreibung]
+/* [Description]
- Diese virtuelle Methode der Klasse DockingWindow holt vom parent window
- das innere und "au\sere docking rectangle.
- Wird diese Methode von einer abgeleiteten Klasse "uberschrieben, mu\s
- am Ende SfxDockingWindow::StartDocking() gerufen werden.
+ This virtual method of the DockingWindow class takes the inner and outer
+ docking rectangle from the parent window. If this method is overloaded by a
+ a derived class, then SfxDockingWindow:StartDocking() has to be called at
+ the end.
*/
{
if ( !pImp->bConstructed || !pMgr )
@@ -689,7 +687,7 @@ void SfxDockingWindow::StartDocking()
if ( pImp->pSplitWin )
{
- // Die aktuellen Docking-Daten besorgen
+ // Get the current docking data
pImp->pSplitWin->GetWindowPos(this, pImp->nLine, pImp->nPos);
pImp->nDockLine = pImp->nLine;
pImp->nDockPos = pImp->nPos;
@@ -701,12 +699,12 @@ void SfxDockingWindow::StartDocking()
sal_Bool SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
-/* [Beschreibung]
+/* [Description]
- Diese virtuelle Methode der Klasse DockingWindow berechnet das aktuelle
- tracking rectangle. Dazu benutzt sie die Methode CalcAlignment(rPos,rRect),
- deren Verhalten von abgeleiteten Klassen beeinflu\st werden kann (s.u.).
- Diese Methode sollte nach M"oglichkeit nicht "uberschrieben werden.
+ This virtual method of the DockingWindow class calculates the current
+ tracking rectangle. For this purpose the method CalcAlignment(RPOs, rRect)
+ is used, the behavior can be influenced by the derived classes (see below).
+ This method should if possible not be overwritten.
*/
{
if ( Application::IsInModalMode() )
@@ -726,7 +724,7 @@ sal_Bool SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
if ( GetOuterRect().IsInside( rPos ) && !IsDockingPrevented() )
{
- // Maus innerhalb OuterRect : Alignment und Rectangle berechnen
+ // Mouse within OuterRect: calculate Alignment and Rectangle
SfxChildAlignment eAlign = CalcAlignment(rPos, rRect);
if (eAlign == SFX_ALIGN_NOALIGNMENT)
bFloatMode = sal_True;
@@ -734,15 +732,15 @@ sal_Bool SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
}
else
{
- // Maus nicht innerhalb OuterRect : muss FloatingWindow sein
- // Ist das erlaubt ?
+ // Mouse is not within OuterRect: must be FloatingWindow
+ // Is this allowed?
if (CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_NOALIGNMENT) != SFX_ALIGN_NOALIGNMENT)
return sal_False;
bFloatMode = sal_True;
if ( SFX_ALIGN_NOALIGNMENT != pImp->GetDockAlignment() )
{
- // wg. SV-Bug darf rRect nur ver"andert werden, wenn sich das
- // Alignment "andert !
+ // Due to a bug the rRect may only be changed when the
+ // alignment is changed!
pImp->SetDockAlignment(SFX_ALIGN_NOALIGNMENT);
rRect.SetSize(CalcDockingSize(SFX_ALIGN_NOALIGNMENT));
}
@@ -750,8 +748,8 @@ sal_Bool SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
if ( !pImp->bSplitable )
{
- // Bei individuell angedocktem Window wird die Position durch das
- // Alignment und die docking rects festgelegt.
+ // For individually docked window the position is set through the
+ // alignment and the docking rectangle.
Size aSize = rRect.GetSize();
Point aPos;
@@ -804,12 +802,11 @@ sal_Bool SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
void SfxDockingWindow::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode )
-/* [Beschreibung]
+/* [Description]
- Diese virtuelle Methode der Klasse DockingWindow sorgt f"ur das korrekte
- Alignment am parent window.
- Wird diese Methode von einer abgeleiteten Klasse "uberschrieben, mu\s
- zuerst SfxDockingWindow::EndDocking() gerufen werden.
+ Virtual method of the DockingWindow class ensures the correct alignment on
+ the parent window. If this method is overloaded by a derived class, then
+ SfxDockingWindow::EndDocking() must be called first.
*/
{
if ( !pImp->bConstructed || IsDockingCanceled() || !pMgr )
@@ -819,10 +816,10 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode )
sal_Bool bReArrange = sal_False;
if ( pImp->bSplitable )
{
- // Wenn sich das Alignment "andert und das Fenster befindet sich
- // im angedockten Zustand in einem SplitWindow, mu\s umgemeldet werden
- // Wenn neu angedockt wird, machen PrepareToggleFloatingMode()
- // und ToggleFloatingMode() das Ummelden.
+ // If the alignment changes and the window is in a docked state in a
+ // SplitWindow, then it must be re-registered. If it is docked again,
+ // PrepareToggleFloatingMode() and ToggleFloatingMode() preform the
+ // re-registered
if ( !bFloatMode )
bReArrange = sal_True;
}
@@ -831,12 +828,12 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode )
{
if ( GetAlignment() != pImp->GetDockAlignment() )
{
- // Vor dem Show() mu\s das Ummelden passiert sein, daher kann nicht
- // die Basisklasse gerufen werden
+ // before Show() is called must the reassignment have been made,
+ // therefore the base class can not be called
if ( IsFloatingMode() || !pImp->bSplitable )
Show( sal_False, SHOW_NOFOCUSCHANGE );
- // Die Gr"o\se f"urs Toggeln setzen
+ // Set the size for toggling.
pImp->aSplitSize = rRect.GetSize();
if ( IsFloatingMode() )
{
@@ -858,7 +855,7 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode )
}
else if ( pImp->nLine != pImp->nDockLine || pImp->nPos != pImp->nDockPos || pImp->bNewLine )
{
- // Ich wurde innerhalb meines Splitwindows verschoben.
+ // Moved within Splitwindows
if ( pImp->nLine != pImp->nDockLine )
pImp->aSplitSize = rRect.GetSize();
pImp->pSplitWin->MoveWindow( this, pImp->aSplitSize, pImp->nDockLine, pImp->nDockPos, pImp->bNewLine );
@@ -878,13 +875,12 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode )
void SfxDockingWindow::Resizing( Size& /*rSize*/ )
-/* [Beschreibung]
+/* [Description]
- Virtuelle Methode der Klasse DockingWindow.
- Hier kann das interaktive Umgr"o\sern im FloatingMode beeinflu\t werden,
- z.B. indem nur diskrete Werte f"ur Breite und/oder H"ohe zugelassen werden.
- Die Basisimplementation verhindert, da\s die OutputSize kleiner wird als
- eine mit SetMinOutputSizePixel() gesetzte Gr"o\se.
+ Virtual method of the DockingWindow class. Here, the interactive resize in
+ FloatingMode can be influenced, for example by only allowing for discrete
+ values for width and / or height. The base implementation prevents that the
+ output size is smaller than one set with SetMinOutputSizePixel().
*/
{
@@ -900,10 +896,10 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
pMgr(pCW),
pImp(NULL)
-/* [Beschreibung]
+/* [Description]
- ctor der Klasse SfxDockingWindow. Es wird ein SfxChildWindow ben"otigt,
- da das Andocken im Sfx "uber SfxChildWindows realisiert wird.
+ Constructor for the SfxDockingWindow class. A SfxChildWindow will be
+ required because the docking is implemented in Sfx through SfxChildWindows.
*/
{
@@ -933,7 +929,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
pImp->bSplitable = sal_True;
- // Zun"achst auf Defaults setzen; das Alignment wird in der Subklasse gesetzt
+ // Initially set to default, the alignment is set in the subclass
pImp->nLine = pImp->nDockLine = 0;
pImp->nPos = pImp->nDockPos = 0;
pImp->bNewLine = sal_False;
@@ -951,10 +947,10 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
pMgr(pCW),
pImp(NULL)
-/* [Beschreibung]
+/* [Description]
- ctor der Klasse SfxDockingWindow. Es wird ein SfxChildWindow ben"otigt,
- da das Andocken im Sfx "uber SfxChildWindows realisiert wird.
+ Constructor for the SfxDockingWindow class. A SfxChildWindow will be
+ required because the docking is implemented in Sfx through SfxChildWindows.
*/
{
@@ -984,7 +980,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
pImp->bSplitable = sal_True;
- // Zun"achst auf Defaults setzen; das Alignment wird in der Subklasse gesetzt
+ // Initially set to default, the alignment is set in the subclass
pImp->nLine = pImp->nDockLine = 0;
pImp->nPos = pImp->nDockPos = 0;
pImp->bNewLine = sal_False;
@@ -996,12 +992,12 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
//-------------------------------------------------------------------------
void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
-/* [Beschreibung]
+/* [Description]
- Initialisierung der Klasse SfxDockingWindow "uber ein SfxChildWinInfo.
- Die Initialisierung erfolgt erst in einem 2.Schritt nach dem ctor und sollte
- vom ctor der abgeleiteten Klasse oder vom ctor des SfxChildWindows
- aufgerufen werden.
+ Initialization of the SfxDockingDialog class via a SfxChildWinInfo.
+ The initialization is done only in a 2nd step after the constructor, this
+ constructor should be called from the derived class or from the
+ SfxChildWindows.
*/
{
if ( !pMgr )
@@ -1161,10 +1157,9 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
else
{
//?????? Currently not supported
- // Fenster ist individuell angedockt; Gr"o\se berechnen.
- // Dazu mu\s sie mit der FloatingSize initialisiert werden, falls
- // irgendwer sich darauf verl"a\st, da\s eine vern"unftige Gr"o\se
- // gesetzt ist
+ // Window is docked individually; size is calculated.
+ // It must therefore be initialized with the DloatingSize if
+ // someone relies on it that a reasonable size is set
SetSizePixel(GetFloatingSize());
SetSizePixel(CalcDockingSize(GetAlignment()));
}
@@ -1229,16 +1224,13 @@ void SfxDockingWindow::Initialize_Impl()
void SfxDockingWindow::FillInfo(SfxChildWinInfo& rInfo) const
-/* [Beschreibung]
+/* [Description]
- F"ullt ein SfxChildWinInfo mit f"ur SfxDockingWindow spezifischen Daten,
- damit sie in die INI-Datei geschrieben werden koennen.
- Es wird angenommen, da\s rInfo alle anderen evt. relevanten Daten in
- der ChildWindow-Klasse erh"alt.
- Eingetragen werden hier gemerkten Gr"o\sen, das ZoomIn-Flag und die
- f"ur das Docking relevanten Informationen.
- Wird diese Methode "uberschrieben, mu\s zuerst die Basisimplementierung
- gerufen werden.
+ Fills a SfxChildWinInfo with specific data from SfxDockingWindow,
+ so that it can be written in the INI file. It is assumed that rinfo
+ receives all other possible relevant data in the ChildWindow class.
+ Insertions are marked with size and the ZoomIn flag.
+ If this method is overridden, the base implementation must be called first.
*/
{
@@ -1296,20 +1288,18 @@ void SfxDockingWindow::ReleaseChildWindow_Impl()
SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& rRect)
-/* [Beschreibung]
-
- Diese Methode berechnet f"ur gegebene Mausposition und tracking rectangle,
- welches Alignment sich daraus ergeben w"urde. Beim Wechsel des Alignments
- kann sich auch das tracking rectangle "andern, so dass ein ver"andertes
- rectangle zur"uckgegeben wird.
+/* [Description]
- Der Klassenbenutzer kann das Verhalten dieser Methode und damit das Verhalten
- seiner DockinWindow-Klasse beim Docken beeinflussen, indem er die hier
- aufgerufene virtuelle Methode
+ This method calculates a resulting alignment for the given mouse position
+ and tracking rectangle. When changing the alignment it can also be that
+ the tracking rectangle is changed, so that an altered rectangle is
+ returned. The user of this class can influence behaviour of this method,
+ and thus the behavior of his DockinWindow class when docking where the
+ called virtual method:
- SfxDockingWindow::CalcDockingSize(SfxChildAlignment eAlign)
+ SfxDockingWindow :: CalcDockingSize (SfxChildAlignment eAlign)
- "uberschreibt (s.u.).
+ is overridden (see below).
*/
{
@@ -1499,9 +1489,9 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
if ( eDockAlign == SFX_ALIGN_NOALIGNMENT )
{
- //Im FloatingMode erh"alt das tracking rectangle die floating size
- // wg. SV-Bug darf rRect nur ver"andert werden, wenn sich das
- // Alignment "andert !
+ // In the FloatingMode the tracking rectangle will get the floating
+ // size. Due to a bug the rRect may only be changed when the
+ // alignment is changed!
if ( eDockAlign != pImp->GetDockAlignment() )
aDockingRect.SetSize( aFloatingSize );
}
@@ -1666,25 +1656,22 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
Size SfxDockingWindow::CalcDockingSize(SfxChildAlignment eAlign)
-/* [Beschreibung]
-
- Virtuelle Methode der Klasse SfxDockingWindow.
- Hier wird festgelegt, wie sich die Gr"o\se des DockingWindows abh"angig vom
- Alignment "andert.
- Die Basisimplementation setzt im Floating Mode die Gr"o\se auf die gemerkte
- Floating Size.
- Bei horizontalem Alignment wird die Breite auf die Breite des "au\seren
- DockingRects, bei vertikalem Alignment die H"ohe auf die H"ohe des inneren
- DockingRects (ergibt sich aus der Reihenfolge, in der im SFX ChildWindows
- ausgegeben werden). Die jeweils andere Gr"o\se wird auf die aktuelle
- Floating Size gesetzt, hier k"onnte eine abgeleitete Klasse "andernd
- eingreifen.
- Die DockingSize mu\s f"ur Left/Right und Top/Bottom jeweils gleich sein.
+/* [Description]
+
+ Virtual method of the SfxDockingWindow class. This method determines how
+ the size of the DockingWindows changes depending on the alignment. The base
+ implementation uses the floating mode, the size of the marked Floating
+ Size. For horizontal alignment, the width will be the width of the outer
+ DockingRectangle, with vertical alignment the height will be the height of
+ the inner DockingRectangle (resulting from the order in which the SFX child
+ windows are displayed). The other size is set to the current floating-size,
+ this could changed by a to intervening derived class. The docking size must
+ be the same for Left/Right and Top/Bottom.
*/
{
- // Achtung: falls das Resizing auch im angedockten Zustand geht, mu\s dabei
- // auch die Floating Size angepa\st werden !?
+ // Note: if the resizing is also possible in the docked state, then the
+ // Floating-size does also have to be adjusted?
Size aSize = GetFloatingSize();
switch (eAlign)
@@ -1719,11 +1706,11 @@ Size SfxDockingWindow::CalcDockingSize(SfxChildAlignment eAlign)
SfxChildAlignment SfxDockingWindow::CheckAlignment(SfxChildAlignment,
SfxChildAlignment eAlign)
-/* [Beschreibung]
+/* [Description]
- Virtuelle Methode der Klasse SfxDockingWindow.
- Hier kann eine abgeleitete Klasse bestimmte Alignments verbieten.
- Die Basisimplementation verbietet kein Alignment.
+ Virtual method of the SfxDockingWindow class. Here a derived class can
+ disallow certain alignments. The base implementation does not
+ prohibit alignment.
*/
{
@@ -1734,18 +1721,15 @@ SfxChildAlignment SfxDockingWindow::CheckAlignment(SfxChildAlignment,
sal_Bool SfxDockingWindow::Close()
-/* [Beschreibung]
-
- Das Fenster wird geschlossen, indem das ChildWindow durch Ausf"uhren des
- ChildWindow-Slots zerst"ort wird.
- Wird diese Methode von einer abgeleiteten Klasse "uberschrieben, mu\s
- danach SfxDockingWindow::Close() gerufen werden, wenn nicht das Close()
- mit "return FALSE" abgebrochen wird.
+/* [Description]
+ The window is closed when the ChildWindow is destroyed by running the
+ ChildWindow-slots. If this is method is overridden by a derived class
+ method, then the SfxDockingDialogWindow: Close() must be called afterwards
+ if the Close() was not cancelled with "return sal_False".
*/
{
- // Execute mit Parametern, da Toggle von einigen ChildWindows ignoriert
- // werden kann
+ // Execute with Parameters, since Toggle is ignored by some ChildWindows.
if ( !pMgr )
return sal_True;
@@ -1759,10 +1743,10 @@ sal_Bool SfxDockingWindow::Close()
void SfxDockingWindow::Paint(const Rectangle& /*rRect*/)
-/* [Beschreibung]
+/* [Description]
- Es wird im angedockten Zustand eine Begrenzungslinie an der angedockten
- Kante und ein Rahmen ausgegeben. Dabei wird SVLOOK ber"ucksichtigt.
+ Returns a boundary line to the docked edge and a frame when the Window is in
+ a docked state. In this way SVLOOK is considered.
*/
{
@@ -1812,10 +1796,10 @@ void SfxDockingWindow::Paint(const Rectangle& /*rRect*/)
void SfxDockingWindow::SetMinOutputSizePixel( const Size& rSize )
-/* [Beschreibung]
+/* [Description]
- Mit dieser Methode kann eine minimale OutpuSize gesetzt werden, die
- im Resizing()-Handler abgefragt wird.
+ With this method, a minimal OutputSize be can set, that is queried in
+ the Resizing()-Handler.
*/
{
@@ -1827,9 +1811,9 @@ void SfxDockingWindow::SetMinOutputSizePixel( const Size& rSize )
Size SfxDockingWindow::GetMinOutputSizePixel() const
-/* [Beschreibung]
+/* [Description]
- Die gesetzte minimale Gr"o\se wird zur"uckgegeben.
+ Set the minimum size which is returned.
*/
{
@@ -1860,17 +1844,17 @@ long SfxDockingWindow::Notify( NotifyEvent& rEvt )
if ( sHelpId.getLength() )
SfxHelp::OpenHelpAgent( &pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), sHelpId );
- // In VCL geht Notify zun"achst an das Fenster selbst,
- // also base class rufen, sonst erf"ahrt der parent nichts
+ // In VCL Notify goes first to the window itself, also call the
+ // base class, otherwise the parent learns nothing
// if ( rEvt.GetWindow() == this ) PB: #i74693# not necessary any longer
DockingWindow::Notify( rEvt );
return sal_True;
}
else if( rEvt.GetType() == EVENT_KEYINPUT )
{
- // KeyInput zuerst f"ur Dialogfunktionen zulassen
+ // First, allow KeyInput for Dialog functions
if ( !DockingWindow::Notify( rEvt ) && SfxViewShell::Current() )
- // dann auch global g"ultige Acceleratoren verwenden
+ // then also for valid global accelerators.
return SfxViewShell::Current()->GlobalKeyInput_Impl( *rEvt.GetKeyEvent() );
return sal_True;
}
diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx
index 29e234c5500b..c4a3a7622d07 100755
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -826,7 +826,7 @@ namespace sfx2
#ifdef DBG_UTIL
ByteString aMsg( "sfx2::lcl_EnsureAllFilesEntry: could not append Filter" );
aMsg += ByteString( String( sAllFilterName ), RTL_TEXTENCODING_UTF8 );
- DBG_ERROR( aMsg.GetBuffer() );
+ OSL_FAIL( aMsg.GetBuffer() );
#endif
}
}
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index 3433e74e2073..4db7f7c8e078 100755
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -979,17 +979,16 @@ SfxMailModel::SendMailResult SfxMailModel::SaveAndSend( const css::uno::Referenc
sal_Bool CreateFromAddress_Impl( String& rFrom )
-/* [Beschreibung]
+/* [Description]
- Diese Funktion versucht mit Hilfe des IniManagers eine From-Adresse
- zu erzeugen. daf"ur werden die Felder 'Vorname', 'Name' und 'EMail'
- aus der Applikations-Ini-Datei ausgelesen. Sollten diese Felder
- nicht gesetzt sein, wird FALSE zur"uckgegeben.
+ This function tries to create a From-address with the help of IniManagers.
+ For this the fields 'first name', 'Name' and 'Email' are read from the
+ application-ini-data. If these fields are not set, FALSE is returned.
- [R"uckgabewert]
+ [Return value]
- sal_True: Adresse konnte erzeugt werden.
- sal_False: Adresse konnte nicht erzeugt werden.
+ sal_True: Address could be created.
+ sal_False: Address could not be created.
*/
{
@@ -1006,14 +1005,14 @@ sal_Bool CreateFromAddress_Impl( String& rFrom )
rFrom += ' ';
}
rFrom += TRIM( aName );
- // unerlaubte Zeichen entfernen
+ // remove illegal characters
rFrom.EraseAllChars( '<' );
rFrom.EraseAllChars( '>' );
rFrom.EraseAllChars( '@' );
}
String aEmailName = aUserCFG.GetEmail();
- // unerlaubte Zeichen entfernen
+ // remove illegal characters
aEmailName.EraseAllChars( '<' );
aEmailName.EraseAllChars( '>' );
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index 3f4ea4ddad16..de0240b2b43a 100755
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -84,8 +84,9 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
aParent ( pStyle->GetParent() ),
nFlags ( pStyle->GetMask() )
-/* [Beschreibung]
- Konstruktor; initialisiert die ListBoxen mit den Vorlagen
+/* [Description]
+
+ Constructor, initializes the list box with the templates
*/
{
@@ -100,11 +101,11 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
aDescED.Hide();
aDescFt.Show();
- // diese Page braucht ExchangeSupport
+ // this Page needs ExchangeSupport
SetExchangeSupport();
ResMgr* pResMgr = SFX_APP()->GetModule_Impl()->GetResMgr();
- DBG_ASSERT( pResMgr, "kein ResMgr am Modul" );
+ DBG_ASSERT( pResMgr, "No ResMgr in Module" );
pFamilies = new SfxStyleFamilies( ResId( DLG_STYLE_DESIGNER, *pResMgr ) );
SfxStyleSheetBasePool* pPool = 0;
@@ -112,17 +113,17 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
if ( pDocShell )
pPool = pDocShell->GetStyleSheetPool();
- DBG_ASSERT( pPool, "kein Pool oder keine DocShell" );
+ DBG_ASSERT( pPool, "no Pool or no DocShell" );
if ( pPool )
{
pPool->SetSearchMask( pStyle->GetFamily() );
- pPool->First(); // fuer SW - interne Liste updaten
+ pPool->First(); // for SW - update internal list
}
if ( !pStyle->GetName().Len() && pPool )
{
- // NullString als Name -> Name generieren
+ // NullString as Name -> generate Name
String aNoName( SfxResId( STR_NONAME ) );
sal_uInt16 nNo = 1;
String aNo( aNoName );
@@ -162,7 +163,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
pPoolStyle = pPool->Next();
}
- // eine neue Vorlage ist noch nicht im Pool
+ // A new Template is not jet in the Pool
if ( LISTBOX_ENTRY_NOTFOUND == aFollowLb.GetEntryPos( pStyle->GetName() ) )
aFollowLb.InsertEntry( pStyle->GetName() );
}
@@ -181,7 +182,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
if ( pStyle->HasParentSupport() && pPool )
{
if ( pStyle->HasClearParentSupport() )
- // die Basisvorlage darf auf NULL gesetzt werden
+ // the base template can be set to NULL
aBaseLb.InsertEntry( String( SfxResId( STR_NONE ) ) );
SfxStyleSheetBase* pPoolStyle = pPool->First();
@@ -189,7 +190,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
while ( pPoolStyle )
{
const String aStr( pPoolStyle->GetName() );
- // eigener Namen nicht als Basisvorlage
+ // own name as base template
if ( aStr != aName )
aBaseLb.InsertEntry( aStr );
pPoolStyle = pPool->Next();
@@ -214,13 +215,13 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
if ( i < nCount )
{
sal_uInt16 nStyleFilterIdx = 0xffff;
- // Filterflags
+ // Filter flags
const SfxStyleFilter& rList = pItem->GetFilterList();
nCount = rList.size();
sal_uInt16 nIdx = 0;
sal_uInt16 nMask = pStyle->GetMask() & ~SFXSTYLEBIT_USERDEF;
- if ( !nMask ) // Benutzervorlage?
+ if ( !nMask ) // User Template?
nMask = pStyle->GetMask();
for ( i = 0; i < nCount; ++i )
@@ -261,7 +262,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
aNameEd.SetLoseFocusHdl(
LINK( this, SfxManageStyleSheetPage, LoseFocusHdl ) );
}
- // ist es ein Style mit automatischem Update? (nur SW)
+ // It is a style with auto update? (SW only)
if(SFX_ITEM_SET == rAttrSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE))
{
Size aSize = aNameEd.GetSizePixel();
@@ -275,8 +276,9 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
SfxManageStyleSheetPage::~SfxManageStyleSheetPage()
-/* [Beschreibung]
- Destruktor; Freigabe der Daten
+/* [Description]
+
+ Destructor, release of the data
*/
{
@@ -293,20 +295,20 @@ SfxManageStyleSheetPage::~SfxManageStyleSheetPage()
void SfxManageStyleSheetPage::UpdateName_Impl( ListBox* pBox,
const String& rNew )
-/* [Beschreibung]
- Nach der "Anderung eines Vorlagennamens die ListBox pBox
- aktualisieren
+/* [Description]
+
+ After the change of a template name update the ListBox pBox
[Parameter]
- ListBox* pBox ListBox, deren Eintr"age aktualisiert
- werden sollen
- const String& rNew der neue Name
+
+ ListBox* pBox ListBox, whose entries are to be updated
+ const String& rNew the new Name
*/
{
if ( pBox->IsEnabled() )
{
- // ist der aktuelle Eintrag, dessen Namen modifizieren wurde
+ // it is the current entry, which name was modified
const sal_Bool bSelect = pBox->GetSelectEntry() == aBuf;
pBox->RemoveEntry( aBuf );
pBox->InsertEntry( rNew );
@@ -320,8 +322,9 @@ void SfxManageStyleSheetPage::UpdateName_Impl( ListBox* pBox,
void SfxManageStyleSheetPage::SetDescriptionText_Impl()
-/* [Beschreibung]
- Attributbeschreibung setzen. daf"ur die eingestellte Metrik besorgen.
+/* [Description]
+
+ Set attribute description. Get the set metric for this.
*/
{
@@ -348,7 +351,7 @@ void SfxManageStyleSheetPage::SetDescriptionText_Impl()
case FUNIT_MILE: eUnit = SFX_MAPUNIT_INCH; break;
default:
- DBG_ERRORFILE( "not supported fieldunit" );
+ DBG_ERRORFILE( "non supported field unit" );
}
aDescFt.SetText( pStyle->GetDescription( eUnit ) );
}
@@ -357,8 +360,9 @@ void SfxManageStyleSheetPage::SetDescriptionText_Impl()
IMPL_LINK_INLINE_START( SfxManageStyleSheetPage, GetFocusHdl, Edit *, pEdit )
-/* [Beschreibung]
- StarView Handler; GetFocus-Handler des Edits mit dem Vorlagennamen.
+/* [Description]
+
+ StarView Handler; GetFocus-Handler of the Edits with the template name.
*/
{
@@ -371,19 +375,17 @@ IMPL_LINK_INLINE_END( SfxManageStyleSheetPage, GetFocusHdl, Edit *, pEdit )
IMPL_LINK_INLINE_START( SfxManageStyleSheetPage, LoseFocusHdl, Edit *, pEdit )
-/* [Beschreibung]
-
- StarView Handler; LoseFocus-Handler des Edits mit dem Vorlagennamen.
- Dieser aktualisiert ggf. die Listbox mit den Folgevorlagen.
- In der Listbox mit den Basisvorlagen ist die aktuelle Vorlage
- selbst nicht enthalten.
+/* [Description]
+ StarView Handler; loose-focus-handler of the edits of the template name.
+ This will update the listbox with the subsequent templates. The current
+ template itself is not returned in the listbox of the base templates.
*/
{
const String aStr( pEdit->GetText().EraseLeadingChars() );
pEdit->SetText( aStr );
- // ggf. Listbox der Basisvorlagen aktualisieren
+ // Update the Listbox of the base template if possible
if ( aStr != aBuf )
UpdateName_Impl( &aFollowLb, aStr );
return 0;
@@ -394,35 +396,37 @@ IMPL_LINK_INLINE_END( SfxManageStyleSheetPage, LoseFocusHdl, Edit *, pEdit )
sal_Bool SfxManageStyleSheetPage::FillItemSet( SfxItemSet& rSet )
-/* [Beschreibung]
- Handler f"ur das Setzen der (modifizierten) Daten. Wird aus
- dem Ok des SfxTabDialog gerufen.
+/* [Description]
+
+ Handler for setting the (modified) data. I called from the OK of the
+ SfxTabDialog.
[Parameter]
- SfxItemSet &rAttrSet das Set, das die Daten entgegennimmt.
- [R"uckgabewert]
- sal_Bool sal_True: es hat eine "Anderung der Daten
- stattgefunden
- sal_False: es hat keine "Anderung der Daten
- stattgefunden
+ SfxItemSet &rAttrSet The set, which receives the data.
+
+ [Return value]
+
+ sal_Bool sal_True: The data had been changed
+ sal_False: The data had not been changed
+
+ [Cross-reference]
- [Querverweise]
<class SfxTabDialog>
*/
{
const sal_uInt16 nFilterIdx = aFilterLb.GetSelectEntryPos();
- // Filter setzen
+ // Set Filter
if ( LISTBOX_ENTRY_NOTFOUND != nFilterIdx &&
nFilterIdx != aFilterLb.GetSavedValue() &&
aFilterLb.IsEnabled() )
{
bModified = sal_True;
- DBG_ASSERT( pItem, "kein Item" );
- // geht nur bei Benutzervorlagen
+ DBG_ASSERT( pItem, "No Item" );
+ // is only possibly for user templates
#if OSL_DEBUG_LEVEL > 1
sal_uInt16 nIdx = (sal_uInt16)(long)aFilterLb.GetEntryData( nFilterIdx );
SfxFilterTupel* p = pItem->GetFilterList()[ nIdx ];
@@ -443,13 +447,16 @@ sal_Bool SfxManageStyleSheetPage::FillItemSet( SfxItemSet& rSet )
void SfxManageStyleSheetPage::Reset( const SfxItemSet& /*rAttrSet*/ )
-/* [Beschreibung]
- Handler f"ur das Initialisieren der Seite mit den initialen Daten.
+/* [Description]
+
+ Handler to initialize the page with the initial data.
[Parameter]
- const SfxItemSet &rAttrSet das Set mit den Daten
- [Querverweise]
+ const SfxItemSet &rAttrSet The data set
+
+ [Cross-reference]
+
<class SfxTabDialog>
*/
@@ -488,7 +495,7 @@ void SfxManageStyleSheetPage::Reset( const SfxItemSet& /*rAttrSet*/ )
if ( String( SfxResId( STR_STANDARD ) ) == aName )
{
- // die Standardvorlage kann nicht verkn"upft werden
+ // the default template can not be linked
aBaseFt.Disable();
aBaseLb.Disable();
}
@@ -509,12 +516,13 @@ void SfxManageStyleSheetPage::Reset( const SfxItemSet& /*rAttrSet*/ )
SfxTabPage* SfxManageStyleSheetPage::Create( Window* pParent,
const SfxItemSet &rAttrSet )
-/* [Beschreibung]
- Factory f"ur das Erzeugen der Seite
+/* [Description]
- [Querverweise]
- <class SfxTabDialog>
+ Factory for the creation of the page.
+
+ [Cross-reference]
+ <class SfxTabDialog>
*/
{
@@ -525,23 +533,25 @@ SfxTabPage* SfxManageStyleSheetPage::Create( Window* pParent,
void SfxManageStyleSheetPage::ActivatePage( const SfxItemSet& rSet)
-/* [Beschreibung]
- ActivatePage- Handler des SfxTabDialog; wird f"ur die Aktualisierung
- des beschreibenden Textes verwendet, da sich dieser durch "Anderungen
- der Daten anderer Seiten ge"andert haben kann.
+/* [Description]
+
+ ActivatePage handler of SfxTabDialog, is used for the the update of the
+ descriptive text, since this might have changed through changes of data on
+ other pages.
[Parameter]
- const SfxItemSet& das Set f"ur den Datenaustausch; wird
- hier nicht verwendet.
- [Querverweise]
+ const SfxItemSet& the set for the exchange of data; is not used here.
+
+ [Cross-reference]
+
<SfxTabDialog::ActivatePage(const SfxItemSet &)>
*/
{
SetDescriptionText_Impl();
- // ist es ein Style mit automatischem Update? (nur SW)
+ // It is a style with auto update? (SW only)
const SfxPoolItem* pPoolItem;
if ( SFX_ITEM_SET ==
@@ -554,16 +564,17 @@ void SfxManageStyleSheetPage::ActivatePage( const SfxItemSet& rSet)
int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet )
-/* [Beschreibung]
- DeactivatePage- Handler des SfxTabDialog; die Daten werden
- an der Vorlage eingestellt, damit die richtige Vererbung
- f"ur die anderen Seiten des Dialoges vorliegt.
- Im Fehlerfall wird das Verlassen der Seite unterbunden.
+/* [Description]
+ DeactivatePage-handler of SfxTabDialog; data is set on the template, so
+ that the correct inheritance on the other pages of the dialog is made.
+ If an error occurs, leaving the page is prevented.
[Parameter]
- SfxItemSet* das Set f"ur den Datenaustausch; wird hier nicht verwendet.
- [Querverweise]
+ SfxItemSet* the set for the exchange of data; is not used here.
+
+ [Cross-reference]
+
<SfxTabDialog::DeactivatePage(SfxItemSet*)>
*/
@@ -572,7 +583,7 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet )
if ( aNameEd.IsModified() )
{
- // bei <Enter> wird kein LoseFocus() durch StarView ausgel"ost
+ // By pressing <Enter> LoseFocus() is not trigged through StarView
if ( aNameEd.HasFocus() )
LoseFocusHdl( &aNameEd );
diff --git a/sfx2/source/dialog/navigat.cxx b/sfx2/source/dialog/navigat.cxx
index 4839b3f88639..de6c5a624f15 100755
--- a/sfx2/source/dialog/navigat.cxx
+++ b/sfx2/source/dialog/navigat.cxx
@@ -81,7 +81,7 @@ void SfxNavigator::Resizing( Size &rSize )
SfxDockingWindow::Resizing( rSize );
SfxChildWindowContext *pCon = GetChildWindow_Impl()->GetContext_Impl();
- DBG_ASSERT( pCon, "Kein Context!" );
+ DBG_ASSERT( pCon, "No Context!" );
if ( pCon )
pCon->Resizing( rSize );
}
@@ -89,7 +89,7 @@ void SfxNavigator::Resizing( Size &rSize )
sal_Bool SfxNavigator::Close()
{
SfxChildWindowContext *pCon = GetChildWindow_Impl()->GetContext_Impl();
- DBG_ASSERT( pCon, "Kein Context!" );
+ DBG_ASSERT( pCon, "No Context!" );
if ( !pCon || pCon->Close() )
return SfxDockingWindow::Close();
else
diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx
index ee98f4c26970..0b40f7c69b67 100755
--- a/sfx2/source/dialog/partwnd.cxx
+++ b/sfx2/source/dialog/partwnd.cxx
@@ -71,7 +71,7 @@ SfxPartChildWnd_Impl::SfxPartChildWnd_Impl
)
: SfxChildWindow( pParentWnd, nId )
{
- // Window erzeugen
+ // Create Window
pWindow = new SfxPartDockWnd_Impl( pBindings, this, pParentWnd, WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK );
eChildAlignment = SFX_ALIGN_TOP;
if ( pInfo )
@@ -173,8 +173,9 @@ Rectangle impl_Rectangle_Struct2Object( const ::com::sun::star::awt::Rectangle&
void SfxPartDockWnd_Impl::Resize()
-/* [Beschreibung]
- Anpassung der Gr"osse der Controls an die neue Windowgr"osse
+/* [Description]
+
+ Adjusting the size of the controls wrt the new window size
*/
{
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index 4e56e6bfcbf2..56951f9d6bc0 100755
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -61,9 +61,9 @@ using namespace ::rtl;
struct SfxDock_Impl
{
sal_uInt16 nType;
- SfxDockingWindow* pWin; // SplitWindow hat dieses Fenster
+ SfxDockingWindow* pWin; // SplitWindow has this window
sal_Bool bNewLine;
- sal_Bool bHide; // SplitWindow hatte dieses Fenster
+ sal_Bool bHide; // SplitWindow had this window
long nSize;
};
@@ -73,11 +73,11 @@ SV_IMPL_PTRARR( SfxDockArr_Impl, SfxDockPtr);
class SfxEmptySplitWin_Impl : public SplitWindow
{
-/* [Beschreibung]
+/* [Description]
- Das SfxEmptySplitWin_Impldow ist ein leeres SplitWindow, das das SfxSplitWindow
- im AutoHide-Modus ersetzt. Es dient nur als Platzhalter, um MouseMoves
- zu empfangen und ggf. das eigentlichte SplitWindow einzublenden
+ The SfxEmptySplitWin_Impldow is an empty SplitWindow, that replaces the
+ SfxSplitWindow AutoHide mode. It only serves as a placeholder to receive
+ mouse moves and if possible blend in the true SplitWindow display.
*/
friend class SfxSplitWindow;
@@ -153,9 +153,9 @@ void SfxEmptySplitWin_Impl::FadeIn()
pOwner->Show_Impl();
if ( bAutoHide )
{
- // Timer zum Schlie\sen aufsetzen; der Aufrufer mu\s selbst sicherstellen,
- // da\s das Window nicht gleich wieder zu geht ( z.B. durch Setzen des
- // Focus oder einen modal mode )
+ // Set Timer to close; the caller has to ensure themselves that the
+ // Window is not closed instantly (eg by setting the focus or a modal
+ // mode.
aLastPos = GetPointerPosPixel();
aTimer.Start();
}
@@ -181,12 +181,12 @@ void SfxEmptySplitWin_Impl::MouseMove( const MouseEvent& rMEvt )
SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
SfxWorkWindow *pW, sal_Bool bWithButtons, WinBits nBits )
-/* [Beschreibung]
+/* [Description]
- Ein SfxSplitWindow verbirgt die rekursive Struktur des SV-Splitwindows
- nach au\sen, indem es einen tabellenartigen Aufbau mit Zeilen und Spalten
- ( also maximale Rekursionstiefe 2 ) simuliert.
- Au\erdem sichert es die Persistenz der Anordnung der SfxDockingWindows.
+ A SfxSplitWindow brings the recursive structure of the SV-SplitWindows to
+ the outside by simulating a table-like structure with rows and columns
+ (maximum recursion depth 2). Furthermore, it ensures the persistence of
+ the arrangement of the SfxDockingWindows.
*/
: SplitWindow ( pParent, nBits | WB_HIDE ),
@@ -204,7 +204,7 @@ SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
ShowFadeOutButton( sal_True );
}
- // SV-Alignment setzen
+ // Set SV-Alignment
WindowAlign eTbxAlign;
switch ( eAlign )
{
@@ -236,7 +236,7 @@ SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
if ( bWithButtons )
{
- // Konfiguration einlesen
+ // Read Configuration
String aWindowId = String::CreateFromAscii("SplitWindow");
aWindowId += String::CreateFromInt32( (sal_Int32) eTbxAlign );
SvtViewOptions aWinOpt( E_WINDOW, aWindowId );
@@ -263,11 +263,11 @@ SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
pDock->nType = (sal_uInt16) aWinData.GetToken(i++, ',').ToInt32();
if ( !pDock->nType )
{
- // K"onnte NewLine bedeuten
+ // could mean NewLine
pDock->nType = (sal_uInt16) aWinData.GetToken(i++, ',').ToInt32();
if ( !pDock->nType )
{
- // Lesefehler
+ // Read error
delete pDock;
break;
}
@@ -299,9 +299,8 @@ SfxSplitWindow::~SfxSplitWindow()
if ( pEmptyWin )
{
- // pOwner auf NULL setzen, sonst versucht pEmptyWin, nochmal zu
- // l"oschen; es wird n"amlich von au\sen immer das Fenster deleted,
- // das gerade angedockt ist
+ // Set pOwner to NULL, otherwise try to delete pEmptyWin once more. The
+ // window that is just beeing docked is always deleted from the outside.
pEmptyWin->pOwner = NULL;
delete pEmptyWin;
}
@@ -311,7 +310,7 @@ SfxSplitWindow::~SfxSplitWindow()
void SfxSplitWindow::SaveConfig_Impl()
{
- // Konfiguration abspeichern
+ // Save configuration
String aWinData('V');
aWinData += String::CreateFromInt32( VERSION );
aWinData += ',';
@@ -430,15 +429,14 @@ void SfxSplitWindow::Split()
void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize)
-/* [Beschreibung]
-
- Zum Einf"ugen von SfxDockingWindows kann auch keine Position "ubergeben
- werden. Das SfxSplitWindow sucht dann die zuletzt gemerkte zu dem
- "ubergebenen SfxDockingWindow heraus oder h"angt es als letztes neu an.
+/* [Description]
+ To insert SfxDockingWindows can no position be passed. The SfxSplitWindow
+ searches the last marked one to the passed SfxDockingWindow or appends a
+ new one at the end.
*/
{
- short nLine = -1; // damit erstes Fenster nLine auf 0 hochsetzen kann
+ short nLine = -1; // so that the first window cab set nline to 0
sal_uInt16 nL;
sal_uInt16 nPos = 0;
sal_Bool bNewLine = sal_True;
@@ -450,33 +448,33 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
SfxDock_Impl *pDock = (*pDockArr)[n];
if ( pDock->bNewLine )
{
- // Das Fenster er"offnet eine neue Zeile
+ // The window opens a new line
if ( pFoundDock )
- // Aber hinter dem gerade eingef"ugten Fenster
+ // But after the just inserted window
break;
- // Neue Zeile
+ // New line
nPos = 0;
bNewLine = sal_True;
}
if ( pDock->pWin )
{
- // Es gibt an dieser Stelle gerade ein Fenster
+ // Does there exist a window now at this position
if ( bNewLine && !pFoundDock )
{
- // Bisher ist nicht bekannt, in welcher realen Zeile es liegt
+ // Not known until now in which real line it is located
GetWindowPos( pDock->pWin, nL, nPos );
nLine = (short) nL;
}
if ( !pFoundDock )
{
- // Fenster liegt vor dem eingef"ugten
+ // The window is located before the inserted one
nPos++;
}
- // Zeile ist schon er"offnet
+ // Line is opened
bNewLine = sal_False;
if ( pFoundDock )
break;
@@ -484,16 +482,16 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
if ( pDock->nType == pDockWin->GetType() )
{
- DBG_ASSERT( !pFoundDock && !pDock->pWin, "Fenster ist schon vorhanden!");
+ DBG_ASSERT( !pFoundDock && !pDock->pWin, "Window does already exist!");
pFoundDock = pDock;
if ( !bNewLine )
break;
else
{
- // Es wurde zuletzt eine neue Reihe gestartet, aber noch kein
- // darin liegendes Fenster gefunden; daher weitersuchen, ob noch
- // ein Fenster in dieser Zeile folgt, um bNewLine korrekt zu setzen.
- // Dabei darf aber nLine oder nPos nicht mehr ver"andert werden!
+ // A new line has been created but no window was fond there;
+ // continue searching for a window in this line in-order to set
+ // bNewLine correctly. While doing so nline or nPos are not
+ // to be changed!
nLine++;
}
}
@@ -501,7 +499,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
if ( !pFoundDock )
{
- // Nicht gefunden, am Ende einf"ugen
+ // Not found, insert at end
pFoundDock = new SfxDock_Impl;
pFoundDock->bHide = sal_True;
pDockArr->Insert( pFoundDock, nCount );
@@ -524,9 +522,9 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
void SfxSplitWindow::ReleaseWindow_Impl(SfxDockingWindow *pDockWin, sal_Bool bSave)
-/* [Beschreibung]
+/* [Description]
- Das DockingWindow wird nicht mehr in den internen Daten gespeichert.
+ The docking window is no longer stored in the internal data.
*/
{
@@ -541,7 +539,7 @@ void SfxSplitWindow::ReleaseWindow_Impl(SfxDockingWindow *pDockWin, sal_Bool bSa
if ( pDock->bNewLine && n<nCount-1 )
(*pDockArr)[n+1]->bNewLine = sal_True;
- // Fenster hat schon eine Position, die vergessen wir
+ // Window has a position, this we forget
bFound = sal_True;
pDockArr->Remove(n);
break;
@@ -560,10 +558,9 @@ void SfxSplitWindow::ReleaseWindow_Impl(SfxDockingWindow *pDockWin, sal_Bool bSa
void SfxSplitWindow::MoveWindow( SfxDockingWindow* pDockWin, const Size& rSize,
sal_uInt16 nLine, sal_uInt16 nPos, sal_Bool bNewLine)
-/* [Beschreibung]
-
- Das DockingWindow wird innerhalb des Splitwindows verschoben.
+/* [Description]
+ The docking window is moved within the SplitWindows.
*/
{
@@ -572,8 +569,8 @@ void SfxSplitWindow::MoveWindow( SfxDockingWindow* pDockWin, const Size& rSize,
if ( nLine > nL && GetItemCount( GetItemId( nL, 0 ) ) == 1 )
{
- // Wenn das letzte Fenster aus seiner Zeile entfernt wird, rutscht
- // alles eine Zeile nach vorne!
+ // If the last window is removed from its line, then everything slips
+ // one line to the front!
nLine--;
}
RemoveWindow( pDockWin );
@@ -585,11 +582,10 @@ void SfxSplitWindow::MoveWindow( SfxDockingWindow* pDockWin, const Size& rSize,
void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize,
sal_uInt16 nLine, sal_uInt16 nPos, sal_Bool bNewLine)
-/* [Beschreibung]
-
- Das DockingWindow wird in dieses Splitwindow geschoben und soll die
- "ubergebene Position und Gr"o\se haben.
+/* [Description]
+ The DockingWindow that is pushed on this SplitWindow and shall hold the
+ given position and size.
*/
{
ReleaseWindow_Impl( pDockWin, sal_False );
@@ -599,16 +595,16 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
pDock->bNewLine = bNewLine;
pDock->pWin = pDockWin;
- DBG_ASSERT( nPos==0 || !bNewLine, "Falsche Paramenter!");
+ DBG_ASSERT( nPos==0 || !bNewLine, "Wrong Paramenter!");
if ( bNewLine )
nPos = 0;
- // Das Fenster mu\s vor dem ersten Fenster eingef"ugt werden, das die
- // gleiche oder eine gr"o\sere Position hat als pDockWin.
+ // The window must be inserted before the first window so that it has the
+ // same or a greater position than pDockWin.
sal_uInt16 nCount = pDockArr->Count();
sal_uInt16 nLastWindowIdx(0);
- // Wenn gar kein Fenster gefunden wird, wird als erstes eingef"ugt
+ // If no window is found, a first window is inserted
sal_uInt16 nInsertPos = 0;
for ( sal_uInt16 n=0; n<nCount; n++ )
{
@@ -616,9 +612,9 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
if (pD->pWin)
{
- // Ein angedocktes Fenster wurde gefunden
- // Wenn kein geeignetes Fenster hinter der gew"unschten Einf"ugeposition
- // gefunden wird, wird am Ende eingef"ugt
+ // A docked window has been found. If no suitable window behind the
+ // the desired insertion point s found, then insertion is done at
+ // the end.
nInsertPos = nCount;
nLastWindowIdx = n;
sal_uInt16 nL=0, nP=0;
@@ -626,12 +622,12 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
if ( (nL == nLine && nP == nPos) || nL > nLine )
{
- DBG_ASSERT( nL == nLine || bNewLine || nPos > 0, "Falsche Parameter!" );
+ DBG_ASSERT( nL == nLine || bNewLine || nPos > 0, "Wrong Parameter!" );
if ( nL == nLine && nPos == 0 && !bNewLine )
{
- DBG_ASSERT(pD->bNewLine, "Keine neue Zeile?");
+ DBG_ASSERT(pD->bNewLine, "No new line?");
- // Das Fenster wird auf nPos==0 eingeschoben
+ // The posption is pushed to nPos==0
pD->bNewLine = sal_False;
pDock->bNewLine = sal_True;
}
@@ -657,10 +653,10 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
const Size& rSize,
sal_uInt16 nLine, sal_uInt16 nPos, sal_Bool bNewLine)
-/* [Beschreibung]
+/* [Description]
- F"ugt ein DockingWindow ein und veranla\st die Neuberechnung der Gr"o\se
- des Splitwindows.
+ Adds a DockingWindow, and causes the recalculation of the size of
+ the SplitWindows.
*/
{
@@ -688,8 +684,8 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
if ( bNewLine || nLine == GetItemCount( 0 ) )
{
- // Es soll nicht in eine vorhandene Zeile eingef"ugt werden, sondern
- // eine neue erzeugt werden
+ // An existing row should not be inserted, instead a new one
+ // will be created
sal_uInt16 nId = 1;
for ( sal_uInt16 n=0; n<GetItemCount(0); n++ )
@@ -698,28 +694,28 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
nId = GetItemId(n)+1;
}
- // Eine neue nLine-te Zeile erzeugen
+ // Create a new nLine:th line
sal_uInt16 nBits = nItemBits;
if ( GetAlign() == WINDOWALIGN_TOP || GetAlign() == WINDOWALIGN_BOTTOM )
nBits |= SWIB_COLSET;
InsertItem( nId, nSetSize, nLine, 0, nBits );
}
- // In Zeile mit Position nLine das Fenster einf"ugen
- // ItemWindowSize auf "Prozentual" setzen, da SV dann das Umgr"o\sern
- // so macht, wie man erwartet; "Pixel" macht eigentlich nur Sinn, wenn
- // auch Items mit prozentualen oder relativen Gr"o\sen dabei sind.
+ // Insert the window at line with the position nline. ItemWindowSize set to
+ // "percentage" share since the SV then does the re-sizing as expected,
+ // "pixel" actually only makes sense if also items with percentage or
+ // relative sizes are present.
nItemBits |= SWIB_PERCENTSIZE;
bLocked = sal_True;
sal_uInt16 nSet = GetItemId( nLine );
InsertItem( pDockWin->GetType(), pDockWin, nWinSize, nPos, nSet, nItemBits );
- // Splitwindows werden im SFX einmal angelegt und beim Einf"ugen des ersten
- // DockingWindows sichtbar gemacht.
+ // SplitWindows are once created in SFX and when inserting the first
+ // DockingWindows is made visable.
if ( GetItemCount( 0 ) == 1 && GetItemCount( 1 ) == 1 )
{
- // Das Neuarrangieren am WorkWindow und ein Show() auf das SplitWindow
- // wird vom SfxDockingwindow veranla\st (->SfxWorkWindow::ConfigChild_Impl)
+ // The Rearranging in WorkWindow and a Show() on the SplitWindow is
+ // caues by SfxDockingwindow (->SfxWorkWindow::ConfigChild_Impl)
if ( !bPinned && !IsFloatingMode() )
{
bPinned = sal_True;
@@ -727,7 +723,7 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
pEmptyWin->bFadeIn = sal_False;
SetPinned_Impl( sal_False );
pEmptyWin->Actualize();
- DBG_TRACE( "SfxSplitWindow::InsertWindow_Impl - registering empty Splitwindow" );
+ OSL_TRACE( "SfxSplitWindow::InsertWindow_Impl - registering empty Splitwindow" );
pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign, sal_True )->nVisible = CHILD_VISIBLE;
pWorkWin->ArrangeChilds_Impl();
if ( bFadeIn )
@@ -741,11 +737,11 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
#ifdef DBG_UTIL
if ( !bPinned || !pEmptyWin->bFadeIn )
{
- DBG_TRACE( "SfxSplitWindow::InsertWindow_Impl - registering empty Splitwindow" );
+ OSL_TRACE( "SfxSplitWindow::InsertWindow_Impl - registering empty Splitwindow" );
}
else
{
- DBG_TRACE( "SfxSplitWindow::InsertWindow_Impl - registering real Splitwindow" );
+ OSL_TRACE( "SfxSplitWindow::InsertWindow_Impl - registering real Splitwindow" );
}
#endif
pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign, sal_True )->nVisible = CHILD_VISIBLE;
@@ -766,20 +762,19 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, sal_Bool bHide )
-/* [Beschreibung]
+/* [Description]
- Entfernt ein DockingWindow. Wenn es das letzte war, wird das SplitWindow
- gehidet.
+ Removes a DockingWindow. If it was the last one, then the SplitWindow is
+ beeing hidden.
*/
{
sal_uInt16 nSet = GetSet( pDockWin->GetType() );
- // Splitwindows werden im SFX einmal angelegt und nach dem Entfernen
- // des letzten DockingWindows unsichtbar gemacht.
+ // SplitWindows are once created in SFX and is made invisible after
+ // removing the last DockingWindows.
if ( GetItemCount( nSet ) == 1 && GetItemCount( 0 ) == 1 )
{
- // Das Neuarrangieren am WorkWindow wird vom SfxDockingwindow
- // veranla\st!
+ // The Rearranging in WorkWindow is caues by SfxDockingwindow
Hide();
pEmptyWin->aTimer.Stop();
sal_uInt16 nRealState = pEmptyWin->nState;
@@ -788,11 +783,11 @@ void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, sal_Bool bHide )
#ifdef DBG_UTIL
if ( !bPinned || !pEmptyWin->bFadeIn )
{
- DBG_TRACE( "SfxSplitWindow::RemoveWindow - releasing empty Splitwindow" );
+ OSL_TRACE( "SfxSplitWindow::RemoveWindow - releasing empty Splitwindow" );
}
else
{
- DBG_TRACE( "SfxSplitWindow::RemoveWindow - releasing real Splitwindow" );
+ OSL_TRACE( "SfxSplitWindow::RemoveWindow - releasing real Splitwindow" );
}
#endif
pWorkWin->ReleaseChild_Impl( *GetSplitWindow() );
@@ -813,8 +808,8 @@ void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, sal_Bool bHide )
}
}
- // Fenster removen, und wenn es das letzte der Zeile war, auch die Zeile
- // ( Zeile = ItemSet )
+ // Remove Windows, and if it was the last of the line, then also remove
+ // the line (line = itemset)
sal_Bool bUpdateMode = IsUpdateMode();
if ( bUpdateMode )
SetUpdateMode( sal_False );
@@ -834,10 +829,10 @@ void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, sal_Bool bHide )
sal_Bool SfxSplitWindow::GetWindowPos( const SfxDockingWindow* pWindow,
sal_uInt16& rLine, sal_uInt16& rPos ) const
-/* [Beschreibung]
+/* [Description]
- Liefert die Id des Itemsets und die des Items f"ur das "ubergebene
- DockingWindow in der alten Zeilen/Spalten-Bezeichnung zur"uck.
+ Returns the ID of the item sets and items for the DockingWindow in
+ the position passed on the old row / column-name.
*/
{
@@ -854,11 +849,10 @@ sal_Bool SfxSplitWindow::GetWindowPos( const SfxDockingWindow* pWindow,
sal_Bool SfxSplitWindow::GetWindowPos( const Point& rTestPos,
sal_uInt16& rLine, sal_uInt16& rPos ) const
-/* [Beschreibung]
+/* [Description]
- Liefert die Id des Itemsets und die des Items f"ur das DockingWindow
- an der "ubergebenen Position in der alten Zeilen/Spalten-Bezeichnung
- zur"uck.
+ Returns the ID of the item sets and items for the DockingWindow in
+ the position passed on the old row / column-name.
*/
{
@@ -876,9 +870,9 @@ sal_Bool SfxSplitWindow::GetWindowPos( const Point& rTestPos,
sal_uInt16 SfxSplitWindow::GetLineCount() const
-/* [Beschreibung]
+/* [Description]
- Liefert die Zeilenzahl = Zahl der Sub-Itemsets im Root-Set.
+ Returns the number of rows = number of sub-itemsets in the root set.
*/
{
return GetItemCount( 0 );
@@ -888,9 +882,9 @@ sal_uInt16 SfxSplitWindow::GetLineCount() const
long SfxSplitWindow::GetLineSize( sal_uInt16 nLine ) const
-/* [Beschreibung]
+/* [Description]
- Liefert die "Zeilenh"ohe" des nLine-ten Itemsets.
+ Returns the Row Height of nline itemset.
*/
{
sal_uInt16 nId = GetItemId( nLine );
@@ -901,9 +895,9 @@ long SfxSplitWindow::GetLineSize( sal_uInt16 nLine ) const
sal_uInt16 SfxSplitWindow::GetWindowCount( sal_uInt16 nLine ) const
-/* [Beschreibung]
+/* [Description]
- Liefert die
+ Returns the total number of windows
*/
{
sal_uInt16 nId = GetItemId( nLine );
@@ -914,9 +908,9 @@ sal_uInt16 SfxSplitWindow::GetWindowCount( sal_uInt16 nLine ) const
sal_uInt16 SfxSplitWindow::GetWindowCount() const
-/* [Beschreibung]
+/* [Description]
- Liefert die Gesamtzahl aller Fenstert
+ Returns the total number of windows
*/
{
return GetItemCount( 0 );
@@ -938,8 +932,8 @@ IMPL_LINK( SfxSplitWindow, TimerHdl, Timer*, pTimer)
if ( CursorIsOverRect( sal_False ) || !pTimer )
{
- // Wenn der Mauszeiger innerhalb des Fensters liegt, SplitWindow anzeigen
- // und Timer zum Schlie\sen aufsetzen
+ // If the cursor is within the window, display the SplitWindow and set
+ // up the timer for close
pEmptyWin->bAutoHide = sal_True;
if ( !IsVisible() )
pEmptyWin->FadeIn();
@@ -951,16 +945,16 @@ IMPL_LINK( SfxSplitWindow, TimerHdl, Timer*, pTimer)
{
if ( GetPointerPosPixel() != pEmptyWin->aLastPos )
{
- // Die Maus wurd innerhalb der Timerlaugzeit bewegt, also erst einmal
- // nichts tun
+ // The mouse has moved within the running time of the timer, thus
+ // do nothing
pEmptyWin->aLastPos = GetPointerPosPixel();
pEmptyWin->aTimer.Start();
return 0L;
}
- // Speziell f"ur TF_AUTOSHOW_ON_MOUSEMOVE :
- // Wenn das Fenster nicht sichtbar ist, gibt es nichts zu tun
- // (Benutzer ist einfach mit der Maus "uber pEmptyWin gefahren)
+ // Especially for TF_AUTOSHOW_ON_MOUSEMOVE :
+ // If the window is not visible, there is nothing to do
+ // (user has simply moved the mouse over pEmptyWin)
if ( IsVisible() )
{
pEmptyWin->bEndAutoHide = sal_False;
@@ -968,18 +962,18 @@ IMPL_LINK( SfxSplitWindow, TimerHdl, Timer*, pTimer)
!PopupMenu::IsInExecute() &&
!pEmptyWin->bSplit && !HasChildPathFocus( sal_True ) )
{
- // W"ahrend ein modaler Dialog oder ein Popupmenu offen sind
- // oder w"ahrend des Splittens auf keinen Fall zumachen; auch
- // solange eines der Children den Focus hat, bleibt das
- // das Fenster offen
+ // While a modal dialog or a popup menu is open or while the
+ // Splitting is done, in any case, do not close. Even as long
+ // as one of the Children has the focus, the window remains
+ // open.
pEmptyWin->bEndAutoHide = sal_True;
}
if ( pEmptyWin->bEndAutoHide )
{
- // Von mir aus kann Schlu\s sein mit AutoShow
- // Aber vielleicht will noch ein anderes SfxSplitWindow offen bleiben,
- // dann bleiben auch alle anderen offen
+ // As far as I am concered this can be the end of AutoShow
+ // But maybe some other SfxSplitWindow will remain open,
+ // then all others remain open too.
if ( !pWorkWin->IsAutoHideMode( this ) )
{
FadeOut_Impl();
@@ -1008,13 +1002,13 @@ sal_Bool SfxSplitWindow::CursorIsOverRect( sal_Bool bForceAdding ) const
{
sal_Bool bVisible = IsVisible();
- // Auch das kollabierte SplitWindow ber"ucksichtigen
+ // Also, take the collapsed SplitWindow into account
Point aPos = pEmptyWin->GetParent()->OutputToScreenPixel( pEmptyWin->GetPosPixel() );
Size aSize = pEmptyWin->GetSizePixel();
if ( bForceAdding )
{
- // Um +/- ein paar Pixel erweitern, sonst ist es zu nerv"os
+ // Extend with +/- a few pixels, otherwise it is too nervous
aPos.X() -= nPixel;
aPos.Y() -= nPixel;
aSize.Width() += 2 * nPixel;
@@ -1028,7 +1022,7 @@ sal_Bool SfxSplitWindow::CursorIsOverRect( sal_Bool bForceAdding ) const
Point aVisPos = GetPosPixel();
Size aVisSize = GetSizePixel();
- // Um +/- ein paar Pixel erweitern, sonst ist es zu nerv"os
+ // Extend with +/- a few pixels, otherwise it is too nervous
aVisPos.X() -= nPixel;
aVisPos.Y() -= nPixel;
aVisSize.Width() += 2 * nPixel;
@@ -1079,12 +1073,12 @@ void SfxSplitWindow::SetPinned_Impl( sal_Bool bOn )
pEmptyWin->nState |= 1;
if ( pEmptyWin->bFadeIn )
{
- // Ersatzfenster anmelden
- DBG_TRACE( "SfxSplitWindow::SetPinned_Impl - releasing real Splitwindow" );
+ // Unregister replacement windows
+ OSL_TRACE( "SfxSplitWindow::SetPinned_Impl - releasing real Splitwindow" );
pWorkWin->ReleaseChild_Impl( *this );
Hide();
pEmptyWin->Actualize();
- DBG_TRACE( "SfxSplitWindow::SetPinned_Impl - registering empty Splitwindow" );
+ OSL_TRACE( "SfxSplitWindow::SetPinned_Impl - registering empty Splitwindow" );
pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign, sal_True )->nVisible = CHILD_VISIBLE;
}
@@ -1105,11 +1099,11 @@ void SfxSplitWindow::SetPinned_Impl( sal_Bool bOn )
if ( pEmptyWin->bFadeIn )
{
- // Ersatzfenster abmelden
- DBG_TRACE( "SfxSplitWindow::SetPinned_Impl - releasing empty Splitwindow" );
+ // Unregister replacement windows
+ OSL_TRACE( "SfxSplitWindow::SetPinned_Impl - releasing empty Splitwindow" );
pWorkWin->ReleaseChild_Impl( *pEmptyWin );
pEmptyWin->Hide();
- DBG_TRACE( "SfxSplitWindow::SetPinned_Impl - registering real Splitwindow" );
+ OSL_TRACE( "SfxSplitWindow::SetPinned_Impl - registering real Splitwindow" );
pWorkWin->RegisterChild_Impl( *this, eAlign, sal_True )->nVisible = CHILD_VISIBLE;
}
}
@@ -1134,16 +1128,16 @@ void SfxSplitWindow::SetFadeIn_Impl( sal_Bool bOn )
pEmptyWin->nState |= 2;
if ( IsFloatingMode() )
{
- // FloatingWindow ist nicht sichtbar, also anzeigen
+ // FloatingWindow is not visable, thus display it
pWorkWin->ArrangeAutoHideWindows( this );
Show();
}
else
{
- DBG_TRACE( "SfxSplitWindow::SetFadeIn_Impl - releasing empty Splitwindow" );
+ OSL_TRACE( "SfxSplitWindow::SetFadeIn_Impl - releasing empty Splitwindow" );
pWorkWin->ReleaseChild_Impl( *pEmptyWin );
pEmptyWin->Hide();
- DBG_TRACE( "SfxSplitWindow::SetFadeIn_Impl - registering real Splitwindow" );
+ OSL_TRACE( "SfxSplitWindow::SetFadeIn_Impl - registering real Splitwindow" );
pWorkWin->RegisterChild_Impl( *this, eAlign, sal_True )->nVisible = CHILD_VISIBLE;
pWorkWin->ArrangeChilds_Impl();
pWorkWin->ShowChilds_Impl();
@@ -1155,12 +1149,12 @@ void SfxSplitWindow::SetFadeIn_Impl( sal_Bool bOn )
pEmptyWin->nState &= ~2;
if ( !IsFloatingMode() )
{
- // Das Fenster "schwebt" nicht, soll aber ausgeblendet werden,
- DBG_TRACE( "SfxSplitWindow::SetFadeIn_Impl - releasing real Splitwindow" );
+ // The window is not "floating", should be hidden
+ OSL_TRACE( "SfxSplitWindow::SetFadeIn_Impl - releasing real Splitwindow" );
pWorkWin->ReleaseChild_Impl( *this );
Hide();
pEmptyWin->Actualize();
- DBG_TRACE( "SfxSplitWindow::SetFadeIn_Impl - registering empty Splitwindow" );
+ OSL_TRACE( "SfxSplitWindow::SetFadeIn_Impl - registering empty Splitwindow" );
pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign, sal_True )->nVisible = CHILD_VISIBLE;
pWorkWin->ArrangeChilds_Impl();
pWorkWin->ShowChilds_Impl();
@@ -1176,17 +1170,17 @@ void SfxSplitWindow::SetFadeIn_Impl( sal_Bool bOn )
void SfxSplitWindow::AutoHide()
{
- // Wenn dieser Handler am "echten" SplitWindow aufgerufen wird, ist es
- // entweder angedockt und soll "schwebend" angezeigt werden oder umgekehrt
+ // If this handler is called in the "real" SplitWindow, it is
+ // either docked and should be displayed as floating, or vice versa
if ( !bPinned )
{
- // Es "schwebt", also wieder andocken
+ // It "floats", thus dock it again
SetPinned_Impl( sal_True );
pWorkWin->ArrangeChilds_Impl();
}
else
{
- // In den "Schwebezustand" bringen
+ // In "limbo"
SetPinned_Impl( sal_False );
pWorkWin->ArrangeChilds_Impl();
pWorkWin->ArrangeAutoHideWindows( this );
@@ -1233,14 +1227,16 @@ void SfxSplitWindow::Show_Impl()
sal_Bool SfxSplitWindow::ActivateNextChild_Impl( sal_Bool bForward )
{
- // Wenn kein pActive, auf erstes bzw. letztes Fenster gehen ( bei !bForward wird erst in der loop dekrementiert )
+ // If no pActive, go to first and last window (!bForward is first
+ // decremented in the loop)
sal_uInt16 nCount = pDockArr->Count();
sal_uInt16 n = bForward ? 0 : nCount;
- // Wenn Focus innerhalb, dann ein Fenster vor oder zur"uck, wenn m"oglich
+ // if Focus is within, then move to a window forward or backwards
+ // if possible
if ( pActive )
{
- // Aktives Fenster ermitteln
+ // Determine the active window
for ( n=0; n<nCount; n++ )
{
SfxDock_Impl *pD = (*pDockArr)[n];
@@ -1249,13 +1245,14 @@ sal_Bool SfxSplitWindow::ActivateNextChild_Impl( sal_Bool bForward )
}
if ( bForward )
- // ein Fenster weiter ( wenn dann n>nCount, wird die Schleife unten gar nicht durchlaufen )
+ // up window counter (then when n>nCount, the loop below is
+ // not entered)
n++;
}
if ( bForward )
{
- // N"achstes Fenster suchen
+ // Search for next window
for ( sal_uInt16 nNext=n; nNext<nCount; nNext++ )
{
SfxDock_Impl *pD = (*pDockArr)[nNext];
@@ -1268,7 +1265,7 @@ sal_Bool SfxSplitWindow::ActivateNextChild_Impl( sal_Bool bForward )
}
else
{
- // Vorheriges Fenster suchen
+ // Search for previous window
for ( sal_uInt16 nNext=n; nNext--; )
{
SfxDock_Impl *pD = (*pDockArr)[nNext];
diff --git a/sfx2/source/dialog/styfitem.cxx b/sfx2/source/dialog/styfitem.cxx
index 74008de1ff51..9f7304d6df2d 100755
--- a/sfx2/source/dialog/styfitem.cxx
+++ b/sfx2/source/dialog/styfitem.cxx
@@ -96,7 +96,7 @@ SfxStyleFamilyItem::SfxStyleFamilyItem( const ResId &rResId ) :
// -----------------------------------------------------------------------
-// Destruktor; gibt interne Daten frei
+// Destructor; releases the internal data
SfxStyleFamilyItem::~SfxStyleFamilyItem()
{
@@ -107,7 +107,7 @@ SfxStyleFamilyItem::~SfxStyleFamilyItem()
// -----------------------------------------------------------------------
-// Implementierung des Resource-Konstruktors
+// Implementation of the resource constructor
SfxStyleFamilies::SfxStyleFamilies( const ResId& rResId ) :
Resource( rResId.SetRT( RSC_SFX_STYLE_FAMILIES ).SetAutoRelease( false ) )
@@ -128,7 +128,7 @@ SfxStyleFamilies::SfxStyleFamilies( const ResId& rResId ) :
// -----------------------------------------------------------------------
-// Destruktor; gibt interne Daten frei
+// Destructor; releases the internal data
SfxStyleFamilies::~SfxStyleFamilies()
{
diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx
index d9ea1321adf1..16e2881ec77a 100755
--- a/sfx2/source/dialog/styledlg.cxx
+++ b/sfx2/source/dialog/styledlg.cxx
@@ -47,14 +47,14 @@ SfxStyleDialog::SfxStyleDialog
(
Window* pParent, // Parent
const ResId& rResId, // ResId
- SfxStyleSheetBase& rStyle, // zu bearbeitendes StyleSheet
- sal_Bool bFreeRes, // Flag Resourcen freigeben
+ SfxStyleSheetBase& rStyle, // stylesheet to be processed
+ sal_Bool bFreeRes, // Flag release resources
const String* pUserBtnTxt
) :
-/* [Beschreibung]
+/* [Description]
- Konstruktor: Verwalten-TabPage zuf"ugen, ExampleSet vom Style setzen.
+ Constructor: Add Manage TabPage, set ExampleSet from style.
*/
SfxTabDialog( pParent, rResId,
@@ -71,8 +71,7 @@ SfxStyleDialog::SfxStyleDialog
String( SfxResId( STR_TABPAGE_MANAGESTYLES ) ),
SfxManageStyleSheetPage::Create, 0, sal_False, 0 );
- // bei neuer Vorlage immer die Verwaltungsseite als aktuelle
- // Seite setzen
+ // With new template always set the management page as the current page
if( !rStyle.GetName().Len() )
SetCurPageId( ID_TABPAGE_MANAGESTYLES );
@@ -83,7 +82,7 @@ SfxStyleDialog::SfxStyleDialog
sTxt += rStyle.GetName();
SetText( sTxt );
}
- delete pExampleSet; // im SfxTabDialog::Ctor() schon angelegt
+ delete pExampleSet; // in SfxTabDialog::Ctor() already created
pExampleSet = &pStyle->GetItemSet();
if ( bFreeRes )
@@ -95,10 +94,10 @@ SfxStyleDialog::SfxStyleDialog
SfxStyleDialog::~SfxStyleDialog()
-/* [Beschreibung]
+/* [Description]
- Destruktor: ExampleSet auf NULL setzen, damit der SfxTabDialog nicht den
- Set vom Style l"oscht.
+ Destructor: set ExampleSet to NULL, so that SfxTabDialog does not delete
+ the Set from Style.
*/
{
@@ -111,10 +110,10 @@ SfxStyleDialog::~SfxStyleDialog()
const SfxItemSet* SfxStyleDialog::GetRefreshedSet()
-/* [Beschreibung]
+/* [Description]
- Diese wird gerufen, wenn <SfxTabPage::DeactivatePage(SfxItemSet *)>
- <SfxTabPage::REFRESH_SET> liefert.
+ This is called when <SfxTabPage::DeactivatePage(SfxItemSet *)>
+ returns <SfxTabPage::REFRESH_SET>.
*/
{
@@ -125,9 +124,9 @@ const SfxItemSet* SfxStyleDialog::GetRefreshedSet()
short SfxStyleDialog::Ok()
-/* [Beschreibung]
+/* [Description]
- "Uberladen, damit immer RET_OK zur"uckgegeben wird.
+ Overloaded, so that always RET_OK is returned.
*/
{
@@ -139,10 +138,10 @@ short SfxStyleDialog::Ok()
IMPL_LINK( SfxStyleDialog, CancelHdl, Button *, pButton )
-/* [Beschreibung]
+/* [Description]
- Wenn der Dialog abgebrochen wurde, m"ussen alle schon eingestellten
- Attribute wieder zur"uckgesetzt werden.
+ If the dialogue was canceled, then all selected attributes must be reset
+ again.
*/
{
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 66a4a3623347..86362938acab 100755
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -34,7 +34,7 @@
#include <vcl/msgbox.hxx>
#include <unotools/viewoptions.hxx>
-#define _SVSTDARR_USHORTS
+#define _SVSTDARR_sal_uInt16S
#include <svl/svstdarr.hxx>
#include "appdata.hxx"
@@ -80,14 +80,14 @@ NAMESPACE_LAYOUT_SFX_TABDIALOG
struct Data_Impl
{
- sal_uInt16 nId; // Die ID
- CreateTabPage fnCreatePage; // Pointer auf die Factory
- GetTabPageRanges fnGetRanges;// Pointer auf die Ranges-Funktion
- SfxTabPage* pTabPage; // die TabPage selber
+ sal_uInt16 nId; // The ID
+ CreateTabPage fnCreatePage; // Pointer to Factory
+ GetTabPageRanges fnGetRanges; // Pointer to Ranges-Function
+ SfxTabPage* pTabPage; // The TabPage itself
sal_Bool bOnDemand; // Flag: ItemSet onDemand
- sal_Bool bRefresh; // Flag: Seite mu\s neu initialisiert werden
+ sal_Bool bRefresh; // Flag: Page must be re-initialized
- // Konstruktor
+ // Constructor
Data_Impl( sal_uInt16 Id, CreateTabPage fnPage,
GetTabPageRanges fnRanges, sal_Bool bDemand ) :
@@ -256,9 +256,9 @@ void SfxTabPage::SetFrame(const ::com::sun::star::uno::Reference< ::com::sun::st
SfxTabPage::SfxTabPage( Window *pParent,
const ResId &rResId, const SfxItemSet &rAttrSet ) :
-/* [Beschreibung]
+/* [Description]
- Konstruktor
+ Constructor
*/
TabPage( pParent, rResId ),
@@ -283,9 +283,9 @@ SfxTabPage:: SfxTabPage( Window *pParent, WinBits nStyle, const SfxItemSet &rAtt
SfxTabPage::~SfxTabPage()
-/* [Beschreibung]
+/* [Description]
- Destruktor
+ Destructor
*/
{
@@ -313,12 +313,10 @@ void SfxTabPage::Reset( const SfxItemSet& rSet )
void SfxTabPage::ActivatePage( const SfxItemSet& )
-/* [Beschreibung]
-
- Defaultimplementierung der virtuellen ActivatePage-Methode
- Diese wird gerufen, wenn eine Seite des Dialogs den Datenaustausch
- zwischen Pages unterst"utzt.
+/* [Description]
+ Default implementation of the virtual ActivatePage method. This method is
+ called when a page of dialogue supports the exchange of data between pages.
<SfxTabPage::DeactivatePage(SfxItemSet *)>
*/
@@ -329,22 +327,19 @@ void SfxTabPage::ActivatePage( const SfxItemSet& )
int SfxTabPage::DeactivatePage( SfxItemSet* )
-/* [Beschreibung]
+/* [Description]
- Defaultimplementierung der virtuellen DeactivatePage-Methode
- Diese wird vor dem Verlassen einer Seite durch den Sfx gerufen;
- die Anwendung kann "uber den Returnwert steuern,
- ob die Seite verlassen werden soll.
- Falls die Seite "uber bHasExchangeSupport
- anzeigt, da\s sie einen Datenaustausch zwischen Seiten
- unterst"utzt, wird ein Pointer auf das Austausch-Set als
- Parameter "ubergeben. Dieser nimmt die Daten f"ur den Austausch
- entgegen; das Set steht anschlie\send als Parameter in
- <SfxTabPage::ActivatePage(const SfxItemSet &)> zur Verf"ugung.
+ Default implementation of the virtual DeactivatePage method. This method is
+ called by Sfx when leaving a page; the application can, through the return
+ value, control whether to leave the page. If the page is displayed through
+ bHasExchangeSupport which supports data exchange between pages, then a
+ pointer to the exchange set is passed as parameter. This takes on data for
+ the exchange, then the set is available as a parameter in
+ <SfxTabPage::ActivatePage(const SfxItemSet &)>.
- [R"uckgabewert]
+ [Return value]
- LEAVE_PAGE; Verlassen der Seite erlauben
+ LEAVE_PAGE; Allow leaving the page
*/
{
@@ -355,12 +350,11 @@ int SfxTabPage::DeactivatePage( SfxItemSet* )
void SfxTabPage::FillUserData()
-/* [Beschreibung]
+/* [Description]
- virtuelle Methode, wird von der Basisklasse im Destruktor gerufen
- um spezielle Informationen der TabPage in der Ini-Datei zu speichern.
- Beim "Uberladen muss ein String zusammengestellt werden, der mit
- <SetUserData()> dann weggeschrieben wird.
+ Virtual method is called by the base class in the destructor to save
+ specific information of the TabPage in the ini-file. When overloading a
+ string must be compiled, which is then flushed with the <SetUserData()>.
*/
{
@@ -377,11 +371,10 @@ sal_Bool SfxTabPage::IsReadOnly() const
const SfxPoolItem* SfxTabPage::GetItem( const SfxItemSet& rSet, sal_uInt16 nSlot, sal_Bool bDeep )
-/* [Beschreibung]
-
- static Methode: hiermit wird der Code der TabPage-Implementierungen
- vereinfacht.
+/* [Description]
+ static Method: hereby are the implementations of the TabPage code
+ beeing simplified.
*/
{
@@ -400,10 +393,9 @@ const SfxPoolItem* SfxTabPage::GetItem( const SfxItemSet& rSet, sal_uInt16 nSlot
const SfxPoolItem* SfxTabPage::GetOldItem( const SfxItemSet& rSet,
sal_uInt16 nSlot, sal_Bool bDeep )
-/* [Beschreibung]
+/* [Description]
- Diese Methode gibt f"ur Vergleiche den alten Wert eines
- Attributs zur"uck.
+ This method returns an attribute for comparison of the old value.
*/
{
@@ -426,11 +418,10 @@ const SfxPoolItem* SfxTabPage::GetOldItem( const SfxItemSet& rSet,
const SfxPoolItem* SfxTabPage::GetExchangeItem( const SfxItemSet& rSet,
sal_uInt16 nSlot )
-/* [Beschreibung]
+/* [Description]
- Diese Methode gibt f"ur Vergleiche den alten Wert eines
- Attributs zur"uck. Dabei wird ber"ucksichtigt, ob der Dialog
- gerade mit OK beendet wurde.
+ This method returns an attribute for comparison of the old value. This way
+ it will be considered whether the dialogue has just been ended with OK.
*/
{
@@ -492,21 +483,21 @@ void SfxTabPage::AddItemConnection( sfx::ItemConnectionBase* pConnection )
SfxTabDialog::SfxTabDialog
-/* [Beschreibung]
+/* [Description]
- Konstruktor
+ Constructor
*/
(
- SfxViewFrame* pViewFrame, // Frame, zu dem der Dialog geh"ort
- Window* pParent, // Parent-Fenster
+ SfxViewFrame* pViewFrame, // Frame, to which the Dialog belongs
+ Window* pParent, // Parent Window
const ResId& rResId, // ResourceId
- const SfxItemSet* pItemSet, // Itemset mit den Daten;
- // kann NULL sein, wenn Pages onDemand
- sal_Bool bEditFmt, // Flag: es werden Vorlagen bearbeitet
- // wenn ja -> zus"atzlicher Button f"ur Standard
- const String* pUserButtonText // Text fuer BenutzerButton;
- // wenn != 0, wird der UserButton erzeugt
+ const SfxItemSet* pItemSet, // Itemset with the data;
+ // can be NULL, when Pages are onDemand
+ sal_Bool bEditFmt, // Flag: templates are processed
+ // when yes -> additional Button for standard
+ const String* pUserButtonText // Text for UserButton;
+ // if != 0, the UserButton is created
) :
TabDialog( pParent, rResId ),
pFrame( pViewFrame ),
@@ -519,45 +510,45 @@ SfxTabDialog::SfxTabDialog
SfxTabDialog::SfxTabDialog
-/* [Beschreibung]
+/* [Description]
- Konstruktor, tempor"ar ohne Frame
+ Constructor, temporary without Frame
*/
(
- Window* pParent, // Parent-Fenster
+ Window* pParent, // Parent Window
const ResId& rResId, // ResourceId
- const SfxItemSet* pItemSet, // Itemset mit den Daten; kann NULL sein,
- // wenn Pages onDemand
- sal_Bool bEditFmt, // Flag: es werden Vorlagen bearbeitet
- // wenn ja -> zus"atzlicher Button f"ur Standard
- const String* pUserButtonText // Text f"ur BenutzerButton;
- // wenn != 0, wird der UserButton erzeugt
+ const SfxItemSet* pItemSet, // Itemset with the data;
+ // can be NULL, when Pages are onDemand
+ sal_Bool bEditFmt, // Flag: templates are processed
+ // when yes -> additional Button for standard
+ const String* pUserButtonText // Text for UserButton;
+ // if != 0, the UserButton is created
) :
TabDialog( pParent, rResId ),
pFrame( 0 ),
INI_LIST(pItemSet)
{
Init_Impl( bFmt, pUserButtonText );
- DBG_WARNING( "bitte den Ctor mit ViewFrame verwenden" );
+ DBG_WARNING( "Please use the Construtor with the ViewFrame" );
}
SfxTabDialog::SfxTabDialog
-/* [Beschreibung]
+/* [Description]
- Konstruktor, tempor"ar ohne Frame
+ Constructor, temporary without Frame
*/
(
- Window* pParent, // Parent-Fenster
+ Window* pParent, // Parent Window
const ResId& rResId, // ResourceId
sal_uInt16 nSetId,
SfxBindings& rBindings,
- sal_Bool bEditFmt, // Flag: es werden Vorlagen bearbeitet
- // wenn ja -> zus"atzlicher Button f"ur Standard
- const String* pUserButtonText // Text f"ur BenutzerButton;
- // wenn != 0, wird der UserButton erzeugt
+ sal_Bool bEditFmt, // Flag: templates are processed
+ // when yes -> additional Button for standard
+ const String* pUserButtonText // Text for UserButton;
+ // if != 0, the UserButton is created
) :
TabDialog( pParent, rResId ),
pFrame( 0 ),
@@ -637,9 +628,9 @@ SfxTabDialog::~SfxTabDialog()
void SfxTabDialog::Init_Impl( sal_Bool bFmtFlag, const String* pUserButtonText )
-/* [Beschreibung]
+/* [Description]
- interne Initialisierung des Dialogs
+ internal initialization of the dialogue
*/
{
@@ -673,10 +664,10 @@ void SfxTabDialog::Init_Impl( sal_Bool bFmtFlag, const String* pUserButtonText )
aBaseFmtBtn.SetClickHdl( LINK( this, SfxTabDialog, BaseFmtHdl ) );
aBaseFmtBtn.SetHelpId( HID_TABDLG_STANDARD_BTN );
- // bFmt = tempor"ares Flag im Ctor() "ubergeben,
- // wenn bFmt == 2, dann auch sal_True,
- // zus"atzlich Ausblendung vom StandardButton,
- // nach der Initialisierung wieder auf sal_True setzen
+ // bFmt = temporary Flag passed on in the Constructor(),
+ // if bFmt == 2, then also sal_True,
+ // additional suppression of the standard button,
+ // after the Initializing set to sal_True again
if ( bFmtFlag != 2 )
aBaseFmtBtn.Show();
else
@@ -834,7 +825,7 @@ void SfxTabDialog::Start_Impl()
SetWindowState( ByteString( aDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US ) );
#endif /* !ENABLE_LAYOUT_SFX_TABDIALOG */
- // initiale TabPage aus Programm/Hilfe/Konfig
+ // initial TabPage from Program/Help/config
nActPage = (sal_uInt16)aDlgOpt.GetPageID();
if ( USHRT_MAX != nAppPageId )
@@ -879,20 +870,19 @@ void SfxTabDialog::AddTabPage( sal_uInt16 nId, const Bitmap &rRiderBitmap, sal_B
void SfxTabDialog::AddTabPage
-/* [Beschreibung]
+/* [Description]
- Hinzuf"ugen einer Seite zu dem Dialog.
- Mu\s korrespondieren zu einem entsprechende Eintrag im
- TabControl in der Resource des Dialogs.
+ Adding a page to the dialogue. Must correspond to a entry in the
+ TabControl in the resource of the dialogue.
*/
(
- sal_uInt16 nId, // ID der Seite
- CreateTabPage pCreateFunc, // Pointer auf die Factory-Methode
- GetTabPageRanges pRangesFunc, // Pointer auf die Methode f"ur das
- // Erfragen der Ranges onDemand
- sal_Bool bItemsOnDemand // gibt an, ob das Set dieser Seite beim
- // Erzeugen der Seite erfragt wird
+ sal_uInt16 nId, // Page ID
+ CreateTabPage pCreateFunc, // Pointer to the Factory Method
+ GetTabPageRanges pRangesFunc, // Pointer to the Method for quering
+ // Ranges onDemand
+ sal_Bool bItemsOnDemand // indicates whether the set of this page is
+ // requested when created
)
{
pImpl->pData->Append(
@@ -903,11 +893,10 @@ void SfxTabDialog::AddTabPage
void SfxTabDialog::AddTabPage
-/* [Beschreibung]
+/* [Description]
- Hinzuf"ugen einer Seite zu dem Dialog.
- Der Ridertext wird "ubergeben, die Seite hat keine Entsprechung im
- TabControl in der Resource des Dialogs.
+ Add a page to the dialog. The Rider text is passed on, the page has no
+ counterpart in the TabControl in the resource of the dialogue.
*/
(
@@ -920,7 +909,7 @@ void SfxTabDialog::AddTabPage
)
{
DBG_ASSERT( TAB_PAGE_NOTFOUND == aTabCtrl.GetPagePos( nId ),
- "Doppelte Page-Ids in der Tabpage" );
+ "Double Page-Ids in the Tabpage" );
aTabCtrl.InsertPage( nId, rRiderText, nPos );
pImpl->pData->Append(
new Data_Impl( nId, pCreateFunc, pRangesFunc, bItemsOnDemand ) );
@@ -931,11 +920,10 @@ void SfxTabDialog::AddTabPage
void SfxTabDialog::AddTabPage
-/* [Beschreibung]
+/* [Description]
- Hinzuf"ugen einer Seite zu dem Dialog.
- Die Riderbitmap wird "ubergeben, die Seite hat keine Entsprechung im
- TabControl in der Resource des Dialogs.
+ Add a page to the dialog. The riders bitmap is passed on, the page has no
+ counterpart in the TabControl in the resource of the dialogue.
*/
(
@@ -948,7 +936,7 @@ void SfxTabDialog::AddTabPage
)
{
DBG_ASSERT( TAB_PAGE_NOTFOUND == aTabCtrl.GetPagePos( nId ),
- "Doppelte Page-Ids in der Tabpage" );
+ "Duplicate Page-Ids in the Tabpage" );
aTabCtrl.InsertPage( nId, rRiderBitmap, nPos );
pImpl->pData->Append(
new Data_Impl( nId, pCreateFunc, pRangesFunc, bItemsOnDemand ) );
@@ -959,9 +947,9 @@ void SfxTabDialog::AddTabPage
void SfxTabDialog::RemoveTabPage( sal_uInt16 nId )
-/* [Beschreibung]
+/* [Description]
- L"oschen der TabPage mit der ID nId
+ Delete the TabPage with ID nId
*/
{
@@ -992,7 +980,7 @@ void SfxTabDialog::RemoveTabPage( sal_uInt16 nId )
}
else
{
- DBG_WARNINGFILE( "TabPage-Id nicht bekannt" );
+ DBG_WARNINGFILE( "TabPage-Id not known" );
}
}
@@ -1000,16 +988,16 @@ void SfxTabDialog::RemoveTabPage( sal_uInt16 nId )
void SfxTabDialog::PageCreated
-/* [Beschreibung]
+/* [Description]
- Defaultimplemetierung der virtuellen Methode.
- Diese wird unmittelbar nach dem Erzeugen einer Seite gerufen.
- Hier kann der Dialog direkt an der TabPage Methoden rufen.
+ Default implemetation of the virtual method. This is called immediately
+ after creating a page. Here the dialogue can call the TabPage Method
+ directly.
*/
(
- sal_uInt16, // Id der erzeugten Seite
- SfxTabPage& // Referenz auf die erzeugte Seite
+ sal_uInt16, // Id of the created page
+ SfxTabPage& // Reference to the created page
)
{
}
@@ -1018,11 +1006,10 @@ void SfxTabDialog::PageCreated
SfxItemSet* SfxTabDialog::GetInputSetImpl()
-/* [Beschreibung]
+/* [Description]
- Abgeleitete Klassen legen ggf. fuer den InputSet neuen Speicher an.
- Dieser mu\s im Destruktor auch wieder freigegeben werden. Dazu mu\s
- diese Methode gerufen werden.
+ Derived classes may create new storage for the InputSet. This has to be
+ released in the Destructor. To do this, this method must be called.
*/
{
@@ -1033,9 +1020,9 @@ SfxItemSet* SfxTabDialog::GetInputSetImpl()
SfxTabPage* SfxTabDialog::GetTabPage( sal_uInt16 nPageId ) const
-/* [Beschreibung]
+/* [Description]
- TabPage mit der "Ubergebenen Id zur"uckgeben.
+ Return TabPage with the specified Id.
*/
{
@@ -1058,18 +1045,17 @@ sal_Bool SfxTabDialog::IsInOK() const
short SfxTabDialog::Ok()
-/* [Beschreibung]
+/* [Description]
- Ok-Handler des Dialogs
- Das OutputSet wird erstellt und jede Seite wird mit
- dem bzw. ihrem speziellen OutputSet durch Aufruf der Methode
- <SfxTabPage::FillItemSet(SfxItemSet &)> dazu aufgefordert,
- die vom Benuzter eingestellten Daten in das Set zu tun.
+ Ok handler for the Dialogue.
+ The OutputSet is created and for each page this or the special OutputSet
+ is set by calling the method <SfxTabPage::FillItemSet(SfxItemSet &)>, to
+ insert the entered data by the user into the set.
- [R"uckgabewert]
+ [Return value]
- RET_OK: wenn mindestens eine Seite sal_True als Returnwert von
- FillItemSet geliefert hat, sonst RET_CANCEL.
+ RET_OK: if at least one page has returned from FillItemSet,
+ otherwise RET_CANCEL.
*/
{
@@ -1078,7 +1064,7 @@ short SfxTabDialog::Ok()
if ( !pOutSet )
{
if ( !pExampleSet && pSet )
- pOutSet = pSet->Clone( sal_False ); // ohne Items
+ pOutSet = pSet->Clone( sal_False ); // without Items
else if ( pExampleSet )
pOutSet = new SfxItemSet( *pExampleSet );
}
@@ -1134,14 +1120,14 @@ IMPL_LINK( SfxTabDialog, CancelHdl, Button*, pButton )
SfxItemSet* SfxTabDialog::CreateInputItemSet( sal_uInt16 )
-/* [Beschreibung]
+/* [Description]
- Defaultimplemetierung der virtuellen Methode.
- Diese wird gerufen, wenn Pages ihre Sets onDenamd anlegen
+ Default implemetation of the virtual Method.
+ This is called when pages create their sets onDenamd.
*/
{
- DBG_WARNINGFILE( "CreateInputItemSet nicht implementiert" );
+ DBG_WARNINGFILE( "CreateInputItemSet not implemented" );
return new SfxAllItemSet( SFX_APP()->GetPool() );
}
@@ -1149,15 +1135,15 @@ SfxItemSet* SfxTabDialog::CreateInputItemSet( sal_uInt16 )
const SfxItemSet* SfxTabDialog::GetRefreshedSet()
-/* [Beschreibung]
+/* [Description]
- Defaultimplemetierung der virtuellen Methode.
- Diese wird gerufen, wenn <SfxTabPage::DeactivatePage(SfxItemSet *)>
- <SfxTabPage::REFRESH_SET> liefert.
+ Default implemetation of the virtual Method.
+ This is called, when <SfxTabPage::DeactivatePage(SfxItemSet *)>
+ returns <SfxTabPage::REFRESH_SET>.
*/
{
- DBG_ERRORFILE( "GetRefreshedSet nicht implementiert" );
+ DBG_ERRORFILE( "GetRefreshedSet not implemented" );
return 0;
}
@@ -1165,13 +1151,12 @@ const SfxItemSet* SfxTabDialog::GetRefreshedSet()
IMPL_LINK( SfxTabDialog, OkHdl, Button *, EMPTYARG )
-/* [Beschreibung]
+/* [Description]
- Handler des Ok-Buttons
- Dieser ruft f"ur die aktuelle Seite
- <SfxTabPage::DeactivatePage(SfxItemSet *)>.
- Liefert diese <SfxTabPage::LEAVE_PAGE>, wird <SfxTabDialog::Ok()> gerufen
- und so der Dialog beendet.
+ Handler of the Ok-Buttons
+ This calls the current page <SfxTabPage::DeactivatePage(SfxItemSet *)>.
+ Returns <SfxTabPage::LEAVE_PAGE>, <SfxTabDialog::Ok()> is called
+ anf the Dialog is ended.
*/
{
@@ -1230,13 +1215,12 @@ bool SfxTabDialog::PrepareLeaveCurrentPage()
IMPL_LINK( SfxTabDialog, UserHdl, Button *, EMPTYARG )
-/* [Beschreibung]
+/* [Description]
- Handler des User-Buttons
- Dieser ruft f"ur die aktuelle Seite
- <SfxTabPage::DeactivatePage(SfxItemSet *)>.
- Liefert diese <SfxTabPage::LEAVE_PAGE>, wird <SfxTabDialog::Ok()> gerufen.
- Mit dem Return-Wert von <SfxTabDialog::Ok()> wird dann der Dialog beendet.
+ Handler of the User-Buttons
+ This calls the current page <SfxTabPage::DeactivatePage(SfxItemSet *)>.
+ returns this <SfxTabPage::LEAVE_PAGE> and <SfxTabDialog::Ok()> is called.
+ Then the Dialog is ended with the Return value <SfxTabDialog::Ok()>
*/
{
@@ -1257,22 +1241,21 @@ IMPL_LINK( SfxTabDialog, UserHdl, Button *, EMPTYARG )
IMPL_LINK( SfxTabDialog, ResetHdl, Button *, EMPTYARG )
-/* [Beschreibung]
+/* [Description]
- Handler hinter dem Zur"ucksetzen-Button.
- Die aktuelle Page wird mit ihren initialen Daten
- neu initialisiert; alle Einstellungen, die der Benutzer
- auf dieser Seite get"atigt hat, werden aufgehoben.
+ Handler behind the reset button.
+ The Current Page is new initialized with their initial data, all the
+ settings that the user has made on this page are repealed.
*/
{
const sal_uInt16 nId = aTabCtrl.GetCurPageId();
Data_Impl* pDataObject = Find( *pImpl->pData, nId );
- DBG_ASSERT( pDataObject, "Id nicht bekannt" );
+ DBG_ASSERT( pDataObject, "Id not known" );
if ( pDataObject->bOnDemand )
{
- // CSet auf AIS hat hier Probleme, daher getrennt
+ // CSet on AIS has problems here, thus separated
const SfxItemSet* pItemSet = &pDataObject->pTabPage->GetItemSet();
pDataObject->pTabPage->Reset( *(SfxItemSet*)pItemSet );
}
@@ -1285,18 +1268,17 @@ IMPL_LINK( SfxTabDialog, ResetHdl, Button *, EMPTYARG )
IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG )
-/* [Beschreibung]
+/* [Description]
- Handler hinter dem Standard-Button.
- Dieser Button steht beim Bearbeiten von StyleSheets zur Verf"ugung.
- Alle in dem bearbeiteten StyleSheet eingestellten Attribute
- werden gel"oscht.
+ Handler behind the Standard-Button.
+ This button is available when editing style sheets. All the set attributes
+ in the edited stylesheet are deleted.
*/
{
const sal_uInt16 nId = aTabCtrl.GetCurPageId();
Data_Impl* pDataObject = Find( *pImpl->pData, nId );
- DBG_ASSERT( pDataObject, "Id nicht bekannt" );
+ DBG_ASSERT( pDataObject, "Id not known" );
bFmt = 2;
if ( pDataObject->fnGetRanges )
@@ -1314,23 +1296,23 @@ IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG )
if ( *pTmpRanges == *pU )
{
- // Range mit zwei gleichen Werten -> nur ein Item setzen
+ // Range which two identical values -> only set one Item
sal_uInt16 nWh = pPool->GetWhich( *pTmpRanges );
pExampleSet->ClearItem( nWh );
aTmpSet.ClearItem( nWh );
- // am OutSet mit InvalidateItem,
- // damit die "Anderung wirksam wird
+ // At the Outset of InvalidateItem,
+ // so that the change takes effect
pOutSet->InvalidateItem( nWh );
}
else
{
- // richtiger Range mit mehreren Werten
+ // Correct Range with multiple values
sal_uInt16 nTmp = *pTmpRanges, nTmpEnd = *pU;
- DBG_ASSERT( nTmp <= nTmpEnd, "Range ist falsch sortiert" );
+ DBG_ASSERT( nTmp <= nTmpEnd, "Range is sorted the wrong way" );
if ( nTmp > nTmpEnd )
{
- // wenn wirklich falsch sortiert, dann neu setzen
+ // If really sorted wrongly, then set new
sal_uInt16 nTmp1 = nTmp;
nTmp = nTmpEnd;
nTmpEnd = nTmp1;
@@ -1338,21 +1320,21 @@ IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG )
while ( nTmp <= nTmpEnd )
{
- // "uber den Range iterieren, und die Items setzen
+ // Iterate over the Range and set the Items
sal_uInt16 nWh = pPool->GetWhich( nTmp );
pExampleSet->ClearItem( nWh );
aTmpSet.ClearItem( nWh );
- // am OutSet mit InvalidateItem,
- // damit die "Anderung wirksam wird
+ // At the Outset of InvalidateItem,
+ // so that the change takes effect
pOutSet->InvalidateItem( nWh );
nTmp++;
}
}
- // zum n"achsten Paar gehen
+ // Go to the next pair
pTmpRanges += 2;
}
- // alle Items neu gesetzt -> dann an der aktuellen Page Reset() rufen
- DBG_ASSERT( pDataObject->pTabPage, "die Page ist weg" );
+ // Set all Items as new -> the call the current Page Reset()
+ DBG_ASSERT( pDataObject->pTabPage, "the Page is gone" );
pDataObject->pTabPage->Reset( aTmpSet );
pDataObject->pTabPage->pImpl->mbStandard = sal_True;
}
@@ -1369,29 +1351,27 @@ IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG )
IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
-/* [Beschreibung]
+/* [Description]
- Handler, der vor dem Umschalten auf eine andere Seite
- durch Starview gerufen wird.
- Existiert die Seite noch nicht, so wird sie erzeugt und
- die virtuelle Methode <SfxTabDialog::PageCreated( sal_uInt16, SfxTabPage &)>
- gerufen. Existiert die Seite bereits, so wird ggf.
- <SfxTabPage::Reset(const SfxItemSet &)> oder
- <SfxTabPage::ActivatePage(const SfxItemSet &)> gerufen.
+ Handler that is called by StarView for switching to a different page.
+ If the page not exist yet then it is created and the virtual Method
+ <SfxTabDialog::PageCreated( sal_uInt16, SfxTabPage &)> is called. If the page
+ exist, then the if possible the <SfxTabPage::Reset(const SfxItemSet &)> or
+ <SfxTabPage::ActivatePage(const SfxItemSet &)> is called.
*/
{
sal_uInt16 const nId = pTabCtrl->GetCurPageId();
- DBG_ASSERT( pImpl->pData->Count(), "keine Pages angemeldet" );
+ DBG_ASSERT( pImpl->pData->Count(), "no Pages registered" );
SFX_APP();
// Tab Page schon da?
SfxTabPage* pTabPage = dynamic_cast<SfxTabPage*> (pTabCtrl->GetTabPage( nId ));
Data_Impl* pDataObject = Find( *pImpl->pData, nId );
- DBG_ASSERT( pDataObject, "Id nicht bekannt" );
+ DBG_ASSERT( pDataObject, "Id not known" );
- // ggf. TabPage erzeugen:
+ // Create TabPage if possible:
if ( !pTabPage )
{
#if ENABLE_LAYOUT_SFX_TABDIALOG
@@ -1445,7 +1425,7 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
#endif /* ENABLE_LAYOUT */
Size aCtrlSiz = pTabCtrl->GetTabPageSizePixel();
- // Gr"o/se am TabControl nur dann setzen, wenn < als TabPage
+ // Only set Size on TabControl when < as TabPage
if ( aCtrlSiz.Width() < aSiz.Width() ||
aCtrlSiz.Height() < aSiz.Height() )
{
@@ -1480,11 +1460,11 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl )
-/* [Beschreibung]
+/* [Description]
- Handler, der vor dem Verlassen einer Seite durch Starview gerufen wird.
+ Handler that is called by StarView before leaving a page.
- [Querverweise]
+ [Cross-reference]
<SfxTabPage::DeactivatePage(SfxItemSet *)>
*/
@@ -1493,13 +1473,13 @@ IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl )
sal_uInt16 nId = pTabCtrl->GetCurPageId();
SFX_APP();
SfxTabPage *pPage = dynamic_cast<SfxTabPage*> (pTabCtrl->GetTabPage( nId ));
- DBG_ASSERT( pPage, "keine aktive Page" );
+ DBG_ASSERT( pPage, "no active Page" );
#ifdef DBG_UTIL
Data_Impl* pDataObject = Find( *pImpl->pData, pTabCtrl->GetCurPageId() );
- DBG_ASSERT( pDataObject, "keine Datenstruktur zur aktuellen Seite" );
+ DBG_ASSERT( pDataObject, "no Data structur for current page" );
if ( pPage->HasExchangeSupport() && pDataObject->bOnDemand )
{
- DBG_WARNING( "Datenaustausch bei ItemsOnDemand ist nicht gewuenscht!" );
+ DBG_WARNING( "Data exchange in ItemsOnDemand is not desired!" );
}
#endif
@@ -1516,7 +1496,6 @@ IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl )
nRet = pPage->DeactivatePage( &aTmp );
else
nRet = pPage->DeactivatePage( NULL );
-
if ( ( SfxTabPage::LEAVE_PAGE & nRet ) == SfxTabPage::LEAVE_PAGE &&
aTmp.Count() )
{
@@ -1543,15 +1522,15 @@ IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl )
if ( nRet & SfxTabPage::REFRESH_SET )
{
pSet = GetRefreshedSet();
- DBG_ASSERT( pSet, "GetRefreshedSet() liefert NULL" );
- // alle Pages als neu zu initialsieren flaggen
+ DBG_ASSERT( pSet, "GetRefreshedSet() returns NULL" );
+ // Flag all Pages as to be initialized as new
const sal_uInt16 nCount = pImpl->pData->Count();
for ( sal_uInt16 i = 0; i < nCount; ++i )
{
Data_Impl* pObj = (*pImpl->pData)[i];
- if ( pObj->pTabPage != pPage ) // eigene Page nicht mehr refreshen
+ if ( pObj->pTabPage != pPage ) // Do not refresh own Page anymore
pObj->bRefresh = sal_True;
else
pObj->bRefresh = sal_False;
@@ -1567,11 +1546,11 @@ IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl )
const SfxItemSet* SfxTabDialog::GetOutputItemSet
-/* [Beschreibung]
+/* [Description]
- Liefert die Pages, die ihre Sets onDemand liefern, das OutputItemSet.
+ Return the pages that provide their sets onDemand, the OutputItemSet.
- [Querverweise]
+ [Cross-reference]
<SfxTabDialog::AddTabPage(sal_uInt16, CreateTabPage, GetTabPageRanges, sal_Bool)>
<SfxTabDialog::AddTabPage(sal_uInt16, const String &, CreateTabPage, GetTabPageRanges, sal_Bool, sal_uInt16)>
@@ -1579,12 +1558,12 @@ const SfxItemSet* SfxTabDialog::GetOutputItemSet
*/
(
- sal_uInt16 nId // die Id, unter der die Seite bei AddTabPage()
- // hinzugef"ugt wurde.
+ sal_uInt16 nId // the Id, under which the page was added at AddTabPage().
+ // hinzugefügt wurde.
) const
{
Data_Impl* pDataObject = Find( *pImpl->pData, nId );
- DBG_ASSERT( pDataObject, "TabPage nicht gefunden" );
+ DBG_ASSERT( pDataObject, "TabPage not found" );
if ( pDataObject )
{
@@ -1622,9 +1601,9 @@ extern "C" int TabDlgCmpUS_Impl( const void* p1, const void* p2 )
#endif
#endif
-/* [Beschreibung]
+/* [Description]
- Vergleichsfunktion f"ur qsort
+ Comparison function for qsort
*/
{
@@ -1635,9 +1614,9 @@ extern "C" int TabDlgCmpUS_Impl( const void* p1, const void* p2 )
void SfxTabDialog::ShowPage( sal_uInt16 nId )
-/* [Beschreibung]
+/* [Description]
- Es wird die TabPage mit der "ubergebenen Id aktiviert.
+ The TabPage is activated with the specified Id.
*/
{
@@ -1649,29 +1628,28 @@ void SfxTabDialog::ShowPage( sal_uInt16 nId )
const sal_uInt16* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
-/* [Beschreibung]
+/* [Description]
+
+ Makes the set over the range of all pages of the dialogue. Pages have the
+ static method for querying their range in AddTabPage, ie deliver their
+ sets onDemand.
- Bildet das Set "uber die Ranges aller Seiten des Dialogs.
- Die Pages m"ussen die statische Methode f"ur das Erfragen ihrer
- Ranges bei AddTabPage angegeben haben, liefern also ihre Sets onDemand.
+ [Return value]
- [Querverweise]
+ Pointer to a null-terminated array of sal_uInt16. This array belongs to the
+ dialog and is deleted when the dialogue is destroy.
+
+ [Cross-reference]
<SfxTabDialog::AddTabPage(sal_uInt16, CreateTabPage, GetTabPageRanges, sal_Bool)>
<SfxTabDialog::AddTabPage(sal_uInt16, const String &, CreateTabPage, GetTabPageRanges, sal_Bool, sal_uInt16)>
<SfxTabDialog::AddTabPage(sal_uInt16, const Bitmap &, CreateTabPage, GetTabPageRanges, sal_Bool, sal_uInt16)>
-
- [R"uckgabewert]
-
- Pointer auf nullterminiertes Array von USHORTs
- Dieses Array geh"ort dem Dialog und wird beim
- Zerst"oren des Dialogs gel"oscht.
*/
{
if ( pSet )
{
- DBG_ERRORFILE( "Set bereits vorhanden!" );
+ DBG_ERRORFILE( "Set already exists!" );
return pSet->GetRanges();
}
@@ -1697,7 +1675,7 @@ const sal_uInt16* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
}
}
- //! Doppelte Ids entfernen?
+ //! Remove duplicated Ids?
#ifndef TF_POOLABLE
if ( rPool.HasMap() )
#endif
@@ -1708,7 +1686,7 @@ const sal_uInt16* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
aUS[i] = rPool.GetWhich( aUS[i] );
}
- // sortieren
+ // sort
if ( aUS.Count() > 1 )
qsort( (void*)aUS.GetData(),
aUS.Count(), sizeof(sal_uInt16), TabDlgCmpUS_Impl );
@@ -1723,10 +1701,9 @@ const sal_uInt16* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
void SfxTabDialog::SetInputSet( const SfxItemSet* pInSet )
-/* [Beschreibung]
+/* [Description]
- Mit dieser Methode kann nachtr"aglich der Input-Set initial oder
- neu gesetzt werden.
+ With this method the Input-Set can subsequently be set initally or re-set.
*/
{
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index 32d8a0eee230..f32025e74414 100755
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -1128,7 +1128,7 @@ namespace sfx2
// ---------------------------------------------------------------------------------------------------------------------
void TaskPaneController_Impl::Dying()
{
- OSL_ENSURE( false, "TaskPaneController_Impl::Dying: unexpected call!" );
+ OSL_FAIL( "TaskPaneController_Impl::Dying: unexpected call!" );
// We are expected to live longer than the ToolPanelDeck we work with. Since we remove ourself, in our dtor,
// as listener from the panel deck, this method here should never be called.
}
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index c8665093acc5..325b512ce8b7 100755
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -84,8 +84,7 @@ using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::uno;
//=========================================================================
-
-// Fenster wird ab jetzt dynamisch erstellt. Daher hier R"ander usw.
+// Window is now created dynamically. So here margins, etc.
#define SFX_TEMPLDLG_HFRAME 3
#define SFX_TEMPLDLG_VTOPFRAME 3
@@ -117,7 +116,7 @@ SFX_IMPL_DOCKINGWINDOW(SfxTemplateDialogWrapper, SID_STYLE_DESIGNER)
//-------------------------------------------------------------------------
-// Redirektionsfunktionen
+// Re-direct functions
SfxTemplateDialog::SfxTemplateDialog
(
@@ -126,8 +125,8 @@ SfxTemplateDialog::SfxTemplateDialog
Window *pParent
)
-/* [Beschreibung]
- Gestalterklasse.
+/* [Description]
+ Designer class.
*/
: SfxDockingWindow( pBind, pCW, pParent, SfxResId(DLG_STYLE_DESIGNER) ),
@@ -353,11 +352,10 @@ SfxActionListBox::SfxActionListBox
WinBits nWinBits
)
-/* [Beschreibung]
-
- ListBox- Klasse, die im Command-Handler ein PopupMenu (Gestalter
- spezifisch) startet.
+/* [Description]
+ ListBox class that starts a PopupMenu (designer specific) in the
+ command handler.
*/
: DropListBox_Impl(pParent->GetWindow(), nWinBits, pParent)
@@ -412,11 +410,9 @@ void SfxTemplateDialogWrapper::SetParagraphFamily()
SV_DECL_PTRARR_DEL(ExpandedEntries, StringPtr,16,8)
SV_IMPL_PTRARR(ExpandedEntries, StringPtr)
-/* [Beschreibung]
-
- TreeListBox- Klasse f"ur die Anzeige der hierarchischen View
- der Vorlagen
+/* [Description]
+ TreeListBox class for displaying the hierarchical view of the templates
*/
class StyleTreeListBox_Impl : public DropListBox_Impl
@@ -476,12 +472,10 @@ PopupMenu* StyleTreeListBox_Impl::CreateContextMenu()
sal_Bool StyleTreeListBox_Impl::DoubleClickHdl()
-/* [Beschreibung]
-
-
- DoubleClick-Handler; ruft entsprechenden Link.
- Virtuelle Methode aus SV.
+/* [Description]
+ DoubleClick-Handler; calls the link.
+ SV virtual method.
*/
{
aDoubleClickLink.Call(this);
@@ -492,12 +486,10 @@ sal_Bool StyleTreeListBox_Impl::DoubleClickHdl()
void StyleTreeListBox_Impl::Command( const CommandEvent& rCEvt )
-/* [Beschreibung]
-
- Command Handler; dieser executed ein PopupMenu (Gestalter
- spezifisch).
- Virtuelle Methode aus SV.
+/* [Description]
+ Command Handler; this executes a PopupMenu (designer-specific)
+ SV virtual method.
*/
{
SvTreeListBox::Command(rCEvt);
@@ -532,12 +524,10 @@ sal_Bool StyleTreeListBox_Impl::NotifyMoving(SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
sal_uIntPtr& lPos)
-/* [Beschreibung]
-
- NotifyMoving Handler; dieser leitet per Link das Event an den Dialog
- weiter.
- Virtuelle Methode aus SV.
+/* [Description]
+ NotifyMoving Handler; This leads via a link on the event to the dialog.
+ SV virtual method.
*/
{
if(!pTarget || !pEntry)
@@ -561,14 +551,13 @@ sal_Bool StyleTreeListBox_Impl::NotifyMoving(SvLBoxEntry* pTarget,
long StyleTreeListBox_Impl::ExpandingHdl()
-/* [Beschreibung]
+/* [Description]
- ExpandingHdl Handler; der aktuelle Eintrag wird gemerkt.
- Virtuelle Methode aus SV.
+ ExpandingHdl Handler; the current entry is noticed.
+ SV virtual method.
- [Querverweise]
+ [Cross-reference]
<StyleTreeListBox_Impl::ExpandedHdl()>
-
*/
{
pCurEntry = GetCurEntry();
@@ -579,14 +568,13 @@ long StyleTreeListBox_Impl::ExpandingHdl()
void StyleTreeListBox_Impl::ExpandedHdl()
-/* [Beschreibung]
+/* [Description]
ExpandedHdl Handler;
- Virtuelle Methode aus SV.
+ SV virtual method.
- [Querverweise]
+ [Cross-reference]
<StyleTreeListBox_Impl::ExpandingHdl()>
-
*/
{
@@ -604,10 +592,9 @@ StyleTreeListBox_Impl::StyleTreeListBox_Impl(
pCurEntry(0),
pCommon(pParent)
-/* [Beschreibung]
-
- Konstruktor StyleTreeListBox_Impl
+/* [Description]
+ Constructor StyleTreeListBox_Impl
*/
{
EnableContextMenuHandling();
@@ -619,10 +606,9 @@ StyleTreeListBox_Impl::StyleTreeListBox_Impl(
class StyleTreeArr_Impl;
-/* [Beschreibung]
-
- Interne Struktur f"ur den Aufbau der hierarchischen View
+/* [Description]
+ Internal structure for the establishment of the hierarchical view
*/
struct StyleTree_Impl
@@ -679,7 +665,7 @@ StyleTreeArr_Impl &MakeTree_Impl(StyleTreeArr_Impl &rArr)
::comphelper::getProcessComponentContext(),
Application::GetSettings().GetLocale());
- // Alle unter ihren Parents einordnen
+ // Arrange all under their Parents
sal_uInt16 i;
for(i = 0; i < nCount; ++i)
{
@@ -691,7 +677,7 @@ StyleTreeArr_Impl &MakeTree_Impl(StyleTreeArr_Impl &rArr)
StyleTree_ImplPtr pCmp = rArr[j];
if(pCmp->aName == pEntry->aParent)
{
- // initial sortiert einfuegen
+ // Paste initial filter
sal_uInt16 nPos;
for( nPos = 0 ; nPos < pCmp->Count() &&
aSorter.compare((*pCmp->pChilds)[nPos]->aName, pEntry->aName) < 0 ; nPos++)
@@ -703,7 +689,6 @@ StyleTreeArr_Impl &MakeTree_Impl(StyleTreeArr_Impl &rArr)
}
}
- // Keep only nodes with no parent in root array
for(i = 0; i < rArr.Count(); )
{
if(rArr[i]->HasParent())
@@ -742,8 +727,7 @@ SvLBoxEntry* FillBox_Impl(SvTreeListBox *pBox,
}
//-------------------------------------------------------------------------
-
-// Konstruktor
+// Constructor
SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, SfxDockingWindow* pW ) :
@@ -856,17 +840,15 @@ sal_uInt16 SfxCommonTemplateDialog_Impl::InfoOffsetToStyleNr(sal_uInt16 nId)
for ( size_t i = 0; i < pStyleFamilies->size(); i++ )
if ( SfxFamilyIdToNId(pStyleFamilies->at( i )->GetFamily()) == nId+1 )
return i;
- OSL_FAIL("Style Nummer nicht gefunden");
+ OSL_FAIL("Style Nummer not found");
return 0;
}
-
//-------------------------------------------------------------------------
void SfxCommonTemplateDialog_Impl::ReadResource()
{
- // globale Benutzer-Resource auslesen
-
+ // Read global user resource
for(sal_uInt16 i = 0; i < MAX_FAMILIES; ++i)
pFamilyState[i] = 0;
@@ -886,8 +868,8 @@ void SfxCommonTemplateDialog_Impl::ReadResource()
if ( pCurObjShell && 0xFFFF == nActFilter )
nActFilter = pCurObjShell->GetAutoStyleFilterIndex();
- // Einfuegen in die Toolbox
- // umgekehrte Reihenfolge, da immer vorne eingefuegt wird.
+ // Paste in the toolbox
+ // reverse order, since always inserted at the head
size_t nCount = pStyleFamilies->size();
pBindings->ENTERREGISTRATIONS();
@@ -931,14 +913,13 @@ void SfxCommonTemplateDialog_Impl::ReadResource()
StartListening(*pBindings);
-//In umgekehrter Reihenfolge des Auftretens in den Stylefamilies einfuegen.
-//Das ist fuer den Toolbar des Gestalters. Die Listbox des Kataloges achtet
-//selbst auf korrekte Reihenfolge.
+// Insert in the reverse order of occurrence in the Style Families. This is for
+// the toolbar of the designer. The list box of the catalog respects the
+// correct order by itself.
-//Reihenfolgen: Reihenfolge in der Resource = Reihenfolge in Toolbar bzw.
-//Listbox.
-//Reihenfolge aufsteigender SIDs: Niedrige SIDs werden als erstes angezeigt,
-//wenn Vorlagen mehrerer Familien aktiv sind.
+// Sequences: the order of Resource = the order of Toolbar for example list box.
+// Order of ascending SIDs: Low SIDs are displayed first when templates of
+// several families are active.
// in the Writer the UpdateStyleByExample Toolbox button is removed and
// the NewStyle button gets a PopupMenu
@@ -983,7 +964,7 @@ void SfxCommonTemplateDialog_Impl::ClearResource()
void SfxCommonTemplateDialog_Impl::Initialize()
{
- // globale Benutzer-Resource auslesen
+ // Read global user resource
ReadResource();
pBindings->Invalidate( SID_STYLE_FAMILY );
pBindings->Update( SID_STYLE_FAMILY );
@@ -1057,8 +1038,7 @@ void SfxCommonTemplateDialog_Impl::SetAutomaticFilter()
}
//-------------------------------------------------------------------------
-
-// Hilfsfunktion: Zugriff auf aktuelles Family-Item
+// Helper function: Access to the current family item
const SfxStyleFamilyItem *SfxCommonTemplateDialog_Impl::GetFamilyItem_Impl() const
{
const size_t nCount = pStyleFamilies->size();
@@ -1219,7 +1199,7 @@ void SfxCommonTemplateDialog_Impl::FillTreeBox()
pTreeBox->SetUpdateMode( sal_True );
String aStyle;
- if(pState) //Aktuellen Eintrag selektieren
+ if(pState) // Select current entry
aStyle = pState->GetStyleName();
SelectStyle(aStyle);
EnableDelete();
@@ -1244,7 +1224,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags)
const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
if (!pItem)
{
- // Ist beim Vorlagenkatalog der Fall
+ // Is the case for the template catalog
SfxTemplateItem **ppItem = pFamilyState;
const size_t nFamilyCount = pStyleFamilies->size();
size_t n;
@@ -1263,7 +1243,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags)
SfxFilterTupel* pT = ( nActFilter < pItem->GetFilterList().size() ? pItem->GetFilterList()[nActFilter] : NULL );
sal_uInt16 nFilter = pT ? pT->nFlags : 0;
- if(!nFilter) // automatisch
+ if(!nFilter) // automatic
nFilter = nAppFilter;
DBG_ASSERT(pStyleSheetPool, "no StyleSheetPool");
@@ -1273,7 +1253,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags)
pItem = GetFamilyItem_Impl();
if((nFlags & UPDATE_FAMILY) == UPDATE_FAMILY) // Update view type list (Hierarchical, All, etc.
{
- CheckItem(nActFamily, sal_True); // Button in Toolbox checken
+ CheckItem(nActFamily, sal_True); // check Button in Toolbox
aFilterLb.SetUpdateMode(sal_False);
aFilterLb.Clear();
//insert hierarchical at the beginning
@@ -1297,7 +1277,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags)
pStyleSheetPool->SetSearchMask(eFam, nFilterFlags);
}
- //Falls in Treedarstellung wieder Family Hierarchie selektieren
+ // if the tree view again, select family hierarchy
if(pTreeBox)
aFilterLb.SelectEntry(String(SfxResId(STR_STYLE_FILTER_HIERARCHICAL)));
@@ -1375,7 +1355,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags)
//-------------------------------------------------------------------------
-// Aktualisierung Anzeige: Gie\skanne an/aus
+// Updated display: Watering the house
void SfxCommonTemplateDialog_Impl::SetWaterCanState(const SfxBoolItem *pItem)
{
bWaterDisabled = pItem == 0;
@@ -1394,7 +1374,7 @@ void SfxCommonTemplateDialog_Impl::SetWaterCanState(const SfxBoolItem *pItem)
else
EnableItem(SID_STYLE_WATERCAN, sal_False);
-//Waehrend Giesskannenmodus Statusupdates ignorieren.
+// Ignore while in watercan mode statusupdates
size_t nCount = pStyleFamilies->size();
pBindings->EnterRegistrations();
@@ -1415,9 +1395,9 @@ void SfxCommonTemplateDialog_Impl::SetWaterCanState(const SfxBoolItem *pItem)
//-------------------------------------------------------------------------
-// Item mit dem Status einer Family wird kopiert und gemerkt
-// (Aktualisierung erfolgt, wenn alle Stati aktualisiert worden sind.
-// Siehe auch: <SfxBindings::AddDoneHdl(const Link &)>
+// Item with the status of a Family is copied and noted
+// (is updated when all states have also been updated.)
+// See also: <SfxBindings::AddDoneHdl(const Link &)>
void SfxCommonTemplateDialog_Impl::SetFamilyState( sal_uInt16 nSlotId, const SfxTemplateItem* pItem )
{
@@ -1427,14 +1407,13 @@ void SfxCommonTemplateDialog_Impl::SetFamilyState( sal_uInt16 nSlotId, const Sfx
pFamilyState[nIdx] = new SfxTemplateItem(*pItem);
bUpdate = sal_True;
- // Wenn verwendete Vorlagen ( wie zum Teufel findet man das heraus ?? )
+ // If used templates (how the hell you find this out??)
bUpdateFamily = sal_True;
}
//-------------------------------------------------------------------------
-
-// Benachrichtigung durch SfxBindings, da"s die Aktualisierung
-// beendet ist. St"o\st die Aktualisierung der Anzeige an.
+// Notice from SfxBindings that the update is completed. Pushes out the update
+// of the display.
void SfxCommonTemplateDialog_Impl::Update_Impl()
{
@@ -1475,12 +1454,11 @@ void SfxCommonTemplateDialog_Impl::Update_Impl()
if(pFamilyState[i])
break;
if(i == MAX_FAMILIES || !pNewPool)
- // nichts erlaubt
+ // nothing is allowed
return;
SfxTemplateItem *pItem = 0;
- // aktueller Bereich nicht innerhalb der erlaubten Bereiche
- // oder Default
+ // current region not within the allowed region or default
if(nActFamily == 0xffff || 0 == (pItem = pFamilyState[nActFamily-1] ) )
{
CheckItem(nActFamily, sal_False);
@@ -1498,7 +1476,7 @@ void SfxCommonTemplateDialog_Impl::Update_Impl()
}
else if( bDocChanged )
{
- // andere DocShell -> alles neu
+ // other DocShell -> all new
CheckItem( nActFamily, sal_True );
nActFilter = static_cast< sal_uInt16 >( LoadFactoryStyleFilter( pDocShell ) );
if ( 0xFFFF == nActFilter )
@@ -1514,7 +1492,7 @@ void SfxCommonTemplateDialog_Impl::Update_Impl()
}
else
{
- // anderer Filter fuer automatisch
+ // other filters for automatic
CheckItem( nActFamily, sal_True );
const SfxStyleFamilyItem *pStyleItem = GetFamilyItem_Impl();
#if OSL_DEBUG_LEVEL > 1
@@ -1572,7 +1550,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, TimeOut, Timer *, pTim )
//-------------------------------------------------------------------------
void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
{
- // Aktualisierung anstossen
+ // tap update
if(rHint.Type() == TYPE(SfxSimpleHint))
{
switch(((SfxSimpleHint&) rHint ).GetId())
@@ -1617,10 +1595,10 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint
}
break;
}
- // noetig, wenn zwichen Dokumenten umgeschaltet wird,
- // aber in beiden Dokumenten die gleiche Vorlage gilt.
- // Nicht sofort Update_Impl rufen, fuer den Fall da\s eines
- // der Dokumente ein internes InPlaceObjekt ist!
+
+ // Necessary if switching between documents and in both documents
+ // the same template is used. Do not immediately call Update_Impl,
+ // for the case that one of the documents is an internal InPlaceObjekt!
case SFX_HINT_DOCCHANGED:
bUpdate = sal_True;
break;
@@ -1633,9 +1611,9 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint
}
}
- // Timer nicht aufsetzen, wenn der StyleSheetPool in die Kiste geht, denn
- // es kann sein, da\s sich ein neuer erst anmeldet, nachdem der Timer
- // abgelaufen ist - macht sich schlecht in UpdateStyles_Impl() !
+ // Do not set timer when the stylesheet pool is in the box, because it is
+ // possible that a new one is registered after the timer is up -
+ // works bad in UpdateStyles_Impl ()!
sal_uIntPtr nId = rHint.ISA(SfxSimpleHint) ? ( (SfxSimpleHint&)rHint ).GetId() : 0;
@@ -1658,12 +1636,12 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint
//-------------------------------------------------------------------------
-// Anderer Filter; kann durch den Benutzer umgeschaltet werden
-// oder als Folge von Neu oder Bearbeiten, wenn die aktuelle
-// Vorlage einem anderen Filter zugewiesen wurde.
+// Other filters; can be switched by the users or as a result of new or
+// editing, if the current document has been assigned a different filter.
void SfxCommonTemplateDialog_Impl::FilterSelect(
- sal_uInt16 nEntry, // Idx des neuen Filters
- sal_Bool bForce ) // Aktualisierung erzwingen, auch wenn der neue Filter gleich dem aktuellen ist
+ sal_uInt16 nEntry, // Idx of the new Filters
+ sal_Bool bForce ) // Force update, even if the new filter is
+ // equal to the current
{
if( nEntry != nActFilter || bForce )
{
@@ -1692,7 +1670,7 @@ void SfxCommonTemplateDialog_Impl::FilterSelect(
//-------------------------------------------------------------------------
-// Intern: Ausf"uhren von Funktionen "uber den Dispatcher
+// Internal: Perform functions through the Dispatcher
sal_Bool SfxCommonTemplateDialog_Impl::Execute_Impl(
sal_uInt16 nId, const String &rStr, const String& rRefStr, sal_uInt16 nFamily,
sal_uInt16 nMask, sal_uInt16 *pIdx, const sal_uInt16* pModifier)
@@ -1712,7 +1690,7 @@ sal_Bool SfxCommonTemplateDialog_Impl::Execute_Impl(
pItems[ nCount++ ] = &aMask;
if(SID_STYLE_UPDATE_BY_EXAMPLE == nId)
{
- //Sonderloesung fuer Numerierungsupdate im Writer
+ // Special solution for Numbering update in Writer
const String aTemplName(GetSelectedEntry());
aUpdName.SetValue(aTemplName);
pItems[ nCount++ ] = &aUpdName;
@@ -1736,9 +1714,9 @@ sal_Bool SfxCommonTemplateDialog_Impl::Execute_Impl(
if ( nId == SID_STYLE_NEW || SID_STYLE_EDIT == nId )
{
SfxUInt16Item *pFilterItem = PTR_CAST(SfxUInt16Item, pItem);
- DBG_ASSERT(pFilterItem, "SfxUINT16Item erwartet");
+ DBG_ASSERT(pFilterItem, "SfxUINT16Item expected");
sal_uInt16 nFilterFlags = pFilterItem->GetValue() & ~SFXSTYLEBIT_USERDEF;
- if(!nFilterFlags) // Benutzervorlage?
+ if(!nFilterFlags) // User Template?
nFilterFlags = pFilterItem->GetValue();
const SfxStyleFamilyItem *pFamilyItem = GetFamilyItem_Impl();
const size_t nFilterCount = pFamilyItem->GetFilterList().size();
@@ -1768,7 +1746,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox )
{
if ( !bHierarchical )
{
- // TreeView einschalten
+ // Turn on treeView
bHierarchical=sal_True;
const String aSelectEntry( GetSelectedEntry());
aFmtLb.Hide();
@@ -1805,7 +1783,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox )
DELETEZ(pTreeBox);
aFmtLb.Show();
// aFilterLb.Enable();
- // Falls bHierarchical, kann sich die Familie geaendert haben
+ // If bHierarchical, then the family can have changed
// minus one since hierarchical is inserted at the start
FilterSelect(pBox->GetSelectEntryPos() - 1, bHierarchical );
bHierarchical=sal_False;
@@ -1816,7 +1794,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox )
//-------------------------------------------------------------------------
-// Select-Handler der Toolbox
+// Select-Handler for the Toolbox
void SfxCommonTemplateDialog_Impl::FamilySelect(sal_uInt16 nEntry)
{
if( nEntry != nActFamily )
@@ -1844,7 +1822,7 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(sal_uInt16 nEntry)
const sal_Bool bState = IsCheckedItem(nEntry);
sal_Bool bCheck;
SfxBoolItem aBool;
- // wenn eine Vorlage ausgewaehlt ist.
+ // when a template is chosen.
if(!bState && aFmtLb.GetSelectionCount())
{
const String aTemplName(
@@ -1985,7 +1963,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, DropHdl, StyleTreeListBox_Impl *, pBox
//-------------------------------------------------------------------------
-// Handler des Neu-Buttons
+// Handler for the New-Buttons
void SfxCommonTemplateDialog_Impl::NewHdl(void *)
{
String aEmpty;
@@ -2004,7 +1982,7 @@ void SfxCommonTemplateDialog_Impl::NewHdl(void *)
if( pItem && nActFilter != 0xffff )
{
nMask = pItem->GetFilterList()[ nActFilter ]->nFlags;
- if(!nMask) // automatisch
+ if(!nMask) // automatic
nMask = nAppFilter;
}
else
@@ -2018,13 +1996,12 @@ void SfxCommonTemplateDialog_Impl::NewHdl(void *)
nMask);
Application::SetDefDialogParent( pTmp );
-
}
}
//-------------------------------------------------------------------------
-// Handler des Bearbeiten-Buttons
+// Handler for the edit-Buttons
void SfxCommonTemplateDialog_Impl::EditHdl(void *)
{
if(IsInitialized() && HasSelectedStyle())
@@ -2035,8 +2012,7 @@ void SfxCommonTemplateDialog_Impl::EditHdl(void *)
const SfxStyleFamily eFam = pItem->GetFamily();
pStyleSheetPool->Find(aTemplName,eFam,SFXSTYLEBIT_ALL); // -Wall required??
Window* pTmp;
- //DefModalDialogParent setzen fuer
- //Modalitaet der nachfolgenden Dialoge
+ //DefModalDialogParent set for modality of the following dialogs
pTmp = Application::GetDefDialogParent();
if ( ISA(SfxTemplateDialog_Impl) )
Application::SetDefDialogParent( pWindow->GetParent() );
@@ -2052,7 +2028,7 @@ void SfxCommonTemplateDialog_Impl::EditHdl(void *)
//-------------------------------------------------------------------------
-// Handler des L"oschen-Buttons
+// Handler for the Delete-Buttons
void SfxCommonTemplateDialog_Impl::DeleteHdl(void *)
{
if ( IsInitialized() && HasSelectedStyle() )
@@ -2077,7 +2053,8 @@ void SfxCommonTemplateDialog_Impl::DeleteHdl(void *)
{
PrepareDeleteAction();
- if ( pTreeBox ) // Damit die Treelistbox beim L"oschen nicht zuklappt
+ if ( pTreeBox ) // To prevent the Treelistbox to shut down while
+ // deleting.
{
bDontUpdate = sal_True;
}
@@ -2100,19 +2077,19 @@ void SfxCommonTemplateDialog_Impl::EnableDelete()
{
if(IsInitialized() && HasSelectedStyle())
{
- DBG_ASSERT(pStyleSheetPool, "Kein StyleSheetPool");
+ DBG_ASSERT(pStyleSheetPool, "No StyleSheetPool");
const String aTemplName(GetSelectedEntry());
const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
const SfxStyleFamily eFam = pItem->GetFamily();
sal_uInt16 nFilter = 0;
if(pItem->GetFilterList().size() > nActFilter)
nFilter = pItem->GetFilterList()[ nActFilter ]->nFlags;
- if(!nFilter) // automatisch
+ if(!nFilter) // automatic
nFilter = nAppFilter;
const SfxStyleSheetBase *pStyle =
pStyleSheetPool->Find(aTemplName,eFam, pTreeBox? SFXSTYLEBIT_ALL: nFilter);
- DBG_ASSERT(pStyle, "Style nicht gefunden");
+ DBG_ASSERT(pStyle, "Style ot found");
if(pStyle && pStyle->IsUserDefined())
{
EnableDel(sal_True);
@@ -2129,9 +2106,7 @@ void SfxCommonTemplateDialog_Impl::EnableDelete()
}
//-------------------------------------------------------------------------
-
-// nach Selektion eines Eintrags den Focus gfs. wieder auf das App-Fenster
-// setzen
+// After selecting a focused item if possible again on the app window
void SfxCommonTemplateDialog_Impl::ResetFocus()
{
if(ISA(SfxTemplateDialog_Impl))
@@ -2146,11 +2121,11 @@ void SfxCommonTemplateDialog_Impl::ResetFocus()
//-------------------------------------------------------------------------
-// Doppelclick auf ein StyleSheet in der ListBox, wird angewendet.
+// Doppelclick on a style sheet in the ListBox is applied.
IMPL_LINK( SfxCommonTemplateDialog_Impl, ApplyHdl, Control *, pControl )
{
(void)pControl; //unused
- // nur, wenn dieser Bereich erlaubt ist
+ // only if that region is allowed
if ( IsInitialized() && 0 != pFamilyState[nActFamily-1] &&
GetSelectedEntry().Len() )
{
@@ -2168,16 +2143,16 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, ApplyHdl, Control *, pControl )
//-------------------------------------------------------------------------
-// Selektion einer Vorlage w"ahrend des Watercan-Status
+// Selection of a template during the Watercan-Status
IMPL_LINK( SfxCommonTemplateDialog_Impl, FmtSelectHdl, SvTreeListBox *, pListBox )
{
- // HilfePI antriggern, wenn von Call als Handler und Bereich erlaubt ist
+ // Trigger Help PI, if this is permitted of call handlers and field
if( !pListBox || pListBox->IsSelected( pListBox->GetHdlEntry() ) )
{
- // nur, wenn Giesskanne an ist
+ // Only when the watercan is on
if ( IsInitialized() &&
IsCheckedItem(SID_STYLE_WATERCAN) &&
- // nur, wenn dieser Bereich erlaubt ist
+ // only if that region is allowed
0 != pFamilyState[nActFamily-1] )
{
String aEmpty;
@@ -2410,8 +2385,8 @@ void SfxTemplateDialog_Impl::LoadedFamilies()
//-------------------------------------------------------------------------
-// "Uberladener Resize-Handler ( StarView )
-// Die Groesse der Listboxen wird angepasst
+// Overloaded Resize-Handler ( StarView )
+// The size of the Listboxen is adjusted
void SfxTemplateDialog_Impl::Resize()
{
FloatingWindow *pF = m_pFloat->GetFloatingWindow();
@@ -2433,8 +2408,8 @@ void SfxTemplateDialog_Impl::Resize()
m_aActionTbL.SetPosSizePixel(m_pFloat->LogicToPixel(Point(SFX_TEMPLDLG_HFRAME,SFX_TEMPLDLG_VTOPFRAME)),
m_pFloat->LogicToPixel(aSizeATL));
- // Die Position der rechten Toolbox nur ver"andern, wenn das Fenster
- // breit genug ist
+ // only change the position of the right toolbox, when the window is wide
+ // enough
Point aPosATR(aDlgSize.Width()-SFX_TEMPLDLG_HFRAME-aSizeATR.Width(),SFX_TEMPLDLG_VTOPFRAME);
if(aDlgSize.Width() >= aMinSize.Width())
m_aActionTbR.SetPosPixel(m_pFloat->LogicToPixel(aPosATR));
@@ -2461,8 +2436,7 @@ void SfxTemplateDialog_Impl::Resize()
SFX_TEMPLDLG_VTOPFRAME - 2*SFX_TEMPLDLG_MIDVSPACE-
nListHeight-aSizeATL.Height())) );
- // Die Position der Listboxen nur ver"andern, wenn das Fenster
- // hoch genug ist
+ // only change the position of the listbox, when the window is high enough
if(aDlgSize.Height() >= aMinSize.Height())
{
aFilterLb.SetPosPixel(aFilterPos);
@@ -2832,9 +2806,8 @@ sal_Bool SfxTemplateCatalog_Impl::IsCheckedItem(sal_uInt16 nMesId)
}
//-------------------------------------------------------------------------
-
-// Der Katalog muss nur das Disablen beherrschen, da waehrend seiner
-// Lebenszeit keine Selektionsaenderungen vorgenommen werden koennen
+// The list has only to master the disabling, since during his life time no
+// changes in selection can be made,
void SfxTemplateCatalog_Impl::EnableFamilyItem( sal_uInt16 nId, sal_Bool bEnable )
{
if ( !bEnable )
@@ -2916,7 +2889,7 @@ void SfxCommonTemplateDialog_Impl::UpdateFamily_Impl()
InvalidateBindings();
if ( IsCheckedItem( SID_STYLE_WATERCAN ) &&
- // nur, wenn dieser Bereich erlaubt ist
+ // only if that area is allowed
0 != pFamilyState[ nActFamily - 1 ] )
Execute_Impl( SID_STYLE_APPLY, GetSelectedEntry(),
String(), (sal_uInt16)GetFamilyItem_Impl()->GetFamily() );
diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx
index 5a831b162cf2..f4dcbd43470a 100755
--- a/sfx2/source/dialog/tplcitem.cxx
+++ b/sfx2/source/dialog/tplcitem.cxx
@@ -45,11 +45,12 @@
// STATIC DATA -----------------------------------------------------------
-// Konstruktor
+// Constructor
SfxTemplateControllerItem::SfxTemplateControllerItem(
sal_uInt16 nSlotId, // ID
- SfxCommonTemplateDialog_Impl &rDlg, // Controller-Instanz, dem dieses Item zugeordnet ist.
+ SfxCommonTemplateDialog_Impl &rDlg, // Controller-Instance,
+ // which is assigned to this item.
SfxBindings &rBindings):
SfxControllerItem(nSlotId, rBindings),
rTemplateDlg(rDlg),
@@ -65,9 +66,8 @@ SfxTemplateControllerItem::~SfxTemplateControllerItem()
}
// -----------------------------------------------------------------------
-
-// Benachrichtigung "uber Status"anderung; wird an den
-// im Konstruktor "ubergebenen Controller propagiert
+// Notice about change of status, is propagated through the Controller
+// passed on by the constructor
void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pItem )
@@ -86,11 +86,11 @@ void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eSta
else {
const SfxTemplateItem *pStateItem = PTR_CAST(
SfxTemplateItem, pItem);
- DBG_ASSERT(pStateItem != 0, "SfxTemplateItem erwartet");
+ DBG_ASSERT(pStateItem != 0, "SfxTemplateItem expected");
rTemplateDlg.SetFamilyState( GetId(), pStateItem );
}
sal_Bool bDisable = eState == SFX_ITEM_DISABLED;
- // Familie Disablen
+ // Disable Familly
sal_uInt16 nFamily = 0;
switch( GetId())
{
@@ -104,7 +104,8 @@ void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eSta
nFamily = 4; break;
case SID_STYLE_FAMILY5:
nFamily = 5; break;
- default: OSL_FAIL("unbekannte StyleFamily"); break;
+
+ default: OSL_FAIL("unknown StyleFamily"); break;
}
rTemplateDlg.EnableFamilyItem( nFamily, !bDisable );
break;
@@ -116,7 +117,7 @@ void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eSta
else if( eState == SFX_ITEM_AVAILABLE )
{
const SfxBoolItem *pStateItem = PTR_CAST(SfxBoolItem, pItem);
- DBG_ASSERT(pStateItem != 0, "BoolItem erwartet");
+ DBG_ASSERT(pStateItem != 0, "BoolItem expected");
nWaterCanState = pStateItem->GetValue() ? 1 : 0;
}
//not necessary if the last event is still on the way
diff --git a/sfx2/source/dialog/tplpitem.cxx b/sfx2/source/dialog/tplpitem.cxx
index 67e1b004b4f0..0329d1a0395d 100755
--- a/sfx2/source/dialog/tplpitem.cxx
+++ b/sfx2/source/dialog/tplpitem.cxx
@@ -49,8 +49,8 @@ SfxTemplateItem::SfxTemplateItem() :
SfxTemplateItem::SfxTemplateItem
(
sal_uInt16 nWhichId, // Slot-ID
- const String& rStyle, // Name des aktuellen Styles
- sal_uInt16 nValue // Flags f"ur das Filtern bei automatischer Anzeige
+ const String& rStyle, // Name of the current Styles
+ sal_uInt16 nValue // Flags for the filters of the automatic display
) : SfxFlagItem( nWhichId, nValue ),
aStyle( rStyle )
{
@@ -58,7 +58,7 @@ SfxTemplateItem::SfxTemplateItem
//-------------------------------------------------------------------------
-// copy ctor
+// copy constuctor
SfxTemplateItem::SfxTemplateItem( const SfxTemplateItem& rCopy ) :
SfxFlagItem( rCopy ),
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index afdc3f934065..78b0c24fb6f5 100755
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -173,7 +173,7 @@ SvStringsDtor* SfxVersionTableDtor::GetVersions() const
return pList;
}
-// Achtung im Code wird dieses Array direkt (0, 1, ...) indiziert
+// Caution in the code this array si indexed directly (0, 1, ...)
static long nTabs_Impl[] =
{
3, // Number of Tabs
@@ -239,7 +239,7 @@ SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, sal_Bool bIsSaveVer
aVersionBox.SetStyle( aVersionBox.GetStyle() | WB_HSCROLL | WB_CLIPCHILDREN );
aVersionBox.SetSelectionMode( SINGLE_SELECTION );
aVersionBox.SetTabs( &nTabs_Impl[0], MAP_APPFONT );
- aVersionBox.Resize(); // OS: Hack fuer richtige Selektion
+ aVersionBox.Resize(); // OS: Hack for correct selection
RecalcDateColumn();
// set dialog title (filename or docinfo title)
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx
index 8ad9d8b537cb..3e54717ca6d2 100755
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
@@ -1341,7 +1341,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
try {
xBaseURI = createBaseURI(m_pImpl->m_xContext, xStorage, URL);
} catch (uno::Exception &) {
- OSL_ENSURE(false, "cannot create base URI");
+ OSL_FAIL("cannot create base URI");
}
}
uno::Reference<task::XInteractionHandler> xIH;
diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx
index 302e181fe438..e00f5e67fec5 100755
--- a/sfx2/source/doc/Metadatable.cxx
+++ b/sfx2/source/doc/Metadatable.cxx
@@ -285,7 +285,7 @@ public:
virtual bool IsInContent() const { return m_isInContent; }
virtual ::com::sun::star::uno::Reference<
::com::sun::star::rdf::XMetadatable > MakeUnoObject()
- { OSL_ENSURE(false, "MetadatableUndo::MakeUnoObject"); throw; }
+ { OSL_FAIL("MetadatableUndo::MakeUnoObject"); throw; }
};
// MetadatableClipboard ----------------------------------------------
@@ -310,7 +310,7 @@ public:
virtual bool IsInContent() const { return m_isInContent; }
virtual ::com::sun::star::uno::Reference<
::com::sun::star::rdf::XMetadatable > MakeUnoObject()
- { OSL_ENSURE(false, "MetadatableClipboard::MakeUnoObject"); throw; }
+ { OSL_FAIL("MetadatableClipboard::MakeUnoObject"); throw; }
void OriginNoLongerInBusinessAnymore() { m_pReg = 0; }
};
@@ -777,7 +777,7 @@ void XmlIdRegistryDocument::UnregisterMetadatable(const Metadatable& i_rObject)
::rtl::OUString idref;
if (!m_pImpl->LookupXmlId(i_rObject, path, idref))
{
- OSL_ENSURE(false, "unregister: no xml id?");
+ OSL_FAIL("unregister: no xml id?");
return;
}
const XmlIdMap_t::iterator iter( m_pImpl->m_XmlIdMap.find(idref) );
@@ -820,7 +820,7 @@ void XmlIdRegistryDocument::RegisterCopy(Metadatable const& i_rSource,
::rtl::OUString idref;
if (!m_pImpl->LookupXmlId( i_rSource, path, idref ))
{
- OSL_ENSURE(false, "no xml id?");
+ OSL_FAIL("no xml id?");
return;
}
XmlIdList_t * pList ( m_pImpl->LookupElementList(path, idref) );
@@ -887,7 +887,7 @@ XmlIdRegistryDocument::JoinMetadatables(
}
else
{
- OSL_ENSURE(false, "JoinMetadatables: no xmlid?");
+ OSL_FAIL("JoinMetadatables: no xmlid?");
return;
}
if (!mergedOwnsRef)
@@ -1202,7 +1202,7 @@ void XmlIdRegistryClipboard::UnregisterMetadatable(const Metadatable& i_rObject)
const MetadatableClipboard * pLink;
if (!m_pImpl->LookupXmlId(i_rObject, path, idref, pLink))
{
- OSL_ENSURE(false, "unregister: no xml id?");
+ OSL_FAIL("unregister: no xml id?");
return;
}
const ClipboardXmlIdMap_t::iterator iter( m_pImpl->m_XmlIdMap.find(idref) );
@@ -1309,7 +1309,7 @@ void Metadatable::RemoveMetadataReference()
}
catch (uno::Exception &)
{
- OSL_ENSURE(false, "Metadatable::RemoveMetadataReference: exception");
+ OSL_FAIL("Metadatable::RemoveMetadataReference: exception");
}
}
@@ -1465,13 +1465,13 @@ Metadatable::RegisterAsCopyOf(Metadatable const & i_rSource,
}
else
{
- OSL_ENSURE(false, "neither RegDoc nor RegClp cannot happen");
+ OSL_FAIL("neither RegDoc nor RegClp cannot happen");
}
}
}
catch (uno::Exception &)
{
- OSL_ENSURE(false, "Metadatable::RegisterAsCopyOf: exception");
+ OSL_FAIL("Metadatable::RegisterAsCopyOf: exception");
}
}
@@ -1494,7 +1494,7 @@ Metadatable::RegisterAsCopyOf(Metadatable const & i_rSource,
}
catch (uno::Exception &)
{
- OSL_ENSURE(false, "Metadatable::CreateUndo: exception");
+ OSL_FAIL("Metadatable::CreateUndo: exception");
}
return ::boost::shared_ptr<MetadatableUndo>();
}
@@ -1564,7 +1564,7 @@ Metadatable::JoinMetadatable(Metadatable const & i_rOther,
}
catch (uno::Exception &)
{
- OSL_ENSURE(false, "Metadatable::JoinMetadatable: exception");
+ OSL_FAIL("Metadatable::JoinMetadatable: exception");
}
}
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx
index f2b665f245cb..e4862ae470e7 100755
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -1355,10 +1355,10 @@ void SAL_CALL SfxDocumentMetaData::init(
OUStringToOString(name, RTL_TEXTENCODING_UTF8).getStr());
// ignore; duplicate
} catch (css::beans::IllegalTypeException &) {
- DBG_ERROR1("SfxDocumentMetaData: illegal type: %s",
+ OSL_TRACE("SfxDocumentMetaData: illegal type: %s",
OUStringToOString(name, RTL_TEXTENCODING_UTF8).getStr());
} catch (css::lang::IllegalArgumentException &) {
- DBG_ERROR1("SfxDocumentMetaData: illegal arg: %s",
+ OSL_TRACE("SfxDocumentMetaData: illegal arg: %s",
OUStringToOString(name, RTL_TEXTENCODING_UTF8).getStr());
}
}
diff --git a/sfx2/source/doc/doc.src b/sfx2/source/doc/doc.src
index c13ae3d5ecd1..bb72e07691b6 100755
--- a/sfx2/source/doc/doc.src
+++ b/sfx2/source/doc/doc.src
@@ -288,7 +288,7 @@ String STR_FSET_FILTERNAME0
};
String STR_FSET_FILTERNAME1
{
- // nur 'Dokument' "ubersetzen - only translate 'Document'
+ // only translate 'Document'
Text [ en-US ] = "%PRODUCTNAME Frame Document" ;
};
String STR_TEMPL_MOVED
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index c0e5bba2803b..45c03df2a644 100755
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -78,8 +78,8 @@ DBG_NAME(SfxObjectFactory)
struct SfxObjectFactory_Impl
{
- SfxViewFactoryArr_Impl aViewFactoryArr;// Liste von <SfxViewFactory>s
- SfxFilterArr_Impl aFilterArr; // Liste von <SFxFilter>n
+ SfxViewFactoryArr_Impl aViewFactoryArr;// List of <SfxViewFactory>s
+ SfxFilterArr_Impl aFilterArr; // List of <SFxFilter>n
ResId* pNameResId;
::rtl::OUString aServiceName;
SfxFilterContainer* pFilterContainer;
@@ -168,7 +168,7 @@ void SfxObjectFactory::RegisterViewFactory
ByteString sMessage( "SfxObjectFactory::RegisterViewFactory: duplicate view name '" );
sMessage += ByteString( sViewName, RTL_TEXTENCODING_ASCII_US );
sMessage += "'!";
- OSL_ENSURE( false, sMessage.GetBuffer() );
+ OSL_FAIL( sMessage.GetBuffer() );
break;
}
}
@@ -370,7 +370,7 @@ const SfxFilter* SfxObjectFactory::GetTemplateFilter() const
void SfxObjectFactory::SetDocumentTypeNameResource( const ResId& rId )
{
- DBG_ASSERT( !pImpl->pNameResId, "UI-Namensresource mehrfach gesetzt!" );
+ DBG_ASSERT( !pImpl->pNameResId, "UI-Name resource set multiple times!" );
pImpl->pNameResId = new ResId( rId );
}
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 695d3af6e31f..31630d8d825a 100755
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -1355,13 +1355,13 @@ uno::Reference < embed::XStorage > SfxMedium::GetStorage( sal_Bool bCreateTempIf
sal_Bool bResetStorage = sal_False;
if ( pVersion && pVersion->GetValue() )
{
- // Alle verf"ugbaren Versionen einlesen
+ // Read all available versions
if ( pImp->aVersions.getLength() )
{
- // Die zum Kommentar passende Version suchen
- // Die Versionen sind von 1 an durchnumeriert, mit negativen
- // Versionsnummern werden die Versionen von der aktuellen aus
- // r"uckw"arts gez"ahlt
+ // Search for the version fits the comment
+ // The versions are numbered startign with 1, versions with
+ // negative versions numbers are counted backwards from the
+ // current version
short nVersion = pVersion ? pVersion->GetValue() : 0;
if ( nVersion<0 )
nVersion = ( (short) pImp->aVersions.getLength() ) + nVersion;
@@ -1370,18 +1370,18 @@ uno::Reference < embed::XStorage > SfxMedium::GetStorage( sal_Bool bCreateTempIf
util::RevisionTag& rTag = pImp->aVersions[nVersion];
{
- // SubStorage f"ur alle Versionen "offnen
+ // Open SubStorage for all versions
uno::Reference < embed::XStorage > xSub = pImp->xStorage->openStorageElement( DEFINE_CONST_UNICODE( "Versions" ),
embed::ElementModes::READ );
- DBG_ASSERT( xSub.is(), "Versionsliste, aber keine Versionen!" );
+ DBG_ASSERT( xSub.is(), "Version list, but no Versions!" );
- // Dort ist die Version als gepackter Stream gespeichert
+ // There the version is stored as packed Stream
uno::Reference < io::XStream > xStr = xSub->openStreamElement( rTag.Identifier, embed::ElementModes::READ );
SvStream* pStream = utl::UcbStreamHelper::CreateStream( xStr );
if ( pStream && pStream->GetError() == SVSTREAM_OK )
{
- // Stream ins TempDir auspacken
+ // Unpack Stream in TempDir
::utl::TempFile aTempFile;
String aTmpName = aTempFile.GetURL();
SvFileStream aTmpStream( aTmpName, SFX_STREAM_READWRITE );
@@ -1389,7 +1389,7 @@ uno::Reference < embed::XStorage > SfxMedium::GetStorage( sal_Bool bCreateTempIf
*pStream >> aTmpStream;
aTmpStream.Close();
- // Datei als Storage "offnen
+ // Open data as Storage
nStorOpenMode = SFX_STREAM_READONLY;
pImp->xStorage = comphelper::OStorageHelper::GetStorageFromURL( aTmpName, embed::ElementModes::READ );
pImp->bStorageBasedOnInStream = sal_False;
@@ -2414,10 +2414,10 @@ void SfxMedium::DownLoad( const Link& aLink )
//------------------------------------------------------------------
void SfxMedium::Init_Impl()
-/* [Beschreibung]
- Setzt in den Logischen Namen eine gueltige ::com::sun::star::util::URL (Falls zuvor ein Filename
- drin war) und setzt den physikalschen Namen auf den Filenamen, falls
- vorhanden.
+/* [Description]
+ Includes a valid:: sun:: com:: star:: util:: URL (If a file name was
+ previously in there) in the logical name and if available sets the
+ physical name as the file name.
*/
{
@@ -2515,7 +2515,7 @@ SfxMedium::SfxMedium( const SfxMedium& rMedium, sal_Bool bTemporary )
aName = rMedium.aName;
pImp->bIsTemp = bTemporary;
- DBG_ASSERT( ! rMedium.pImp->bIsTemp, "Temporaeres Medium darf nicht kopiert werden" );
+ DBG_ASSERT( ! rMedium.pImp->bIsTemp, "Temporary Medium may not be copied" );
aLogicName = rMedium.aLogicName;
pSet = rMedium.GetItemSet() ? new SfxItemSet(*rMedium.GetItemSet()) : 0;
pFilter = rMedium.pFilter;
@@ -2773,8 +2773,8 @@ void SfxMedium::SetIsRemote_Impl()
break;
}
- // Da Dateien, die Remote geschrieben werden zur Uebertragung auch
- // gelesen werden koennen muessen
+ // As files that are written to the remote transmission must also be able
+ // to be read.
if( bRemote )
nStorOpenMode |= STREAM_READ;
}
@@ -3202,7 +3202,7 @@ sal_uInt16 SfxMedium::AddVersion_Impl( util::RevisionTag& rRevision )
{
if ( GetStorage().is() )
{
- // Einen eindeutigen Namen f"ur den Stream ermitteln
+ // To determine a unique name for the stream
SvULongs aLongs;
sal_Int32 nLength = pImp->aVersions.getLength();
for ( sal_Int32 m=0; m<nLength; m++ )
diff --git a/sfx2/source/doc/doctdlg.cxx b/sfx2/source/doc/doctdlg.cxx
index 3d5cf41708c3..222cfaf328e7 100755
--- a/sfx2/source/doc/doctdlg.cxx
+++ b/sfx2/source/doc/doctdlg.cxx
@@ -159,7 +159,7 @@ IMPL_LINK( SfxDocumentTemplateDlg, OrganizeHdl, Button *, pButton )
IMPL_LINK( SfxDocumentTemplateDlg, OkHdl, Control *, pControl )
{
(void)pControl; //unused
- // pruefen, ob eine Vorlage diesen Namens existiert
+ // Test whether a template with this name exists
if(LISTBOX_ENTRY_NOTFOUND != aTemplateLb.GetEntryPos(
GetTemplateName())) {
QueryBox aQuery(this, SfxResId(MSG_CONFIRM_OVERWRITE_TEMPLATE));
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index d461b3a17fe0..d28d0e6c5c72 100755
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -318,15 +318,14 @@ static sal_Bool getTextProperty_Impl( Content& rContent,
String SfxDocumentTemplates::GetFullRegionName
(
- sal_uInt16 nIdx // Index des Bereiches
+ sal_uInt16 nIdx // Region Index
) const
-/* [Beschreibung]
+/* [Description]
- Liefert den logischen Namen eines Bereiches Plus seinem Pfad
+ Returns the logical name of a region and its path
-
- [R"uckgabewert] Referenz auf diesen Namen
+ [Return value] Reference to the Region name
*/
@@ -355,17 +354,16 @@ String SfxDocumentTemplates::GetFullRegionName
const String& SfxDocumentTemplates::GetRegionName
(
- sal_uInt16 nIdx // Index des Bereiches
+ sal_uInt16 nIdx // Region Index
) const
-/* [Beschreibung]
-
- Liefert den logischen Namen eines Bereiches
+/* [Description]
+ Returns the logical name of a region
- [R"uckgabewert]
+ [Return value]
- const String& Referenz auf diesen Namen
+ const String& Reference to the Region name
*/
{
@@ -393,17 +391,16 @@ const String& SfxDocumentTemplates::GetRegionName
sal_uInt16 SfxDocumentTemplates::GetRegionNo
(
- const String &rRegion // Name der Region
+ const String &rRegion // Region Name
) const
-/* [Beschreibung]
+/* [Description]
- Liefert den Index f"ur einen logischen Namen eines Bereiches.
+ Returns the Index for a logical Region Name.
+ [Return value]
- [R"uckgabewert]
-
- sal_uInt16 Index von 'rRegion' oder USHRT_MAX falls unbekannt
+ sal_uInt16 Index of 'rRegion' or USHRT_MAX if unknown
*/
{
@@ -426,15 +423,13 @@ sal_uInt16 SfxDocumentTemplates::GetRegionNo
sal_uInt16 SfxDocumentTemplates::GetRegionCount() const
-/* [Beschreibung]
-
- Liefert die Anzahl der Bereiche
+/* [Description]
+ Returns the number of Regions
- [R"uckgabewert]
-
- sal_uInt16 Anzahl der Bereiche
+ [Return value]
+ sal_uInt16 Number of Regions
*/
{
DocTemplLocker_Impl aLocker( *pImp );
@@ -468,20 +463,18 @@ sal_Bool SfxDocumentTemplates::IsRegionLoaded( sal_uInt16 nIdx ) const
sal_uInt16 SfxDocumentTemplates::GetCount
(
- const String& rName /* Name des Bereiches, dessen Eintrags-
- anzahl ermittelt werden soll */
+ const String& rName /* Region Name, for which the entries
+ should be counted */
) const
-/* [Beschreibung]
-
- Liefert die Anzahl der Eintr"age eines Bereiches
-
+/* [Description]
- [R"uckgabewert]
+ Number of entries in Region
- USHORT Anzahl der Eintr"age
+ [Return value]
+ sal_uInt16 Number of entries
*/
{
@@ -503,18 +496,16 @@ sal_uInt16 SfxDocumentTemplates::GetCount
sal_uInt16 SfxDocumentTemplates::GetCount
(
- sal_uInt16 nRegion /* Index des Bereiches, dessen Eintrags-
- anzahl ermittelt werden soll */
+ sal_uInt16 nRegion /* Region index whose number is
+ to be determined */
) const
-/* [Beschreibung]
+/* [Description]
- Liefert die Anzahl der Eintr"age eines Bereiches
-
-
- [R"uckgabewert] Anzahl der Eintr"age
+ Number of entries in Region
+ [Return value] Number of entries
*/
{
@@ -536,19 +527,17 @@ sal_uInt16 SfxDocumentTemplates::GetCount
const String& SfxDocumentTemplates::GetName
(
- sal_uInt16 nRegion, // Index des Bereiches, in dem der Eintrag liegt
- sal_uInt16 nIdx // Index des Eintrags
+ sal_uInt16 nRegion, // Region Index, in which the entry lies
+ sal_uInt16 nIdx // Index of the entry
) const
-/* [Beschreibung]
-
- Liefert den logischen Namen eines Eintrags eines Bereiches
+/* [Description]
+ Returns the logical name of an entry in Region
- [R"uckgabewert]
-
- const String& Name des Eintrags
+ [Return value]
+ const String& Entry Name
*/
{
@@ -579,16 +568,15 @@ const String& SfxDocumentTemplates::GetName
String SfxDocumentTemplates::GetFileName
(
- sal_uInt16 nRegion, // Index des Bereiches, in dem der Eintrag liegt
- sal_uInt16 nIdx // Index des Eintrags
+ sal_uInt16 nRegion, // Region Index, in which the entry lies
+ sal_uInt16 nIdx // Index of the entry
) const
-/* [Beschreibung]
-
- Liefert den Dateinamen eines Eintrags eines Bereiches
+/* [Description]
- [R"uckgabewert] Dateiname des Eintrags
+ Returns the file name of an entry in Region
+ [Return value] File name of the entry
*/
{
DocTemplLocker_Impl aLocker( *pImp );
@@ -616,20 +604,17 @@ String SfxDocumentTemplates::GetFileName
String SfxDocumentTemplates::GetPath
(
- sal_uInt16 nRegion, // Index des Bereiches, in dem der Eintrag liegt
- sal_uInt16 nIdx // Index des Eintrags
+ sal_uInt16 nRegion, // Region Index, in which the entry lies
+ sal_uInt16 nIdx // Index of the entry
) const
-/* [Beschreibung]
-
- Liefert den Dateinamen mit vollst"andigem Pfad zu der einem
- Eintrag zugeordneten Datei
+/* [Description]
+ Returns the file name with full path to the file assigned to an entry
- [R"uckgabewert]
-
- String Dateiname mit vollst"andigem Pfad
+ [Return value]
+ String File name with full path
*/
{
DocTemplLocker_Impl aLocker( *pImp );
@@ -653,20 +638,17 @@ String SfxDocumentTemplates::GetPath
String SfxDocumentTemplates::GetTemplatePath
(
- sal_uInt16 nRegion, // Index des Bereiches, in dem der Eintrag liegt
- const String& rLongName // logischer Name des Eintrags
+ sal_uInt16 nRegion, // Region Index, in which the entry lies
+ const String& rLongName // logical Entry Name
) const
-/* [Beschreibung]
-
- Liefert den Dateinamen mit vollst"andigem Pfad zu der einem
- Eintrag zugeordneten Datei
-
+/* [Description]
- [R"uckgabewert]
+ Returns the file name with full path to the file assigned to an entry
- String Dateiname mit vollst"andigem Pfad
+ [Return value]
+ String File name with full path
*/
{
DocTemplLocker_Impl aLocker( *pImp );
@@ -713,15 +695,13 @@ String SfxDocumentTemplates::GetDefaultTemplatePath
const String& rLongName
)
-/* [Beschreibung]
+/* [Description]
- Liefert den Standardpfad zu Dokumentvorlagen
+ Returns the default location for templates
+ [Return value]
- [R"uckgabewert]
-
- String Standardpfad zu Dokumentvorlagen
-
+ String Default location for templates
*/
{
DocTemplLocker_Impl aLocker( *pImp );
@@ -797,22 +777,17 @@ String SfxDocumentTemplates::GetDefaultTemplatePath
sal_Bool SfxDocumentTemplates::SaveDir
(
-// SfxTemplateDir& rDir // das zu speichernde Directory
+// SfxTemplateDir& rDir // Save Directory
)
-/* [Beschreibung]
-
- Speichert das Directory rDir
+/* [Description]
+ Saves the Directory rDir
- [R"uckgabewert]
-
- sal_Bool sal_False,
- Schreibfehler
-
- sal_True
- gespeichert
+ [Return value]
+ sal_Bool sal_False, Write error
+ sal_True, Saved
*/
{
@@ -823,19 +798,17 @@ sal_Bool SfxDocumentTemplates::SaveDir
void SfxDocumentTemplates::NewTemplate
(
- sal_uInt16 nRegion, /* Index des Bereiches, in dem die Vorlage
- angelegt werden soll */
+ sal_uInt16 nRegion, /* Region Index, in which the template
+ should be applied */
- const String& rLongName, // logischer Name der neuen Vorlage
- const String& rFileName // Dateiname der neuen Vorlage
+ const String& rLongName, // logical name of the new template
+ const String& rFileName // File name of the new template
)
-/* [Beschreibung]
-
- Eintragen einer neuen Dokumentvorlage in die Verwaltungsstrukturen
- Das "Uberschreiben einer Vorlage gleichen Namens wird
- verhindert (!! Fehlermeldung)
+/* [Description]
+ Submit a new template in the administrative structures
+ overwriting a template of the same name is prevented (! Error message)
*/
{
@@ -867,26 +840,23 @@ void SfxDocumentTemplates::NewTemplate
sal_Bool SfxDocumentTemplates::CopyOrMove
(
- sal_uInt16 nTargetRegion, // Index des Zielbereiches
- sal_uInt16 nTargetIdx, // Index Zielposition
- sal_uInt16 nSourceRegion, // Index des Quellbereiches
- sal_uInt16 nSourceIdx, /* Index der zu kopierenden / zu verschiebenden
- Dokumentvorlage */
- sal_Bool bMove // kopieren / verschieben
+ sal_uInt16 nTargetRegion, // Target Region Index
+ sal_uInt16 nTargetIdx, // Target position Index
+ sal_uInt16 nSourceRegion, // Source Region Index
+ sal_uInt16 nSourceIdx, /* Index to be copied / to moved template */
+ sal_Bool bMove // Copy / Move
)
-/* [Beschreibung]
+/* [Description]
- Kopieren oder Verschieben einer Dokumentvorlage
+ Copy or move a document template
- [R"uckgabewert]
+ [Return value]
- sal_Bool sal_True
- Aktion konnte ausgef"uhrt werden
+ sal_Bool sal_True, Action could be performed
+ sal_False, Action could not be performed
- sal_False
- Aktion konnte nicht ausgef2uhrt werden
- [Querverweise]
+ [Cross-references]
<SfxDocumentTemplates::Move(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16)>
<SfxDocumentTemplates::Copy(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16)>
@@ -962,15 +932,15 @@ sal_Bool SfxDocumentTemplates::CopyOrMove
}
}
- // todo: fix SfxDocumentTemplates to handle size_t instead of USHORT
+ // todo: fix SfxDocumentTemplates to handle size_t instead of sal_uInt16
size_t temp_nTargetIdx = nTargetIdx;
pTargetRgn->AddEntry( aTitle, aNewTargetURL, &temp_nTargetIdx );
return sal_True;
}
- // --**-- wenn aktuell das File geoeffnet ist,
- // muss es hinterher wieder geoeffnet werden
+ // --**-- if the current file is opened,
+ // it must be re-opened afterwards.
return sal_False;
}
@@ -979,27 +949,22 @@ sal_Bool SfxDocumentTemplates::CopyOrMove
sal_Bool SfxDocumentTemplates::Move
(
- sal_uInt16 nTargetRegion, // Index des Zielbereiches
- sal_uInt16 nTargetIdx, // Index Zielposition
- sal_uInt16 nSourceRegion, // Index des Quellbereiches
- sal_uInt16 nSourceIdx /* Index der zu kopierenden / zu verschiebenden
- Dokumentvorlage */
+ sal_uInt16 nTargetRegion, // Target Region Index
+ sal_uInt16 nTargetIdx, // Target position Index
+ sal_uInt16 nSourceRegion, // Source Region Index
+ sal_uInt16 nSourceIdx /* Index to be copied / to moved template */
)
-/* [Beschreibung]
+/* [Description]
- Verschieben einer Dokumentvorlage
+ Moving a template
+ [Return value]
- [R"uckgabewert]
+ sal_Bool sal_True, Action could be performed
+ sal_False, Action could not be performed
- sal_Bool sal_True
- Aktion konnte ausgef"uhrt werden
-
- sal_False
- Aktion konnte nicht ausgef2uhrt werden
-
- [Querverweise]
+ [Cross-references]
<SfxDocumentTemplates::CopyOrMove(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16,sal_Bool)>
*/
@@ -1014,27 +979,22 @@ sal_Bool SfxDocumentTemplates::Move
sal_Bool SfxDocumentTemplates::Copy
(
- sal_uInt16 nTargetRegion, // Index des Zielbereiches
- sal_uInt16 nTargetIdx, // Index Zielposition
- sal_uInt16 nSourceRegion, // Index des Quellbereiches
- sal_uInt16 nSourceIdx /* Index der zu kopierenden / zu verschiebenden
- Dokumentvorlage */
+ sal_uInt16 nTargetRegion, // Target Region Index
+ sal_uInt16 nTargetIdx, // Target position Index
+ sal_uInt16 nSourceRegion, // Source Region Index
+ sal_uInt16 nSourceIdx /* Index to be copied / to moved template */
)
-/* [Beschreibung]
-
- Kopieren einer Dokumentvorlage
+/* [Description]
+ Copying a template
- [R"uckgabewert]
+ [Return value]
- sal_Bool sal_True
- Aktion konnte ausgef"uhrt werden
+ sal_Bool sal_True, Action could be performed
+ sal_False, Action could not be performed
- sal_False
- Aktion konnte nicht ausgef"uhrt werden
-
- [Querverweise]
+ [Cross-references]
<SfxDocumentTemplates::CopyOrMove(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16,sal_Bool)>
*/
@@ -1050,29 +1010,22 @@ sal_Bool SfxDocumentTemplates::Copy
sal_Bool SfxDocumentTemplates::CopyTo
(
- sal_uInt16 nRegion, /* Bereich der Vorlage, die exportiert werden
- soll */
- sal_uInt16 nIdx, /* Index der Vorlage, die exportiert werden
- soll */
- const String& rName /* Dateiname, unter dem die Vorlage angelegt
- werden soll */
+ sal_uInt16 nRegion, // Region of the template to be exported
+ sal_uInt16 nIdx, // Index of the template to be exported
+ const String& rName /* File name under which the template is to
+ be created */
) const
-/* [Beschreibung]
-
- Exportieren einer Dokumentvorlage in das Dateisystem
-
-
- [R"uckgabewert]
+/* [Description]
- sal_Bool sal_True
- Aktion konnte ausgef"uhrt werden
+ Exporting a template into the file system
- sal_False
- Aktion konnte nicht ausgef"uhrt werden
+ [Return value]
+ sal_Bool sal_True, Action could be performed
+ sal_False, Action could not be performed
- [Querverweise]
+ [Cross-references]
<SfxDocumentTemplates::CopyFrom(sal_uInt16,sal_uInt16,String&)>
*/
@@ -1129,29 +1082,25 @@ sal_Bool SfxDocumentTemplates::CopyTo
sal_Bool SfxDocumentTemplates::CopyFrom
(
- sal_uInt16 nRegion, /* Bereich, in den die Vorlage importiert
- werden soll */
- sal_uInt16 nIdx, // Index der neuen Vorlage in diesem Bereich
- String& rName /* Dateiname der Vorlage, die importiert
- werden soll, als out-Parameter der (auto-
- matisch aus dem Dateinamen generierte)
- logische Name der Vorlage */
+ sal_uInt16 nRegion, /* Region in which the template is to be
+ imported */
+ sal_uInt16 nIdx, // Index of the new template in this Region
+ String& rName /* File name of the template to be imported
+ as an out parameter of the (automatically
+ generated from the file name) logical name
+ of the template */
)
-/* [Beschreibung]
+/* [Description]
- Importieren einer Dokumentvorlage aus dem Dateisystem
+ Import a template from the file system
+ [Return value] Sucess (sal_True) or serfpTargetDirectory->GetContent());
- [R"uckgabewert] Erfolg (sal_True) oder Mi"serfpTargetDirectory->GetContent());
+ sal_Bool sal_True, Action could be performed
+ sal_False, Action could not be performed
- sal_Bool sal_True
- Aktion konnte ausgef"uhrt werden
-
- sal_False
- Aktion konnte nicht ausgef"uhrt werden
-
- [Querverweise]
+ [Cross-references]
<SfxDocumentTemplates::CopyTo(sal_uInt16,sal_uInt16,const String&)>
*/
@@ -1256,7 +1205,7 @@ sal_Bool SfxDocumentTemplates::CopyFrom
else
nIdx += 1;
- // todo: fix SfxDocumentTemplates to handle size_t instead of USHORT
+ // todo: fix SfxDocumentTemplates to handle size_t instead of sal_uInt16
size_t temp_nIdx = nIdx;
pTargetRgn->AddEntry( aTitle, aTemplName, &temp_nIdx );
rName = aTitle;
@@ -1280,26 +1229,21 @@ sal_Bool SfxDocumentTemplates::CopyFrom
sal_Bool SfxDocumentTemplates::Delete
(
- sal_uInt16 nRegion, // Index des Bereiches
- sal_uInt16 nIdx /* Index des Eintrags oder USHRT_MAX,
- wenn ein Verzeichnis gemeint ist. */
+ sal_uInt16 nRegion, // Region Index
+ sal_uInt16 nIdx /* Index of the entry or USHRT_MAX,
+ if a directory is meant. */
)
-/* [Beschreibung]
-
- "oschen eines Eintrags oder eines Verzeichnisses
+/* [Description]
+ Deleting an entry or a directory
- [R"uckgabewert]
+ [Return value]
- sal_Bool sal_True
- Aktion konnte ausgef"uhrt werden
+ sal_Bool sal_True, Action could be performed
+ sal_False, Action could not be performed
- sal_False
- Aktion konnte nicht ausgef"uhrt werden
-
-
- [Querverweise]
+ [Cross-references]
<SfxDocumentTemplates::InsertDir(const String&,sal_uInt16)>
<SfxDocumentTemplates::KillDir(SfxTemplateDir&)>
@@ -1350,24 +1294,20 @@ sal_Bool SfxDocumentTemplates::Delete
sal_Bool SfxDocumentTemplates::InsertDir
(
- const String& rText, // der logische Name des neuen Bereiches
- sal_uInt16 nRegion // Index des Bereiches
+ const String& rText, // the logical name of the new Region
+ sal_uInt16 nRegion // Region Index
)
-/* [Beschreibung]
-
- Einf"ugen eines Verzeichnisses
+/* [Description]
+ Insert an index
- [R"uckgabewert]
+ [Return value]
- sal_Bool sal_True
- Aktion konnte ausgef"uhrt werden
+ sal_Bool sal_True, Action could be performed
+ sal_False, Action could not be performed
- sal_False
- Aktion konnte nicht ausgef"uhrt werden
-
- [Querverweise]
+ [Cross-references]
<SfxDocumentTemplates::KillDir(SfxTemplateDir&)>
<SfxDocumentTemplates::SaveDir(SfxTemplateDir&)>
@@ -1405,23 +1345,19 @@ sal_Bool SfxDocumentTemplates::InsertDir
sal_Bool SfxDocumentTemplates::SetName
(
const String& rName, // Der zu setzende Name
- sal_uInt16 nRegion, // Index des Bereiches
- sal_uInt16 nIdx /* Index des Eintrags oder USHRT_MAX,
- wenn ein Verzeichnis gemeint ist. */
+ sal_uInt16 nRegion, // Region Index
+ sal_uInt16 nIdx /* Index of the entry oder USHRT_MAX,
+ if a directory is meant. */
)
-/* [Beschreibung]
-
- "Andern des Namens eines Eintrags oder eines Verzeichnisses
-
+/* [Description]
- [R"uckgabewert]
+ Change the name of an entry or a directory
- sal_Bool sal_True
- Aktion konnte ausgef"uhrt werden
+ [Return value]
- sal_False
- Aktion konnte nicht ausgef"uhrt werden
+ sal_Bool sal_True, Action could be performed
+ sal_False, Action could not be performed
*/
@@ -1482,24 +1418,18 @@ sal_Bool SfxDocumentTemplates::SetName
sal_Bool SfxDocumentTemplates::Rescan()
-/* [Beschreibung]
+/* [Description]
- Abgleich des Verwaltungsdaten mit dem aktuellen Zustand auf der Platte.
- Die logischen Namen, zu denen keine Datei mit existiert, werden aus
- der Verwaltungsstruktur entfernt; Dateien, zu denen kein Eintrag
- existiert, werden aufgenommen.
+ Comparison of administrative data with the current state on disk.
+ The logical name for which no file exists, will be removed from the
+ administrative structure. Files for which no record exists will be included.
+ [Return value]
- [R"uckgabewert]
+ sal_Bool sal_True, Action could be performed
+ sal_False, Action could not be performed
- sal_Bool sal_True
- Aktion konnte ausgef"uhrt werden
-
- sal_False
- Aktion konnte nicht ausgef"uhrt werden
-
-
- [Querverweise]
+ [Cross-references]
<SfxTemplateDir::Scan(sal_Bool bDirectory, sal_Bool bSave)>
<SfxTemplateDir::Freshen(const SfxTemplateDir &rNew)>
@@ -1517,21 +1447,19 @@ sal_Bool SfxDocumentTemplates::Rescan()
SfxObjectShellRef SfxDocumentTemplates::CreateObjectShell
(
- sal_uInt16 nRegion, // Index des Bereiches
- sal_uInt16 nIdx // Index des Eintrags
+ sal_uInt16 nRegion, // Region Index
+ sal_uInt16 nIdx // Index of the entry
)
-/* [Beschreibung]
+/* [Description]
- Zugriff auf die DokumentShell eines Eintrags
+ Access to the document shell of an entry
+ [Return value]
- [R"uckgabewert]
+ SfxObjectShellRef Referece to the ObjectShell
- SfxObjectShellRef Referenz auf die ObjectShell
-
-
- [Querverweise]
+ [Cross-references]
<SfxTemplateDirEntry::CreateObjectShell()>
<SfxDocumentTemplates::DeleteObjectShell(sal_uInt16, sal_uInt16)>
@@ -1559,24 +1487,20 @@ SfxObjectShellRef SfxDocumentTemplates::CreateObjectShell
sal_Bool SfxDocumentTemplates::DeleteObjectShell
(
- sal_uInt16 nRegion, // Index des Bereiches
- sal_uInt16 nIdx // Index des Eintrags
+ sal_uInt16 nRegion, // Region Index
+ sal_uInt16 nIdx // Index of the entry
)
-/* [Beschreibung]
-
- Freigeben der ObjectShell eines Eintrags
+/* [Description]
+ Releasing the ObjectShell of an entry
- [R"uckgabewert]
+ [Return value]
- sal_Bool sal_True
- Aktion konnte ausgef"uhrt werden
+ sal_Bool sal_True, Action could be performed
+ sal_False, Action could not be performed
- sal_False
- Aktion konnte nicht ausgef"uhrt werden
-
- [Querverweise]
+ [Cross-references]
<SfxTemplateDirEntry::DeleteObjectShell()>
<SfxDocumentTemplates::CreateObjectShell(sal_uInt16, sal_uInt16)>
@@ -1604,27 +1528,21 @@ sal_Bool SfxDocumentTemplates::DeleteObjectShell
sal_Bool SfxDocumentTemplates::GetFull
(
- const String &rRegion, // Der Name des Bereiches
- const String &rName, // Der Name der Vorlage
- String &rPath // Out: Pfad + Dateiname
+ const String &rRegion, // Region Name
+ const String &rName, // Template Name
+ String &rPath // Out: Path + File name
)
-/* [Beschreibung]
-
- Liefert Pfad + Dateiname zu der durch rRegion und rName bezeichneten
- Vorlage
-
+/* [Description]
- [R"uckgabewert]
+ Returns Path + File name of the template specified by rRegion and rName.
- sal_Bool sal_True
- Aktion konnte ausgef"uhrt werden
+ [Return value]
- sal_False
- Aktion konnte nicht ausgef"uhrt werden
+ sal_Bool sal_True, Action could be performed
+ sal_False, Action could not be performed
-
- [Querverweise]
+ [Cross-references]
<SfxDocumentTemplates::GetLogicNames(const String&,String&,String&)>
*/
@@ -1666,26 +1584,21 @@ sal_Bool SfxDocumentTemplates::GetFull
sal_Bool SfxDocumentTemplates::GetLogicNames
(
- const String &rPath, // vollst"andiger Pfad zu der Vorlage
- String &rRegion, // Out: der Bereichsname
- String &rName // Out: der Vorlagenname
+ const String &rPath, // Full Path to the template
+ String &rRegion, // Out: Region name
+ String &rName // Out: Template name
) const
-/* [Beschreibung]
-
- Liefert Pfad und logischen Namen zu der durch rPath bezeichneten
- Vorlage
-
- [R"uckgabewert]
+/* [Description]
- sal_Bool sal_True
- Aktion konnte ausgef"uhrt werden
+ Returns and logical path name to the template specified by rPath
- sal_False
- Aktion konnte nicht ausgef"uhrt werden
+ [Return value]
+ sal_Bool sal_True, Action could be performed
+ sal_False, Action could not be performed
- [Querverweise]
+ [Cross-references]
<SfxDocumentTemplates::GetFull(const String&,const String&,DirEntry&)>
*/
@@ -1739,9 +1652,9 @@ sal_Bool SfxDocumentTemplates::GetLogicNames
SfxDocumentTemplates::SfxDocumentTemplates()
-/* [Beschreibung]
+/* [Description]
- Konstruktor
+ Constructor
*/
{
if ( !gpTemplateData )
@@ -1754,7 +1667,7 @@ SfxDocumentTemplates::SfxDocumentTemplates()
void SfxDocumentTemplates::Construct()
-// verz"ogerter Aufbau der Verwaltungsdaten
+// Delayed build-up of administrative data
{
}
@@ -1763,10 +1676,10 @@ void SfxDocumentTemplates::Construct()
SfxDocumentTemplates::~SfxDocumentTemplates()
-/* [Beschreibung]
+/* [Description]
- Destruktor
- Freigeben der Verwaltungsdaten
+ Destructor
+ Release of administrative data
*/
{
@@ -1926,7 +1839,7 @@ sal_Bool DocTempl_EntryData_Impl::DeleteObjectShell()
{
if( mxObjShell->IsModified() )
{
- //Hier speichern wir auch, falls die Vorlage in Bearbeitung ist...
+ // Here we also save, if the Template is being processed ...
bRet = sal_False;
if ( mbIsOwner )
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 08d7e2b8a404..b7dfff9da835 100755
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -279,7 +279,7 @@ public:
~SfxDocTplService_Impl();
sal_Bool init() { if ( !mbIsInitialized ) init_Impl(); return mbIsInitialized; }
- Content getContent() { return maRootContent; }
+ Content getContent() const { return maRootContent; }
void setLocale( const Locale & rLocale );
Locale getLocale();
@@ -456,7 +456,7 @@ void SfxDocTplService_Impl::init_Impl()
mxInfo = uno::Reference< XStandaloneDocumentInfo > (
mxFactory->createInstance( aService ), UNO_QUERY );
} catch (uno::RuntimeException &) {
- OSL_ENSURE(false, "SfxDocTplService_Impl::init_Impl: "
+ OSL_FAIL("SfxDocTplService_Impl::init_Impl: "
"cannot create DocumentProperties service");
}
@@ -1038,7 +1038,7 @@ sal_Bool SfxDocTplService_Impl::setProperty( Content& rContent,
}
else
{
- OSL_ENSURE( false, "Unsupported property value type" );
+ OSL_FAIL( "Unsupported property value type" );
}
}
}
@@ -1099,7 +1099,7 @@ sal_Bool SfxDocTplService_Impl::getProperty( Content& rContent,
}
else
{
- OSL_ENSURE( false, "Unsupported property value type" );
+ OSL_FAIL( "Unsupported property value type" );
}
}
}
diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx
index b714b5816790..425470219a2c 100755
--- a/sfx2/source/doc/docvor.cxx
+++ b/sfx2/source/doc/docvor.cxx
@@ -231,8 +231,8 @@ SfxOrganizeDlg_Impl::SfxOrganizeDlg_Impl( SfxTemplateOrganizeDlg* pParent,
const_cast< SfxDocumentTemplates* >( aMgr.GetTemplates() )->Update( sal_True /* be smart */ );
// this const_cast is a hack - but the alternative would be to
// * have a method which returns the templates non-const
- // * use a new SfxDocumentTemplates instance for the update (knowing that they all share the same
- // implementation class)
+ // * use a new SfxDocumentTemplates instance for the update
+ // (knowing that they all share the same implementation class)
// * always work with an own instance, even if we get only NULL in this ctor
}
@@ -325,12 +325,12 @@ void SfxOrganizeDlg_Impl::InitBitmaps( void )
//=========================================================================
-sal_Bool QueryDelete_Impl(Window *pParent, // Parent der QueryBox
+sal_Bool QueryDelete_Impl(Window *pParent, // Parent to QueryBox
sal_uInt16 nId, // Resource Id
- const String &rTemplateName) // Name der zu l"oschenden Vorlage
-/* [Beschreibung]
+ const String &rTemplateName) // Name of template to be deleted
+/* [Description]
- "oschabfrage
+ Delete Query
*/
{
@@ -345,10 +345,9 @@ sal_Bool QueryDelete_Impl(Window *pParent, // Parent der QueryBox
void ErrorDelete_Impl(Window *pParent, const String &rName, sal_Bool bFolder = sal_False )
-/* [Beschreibung]
-
- Benutzerinformation, da"s die Vorlage rName nicht gel"oscht werden konnte
+/* [Description]
+ User information that the template rName could not be deleted.
*/
{
if ( bFolder )
@@ -367,10 +366,9 @@ void ErrorDelete_Impl(Window *pParent, const String &rName, sal_Bool bFolder = s
//=========================================================================
-/* [Beschreibung]
-
- Implementierungsklasse; Referenzklasse f"ur USHORT-Array
+/* [Description]
+ Implementation class, the benchmark for sal_uInt16-Array
*/
struct ImpPath_Impl
@@ -404,12 +402,11 @@ ImpPath_Impl::ImpPath_Impl( const ImpPath_Impl& rCopy ) :
//==========================================================================
-/* [Beschreibung]
-
- Implementierungsklasse; Darstellung einer Position in der Outline-
- Listbox als sal_uInt16-Array; dieses beschreibt die Position jeweil
- als relative Postion zum "ubergeordneten Eintrag
+/* [Description]
+ Implementation class, presentation of a position in the Outline-
+ Listbox ass sal_uInt16-Array, this describes the position of each as
+ Postions relative to the parent entry
*/
class Path
{
@@ -468,25 +465,24 @@ SvLBoxEntry *GetIndices_Impl(SvLBox *pBox,
SvLBoxEntry *pEntry,
sal_uInt16 &rRegion,
sal_uInt16 &rOffset)
-/* [Beschreibung]
+/* [Description]
- Bereich und Position innerhalb eines Bereiches f"ur eine
- Dokumentvorlage wird ermittelt.
+ Region and position within a range for a template is determined.
[Parameter]
- SvLBox *pBox Listbox, an der das Ereignis auftrat
- SvLBoxEntry *pEntry Eintrag, dessen Position ermittelt werden soll
- sal_uInt16 &rRegion der Bereich innerhalb der Bereiche der
- Dokumentvorlagen (Out-Parameter)
- sal_uInt16 &rOffset die Position innerhalb des Bereiches
- Dokumentvorlagen (Out-Parameter)
+ SvLBox *pBox Listbox where the event occurred
+ SvLBoxEntry *pEntry Entry whose position is to be determined
+ sal_uInt16 &rRegion the region within the region of the
+ document template (Out-Parameter)
+ sal_uInt16 &rOffset the position within the region of the
+ document template (Out-Parameter)
- [Querverweise]
- <class Path> (unter Umst"anden kann auf diese Funktion zugunsten
- von Path verzichtet werden.)
+ [Cross-references]
+ <class Path> (in certain circumstances this function can also be
+ dispensed in favor of the Path)
*/
{
@@ -534,24 +530,24 @@ sal_Bool SfxOrganizeListBox_Impl::MoveOrCopyTemplates(SvLBox *pSourceBox,
SvLBoxEntry *&pNewParent,
sal_uIntPtr &rIdx,
sal_Bool bCopy)
-/* [Beschreibung]
+/* [Description]
- Verschieben oder Kopieren von Dokumentvorlagen
+ Move or copy a document templates
[Parameter]
- SvLBox *pSourceBox Quell-Listbox, an der das Ereignis auftrat
- SvLBoxEntry *pSource Quell-Eintrag, der kopiert / verschoben werden soll
- SvLBoxEntry* pTarget Ziel-Eintrag, auf den verschoben werden soll
- SvLBoxEntry *&pNewParent der Parent der an der Zielposition erzeugten
- Eintrags (Out-Parameter)
- sal_uIntPtr &rIdx Index des Zieleintrags
- sal_Bool bCopy Flag f"ur Kopieren / Verschieben
+ SvLBox *pSourceBox Source Listbox, at which the event occurred
+ SvLBoxEntry* pTarget Target entry, to where it will be moved
+ SvLBoxEntry *pSource Source entry, to be copied / moved
+ SvLBoxEntry *&pNewParent the parent of the target position generated
+ at entry (out parameter)
+ sal_uIntPtr &rIdx Index of the target entry
+ sal_Bool bCopy Flag for Copy / Move
- [Returnwert] sal_Bool: Erfolg oder Mi"serfolg
+ [Return value] sal_Bool: Success or failure
- [Querverweise]
+ [Cross-references]
<SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
SvLBoxEntry *pSource,
@@ -625,24 +621,24 @@ sal_Bool SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
SvLBoxEntry *&pNewParent,
sal_uIntPtr &rIdx,
sal_Bool bCopy)
-/* [Beschreibung]
+/* [Description]
- Verschieben oder Kopieren von Dokumentinhalten
+ Move or copy document contents
[Parameter]
- SvLBox *pSourceBox Quell-Listbox, an der das Ereignis auftrat
- SvLBoxEntry *pSource Quell-Eintrag, der kopiert / verschoben werden soll
- SvLBoxEntry* pTarget Ziel-Eintrag, auf den verschoben werden soll
- SvLBoxEntry *&pNewParent der Parent der an der Zielposition erzeugten
- Eintrags (Out-Parameter)
- sal_uIntPtr &rIdx Index des Zieleintrags
- sal_Bool bCopy Flag f"ur Kopieren / Verschieben
+ SvLBox *pSourceBox Source Listbox, at which the event occurred
+ SvLBoxEntry* pTarget Target entry, to where it will be moved
+ SvLBoxEntry *pSource Source entry, to be copied / moved
+ SvLBoxEntry *&pNewParent the parent of the target position generated
+ at entry (out parameter)
+ sal_uIntPtr &rIdx Index of the target entry
+ sal_Bool bCopy Flag for Copy / Move
- [Returnwert] sal_Bool: Erfolg oder Mi"serfolg
+ [Return value] sal_Bool: Success or failure
- [Querverweise]
+ [Cross-references]
<SfxOrganizeListBox_Impl::MoveOrCopyTemplates(SvLBox *pSourceBox,
SvLBoxEntry *pSource,
@@ -696,16 +692,16 @@ sal_Bool SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
*aSourceDoc, aSource[nSLevel+1],
aSource[nSLevel+2], aSource[nSLevel+3],
p[0], p[1], p[2], nIdxDeleted);
- // Positionskorrektur auswerten
- // a = Dokumentinhalt
- // b = Position Sub-Inhalt 1
- // c = Position Sub-Inhalt 2
- // doppelte Eintraege loeschen
+ // Evaluate Position correction
+ // a = Document content
+ // b = Position Sub-content 1
+ // c = Position Sub-content 2
+ // Delete duplicate entries
if(bOk)
{
SvLBoxEntry *pParentIter = pTarget;
- // bis auf die DokumentEbene nach oben als
- // allgemeiner Bezugspunkt
+ // Up to the document level as
+ // the general reference point
while(GetModel()->GetDepth(pParentIter) != nTLevel)
pParentIter = GetParent(pParentIter);
if(pParentIter->HasChildsOnDemand() &&
@@ -717,10 +713,10 @@ sal_Bool SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
while(i < 2 && p[i+1] != INDEX_IGNORE)
{
pChildIter = FirstChild(pParentIter);
- // bis zum Index der aktuellen Ebene
+ // To the index of the current level
for(sal_uInt16 j = 0; j < p[i]; ++j)
pChildIter = NextSibling(pChildIter);
- // gfs Fuellen bei Items onDemand
+ // If possible, fill in Items onDemand
++i;
if(p[i+1] != INDEX_IGNORE &&
pChildIter->HasChildsOnDemand() &&
@@ -738,8 +734,8 @@ sal_Bool SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
if(!bCopy)
pSourceBox->GetModel()->Remove(pSource);
}
- // Geloeschte Eintraege entfernen
- // (kann durch Ueberschreiben geschehen)
+ // Remove deleted items
+ // (can be done by overwriting)
if(nIdxDeleted != INDEX_IGNORE)
{
pChildIter = FirstChild(pParentIter);
@@ -775,23 +771,23 @@ sal_Bool SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
SvLBoxEntry *&pNewParent,
sal_uIntPtr &rIdx)
-/* [Beschreibung]
+/* [Description]
- Benachrichtigung, da"s ein Eintrag verschoben werden soll
+ Notification that an item will be moved.
(SV-Handler)
[Parameter]
- SvLBoxEntry* pTarget Ziel-Eintrag, auf den verschoben werden soll
- SvLBoxEntry *pSource Quell-Eintrag, der verschoben werden soll
- SvLBoxEntry *&pNewParent der Parent der an der Zielposition erzeugten
- Eintrags (Out-Parameter)
- sal_uIntPtr &rIdx Index des Zieleintrags
+ SvLBoxEntry* pTarget Target entry, to where it will be moved
+ SvLBoxEntry *pSource Source entry, to be moved
+ SvLBoxEntry *&pNewParent the parent of the target position generated
+ at entry (out parameter)
+ sal_uIntPtr &rIdx Index of the target entry
- [Returnwert] sal_Bool: Erfolg oder Mi"serfolg
+ [Return value] sal_Bool: Sucess or failure
- [Querverweise]
+ [Cross-references]
<SfxOrganizeListBox_Impl::MoveOrCopyTemplates(SvLBox *pSourceBox,
SvLBoxEntry *pSource,
@@ -835,23 +831,22 @@ sal_Bool SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
SvLBoxEntry* pSource,
SvLBoxEntry *&pNewParent,
sal_uIntPtr &rIdx)
-/* [Beschreibung]
+/* [Description]
- Benachrichtigung, da"s ein Eintrag kopiert werden soll
+ Notification that an item will be moved.
(SV-Handler)
[Parameter]
- SvLBoxEntry* pTarget Ziel-Eintrag, auf den kopiert werden soll
- SvLBoxEntry *pSource Quell-Eintrag, der kopiert werden soll
- SvLBoxEntry *&pNewParent der Parent der an der Zielposition erzeugten
- Eintrags (Out-Parameter)
- sal_uIntPtr &rIdx Index des Zieleintrags
-
+ SvLBoxEntry* pTarget Target entry, to where it will be copied
+ SvLBoxEntry *pSource Source entry, to be copied
+ SvLBoxEntry *&pNewParent the parent of the target position generated
+ at entry (out parameter)
+ sal_uIntPtr &rIdx Index of the target entry
- [Returnwert] sal_Bool: Erfolg oder Mi"serfolg
+ [Return value] sal_Bool: Sucess or failure
- [Querverweise]
+ [Cross-references]
<SfxOrganizeListBox_Impl::MoveOrCopyTemplates(SvLBox *pSourceBox,
SvLBoxEntry *pSource,
@@ -891,12 +886,12 @@ sal_Bool SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
sal_Bool SfxOrganizeListBox_Impl::EditingEntry( SvLBoxEntry* pEntry, Selection& )
-/* [Beschreibung]
+/* [Description]
- Nachfrage, ob ein Eintrag editierbar ist
+ Check whether an item can be edited
(SV-Handler)
- [Querverweise]
+ [Cross-references]
<SfxOrganizeListBox_Impl::EditedEntry(SvLBoxEntry* pEntry, const String& rText)>
*/
@@ -914,23 +909,23 @@ sal_Bool SfxOrganizeListBox_Impl::EditingEntry( SvLBoxEntry* pEntry, Selection&
sal_Bool SfxOrganizeListBox_Impl::EditedEntry(SvLBoxEntry* pEntry, const String& rText)
-/* [Beschreibung]
+/* [Description]
- Der Name eines Eintrags wurde bearbeitet; ist der eingegebene Name
- ein g"ultiger Name ("ange > 0), wird das Model aktualisiert.
+ The name of an entry has been processed, if the name you entered is a
+ valid name (length> 0) then the model is updated.
(SV-Handler)
- [Returnwert]
+ [Return value]
- sal_Bool sal_True: der Name soll in der Anzeige ge"andert werden
- sal_False:der Name soll nicht ge"andert werden
+ sal_Bool sal_True: The name in the display should be changed
+ sal_False: The name should not be changed
- [Querverweise]
+ [Cross-references]
<SfxOrganizeListBox_Impl::EditingEntry(SvLBoxEntry* pEntry, const String& rText)>
*/
{
- DBG_ASSERT(pEntry, "kein Entry selektiert");
+ DBG_ASSERT(pEntry, "No Entry selected");
delete pDlg->pSuspend;
pDlg->pSuspend = NULL;
SvLBoxEntry* pParent = GetParent(pEntry);
@@ -1087,14 +1082,14 @@ void SfxOrganizeListBox_Impl::DragFinished( sal_Int8 nDropAction )
inline sal_uInt16 SfxOrganizeListBox_Impl::GetDocLevel() const
-/* [Beschreibung]
+/* [Description]
- Ermittelt, auf welche Ebene sich Dokumente befinden (unterschiedlich
- in der Dokumentvorlagensicht und der Dokumentensicht)
+ Determines on which level there are documents (in the template view or
+ the document view)
- [Returnwert]
+ [Return value]
- sal_uInt16 Die Ebene der Dokumente
+ sal_uInt16 Document level
*/
@@ -1106,20 +1101,19 @@ inline sal_uInt16 SfxOrganizeListBox_Impl::GetDocLevel() const
SfxObjectShellRef SfxOrganizeListBox_Impl::GetObjectShell(const Path &rPath)
-/* [Beschreibung]
+/* [Description]
- Zugriff auf die ObjectShell, die dem aktuellen Eintrag zugeordnet
- ist.
+ Access to the ObjectShell to which the current entry is connected.
[Parameter]
- const Path &rPath Beschreibung des aktuellen Eintrags
+ const Path &rPath Description of the current entry
- [Returnwert]
+ [Return value]
- SfxObjectShellRef Referenz auf die ObjectShell
+ SfxObjectShellRef Reference to the ObjectShell
- [Querverweise]
+ [Cross-references]
<class Path>
@@ -1138,17 +1132,14 @@ SfxObjectShellRef SfxOrganizeListBox_Impl::GetObjectShell(const Path &rPath)
void SfxOrganizeListBox_Impl::RequestingChilds( SvLBoxEntry* pEntry )
-/* [Beschreibung]
+/* [Description]
- Aufforderung, der Childs eines Eintrags einzuf"ugen
- ist.
+ Sent to the Childs of an entry that is going to be inserted.
(SV-Handler)
[Parameter]
- SvLBoxEntry* pEntry der Eintrag, dessen Childs erfragt werden
-
-
+ SvLBoxEntry* pEntry the entry whose Childs is requested
*/
{
@@ -1156,9 +1147,11 @@ void SfxOrganizeListBox_Impl::RequestingChilds( SvLBoxEntry* pEntry )
{
WaitObject aWaitCursor( this );
+ // Choose the correct mask color dependent from eColorMode. This
+ // must be adopted if we change the mask color for normal images, too!
Color aMaskColor( COL_LIGHTMAGENTA );
- // hier sind alle initial eingefuegt
+ // Here are all the initial inserted
SfxErrorContext aEc(ERRCTX_SFX_CREATEOBJSH, pDlg->pDialog);
if(VIEW_TEMPLATES == GetViewType() && 0 == GetModel()->GetDepth(pEntry))
{
@@ -1208,14 +1201,11 @@ void SfxOrganizeListBox_Impl::RequestingChilds( SvLBoxEntry* pEntry )
long SfxOrganizeListBox_Impl::ExpandingHdl()
-/* [Beschreibung]
-
- SV-Handler, der nach dem und vor dem Aufklappen eines Eintrags
- gerufen wird.
- Wird verwendet, um gfs. die ObjectShell wieder zu schlie"sen;
- die Eintr"age mit den Inhalten dieser Shell werden ebenfalls
- entfernt.
+/* [Description]
+ SV-handler, before and after the unfolding of an entry is called.
+ Used if possibly to close the ObjectShell again, the entries with the
+ contents of this shell are also removed.
*/
{
@@ -1227,12 +1217,12 @@ long SfxOrganizeListBox_Impl::ExpandingHdl()
(eViewType == VIEW_TEMPLATES && nLevel == 1))
{
Path aPath(this, pEntry);
- // Beim Schliessen des Files die ObjectShell freigeben
+ // Release ObjectShell when closing the files
if(eViewType == VIEW_FILES && nLevel == 0)
pMgr->DeleteObjectShell(aPath[0]);
else
pMgr->DeleteObjectShell(aPath[0], aPath[1]);
- // alle SubEntries loeschen
+ // Delete all SubEntries
SvLBoxEntry *pToDel = SvLBox::GetEntry(pEntry, 0);
while(pToDel)
{
@@ -1249,18 +1239,18 @@ long SfxOrganizeListBox_Impl::ExpandingHdl()
sal_Bool SfxOrganizeListBox_Impl::IsUniqName_Impl(const String &rText,
SvLBoxEntry* pParent, SvLBoxEntry *pEntry) const
-/* [Beschreibung]
+/* [Description]
- Pr"uft, ob eine Name auf seiner Ebene eindeutig ist.
+ Checks whether a name is unique at its level.
[Parameter]
- const String & Name des zu suchenden Eintrags
- SvLBoxEntry* pSibling Geschwister (bezeichnet die Ebene)
+ const String & Name of the search entry
+ SvLBoxEntry* pSibling Siblings (referred to the level)
- [Returnwert]
+ [Return value]
- sal_Bool sal_True, wenn der Name eindeutig ist, sonst sal_False
+ sal_Bool sal_True, if the name is unique, otherwise sal_False
*/
{
@@ -1339,9 +1329,9 @@ SfxOrganizeListBox_Impl::SfxOrganizeListBox_Impl
pDlg ( pArgDlg ),
eViewType ( eType )
-/* [Beschreibung]
+/* [Description]
- Konstruktor SfxOrganizeListBox
+ Constructor SfxOrganizeListBox
*/
@@ -1388,15 +1378,14 @@ IMPL_LINK( SfxOrganizeListBox_Impl, OnAsyncExecuteDrop, ExecuteDropEvent*, pEven
void SfxOrganizeListBox_Impl::Reset()
-/* [Beschreibung]
-
- Einf"ugen der Elemente in die ListBox
+/* [Description]
+ Paste the items in the ListBox
*/
{
- DBG_ASSERT( pMgr != 0, "kein Manager" );
- // Inhalte l"oschen
+ DBG_ASSERT( pMgr != 0, "No Manager" );
+ // Delete contents
SetUpdateMode(sal_False);
Clear();
if ( VIEW_TEMPLATES == eViewType )
@@ -1422,19 +1411,17 @@ void SfxOrganizeListBox_Impl::Reset()
const Image &SfxOrganizeListBox_Impl::GetClosedBmp(sal_uInt16 nLevel) const
-/* [Beschreibung]
+/* [Description]
- Zugriff auf die Bitmap f"ur einen geschlossenen Eintrag
- der jeweiligen Ebene
+ Access to the bitmap for a closed entry at each level
[Parameter]
- sal_uInt16 nLevel Angabe der Ebene, 2 Ebenen sind erlaubt
-
- [Returnwert]
+ sal_uInt16 nLevel Indicator of the level, 2 levels are allowed
- const Image & das Image auf der Ebenen nLevel
+ [Return value]
+ const Image & The Image on level nLevel
*/
{
@@ -1442,7 +1429,7 @@ const Image &SfxOrganizeListBox_Impl::GetClosedBmp(sal_uInt16 nLevel) const
switch( nLevel )
{
- default: OSL_FAIL( "Bitmaps ueberindiziert" );
+ default: OSL_FAIL( "Bitmap index overflow" );
case 0: pRet = &aClosedFolderBmp;
break;
@@ -1457,18 +1444,17 @@ const Image &SfxOrganizeListBox_Impl::GetClosedBmp(sal_uInt16 nLevel) const
const Image &SfxOrganizeListBox_Impl::GetOpenedBmp(sal_uInt16 nLevel) const
-/* [Beschreibung]
+/* [Description]
- Zugriff auf die Bitmap f"ur einen ge"offneten Eintrag
- der jeweiligen Ebene
+ Access to the bitmap for an open entry at each level
[Parameter]
- sal_uInt16 nLevel Angabe der Ebene, 2 Ebenen sind erlaubt
+ sal_uInt16 nLevel Indicator of the level, 2 levels are allowed
- [Returnwert]
+ [Return value]
- const Image & das Image auf der Ebenen nLevel
+ const Image & the image on the level nLevel
*/
@@ -1499,18 +1485,17 @@ PopupMenu* SfxOrganizeListBox_Impl::CreateContextMenu()
String SfxOrganizeDlg_Impl::GetPath_Impl( sal_Bool bOpen, const String& rFileName )
-/* [Beschreibung]
+/* [Description]
- Pfad per FileDialog erfragen, f"ur Import / Export von
- Dokumentvorlagen
+ Get path from FileDialog, for Import / Export of Templates
[Parameter]
- sal_Bool bOpen Flag: "Offnen / Speichern
- const String& rFileName aktueller Dateiname als Vorschlag
+ sal_Bool bOpen Flag: Open / Save
+ const String& rFileName Current file name as default
- [R"uckgabewert] Dateiname mit Pfad oder Leerstring, wenn
- der Benutzer 'Abbrechen' gedr"uckt hat
+ [Return value] File name with path or empty string if
+ users has pressed 'Cancel'
*/
{
@@ -1694,12 +1679,12 @@ sal_Bool SfxOrganizeDlg_Impl::DontDelete_Impl( SvLBoxEntry* pEntry )
pFocusBox->GetViewType())
nDepth++;
if( (nDepth > 2 && !pEntry->GetUserData()) ||
- //Delete ueber GetContent verboten
- nDepth==2 || //Vorlage / Konfigurtionsrubrik nicht loeshcen
+ //Delete using GetContent forbidden
+ nDepth==2 || // Template / Not deleting config header
(nDepth==1 && SfxOrganizeListBox_Impl::VIEW_FILES ==
- pFocusBox->GetViewType()) || //Files nicht loeschen
+ pFocusBox->GetViewType()) || //Not deleting Files
(0 == nDepth && pFocusBox->GetLevelCount_Impl(0) < 2))
- //Mindestens eine Vorlage behalten
+ //At least keep one template
{
return sal_True;
}
@@ -1766,17 +1751,16 @@ sal_Bool SfxOrganizeDlg_Impl::GetServiceName_Impl( String& rName, String& rFileU
long SfxOrganizeDlg_Impl::Dispatch_Impl( sal_uInt16 nId, Menu* _pMenu )
-/* [Beschreibung]
+/* [Description]
- Verarbeiten der Events aus MenuButton oder Accelerator
+ Processing the events from MenuButton or Accelerator
[Parameter]
- sal_uInt16 nId ID des Events
-
- [R"uckgabewert] 1: Event wurde verarbeitet,
- 0: Event wurde nicht verarbeitet (SV-Menu)
+ sal_uInt16 nId Event ID
+ [Return value] 1: Event has been processed,
+ 0: Event has not been processed (SV-Menu)
*/
{
@@ -1842,7 +1826,7 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( sal_uInt16 nId, Menu* _pMenu )
( nDeleteInd == USHRT_MAX && pFocusBox->GetChildCount(pEntry) ) );
}
}
- // Inhaltsformen
+ //Content Format
else if(nDepth + pFocusBox->GetDocLevel() >= 2)
{
if(!QueryDelete_Impl(pDialog, STR_DELETE_TEMPLATE, pFocusBox->GetEntryText(pEntry)))
@@ -1978,17 +1962,16 @@ long SfxOrganizeDlg_Impl::Dispatch_Impl( sal_uInt16 nId, Menu* _pMenu )
IMPL_LINK_INLINE_START( SfxOrganizeDlg_Impl, MenuSelect_Impl, Menu *, pMenu )
-/* [Beschreibung]
+/* [Description]
- SelectHandler des Men"us des Men"ubuttons (SV)
+ SelectHandler of Menu and Menubuttons (SV)
[Parameter]
- MenuButton *pBtn der das Event ausl"osende Button
-
- [R"uckgabewert] 1: Event wurde verarbeitet,
- 0: Event wurde nicht verarbeitet (SV-Menu)
+ MenuButton *pBtn Button triggering the event
+ [Return value] 1: Event has been processed,
+ 0: Event has not been processed (SV-Menu)
*/
{
return Dispatch_Impl( pMenu->GetCurItemId(), pMenu );
@@ -1999,17 +1982,16 @@ IMPL_LINK_INLINE_END( SfxOrganizeDlg_Impl, MenuSelect_Impl, Menu *, pMenu )
IMPL_LINK( SfxOrganizeDlg_Impl, AccelSelect_Impl, Accelerator *, pAccel )
-/* [Beschreibung]
+/* [Description]
- SelectHandler des Accelerators (SV)
+ SelectHandler of Accelerators (SV)
[Parameter]
- Accelerator *pAccel der das Event ausl"osende Accelerator
-
- [R"uckgabewert] 1: Event wurde verarbeitet,
- 0: Event wurde nicht verarbeitet (SV)
+ Accelerator *pAccel Accelerator triggering the event
+ [Return value] 1: Event has been processed,
+ 0: Event has not been processed (SV)
*/
{
@@ -2032,17 +2014,16 @@ void SfxOrganizeDlg_Impl::OkHdl(Button *pButton)
IMPL_LINK( SfxOrganizeDlg_Impl, MenuActivate_Impl, Menu *, pMenu )
-/* [Beschreibung]
+/* [Description]
- ActivateHandler des Men"us des Men"ubuttons (SV)
+ ActivateHandler of Menu and Menubuttons (SV)
[Parameter]
- Menu *pMenu das das Event ausl"osende Men"u
-
- [R"uckgabewert] 1: Event wurde verarbeitet,
- 0: Event wurde nicht verarbeitet (SV-Menu)
+ Menu *pMenu Event triggering the Menu
+ [Return value] 1: Event has been processed,
+ 0: Event has not been processed (SV-Menu)
*/
{
if ( pFocusBox && pFocusBox->IsEditingActive() )
@@ -2053,11 +2034,11 @@ IMPL_LINK( SfxOrganizeDlg_Impl, MenuActivate_Impl, Menu *, pMenu )
( bEnable && pFocusBox->GetSelectionCount() ) ? pFocusBox->GetModel()->GetDepth( pEntry ) : 0;
const sal_uInt16 nDocLevel = bEnable ? pFocusBox->GetDocLevel() : 0;
int eVT = pFocusBox ? pFocusBox->GetViewType() : 0;
- // nur Vorlagen anlegen
+ // Create only Template
pMenu->EnableItem( ID_NEW, bEnable && 0 == nDepth && SfxOrganizeListBox_Impl::VIEW_TEMPLATES == eVT );
- // Vorlagen: Loeschen Ebene 0,1,3ff
- // ein Bereich mu"s mindestens erhalten bleiben
- // Dateien : Loeschen Ebene > 2
+ // Template: Delete level 0,1,3ff
+ // At least one region must be retained
+ // Files: Delete level> 2
pMenu->EnableItem( ID_DELETE, bEnable && !DontDelete_Impl( pEntry ) );
pMenu->EnableItem( ID_EDIT,
@@ -2125,17 +2106,14 @@ IMPL_LINK( SfxOrganizeDlg_Impl, MenuActivate_Impl, Menu *, pMenu )
IMPL_LINK( SfxOrganizeDlg_Impl, GetFocus_Impl, SfxOrganizeListBox_Impl *, pBox )
-/* [Beschreibung]
+/* [Description]
- GetFocus-Handler, wird aus den Select-Handler der Listboxen
- gerufen.
- Wird verwendet, im die Listbox, die den Focus besitzt sowie
- deren Zustand zu ermitteln.
+ GetFocus-Handler, is called from the Select-Handler of ListBox
+ Used in the listBox that has the focus and to determine its condition.
[Parameter]
- SfxOrganizeListBox *pBox die rufende Box
-
+ SfxOrganizeListBox *pBox The calling Box
*/
{
@@ -2151,17 +2129,15 @@ IMPL_LINK( SfxOrganizeDlg_Impl, GetFocus_Impl, SfxOrganizeListBox_Impl *, pBox )
IMPL_LINK( SfxOrganizeDlg_Impl, LeftListBoxSelect_Impl, ListBox *, pBox )
-/* [Beschreibung]
+/* [Description]
- Select-Handler, wird aus den Select-Handler der Listboxen
- gerufen.
- Wenn sich der Modus der Boxen (Dokumentsicht, Dokumentvorlagensicht)
- unterscheiden, werden die Models getrennt; andernfalls zusammengefa"st.
+ Select-Handler, is called from the Select-Handler of ListBox.
+ If the mode of the Boxes are different (Document view or Template view)
+ then the models are separated, otherwise joined together.
[Parameter]
- ListBox *pBox die rufende Box
-
+ ListBox *pBox The calling Box
*/
{
const SfxOrganizeListBox_Impl::DataEnum
@@ -2185,17 +2161,15 @@ IMPL_LINK( SfxOrganizeDlg_Impl, LeftListBoxSelect_Impl, ListBox *, pBox )
IMPL_LINK( SfxOrganizeDlg_Impl, RightListBoxSelect_Impl, ListBox *, pBox )
-/* [Beschreibung]
+/* [Description]
- Select-Handler, wird aus den Select-Handler der Listboxen
- gerufen.
- Wenn sich der Modus der Boxen (Dokumentsicht, Dokumentvorlagensicht)
- unterscheiden, werden die Models getrennt; andernfalls zusammengefa"st.
+ Select-Handler, will be called by Select-Handler of the ListBox.
+ If the mode of the Boxes are different (Document view or Template view)
+ then the models are separated, otherwise joined together.
[Parameter]
- ListBox *pBox die rufende Box
-
+ ListBox *pBox The calling Box
*/
{
const SfxOrganizeListBox_Impl::DataEnum eViewType =
@@ -2208,7 +2182,7 @@ IMPL_LINK( SfxOrganizeDlg_Impl, RightListBoxSelect_Impl, ListBox *, pBox )
aRightLb.SetModel(aLeftLb.GetModel());
else
{
- // Models trennen
+ // Separate models
aRightLb.DisconnectFromModel();
aRightLb.Reset();
}
@@ -2232,13 +2206,13 @@ IMPL_LINK( SfxOrganizeDlg_Impl, OnAddressTemplateClicked, Button *, pButton )
IMPL_LINK( SfxOrganizeDlg_Impl, AddFiles_Impl, Button *, pButton )
-/* [Beschreibung]
+/* [Description]
- Handler des Buttons f"ur das Hinzuf"ugen von Dateien per Dialog.
+ Handler of the button for adding files through Dialog.
[Parameter]
- Button * der Button, der dieses Events ausgel"ost hat.
+ Button * Button, triggering this Event
*/
{
@@ -2385,10 +2359,9 @@ IMPL_LINK( SfxOrganizeDlg_Impl, AddFilesHdl, sfx2::FileDialogHelper *, EMPTYARG
short SfxTemplateOrganizeDlg::Execute()
-/* [Beschreibung]
+/* [Description]
- "Uberladene Execute- Methode; speichert gfs. "Anderungen an den
- Dokumentvorlagen
+ Overloaded Execute method; stores changes to the document templates
(SV-Methode)
*/
@@ -2413,10 +2386,9 @@ SfxTemplateOrganizeDlg::SfxTemplateOrganizeDlg(Window * pParent,
: ModalDialog( pParent, SfxResId(DLG_ORGANIZE)),
pImp( new SfxOrganizeDlg_Impl(this, pTempl) )
-/* [Beschreibung]
-
- Konstruktor
+/* [Description]
+ Constructor
*/
{
FreeResource();
diff --git a/sfx2/source/doc/frmdescr.cxx b/sfx2/source/doc/frmdescr.cxx
index 3dfdd686259c..f8265e5825a3 100755
--- a/sfx2/source/doc/frmdescr.cxx
+++ b/sfx2/source/doc/frmdescr.cxx
@@ -162,7 +162,7 @@ SfxFrameDescriptor* SfxFrameDescriptor::Clone( sal_Bool bWithIds ) const
pFrame->pImp->pWallpaper = new Wallpaper( *pImp->pWallpaper );
if( pImp->pArgs )
{
- // Aktuell ist im Clone von SfxAllItemSets noch ein Bug...
+ // Currently in the clone of SfxAllItemSets there is still a bug ...
pFrame->pImp->pArgs = new SfxAllItemSet( SFX_APP()->GetPool() );
pFrame->pImp->pArgs->Put(*pImp->pArgs);
}
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index 8392022dff5b..c263b7521bba 100755
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -276,8 +276,8 @@ public:
SfxNewFileDialog_Impl( SfxNewFileDialog* pAntiImplP, sal_uInt16 nFlags );
~SfxNewFileDialog_Impl();
- // Liefert sal_False, wenn '- Keine -' als Vorlage eingestellt ist
- // Nur wenn IsTemplate() sal_True liefert, koennen Vorlagennamen
+ // Returns sal_False if '- No -' is set as a template
+ // Template name can only be obtained if IsTemplate() is TRUE
// erfragt werden
sal_Bool IsTemplate() const;
String GetTemplateRegion() const;
@@ -436,12 +436,12 @@ IMPL_LINK( SfxNewFileDialog_Impl, PreviewClick, CheckBox *, pBox )
IMPL_LINK( SfxNewFileDialog_Impl, TemplateSelect, ListBox *, EMPTYARG )
{
- // noch am Laden
+ // Still loading
if ( xDocShell && xDocShell->GetProgress() )
return 0;
if ( !MORE_BTN(GetState()) )
- // Dialog nicht aufgeklappt
+ // Dialog is not opened
return 0;
aPrevTimer.Start();
@@ -453,7 +453,7 @@ IMPL_LINK( SfxNewFileDialog_Impl, TemplateSelect, ListBox *, EMPTYARG )
IMPL_LINK_INLINE_START( SfxNewFileDialog_Impl, DoubleClick, ListBox *, pListBox )
{
(void)pListBox;
- // noch am Laden
+ // Still loadning
if ( !xDocShell.Is() || !xDocShell->GetProgress() )
pAntiImpl->EndDialog(RET_OK);
return 0;
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index a43ccd48214e..cae0fb743e40 100755
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -126,8 +126,8 @@ SfxObjectShell::GetPreviewMetaFile( sal_Bool bFullContent ) const
::boost::shared_ptr<GDIMetaFile>
SfxObjectShell::CreatePreviewMetaFile_Impl( sal_Bool bFullContent ) const
{
- // Nur wenn gerade nicht gedruckt wird, darf DoDraw aufgerufen
- // werden, sonst wird u.U. der Printer abgeschossen !
+ // DoDraw can only be called when no printing is done, otherwise
+ // the printer may be turned off
SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this );
if ( pFrame && pFrame->GetViewShell() &&
pFrame->GetViewShell()->GetPrinter() &&
@@ -233,7 +233,7 @@ lcl_add(util::Duration & rDur, Time const& rTime)
rDur.Seconds += rTime.GetSec();
}
-// Bearbeitungszeit aktualisieren
+// Update the processing time
void SfxObjectShell::UpdateTime_Impl(
const uno::Reference<document::XDocumentProperties> & i_xDocProps)
{
@@ -484,8 +484,8 @@ sal_Bool SfxObjectShell::Insert(SfxObjectShell &rSource,
if ( pHisPool && pHisPool->Count() > nSourceIdx2 )
pHisSheet = (*pHisPool)[nSourceIdx2];
- // Einfuegen ist nur dann noetig, wenn ein StyleSheet
- // zwischen unterschiedlichen(!) Pools bewegt wird
+ // Pasting is only needed if a style sheet is moved between
+ // different (!) Pools
if ( pHisSheet && pMyPool != pHisPool )
{
@@ -494,12 +494,12 @@ sal_Bool SfxObjectShell::Insert(SfxObjectShell &rSource,
nIdx2 = pMyPool->Count();
}
- // wenn so eine Vorlage schon existiert: loeschen!
+ // if such a template already exists: delete!
String aOldName(pHisSheet->GetName());
SfxStyleFamily eOldFamily = pHisSheet->GetFamily();
SfxStyleSheetBase* pExist = pMyPool->Find(aOldName, eOldFamily);
- // sal_uInt16 nOldHelpId = pExist->GetHelpId(??? VB ueberlegt sich was);
+ // sal_uInt16 nOldHelpId = pExist->GetHelpId(???);
sal_Bool bUsedOrUserDefined;
if( pExist )
{
@@ -522,10 +522,11 @@ sal_Bool SfxObjectShell::Insert(SfxObjectShell &rSource,
aOldName, eOldFamily,
pHisSheet->GetMask(), nIdx2);
- // ItemSet der neuen Vorlage fuellen
+ // Fill the Itemset of the new template
rNewSheet.GetItemSet().Set(pHisSheet->GetItemSet());
- // wer bekommt den Neuen als Parent? wer benutzt den Neuen als Follow?
+ // Who gets the new one as a Parent?
+ // Who is using the new one as Follow?
SfxStyleSheetBase* pTestSheet = pMyPool->First();
while (pTestSheet)
{
@@ -534,7 +535,7 @@ sal_Bool SfxObjectShell::Insert(SfxObjectShell &rSource,
pTestSheet->GetParent() == aOldName)
{
pTestSheet->SetParent(aOldName);
- // Verknuepfung neu aufbauen
+ // Rebuild Link
}
if (pTestSheet->GetFamily() == eOldFamily &&
@@ -542,7 +543,7 @@ sal_Bool SfxObjectShell::Insert(SfxObjectShell &rSource,
pTestSheet->GetFollow() == aOldName)
{
pTestSheet->SetFollow(aOldName);
- // Verknuepfung neu aufbauen
+ // Rebuild Link
}
pTestSheet = pMyPool->Next();
@@ -551,7 +552,7 @@ sal_Bool SfxObjectShell::Insert(SfxObjectShell &rSource,
rNewSheet.IsUsed() || rNewSheet.IsUserDefined();
- // hat der Neue einen Parent? wenn ja, mit gleichem Namen bei uns suchen
+ // has a New Parent? if so, start search with the same name
if (pHisSheet->HasParentSupport())
{
const String& rParentName = pHisSheet->GetParent();
@@ -564,8 +565,8 @@ sal_Bool SfxObjectShell::Insert(SfxObjectShell &rSource,
}
}
- // hat der Neue einen Follow? wenn ja, mit gleichem
- // Namen bei uns suchen
+ // Has the new got a Follow? if so start search
+ // with the same name.
if (pHisSheet->HasFollowSupport())
{
const String& rFollowName = pHisSheet->GetFollow();
@@ -621,14 +622,14 @@ sal_Bool SfxObjectShell::Remove
pTestSheet->HasParentSupport() &&
pTestSheet->GetParent() == aName)
{
- pTestSheet->SetParent(aEmpty); // Verknuepfung aufloesen
+ pTestSheet->SetParent(aEmpty); // Remove link
}
if (pTestSheet->GetFamily() == eFamily &&
pTestSheet->HasFollowSupport() &&
pTestSheet->GetFollow() == aName)
{
- pTestSheet->SetFollow(aEmpty); // Verknuepfung aufloesen
+ pTestSheet->SetFollow(aEmpty); // Remove link
}
pTestSheet = pMyPool->Next();
@@ -663,7 +664,7 @@ sal_Bool SfxObjectShell::Print
if ( !pStyle )
return sal_True;
- // pepare adaptor for old style StartPage/EndPage printing
+ // prepare adaptor for old style StartPage/EndPage printing
boost::shared_ptr< Printer > pPrinter( new Printer( rPrt.GetJobSetup() ) );
vcl::OldStylePrintAdaptor* pAdaptor = new vcl::OldStylePrintAdaptor( pPrinter );
boost::shared_ptr< vcl::PrinterController > pController( pAdaptor );
@@ -778,18 +779,17 @@ sal_Bool SfxObjectShell::Print
void SfxObjectShell::LoadStyles
(
- SfxObjectShell &rSource /* die Dokument-Vorlage, aus der
- die Styles geladen werden sollen */
+ SfxObjectShell &rSource /* the document template from which
+ the styles are to be loaded */
)
-/* [Beschreibung]
+/* [Description]
- Diese Methode wird vom SFx gerufen, wenn aus einer Dokument-Vorlage
- Styles nachgeladen werden sollen. Bestehende Styles soll dabei
- "uberschrieben werden. Das Dokument mu"s daher neu formatiert werden.
- Daher werden die Applikationen in der Regel diese Methode "uberladen
- und in ihrer Implementierung die Implementierung der Basisklasse
- rufen.
+ This method is called by the SFx if template styles are to be loaded.
+ Existing styles are in this case overwritten. The document has then to be
+ newly formatted. Therefore, the application of this method is usually
+ overloaded and its implementation is calling the implementation in
+ the base class.
*/
{
@@ -816,7 +816,7 @@ void SfxObjectShell::LoadStyles
{
pDest = &pMyPool->Make( pSource->GetName(),
pSource->GetFamily(), pSource->GetMask());
- // Setzen des Parents, der Folgevorlage
+ // Setting of Parents, the next style
}
pFound[nFound].pSource = pSource;
pFound[nFound].pDest = pDest;
@@ -839,13 +839,12 @@ void SfxObjectShell::LoadStyles
void SfxObjectShell::UpdateFromTemplate_Impl( )
-/* [Beschreibung]
+/* [Description]
- Diese interne Methode pr"uft, ob das Dokument aus einem Template
- erzeugt wurde, und ob dieses neuer ist als das Dokument. Ist dies
- der Fall, wird der Benutzer gefragt, ob die Vorlagen (StyleSheets)
- updated werden sollen. Wird dies positiv beantwortet, werden die
- StyleSheets updated.
+ This internal method checks whether the document was created from a
+ template, and if this is newer than the document. If this is the case,
+ the user is asked if the Templates (StyleSheets) should be updated.
+ If this is answered positively, the StyleSheets are updated.
*/
{
@@ -875,10 +874,10 @@ void SfxObjectShell::UpdateFromTemplate_Impl( )
if ( aTemplName.getLength() || (aTemplURL.getLength() && !IsReadOnly()) )
{
- // try to locate template, first using filename
- // this must be done because writer global document uses this "great" idea to manage the templates of all parts
- // in the master document
- // but it is NOT an error if the template filename points not to a valid file
+ // try to locate template, first using filename this must be done
+ // because writer global document uses this "great" idea to manage
+ // the templates of all parts in the master document but it is NOT
+ // an error if the template filename points not to a valid file
SfxDocumentTemplates aTempl;
aTempl.Construct();
if ( aTemplURL.getLength() )
@@ -889,7 +888,8 @@ void SfxObjectShell::UpdateFromTemplate_Impl( )
}
if( !aFoundName.Len() && aTemplName.getLength() )
- // if the template filename did not lead to success, try to get a file name for the logical template name
+ // if the template filename did not lead to success,
+ // try to get a file name for the logical template name
aTempl.GetFull( String(), aTemplName, aFoundName );
}
diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx
index 1415377aa429..4c639717ab70 100755
--- a/sfx2/source/doc/objembed.cxx
+++ b/sfx2/source/doc/objembed.cxx
@@ -212,15 +212,15 @@ void SfxObjectShell::DoDraw_Impl( OutputDevice* pDev,
aMapMode.SetScaleX( rScaleX );
aMapMode.SetScaleY( rScaleY );
- // Ziel in Pixel
+ // Target in Pixels
Point aOrg = pDev->LogicToLogic( rViewPos, NULL, &aMapMode );
Point aDelta = aOrg - aVisArea.TopLeft();
- // Origin entsprechend zum sichtbaren Bereich verschieben
- // Origin mit Scale setzen
+ // Origin moved according to the viewable area
+ // Origin set with Scale
aMapMode.SetOrigin( aDelta );
- // Deviceeinstellungen sichern
+ // Secure the Device settings
pDev->Push();
Region aRegion;
@@ -249,7 +249,7 @@ void SfxObjectShell::DoDraw_Impl( OutputDevice* pDev,
Draw( pDev, rSetup, nAspect );
- // Deviceeinstellungen wieder herstellen
+ // Restore Device settings
pDev->Pop();
}
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index e03d0a8813c3..34a102eb78c3 100755
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -296,7 +296,7 @@ void SfxObjectShell::EnableSetModified( sal_Bool bEnable )
{
#ifdef DBG_UTIL
if ( bEnable == pImp->m_bEnableSetModified )
- DBG_WARNING( "SFX_PERSIST: EnableSetModified 2x mit dem gleichen Wert gerufen" );
+ DBG_WARNING( "SFX_PERSIST: EnableSetModified 2x called with the same value" );
#endif
pImp->m_bEnableSetModified = bEnable;
}
@@ -354,7 +354,7 @@ void SfxObjectShell::SetModified( sal_Bool bModifiedP )
{
#ifdef DBG_UTIL
if ( !bModifiedP && !IsEnableSetModified() )
- DBG_WARNING( "SFX_PERSIST: SetModified( sal_False ), obwohl IsEnableSetModified() == sal_False" );
+ DBG_WARNING( "SFX_PERSIST: SetModified( sal_False ), although IsEnableSetModified() == sal_False" );
#endif
if( !IsEnableSetModified() )
@@ -372,7 +372,7 @@ void SfxObjectShell::SetModified( sal_Bool bModifiedP )
void SfxObjectShell::ModifyChanged()
{
if ( pImp->bClosing )
- // SetModified aus dem dispose des Models!
+ // SetModified dispose of the models!
return;
{DBG_CHKTHIS(SfxObjectShell, 0);}
@@ -392,11 +392,10 @@ void SfxObjectShell::ModifyChanged()
sal_Bool SfxObjectShell::IsReadOnlyUI() const
-/* [Beschreibung]
+/* [Description]
- Liefert sal_True, wenn das Dokument fuer die UI wie r/o behandelt werden
- soll. Dieses ist unabhaengig vom tatsaechlichen r/o, welches per
- <IsReadOnly()> erfragbar ist.
+ Returns sal_True if the document for the UI is treated as r/o. This is
+ regardless of the actual r/o, which can be checked with <IsReadOnly()>.
*/
{
@@ -407,9 +406,9 @@ sal_Bool SfxObjectShell::IsReadOnlyUI() const
sal_Bool SfxObjectShell::IsReadOnlyMedium() const
-/* [Beschreibung]
+/* [Description]
- Liefert sal_True, wenn das Medium r/o ist bzw. r/o geoeffnet wurde.
+ Returns sal_True when the medium is r/o, for instance when opened as r/o.
*/
{
@@ -422,10 +421,10 @@ sal_Bool SfxObjectShell::IsReadOnlyMedium() const
void SfxObjectShell::SetReadOnlyUI( sal_Bool bReadOnly )
-/* [Beschreibung]
+/* [Description]
- Schaltet das Dokument in einen r/o bzw. r/w Zustand ohne es neu
- zu laden und ohne die Open-Modi des Mediums zu aendern.
+ Turns the document in an r/o and r/w state respectively without reloading
+ it and without changing the open mode of the medium.
*/
{
@@ -513,17 +512,18 @@ void SfxObjectShell::SetMacroMode_Impl( sal_Bool bModal )
void SfxObjectShell::SetModalMode_Impl( sal_Bool bModal )
{
- // nur Broadcasten wenn modifiziert, sonst ggf. Endlosrekursion
+ // Broadcast only if modified, or otherwise it will possibly go into
+ // an endless loop
if ( !pImp->bModalMode != !bModal )
{
- // zentral mitz"ahlen
+ // Central count
sal_uInt16 &rDocModalCount = SFX_APP()->Get_Impl()->nDocModalMode;
if ( bModal )
++rDocModalCount;
else
--rDocModalCount;
- // umschalten
+ // Switch
pImp->bModalMode = bModal;
Broadcast( SfxSimpleHint( SFX_HINT_MODECHANGED ) );
}
@@ -775,38 +775,39 @@ IndexBitSet& SfxObjectShell::GetNoSet_Impl()
void SfxObjectShell::SetTitle
(
- const String& rTitle // der neue Titel des Dokuments
+ const String& rTitle // the new Document Title
)
-/* [Beschreibung]
+/* [Description]
- Mit dieser Methode kann der Titel des Dokuments gesetzt werden.
- Dieser entspricht initial dem kompletten Dateinamen. Ein Setzen
- des Titels wirkt jedoch nicht zu"uck auf den Dateinamen; er wird
- jedoch in den Caption-Bars der MDI-Fenster angezeigt.
+ With this method, the title of the document can be set.
+ This corresponds initially to the full file name. A setting of the
+ title does not affect the file name, but it will be shown in the
+ Caption-Bars of the MDI-window.
*/
{
DBG_CHKTHIS(SfxObjectShell, 0);
- // nix zu tun?
+ // Nothing to do?
if ( ( ( HasName() && pImp->aTitle == rTitle )
|| ( !HasName() && GetTitle() == rTitle ) )
&& !IsDocShared() )
return;
SfxApplication *pSfxApp = SFX_APP();
- // ggf. die unbenannt-Nummer freigeben
+
+ // If possible relase the unnamed number.
if ( pImp->bIsNamedVisible && USHRT_MAX != pImp->nVisualDocumentNumber )
{
pSfxApp->ReleaseIndex(pImp->nVisualDocumentNumber);
pImp->bIsNamedVisible = 0;
}
- // Title setzen
+ // Set Title
pImp->aTitle = rTitle;
- // Benachrichtigungen
+ // Notification
if ( GetMedium() )
{
SfxShell::SetName( GetTitle(SFX_TITLE_APINAME) );
@@ -832,52 +833,53 @@ String X(const String &rRet)
String SfxObjectShell::GetTitle
(
sal_uInt16 nMaxLength /* 0 (default)
- der Titel selbst, so wie er ist
+ the title itself, as it is
1 (==SFX_TITLE_FILENAME)
- liefert den logischen Dateinamen ohne Pfad
- (unter WNT je nach Systemeinstellung ohne
- Extension)
+ provides the logical file name without path
+ (under WNT depending on the system settings
+ without extension)
2 (==SFX_TITLE_FULLNAME)
- liefert den mit komplettem logischen Dateinamen
- mit Pfad (remote => ::com::sun::star::util::URL)
+ provides the logical file names with full path
+ (remote =>:: com:: sun:: star:: util:: URL)
3 (==SFX_TITLE_APINAME)
- liefert den logischen Dateinamen ohne Pfad
- und Extension
+ provides the logical filname without path
+ and extension
4 (==SFX_TITLE_DETECT)
- liefert den kompletten Titel, falls noch
- nicht gesetzt wird aber aus DocInfo oder
- dem Namen des Medium erzeugt
+ provides the complete title, if not set yet
+ it will be created from DocInfo or the name of
+ the medium.
5 (==SFX_TITLE_CAPTION)
- liefert den Titel so, wie MB ihn heute in
- der CaptionBar anzeigen m"ochte
+ provides the Title just like MB now in the
+ CaptionBar view
6 (==SFX_TITLE_PICKLIST)
- liefert den Titel so, wie MB ihn heute in
- der PickList anzeigen m"ochte
+ returns the Title, just like MB now would
+ display it in the in the PickList
7 (==SFX_TITLE_HISTORY)
- liefert den Titel so, wie MB ihn heute in
- der History anzeigen m"ochte
+ returns the Title just like MB now would
+ display it in the in the History
10 bis USHRT_MAX
- liefert maximal 'nMaxLength' Zeichen vom logischen
- Dateinamen inkl. Pfad (remote => ::com::sun::star::util::URL)
+ provides the 'nMaxLength' of the logical
+ file name including the path
+ (remote => ::com::sun::star::util::URL)
*/
) const
-/* [Beschreibung]
+/* [Description]
- Liefert den Titel bzw. logischen Dateinamen des Dokuments, je nach
+ Returns the title or logical file name of the document, depending on the
'nMaxLength'.
- Falls der Dateiname mit Pfad verwendet wird, wird die Namensk"urzung durch
- Ersetzung eines oder mehrerer Directory-Namen durch "..." durchgef"uhrt,
- URLs werden z.Zt. immer komplett geliefert.
+ If the file name with path is used, the Name shortened by replacing one or
+ more directory names with "...", URLs are currently always returned
+ in complete form.
*/
{
@@ -885,7 +887,7 @@ String SfxObjectShell::GetTitle
if ( IsLoading() )
return String();
- // Titel erzeugen?
+ // Create Title?
if ( SFX_TITLE_DETECT == nMaxLength && !pImp->aTitle.Len() )
{
static sal_Bool bRecur = sal_False;
@@ -914,38 +916,37 @@ String SfxObjectShell::GetTitle
else if (SFX_TITLE_APINAME == nMaxLength )
return X(GetAPIName());
- // Sonderfall Vorlagen:
+ // Special case templates:
if( IsTemplate() && pImp->aTitle.Len() &&
( nMaxLength == SFX_TITLE_CAPTION || nMaxLength == SFX_TITLE_PICKLIST ) )
return X(pImp->aTitle);
- // Picklist/Caption wird gemappt
+ // Picklist/Caption is mapped
if ( pMed && ( nMaxLength == SFX_TITLE_CAPTION || nMaxLength == SFX_TITLE_PICKLIST ) )
{
- // Wenn ein spezieller Titel beim "Offnen mitgegeben wurde;
- // wichtig bei URLs, die INET_PROT_FILE verwenden, denn bei denen
- // wird der gesetzte Titel nicht beachtet.
- // (s.u., Auswertung von aTitleMap_Impl)
+ // If a specific title was given at open:
+ // important for URLs: use INET_PROT_FILE for which the set title is not
+ // considered. (See below, analysis of aTitleMap_Impl)
SFX_ITEMSET_ARG( pMed->GetItemSet(), pNameItem, SfxStringItem, SID_DOCINFO_TITLE, sal_False );
if ( pNameItem )
return X( pNameItem->GetValue() );
}
- // noch unbenannt?
- DBG_ASSERT( !HasName() || pMed, "HasName() aber kein Medium?!?" );
+ // Still unnamed?
+ DBG_ASSERT( !HasName() || pMed, "HasName() but no Medium?!?" );
if ( !HasName() || !pMed )
{
- // schon Titel gesezt?
+ // Title already set?
if ( pImp->aTitle.Len() )
return X(pImp->aTitle);
- // mu\s es durchnumeriert werden?
+ // must it be numbered?
String aNoName( SfxResId( STR_NONAME ) );
if ( pImp->bIsNamedVisible )
- // Nummer hintenanh"angen
+ // Append number
aNoName += String::CreateFromInt32( pImp->nVisualDocumentNumber );
- // Dokument hei\st vorerst 'unbenannt#'
+ // Document called "noname" for the time being
return X(aNoName);
}
@@ -960,7 +961,7 @@ String SfxObjectShell::GetTitle
nMaxLength = aTitleMap_Impl[nMaxLength-SFX_TITLE_CAPTION][nRemote];
}
- // lokale Datei?
+ // Local file?
if ( aURL.GetProtocol() == INET_PROT_FILE )
{
String aName( aURL.HasMark() ? INetURLObject( aURL.GetURLNoMark() ).PathToFileName() : aURL.PathToFileName() );
@@ -975,7 +976,7 @@ String SfxObjectShell::GetTitle
}
else
{
- // ::com::sun::star::util::URL-Versionen
+ // ::com::sun::star::util::URL-Versions
if ( nMaxLength >= SFX_TITLE_MAXLEN )
{
String aComplete( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
@@ -999,7 +1000,7 @@ String SfxObjectShell::GetTitle
else if ( nMaxLength == SFX_TITLE_FULLNAME )
return X(aURL.GetMainURL( INetURLObject::DECODE_TO_IURI ));
- // ggf. Titel aus Dateiname generieren
+ // Generate Title from file name if possible
if ( !pImp->aTitle.Len() )
pImp->aTitle = aURL.GetBase();
@@ -1008,7 +1009,7 @@ String SfxObjectShell::GetTitle
pImp->aTitle = aURL.GetMainURL( INetURLObject::DECODE_WITH_CHARSET );
}
- // ganzer Titel
+ // Complete Title
return X(pImp->aTitle);
}
@@ -1016,18 +1017,16 @@ String SfxObjectShell::GetTitle
void SfxObjectShell::InvalidateName()
-/* [Beschreibung]
+/* [Description]
- Ermittelt den Titel des Dokuments neu aus 'unbenannt', DocInfo-Titel
- bzw. Dateinamen. Wird nach Laden aus Template oder SaveAs ben"otigt.
+ Returns the title of the new document, DocInfo-Title or
+ File name. Is required for loading from template or SaveAs.
*/
{
- // Title neu erzeugen
pImp->aTitle.Erase();
SetName( GetTitle( SFX_TITLE_APINAME ) );
- // Benachrichtigungen
Broadcast( SfxSimpleHint(SFX_HINT_TITLECHANGED) );
}
@@ -1037,9 +1036,7 @@ void SfxObjectShell::SetNamedVisibility_Impl()
{
if ( !pImp->bIsNamedVisible )
{
- // Nummer verpassen
pImp->bIsNamedVisible = sal_True;
- // ggf. neue Nummer verpassen
if ( !HasName() && USHRT_MAX == pImp->nVisualDocumentNumber && !pImp->aTitle.Len() )
{
pImp->nVisualDocumentNumber = SFX_APP()->GetFreeIndex();
@@ -1074,14 +1071,14 @@ SfxProgress* SfxObjectShell::GetProgress() const
void SfxObjectShell::SetProgress_Impl
(
- SfxProgress *pProgress /* zu startender <SfxProgress> oder 0, falls
- der Progress zur"uckgesetzt werden soll */
+ SfxProgress *pProgress /* to started <SfxProgress> or 0,
+ if the progress is to be reset */
)
-/* [Beschreibung]
+/* [Description]
- Interne Methode zum setzen oder zur"ucksetzen des Progress-Modes
- f"ur diese SfxObjectShell.
+ Internal method to set or reset the Progress modes for
+ SfxObjectShell.
*/
{
@@ -1122,10 +1119,11 @@ void SfxObjectShell::SetActivateEvent_Impl(sal_uInt16 nId )
//--------------------------------------------------------------------
void SfxObjectShell::RegisterTransfer( SfxMedium& rMedium )
-/* [Beschreibung ]
- Alle Medien, die aufgesetzt werden, um Teile eines Dokumentes zu
- laden, muessen an der zugehoerigen SfxObjectShell angemeldet
- werden. So kann dokumentweise abgebrochen werden. */
+/* [Description]
+
+ All media, which are placed in order to load parts of a document must be
+ registered by a related SfxObjectShell. Thus documents can be canceled.
+*/
{
rMedium.SetReferer( GetMedium()->GetName() );
}
@@ -1133,9 +1131,10 @@ void SfxObjectShell::RegisterTransfer( SfxMedium& rMedium )
//-------------------------------------------------------------------------
void SfxObjectShell::PrepareReload( )
-/* [Beschreibung ]
- Wird vor dem Reload gerufen und gibt die Moeglichkeit,
- etwaige Caches zu leeren. */
+/* [Description]
+
+ Is called before the Reload and gives the opportunity to clear any caches.
+*/
{
}
@@ -1143,8 +1142,10 @@ void SfxObjectShell::PrepareReload( )
void SfxObjectShell::LockAutoLoad( sal_Bool bLock )
-/* Verhindert ein evtl. eintreffendes AutoLoad. Wird auch vor AutoLoad
- eines umgebenden FrameSet beruecksichtigt.
+/* [Description]
+
+ Prevents an possible occuring autoload. Takes also FrameSet into account.
+ before the autoload.
*/
{
@@ -1156,21 +1157,21 @@ void SfxObjectShell::LockAutoLoad( sal_Bool bLock )
//-------------------------------------------------------------------------
-// kann nach frame.cxx gemoved werden, wenn 358+36x-Stand gemerged sind
+// Can be moved to frame.cxx, when 358+36x-State have been merged
sal_Bool SfxFrame::IsAutoLoadLocked_Impl() const
{
- // sein einges Doc gelockt?
+ // Its own Docucument is locked?
const SfxObjectShell* pObjSh = GetCurrentDocument();
if ( !pObjSh || !pObjSh->IsAutoLoadLocked() )
return sal_False;
- // seine Childs gelockt?
+ // Its Childs are locked?
for ( sal_uInt16 n = GetChildFrameCount(); n--; )
if ( !GetChildFrame(n)->IsAutoLoadLocked_Impl() )
return sal_False;
- // sonst ist AutoLoad erlaubt
+ // otherwise allow AutoLoad
return sal_True;
}
@@ -1178,8 +1179,8 @@ sal_Bool SfxFrame::IsAutoLoadLocked_Impl() const
sal_Bool SfxObjectShell::IsAutoLoadLocked() const
-/* Liefert, ob ein eintreffendes AutoLoad ausgefuehrt werden darf. Wird auch
- vor AutoLoad eines umgebenden FrameSet beruecksichtigt.
+/* Returns whether an Autoload is allowed to be executed. Before the
+ surrounding FrameSet of the AutoLoad is also taken into account as well.
*/
{
@@ -1429,7 +1430,7 @@ void SfxObjectShell::TemplateDisconnectionAfterLoad()
else
{
// !TODO/LATER: what's this?!
- // Interaktiv ( DClick, Contextmenu ) kommt kein Langname mit
+ // Interactiv ( DClick, Contextmenu ) no long name is included
aTemplateName = getDocProperties()->getTitle();
if ( !aTemplateName.Len() )
{
@@ -1519,8 +1520,10 @@ void SfxObjectShell::PositionView_Impl()
//-------------------------------------------------------------------------
sal_Bool SfxObjectShell::IsLoading() const
-/* [Beschreibung ]
- Has FinishedLoading been called? */
+/* [Description]
+
+ Has FinishedLoading been called?
+*/
{
return !( pImp->nLoadedFlags & SFX_LOADED_MAINDOCUMENT );
}
@@ -1528,9 +1531,11 @@ sal_Bool SfxObjectShell::IsLoading() const
//-------------------------------------------------------------------------
void SfxObjectShell::CancelTransfers()
-/* [Beschreibung ]
- Hier koennen Transfers gecanceled werden, die nicht mit
- RegisterTransfer registiert wurden */
+/* [Description]
+
+ Here can Transfers get canceled, which were not regestered
+ by RegisterTransfer.
+*/
{
if( ( pImp->nLoadedFlags & SFX_LOADED_ALL ) != SFX_LOADED_ALL )
{
@@ -1557,10 +1562,10 @@ void AutoReloadTimer_Impl::Timeout()
if ( pFrame )
{
- // momentan nicht m"oglich/sinnvoll?
+ // Not possible/meanigfull at the moment?
if ( !pObjSh->CanReload_Impl() || pObjSh->IsAutoLoadLocked() || Application::IsUICaptured() )
{
- // erneuten Versuch erlauben
+ // Allow a retry
Start();
return;
}
@@ -1800,7 +1805,7 @@ SvKeyValueIterator* SfxObjectShell::GetHeaderAttributes()
{
if( !pImp->xHeaderAttributes.Is() )
{
- DBG_ASSERT( pMedium, "Kein Medium" );
+ DBG_ASSERT( pMedium, "No Medium" );
pImp->xHeaderAttributes = new SfxHeaderAttributes_Impl( this );
}
return ( SvKeyValueIterator*) &pImp->xHeaderAttributes;
@@ -1828,7 +1833,7 @@ sal_Bool SfxObjectShell::IsPreview() const
SFX_ITEMSET_ARG( pMedium->GetItemSet(), pFlags, SfxStringItem, SID_OPTIONS, sal_False);
if ( pFlags )
{
- // Werte auf einzelne Items verteilen
+ // Distributed values among individual items
String aFileFlags = pFlags->GetValue();
aFileFlags.ToUpperAscii();
if ( STRING_NOTFOUND != aFileFlags.Search( 'B' ) )
@@ -1847,11 +1852,11 @@ sal_Bool SfxObjectShell::IsPreview() const
sal_Bool SfxObjectShell::IsSecure()
{
- // Wenn globale Warnung an ist, nach Secure-Referer-Liste gehen
+ // When global warning is on, go to Secure-Referer-Liste
String aReferer = GetMedium()->GetName();
if ( !aReferer.Len() )
{
- // bei neuen Dokumenten das Template als Referer nehmen
+ // for new documents use the template as reference
::rtl::OUString aTempl( getDocProperties()->getTemplateURL() );
if ( aTempl.getLength() )
aReferer = INetURLObject( aTempl ).GetMainURL( INetURLObject::NO_DECODE );
@@ -1979,7 +1984,7 @@ Window* SfxObjectShell::GetDialogParent( SfxMedium* pLoadingMedium )
String SfxObjectShell::UpdateTitle( SfxMedium* pMed, sal_uInt16 nDocViewNumber )
{
- // Titel des Fensters
+ // Title of the windows
String aTitle;
if ( pMed )
{
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 9710836a3517..24d6309c4d95 100755
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -453,7 +453,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
aSet.Put( SfxStringItem( SID_EXPLORER_PROPS_START, aTitle ) );
aSet.Put( SfxStringItem( SID_BASEURL, GetMedium()->GetBaseURL() ) );
- // creating dialog is done via virtual method; application will add its own statistics page
+ // creating dialog is done via virtual method; application will
+ // add its own statistics page
SfxDocumentInfoDialog *pDlg = CreateDocumentInfoDialog(0, aSet);
if ( RET_OK == pDlg->Execute() )
{
@@ -497,7 +498,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
return;
}
- //!! detaillierte Auswertung eines Fehlercodes
+ //!! detailed analysis of an error code
SfxObjectShellRef xLock( this );
// the model can not be closed till the end of this method
@@ -723,9 +724,9 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
SfxViewFrame *pFrame = GetFrame();
if ( pFrame && pFrame->GetFrame().GetParentFrame() )
{
- // Wenn SID_CLOSEDOC "uber Menue etc. ausgef"uhrt wird, das
- // aktuelle Dokument aber in einem Frame liegt, soll eigentlich
- // das FrameSetDocument geclosed werden
+ // If SID_CLOSEDOC is excecuted through menu and so on, but
+ // the current document is in a frame, then the
+ // FrameSetDocument should actually be closed.
pFrame->GetTopViewFrame()->GetObjectShell()->ExecuteSlot( rReq );
rReq.Done();
return;
@@ -738,8 +739,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
{
if ( pFrame->GetFrame().GetParentFrame() )
{
- // Auf dieses Dokument existiert noch eine Sicht, die
- // in einem FrameSet liegt; diese darf nat"urlich nicht
+ // In this document there still exists a view that is
+ // in a FrameSet , which of course may not be closed
// geclosed werden
bInFrameSet = sal_True;
}
@@ -751,7 +752,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
if ( bInFrameSet )
{
- // Alle Sichten, die nicht in einem FrameSet liegen, closen
+ // Close all views that are not in a FrameSet.
pFrame = SfxViewFrame::GetFirst( this );
while ( pFrame )
{
@@ -761,7 +762,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
}
}
- // Parameter auswerten
+ // Evaluate Parameter
SFX_REQUEST_ARG(rReq, pSaveItem, SfxBoolItem, SID_CLOSEDOC_SAVE, sal_False);
SFX_REQUEST_ARG(rReq, pNameItem, SfxStringItem, SID_CLOSEDOC_FILENAME, sal_False);
if ( pSaveItem )
@@ -789,7 +790,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
SetModified(sal_False);
}
- // Benutzer bricht ab?
+ // Cancelled by the user?
if ( !PrepareClose( 2 ) )
{
rReq.SetReturnValue( SfxBoolItem(0, sal_False) );
@@ -803,7 +804,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
rReq.SetReturnValue( SfxBoolItem(0, sal_True) );
rReq.Done();
- rReq.ReleaseArgs(); // da der Pool in Close zerst"ort wird
+ rReq.ReleaseArgs(); // because the pool is destroyed in Close
DoClose();
return;
}
@@ -811,7 +812,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case SID_DOCTEMPLATE:
{
- // speichern als Dokumentvorlagen
+ // save as document templates
SfxDocumentTemplateDlg *pDlg = 0;
SfxErrorContext aEc(ERRCTX_SFX_DOCTEMPLATE,GetTitle());
SfxDocumentTemplates *pTemplates = new SfxDocumentTemplates;
@@ -875,7 +876,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
rReq.SetReturnValue( SfxBoolItem( 0, bOk ) );
if ( bOk )
{
- // update the Organizer runtime cache from the template component if the cache has already been created
+ // update the Organizer runtime cache from the template
+ // component if the cache has already been created
// TODO/LATER: get rid of this cache duplication
SfxDocumentTemplates aTemplates;
aTemplates.ReInitFromComponent();
@@ -890,7 +892,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
}
}
- // Picklisten-Eintrag verhindern
+ // Prevent entry in the Pick-lists
if ( rReq.IsAPI() )
GetMedium()->SetUpdatePickList( sal_False );
else if ( rReq.GetArgs() )
@@ -900,7 +902,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
GetMedium()->SetUpdatePickList( pPicklistItem->GetValue() );
}
- // Ignore()-Zweige haben schon returnt
+ // Ignore()-branches have already returned
rReq.Done();
}
@@ -967,9 +969,10 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
SfxViewFrame *pFrame = GetFrame();
if ( pFrame && pFrame->GetFrame().GetParentFrame() )
{
- // Wenn SID_CLOSEDOC "uber Menue etc. ausgef"uhrt wird, das
- // aktuelle Dokument aber in einem Frame liegt, soll eigentlich
- // das FrameSetDocument geclosed werden
+
+ // If SID_CLOSEDOC is excecuted through menu and so on, but
+ // the current document is in a frame, then the
+ // FrameSetDocument should actually be closed.
pDoc = pFrame->GetTopViewFrame()->GetObjectShell();
}
@@ -1376,8 +1379,9 @@ void SfxObjectShell::ImplSign( sal_Bool bScriptingContent )
}
else
{
- //When the document is modified then we must not show the digital signatures dialog
- //If we have come here then the user denied to save.
+ // When the document is modified then we must not show the
+ // digital signatures dialog
+ // If we have come here then the user denied to save.
if (!bHasSign)
bNoSig = true;
}
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index c1376729e5e2..106455376b6f 100755
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -440,25 +440,24 @@ sal_Bool SfxObjectShell::Load( SfxMedium& rMedium )
}
sal_Bool SfxObjectShell::DoInitNew( SfxMedium* pMed )
-/* [Beschreibung]
+/* [Description]
- Diese von SvPersist geerbte virtuelle Methode wird gerufen, um
- die SfxObjectShell-Instanz aus einem Storage (pStor != 0) bzw.
- (pStor == 0) ganz neu zu initialisieren.
+ This from SvPersist inherited virtual method is called to initialize
+ the SfxObjectShell instance from a storage (PStore! = 0) or (PStore == 0)
- Wie alle Do...-Methoden liegt hier eine Steuerung vor, die eigentliche
- Implementierung erfolgt, indem die ebenfalls virtuellen Methode
- InitNew(SvStorate*) von der SfxObjectShell-Subclass implementiert wird.
+ Like with all Do...-methods there is a from a control, the actual
+ implementation is done by the virtual method in which also the
+ InitNew(SvStorate *) from the SfxObjectShell-Subclass is implemented.
- F"ur pStor == 0 wird ein die SfxObjectShell-Instanz mit einem leeren
- SfxMedium verbunden, sonst mit einem SfxMedium, welches auf den
- als Parameter "ubergeben SvStorage verweist.
+ For pStore == 0 the SfxObjectShell-instance is connected to an empty
+ SfxMedium, otherwise a SfxMedium, which refers to the SvStorage
+ passed as a parameter.
- Erst nach InitNew() oder Load() ist das Objekt korrekt initialisiert.
+ The object is only initialized correctly after InitNew() or Load().
- [R"uckgabewert]
- sal_True Das Objekt wurde initialisiert.
- sal_False Das Objekt konnte nicht initialisiert werden
+ [Return value]
+ sal_True The object has been initialized.
+ sal_False The object could not be initialized
*/
{
@@ -775,7 +774,7 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed )
{
}
- // Falls nicht asynchron geladen wird selbst FinishedLoading aufrufen
+ // If not loaded asynchronously call FinishedLoading
if ( !( pImp->nLoadedFlags & SFX_LOADED_MAINDOCUMENT ) &&
( !pMedium->GetFilter() || pMedium->GetFilter()->UsesStorage() )
)
@@ -956,9 +955,9 @@ sal_Bool SfxObjectShell::IsPackageStorageFormat_Impl(const SfxMedium &rMedium) c
//-------------------------------------------------------------------------
sal_Bool SfxObjectShell::DoSave()
-// DoSave wird nur noch ueber OLE aufgerufen. Sichern eigener Dokumente im SFX
-// laeuft uber DoSave_Impl, um das Anlegen von Backups zu ermoeglichen.
-// Save in eigenes Format jetzt auch wieder Hierueber
+// DoSave is only invoked for OLE. Save your own documents in the SFX through
+// DoSave_Impl order to allow for the creation of backups.
+// Save in your own format again.
{
sal_Bool bOk = sal_False ;
{
@@ -1050,18 +1049,17 @@ void Lock_Impl( SfxObjectShell* pDoc, sal_Bool bLock )
sal_Bool SfxObjectShell::SaveTo_Impl
(
- SfxMedium &rMedium, // Medium, in das gespeichert werden soll
+ SfxMedium &rMedium, // Medium, in which it will be stored
const SfxItemSet* pSet
)
-/* [Beschreibung]
+/* [Description]
- Schreibt den aktuellen Inhalt in das Medium rMedium.
- Ist das Zielmedium kein Storage, so wird ueber ein temporaeres
- Medium gespeichert, sonst direkt, da das Medium transacted
- geschaltet ist, wenn wir es selbst geoeffnet haben und falls wir
- Server sind entweder der Container einen transacted Storage zur
- Verfuegung stellt oder selbst einen temporaeren Storage erzeugt hat.
+ Writes the current contents to the medium rMedium. If the target medium is
+ no storage, then saving to a temporary storage, or directly if the medium
+ is transacted, if we ourselves have opened it, and if we are a server
+ either the container a transacted storage provides or created a
+ temporary storage by one self.
*/
{
@@ -1166,7 +1164,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
if ( bCopyTo && GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
{
- // export to the same location is vorbidden
+ // export to the same location is forbidden
SetError( ERRCODE_IO_CANTWRITE, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
}
else
@@ -1836,14 +1834,12 @@ sal_Bool SfxObjectShell::ConnectTmpStorage_Impl(
const uno::Reference< embed::XStorage >& xStorage,
SfxMedium* pMediumArg )
-/* [Beschreibung]
+/* [Description]
- Arbeitet die Applikation auf einem temporaeren Storage,
- so darf der temporaere Storage nicht aus dem SaveCompleted
- genommen werden. Daher wird in diesem Fall schon hier an
- den neuen Storage connected. SaveCompleted tut dann nichts.
-
- */
+ If the application operates on a temporary storage, then it may not take
+ the temporary storage from the SaveCompleted. Therefore the new storage
+ is connected already here in this case and SaveCompleted then does nothing.
+*/
{
RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mv76033) SfxObjectShell::ConnectTmpStorage_Impl" );
@@ -1963,7 +1959,7 @@ sal_Bool SfxObjectShell::DoSaveObjectAs( SfxMedium& rMedium, sal_Bool bCommit )
// TODO/LATER: may be the call must be removed completelly
sal_Bool SfxObjectShell::DoSaveAs( SfxMedium& rMedium )
{
- // hier kommen nur Root-Storages rein, die via Temp-File gespeichert werden
+ // here only root storages are included, which are stored via temp file
rMedium.CreateTempFileNoCopy();
SetError(rMedium.GetErrorCode(), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
if ( GetError() )
@@ -2028,7 +2024,8 @@ sal_Bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed )
} catch( uno::Exception& )
{
// the storage is disposed already
- // can happen during reload scenario when the medium has disposed it during the closing
+ // can happen during reload scenario when the medium has
+ // disposed it during the closing
// will be fixed in one of the next milestones
}
}
@@ -2072,7 +2069,7 @@ sal_Bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed )
else
bOk = SaveCompleted( NULL );
}
- // entweder Save oder ConvertTo
+ // either Save or ConvertTo
else
bOk = SaveCompleted( NULL );
}
@@ -2106,14 +2103,15 @@ sal_Bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed )
// TODO/LATER: in future the medium must control own signature state, not the document
pNewMed->SetCachedSignatureState_Impl( SIGNATURESTATE_NOSIGNATURES ); // set the default value back
- // Titel neu setzen
+ // Set new title
if ( pNewMed->GetName().Len() && SFX_CREATE_MODE_EMBEDDED != eCreateMode )
InvalidateName();
- SetModified(sal_False); // nur bei gesetztem Medium zur"ucksetzen
+ SetModified(sal_False); // reset only by set medium
Broadcast( SfxSimpleHint(SFX_HINT_MODECHANGED) );
- // this is the end of the saving process, it is possible that the file was changed
- // between medium commit and this step ( attributes change and so on )
+ // this is the end of the saving process, it is possible that
+ // the file was changed
+ // between medium commit and this step (attributes change and so on)
// so get the file date again
if ( pNewMed->DocNeedsFileDateCheck() )
pNewMed->GetInitFileDate( sal_True );
@@ -2130,35 +2128,33 @@ sal_Bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed )
sal_Bool SfxObjectShell::ConvertFrom
(
- SfxMedium& /*rMedium*/ /* <SfxMedium>, welches die Quell-Datei beschreibt
- (z.B. Dateiname, <SfxFilter>, Open-Modi etc.) */
+ SfxMedium& /*rMedium*/ /* <SfxMedium>, which describes the source file
+ (for example file name, <SfxFilter>,
+ Open-Modi and so on) */
)
-/* [Beschreibung]
+/* [Description]
- Diese Methode wird zum Laden von Dokumenten "uber alle Filter gerufen,
- die nicht SFX_FILTER_OWN sind oder f"ur die kein Clipboard-Format
- registriert wurde (also kein Storage-Format benutzen). Mit anderen Worten:
- mit dieser Methode wird importiert.
+ This method is called for loading of documents over all filters which are
+ not SFX_FILTER_OWN or for which no clipboard format has been registered
+ (thus no storage format that is used). In other words, whith this method
+ it is imported.
- Das hier zu "offende File sollte "uber 'rMedium' ge"offnet werden,
- um die richtigen Open-Modi zu gew"ahrleisten. Insbesondere wenn das
- Format beibehalten wird (nur m"oglich bei SFX_FILTER_SIMULATE oder
- SFX_FILTER_ONW) mu\s die Datei STREAM_SHARE_DENYWRITE ge"offnet werden.
+ Files which are to be opened here should be opened through 'rMedium'
+ to guarantee the right open modes. Especially if the format is retained
+ (only possible with SFX_FILTER_SIMULATE or SFX_FILTER_ONW) file which must
+ be opened STREAM_SHARE_DENYWRITE.
-
- [R"uckgabewert]
+ [Return value]
sal_Bool sal_True
- Das Dokument konnte geladen werden.
+ The document could be loaded.
sal_False
- Das Dokument konnte nicht geladen werden, ein
- Fehlercode ist mit <SvMedium::GetError()const> zu
- erhalten.
-
+ The document could not be loaded, an error code
+ received through <SvMedium::GetError()const>
- [Beispiel]
+ [Example]
sal_Bool DocSh::ConvertFrom( SfxMedium &rMedium )
{
@@ -2168,15 +2164,14 @@ sal_Bool SfxObjectShell::ConvertFrom
xStream->SetBufferSize(4096);
*xStream >> ...;
- // NICHT 'rMedium.CloseInStream()' rufen! File gelockt halten!
+ // Do not call 'rMedium.CloseInStream()'! Keep File locked!
return SVSTREAM_OK == rMedium.GetError();
}
return sal_False;
}
-
- [Querverweise]
+ [Cross-references]
<SfxObjectShell::ConvertTo(SfxMedium&)>
<SFX_FILTER_REGISTRATION>
@@ -2480,36 +2475,34 @@ sal_Bool SfxObjectShell::ExportTo( SfxMedium& rMedium )
sal_Bool SfxObjectShell::ConvertTo
(
- SfxMedium& /*rMedium*/ /* <SfxMedium>, welches die Ziel-Datei beschreibt
- (z.B. Dateiname, <SfxFilter>, Open-Modi etc.) */
+ SfxMedium& /*rMedium*/ /* <SfxMedium>, which describes the target file
+ (for example file name, <SfxFilter>,
+ Open-Modi and so on) */
)
-/* [Beschreibung]
-
- Diese Methode wird zum Speichern von Dokumenten "uber alle Filter gerufen,
- die nicht SFX_FILTER_OWN sind oder f"ur die kein Clipboard-Format
- registriert wurde (also kein Storage-Format benutzen). Mit anderen Worten:
- mit dieser Methode wird exportiert.
+/* [Description]
- Das hier zu "offende File sollte "uber 'rMedium' ge"offnet werden,
- um die richtigen Open-Modi zu gew"ahrleisten. Insbesondere wenn das
- Format beibehalten wird (nur m"oglich bei SFX_FILTER_SIMULATE oder
- SFX_FILTER_ONW) mu\s die Datei auch nach dem Speichern im Modus
- STREAM_SHARE_DENYWRITE ge"offnet bleiben.
+ This method is called for saving of documents over all filters which are
+ not SFX_FILTER_OWN or for which no clipboard format has been registered
+ (thus no storage format that is used). In other words, with this method
+ it is exported.
+ Files which are to be opened here should be opened through 'rMedium'
+ to guarantee the right open modes. Especially if the format is retained
+ (only possible with SFX_FILTER_SIMULATE or SFX_FILTER_ONW) file which must
+ be opened STREAM_SHARE_DENYWRITE.
- [R"uckgabewert]
+ [Return value]
sal_Bool sal_True
- Das Dokument konnte gespeichert werden.
+ The document could be saved.
sal_False
- Das Dokument konnte nicht gespeichert werden, ein
- Fehlercode ist mit <SvMedium::GetError()const> zu
- erhalten.
+ The document could not be saved, an error code is
+ received by <SvMedium::GetError()const>
- [Beispiel]
+ [Example]
sal_Bool DocSh::ConvertTo( SfxMedium &rMedium )
{
@@ -2519,14 +2512,13 @@ sal_Bool SfxObjectShell::ConvertTo
xStream->SetBufferSize(4096);
*xStream << ...;
- rMedium.CloseOutStream(); // "offnet automatisch wieder den InStream
+ rMedium.CloseOutStream(); // opens the InStream automatically
return SVSTREAM_OK == rMedium.GetError();
}
return sal_False ;
}
-
- [Querverweise]
+ [Cross-references]
<SfxObjectShell::ConvertFrom(SfxMedium&)>
<SFX_FILTER_REGISTRATION>
@@ -2549,8 +2541,9 @@ sal_Bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs )
pSet->ClearItem( SID_VERSION );
pSet->ClearItem( SID_DOC_BASEURL );
- // create a medium as a copy; this medium is only for writingm, because it uses the same name as the original one
- // writing is done through a copy, that will be transferred to the target ( of course after calling HandsOff )
+ // create a medium as a copy; this medium is only for writingm, because it
+ // uses the same name as the original one writing is done through a copy,
+ // that will be transferred to the target (of course after calling HandsOff)
SfxMedium* pMediumTmp = new SfxMedium( pRetrMedium->GetName(), pRetrMedium->GetOpenMode(), pRetrMedium->IsDirect(), pFilter, pSet );
pMediumTmp->SetLongName( pRetrMedium->GetLongName() );
if ( pMediumTmp->GetErrorCode() != ERRCODE_NONE )
@@ -2585,7 +2578,8 @@ sal_Bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs )
sal_Bool bOpen( sal_False );
bOpen = DoSaveCompleted( pMediumTmp );
- DBG_ASSERT(bOpen,"Fehlerbehandlung fuer DoSaveCompleted nicht implementiert");
+
+ DBG_ASSERT(bOpen,"Error handling for DoSaveCompleted not implemented");
(void)bOpen;
}
else
@@ -2667,7 +2661,7 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl
if ( aURL != INetURLObject( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:stream" ) ) ) )
{
- // gibt es schon ein Doc mit dem Namen?
+ // Is there already a Document with this name?
SfxObjectShell* pDoc = 0;
for ( SfxObjectShell* pTmp = SfxObjectShell::GetFirst();
pTmp && !pDoc;
@@ -2682,14 +2676,14 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl
}
if ( pDoc )
{
- // dann Fehlermeldeung: "schon offen"
+ // Then error message: "already opened"
SetError(ERRCODE_SFX_ALREADYOPEN, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
return sal_False;
}
}
DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "Illegal URL!" );
- DBG_ASSERT( aParams->Count() != 0, "fehlerhafte Parameter");
+ DBG_ASSERT( aParams->Count() != 0, "Incorrect Parameter");
SFX_ITEMSET_ARG( aParams, pSaveToItem, SfxBoolItem, SID_SAVETO, sal_False );
sal_Bool bSaveTo = pSaveToItem ? pSaveToItem->GetValue() : sal_False;
@@ -2736,7 +2730,7 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl
{
pImp->bWaitingForPicklist = sal_True;
- // Daten am Medium updaten
+ // Update Data on media
SfxItemSet *pSet = GetMedium()->GetItemSet();
pSet->ClearItem( SID_INTERACTIONHANDLER );
pSet->ClearItem( SID_PROGRESS_STATUSBAR_CONTROL );
@@ -2968,11 +2962,10 @@ sal_Bool SfxObjectShell::IsInformationLost()
//-------------------------------------------------------------------------
sal_Bool SfxObjectShell::CanReload_Impl()
-/* [Beschreibung]
+/* [Description]
- Interne Methode zum Feststellen, ob eine erneutes Laden des
- Dokuments (auch als RevertToSaved oder LastVersion bekannt)
- m"oglich ist.
+ Internal method for determining whether a reload of the document
+ (as RevertToSaved or last known version) is possible.
*/
{
@@ -3302,7 +3295,8 @@ sal_Bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >&
{
if ( xStorage.is() && pImp->m_xDocStorage != xStorage )
{
- // make sure that until the storage is assigned the object container is not created by accident!
+ // make sure that until the storage is assigned the object
+ // container is not created by accident!
DBG_ASSERT( bHasContainer == (pImp->mpObjectContainer != 0), "Wrong storage in object container!" );
xOldStorageHolder = pImp->m_xDocStorage;
pImp->m_xDocStorage = xStorage;
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index f37bb9f469dd..fc6856fdb083 100755
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -195,7 +195,12 @@ void SAL_CALL SfxModelListener_Impl::disposing( const com::sun::star::lang::Even
SfxObjectShell::SetCurrentComponent( Reference< XInterface >() );
}
- if ( !mpDoc->Get_Impl()->bClosing )
+ if ( mpDoc->Get_Impl()->bHiddenLockedByAPI )
+ {
+ mpDoc->Get_Impl()->bHiddenLockedByAPI = sal_False;
+ mpDoc->OwnerLock(sal_False);
+ }
+ else if ( !mpDoc->Get_Impl()->bClosing )
// GCC stuerzt ab, wenn schon im dtor, also vorher Flag abfragen
mpDoc->DoClose();
}
@@ -308,30 +313,28 @@ SfxObjectShell::SfxObjectShell( const sal_uInt64 i_nCreationFlags )
SfxObjectShell::SfxObjectShell
(
- SfxObjectCreateMode eMode /* Zweck, zu dem die SfxObjectShell
- erzeugt wird:
+ SfxObjectCreateMode eMode /* Purpose, io which the SfxObjectShell
+ is created:
SFX_CREATE_MODE_EMBEDDED (default)
- als SO-Server aus einem anderen
- Dokument heraus
+ as SO-Server from within another
+ Document
SFX_CREATE_MODE_STANDARD,
- als normales, selbst"aendig ge"offnetes
- Dokument
+ as a normal Document open stand-alone
SFX_CREATE_MODE_PREVIEW
- um ein Preview durchzuf"uhren,
- ggf. werden weniger Daten ben"otigt
+ to enable a Preview, if possible are
+ only little information is needed
SFX_CREATE_MODE_ORGANIZER
- um im Organizer dargestellt zu
- werden, hier werden keine Inhalte
- ben"otigt */
+ to be displayed in the Organizer, here
+ notning of the contents is used */
)
-/* [Beschreibung]
+/* [Description]
- Konstruktor der Klasse SfxObjectShell.
+ Constructor of the class SfxObjectShell.
*/
: pImp( new SfxObjectShell_Impl( *this ) ),
@@ -345,7 +348,7 @@ SfxObjectShell::SfxObjectShell
//--------------------------------------------------------------------
-// virtual dtor of typical base-class SfxObjectShell
+// virtual destructor of typical base-class SfxObjectShell
SfxObjectShell::~SfxObjectShell()
{
@@ -354,9 +357,8 @@ SfxObjectShell::~SfxObjectShell()
if ( IsEnableSetModified() )
EnableSetModified( sal_False );
- // Niemals GetInPlaceObject() aufrufen, der Zugriff auf den
- // Ableitungszweig SfxInternObject ist wegen eines Compiler Bugs nicht
- // erlaubt
+ // Never call GetInPlaceObject(), the access to the derivative branch
+ // SfxInternObject is not allowed because of a compiler bug
SfxObjectShell::Close();
pImp->pBaseModel.set( NULL );
@@ -366,7 +368,7 @@ SfxObjectShell::~SfxObjectShell()
if ( USHRT_MAX != pImp->nVisualDocumentNumber )
pSfxApp->ReleaseIndex(pImp->nVisualDocumentNumber);
- // Basic-Manager zerst"oren
+ // Destroy Basic-Manager
pImp->pBasicManager->reset( NULL );
if ( pSfxApp->GetDdeService() )
@@ -426,9 +428,9 @@ sal_Bool SfxObjectShell::Stamp_GetPrintCancelState() const
void SfxObjectShell::ViewAssigned()
-/* [Beschreibung]
+/* [Description]
- Diese Methode wird gerufen, wenn eine View zugewiesen wird.
+ This method is called when a view is assigned.
*/
{
@@ -443,7 +445,7 @@ sal_Bool SfxObjectShell::Close()
SfxObjectShellRef aRef(this);
if ( !pImp->bClosing )
{
- // falls noch ein Progress l"auft, nicht schlie\sen
+ // Do not close if a progress is still running
if ( !pImp->bDisposing && GetProgress() )
return sal_False;
@@ -464,7 +466,7 @@ sal_Bool SfxObjectShell::Close()
if ( pImp->bClosing )
{
- // aus Document-Liste austragen
+ // remove from Document list
SfxApplication *pSfxApp = SFX_APP();
SfxObjectShellArr_Impl &rDocs = pSfxApp->GetObjectShells_Impl();
const SfxObjectShell *pThis = this;
@@ -565,7 +567,8 @@ struct BoolEnv_Impl
sal_uInt16 SfxObjectShell::PrepareClose
(
- sal_Bool bUI, // sal_True: Dialoge etc. erlaubt, sal_False: silent-mode
+ sal_Bool bUI, // sal_True: Dialog and so on is allowed
+ // sal_False: silent-mode
sal_Bool bForBrowsing
)
{
@@ -585,7 +588,7 @@ sal_uInt16 SfxObjectShell::PrepareClose
for ( SfxViewFrame* pFrm = SfxViewFrame::GetFirst( this );
pFrm; pFrm = SfxViewFrame::GetNext( *pFrm, this ) )
{
- DBG_ASSERT(pFrm->GetViewShell(),"KeineShell");
+ DBG_ASSERT(pFrm->GetViewShell(),"No Shell");
if ( pFrm->GetViewShell() )
{
sal_uInt16 nRet = pFrm->GetViewShell()->PrepareClose( bUI, bForBrowsing );
@@ -603,19 +606,19 @@ sal_uInt16 SfxObjectShell::PrepareClose
return sal_True;
}
- // ggf. nachfragen, ob gespeichert werden soll
- // nur fuer in sichtbaren Fenstern dargestellte Dokumente fragen
+ // Ask if possible if it should be saved
+ // only ask for the Document in the visable window
SfxViewFrame *pFrame = SfxObjectShell::Current() == this
? SfxViewFrame::Current() : SfxViewFrame::GetFirst( this );
if ( bUI && IsModified() && pFrame )
{
- // minimierte restoren
+ // restore minimized
SfxFrame& rTop = pFrame->GetTopFrame();
SfxViewFrame::SetViewFrame( rTop.GetCurrentViewFrame() );
pFrame->GetFrame().Appear();
- // fragen, ob gespeichert werden soll
+ // Ask if to save
short nRet = RET_YES;
{
//initiate help agent to inform about "print modifies the document"
@@ -633,7 +636,7 @@ sal_uInt16 SfxObjectShell::PrepareClose
if ( RET_YES == nRet )
{
- // per Dispatcher speichern
+ // Save by each Dispatcher
const SfxPoolItem *pPoolItem;
if ( IsSaveVersionOnClose() )
{
@@ -653,7 +656,7 @@ sal_uInt16 SfxObjectShell::PrepareClose
return sal_False;
}
else if ( RET_CANCEL == nRet )
- // abgebrochen
+ // Cancelled
return sal_False;
else if ( RET_NEWTASK == nRet )
{
@@ -771,7 +774,7 @@ Reference< XLibraryContainer > SfxObjectShell::GetDialogContainer()
if ( pBasMgr )
return pBasMgr->GetDialogLibraryContainer().get();
- OSL_ENSURE( false, "SfxObjectShell::GetDialogContainer: falling back to the application - is this really expected here?" );
+ OSL_FAIL( "SfxObjectShell::GetDialogContainer: falling back to the application - is this really expected here?" );
return SFX_APP()->GetDialogContainer();
}
@@ -786,7 +789,7 @@ Reference< XLibraryContainer > SfxObjectShell::GetBasicContainer()
if ( pBasMgr )
return pBasMgr->GetScriptLibraryContainer().get();
- OSL_ENSURE( false, "SfxObjectShell::GetBasicContainer: falling back to the application - is this really expected here?" );
+ OSL_FAIL( "SfxObjectShell::GetBasicContainer: falling back to the application - is this really expected here?" );
return SFX_APP()->GetBasicContainer();
}
@@ -800,16 +803,16 @@ StarBASIC* SfxObjectShell::GetBasic() const
//--------------------------------------------------------------------
void SfxObjectShell::InitBasicManager_Impl()
-/* [Beschreibung]
+/* [Description]
- creates a document's BasicManager and loads it, if we are already based on
+ Creates a document's BasicManager and loads it, if we are already based on
a storage.
- [Anmerkung]
+ [Note]
- Diese Methode mu"s aus den "Uberladungen von <SvPersist::Load()> (mit
- dem pStor aus dem Parameter von Load()) sowie aus der "Uberladung
- von <SvPersist::InitNew()> (mit pStor = 0) gerufen werden.
+ This method has to be called through the overloading of
+ <SvPersist::Load()> (With the PStore from the parameters of load ())
+ and from the overloading of <SvPersist::InitNew()> (with PStore = 0).
*/
{
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index d0de20f85a77..abc3b0d38a3b 100755
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -323,7 +323,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SfxPrintHelper::getPrinter() thro
void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue >& rPrinter,SfxPrinter*& pPrinter,sal_uInt16& nChangeFlags,SfxViewShell*& pViewSh)
{
- // alten Printer beschaffen
+ // Get old Printer
SfxViewFrame *pViewFrm = m_pData->m_pObjectShell.Is() ?
SfxViewFrame::GetFirst( m_pData->m_pObjectShell, sal_False ) : 0;
if ( !pViewFrm )
@@ -436,13 +436,12 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue >
}
}
- //die PaperSize darf nur gesetzt werden, wenn tatsaechlich
- //PAPER_USER gilt, sonst koennte vom Treiber ein falsches Format gewaehlt werden
+ // The PaperSize may be set only when actually PAPER_USER
+ // applies, otherwise the driver could choose a invalid format.
if(nPaperFormat == view::PaperFormat_USER && aSetPaperSize.Width())
{
- //MapMode von 100mm in die am
- // Device gesetzten umrechnen. Zusaetzlich nur dann
- // setzen, wenn sie wirklich veraendert wurden.
+ // Bug 56929 - MapMode of 100mm which recalculated when
+ // the device is set. Additionally only set if they were really changed.
aSetPaperSize = pPrinter->LogicToPixel( aSetPaperSize, MAP_100TH_MM );
if( aSetPaperSize != pPrinter->GetPaperSizePixel() )
{
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 1fea79e7b607..480470c6ba25 100755
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -2703,7 +2703,7 @@ sal_Bool SfxBaseModel::IsInitialized() const
{
if ( !m_pData || !m_pData->m_pObjectShell )
{
- OSL_ENSURE( false, "SfxBaseModel::IsInitialized: this should have been caught earlier!" );
+ OSL_FAIL( "SfxBaseModel::IsInitialized: this should have been caught earlier!" );
return sal_False;
}
@@ -3018,7 +3018,7 @@ void SfxBaseModel::postEvent_Impl( const ::rtl::OUString& aName, const uno::Refe
#ifdef DBG_UTIL
ByteString aTmp( "SfxEvent: " );
aTmp += ByteString( String(aName), RTL_TEXTENCODING_UTF8 );
- DBG_TRACE( aTmp.GetBuffer() );
+ OSL_TRACE( "%s", aTmp.GetBuffer() );
#endif
document::EventObject aEvent( (frame::XModel*)this, aName );
@@ -4026,7 +4026,7 @@ SfxViewFrame* SfxBaseModel::FindOrCreateViewFrame_Impl( const Reference< XFrame
// destroyed later, and the new one, which we're going to create
continue;
- OSL_ENSURE( false, "SfxBaseModel::FindOrCreateViewFrame_Impl: there already is an SfxFrame for the given XFrame, but no view in it!" );
+ OSL_FAIL( "SfxBaseModel::FindOrCreateViewFrame_Impl: there already is an SfxFrame for the given XFrame, but no view in it!" );
// nowadays, we're the only instance allowed to create an SfxFrame for an XFrame, so this case here should not happen
break;
}
diff --git a/sfx2/source/inc/appdata.hxx b/sfx2/source/inc/appdata.hxx
index 28b9cbe1b850..a08f8035b03f 100755
--- a/sfx2/source/inc/appdata.hxx
+++ b/sfx2/source/inc/appdata.hxx
@@ -149,14 +149,14 @@ public:
SfxViewFrame* pViewFrame;
SfxSlotPool* pSlotPool;
SfxResourceManager* pResMgr;
- SfxDispatcher* pAppDispat; // Dispatcher falls kein Doc
+ SfxDispatcher* pAppDispat; // Dispatcher if no document
SfxInterface** pInterfaces;
- sal_uInt16 nDocNo; // Laufende Doc-Nummer (AutoName)
+ sal_uInt16 nDocNo; // current Doc-Number (AutoName)
sal_uInt16 nInterfaces;
- sal_Bool bDispatcherLocked:1; // nichts ausf"uhren
- sal_Bool bDowning:1; // sal_True ab Exit und danach
+ sal_Bool bDispatcherLocked:1; // do nothing
+ sal_Bool bDowning:1; // sal_True on Exit and afterwards
sal_Bool bInQuit : 1;
sal_Bool bInvalidateOnUnlock : 1;
sal_Bool bODFVersionWarningLater : 1;
diff --git a/sfx2/source/inc/mnucfga.hxx b/sfx2/source/inc/mnucfga.hxx
index ed59872059c9..72884e319bc3 100755
--- a/sfx2/source/inc/mnucfga.hxx
+++ b/sfx2/source/inc/mnucfga.hxx
@@ -39,7 +39,7 @@ struct SfxMenuCfgItem
{
sal_uInt16 nId; // id of the binding or 0 if none
String aTitle; // title of the item
- String aHelpText; // Hilfetext
+ String aHelpText;
String aCommand;
SfxMenuCfgItemArr* pPopup; // pointer to a popup menu (if any)
};
diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx
index 24f219e6a315..023031334fd3 100755
--- a/sfx2/source/inc/objshimp.hxx
+++ b/sfx2/source/inc/objshimp.hxx
@@ -78,18 +78,18 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
sal_uInt16 nVisualDocumentNumber;
sal_Int16 nDocumentSignatureState;
sal_Int16 nScriptingSignatureState;
- sal_Bool bInList:1, // ob per First/Next erreichbar
- bClosing:1, // sal_True w"aehrend Close(), um Benachrichtigungs-Rekursionen zu verhindern
+ sal_Bool bInList:1, // if reachable by First/Next
+ bClosing:1, // sal_True while Close(), to prevent recurrences Notification
bIsSaving:1,
bPasswd:1,
bIsTmp:1,
bIsNamedVisible:1,
bIsTemplate:1,
- bIsAbortingImport:1, // Importvorgang soll abgebrochen werden.
- bImportDone : 1, //Import schon fertig? Fuer AutoReload von Docs.
+ bIsAbortingImport:1, // Import operation should be canceled.
+ bImportDone : 1, // Import finished already? For auto reload of Docs.
bInPrepareClose : 1,
bPreparedForClose : 1,
- bWaitingForPicklist : 1,// Muss noch in die Pickliste
+ bWaitingForPicklist : 1, // Must go into pick list
bForbidReload : 1,
bBasicInitialized :1,
bIsPrintJobCancelable :1, // Stampit disable/enable cancel button for print jobs ... default = true = enable!
@@ -112,8 +112,8 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
IndexBitSet aBitSet;
sal_uInt32 lErr;
- sal_uInt16 nEventId; // falls vor Activate noch ein
- // Open/Create gesendet werden mu/s
+ sal_uInt16 nEventId; // If Open/Create as to be sent
+ // before Activate
AutoReloadTimer_Impl *pReloadTimer;
MarkData_Impl* pMarkData;
sal_uInt16 nLoadedFlags;
diff --git a/sfx2/source/inc/openflag.hxx b/sfx2/source/inc/openflag.hxx
index 1f28d0150075..7d9d881dc709 100755
--- a/sfx2/source/inc/openflag.hxx
+++ b/sfx2/source/inc/openflag.hxx
@@ -28,14 +28,13 @@
#ifndef _SFX_OPENFLAG_HXX
#define _SFX_OPENFLAG_HXX
-// Datei zum Bearbeiten "offnen, anschliessend funktioniert nur noch
-// die dritte Variante (Lesen einer Kopie)
+// Open file for editing, then only the third option (reading a copy) works
#define SFX_STREAM_READWRITE (STREAM_READWRITE | STREAM_SHARE_DENYWRITE)
-// Ich arbeite roh auf dem Original, keine Kopie
-// -> Datei kann anschliessend nicht zum Bearbeiten ge"offnet werden
+// I work on the original, not a copy
+// -> file then can not be opened for editing
#define SFX_STREAM_READONLY (STREAM_READ | STREAM_SHARE_DENYWRITE) // + !bDirect
-// Jemand anders bearbeitet das File, es wird eine Kopie erstellt
-// -> Datei kann anschliessend zum Bearbeiten ge"offnet werden
+// Someone else is editing the file, a copy it created
+// -> the file can then be opened for editing
#define SFX_STREAM_READONLY_MAKECOPY (STREAM_READ | STREAM_SHARE_DENYNONE)
diff --git a/sfx2/source/inc/sfxtypes.hxx b/sfx2/source/inc/sfxtypes.hxx
index 79ddfd740c25..94bef6d9a1dd 100755
--- a/sfx2/source/inc/sfxtypes.hxx
+++ b/sfx2/source/inc/sfxtypes.hxx
@@ -55,8 +55,8 @@ class Timer;
//------------------------------------------------------------------------
-// Macro fuer den Call-Profiler unter WinNT
-// mit S_CAP kann eine Messung gestarted, mit E_CAP wieder gestoppt werden
+// Macro for the Call-Profiler under WinNT
+// with S_CAP a measurement can be started, and stopped with E_CAP
#if defined( WNT ) && defined( PROFILE )
extern "C" {
diff --git a/sfx2/source/inc/statcach.hxx b/sfx2/source/inc/statcach.hxx
index 421a4be9e3ff..3a996b73fa82 100755
--- a/sfx2/source/inc/statcach.hxx
+++ b/sfx2/source/inc/statcach.hxx
@@ -81,17 +81,17 @@ friend class BindDispatch_Impl;
sal_uInt16 nId; // Slot-Id
SfxControllerItem* pInternalController;
com::sun::star::uno::Reference < com::sun::star::frame::XDispatch > xMyDispatch;
- SfxControllerItem* pController; // Ptr auf 1. gebundenen Controller (untereinander verkettet)
- SfxSlotServer aSlotServ; // SlotServer, SlotPtr = 0 -> Nicht auf Stack
- SfxPoolItem* pLastItem; // zuletzt verschicktes Item, nie -1
- SfxItemState eLastState; // zuletzt verschickter State
- sal_Bool bCtrlDirty:1; // Controller aktualisiert?
- sal_Bool bSlotDirty:1; // Funktion gfs. vorhanden, muss aktualisiert werden
- sal_Bool bItemVisible:1;// item visibility
- sal_Bool bItemDirty; // G"ultigkeit von pLastItem
+ SfxControllerItem* pController; // Pointer to first bound Controller (interlinked with each other)
+ SfxSlotServer aSlotServ; // SlotServer, SlotPtr = 0 -> not on Stack
+ SfxPoolItem* pLastItem; // Last sent Item, never -1
+ SfxItemState eLastState; // Last sent State
+ sal_Bool bCtrlDirty:1; // Update Controller?
+ sal_Bool bSlotDirty:1; // Present Funktion, must be updated
+ sal_Bool bItemVisible:1; // item visibility
+ sal_Bool bItemDirty; // Validity of pLastItem
private:
- SfxStateCache( const SfxStateCache& rOrig ); // n.i.
+ SfxStateCache( const SfxStateCache& rOrig ); // inward
void SetState_Impl( SfxItemState, const SfxPoolItem*, sal_Bool bMaybeDirty=sal_False );
public:
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index f8a2814576ae..c7d4e94d7f19 100755
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -161,9 +161,9 @@ protected:
ListBox aFilterLb;
Size aSize;
- sal_uInt16 nActFamily; // Id in der ToolBox = Position - 1
+ sal_uInt16 nActFamily; // Id in the ToolBox = Position - 1
sal_uInt16 nActFilter; // FilterIdx
- sal_uInt16 nAppFilter; // Filter, den die Applikation gesetzt hat (fuer automatisch)
+ sal_uInt16 nAppFilter; // Filter, which has set the application (for automatic)
sal_Bool bDontUpdate :1,
bIsWater :1,
@@ -223,8 +223,8 @@ protected:
void Update_Impl();
void UpdateFamily_Impl();
- // In welchem FamilyState muss ich nachsehen, um die Info der i-ten
- // Family in der pStyleFamilies zu bekommen.
+ // In which FamilyState do I have to look , in order to get the
+ // information of the ith Family in the pStyleFamilies.
sal_uInt16 StyleNrToInfoOffset( sal_uInt16 i );
sal_uInt16 InfoOffsetToStyleNr( sal_uInt16 i );
@@ -269,7 +269,7 @@ public:
// normaly for derivates from SvTreeListBoxes, but in this case the dialog handles context menus
virtual PopupMenu* CreateContextMenu( void );
- // Rechnet von den SFX_STYLE_FAMILY Ids auf 1-5 um
+ // converts from SFX_STYLE_FAMILY Ids to 1-5
static sal_uInt16 SfxFamilyIdToNId( SfxStyleFamily nFamily );
void SetAutomaticFilter();
diff --git a/sfx2/source/inc/virtmenu.hxx b/sfx2/source/inc/virtmenu.hxx
index 9e80468d7d64..1eea340f26a9 100755
--- a/sfx2/source/inc/virtmenu.hxx
+++ b/sfx2/source/inc/virtmenu.hxx
@@ -54,7 +54,7 @@ private:
PopupMenu* pWindowMenu;
PopupMenu* pPickMenu;
PopupMenu* pAddonsMenu;
- Timer* pAutoDeactivate; // Hack fuer QAP-Bug
+ Timer* pAutoDeactivate; // Hack for QAP-Bug
sal_uInt16 nVisibleItems;
sal_uInt16 nId;
sal_uInt16 nCount;
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index 3b06553ecb14..0acaf892f93b 100755
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -38,7 +38,7 @@
#include <cppuhelper/weak.hxx>
#include <cppuhelper/propshlp.hxx>
-#define _SVSTDARR_USHORTS
+#define _SVSTDARR_sal_uInt16S
#include <svl/svstdarr.hxx> // SvUShorts
#include <rtl/ustring.hxx>
#include <osl/mutex.hxx>
@@ -56,12 +56,12 @@ class SfxSplitWindow;
class SfxWorkWindow;
//====================================================================
-// Dieser struct h"alt alle relevanten Informationen "uber Toolboxen bereit.
+// This struct makes all relevant Informationen available of Toolboxes
struct SfxObjectBar_Impl
{
- sal_uInt16 nId; // Resource - und ConfigId der Toolbox
- sal_uInt16 nMode; // spezielle Sichtbarkeitsflags
+ sal_uInt16 nId; // Resource - and ConfigId of Toolbox
+ sal_uInt16 nMode; // special visibility flags
sal_uInt16 nPos;
sal_uInt16 nIndex;
sal_Bool bDestroy;
@@ -77,7 +77,8 @@ struct SfxObjectBar_Impl
};
//------------------------------------------------------------------------------
-// Dieser struct h"alt alle relevanten Informationen "uber die Statuszeile bereit.
+// This struct makes all relevant Informationen available of the status bar
+
struct SfxStatBar_Impl
{
sal_uInt16 nId;
@@ -94,9 +95,9 @@ struct SfxStatBar_Impl
//------------------------------------------------------------------------------
#define CHILD_NOT_VISIBLE 0
-#define CHILD_ACTIVE 1 // nicht durch HidePopups ausgeschaltet
-#define CHILD_NOT_HIDDEN 2 // nicht durch HideChildWindow ausgeschaltet
-#define CHILD_FITS_IN 4 // nicht zu gro\s f"ur OutputSize des parent
+#define CHILD_ACTIVE 1 // not disabled through HidePopups
+#define CHILD_NOT_HIDDEN 2 // not disabled through HideChildWindow
+#define CHILD_FITS_IN 4 // not too large for output size of the parent
#define CHILD_VISIBLE (CHILD_NOT_HIDDEN | CHILD_ACTIVE | CHILD_FITS_IN)
#define CHILD_ISVISIBLE (CHILD_NOT_HIDDEN | CHILD_ACTIVE)
@@ -132,13 +133,13 @@ class SfxChildWinController_Impl : public SfxControllerItem
struct SfxChildWin_Impl
{
- sal_uInt16 nSaveId; // die ChildWindow-Id
- sal_uInt16 nInterfaceId; // der aktuelle Context
- sal_uInt16 nId; // aktuelle Id
+ sal_uInt16 nSaveId; // the ChildWindow-Id
+ sal_uInt16 nInterfaceId; // the current context
+ sal_uInt16 nId; // current Id
SfxChildWindow* pWin;
sal_Bool bCreate;
SfxChildWinInfo aInfo;
- SfxChild_Impl* pCli; // != 0 bei direkten Children
+ SfxChild_Impl* pCli; // != 0 at direct Children
sal_uInt16 nVisibility;
sal_Bool bEnable;
sal_Bool bDisabled;
@@ -307,7 +308,7 @@ public:
{ return pParent; }
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > CreateDispatch( const String& );
- // Methoden f"ur alle Child-Fenster
+ // Methods for all Child windows
void DataChanged_Impl( const DataChangedEvent& rDCEvt );
void ReleaseChild_Impl( Window& rWindow );
SfxChild_Impl* RegisterChild_Impl( Window& rWindow, SfxChildAlignment eAlign, sal_Bool bCanGetFocus=sal_False );
@@ -328,7 +329,7 @@ public:
void SetFullScreen_Impl( sal_Bool bSet ) { bIsFullScreen = bSet; }
sal_Bool IsFullScreen_Impl() const { return bIsFullScreen; }
- // Methoden f"ur Objectbars
+ // Methods for Objectbars
virtual void UpdateObjectBars_Impl();
void ResetObjectBars_Impl();
void SetObjectBar_Impl( sal_uInt16 nPos, sal_uInt32 nResId,
@@ -344,7 +345,7 @@ public:
sal_uInt16 HasNextObjectBar_Impl( sal_uInt16 nPos, String* pStr=0 );
void SetObjectBarCustomizeMode_Impl( sal_Bool );
- // Methoden f"ur ChildWindows
+ // Methods for ChildWindows
void UpdateChildWindows_Impl();
void ResetChildWindows_Impl();
void SetChildWindowVisible_Impl( sal_uInt32, sal_Bool, sal_uInt16 );
@@ -366,7 +367,7 @@ public:
virtual sal_Bool ActivateNextChild_Impl( sal_Bool bForward = sal_True );
bool AllowChildWindowCreation_Impl( const SfxChildWin_Impl& i_rCW ) const;
- // Methoden f"ur StatusBar
+ // Methods for StatusBar
void SetTempStatusBar_Impl( sal_Bool bSet );
void ResetStatusBar_Impl();
void SetStatusBar_Impl(sal_uInt32 nResId, SfxShell *pShell, SfxBindings& );
diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx
index 330db8d3d0de..b34625820fae 100755
--- a/sfx2/source/menu/mnuitem.cxx
+++ b/sfx2/source/menu/mnuitem.cxx
@@ -175,7 +175,7 @@ void SfxMenuControl::Bind(
//--------------------------------------------------------------------
-// ctor for explicit registration
+// Constructor for explicit registration
SfxMenuControl::SfxMenuControl( sal_Bool bShowStrings )
: pOwnMenu(0),
@@ -187,6 +187,7 @@ SfxMenuControl::SfxMenuControl( sal_Bool bShowStrings )
//--------------------------------------------------------------------
+// Constructor for array
SfxMenuControl::SfxMenuControl():
pOwnMenu(0),
pSubMenu(0),
@@ -205,10 +206,10 @@ SfxMenuControl::SfxMenuControl(sal_uInt16 nSlotId, SfxBindings& rBindings):
{
DBG_MEMTEST();
- // Dieser Ctor soll es erm"oglichen, w"ahrend der Konstruktion schon
- // auf die Bindings zur"uckgreifen zu k"onnen, aber gebunden wird
- // wie immer erst sp"ater. Anwendung z.B. wenn im ctor der abgeleiteten
- // Klasse z.B. ein StatusForwarder erzeugt werden soll.
+ // This constructor should make it possible already during the design
+ // to fall back to the bindings, but can as always be bound later.
+ // The usefullness of this is for example if a StatusForwarder should
+ // be created in the constructor of a derived class.
UnBind();
}
@@ -244,7 +245,7 @@ void SfxMenuControl::StateChanged
bool bIsObjMenu =
GetId() >= SID_OBJECTMENU0 && GetId() < SID_OBJECTMENU_LAST;
- // enabled/disabled-Flag pauschal korrigieren
+ // Fix inclusion of enabled/disabled-Flag
#ifdef UNIX
if (nSID == SID_PASTE)
@@ -257,7 +258,7 @@ void SfxMenuControl::StateChanged
if ( eState != SFX_ITEM_AVAILABLE )
{
- // checken nur bei nicht-Object-Menus
+ // check only for non-Object Menus
if ( !bIsObjMenu )
pOwnMenu->CheckItem( GetId(), sal_False );
@@ -271,7 +272,7 @@ void SfxMenuControl::StateChanged
bool bCheck = false;
if ( pState->ISA(SfxBoolItem) )
{
- // BoolItem fuer checken
+ // BoolItem for check
DBG_ASSERT( GetId() < SID_OBJECTMENU0 || GetId() > SID_OBJECTMENU_LAST,
"SfxBoolItem not allowed for SID_OBJECTMENUx" );
bCheck = ((const SfxBoolItem*)pState)->GetValue();
@@ -279,14 +280,14 @@ void SfxMenuControl::StateChanged
else if ( pState->ISA(SfxEnumItemInterface) &&
((SfxEnumItemInterface *)pState)->HasBoolValue() )
{
- // EnumItem wie Bool behandeln
+ // Treat EnumItem as Bool
DBG_ASSERT( GetId() < SID_OBJECTMENU0 || GetId() > SID_OBJECTMENU_LAST,
"SfxEnumItem not allowed for SID_OBJECTMENUx" );
bCheck = ((SfxEnumItemInterface *)pState)->GetBoolValue();
}
else if ( ( b_ShowStrings || bIsObjMenu ) && pState->ISA(SfxStringItem) )
{
- // MenuText aus SfxStringItem holen
+ // Get MenuText from SfxStringItem
String aStr( ((const SfxStringItem*)pState)->GetValue() );
if ( aStr.CompareToAscii("($1)",4) == COMPARE_EQUAL )
{
diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx
index 788c7eae1d1c..b82aeeb6bd6f 100755
--- a/sfx2/source/menu/mnumgr.cxx
+++ b/sfx2/source/menu/mnumgr.cxx
@@ -160,13 +160,11 @@ void InsertVerbs_Impl( SfxBindings* pBindings, const com::sun::star::uno::Sequen
if ( !(aVerbs[n].VerbAttributes & embed::VerbAttributes::MS_VERBATTR_ONCONTAINERMENU) )
continue;
- // neue Id vergeben
sal_uInt16 nId = SID_VERB_START + nr++;
- DBG_ASSERT(nId <= SID_VERB_END, "Zuviele Verben!");
+ DBG_ASSERT(nId <= SID_VERB_END, "Too many verbs!");
if ( nId > SID_VERB_END )
break;
- // einf"ugen
pMenu->InsertItem( nId, aVerbs[n].VerbName );
}
}
@@ -362,7 +360,7 @@ void SfxMenuManager::Construct_Impl( Menu* pSVMenu, sal_Bool bWithHelp )
SfxVirtualMenu *pOldVirtMenu=0;
if ( pMenu )
{
- // Es wird umkonfiguriert
+ // It is reconfigured
pOldVirtMenu = pMenu;
pBindings->ENTERREGISTRATIONS();
}
diff --git a/sfx2/source/menu/objmnctl.cxx b/sfx2/source/menu/objmnctl.cxx
index 3a92a4989bc0..1042d48bf354 100755
--- a/sfx2/source/menu/objmnctl.cxx
+++ b/sfx2/source/menu/objmnctl.cxx
@@ -49,8 +49,8 @@ using namespace com::sun::star;
//--------------------------------------------------------------------
/*
- Ctor; setzt Select-Handler am Menu und traegt Menu
- in seinen Parent ein.
+ Constructor; sets the Select-Handler for the Menu and inserts it into
+ its Parent.
*/
SfxObjectVerbsControl::SfxObjectVerbsControl(sal_uInt16 nSlotId, Menu &rMenu, SfxBindings &rBindings)
@@ -66,7 +66,7 @@ SfxObjectVerbsControl::SfxObjectVerbsControl(sal_uInt16 nSlotId, Menu &rMenu, Sf
//--------------------------------------------------------------------
/*
- Fuellt das Menu mit den aktuellen Verben aus der ViewShell.
+ Make up a menu with the current view of the verbs from ViewShell.
*/
void SfxObjectVerbsControl::FillMenu()
@@ -90,7 +90,7 @@ void SfxObjectVerbsControl::FillMenu()
if ( !(aVerbs[n].VerbAttributes & embed::VerbAttributes::MS_VERBATTR_ONCONTAINERMENU) )
continue;
- DBG_ASSERT(nSlotId <= SID_VERB_END, "Zuviele Verben!");
+ DBG_ASSERT(nSlotId <= SID_VERB_END, "Too many Verbs!");
if (nSlotId > SID_VERB_END)
break;
@@ -105,11 +105,10 @@ void SfxObjectVerbsControl::FillMenu()
//--------------------------------------------------------------------
/*
- Statusbenachrichtigung;
- fuellt gfs. das Menu mit den aktuellen Verben aus der ViewShell.
- der DocumentShell.
- Ist die Funktionalit"at disabled, wird der entsprechende
- Menueeintrag im Parentmenu disabled, andernfalls wird er enabled.
+ Status notification:
+ Fill the menu with the current verbs from the ViewShell of the
+ the DocumentShell. If the functionality is disabled, the corresponding
+ menu entry in Parent menu is disabled, otherwise it is enabled.
*/
void SfxObjectVerbsControl::StateChanged(
@@ -125,8 +124,8 @@ void SfxObjectVerbsControl::StateChanged(
//--------------------------------------------------------------------
/*
- Select-Handler des Menus;
- das selektierte Verb mit ausgef"uhrt,
+ Select-Handler for Menus;
+ run the selected Verb,
*/
IMPL_LINK_INLINE_START( SfxObjectVerbsControl, MenuSelect, Menu *, pSelMenu )
@@ -141,7 +140,7 @@ IMPL_LINK_INLINE_END( SfxObjectVerbsControl, MenuSelect, Menu *, pSelMenu )
//--------------------------------------------------------------------
/*
- Dtor; gibt das Menu frei.
+ Destructor; releases the Menu.
*/
SfxObjectVerbsControl::~SfxObjectVerbsControl()
diff --git a/sfx2/source/menu/thessubmenu.cxx b/sfx2/source/menu/thessubmenu.cxx
index e3eaf62f2305..00eeed73f8f0 100755
--- a/sfx2/source/menu/thessubmenu.cxx
+++ b/sfx2/source/menu/thessubmenu.cxx
@@ -61,8 +61,8 @@ SFX_IMPL_MENU_CONTROL(SfxThesSubMenuControl, SfxStringItem);
/*
- Ctor; setzt Select-Handler am Menu und traegt Menu
- in seinen Parent ein.
+ Constructor; sets the Select-Handler for the Menu and inserts it into
+ its Parent.
*/
SfxThesSubMenuControl::SfxThesSubMenuControl( sal_uInt16 nSlotId, Menu &rMenu, SfxBindings &rBindings )
: SfxMenuControl( nSlotId, rBindings ),
@@ -83,9 +83,9 @@ SfxThesSubMenuControl::~SfxThesSubMenuControl()
/*
- Statusbenachrichtigung;
- Ist die Funktionalit"at disabled, wird der entsprechende
- Menueeintrag im Parentmenu disabled, andernfalls wird er enabled.
+ Status notification:
+ If the functionality is disabled, the corresponding
+ menu entry in Parentmenu is disabled, otherwise it is enabled.
*/
void SfxThesSubMenuControl::StateChanged(
sal_uInt16 /*nSID*/,
@@ -97,8 +97,8 @@ void SfxThesSubMenuControl::StateChanged(
/*
- Select-Handler des Menus;
- das selektierte Verb mit ausgef"uhrt,
+ Select-Handler for Menus;
+ run the selected Verb,
*/
IMPL_LINK_INLINE_START( SfxThesSubMenuControl, MenuSelect, Menu *, pSelMenu )
{
diff --git a/sfx2/source/menu/thessubmenu.hxx b/sfx2/source/menu/thessubmenu.hxx
index bf0491477d27..49169d7b1c2d 100755
--- a/sfx2/source/menu/thessubmenu.hxx
+++ b/sfx2/source/menu/thessubmenu.hxx
@@ -71,7 +71,7 @@ class SfxThesSubMenuHelper
private:
- // don't use copy c-tor and assignment operator
+ // don't use copy constructor and assignment operator
SfxThesSubMenuHelper( const SfxThesSubMenuHelper & );
SfxThesSubMenuHelper & operator = ( const SfxThesSubMenuHelper & );
diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx
index b175b76f69b8..9ef8beb9bf87 100755
--- a/sfx2/source/menu/virtmenu.cxx
+++ b/sfx2/source/menu/virtmenu.cxx
@@ -154,9 +154,9 @@ static Image RetrieveAddOnImage( Reference< com::sun::star::frame::XFrame >& rFr
//=========================================================================
-/* Diese Hilfsfunktion pr"uft, ob eine Slot-Id im aktuellen Applikations-
- Status sichtbar ist oder nicht. Dabei bezieht sich der Applikations-Status
- darauf, ob die Applikation OLE-Server ist oder nicht.
+/* This helper function checks whether a Slot-id in the current application
+ status is visible or not. This relates to the application status to see
+ if the OLE server application exist or not.
*/
sal_Bool IsItemHidden_Impl( sal_uInt16 nItemId, int bOleServer, int bMac )
@@ -256,10 +256,9 @@ SfxVirtualMenu::SfxVirtualMenu( Menu *pStarViewMenu, sal_Bool bWithHelp,
//--------------------------------------------------------------------
-/* Der Destruktor der Klasse SfxVirtualMenu gib die gebundenen Items frei
- und klinkt das zugeh"orige StarView-PopupMenu aus seinem Parent aus.
- Falls es sich um das Pickmenu oder das MDI-Menu handelt, wird es
- dort abgemeldet.
+/* The destructor of the class SfxVirtualMenu releases bounded items and
+ the associated StarView-PopupMenu is released from its parent.
+ If it is related to the Pickmenu or the MDI-menu, it is unregistered here.
*/
SfxVirtualMenu::~SfxVirtualMenu()
@@ -291,10 +290,10 @@ SfxVirtualMenu::~SfxVirtualMenu()
delete pAppCtrl;
pBindings = 0;
- // Alle Menues, die von SV erzeugt wurden, werden auch dort wieder
- // gel"oscht (also die beim Laden aus der Resource erzeugten).
- // Das Top-Level-Menu wird nie von SV gel"oscht, da die Allocierung
- // im SFX erfolgt
+ // All the menus, which were created by SV, will also be there deleted
+ // again (i.e. created by loading them from the resource)
+ // The top-level menu is never deleted by SV, since the allocation
+ // in done in the SFX
if ( !bResCtor || !pParent)
{
if ( pParent )
@@ -363,9 +362,9 @@ void SfxVirtualMenu::CreateFromSVMenu()
// get and store the number of items
nCount = pSVMenu->GetItemCount();
- // Achtung: nur zu diesem Zeitpunkt ist garantiert, da\s nCount und
- // der ItemCount des SV-Menues "ubereinstimmen; sp"ater kann das SvMenue
- // auch mehr Eintr"age haben (Pickliste!)
+ // Note: only this time it is guaranteed that nCount and the ItemCount
+ // the SV-menus match; later on the SvMenu can have more entries
+ // (Pick list!)
if (nCount)
pItems = new SfxMenuControl[nCount];
@@ -402,9 +401,8 @@ void SfxVirtualMenu::CreateFromSVMenu()
if ( pMnuCtrl )
{
- // Das Popup war offensichtlich kein "echtes"; solche werden
- // niemals aus der Resource geladen und m"ussen daher explizit
- // gel"oscht werden
+ // The pop was obviously not "real" and such are never loaded
+ // from the resource and need thus to be explicitly deleted.
if ( pSVMenu->GetPopupMenu( nSlotId ) == pPopup )
pSVMenu->SetPopupMenu( nSlotId, NULL );
delete pPopup;
@@ -427,7 +425,7 @@ void SfxVirtualMenu::CreateFromSVMenu()
{
pMnuCtrl = pItems+nPos;
- // normalerweise jetzt erst im Activate-Handler
+ // Normally only now in Activate-Handler
if ( bOLE )
{
pMnuCtrl->Bind( this, nSlotId,
@@ -533,10 +531,10 @@ IMPL_LINK( SfxVirtualMenu, Highlight, Menu *, pMenu )
DBG_MEMTEST();
DBG_CHKTHIS(SfxVirtualMenu, 0);
- // eigenes StarView-Menu
+ // own StarView-Menu
if ( pMenu == pSVMenu )
{
- // AutoDeactivate ist jetzt nicht mehr n"otig
+ // AutoDeactivate is not necessary anymore
if ( pAutoDeactivate )
pAutoDeactivate->Stop();
}
@@ -719,14 +717,14 @@ void SfxVirtualMenu::RemoveMenuImages( Menu* pMenu )
bool SfxVirtualMenu::Bind_Impl( Menu *pMenu )
{
- // Selber suchen, da SV mit 'sal_uInt16 nSID = pSVMenu->GetCurItemId();' immer
- // 0 liefert. Das ist so, weil die Event-Weiterleitung lt. TH nichts mit
- // CurItem des Parent-Menus zu tun hat.
+ // Search , as SV with 'sal_uInt16 nSID = pSVMenu->GetCurItemId();' always
+ // returns 0. It is like this, since the Event-Forwarding has nothing to do
+ // with the Parent-Menus CurItem.
sal_uInt32 nAddonsPopupPrefixLen = ADDONSPOPUPMENU_URL_PREFIX.getLength();
for ( sal_uInt16 nPos = 0; nPos < nCount; ++nPos )
{
- // angesprochenes Sub-Menu gefunden?
+ // found the Sub-Menu in question?
bool bFound = false;
sal_uInt16 nSID = pSVMenu->GetItemId(nPos);
SfxMenuControl &rCtrl = pItems[nPos];
@@ -735,11 +733,11 @@ bool SfxVirtualMenu::Bind_Impl( Menu *pMenu )
if ( bFound )
{
- // Nur ein gebundener Menu-Controller hat schon seine Id!
+ // Only a binded Menu-Controller as already an Id!
if ( !rCtrl.GetId() )
{
bIsAddonPopupMenu = sal_False;
- DBG_ASSERT( !pSubMenu, "Popup schon vorhanden!");
+ DBG_ASSERT( !pSubMenu, "Popup already exists!");
// Check if the popup is an Add-On popup menu
// Either the popup menu has a special ID or a special command URL prefix!
@@ -750,31 +748,32 @@ bool SfxVirtualMenu::Bind_Impl( Menu *pMenu )
( aCommand.indexOf( ADDONSPOPUPMENU_URL_PREFIX ) == 0 )) )
bIsAddonPopupMenu = sal_True;
- // VirtualMenu f"ur Sub-Menu erzeugen
+ // Create VirtualMenu for Sub-Menu
sal_Bool bRes = bResCtor;
pSubMenu = new SfxVirtualMenu( nSID, this,
*pMenu, sal_False, *pBindings, bOLE, bRes, bIsAddonPopupMenu );
- DBG_OUTF( ("Neues VirtualMenu %lx erzeugt", pSubMenu) );
+ DBG_OUTF( ("New VirtualMenu %lx created", pSubMenu) );
rCtrl.Bind( this, nSID, *pSubMenu, pSVMenu->GetItemText(nSID), *pBindings );
- // Activate weiterleiten
+ // Forward Activate
pSubMenu->Bind_Impl( pMenu );
pSubMenu->Activate( pMenu );
}
}
- // rekursiv weitersuchen (SV Activate nur am Menu selbst und Top-Menu)
+ // continue searching recursively (SV Activate only the menu itself
+ // and Top-Menu)
if ( !bFound && pSubMenu )
bFound = pSubMenu->Bind_Impl( pMenu );
- // gefunden, dann abbrechen
+ // If found, break
if ( bFound )
return true;
}
- // nicht in diesem Untermenu gefunden
+ // Not found in this submenu
return false;
}
@@ -820,7 +819,7 @@ void SfxVirtualMenu::UnbindControllers()
{
SfxMenuControl* pCtrl = rCtrlArr[nPos];
if ( pCtrl->IsBound() )
- // UnoController sind nicht gebunden!
+ // UnoController is not binded!
pCtrl->UnBind();
}
@@ -877,8 +876,8 @@ IMPL_LINK( SfxVirtualMenu, Activate, Menu *, pMenu )
DBG_CHKTHIS(SfxVirtualMenu, 0);
DBG_OUTF( ("SfxVirtualMenu %lx activated %lx, own %lx", this, pMenu, pSVMenu));
- // MI: wozu war der noch gut?
- // MBA: scheint ein alter QAP-Hack gewesen zu sein ( in rev.1.41 eingecheckt ! )
+ // MI: for what was it still good for?
+ // MBA: seemes to be an old QAP-Hack( checked-in in rev.1.41 ! )
if ( pMenu )
{
@@ -891,10 +890,10 @@ IMPL_LINK( SfxVirtualMenu, Activate, Menu *, pMenu )
pMenu->SetMenuFlags( nFlag );
}
- // eigenes StarView-Menu
+ // Own StarView-Menu
if ( pMenu == pSVMenu )
{
- // doppelt-Activate verhindern
+ // Prevent Double Activate
if ( bIsActive )
return sal_True;
@@ -977,7 +976,7 @@ IMPL_LINK( SfxVirtualMenu, Activate, Menu *, pMenu )
pAddonsMenu = pSVMenu->GetPopupMenu( SID_ADDONLIST );
}
- // f"ur konstistenten Status sorgen
+ // Provides consistency to the Status
if ( bControllersUnBound )
BindControllers();
@@ -992,22 +991,22 @@ IMPL_LINK( SfxVirtualMenu, Activate, Menu *, pMenu )
pBindings->Update( SID_IMAGE_ORIENTATION );
- // bis zum Deactivate die Statusupdates unterdr"ucken
+ // Supress the Status updates until Deactivate
pBindings->ENTERREGISTRATIONS(); ++nLocks; bIsActive = sal_True;
if ( pAutoDeactivate ) // QAP-Hack
pAutoDeactivate->Start();
- // erledigt
return sal_True;
}
else
{
- // VirtualMenu fuer SubMenu finden und ggf. an VirtualMenu binden
+ // Find the VirtualMenu for the SubMenu and if possible, bind a
+ // VirtualMenu
bool bRet = Bind_Impl( pMenu );
#ifdef DBG_UTIL
if ( !bRet)
- DBG_WARNING( "W1: Virtual menu konnte nicht erzeugt werden!" );
+ DBG_WARNING( "W1: Virtual menu could not be created!" );
#endif
return bRet;
}
@@ -1024,8 +1023,8 @@ IMPL_LINK( SfxVirtualMenu, Deactivate, Menu *, pMenu )
if ( pAutoDeactivate )
pAutoDeactivate->Stop();
- // Bis auf die Menubar k"onnen alle Controller unbinded werden, wenn
- // das Menue deaktiviert ( = zugeklappt ) wird
+ // All controllers can be unbinded all the way up to the Menubar,
+ // when the menu is disabled (= closed)
if ( pParent )
UnbindControllers();
pBindings->LEAVEREGISTRATIONS(); --nLocks; bIsActive = sal_False;
@@ -1200,7 +1199,7 @@ void SfxVirtualMenu::SetPopupMenu( sal_uInt16 nItemId, PopupMenu *pMenu )
//--------------------------------------------------------------------
-// Erzwingt die Initialisierung, die sonst nur im Activate kommt
+// Forces the initialization, which is otherwise only happens in Activate
void SfxVirtualMenu::InitPopup( sal_uInt16 nPos, sal_Bool /*bOLE*/ )
{
@@ -1210,17 +1209,17 @@ void SfxVirtualMenu::InitPopup( sal_uInt16 nPos, sal_Bool /*bOLE*/ )
sal_uInt16 nSID = pSVMenu->GetItemId(nPos);
PopupMenu *pMenu = pSVMenu->GetPopupMenu( nSID );
- DBG_ASSERT( pMenu, "Hier gibt es kein Popup!");
+ DBG_ASSERT( pMenu, "No popup exist here!");
SfxMenuControl &rCtrl = pItems[nPos];
if ( !rCtrl.GetId() )
{
- // VirtualMenu f"ur Sub-Menu erzeugen
+ // Generate VirtualMenu for Sub-Menu
sal_Bool bRes = bResCtor;
SfxVirtualMenu *pSubMenu =
new SfxVirtualMenu(nSID, this, *pMenu, sal_False, *pBindings, bOLE, bRes);
- DBG_OUTF( ("Neues VirtualMenu %lx erzeugt", pSubMenu) );
+ DBG_OUTF( ("New VirtualMenu %lx created", pSubMenu) );
rCtrl.Bind( this, nSID, *pSubMenu, pSVMenu->GetItemText(nSID), *pBindings );
}
diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx
index 86c9c0b3a82e..739362ed50f0 100755
--- a/sfx2/source/statbar/stbitem.cxx
+++ b/sfx2/source/statbar/stbitem.cxx
@@ -144,24 +144,26 @@ svt::StatusbarController* SAL_CALL SfxStatusBarControllerFactory(
SfxStatusBarControl::SfxStatusBarControl
(
- sal_uInt16 nSlotID, /* Slot-Id, mit der diese Instanz
- verbunden wird. Wurde bei der
- Registrierung eine Slot-Id != 0
- angegeben, ist dies immer die dort
- angegebene. */
+ sal_uInt16 nSlotID, /* Slot-Id which is connected to this
+ instance. If a Slot-Id is set to != 0 at
+ registration it will always be set there.
+ */
+
+
sal_uInt16 nCtrlID, /* ID of this controller in the status bar */
- StatusBar& rBar /* Referenz auf die StatusBar, f"ur die
- dieses Control erzeugt wurde. */
+ StatusBar& rBar /* Reference to the StatusBar,for which
+ this Control was created. */
)
-/* [Beschreibung]
- Konstruktor der Klasse SfxStatusBarControl. Die Subclasses werden
- bei Bedarf per Factory vom SFx erzeugt.
+/* [Description]
+
+ Constructor of the SfxStatusBarControl Class. The Subclasses are
+ created at the Factory if necessary.
- Instanzen dieser Basisklasse werden f"ur alle StatusBar-Felder
- erzeugt, f"ur die keine speziellen registriert wurden.
+ Instances of this base class are created for all StatusBar-fields
+ for which no specific ones have been registered.
*/
: svt::StatusbarController(),
@@ -175,10 +177,10 @@ SfxStatusBarControl::SfxStatusBarControl
SfxStatusBarControl::~SfxStatusBarControl()
-/* [Beschreibung]
+/* [Description]
- Destruktor der Klasse SfxStatusBarControl. Die Instanzen dieser
- Klasse und deren Subklassen werden vom SFx zerst"ort.
+ Destructor of the SfxStatusBarControl Class. The Class and its Subclasses
+ are destroyed by SFx.
*/
{}
@@ -438,20 +440,20 @@ void SfxStatusBarControl::StateChanged
(
sal_uInt16 nSID,
SfxItemState eState,
- const SfxPoolItem* pState /* Zeiger auf ein SfxPoolItem, welches nur
- innerhalb dieses Methodenaufrufs g"ultig
- ist. Es kann ein 0-Pointer, ein Pointer
- auf ein SfxVoidItem oder auf den Typ, f"ur
- den die Subclass von SfxStatusBarControl
- registriert ist vorkommen. */
+ const SfxPoolItem* pState /* Pointer to SfxPoolItem, is only valid
+ withih this Method call. This can be a
+ Null-Pointer, a Pointer to SfxVoidItem
+ or of this Type found registered by the
+ Subclass of SfxStatusBarControl.
+ */
)
-/* [Beschreibung]
+/* [Description]
- Die Basisimplementation versteht Items vom Type SfxStringItem, bei
- denen der Text in das Status-Zeilen-Feld eingetragen wird und
- SfxVoidItem, bei denen das Feld geleert wird. Die Basisimplementierng
- sollte in "uberladenen Methoden nicht gerufen werden.
+ The base implementation includes items of type SfxStringItem
+ where the text is entered in the status row field and
+ SfxVoidItem, where the field is emptied. The base implementation
+ should not be called in overloaded methods.
*/
{
@@ -473,25 +475,23 @@ void SfxStatusBarControl::StateChanged
sal_Bool SfxStatusBarControl::MouseButtonDown( const MouseEvent & )
-/* [Beschreibung]
+/* [Description]
- Diese virtuelle Methode ist eine Weiterleitung des Events
- MouseButtonDown() der StatusBar, falls die Maus-Position innerhalb
- des Bereichs des betreffenden Items ist, oder die Maus von diesem
- Control mit <SfxStatusBarControl::CaptureMouse()> gecaptured wurde.
+ This virtual method forwards the Event MouseButtonDown() of the
+ StatusBar if the mouse position is within the range of the items,
+ or if the mouse was captured by <SfxStatusBarControl::CaptureMouse()>
- Die Defaultimplementierung ist leer und gibt FALSE zur"uck.
+ The default implementation is empty and returns FALSE.
-
- [Rueckgabewert]
+ [Return value]
sal_Bool TRUE
- das Event wurde bearbeitet und soll nicht an
- die StatusBar weitergeleitet werden
+ The event has been processed and is not intended to
+ be forwarded to StatusBar
FALSE
- das Event wurde nicht bearbeitet und soll an
- die StatusBar weitergeleitet werden
+ The event was not processed and is to be
+ be forwarded to StatusBar
*/
{
@@ -502,25 +502,23 @@ sal_Bool SfxStatusBarControl::MouseButtonDown( const MouseEvent & )
sal_Bool SfxStatusBarControl::MouseMove( const MouseEvent & )
-/* [Beschreibung]
-
- Diese virtuelle Methode ist eine Weiterleitung des Events
- MouseMove() der StatusBar, falls die Maus-Position innerhalb
- des Bereichs des betreffenden Items ist, oder die Maus von diesem
- Control mit <SfxStatusBarControl::CaptureMouse()> gecaptured wurde.
+/* [Description]
- Die Defaultimplementierung ist leer und gibt FALSE zur"uck.
+ This virtual method forwards the Event MouseMove() of the
+ StatusBar if the mouse position is within the range of the items,
+ or if the mouse was captured by <SfxStatusBarControl::CaptureMouse()>
+ The default implementation is empty and returns FALSE.
- [Rueckgabewert]
+ [Return value]
sal_Bool TRUE
- das Event wurde bearbeitet und soll nicht an
- die StatusBar weitergeleitet werden
+ The event has been processed and is not intended to
+ be forwarded to StatusBar
FALSE
- das Event wurde nicht bearbeitet und soll an
- die StatusBar weitergeleitet werden
+ The event was not processed and is to be
+ be forwarded to StatusBar
*/
{
@@ -531,25 +529,23 @@ sal_Bool SfxStatusBarControl::MouseMove( const MouseEvent & )
sal_Bool SfxStatusBarControl::MouseButtonUp( const MouseEvent & )
-/* [Beschreibung]
-
- Diese virtuelle Methode ist eine Weiterleitung des Events
- MouseButtonUp() der StatusBar, falls die Maus-Position innerhalb
- des Bereichs des betreffenden Items ist, oder die Maus von diesem
- Control mit <SfxStatusBarControl::CaptureMouse()> gecaptured wurde.
+/* [Description]
- Die Defaultimplementierung ist leer und gibt FALSE zur"uck.
+ This virtual method forwards the Event MouseButtonUp() of the
+ StatusBar if the mouse position is within the range of the items,
+ or if the mouse was captured by <SfxStatusBarControl::CaptureMouse()>
+ The default implementation is empty and returns FALSE.
- [Rueckgabewert]
+ [Return value]
sal_Bool TRUE
- das Event wurde bearbeitet und soll nicht an
- die StatusBar weitergeleitet werden
+ The event has been processed and is not intended to
+ be forwarded to StatusBar
FALSE
- das Event wurde nicht bearbeitet und soll an
- die StatusBar weitergeleitet werden
+ The event was not processed and is to be
+ be forwarded to StatusBar
*/
{
@@ -560,12 +556,12 @@ sal_Bool SfxStatusBarControl::MouseButtonUp( const MouseEvent & )
void SfxStatusBarControl::Command( const CommandEvent& )
-/* [Beschreibung]
+/* [Description]
- Diese virtuelle Methode wird gerufen, wenn f"ur dieses SfxStatusBarControl
- ein CommandEvent f"ur erkannt wurde.
+ This virtual method is called when a CommandEvent is recived by
+ SfxStatusBarControl.
- Die Defaultimplementierung ist leer.
+ The default implementation is empty.
*/
{
@@ -575,12 +571,12 @@ void SfxStatusBarControl::Command( const CommandEvent& )
void SfxStatusBarControl::Click()
-/* [Beschreibung]
+/* [Description]
- Diese virtuelle Methode wird gerufen, wenn der Anwender mit der Maus
- in das zu diesem Control geh"orige Feld der Statuszeile klickt.
+ This virtual method is called when the user clicks on the
+ field in the status row that belongs to this control.
- Die Defaultimplementierung ist leer.
+ The default implementation is empty.
*/
{
@@ -590,10 +586,10 @@ void SfxStatusBarControl::Click()
void SfxStatusBarControl::DoubleClick()
-/* [Beschreibung]
+/* [Description]
- Diese virtuelle Methode wird gerufen, wenn der Anwender mit der Maus
- in das zu diesem Control geh"orige Feld der Statuszeile doppel-klickt.
+ This virtual method is called when the user double-clicks on the
+ field in the status row that belongs to this control.
*/
{
@@ -605,18 +601,17 @@ void SfxStatusBarControl::DoubleClick()
void SfxStatusBarControl::Paint
(
- const UserDrawEvent& /* Referenz auf einen UserDrawEvent */
+ const UserDrawEvent& /* Reference to an UserDrawEvent */
)
-/* [Beschreibung]
+/* [Description]
- Diese virtuelle Methode wird gerufen, falls das betreffende Feld
- mit SIB_USERDRAW gekennzeichnet ist, um den Inhalt zu zeichnen.
- Die Ausgabe mu"s auf dem in durch rUDEvt.GetDevice() erh"altlichen
- OutputDevice innerhalb des durch rUDEvt.GetRect() angegebenenen
- Rechtecks erfolgen.
+ This virtual method is called to paint the contents if the field
+ at hand is marked with SIB_USERDRAW. The output must be obtained
+ within the Rectangle of rUDEvt.GetRect() by the OutputDevice
+ given by rUDEvt.GetDevice().
- Die Defaultimplementierung ist leer.
+ The default implementation is empty.
*/
{
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 12637246fe8a..344bb3a7bc43 100755
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -398,33 +398,31 @@ SfxToolBoxControl* SfxToolBoxControl::CreateControl( sal_uInt16 nSlotId, sal_uIn
SfxItemState SfxToolBoxControl::GetItemState(
const SfxPoolItem* pState )
-/* [Beschreibung]
+/* [Description]
- Statische Methode zum Ermitteln des Status des SfxPoolItem-Pointers,
- in der Methode <SfxControllerItem::StateChanged(const SfxPoolItem*)>
- zu verwenden.
+ Static method for determining the status of the SfxPoolItem-pointer,
+ used in the method <SfxControllerItem::StateChanged(const SfxPoolItem*)>.
- [R"uckgabewert]
+ [Return value]
SfxItemState SFX_ITEM_UNKNOWN
- Enabled, aber keine weitere Statusinformation
- verf"ugbar. Typisch f"ur <Slot>s, die allenfalls
- zeitweise disabled sind, aber ihre Darstellung sonst
- nicht "andern.
+ Enabled, however no further status information is available.
+ Typical for <Slot>s, which are temporarily disabled a
+ anyway but other than that do not change their appearance.
SFX_ITEM_DISABLED
- Disabled und keine weiter Statusinformation
- verf"ugbar. Alle anderen ggf. angezeigten Werte sollten
- auf den Default zur"uckgesetzt werden.
+ Disabled, no further status information is available.
+ All other displayed values should be reset to the default
+ if possible.
SFX_ITEM_DONTCARE
- Enabled aber es waren nur uneindeutige Werte
- verf"ugbar (also keine, die abgefragt werden k"onnen).
+ Enabled but there were only ambiguous values available
+ (i.e. none that could be queried).
SFX_ITEM_AVAILABLE
- Enabled und mit verf"ugbarem Wert, der von 'pState'
- erfragbar ist. Der Typ ist dabei im gesamten
- Programm eindeutig und durch den Slot festgelegt.
+ Enabled and with available values which can be queried
+ through'pState'. The type is thus by the Slot clearly
+ defined in the entire Program.
*/
{
@@ -963,7 +961,7 @@ void SfxToolBoxControl::StateChanged
if ( GetId() >= SID_OBJECTMENU0 && GetId() <= SID_OBJECTMENU_LAST )
return;
- // enabled/disabled-Flag pauschal korrigieren
+ // enabled/disabled-Flag correcting the lump sum
pImpl->pBox->EnableItem( GetId(), eState != SFX_ITEM_DISABLED );
sal_uInt16 nItemBits = pImpl->pBox->GetItemBits( GetId() );
@@ -975,7 +973,7 @@ void SfxToolBoxControl::StateChanged
{
if ( pState->ISA(SfxBoolItem) )
{
- // BoolItem fuer checken
+ // BoolItem for checking
if ( ((const SfxBoolItem*)pState)->GetValue() )
eTri = STATE_CHECK;
nItemBits |= TIB_CHECKABLE;
@@ -983,7 +981,7 @@ void SfxToolBoxControl::StateChanged
else if ( pState->ISA(SfxEnumItemInterface) &&
((SfxEnumItemInterface *)pState)->HasBoolValue())
{
- // EnumItem wie Bool behandeln
+ // EnumItem is handled as Bool
if ( ((const SfxEnumItemInterface *)pState)->GetBoolValue() )
eTri = STATE_CHECK;
nItemBits |= TIB_CHECKABLE;
@@ -1389,7 +1387,7 @@ void SfxPopupWindow::PopupModeEnd()
if ( IsVisible() )
{
- // wurde abgerissen
+ // was teared-off
DeleteFloatingWindow();
m_bFloating = sal_True;
}
@@ -1416,7 +1414,7 @@ void SfxPopupWindow::MouseMove( const ::MouseEvent& rMEvt )
FloatingWindow::MouseMove( rMEvt );
else
{
- // MouseMove-Event an die Children forwarden
+ // Forward MouseMove-Event to Children
::Point aPos = rMEvt.GetPosPixel();
::Point aScrPos = OutputToScreenPixel( aPos );
sal_uInt16 i = 0;
@@ -1450,14 +1448,14 @@ void SfxPopupWindow::EndCascading()
SfxPopupWindow* SfxPopupWindow::Clone() const
-/* [Beschreibung]
+/* [Description]
- Diese Methode mu\s "uberladen werden, um dieses Popup auch im
- Presentations-Modus anzuzeigen. Sie wird gerufen, wenn ein Show()
- sinnlos w"are, da der Parent nicht das Presentations-Window ist.
- Beim neu erzeugen wird automatisch das neue Top-Window verwendet, so
- da\s der Parent das Presentations-Window ist und das neue Popup somit
- sichtbar ist.
+ This method must be overloaded to show this Popup also in the
+ Presentation-mode. It is called when a Show() would be meaningless
+ since the parent is no presentation window.
+ When create a new window the bew Top-Window will be used automatically,
+ so that the Parent becomes the presentation window and and that the new
+ Popup therefore becomes visible.
*/
{
@@ -1470,16 +1468,14 @@ void SfxPopupWindow::StateChanged(
sal_uInt16 /*nSID*/,
SfxItemState eState,
const SfxPoolItem* /*pState*/ )
-/* [Bescheibung]
+/* [Description]
- Siehe auch <SfxControllerItem::StateChanged()>. Au\serdem wird
- bei eState==SFX_ITEM_DISABLED das Popup gehided und in allen anderen
- F"allen, falls es floating ist, wieder angezeigt. Daher mu\s die
- Basisklasse i.d.R. gerufen werden.
-
- Es findet wegen des Parents eine Sonderbehandlung f"ur den
- Presentationsmodus statt.
+ See also <SfxControllerItem::StateChanged()>. In addition the Popup
+ will become hidden when eState==SFX_ITEM_DISABLED and in all other
+ cases it will be shown again if it is floating. In general this requires
+ to call the Base class.
+ Due to the parent the presentation mode is handled in a special way.
*/
{
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index 09e624c27c99..42ab08eed43a 100755
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -125,7 +125,7 @@ SfxFrame::~SfxFrame()
if ( pChildArr )
{
- DBG_ASSERT( !pChildArr->Count(), "Childs nicht entfernt!" );
+ DBG_ASSERT( !pChildArr->Count(), "Children are not removed!" );
delete pChildArr;
}
@@ -134,7 +134,7 @@ SfxFrame::~SfxFrame()
sal_Bool SfxFrame::DoClose()
{
- // Eigentlich wird noch ein PrepareClose gebraucht !!!
+ // Actually, one more PrepareClose is still needed!
sal_Bool bRet = sal_False;
if ( !pImp->bClosing )
{
@@ -177,7 +177,7 @@ sal_Bool SfxFrame::DoClose_Impl()
if ( pImp->pCurrentViewFrame )
pBindings = &pImp->pCurrentViewFrame->GetBindings();
- // Bei internen Tasks m"ussen Controller und Tools abger"aumt werden
+ // For internal tasks Controllers and Tools must be cleared
if ( pImp->pWorkWin )
pImp->pWorkWin->DeleteControllers_Impl();
@@ -257,7 +257,7 @@ SfxFrame* SfxFrame::GetChildFrame( sal_uInt16 nPos ) const
{
if ( pChildArr && pChildArr->Count() > nPos )
{
- DBG_ASSERT( nPos < pChildArr->Count(), "Falscher Index!");
+ DBG_ASSERT( nPos < pChildArr->Count(), "Wrong Index!");
return (*pChildArr)[nPos];
}
@@ -266,7 +266,7 @@ SfxFrame* SfxFrame::GetChildFrame( sal_uInt16 nPos ) const
void SfxFrame::RemoveChildFrame_Impl( SfxFrame* pFrame )
{
- DBG_ASSERT( pChildArr, "Unbekannter Frame!");
+ DBG_ASSERT( pChildArr, "Unknown Frame!");
sal_uInt16 nPos = pChildArr->GetPos(pFrame);
pChildArr->Remove( nPos );
};
@@ -306,7 +306,7 @@ void SfxFrame::CancelTransfers( sal_Bool /*bCancelLoadEnv*/ )
for( pFrm = SfxViewFrame::GetFirst( pObj );
pFrm && &pFrm->GetFrame() == this;
pFrm = SfxViewFrame::GetNext( *pFrm, pObj ) ) ;
- // Keine anderer Frame mehr auf Doc -> Cancel
+ // No more Frame in Document -> Cancel
if( !pFrm )
{
pObj->CancelTransfers();
@@ -314,12 +314,12 @@ void SfxFrame::CancelTransfers( sal_Bool /*bCancelLoadEnv*/ )
}
}
- // zuerst Nachladende Frames stoppen
+ // First stop multiload Frames
sal_uInt16 nCount = GetChildFrameCount();
for( sal_uInt16 n = 0; n<nCount; n++ )
GetChildFrame( n )->CancelTransfers();
- // ggf. StarOne-Loader canceln
+ // Check if StarOne-Loader should be canceled
SfxFrameWeak wFrame( this );
if (wFrame.Is())
pImp->bInCancelTransfers = sal_False;
@@ -362,9 +362,10 @@ void SfxFrame::SetFrameType_Impl( sal_uInt32 n )
void SfxFrame::GetViewData_Impl()
{
- // Alle zwischen Laden und Entfernen "anderbaren Daten aktualisieren; die
- // festen Daten werden nur einmal ( nach PrepareForDoc_Impl in UpdateDescriptor )
- // geholt, um Zeit zu sparen.
+ // Update all modifiable data between load and unload, the
+ // fixed data is only processed once (after PrepareForDoc_Impl in
+ // updateDescriptor) to save time.
+
SfxViewFrame* pViewFrame = GetCurrentViewFrame();
if( pViewFrame && pViewFrame->GetViewShell() )
{
@@ -385,7 +386,7 @@ void SfxFrame::GetViewData_Impl()
pSet->Put( SfxUInt16Item( SID_VIEW_ID, pViewFrame->GetCurViewId() ) );
if ( pChildArr )
{
- // Bei Framesets m"ussen auch die Daten der ChildViews geholt werden
+ // For Framesets also the data from the ChildViews hace to be processed
sal_uInt16 nCount = pChildArr->Count();
for ( sal_uInt16 n=nCount; n>0; n--)
{
@@ -400,15 +401,15 @@ void SfxFrame::GetViewData_Impl()
void SfxFrame::UpdateDescriptor( SfxObjectShell *pDoc )
{
- // Beim PrepareForDoc_Impl wird der Descriptor des Frames aktualisiert
- // und sein ItemSet neu initialisiert. Alle Daten, die f"ur ein sp"ateres
- // Restaurieren der View n"otig sind, sind damit festgehalten.
- // Soll das Dokument ersetzt werden, wird durch GetViewData_Impl (s.o.)
- // die neueste Information hinzugef"ugt. Alles zusammen wird dann in der
- // Browse-History gesichert. Beim Aktivieren eines solchen FramePickEntry
- // wird das komplette ItemSet und der Descriptor im OpenDoc mitgeschickt.
- // Hier werden nur die festen Eigenschaften gesichert; die "anderbaren werden
- // durch GetViewData geholt ( spart Zeit ).
+ // For PrepareForDoc_Impl frames, the descriptor of the updated
+ // and new itemset to be initialized. All data fir restoring the view
+ // are thus saved. If the document be replaced, GetViewData_Impl (so)
+ // the latest information hinzugef by "added. All together then the
+ // browser-history saved in. When you activate such frame pick entry
+ // is complete itemsets and the descriptor in the OpenDoc sent;.
+ // Here only the fixed properties identified "other adjustable, the
+ // retrieved by GetViewData (saves time).
+
DBG_ASSERT( pDoc, "NULL-Document inserted ?!" );
GetParentFrame();
@@ -420,7 +421,7 @@ void SfxFrame::UpdateDescriptor( SfxObjectShell *pDoc )
GetDescriptor()->SetEditable( bEditable );
- // FileOpen-Parameter merken
+ // Mark FileOpen parameter
SfxItemSet* pItemSet = pMed->GetItemSet();
String aMedName( pMed->GetName() );
@@ -435,7 +436,7 @@ void SfxFrame::UpdateDescriptor( SfxObjectShell *pDoc )
SfxItemSet *pSet = GetDescriptor()->GetArgs();
- // Alle alten Items l"oschen
+ // Delete all old Items
pSet->ClearItem();
if ( pRefererItem )
@@ -456,13 +457,13 @@ void SfxFrame::UpdateDescriptor( SfxObjectShell *pDoc )
void SfxFrame::SetDescriptor( SfxFrameDescriptor *pD )
{
- DBG_ASSERT( pD, "Kein Descriptor!" );
- DBG_ASSERT( pD != pImp->pDescr, "Descriptor ist schon gesetzt!" );
+ DBG_ASSERT( pD, "No Descriptor!" );
+ DBG_ASSERT( pD != pImp->pDescr, "Descriptor is already set!" );
if ( pImp->pDescr )
{
- // Nur TopLevel-Frames verwalten ihren Descriptor selbst, bei den
- // anderen tut es das Frameset
+ // Only TopLevel-Frames handels their Descriptor, for the others
+ // this is done by the Frameset
if ( !pParentFrame )
delete pImp->pDescr;
}
@@ -473,12 +474,12 @@ void SfxFrame::SetDescriptor( SfxFrameDescriptor *pD )
SfxFrameDescriptor* SfxFrame::GetDescriptor() const
{
- // On Demand einen FrameDescriptor anlegen; wenn es kein TopLevel-Frame
- // ist, f"uhrt es zu Fehlern, da keine g"ulige Verkettung hergestellt wird
+ // Create a FrameDescriptor On Demand; if there is no TopLevel-Frame
+ // will result in an error, as no valid link is created.
if ( !pImp->pDescr )
{
- DBG_ASSERT( !GetParentFrame(), "Kein TopLevel-Frame, aber kein Descriptor!" );
+ DBG_ASSERT( !GetParentFrame(), "No TopLevel-Frame, but no Descriptor!" );
pImp->pDescr = new SfxFrameDescriptor;
if ( GetCurrentDocument() )
pImp->pDescr->SetURL( GetCurrentDocument()->GetMedium()->GetOrigURL() );
@@ -492,7 +493,7 @@ void SfxFrame::GetTargetList( TargetList& rList ) const
{
if ( !GetParentFrame() )
{
- // Einen Leerstring f"ur 'Kein Target'
+ // An empty string for 'No Target'
rList.push_back( new String() );
rList.push_back( new String( DEFINE_CONST_UNICODE( "_top" ) ) );
rList.push_back( new String( DEFINE_CONST_UNICODE( "_parent" ) ) );
@@ -685,19 +686,19 @@ SfxFrameIterator::SfxFrameIterator( const SfxFrame& rFrame, sal_Bool bRecur )
SfxFrame* SfxFrameIterator::FirstFrame()
{
- // GetFirst beginnt die Iteration beim ersten ChildFrame
+ // GetFirst starts the iteration at the first child frame
return pFrame->GetChildFrame( 0 );
}
SfxFrame* SfxFrameIterator::NextFrame( SfxFrame& rPrev )
{
- // Zuerst auf Kinder testen, wenn Rekursion erw"unscht
+ // If recursion is requested testing is done first on Children.
SfxFrame *pRet = NULL;
if ( bRecursive )
pRet = rPrev.GetChildFrame( 0 );
if ( !pRet )
{
- // Anderenfalls mit den Geschwistern von rPrev weitermachen
+ // In other case continue with the siblings of rPrev
pRet = NextSibling_Impl( rPrev );
}
@@ -873,7 +874,7 @@ void SfxFrame::CreateWorkWindow_Impl()
}
catch(Exception&)
{
- OSL_ENSURE(0,"SfxFrame::CreateWorkWindow_Impl: Exception cachted. Please try to submit a repoducable bug !");
+ OSL_FAIL("SfxFrame::CreateWorkWindow_Impl: Exception cachted. Please try to submit a repoducable bug !");
}
}
diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx
index 0f3f80097bfb..72843c57789e 100755
--- a/sfx2/source/view/frame2.cxx
+++ b/sfx2/source/view/frame2.cxx
@@ -122,7 +122,7 @@ long SfxFrameWindow_Impl::Notify( NotifyEvent& rNEvt )
{
if ( pView->GetViewShell() && !pView->GetViewShell()->GetUIActiveIPClient_Impl() && !pFrame->IsInPlace() )
{
- DBG_TRACE("SfxFrame: GotFocus");
+ OSL_TRACE("SfxFrame: GotFocus");
pView->MakeActive_Impl( sal_False );
}
@@ -438,7 +438,6 @@ void SfxFrame::PositionWindow_Impl( const Rectangle& rWinArea ) const
{
Window *pWin = pImp->pExternalContainerWindow;
- // Groesse setzen
const Size aAppWindow( pImp->pExternalContainerWindow->GetDesktopRectPixel().GetSize() );
Point aPos( rWinArea.TopLeft() );
Size aSz( rWinArea.GetSize() );
diff --git a/sfx2/source/view/orgmgr.cxx b/sfx2/source/view/orgmgr.cxx
index 5979d64e1b7b..c923135dbdc4 100755
--- a/sfx2/source/view/orgmgr.cxx
+++ b/sfx2/source/view/orgmgr.cxx
@@ -57,23 +57,22 @@ using namespace ::com::sun::star;
//=========================================================================
-/* [Beschreibung]
-
- Implementierungsklasse; einzelner Eintrag in der Dateiansicht
+/* [Description]
+ Implementation class, single entry in the file view.
*/
struct _FileListEntry
{
- String aFileName; // Dateiname mit komplettem Pfad
- String aBaseName; // Dateiname
+ String aFileName; // File Name with complete path
+ String aBaseName; // File Name
const CollatorWrapper* pCollator;
- SfxObjectShellLock aDocShell; // ObjectShell als Ref-Klasse
+ SfxObjectShellLock aDocShell; // ObjectShell as reference class
- sal_Bool bFile; // als Datei auf Platte
- // (!= unbenannt1, nicht als Dok. geladen;
- // diese werden nicht gespeichert!)
- sal_Bool bOwner; // selbst erzeugt
+ sal_Bool bFile; // As File on disk
+ // (!= not processed, not loaded as document
+ // these are not saved!)
+ sal_Bool bOwner; // self-generated
sal_Bool bNoName;
sal_Bool bOwnFormat;
@@ -139,22 +138,21 @@ SV_IMPL_OP_PTRARR_SORT(_SfxObjectList, _FileListEntry*)
sal_Bool _FileListEntry::DeleteObjectShell()
-/* [Beschreibung]
-
- Freigabe der DokumentShell
+/* [Description]
- [Returnwert] sal_True: alles Ok
- sal_False: es ist ein Fehler aufgetreten (das
- Dokument konnte nicht gesichert werden)
+ Release of ther DocumentShell
+ [Return value] TRUE: Everything is ok
+ FALSE: An error occured
+ (the document could not be saved)
*/
{
sal_Bool bRet = sal_True;
- //Falls wir die Shell angelegt haben und sie veraendert wurde
+
if(bOwner && aDocShell.Is() && aDocShell->IsModified())
{
- //Mussten wir konvertieren?
+ // Converted?
if( bOwnFormat )
{
if(!aDocShell->Save() )
@@ -178,7 +176,7 @@ sal_Bool _FileListEntry::DeleteObjectShell()
}
else
{
- // Falls konvertiert im eigenen Format speichern
+ // If converted save in native format
INetURLObject aObj( aFileName );
String aTitle = aObj.getName( INetURLObject::LAST_SEGMENT, true,
INetURLObject::DECODE_WITH_CHARSET );
@@ -234,13 +232,9 @@ SfxOrganizeMgr::SfxOrganizeMgr( SfxOrganizeListBox_Impl *pLeft,
bDeleteTemplates(pTempl == 0),
bModified(0)
-/* [Beschreibung]
-
- Konstruktor
-
- Das aktuelle Dokument wird in die Liste der Dokumente
- aufgenommen.
+/* [Description]
+ Constructor. The current document is added to the list of documents.
*/
{
pImpl->pDocList = new SfxObjectList;
@@ -275,17 +269,17 @@ SfxOrganizeMgr::~SfxOrganizeMgr()
SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( sal_uInt16 nIdx )
-/* [Beschreibung]
+/* [Description]
- Zugriff auf die DokumentShell an der Position nIdx
+ Access to the DocumentShell at the position nIdx.
- [Returnwert] Referenz auf die DokumentShell
+ [Return value] Reference to the DocumentShell
*/
{
_FileListEntry* pEntry = (*pImpl->pDocList)[nIdx];
- // andernfalls Doc-Shell anlegen
+ // otherwise create Doc-Shell
if ( !pEntry->aDocShell.Is() )
{
INetURLObject aFileObj( pEntry->aFileName );
@@ -336,14 +330,13 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( sal_uInt16 nIdx )
sal_Bool SfxOrganizeMgr::DeleteObjectShell(sal_uInt16 nIdx)
-/* [Beschreibung]
+/* [Description]
- Freigabe der DokumentShell an der Position nIdx
-
- [Returnwert] sal_True: alles Ok
- sal_False: es ist ein Fehler aufgetreten (das
- Dokument konnte nicht gesichert werden)
+ Release DocumentShell at position nIdx
+ [Return value] TRUE: Everything is ok
+ FALSE: An error occured
+ (the document could not be saved)
*/
{
return (*pImpl->pDocList)[nIdx]->DeleteObjectShell();
@@ -353,12 +346,12 @@ sal_Bool SfxOrganizeMgr::DeleteObjectShell(sal_uInt16 nIdx)
SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell(sal_uInt16 nRegion,
sal_uInt16 nIdx)
-/* [Beschreibung]
+/* [Description]
- Zugriff auf die DokumentShell an der Position nIdx im Bereich
- nRegion (Dokumentvorlage)
+ Access to the DocumentShell at Position nIdx in Region
+ nRegion (Document template)
- [Returnwert] Referenz auf die DokumentShell
+ [Return value] Reference to the DocumentShell
*/
{
@@ -369,15 +362,14 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell(sal_uInt16 nRegion,
sal_Bool SfxOrganizeMgr::DeleteObjectShell(sal_uInt16 nRegion, sal_uInt16 nIdx)
-/* [Beschreibung]
-
- Freigabe der DokumentShell an der Position nIdx im Bereich
- nRegion (Dokumentvorlage)
+/* [Description]
- [Returnwert] sal_True: alles Ok
- sal_False: es ist ein Fehler aufgetreten (das
- Dokument konnte nicht gesichert werden)
+ Release of the DocumentShell at Position nIdx in Region
+ nRegion (Document template)
+ [Return value] TRUE: Everything is ok
+ FALSE: An error occured
+ (the document could not be saved)
*/
{
@@ -391,22 +383,22 @@ sal_Bool SfxOrganizeMgr::Copy(sal_uInt16 nTargetRegion,
sal_uInt16 nSourceRegion,
sal_uInt16 nSourceIdx)
-/* [Beschreibung]
+/* [Description]
- Kopieren einer Dokumentvorlage
+ Copy of a Document Template
[Parameter]
- sal_uInt16 nTargetRegion Index des Zielbereiches
- sal_uInt16 nTargetIdx Index Zielposition
- sal_uInt16 nSourceRegion Index des Quellbereiches
- sal_uInt16 nSourceIdx Index der zu kopierenden / z uverschiebenden
- Dokumentvorlage
+ sal_uInt16 nTargetRegion Index of the Target Region
+ sal_uInt16 nTargetIdx Index of the Target Position
+ sal_uInt16 nSourceRegion Index of the Source Region
+ sal_uInt16 nSourceIdx Index of the template to be
+ copied/moved.
- [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
+ [Return value] Success (TRUE) or Failure (FALSE)
- [Querverweise]
+ [Cross-reference]
<SfxDocumentTemplates::Copy(sal_uInt16 nTargetRegion,
sal_uInt16 nTargetIdx,
@@ -416,7 +408,7 @@ sal_Bool SfxOrganizeMgr::Copy(sal_uInt16 nTargetRegion,
*/
{
- if(nSourceIdx == USHRT_MAX) // keine Verzeichnisse kopieren
+ if(nSourceIdx == USHRT_MAX) // No directories copied
return sal_False ;
const sal_Bool bOk = pTemplates->Copy(nTargetRegion, nTargetIdx,
nSourceRegion, nSourceIdx);
@@ -432,32 +424,30 @@ sal_Bool SfxOrganizeMgr::Move(sal_uInt16 nTargetRegion,
sal_uInt16 nSourceRegion,
sal_uInt16 nSourceIdx)
-/* [Beschreibung]
+/* [Description]
- Verschieben einer Dokumentvorlage
+ Moving a template
[Parameter]
- sal_uInt16 nTargetRegion Index des Zielbereiches
- sal_uInt16 nTargetIdx Index Zielposition
- sal_uInt16 nSourceRegion Index des Quellbereiches
- sal_uInt16 nSourceIdx Index der zu kopierenden / z uverschiebenden
- Dokumentvorlage
-
- [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
+ sal_uInt16 nTargetRegion Index of the Target Region
+ sal_uInt16 nTargetIdx Index of the Target Position
+ sal_uInt16 nSourceRegion Index of the Source Region
+ sal_uInt16 nSourceIdx Index of the template to be
+ copied/moved.
+ [Return value] Success (TRUE) or Failure (FALSE)
- [Querverweise]
+ [Cross-reference]
<SfxDocumentTemplates::Move(sal_uInt16 nTargetRegion,
sal_uInt16 nTargetIdx,
sal_uInt16 nSourceRegion,
sal_uInt16 nSourceIdx)>
-
*/
{
- if(nSourceIdx == USHRT_MAX) // keine Verzeichnisse verschieben
+ if(nSourceIdx == USHRT_MAX) // No directory moved
return sal_False ;
const sal_Bool bOk = pTemplates->Move(nTargetRegion, nTargetIdx,
nSourceRegion, nSourceIdx);
@@ -471,24 +461,21 @@ sal_Bool SfxOrganizeMgr::Move(sal_uInt16 nTargetRegion,
sal_Bool SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller,
sal_uInt16 nRegion, sal_uInt16 nIdx)
-/* [Beschreibung]
+/* [Description]
- "oschen einer Dokumentvorlage
+ Delete a Document Template
[Parameter]
- SfxOrganizeListBox *pCaller rufende ListBox; da dieses
- Event durch das Men"u oder
- durch das Keyboard angetriggert wird,
- mu"s das Model der ListBox anschlie"send
- aktualisiert werden.
- sal_uInt16 nRegion Index des Bereiches
- sal_uInt16 nIdx Index der Dokumentvorlage
-
- [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
+ SfxOrganizeListBox *pCaller calling ListBox, since this event
+ is triggered by the menu or the
+ keyboard, the ListBox must be updated.
+ sal_uInt16 nRegion Index for Region
+ sal_uInt16 nIdx Index of Document template
+ [Return value] Success (TRUE) or Failure (FALSE)
- [Querverweise]
+ [Cross-reference]
<SfxDocumentTemplates::Delete(sal_uInt16 nRegion, sal_uInt16 nIdx)>
@@ -541,7 +528,7 @@ sal_Bool SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller,
if(bOk)
{
bModified = 1;
- // zu loeschender Eintrag
+ // Entry to be deleted.
SvLBoxEntry *pEntryToDelete = pCaller->SvLBox::GetEntry(pCaller->SvLBox::GetEntry(nRegion), nIdx);
pCaller->GetModel()->Remove(pEntryToDelete);
@@ -555,26 +542,20 @@ sal_Bool SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller,
sal_Bool SfxOrganizeMgr::InsertDir
(
- SfxOrganizeListBox_Impl* pCaller,/* rufende ListBox; da dieses Event
- durch das Men"u oder durch das
- Keyboard angetriggert wird,
- mu\s das Model der ListBox
- anschlie\send aktualisiert werden */
- const String& rText, // logischer Name des Bereiches
- sal_uInt16 nRegion // Index des Bereiches
+ SfxOrganizeListBox_Impl* pCaller, /* calling ListBox, since this event
+ is triggered by the menu or the
+ keyboard, the ListBox must be updated. */
+ const String& rText, // logical Name of Region
+ sal_uInt16 nRegion // Index of Region
)
-/* [Beschreibung]
+/* [Description]
- Einf"ugen eines Bereiches
+ Insert Region.
+ [Return value] Success (TRUE) or Failure (FALSE)
- [R"uckgabewert]
-
- Erfolg (sal_True) oder Mi\serfolg (sal_False)
-
-
- [Querverweise]
+ [Cross-reference]
<SfxDocumentTemplates::InsertDir(const String &, sal_uInt16 nRegion)>
*/
@@ -599,23 +580,21 @@ sal_Bool SfxOrganizeMgr::InsertDir
sal_Bool SfxOrganizeMgr::SetName(const String &rName,
sal_uInt16 nRegion, sal_uInt16 nIdx)
-/* [Beschreibung]
+/* [Description]
- "Andern eines (logischen) Namens
+ Set (logical) Name
[Parameter]
- const String &rName der neue Name
- sal_uInt16 nRegion Index des Bereiches
- sal_uInt16 nIdx Index der Dokumentvorlage
+ const String &rName The new Name
+ sal_uInt16 nRegion Index of Region
+ sal_uInt16 nIdx Index of Document template
- [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
+ [Return value] Success (TRUE) or Failure (FALSE)
-
- [Querverweise]
+ [Cross-reference]
<SfxDocumentTemplates::SetName(const String &, sal_uInt16 nRegion, sal_uInt16 nIdx)>
-
*/
{
@@ -629,23 +608,21 @@ sal_Bool SfxOrganizeMgr::SetName(const String &rName,
sal_Bool SfxOrganizeMgr::CopyTo(sal_uInt16 nRegion, sal_uInt16 nIdx, const String &rName) const
-/* [Beschreibung]
+/* [Description]
- Export einer Vorlage
+ Export of a Template
[Parameter]
- sal_uInt16 nRegion Index des Bereiches
- sal_uInt16 nIdx Index der Dokumentvorlage
- const String &rName Dateiname
+ sal_uInt16 nRegion Index of Region
+ sal_uInt16 nIdx Index of Document Template
+ const String &rName File name
- [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
+ [Return value] Success (TRUE) or Failure (FALSE)
-
- [Querverweise]
+ [Cross-reference]
<SfxDocumentTemplates::CopyTo( sal_uInt16 nRegion, sal_uInt16 nIdx, const String &)>
-
*/
{
@@ -657,27 +634,25 @@ sal_Bool SfxOrganizeMgr::CopyTo(sal_uInt16 nRegion, sal_uInt16 nIdx, const Strin
sal_Bool SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller,
sal_uInt16 nRegion, sal_uInt16 nIdx, String &rName)
-/* [Beschreibung]
+/* [Description]
- Import einer Vorlage
+ Import of Document Template
[Parameter]
- SfxOrganizeListBox *pCaller rufende ListBox; da dieses
- Event durch das Men"u angetriggert wird,
- mu"s das Model der ListBox anschlie"send
- aktualisiert werden.
- sal_uInt16 nRegion Index des Bereiches
- sal_uInt16 nIdx Index der Dokumentvorlage
- String &rName Dateiname
+ SfxOrganizeListBox *pCaller calling ListBox, since this event
+ is triggered by the menu or the
+ keyboard, the ListBox must be updated.
- [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
+ sal_uInt16 nRegion Index of Region
+ sal_uInt16 nIdx Index of Document Template
+ String &rName File name
+ [Return value] Success (TRUE) or Failure (FALSE)
- [Querverweise]
+ [Cross-reference]
<SfxDocumentTemplates::CopyFrom( sal_uInt16 nRegion, sal_uInt16 nIdx, const String &)>
-
*/
{
@@ -686,7 +661,7 @@ sal_Bool SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller,
pParent = pCaller->GetParent(pParent);
if( pTemplates->CopyFrom( nRegion, nIdx, rName ) )
{
- // pCaller aktualisieren
+ // Update pCaller
if( nIdx == USHRT_MAX )
nIdx = 0;
else nIdx++;
@@ -710,20 +685,19 @@ sal_Bool SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller,
sal_Bool SfxOrganizeMgr::InsertFile( SfxOrganizeListBox_Impl* pCaller, const String& rFileName )
-/* [Beschreibung]
+/* [Description]
- Eine Datei in der Dateiansicht hinzuf"ugen
+ Insert a file in the file view.
[Parameter]
- SfxOrganizeListBox *pCaller rufende ListBox; da dieses
- Event durch das Men"u angetriggert wird,
- mu"s das Model der ListBox anschlie"send
- aktualisiert werden.
- const String &rFileName Name der hinzuf"ugenden Datei
+ SfxOrganizeListBox *pCaller calling ListBox, since this event
+ is triggered by the menu or the
+ keyboard, the ListBox must be updated.
- [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
+ const String &rFileName Name of inserted File.
+ [Return value] Success (TRUE) or Failure (FALSE)
*/
{
@@ -744,16 +718,16 @@ sal_Bool SfxOrganizeMgr::InsertFile( SfxOrganizeListBox_Impl* pCaller, const Str
sal_Bool SfxOrganizeMgr::Rescan()
-/* [Beschreibung]
+/* [Description]
- Aktualisieren der Datenbasis
+ Updating the database.
- [R"uckgabewert]
+ [Return value]
- sal_True es bestanden Unterschiede
- FALSE keine "Anderung
+ TRUE Changes were made
+ FALSE No changes
- [Querverweise]
+ [Cross-reference]
<SfxDocumentTemplates::Rescan()>
*/
@@ -771,14 +745,13 @@ sal_Bool SfxOrganizeMgr::Rescan()
void SfxOrganizeMgr::SaveAll(Window *pParent)
-/* [Beschreibung]
+/* [Description]
- Schreiben aller ge"anderten Dokumente
+ Save all Documents that have been modified
[Parameter]
- Window *pParent Parent der Boxen f"ur Fehlermeldungen
-
+ Window *pParent Parent of the Error message Box
*/
{
diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx
index fb362b7814ea..5f044c94dc0b 100755
--- a/sfx2/source/view/printer.cxx
+++ b/sfx2/source/view/printer.cxx
@@ -73,23 +73,23 @@ struct SfxPrintOptDlg_Impl
SfxPrinter* SfxPrinter::Create( SvStream& rStream, SfxItemSet* pOptions )
-/* [Beschreibung]
+/* [Description]
- Erzeugt einen <SfxPrinter> aus dem Stream. Geladen wird genaugenommen
- nur ein JobSetup. Falls ein solcher Drucker auf dem System nicht
- verf"augbar ist, wird das Original als Orig-JobSetup gemerkt und
- ein "anhlicher exisitierender Drucker genommen.
+ Creates a <SfxPrinter> from the stream. Loading is really only a jobsetup.
+ If such a printer is not available on the system, then the original is
+ marked as the original Job-setup and a comparable printer is selected from
+ existing ones.
- Die 'pOptions' werden in den erzeugten SfxPrinter "ubernommen,
- der Returnwert geh"ort dem Caller.
+ The 'pOptions' are taken over in the generated SfxPrinter, the return
+ value belongs to the caller.
*/
{
- // JobSetup laden
+ // Load JobSetup
JobSetup aFileJobSetup;
rStream >> aFileJobSetup;
- // Drucker erzeugen
+ // Get printers
SfxPrinter *pPrinter = new SfxPrinter( pOptions, aFileJobSetup );
return pPrinter;
}
@@ -98,9 +98,9 @@ SfxPrinter* SfxPrinter::Create( SvStream& rStream, SfxItemSet* pOptions )
SvStream& SfxPrinter::Store( SvStream& rStream ) const
-/* [Beschreibung]
+/* [Description]
- Speichert das verwendete JobSetup des <SfxPrinter>s.
+ Saves the used JobSetup of <SfxPrinter>s.
*/
{
@@ -111,9 +111,9 @@ SvStream& SfxPrinter::Store( SvStream& rStream ) const
SfxPrinter::SfxPrinter( SfxItemSet* pTheOptions ) :
-/* [Beschreibung]
+/* [Description]
- Dieser Ctor erzeugt einen Standard-Drucker.
+ This constructor creates a default printer.
*/
pOptions( pTheOptions ),
@@ -226,7 +226,7 @@ SfxPrintOptionsDialog::SfxPrintOptionsDialog( Window *pParent,
{
SetText( SfxResId( STR_PRINT_OPTIONS_TITLE ) );
- // TabPage einh"angen
+ // Insert TabPage
pPage = pViewSh->CreatePrintOptionsPage( this, *pOptions );
DBG_ASSERT( pPage, "CreatePrintOptions != SFX_VIEW_HAS_PRINTOPTIONS" );
if( pPage )
@@ -236,7 +236,7 @@ SfxPrintOptionsDialog::SfxPrintOptionsDialog( Window *pParent,
pPage->Show();
}
- // Dialoggr"o\se bestimmen
+ // Set dialog size
Size a6Sz = LogicToPixel( Size( 6, 6 ), MAP_APPFONT );
Size aBtnSz = LogicToPixel( Size( 50, 14 ), MAP_APPFONT );
Size aOutSz( pPage ? pPage->GetSizePixel() : Size() );
@@ -245,7 +245,7 @@ SfxPrintOptionsDialog::SfxPrintOptionsDialog( Window *pParent,
nWidth += a6Sz.Width();
aOutSz.Width() += nWidth;
if ( aOutSz.Height() < 90 )
- // mindestens die H"ohe der 3 Buttons
+ // at least the height of the 3 buttons
aOutSz.Height() = 90;
SetOutputSizePixel( aOutSz );
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index e361d866a3d8..1b49688489be 100755
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -692,7 +692,7 @@ sal_Bool SAL_CALL SfxBaseController::suspend( sal_Bool bSuspend ) throw( ::com::
getFrame()->removeFrameActionListener( m_pData->m_xListener ) ;
SfxViewFrame* pActFrame = m_pData->m_pViewShell->GetFrame() ;
- // weitere View auf dasselbe Doc?
+ // More Views on the same document?
SfxObjectShell* pDocShell = m_pData->m_pViewShell->GetObjectShell() ;
sal_Bool bOther = sal_False ;
@@ -1209,7 +1209,7 @@ throw (::com::sun::star::uno::RuntimeException)
SfxSlotPool* pSlotPool = pPool ? pPool : &SFX_SLOTPOOL();
const sal_uIntPtr nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG );
- // Gruppe anw"ahlen ( Gruppe 0 ist intern )
+ // Select Group ( Group 0 is internal )
for ( sal_uInt16 i=0; i<pSlotPool->GetGroupCount(); i++ )
{
String aName = pSlotPool->SeekGroup( i );
@@ -1400,7 +1400,7 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
rFrame.GetWindow().Show();
}
- // Jetzt UpdateTitle, hidden TopFrames haben sonst keinen Namen!
+ // UpdateTitle now, hidden TopFrames have otherwise no Name!
pViewFrame->UpdateTitle();
if ( !rFrame.IsInPlace() )
diff --git a/sfx2/source/view/userinputinterception.cxx b/sfx2/source/view/userinputinterception.cxx
index 845ba8cc70d0..19c6ff50e5c9 100755
--- a/sfx2/source/view/userinputinterception.cxx
+++ b/sfx2/source/view/userinputinterception.cxx
@@ -267,7 +267,7 @@ namespace sfx2
break;
default:
- OSL_ENSURE( false, "UserInputInterception::handleNotifyEvent: illegal event type!" );
+ OSL_FAIL( "UserInputInterception::handleNotifyEvent: illegal event type!" );
break;
}
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 6e137c1a9513..6d5d0930370a 100755
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -111,7 +111,7 @@ using ::com::sun::star::document::XViewDataSupplier;
using ::com::sun::star::container::XIndexContainer;
namespace css = ::com::sun::star;
-// wg. ViewFrame::Current
+// Due to ViewFrame::Current
#include "appdata.hxx"
#include <sfx2/taskpane.hxx>
#include <sfx2/app.hxx>
@@ -307,7 +307,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
SfxFrame *pParent = GetFrame().GetParentFrame();
if ( rReq.GetSlot() == SID_RELOAD )
{
- // Bei CTRL-Reload den aktiven Frame reloaden
+ // When CTRL-Reload, reload the active Frame
SfxViewFrame* pActFrame = this;
while ( pActFrame )
pActFrame = pActFrame->GetActiveChildFrame_Impl();
@@ -322,8 +322,8 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
}
}
- // Wenn nur ein Reload der Graphiken eines oder mehrerer ChildFrames
- // gemacht werden soll
+ // If only a reload of the graphics for one or more child frames
+ // should be made
SfxFrame& rFrame = GetFrame();
if ( pParent == &rFrame && rFrame.GetChildFrameCount() )
{
@@ -342,14 +342,14 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
pChild = pNext;
}
- // Der TopLevel-Frame selbst het keine Graphiken!
+ // The top level frame itself has no graphics!
if ( bReloadAvailable )
return;
}
}
else
{
- // Bei CTRL-Edit den TopFrame bearbeiten
+ // When CTRL-Edit, edit the TopFrame.
sal_uInt16 nModifier = rReq.GetModifier();
if ( ( nModifier & KEY_MOD1 ) && pParent )
@@ -368,9 +368,9 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
if ( GetFrame().HasComponent() )
break;
- // Wg. Doppeltbelegung in Toolboxen (mit/ohne Ctrl) ist es auch
- // m"oglich, da\s der Slot zwar enabled ist, aber Ctrl-Click
- // trotzdem nicht geht!
+ // Due to Double occupancy in toolboxes (with or without Ctrl),
+ // it is also possible that the slot is enabled, but Ctrl-click
+ // despite this is not!
if( !pSh || !pSh->HasName() || !(pSh->Get_Impl()->nLoadedFlags & SFX_LOADED_MAINDOCUMENT ))
break;
@@ -407,7 +407,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
sal_Bool bNeedsReload = sal_False;
if ( !pSh->IsReadOnly() )
{
- // Speichern und Readonly Reloaden
+ // Save and reload Readonly
if( pSh->IsModified() )
{
if ( pSh->PrepareClose() )
@@ -450,11 +450,11 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
return;
}
- // Parameter auswerten
+ // Evaluate Parameter
// sal_Bool bReload = sal_True;
if ( rReq.IsAPI() )
{
- // per API steuern ob r/w oder r/o
+ // Control through API if r/w or r/o
SFX_REQUEST_ARG(rReq, pEditItem, SfxBoolItem, SID_EDITDOC, sal_False);
if ( pEditItem )
nOpenMode = pEditItem->GetValue() ? SFX_STREAM_READWRITE : SFX_STREAM_READONLY;
@@ -518,12 +518,12 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
pSh->DoSaveCompleted( pMed );
}
- // r/o-Doc kann nicht in Editmode geschaltet werden?
+ // Readonly document can not be switched to edit mode?
rReq.Done( sal_False );
if ( nOpenMode == SFX_STREAM_READWRITE && !rReq.IsAPI() )
{
- // dem ::com::sun::star::sdbcx::User anbieten, als Vorlage zu oeffnen
+ // ::com::sun::star::sdbcx::User offering to open it as a template
QueryBox aBox( &GetWindow(), SfxResId(MSG_QUERY_OPENASTEMPLATE) );
if ( RET_YES == aBox.Execute() )
{
@@ -576,9 +576,9 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
case SID_RELOAD:
{
- // Wg. Doppeltbelegung in Toolboxen (mit/ohne Ctrl) ist es auch
- // m"oglich, da\s der Slot zwar enabled ist, aber Ctrl-Click
- // trotzdem nicht geht!
+ // Due to Double occupancy in toolboxes (with or without Ctrl),
+ // it is also possible that the slot is enabled, but Ctrl-click
+ // despite this is not!
if ( !pSh || !pSh->CanReload_Impl() )
break;
SfxApplication* pApp = SFX_APP();
@@ -590,7 +590,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
if( pImp->bReloading || pSh->IsInModalMode() )
return;
- // AutoLoad ist ggf. verboten
+ // AutoLoad is prohibited if possible
SFX_REQUEST_ARG(rReq, pAutoLoadItem, SfxBoolItem, SID_AUTOLOAD, sal_False);
if ( pAutoLoadItem && pAutoLoadItem->GetValue() &&
GetFrame().IsAutoLoadLocked_Impl() )
@@ -600,12 +600,12 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
pImp->bReloading = sal_True;
SFX_REQUEST_ARG(rReq, pURLItem, SfxStringItem,
SID_FILE_NAME, sal_False);
- // editierbar "offnen?
+ // Open as editable?
sal_Bool bForEdit = !pSh->IsReadOnly();
if ( rReq.GetSlot() == SID_EDITDOC )
bForEdit = !bForEdit;
- // ggf. beim User nachfragen
+ // If possible ask the User
sal_Bool bDo = ( GetViewShell()->PrepareClose() != sal_False );
SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, sal_False);
if ( bDo && GetFrame().DocIsModified_Impl() &&
@@ -619,15 +619,15 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
{
SfxMedium *pMedium = xOldObj->GetMedium();
- // Frameset abziehen, bevor FramesetView evtl. verschwindet
+ // Remove Frameset before the FramesetView may disappear
String aURL = pURLItem ? pURLItem->GetValue() :
pMedium->GetName();
sal_Bool bHandsOff =
( pMedium->GetURLObject().GetProtocol() == INET_PROT_FILE && !xOldObj->IsDocShared() );
- // bestehende SfxMDIFrames f"ur dieses Doc leeren
- // eigenes Format oder R/O jetzt editierbar "offnen?
+ // Emty existing SfxMDIFrames for this Document
+ // in native format or R/O, open it now for editing?
SfxObjectShellLock xNewObj;
// collect the views of the document
@@ -680,9 +680,8 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
pNewSet->ClearItem( SID_DOC_READONLY );
}
- // Falls eine salvagede Datei vorliegt, nicht nochmals die
- // OrigURL mitschicken, denn die Tempdate ist nach Reload
- // ungueltig
+ // If a salvaged file is present, do not enclose the OrigURL
+ // again, since the Tempdate is invalid after reload.
SFX_ITEMSET_ARG( pNewSet, pSalvageItem, SfxStringItem, SID_DOC_SALVAGE, sal_False);
if( pSalvageItem )
{
@@ -691,7 +690,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
}
// TODO/LATER: Temporary solution, the SfxMedium must know the original URL as aLogicName
- // SfxMedium::Transfer_Impl() will be vorbidden then.
+ // SfxMedium::Transfer_Impl() will be forbidden then.
if ( xOldObj->IsDocShared() )
pNewSet->Put( SfxStringItem( SID_FILE_NAME, xOldObj->GetSharedFileURL() ) );
@@ -704,7 +703,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
xOldObj->CancelTransfers();
- // eigentliches Reload
+ // Real Reload
//pNewSet->Put( SfxFrameItem ( SID_DOCFRAME, GetFrame() ) );
if ( pSilentItem && pSilentItem->GetValue() )
@@ -727,8 +726,8 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
pNewSet->Put( SfxUInt16Item(SID_UPDATEDOCMODE,::com::sun::star::document::UpdateDocMode::ACCORDING_TO_CONFIG) );
xOldObj->SetModified( sal_False );
- // Altes Dok nicht cachen! Gilt nicht, wenn anderes
- // Doc geladen wird.
+ // Do not chache the old Document! Is invalid when loading
+ // another document.
SFX_ITEMSET_ARG( pMedium->GetItemSet(), pSavedOptions, SfxStringItem, SID_FILE_FILTEROPTIONS, sal_False);
SFX_ITEMSET_ARG( pMedium->GetItemSet(), pSavedReferer, SfxStringItem, SID_REFERER, sal_False);
@@ -857,14 +856,14 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_CLOSEDOC, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEDOC ), xOldObj ) );
}
- // als erledigt recorden
+ // Record as done
rReq.Done( sal_True );
rReq.SetReturnValue(SfxBoolItem(rReq.GetSlot(), sal_True));
return;
}
else
{
- // als nicht erledigt recorden
+ // Record as not done
rReq.Done();
rReq.SetReturnValue(SfxBoolItem(rReq.GetSlot(), sal_False));
pImp->bReloading = sal_False;
@@ -879,7 +878,7 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet )
{
SfxObjectShell* pSh = GetObjectShell();
if ( !pSh )
- // Ich bin gerade am Reloaden und Yielde so vor mich hin ...
+ // I'm just on reload and am yielding myself ...
return;
GetFrame().GetParentFrame();
@@ -888,8 +887,8 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet )
{
if ( GetFrame().HasComponent() )
{
- // Wenn die Komponente es nicht selbst dispatched, dann
- // macht es auch keinen Sinn!
+ // If the component is not self-dispatched, then
+ // it makes no sense!
rSet.DisableItem( nWhich );
continue;
}
@@ -920,8 +919,8 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet )
rSet.DisableItem(nWhich);
else
{
- // Wenn irgendein ChildFrame reloadable ist, wird der Slot
- // enabled, damit man CTRL-Reload machen kann
+ // If any ChildFrame is reloadable, the slot is enabled,
+ // so you can perfom CTRL-Reload
sal_Bool bReloadAvailable = sal_False;
SfxFrameIterator aFrameIter( *pFrame, sal_True );
for( SfxFrame* pNextFrame = aFrameIter.FirstFrame();
@@ -951,7 +950,7 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet )
//--------------------------------------------------------------------
void SfxViewFrame::ExecHistory_Impl( SfxRequest &rReq )
{
- // gibt es an der obersten Shell einen Undo-Manager?
+ // Is there an Undo-Manager on the top Shell?
SfxShell *pSh = GetDispatcher()->GetShell(0);
::svl::IUndoManager* pShUndoMgr = pSh->GetUndoManager();
sal_Bool bOK = sal_False;
@@ -985,7 +984,7 @@ void SfxViewFrame::ExecHistory_Impl( SfxRequest &rReq )
}
else if ( GetViewShell() )
{
- // der SW hat eigenes Undo an der View
+ // The SW has its own undo in the View
const SfxPoolItem *pRet = GetViewShell()->ExecuteSlot( rReq );
if ( pRet )
bOK = ((SfxBoolItem*)pRet)->GetValue();
@@ -998,16 +997,16 @@ void SfxViewFrame::ExecHistory_Impl( SfxRequest &rReq )
//--------------------------------------------------------------------
void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet )
{
- // Undo-Manager suchen
+ // Search for Undo-Manager
SfxShell *pSh = GetDispatcher()->GetShell(0);
if ( !pSh )
- // Ich bin gerade am Reloaden und Yielde so vor mich hin ...
+ // I'm just on reload and am yielding myself ...
return;
::svl::IUndoManager *pShUndoMgr = pSh->GetUndoManager();
if ( !pShUndoMgr )
{
- // der SW hat eigenes Undo an der View
+ // The SW has its own undo in the View
SfxWhichIter aIter( rSet );
SfxViewShell *pViewSh = GetViewShell();
if( !pViewSh ) return;
@@ -1076,20 +1075,19 @@ void SfxViewFrame::PopShellAndSubShells_Impl( SfxViewShell& i_rViewShell )
//--------------------------------------------------------------------
void SfxViewFrame::ReleaseObjectShell_Impl()
-/* [Beschreibung]
+/* [Description]
- Diese Methode entleert den SfxViewFrame, d.h. nimmt die <SfxObjectShell>
- vom Dispatcher und beendet seine <SfxListener>-Beziehung zu dieser
- SfxObjectShell (wodurch sie sich ggf. selbst zerst"ort).
+ This method empties the SfxViewFrame, i.e. takes the <SfxObjectShell>
+ from the dispatcher and ends its <SfxListener> Relationship to this
+ SfxObjectShell (by which they may even destroy themselves).
- Somit kann durch Aufruf von ReleaseObjectShell() und SetObjectShell()
- die SfxObjectShell ausgetauscht werden.
+ Thus, by invoking ReleaseObjectShell() and SetObjectShell() the
+ SfxObjectShell can be replaced.
- Zwischen RealeaseObjectShell() und SetObjectShell() darf die Kontrolle
- nicht an das System abgegeben werden.
+ Between RealeaseObjectShell() and SetObjectShell() can the control not
+ be handed over to the system.
-
- [Querverweise]
+ [Cross-reference]
<SfxViewFrame::SetObjectShell(SfxObjectShell&)>
*/
@@ -1114,7 +1112,7 @@ void SfxViewFrame::ReleaseObjectShell_Impl()
}
#ifdef DBG_UTIL
else
- OSL_FAIL("Keine Shell");
+ OSL_FAIL("No Shell");
#endif
if ( xObjSh.Is() )
@@ -1153,8 +1151,8 @@ sal_Bool SfxViewFrame::Close()
DBG_ASSERT( GetFrame().IsClosing_Impl() || !GetFrame().GetFrameInterface().is(), "ViewFrame closed too early!" );
- // Wenn bis jetzt noch nicht gespeichert wurde, sollen eingebettete Objekte
- // auch nicht mehr automatisch gespeichert werden!
+ // If no saving have been made up until now, then embedded Objects should
+ // not be saved automatically anymore.
if ( GetViewShell() )
GetViewShell()->DiscardClients_Impl();
Broadcast( SfxSimpleHint( SFX_HINT_DYING ) );
@@ -1162,8 +1160,8 @@ sal_Bool SfxViewFrame::Close()
if (SfxViewFrame::Current() == this)
SfxViewFrame::SetViewFrame( NULL );
- // Da der Dispatcher leer ger"aumt wird, kann man ihn auch nicht mehr
- // vern"unftig verwenden - also besser still legen
+ // Since the Dispatcher is emptied, it can not be used in any reasnable
+ // manner, thus it is better to let the dispatcher be.
GetDispatcher()->Lock(sal_True);
delete this;
@@ -1179,8 +1177,8 @@ void SfxViewFrame::DoActivate( sal_Bool bUI, SfxViewFrame* pOldFrame )
pDispatcher->DoActivate_Impl( bUI, pOldFrame );
- // Wenn ich einen parent habe und dieser ist kein parent des alten
- // ViewFrames, erh"alt er ein ParentActivate
+ // If this ViewFrame has got a parent and this is not a parent of the
+ // old ViewFrames, it gets a ParentActivate.
if ( bUI )
{
SfxViewFrame *pFrame = GetParentViewFrame();
@@ -1200,8 +1198,8 @@ void SfxViewFrame::DoDeactivate(sal_Bool bUI, SfxViewFrame* pNewFrame )
SFX_APP();
pDispatcher->DoDeactivate_Impl( bUI, pNewFrame );
- // Wenn ich einen parent habe und dieser ist kein parent des neuen
- // ViewFrames, erh"alt er ein ParentDeactivate
+ // If this ViewFrame has got a parent and this is not a parent of the
+ // new ViewFrames, it gets a ParentDeactivate.
if ( bUI )
{
SfxViewFrame *pFrame = GetParentViewFrame();
@@ -1305,7 +1303,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
if ( !xObjSh.Is() )
break;
- // r/o Umschaltung?
+ // Switch r/o?
SfxBindings& rBind = GetBindings();
rBind.Invalidate( SID_RELOAD );
SfxDispatcher *pDispat = GetDispatcher();
@@ -1313,7 +1311,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
sal_Bool bIsReadOnly = xObjSh->IsReadOnly();
if ( !bWasReadOnly != !bIsReadOnly )
{
- // Dann auch TITLE_CHANGED
+ // Then also TITLE_CHANGED
UpdateTitle();
rBind.Invalidate( SID_FILE_NAME );
rBind.Invalidate( SID_DOCINFO_TITLE );
@@ -1322,11 +1320,12 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
pDispat->GetBindings()->InvalidateAll(sal_True);
pDispat->SetReadOnly_Impl( bIsReadOnly );
- // Dispatcher-Update nur erzwingen, wenn es nicht sowieso
- // demn"achst kommt, anderenfalls ist Zappelei oder gar
- // GPF m"oglich, da Writer z.B. gerne mal im Resize irgendwelche
- // Aktionen t"atigt, die ein SetReadOnlyUI am Dispatcher zur
- // Folge haben!
+ // Only force and Dispatcher-Update, if it is done next
+ // anyway, otherwise flickering or GPF is possibel since
+ // the Writer for example prefers in Resize preform some
+ // actions which has a SetReadOnlyUI in Dispatcher as a
+ // result!
+
if ( pDispat->IsUpdated_Impl() )
pDispat->Update_Impl(sal_True);
}
@@ -1361,9 +1360,9 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
}
else if ( rHint.IsA(TYPE(SfxEventHint)) )
{
- // Wenn das Document asynchron geladen wurde, wurde der Dispatcher
- // auf ReadOnly gesetzt, was zur"?ckgenommen werden mu\s, wenn
- // das Document selbst nicht ReadOnly ist und das Laden fertig ist.
+ // When the Document is loaded asynchronously, was the Dispatcher
+ // set as ReadOnly, to what must be returned when the document itself
+ // is not read only, and the loading is finished.
switch ( ((SfxEventHint&)rHint).GetEventId() )
{
case SFX_EVENT_MODIFYCHANGED:
@@ -1387,8 +1386,8 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
rBind.Invalidate( SID_EDITDOC );
if ( !xObjSh->IsReadOnly() )
{
- // Im Gegensatz zu oben (TITLE_CHANGED) mu\s das UI nicht
- // upgedated werden, da es nicht gehidet war!
+ // In contrast to above (TITLE_CHANGED) does the UI not
+ // have to be updated because it was not obstructed
// #i21560# InvalidateAll() causes the assertion
// 'SfxBindings::Invalidate while in update" when
@@ -1461,7 +1460,7 @@ void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh )
pDispatcher->Flush();
}
- SfxViewFrame *pThis = this; // wegen der kranken Array-Syntax
+ SfxViewFrame *pThis = this; // this due to the sick Array syntax
SfxViewFrameArr_Impl &rViewArr = SFX_APP()->GetViewFrames_Impl();
rViewArr.C40_INSERT(SfxViewFrame, pThis, rViewArr.Count() );
}
@@ -1472,11 +1471,11 @@ SfxViewFrame::SfxViewFrame
SfxObjectShell* pObjShell
)
-/* [Beschreibung]
+/* [Description]
- Ctor des SfxViewFrame f"ur eine <SfxObjectShell> aus der Ressource.
- Die 'nViewId' der zu erzeugenden <SfxViewShell> kann angegeben werden
- (default ist die zuerst registrierte SfxViewShell-Subklasse).
+ Constructor of SfxViewFrame for a <SfxObjectShell> from the Resource.
+ The 'nViewId' to the created <SfxViewShell> can be returned.
+ (default is the SfxViewShell-Subclass that was registered first).
*/
: pImp( new SfxViewFrame_Impl( rFrame ) )
@@ -1509,7 +1508,7 @@ SfxViewFrame::~SfxViewFrame()
ReleaseObjectShell_Impl();
if ( GetFrame().OwnsBindings_Impl() )
- // Die Bindings l"oscht der Frame!
+ // The Bindings delete the Frame!
KillDispatcher_Impl();
delete pImp->pWindow;
@@ -1517,13 +1516,13 @@ SfxViewFrame::~SfxViewFrame()
if ( GetFrame().GetCurrentViewFrame() == this )
GetFrame().SetCurrentViewFrame_Impl( NULL );
- // von Frame-Liste abmelden
+ // Unregister from the Frame List.
SfxApplication *pSfxApp = SFX_APP();
SfxViewFrameArr_Impl &rFrames = pSfxApp->GetViewFrames_Impl();
const SfxViewFrame *pThis = this;
rFrames.Remove( rFrames.GetPos(pThis) );
- // Member l"oschen
+ // Delete Member
KillDispatcher_Impl();
delete pImp;
@@ -1532,7 +1531,7 @@ SfxViewFrame::~SfxViewFrame()
//------------------------------------------------------------------------
void SfxViewFrame::KillDispatcher_Impl()
-// Dispatcher abr"aumen und l"oschen
+// Remove and delete the Dispatcher.
{
DBG_CHKTHIS(SfxViewFrame, 0);
@@ -1559,9 +1558,9 @@ SfxViewFrame* SfxViewFrame::Current()
//--------------------------------------------------------------------
sal_uInt16 SfxViewFrame::Count()
-/* [Beschreibung]
+/* [Description]
- Liefert die Anzahl der sichtbaren <SfxViewFrame>-Instanzen.
+ Returns the number of visable <SfxViewFrame> instances.
*/
{
@@ -1672,7 +1671,7 @@ SfxIniManager* SfxViewFrame::GetIniManager() const
#endif
//--------------------------------------------------------------------
-void SfxViewFrame::DoAdjustPosSizePixel //! teilen in Inner.../Outer...
+void SfxViewFrame::DoAdjustPosSizePixel //! divide on Inner.../Outer...
(
SfxViewShell* pSh,
const Point& rPos,
@@ -1681,7 +1680,7 @@ void SfxViewFrame::DoAdjustPosSizePixel //! teilen in Inner.../Outer...
{
DBG_CHKTHIS(SfxViewFrame, 0);
- // Components benutzen diese Methode nicht!
+ // Components do not use this Method!
if( pSh && pSh->GetWindow() && !nAdjustPosPixelLock )
{
nAdjustPosPixelLock++;
@@ -1715,10 +1714,10 @@ SfxPoolItem* SfxViewFrameItem::Clone( SfxItemPool *) const
//--------------------------------------------------------------------
void SfxViewFrame::SetViewShell_Impl( SfxViewShell *pVSh )
-/* [Beschreibung]
+/* [Description]
- Interne Methode zum setzen der jeweils aktuellen <SfxViewShell>-Instanz,
- die in diesem SfxViewFrame aktiv ist.
+ Internal Method to set the current <SfxViewShell> Instance,
+ that is active int this SfxViewFrame at the moment.
*/
{
@@ -1730,9 +1729,9 @@ void SfxViewFrame::SetViewShell_Impl( SfxViewShell *pVSh )
}
//--------------------------------------------------------------------
-/*
- Beschreibung:
- Der ParentViewFrame ist der ViewFrame des Containers bei internem InPlace
+/* [Description]
+
+ The ParentViewFrame of the Containers ViewFrame in the internal InPlace
*/
//TODO/LATER: is it still necessary? is there a replacement for GetParentViewFrame_Impl?
@@ -1775,7 +1774,7 @@ void SfxViewFrame::DoAdjustPosSize( SfxViewShell *pSh,
//--------------------------------------------------------------------
void SfxViewFrame::GetDocNumber_Impl()
{
- DBG_ASSERT( GetObjectShell(), "Kein Dokument!" );
+ DBG_ASSERT( GetObjectShell(), "No Document!" );
GetObjectShell()->SetNamedVisibility_Impl();
pImp->nDocViewNo = GetObjectShell()->GetNoSet_Impl().GetFreeIndex()+1;
}
@@ -1823,22 +1822,23 @@ void SfxViewFrame::Enable( sal_Bool bEnable )
//--------------------------------------------------------------------
void SfxViewFrame::Show()
-/* [Beschreibung]
+/* [Description]
- Diese Methode macht das Frame-Window sichtbar und ermittelt vorher
- den Fenstername. Au\serdem wird das Dokument festgehalten. Man darf
- i.d.R. nie das Window direkt showen!
+ This method makes the Frame-Window visible and before transmitts the
+ window name. In addition, the document is held. In general one can never
+ show the window directly!
*/
{
- // zuerst locken damit in UpdateTitle() gilt: IsVisible() == sal_True (:#)
+ // First lock the objectShell so that UpdateTitle() is valid:
+ // IsVisible() == sal_True (:#)
if ( xObjSh.Is() )
{
xObjSh->GetMedium()->GetItemSet()->ClearItem( SID_HIDDEN );
if ( !pImp->bObjLocked )
LockObjectShell_Impl( sal_True );
- // Doc-Shell Titel-Nummer anpassen, get unique view-no
+ // Adjust Doc-Shell titel nummer, get unique view-no
if ( 0 == pImp->nDocViewNo )
{
GetDocNumber_Impl();
@@ -1848,8 +1848,8 @@ void SfxViewFrame::Show()
else
UpdateTitle();
- // Frame-Window anzeigen, aber nur wenn der ViewFrame kein eigenes Window
- // hat oder wenn er keine Component enth"alt
+ // Display Frame-window, but only if the ViewFrame has no window of its
+ // own or if it does not contain a Component
if ( &GetWindow() == &GetFrame().GetWindow() || !GetFrame().HasComponent() )
GetWindow().Show();
GetFrame().GetWindow().Show();
@@ -1878,9 +1878,9 @@ void SfxViewFrame::Hide()
//--------------------------------------------------------------------
void SfxViewFrame::LockObjectShell_Impl( sal_Bool bLock )
{
- DBG_ASSERT( pImp->bObjLocked != bLock, "Falscher Locked-Status!" );
+ DBG_ASSERT( pImp->bObjLocked != bLock, "Wrong Locked status!" );
- DBG_ASSERT( GetObjectShell(), "Kein Dokument!" );
+ DBG_ASSERT( GetObjectShell(), "No Document!" );
GetObjectShell()->OwnerLock(bLock);
pImp->bObjLocked = bLock;
}
@@ -1970,7 +1970,7 @@ void SfxViewFrame::SetActiveChildFrame_Impl( SfxViewFrame *pViewFrame )
if ( pViewFrame )
xActive = pViewFrame->GetFrame().GetFrameInterface();
- if ( xFrame.is() ) // PB: #74432# xFrame cann be NULL
+ if ( xFrame.is() ) // PB: #74432# xFrame can be NULL
xFrame->setActiveFrame( xActive );
}
}
@@ -2177,7 +2177,7 @@ void SfxViewFrame::SaveCurrentViewData_Impl( const sal_uInt16 i_nNewViewId )
{
// can't say anything about the view, the respective application did not yet migrate its code to
// named view factories => bail out
- OSL_ENSURE( false, "SfxViewFrame::SaveCurrentViewData_Impl: views without API names? Shouldn't happen anymore?" );
+ OSL_FAIL( "SfxViewFrame::SaveCurrentViewData_Impl: views without API names? Shouldn't happen anymore?" );
return;
}
OSL_ENSURE( !sNewViewName.Equals( sCurrentViewName ), "SfxViewFrame::SaveCurrentViewData_Impl: suspicious: new and old view name are identical!" );
@@ -2231,38 +2231,35 @@ void SfxViewFrame::SaveCurrentViewData_Impl( const sal_uInt16 i_nNewViewId )
sal_Bool SfxViewFrame::SwitchToViewShell_Impl
(
sal_uInt16 nViewIdOrNo, /* > 0
- Registrierungs-Id der View, auf die umge-
- schaltet werden soll, bzw. die erstmalig
- erzeugt werden soll.
+ Registration-Id of the View, to which the
+ the method should switch, for example the one
+ that will be created.
== 0
- Es soll die Default-View verwendet werden. */
+ First use the Default view. */
sal_Bool bIsIndex /* sal_True
- 'nViewIdOrNo' ist keine Registrations-Id sondern
- ein Index in die f"ur die in diesem
- <SfxViewFrame> dargestellte <SfxObjectShell>.
+ 'nViewIdOrNo' is no Registration-Id instead
+ an Index of <SfxViewFrame> in <SfxObjectShell>.
*/
)
-/* [Beschreibung]
+/* [Description]
- Interne Methode zum Umschalten auf eine andere <SfxViewShell>-Subklasse,
- die in diesem SfxMDIFrame erzeugt werden soll. Existiert noch
- keine SfxViewShell in diesem SfxMDIFrame, so wird erstmalig eine
- erzeugt.
+ Internal Method for switching to another <SfxViewShell> subclass,
+ which should be created in this SfxMDIFrame. If no SfxViewShell exist
+ in this SfxMDIFrame, then one will first be created.
- [R"uckgabewert]
+ [Return Value]
sal_Bool sal_True
- die angeforderte SfxViewShell wurde erzeugt
- und eine ggf. bestehende gel"oscht
+ requested SfxViewShell was created and a
+ possibly existing one deleted
sal_False
- die angeforderte SfxViewShell konnte nicht
- erzeugt werden, die bestehende SfxViewShell
- existiert daher weiterhin
+ SfxViewShell requested could not be created,
+ the existing SfxViewShell thus continue to exist
*/
{
@@ -2338,19 +2335,19 @@ sal_uInt16 SfxViewFrame::GetCurViewId() const
//-------------------------------------------------------------------------
void SfxViewFrame::ExecView_Impl
(
- SfxRequest& rReq // der auszuf"uhrende <SfxRequest>
+ SfxRequest& rReq // The executable <SfxRequest>
)
-/* [Beschreibung]
+/* [Description]
- Interne Methode zum Ausf"uhren der f"ur die <SfxShell> Subklasse
- SfxViewFrame in der <SVIDL> beschriebenen Slots.
+ Internal method to run the slot for the <SfxShell> Subclass in the
+ SfxViewFrame <SVIDL> described slots.
*/
{
DBG_CHKTHIS(SfxViewFrame, 0);
- // Wenn gerade die Shells ausgetauscht werden...
+ // If the Shells are just being replaced...
if ( !GetObjectShell() || !GetViewShell() )
return;
@@ -2392,14 +2389,14 @@ void SfxViewFrame::ExecView_Impl
case SID_NEWWINDOW:
{
- // Hack. demnaechst virtuelle Funktion
+ // Hack. at the moment a virtual Function
if ( !GetViewShell()->NewWindowAllowed() )
{
- OSL_ENSURE( false, "You should have disabled the 'Window/New Window' slot!" );
+ OSL_FAIL( "You should have disabled the 'Window/New Window' slot!" );
return;
}
- // ViewData bei FrameSets rekursiv holen
+ // Get ViewData of FrameSets recursivly.
GetFrame().GetViewData_Impl();
SfxMedium* pMed = GetObjectShell()->GetMedium();
@@ -2490,8 +2487,9 @@ sal_Bool impl_maxOpenDocCountReached()
++nOpenDocs;
}
catch(const css::uno::Exception&)
- // A IndexOutOfBoundException can happen in multithreaded environments,
- // where any other thread can change this container !
+ // A IndexOutOfBoundException can happen in multithreaded
+ // environments, where any other thread can change this
+ // container !
{ continue; }
}
@@ -2509,22 +2507,20 @@ sal_Bool impl_maxOpenDocCountReached()
//-------------------------------------------------------------------------
void SfxViewFrame::StateView_Impl
(
- SfxItemSet& rSet /* leeres <SfxItemSet> mit <Which-Ranges>,
- welche die Ids der zu erfragenden
- Slots beschreiben. */
+ SfxItemSet& rSet /* empty <SfxItemSet> with <Which-Ranges>,
+ which describes the Slot Ids */
)
-/* [Beschreibung]
+/* [Description]
- Diese interne Methode liefert in 'rSet' die Status der f"ur die
- <SfxShell> Subklasse SfxViewFrame in der <SVIDL> beschriebenen <Slots>.
+ This internal methode returns in 'rSet' the Status for the <SfxShell>
+ Subclass SfxViewFrame in the <SVIDL> described <Slots>.
- In 'rSet' sind dabei genau die vom SFx als ung"ultig erkannten
- Slot-Ids als Which-ranges enthalten. Falls der an dieser Shell gesetzte
- <SfxItemPool> f"ur einzelne Slot-Ids ein Mapping hat, werden die
- entsprechenden Which-Ids verwendet, so da\s Items ggf. direkt mit
- einer mit Which-Ids arbeitenden Core-::com::sun::star::script::Engine ausgetauscht werden
- k"onnen.
+ Thus exactly those Slots-IDs that are recognized as beeing invalid by Sfx
+ are included as Which-ranges in 'rSet'. If there exists a mapping for
+ single slot-IDs of the <SfxItemPool> set in the shell, then the respective
+ Which-IDs are used so that items can be replaced directly with a working
+ Core::sun::com::star::script::Engine of the Which-IDs if possible. .
*/
{
@@ -2533,11 +2529,11 @@ void SfxViewFrame::StateView_Impl
SfxObjectShell *pDocSh = GetObjectShell();
if ( !pDocSh )
- // Ich bin gerade am Reloaden und Yielde so vor mich hin ...
+ // I'm just on reload and am yielding myself ...
return;
const sal_uInt16 *pRanges = rSet.GetRanges();
- DBG_ASSERT(pRanges, "Set ohne Bereich");
+ DBG_ASSERT(pRanges, "Set with no Range");
while ( *pRanges )
{
for ( sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich )
@@ -2600,9 +2596,9 @@ void SfxViewFrame::ToTop()
//-------------------------------------------------------------------------
SfxViewFrame* SfxViewFrame::GetParentViewFrame() const
-/*
- Beschreibung:
- Der ParentViewFrame ist der ViewFrame des ParentFrames
+/* [Description]
+
+ The ParentViewFrame is the ViewFrame of the ParentFrames.
*/
{
SfxFrame *pFrame = GetFrame().GetParentFrame();
@@ -2611,9 +2607,9 @@ SfxViewFrame* SfxViewFrame::GetParentViewFrame() const
//-------------------------------------------------------------------------
SfxFrame& SfxViewFrame::GetFrame() const
-/*
- Beschreibung:
- GetFrame liefert den Frame, in dem sich der ViewFrame befindet
+/* [Description]
+
+ GetFrame returns the Frame, in which the ViewFrame is located.
*/
{
return pImp->rFrame;
@@ -2692,11 +2688,11 @@ void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, sa
nStartPos = rStr.indexOf( LINE_SEP, nStartPos );
if( nStartPos == -1 )
break;
- nStartPos++; // nicht das \n.
+ nStartPos++; // not the \n.
nLine++;
}
- DBG_ASSERTWARNING( nStartPos != STRING_NOTFOUND, "CutLines: Startzeile nicht gefunden!" );
+ DBG_ASSERTWARNING( nStartPos != STRING_NOTFOUND, "CutLines: Start row not found!" );
if ( nStartPos != -1 )
{
@@ -2704,7 +2700,7 @@ void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, sa
for ( sal_Int32 i = 0; i < nLines; i++ )
nEndPos = rStr.indexOf( LINE_SEP, nEndPos+1 );
- if ( nEndPos == -1 ) // kann bei letzter Zeile passieren
+ if ( nEndPos == -1 ) // Can happen at the last row.
nEndPos = rStr.getLength();
else
nEndPos++;
@@ -2730,9 +2726,9 @@ void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, sa
}
/*
- add new recorded dispatch macro script into the application global basic lib container
- It generates a new unique id for it and insert the macro by using this number as name for
- the modul
+ add new recorded dispatch macro script into the application global basic
+ lib container. It generates a new unique id for it and insert the macro
+ by using this number as name for the modul
*/
void SfxViewFrame::AddDispatchMacroToBasic_Impl( const ::rtl::OUString& sMacro )
{
@@ -3014,7 +3010,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
if ( xLayoutManager.is() )
{
rtl::OUString aStatusbarResString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/statusbar/statusbar" ));
- // Parameter auswerten
+ // Evaluate parameter.
SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, rReq.GetSlot(), sal_False);
sal_Bool bShow( sal_True );
if ( !pShowItem )
@@ -3106,7 +3102,7 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet)
DBG_MEMTEST();
const sal_uInt16 *pRanges = rSet.GetRanges();
- DBG_ASSERT(pRanges && *pRanges, "Set ohne Bereich");
+ DBG_ASSERT(pRanges && *pRanges, "Set without range");
while ( *pRanges )
{
for(sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
@@ -3115,7 +3111,7 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet)
{
case SID_CURRENT_URL:
{
- // Bei internem InPlace den ContainerFrame nehmen
+ // Get the ContainerFrame, when internal InPlace.
SfxViewFrame *pFrame = this;
if ( pFrame->GetParentViewFrame_Impl() )
pFrame = pFrame->GetParentViewFrame_Impl();
@@ -3216,7 +3212,6 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet)
}
default:
- //! DBG_ASSERT(FALSE, "Falscher Server fuer GetState");
break;
}
}
@@ -3227,17 +3222,16 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet)
void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
-/* [Beschreibung]
+/* [Description]
- Diese Methode kann in der Execute-Methode f"ur das ein- und ausschalten
- von Child-Windows eingesetzt werden, um dieses inkl. API-Anbindung zu
- implementieren.
+ This method can be included in the Execute method for the on- and off-
+ switching of ChildWindows, to implement this and API-bindings.
- Einfach in der IDL als 'ExecuteMethod' eintragen.
+ Simply include as 'ExecuteMethod' in the IDL.
*/
{
- // Parameter auswerten
+ // Evaluate Parameter
sal_uInt16 nSID = rReq.GetSlot();
SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nSID, sal_False);
@@ -3291,14 +3285,14 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
sal_Bool bHasChild = HasChildWindow(nSID);
bShow = pShowItem ? pShowItem->GetValue() : !bHasChild;
- // ausf"uhren
+ // Perform action.
if ( !pShowItem || bShow != bHasChild )
ToggleChildWindow( nSID );
GetBindings().Invalidate( nSID );
GetDispatcher()->Update_Impl( sal_True );
- // ggf. recorden
+ // Record if possible.
if ( nSID == SID_HYPERLINK_DIALOG || nSID == SID_SEARCH_DLG )
{
rReq.Ignore();
@@ -3314,12 +3308,12 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
void SfxViewFrame::ChildWindowState( SfxItemSet& rState )
-/* [Beschreibung]
+/* [Description]
- Diese Methode kann in der Status-Methode f"ur das Ein- und Ausschalt-
- Zustand von Child-Windows eingesetzt werden, um dieses zu implementieren.
+ This method can be used in the state method for the on and off-state
+ of child-windows, in order to implement this.
- Einfach in der IDL als 'StateMethod' eintragen.
+ Just register the IDL as 'StateMethod'.
*/
{
@@ -3357,7 +3351,7 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState )
{
if ( !KnowsChildWindow( nSID ) )
{
- OSL_ENSURE( false, "SID_TASKPANE state requested, but no task pane child window exists for this ID!" );
+ OSL_FAIL( "SID_TASKPANE state requested, but no task pane child window exists for this ID!" );
rState.DisableItem( nSID );
}
else if ( !moduleHasToolPanels( *pImp ) )
diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx
index 78f26f34cb28..b43051b22d45 100755
--- a/sfx2/source/view/viewfrm2.cxx
+++ b/sfx2/source/view/viewfrm2.cxx
@@ -146,21 +146,20 @@ static String _getTabString()
//--------------------------------------------------------------------
String SfxViewFrame::UpdateTitle()
-/* [Beschreibung]
+/* [Description]
- Mit dieser Methode kann der SfxViewFrame gezwungen werden, sich sofort
- den neuen Titel vom der <SfxObjectShell> zu besorgen.
+ With this method, can the SfxViewFrame be forced to immediately provide
+ the new title from the <SfxObjectShell>.
- [Anmerkung]
+ [Note]
- Dies ist z.B. dann notwendig, wenn man der SfxObjectShell als SfxListener
- zuh"ort und dort auf den <SfxSimpleHint> SFX_HINT_TITLECHANGED reagieren
- m"ochte, um dann die Titel seiner Views abzufragen. Diese Views (SfxTopViewFrames)
- jedoch sind ebenfalls SfxListener und da die Reihenfolge der Benachrichtigung
- nicht feststeht, mu\s deren Titel-Update vorab erzwungen werden.
+ This is for example necessary if one listens to the SfxObjectShell as
+ SfxListener and then react on the <SfxSimpleHint> SFX_HINT_TITLECHANGED,
+ then query the title of his views. However these views (SfxTopViewFrames)
+ are also SfxListener and because the order of notifications might not be
+ fixed, the title update will be enforced in advance.
-
- [Beispiel]
+ [Example]
void SwDocShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
@@ -194,7 +193,7 @@ String SfxViewFrame::UpdateTitle()
return String();
// if ( pObjSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
-// // kein UpdateTitle mit Embedded-ObjectShell
+// // No UpdateTitle with Embedded-ObjectShell
// return String();
const SfxMedium *pMedium = pObjSh->GetMedium();
@@ -207,10 +206,10 @@ String SfxViewFrame::UpdateTitle()
}
if ( aURL != pImp->aActualURL )
- // URL hat sich ge"andert
+ // URL has changed
pImp->aActualURL = aURL;
- // gibt es noch eine weitere View?
+ // Is there another view?
sal_uInt16 nViews=0;
for ( SfxViewFrame *pView= GetFirst(pObjSh);
pView && nViews<2;
@@ -219,15 +218,15 @@ String SfxViewFrame::UpdateTitle()
!IsDowning_Impl())
nViews++;
- // Titel des Fensters
+ // Window Title
String aTitle;
if ( nViews == 2 || pImp->nDocViewNo > 1 )
- // dann die Nummer dranh"angen
+ // Then attach the number
aTitle = pObjSh->UpdateTitle( NULL, pImp->nDocViewNo );
else
aTitle = pObjSh->UpdateTitle();
- // Name des SbxObjects
+ // SbxObjects name
String aSbxName = pObjSh->SfxShell::GetName();
if ( IsVisible() )
{
@@ -271,7 +270,7 @@ String SfxViewFrame::UpdateTitle()
void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
{
- // Wenn gerade die Shells ausgetauscht werden...
+ // If presently the shells are replaced...
if ( !GetObjectShell() || !GetViewShell() )
return;
@@ -284,20 +283,19 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
SFX_REQUEST_ARG(rReq, pIdItem, SfxUInt16Item, SID_CONFIGITEMID, sal_False);
sal_uInt16 nId = pIdItem ? pIdItem->GetValue() : 0;
- // ausfuehren
SfxWorkWindow *pWorkWin = GetFrame().GetWorkWindow_Impl();
if ( bShow )
{
- // Zuerst die Floats auch anzeigbar machen
+ // First, make the floats viewable
pWorkWin->MakeChildsVisible_Impl( bShow );
GetDispatcher()->Update_Impl( sal_True );
- // Dann anzeigen
+ // Then view it
GetBindings().HidePopups( !bShow );
}
else
{
- // Alles hiden
+ // Hide all
SfxBindings *pBind = &GetBindings();
while ( pBind )
{
@@ -357,7 +355,7 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
if ( GetViewShell()->PrepareClose() )
{
- // weitere Views auf dasselbe Doc?
+ // More Views on the same Document?
SfxObjectShell *pDocSh = GetObjectShell();
int bOther = sal_False;
for ( const SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pDocSh );
@@ -365,14 +363,14 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
pFrame = SfxViewFrame::GetNext( *pFrame, pDocSh ) )
bOther = (pFrame != this);
- // Doc braucht nur gefragt zu werden, wenn keine weitere View
+ // Document only needs to be queried, if no other View present.
sal_Bool bClosed = sal_False;
sal_Bool bUI = sal_True;
if ( ( bOther || pDocSh->PrepareClose( bUI ) ) )
{
if ( !bOther )
pDocSh->SetModified( sal_False );
- rReq.Done(); // unbedingt vor Close() rufen!
+ rReq.Done(); // Must call this before Close()!
bClosed = sal_False;
try
{
@@ -402,7 +400,7 @@ void SfxViewFrame::GetState_Impl( SfxItemSet &rSet )
return;
const sal_uInt16 *pRanges = rSet.GetRanges();
- DBG_ASSERT(pRanges, "Set ohne Bereich");
+ DBG_ASSERT(pRanges, "Set without Range");
while ( *pRanges )
{
for ( sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich )
@@ -462,7 +460,7 @@ void SfxViewFrame::INetExecute_Impl( SfxRequest &rRequest )
{
case SID_BROWSE_FORWARD:
case SID_BROWSE_BACKWARD:
- OSL_ENSURE( false, "SfxViewFrame::INetExecute_Impl: SID_BROWSE_FORWARD/BACKWARD are dead!" );
+ OSL_FAIL( "SfxViewFrame::INetExecute_Impl: SID_BROWSE_FORWARD/BACKWARD are dead!" );
break;
case SID_CREATELINK:
{
@@ -494,7 +492,7 @@ void SfxViewFrame::INetState_Impl( SfxItemSet &rItemSet )
rItemSet.DisableItem( SID_BROWSE_FORWARD );
rItemSet.DisableItem( SID_BROWSE_BACKWARD );
- // Add/SaveToBookmark bei BASIC-IDE, QUERY-EDITOR etc. disablen
+ // Add/SaveToBookmark at BASIC-IDE, QUERY-EDITOR etc. disable
SfxObjectShell *pDocSh = GetObjectShell();
sal_Bool bPseudo = pDocSh && !( pDocSh->GetFactory().GetFlags() & SFXOBJECTSHELL_HASOPENDOC );
sal_Bool bEmbedded = pDocSh && pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED;
@@ -509,18 +507,18 @@ void SfxViewFrame::SetZoomFactor( const Fraction &rZoomX, const Fraction &rZoomY
void SfxViewFrame::Activate( sal_Bool bMDI )
{
- DBG_ASSERT(GetViewShell(), "Keine Shell");
+ DBG_ASSERT(GetViewShell(), "No Shell");
if ( bMDI )
pImp->bActive = sal_True;
-//(mba): hier evtl. wie in Beanframe NotifyEvent ?!
+//(mba): here maybe as in Beanframe NotifyEvent ?!
}
void SfxViewFrame::Deactivate( sal_Bool bMDI )
{
- DBG_ASSERT(GetViewShell(), "Keine Shell");
+ DBG_ASSERT(GetViewShell(), "No Shell");
if ( bMDI )
pImp->bActive = sal_False;
-//(mba): hier evtl. wie in Beanframe NotifyEvent ?!
+//(mba): here maybe as in Beanframe NotifyEvent ?!
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 1fb0e3f8e171..4c02651073c2 100755
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -356,13 +356,12 @@ void SfxPrinterController::jobFinished( com::sun::star::view::PrintableState nSt
class SfxDialogExecutor_Impl
-/* [Beschreibung]
+/* [Description]
- Eine Instanz dieser Klasse wird f"ur die Laufzeit des Printer-Dialogs
- erzeugt, um im dessen Click-Handler f"ur die Zus"atze den per
- virtueller Methode von der abgeleiteten SfxViewShell erzeugten
- Print-Options-Dialog zu erzeugen und die dort eingestellten Optionen
- als SfxItemSet zu zwischenzuspeichern.
+ An instance of this class is created for the life span of the
+ printer dialogue, to create in its click handler for the additions by the
+ virtual method of the derived SfxViewShell generated print options dialogue
+ and to cache the options set there as SfxItemSet.
*/
{
@@ -401,7 +400,7 @@ SfxDialogExecutor_Impl::SfxDialogExecutor_Impl( SfxViewShell* pViewSh, PrinterSe
IMPL_LINK( SfxDialogExecutor_Impl, Execute, void *, EMPTYARG )
{
- // Options lokal merken
+ // Options noted locally
if ( !_pOptions )
{
DBG_ASSERT( _pSetupParent, "no dialog parent" );
@@ -409,7 +408,7 @@ IMPL_LINK( SfxDialogExecutor_Impl, Execute, void *, EMPTYARG )
_pOptions = ( (SfxPrinter*)_pSetupParent->GetPrinter() )->GetOptions().Clone();
}
- // Dialog ausf"uhren
+ // Create Dialog
SfxPrintOptionsDialog* pDlg = new SfxPrintOptionsDialog( static_cast<Window*>(_pSetupParent),
_pViewSh, _pOptions );
if ( _bHelpDisabled )
@@ -429,15 +428,16 @@ IMPL_LINK( SfxDialogExecutor_Impl, Execute, void *, EMPTYARG )
SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter )
-/* Interne Methode zum Setzen der Unterschiede von 'pNewPrinter' zum
- aktuellen Printer. pNewPrinter wird entweder "ubernommen oder gel"oscht.
+
+/* Internal method for setting the differences between 'pNewPrinter' to the
+ current printer. pNewPrinter is either taken over or deleted.
*/
{
- // aktuellen Printer holen
+ // get current Printer
SfxPrinter *pDocPrinter = GetPrinter();
- // Printer-Options auswerten
+ // Evaluate Printer Options
bool bOriToDoc = false;
bool bSizeToDoc = false;
if ( &pDocPrinter->GetOptions() )
@@ -449,15 +449,15 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter )
bSizeToDoc = pFlagItem ? (pFlagItem->GetValue() & SFX_PRINTER_CHG_SIZE) : sal_False;
}
- // vorheriges Format und Size feststellen
+ // Determine the previous format and size
Orientation eOldOri = pDocPrinter->GetOrientation();
Size aOldPgSz = pDocPrinter->GetPaperSizePixel();
- // neues Format und Size feststellen
+ // Determine the new format and size
Orientation eNewOri = pNewPrinter->GetOrientation();
Size aNewPgSz = pNewPrinter->GetPaperSizePixel();
- // "Anderungen am Seitenformat feststellen
+ // Determine the changes in page format
sal_Bool bOriChg = (eOldOri != eNewOri) && bOriToDoc;
sal_Bool bPgSzChg = ( aOldPgSz.Height() !=
( bOriChg ? aNewPgSz.Width() : aNewPgSz.Height() ) ||
@@ -465,7 +465,7 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter )
( bOriChg ? aNewPgSz.Height() : aNewPgSz.Width() ) ) &&
bSizeToDoc;
- // Message und Flags f"ur Seitenformat-"Anderung zusammenstellen
+ // Message and Flags for page format, summaries changes
String aMsg;
sal_uInt16 nNewOpt=0;
if( bOriChg && bPgSzChg )
@@ -484,49 +484,49 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter )
nNewOpt = SFX_PRINTER_CHG_SIZE;
}
- // in dieser Variable sammeln, was sich so ge"aendert hat
+ // Summaries in this variable what has been changed.
sal_uInt16 nChangedFlags = 0;
- // ggf. Nachfrage, ob Seitenformat vom Drucker "ubernommen werden soll
+ // Ask if possible, if page format should be taken over from printer.
if ( ( bOriChg || bPgSzChg ) &&
RET_YES == QueryBox(0, WB_YES_NO | WB_DEF_OK, aMsg).Execute() )
- // Flags mit "Anderungen f"ur <SetPrinter(SfxPrinter*)> mitpflegen
+ // Flags wich changes for <SetPrinter(SfxPrinter*)> are maintained
nChangedFlags |= nNewOpt;
- // fuer den MAC sein "temporary of class String" im naechsten if()
+ // For the MAC to have its "temporary of class String" in next if()
String aTempPrtName = pNewPrinter->GetName();
String aDocPrtName = pDocPrinter->GetName();
- // Wurde der Drucker gewechselt oder von Default auf Specific
- // oder umgekehrt geaendert?
+ // Was the printer selection changed from Default to Specific
+ // or the other way around?
if ( (aTempPrtName != aDocPrtName) || (pDocPrinter->IsDefPrinter() != pNewPrinter->IsDefPrinter()) )
{
- // neuen Printer "ubernehmen
+ // Get the new printer
// pNewPrinter->SetOrigJobSetup( pNewPrinter->GetJobSetup() );
nChangedFlags |= SFX_PRINTER_PRINTER|SFX_PRINTER_JOBSETUP;
pDocPrinter = pNewPrinter;
}
else
{
- // Extra-Optionen vergleichen
+ // Compare extra options
if ( ! (pNewPrinter->GetOptions() == pDocPrinter->GetOptions()) )
{
- // Options haben sich geaendert
+ // Option have changed
pDocPrinter->SetOptions( pNewPrinter->GetOptions() );
nChangedFlags |= SFX_PRINTER_OPTIONS;
}
- // JobSetups vergleichen
+ // Compare JobSetups
JobSetup aNewJobSetup = pNewPrinter->GetJobSetup();
JobSetup aOldJobSetup = pDocPrinter->GetJobSetup();
if ( aNewJobSetup != aOldJobSetup )
{
- // JobSetup hat sich geaendert (=> App mu\s neu formatieren)
+ // JobSetup has chaged => App must be formatted again)
// pDocPrinter->SetOrigJobSetup( aNewJobSetup );
nChangedFlags |= SFX_PRINTER_JOBSETUP;
}
- // alten, ver"anderten Printer behalten
+ // Keep old changed Printer.
pDocPrinter->SetPrinterProps( pNewPrinter );
delete pNewPrinter;
}
@@ -538,10 +538,9 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter )
}
//-------------------------------------------------------------------------
-// Unter WIN32 tritt leider das Problem auf, dass nichts gedruckt
-// wird, wenn SID_PRINTDOCDIRECT auflaueft; bisher bekannte,
-// einzige Abhilfe ist in diesem Fall das Abschalten der Optimierungen
-// (KA 17.12.95)
+// Sadly enough the problem arises with WIN32 that nothing is printed when
+// SID_PRINTDOCDIRECT auflaueft. At the moment the only known solution in this
+// case is to turn off the optimazation.
#ifdef _MSC_VER
#pragma optimize ( "", off )
#endif
@@ -609,7 +608,8 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
//FIXME: how to transport "bPrintOnHelp"?
// no help button in dialogs if called from the help window
- // (pressing help button would exchange the current page inside the help document that is going to be printed!)
+ // (pressing help button would exchange the current page inside the help
+ // document that is going to be printed!)
String aHelpFilterName( DEFINE_CONST_UNICODE("writer_web_HTML_help") );
SfxMedium* pMedium = GetViewFrame()->GetObjectShell()->GetMedium();
const SfxFilter* pFilter = pMedium ? pMedium->GetFilter() : NULL;
@@ -822,7 +822,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
}
}
-// Optimierungen wieder einschalten
+// Turn on optimazation again.
#ifdef _MSC_VER
#pragma optimize ( "", on )
#endif
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 18b924053821..f1a9126bb037 100755
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -836,100 +836,100 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
SfxWhichIter aIter( rSet );
for ( sal_uInt16 nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
{
- switch ( nSID )
- {
- case SID_STYLE_CATALOG:
- {
- if ( !GetViewFrame()->KnowsChildWindow( SID_STYLE_DESIGNER ) )
- rSet.DisableItem( nSID );
- break;
- }
-
- // Printer-Funktionen
- case SID_PRINTDOC:
- case SID_PRINTDOCDIRECT:
- case SID_SETUPPRINTER:
- case SID_PRINTER_NAME:
- {
- bool bEnabled = pImp->m_bCanPrint && !pImp->m_nPrinterLocks;
- bEnabled = bEnabled && !Application::GetSettings().GetMiscSettings().GetDisablePrinting();
- if ( bEnabled )
- {
- SfxPrinter *pPrinter = GetPrinter(sal_False);
+ switch ( nSID )
+ {
+ case SID_STYLE_CATALOG:
+ {
+ if ( !GetViewFrame()->KnowsChildWindow( SID_STYLE_DESIGNER ) )
+ rSet.DisableItem( nSID );
+ break;
+ }
- if ( SID_PRINTDOCDIRECT == nSID )
+ // Printer functions
+ case SID_PRINTDOC:
+ case SID_PRINTDOCDIRECT:
+ case SID_SETUPPRINTER:
+ case SID_PRINTER_NAME:
{
- rtl::OUString aPrinterName;
- if ( pPrinter != NULL )
- aPrinterName = pPrinter->GetName();
- else
- aPrinterName = Printer::GetDefaultPrinterName();
- if ( aPrinterName.getLength() > 0 )
+ bool bEnabled = pImp->m_bCanPrint && !pImp->m_nPrinterLocks;
+ bEnabled = bEnabled && !Application::GetSettings().GetMiscSettings().GetDisablePrinting();
+ if ( bEnabled )
{
- uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() );
+ SfxPrinter *pPrinter = GetPrinter(sal_False);
- ::rtl::OUStringBuffer aBuffer( 60 );
- aBuffer.append( RetrieveLabelFromCommand(
+ if ( SID_PRINTDOCDIRECT == nSID )
+ {
+ rtl::OUString aPrinterName;
+ if ( pPrinter != NULL )
+ aPrinterName = pPrinter->GetName();
+ else
+ aPrinterName = Printer::GetDefaultPrinterName();
+ if ( aPrinterName.getLength() > 0 )
+ {
+ uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() );
+
+ ::rtl::OUStringBuffer aBuffer( 60 );
+ aBuffer.append( RetrieveLabelFromCommand(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrintDefault" )),
xFrame ));
- aBuffer.appendAscii( " (" );
- aBuffer.append( aPrinterName );
- aBuffer.appendAscii( ")" );
+ aBuffer.appendAscii( " (" );
+ aBuffer.append( aPrinterName );
+ aBuffer.appendAscii( ")" );
- rSet.Put( SfxStringItem( SID_PRINTDOCDIRECT, aBuffer.makeStringAndClear() ) );
- }
- }
- bEnabled = !pPrinter || !pPrinter->IsPrinting();
- }
- if ( !bEnabled )
- {
- // will now be handled by requeing the request
- /* rSet.DisableItem( SID_PRINTDOC );
- rSet.DisableItem( SID_PRINTDOCDIRECT );
- rSet.DisableItem( SID_SETUPPRINTER ); */
+ rSet.Put( SfxStringItem( SID_PRINTDOCDIRECT, aBuffer.makeStringAndClear() ) );
}
- break;
+ }
+ bEnabled = !pPrinter || !pPrinter->IsPrinting();
}
-
- // Mail-Funktionen
- case SID_MAIL_SENDDOCASPDF:
- case SID_MAIL_SENDDOC:
- case SID_MAIL_SENDDOCASFORMAT:
+ if ( !bEnabled )
{
- sal_Bool bEnable = !GetViewFrame()->HasChildWindow( SID_MAIL_CHILDWIN );
- if ( !bEnable )
- rSet.DisableItem( nSID );
- break;
+ // will now be handled by requeing the request
+ /* rSet.DisableItem( SID_PRINTDOC );
+ rSet.DisableItem( SID_PRINTDOCDIRECT );
+ rSet.DisableItem( SID_SETUPPRINTER ); */
}
+ break;
+ }
- // PlugIns running
- case SID_PLUGINS_ACTIVE:
- {
- rSet.Put( SfxBoolItem( SID_PLUGINS_ACTIVE,
- !pImp->m_bPlugInsActive) );
- break;
- }
-/*
- // SelectionText
- case SID_SELECTION_TEXT:
- {
- rSet.Put( SfxStringItem( SID_SELECTION_TEXT, GetSelectionText() ) );
- break;
- }
+ // Mail functions
+ case SID_MAIL_SENDDOCASPDF:
+ case SID_MAIL_SENDDOC:
+ case SID_MAIL_SENDDOCASFORMAT:
+ {
+ sal_Bool bEnable = !GetViewFrame()->HasChildWindow( SID_MAIL_CHILDWIN );
+ if ( !bEnable )
+ rSet.DisableItem( nSID );
+ break;
+ }
- // SelectionTextExt
- case SID_SELECTION_TEXT_EXT:
- {
- rSet.Put( SfxStringItem( SID_SELECTION_TEXT_EXT, GetSelectionText(sal_True) ) );
- break;
- }
-*/
- case SID_STYLE_FAMILY :
- {
- rSet.Put( SfxUInt16Item( SID_STYLE_FAMILY, pImp->m_nFamily ) );
- break;
- }
- }
+ // PlugIns running
+ case SID_PLUGINS_ACTIVE:
+ {
+ rSet.Put( SfxBoolItem( SID_PLUGINS_ACTIVE,
+ !pImp->m_bPlugInsActive) );
+ break;
+ }
+ /*
+ // SelectionText
+ case SID_SELECTION_TEXT:
+ {
+ rSet.Put( SfxStringItem( SID_SELECTION_TEXT, GetSelectionText() ) );
+ break;
+ }
+
+ // SelectionTextExt
+ case SID_SELECTION_TEXT_EXT:
+ {
+ rSet.Put( SfxStringItem( SID_SELECTION_TEXT_EXT, GetSelectionText(sal_True) ) );
+ break;
+ }
+ */
+ case SID_STYLE_FAMILY :
+ {
+ rSet.Put( SfxUInt16Item( SID_STYLE_FAMILY, pImp->m_nFamily ) );
+ break;
+ }
+ }
}
}
@@ -948,12 +948,11 @@ void SfxViewShell::SetZoomFactor( const Fraction &rZoomX,
//--------------------------------------------------------------------
ErrCode SfxViewShell::DoVerb(long /*nVerb*/)
-/* [Beschreibung]
-
- Virtuelle Methode, um am selektierten Objekt ein Verb auszuf"uhren.
- Da dieses Objekt nur den abgeleiteten Klassen bekannt ist, muss DoVerb
- dort "uberschrieben werden.
+/* [Description]
+ Virtual Method used to perform a Verb on a selected Object.
+ Since this Object is just known by the derived classes, DoVerb
+ must be overloaded.
*/
{
@@ -1103,8 +1102,8 @@ void SfxViewShell::Deactivate(sal_Bool /*bMDI*/)
void SfxViewShell::AdjustPosSizePixel
(
- const Point& /*rToolOffset*/,// linke obere Ecke der Tools im Frame-Window
- const Size& /*rSize*/ // gesamte zur Verf"ugung stehende Gr"o\se
+ const Point& /*rToolOffset*/,// Upper left corner Tools in Frame-Window
+ const Size& /*rSize*/ // All available sizes.
)
{
@@ -1115,20 +1114,19 @@ void SfxViewShell::AdjustPosSizePixel
void SfxViewShell::Move()
-/* [Beschreibung]
+/* [Description]
- Diese virtuelle Methode wird gerufen, wenn das Fenster, in dem die
- SfxViewShell dargestellt wird eine StarView-Move() Nachricht erh"alt.
+ This virtual Method is called when the window displayed in the
+ SfxViewShell gets a StarView-Move() notification.
- Die Basisimplementierung braucht nicht gerufen zu werden.
+ This base implementation does not have to be called. .
+ [Note]
- [Anmerkung]
+ This Method can be used to cancel a selection, in order to catch the
+ mouse movement which is due to moving a window.
- Diese Methode kann dazu verwendet werden, eine Selektion abzubrechen,
- um durch das Moven des Fensters erzeugte Maus-Bewegungen anzufangen.
-
- Zur Zeit funktioniert die Benachrichtigung nicht In-Place.
+ For now the notification does not work In-Place.
*/
{
@@ -1138,48 +1136,45 @@ void SfxViewShell::Move()
void SfxViewShell::OuterResizePixel
(
- const Point& /*rToolOffset*/,// linke obere Ecke der Tools im Frame-Window
- const Size& /*rSize*/ // gesamte zur Verf"ugung stehende Gr"o\se
+ const Point& /*rToolOffset*/,// Upper left corner Tools in Frame-Window
+ const Size& /*rSize*/ // All available sizes.
)
-/* [Beschreibung]
+/* [Description]
- Diese Methode muss ueberladen werden, um auf "Anderungen der Groesse
- der View zu reagieren. Dabei definieren wir die View als das Edit-Window
- zuz"uglich der um das Edit-Window angeordnenten Tools (z.B. Lineale).
+ This Method has to be overloaded to be able to react to the size-change of
+ the View. Thus the View is defined as the Edit window and also the
+ attached Tools are defined (for example the ruler).
- Das Edit-Window darf weder in Gr"o\se noch Position ver"andert werden.
+ The Edit window must not be changed either in size or position.
- Die Vis-Area der SfxObjectShell, dessen Skalierung und Position
- d"urfen hier ver"andert werden. Der Hauptanwendungsfall ist dabei,
- das Ver"andern der Gr"o\se der Vis-Area.
+ The Vis-Area of SfxObjectShell, its scale and position can be changed
+ here. The mainuse is to change the size of the Vis-Area.
- "Andert sich durch die neue Berechnung der Border, so mu\s dieser
- mit <SfxViewShell::SetBorderPixel(const SvBorder&)> gesetzt werden.
- Erst nach Aufruf von 'SetBorderPixel' ist das Positionieren von
- Tools erlaubt.
+ If the Border is changed due to the new calculation then this has to be set
+ by <SfxViewShell::SetBorderPixel(const SvBorder&)>. The Postioning of Tools
+ is only allowed after the calling of 'SetBorderPixel'.
+ [Example]
- [Beispiel]
+ void AppViewSh::OuterViewResizePixel( const Point &rOfs, const Size &rSz )
- void AppViewSh::OuterViewResizePixel( const Point &rOfs, const Size &rSz )
- {
- // Tool-Positionen und Gr"o\sen von au\sen berechnen, NICHT setzen!
- // (wegen folgender Border-Berechnung)
- Point aHLinPos...; Size aHLinSz...;
- ...
-
- // Border f"ur Tools passend zu rSize berechnen und setzen
- SvBorder aBorder...
- SetBorderPixel( aBorder ); // ab jetzt sind Positionierungen erlaubt
-
- // Tools anordnen
- pHLin->SetPosSizePixel( aHLinPos, aHLinSz );
- ...
- }
+{
+ // Calculate Tool position and size externally, do not set!
+ // (due to the following Border calculation)
+ Point aHLinPos...; Size aHLinSz...;
+ ...
+ // Calculate and Set a Border of Tools which matches rSize.
+ SvBorder aBorder...
+ SetBorderPixel( aBorder ); // Allow Positioning from here on.
- [Querverweise]
+ // Arrange Tools
+ pHLin->SetPosSizePixel( aHLinPos, aHLinSz );
+ ...
+ }
+
+ [Cross-reference]
<SfxViewShell::InnerResizePixel(const Point&,const Size& rSize)>
*/
@@ -1193,45 +1188,44 @@ void SfxViewShell::OuterResizePixel
void SfxViewShell::InnerResizePixel
(
- const Point& /*rToolOffset*/,// linke obere Ecke der Tools im Frame-Window
- const Size& /*rSize*/ // dem Edit-Win zur Verf"ugung stehende Gr"o\se
+ const Point& /*rToolOffset*/,// Upper left corner Tools in Frame-Window
+ const Size& /*rSize*/ // All available sizes.
)
-/* [Beschreibung]
-
- Diese Methode muss ueberladen werden, um auf "Anderungen der Groesse
- des Edit-Windows zu reagieren.
+/* [Description]
- Das Edit-Window darf weder in Gr"o\se noch Position ver"andert werden.
- Weder die Vis-Area der SfxObjectShell noch dessen Skalierung oder
- Position d"urfen ver"andert werden.
+ This Method has to be overloaded to be able to react to the size-change of
+ the Edit window.
- "Andert sich durch die neue Berechnung der Border, so mu\s dieser
- mit <SfxViewShell::SetBorderPixel(const SvBorder&)> gesetzt werden.
- Erst nach Aufruf von 'SetBorderPixel' ist das Positionieren von
- Tools erlaubt.
+ The Edit window must not be changed either in size or position.
+ Neither the Vis-Area of SfxObjectShell nor its scale or position are
+ allowed to be changed
+ If the Border is changed due to the new calculation then is has to be set
+ by <SfxViewShell::SetBorderPixel(const SvBorder&)>.
+ The Postioning of Tools is only allowed after the calling of
+ 'SetBorderPixel'.
- [Beispiel]
- void AppViewSh::InnerViewResizePixel( const Point &rOfs, const Size &rSz )
- {
- // Tool-Positionen und Gr"o\sen von innen berechnen, NICHT setzen!
- // (wegen folgender Border-Berechnung)
- Point aHLinPos...; Size aHLinSz...;
- ...
-
- // Border f"ur Tools passend zu rSz berechnen und setzen
- SvBorder aBorder...
- SetBorderPixel( aBorder ); // ab jetzt sind Positionierungen erlaubt
-
- // Tools anordnen
- pHLin->SetPosSizePixel( aHLinPos, aHLinSz );
- ...
- }
+ [Note]
+ void AppViewSh::InnerViewResizePixel( const Point &rOfs, const Size &rSz )
+ {
+ // Calculate Tool position and size internally, do not set!
+ // (due to the following Border calculation)
+ Point aHLinPos...; Size aHLinSz...;
+ ...
+
+ // Calculate and Set a Border of Tools which matches rSize.
+ SvBorder aBorder...
+ SetBorderPixel( aBorder ); // Allow Positioning from here on.
+
+ // Arrange Tools
+ pHLin->SetPosSizePixel( aHLinPos, aHLinSz );
+ ...
+ }
- [Querverweise]
+ [Cross-reference]
<SfxViewShell::OuterResizePixel(const Point&,const Size& rSize)>
*/
@@ -1288,29 +1282,28 @@ const SvBorder& SfxViewShell::GetBorderPixel() const
void SfxViewShell::SetWindow
(
- Window* pViewPort // Pointer auf das Datenfenster bzw. 0 im Destruktor
+ Window* pViewPort // For example Null pointer in the Destructor.
)
-/* [Beschreibung]
+/* [Description]
- Mit dieser Methode wird der SfxViewShell das Datenfenster mitgeteilt.
- Dieses wird f"ur den In-Place-Container und f"ur das korrekte
- Wiederherstellen des Focus ben"otigt.
+ With this method the SfxViewShell is set in the data window. This is
+ needed for the in-place container and for restoring the proper focus.
- Selbst In-Place-aktiv ist das Umsetzen des ViewPort-Windows verboten.
+ Even in-place-active the conversion of the ViewPort Windows is forbidden.
*/
{
if( pWindow == pViewPort )
return;
- // ggf. vorhandene IP-Clients disconnecten
+ // Disconnect existing IP-Clients if possible
DisconnectAllClients();
//TODO: should we have a "ReconnectAllClients" method?
DiscardClients_Impl();
- // View-Port austauschen
+ // Switch View-Port
sal_Bool bHadFocus = pWindow ? pWindow->HasChildPathFocus( sal_True ) : sal_False;
pWindow = pViewPort;
@@ -1323,7 +1316,7 @@ void SfxViewShell::SetWindow
if ( bHadFocus && pWindow )
pWindow->GrabFocus();
//TODO/CLEANUP
- //brauchen wir die Methode doch noch?!
+ //Do we still need this Method?!
//SFX_APP()->GrabFocus( pWindow );
}
@@ -1339,8 +1332,9 @@ Size SfxViewShell::GetOptimalSizePixel() const
SfxViewShell::SfxViewShell
(
- SfxViewFrame* pViewFrame, /* <SfxViewFrame>, in dem diese View dargestellt wird */
- sal_uInt16 nFlags /* siehe <SfxViewShell-Flags> */
+ SfxViewFrame* pViewFrame, /* <SfxViewFrame>, which will be
+ displayed in this View */
+ sal_uInt16 nFlags /* See <SfxViewShell-Flags> */
)
: SfxShell(this)
@@ -1365,8 +1359,8 @@ SfxViewShell::SfxViewShell
SetPool( &pViewFrame->GetObjectShell()->GetPool() );
StartListening(*pViewFrame->GetObjectShell());
- // in Liste eintragen
- const SfxViewShell *pThis = this; // wegen der kranken Array-Syntax
+ // Insert into list
+ const SfxViewShell *pThis = this; // due to the sick Array syntax
SfxViewShellArr_Impl &rViewArr = SFX_APP()->GetViewShells_Impl();
rViewArr.Insert(pThis, rViewArr.Count() );
}
@@ -1377,7 +1371,7 @@ SfxViewShell::~SfxViewShell()
{
DBG_DTOR(SfxViewShell, 0);
- // aus Liste austragen
+ // Remove from list
const SfxViewShell *pThis = this;
SfxViewShellArr_Impl &rViewArr = SFX_APP()->GetViewShells_Impl();
rViewArr.Remove( rViewArr.GetPos(pThis) );
@@ -1403,7 +1397,7 @@ SfxViewShell::~SfxViewShell()
sal_uInt16 SfxViewShell::PrepareClose
(
- sal_Bool bUI, // sal_True: Dialoge etc. erlaubt, sal_False: silent-mode
+ sal_Bool bUI, // TRUE: Allow Dialog and so on, FALSE: silent-mode
sal_Bool /*bForBrowsing*/
)
{
@@ -1458,12 +1452,12 @@ SfxViewShell* SfxViewShell::Get( const Reference< XController>& i_rController )
SdrView* SfxViewShell::GetDrawView() const
-/* [Beschreibung]
+/* [Description]
- Diese virtuelle Methode mu\s von den Subklassen "uberladen werden, wenn
- der Property-Editor zur Verf"ugung stehen soll.
+ This virtual Method has to be overloded by the sub classes, to be able
+ make the Property-Editor available.
- Die Default-Implementierung liefert immer 0.
+ The default implementation does always return zero.
*/
{
@@ -1474,27 +1468,26 @@ SdrView* SfxViewShell::GetDrawView() const
String SfxViewShell::GetSelectionText
(
- sal_Bool /*bCompleteWords*/ /* sal_False (default)
- Nur der tats"achlich selektierte Text wird
- zur"uckgegeben.
-
- TRUE
- Der selektierte Text wird soweit erweitert,
- da\s nur ganze W"orter zur"uckgegeben werden.
- Als Worttrenner gelten White-Spaces und die
- Satzzeichen ".,;" sowie einfache und doppelte
- Anf"uhrungszeichen.
- */
+ sal_Bool /*bCompleteWords*/ /* FALSE (default)
+ Only the actual selected text is returned.
+
+ TRUE
+ The selected text is expanded so that only
+ whole words are returned. As word separators
+ these are used: white spaces and punctuation
+ ".,;" and single and double quotes.
+ */
)
-/* [Beschreibung]
+/* [Description]
- Diese Methode kann von Anwendungsprogrammierer "uberladen werden,
- um einen Text zur"uckzuliefern, der in der aktuellen Selektion
- steht. Dieser wird z.B. beim Versenden (email) verwendet.
+ This Method can be overloaded by the programmers to return a text that
+ is included in the current selection. This is for example used when
+ sending emails.
- Mit "CompleteWords == TRUE" ger"ufen, reicht z.B. auch der Cursor,
- der in einer URL steht, um die gesamte URL zu liefern.
+ When called with "CompleteWords == TRUE", it is for example sufficent
+ with having the Cursor positioned somewhere within an URL in-order
+ to have the entire URL returned.
*/
{
@@ -1505,11 +1498,11 @@ String SfxViewShell::GetSelectionText
sal_Bool SfxViewShell::HasSelection( sal_Bool ) const
-/* [Beschreibung]
+/* [Description]
- Mit dieser virtuellen Methode kann z.B. ein Dialog abfragen, ob in der
- aktuellen View etwas selektiert ist. Wenn der Parameter <sal_Bool> sal_True ist,
- wird abgefragt, ob Text selektiert ist.
+ With this virtual Method can a for example a Dialog be queried, to
+ check if something is selected in the current view. If the Parameter
+ is <BOOL> TRUE then it is checked wether some text is selected.
*/
{
@@ -1520,26 +1513,25 @@ sal_Bool SfxViewShell::HasSelection( sal_Bool ) const
void SfxViewShell::SetSubShell( SfxShell *pShell )
-/* [Beschreibung]
+/* [Description]
- Mit dieser Methode kann eine Selektions- oder Cursor-Shell angemeldet
- werden, die automatisch unmittelbar nach der SfxViewShell auf den
- SfxDispatcher gepusht wird, und automatisch umittelbar vor ihr
- gepoppt wird.
+ With this method a selection or cursor Shell can be registered, which are
+ automatically pushed to SfxDispatcher immediately after SfxViewShell, and
+ and automatically popped immediately before SfxViewShell.
- Ist die SfxViewShell-Instanz bereits gepusht, dann wird pShell
- sofort ebenfalls gepusht. Wird mit SetSubShell eine andere SfxShell
- Instanz angemeldet, als vorher angemeldet war, wird die zuvor angemeldete
- ggf. automatisch gepoppt. Mit pShell==0 kann daher die aktuelle
- Sub-Shell abgemeldet werden.
+ If the SfxViewShell instance is already pushed, then pShell will be
+ immediately pushed as well. Is another SfxShell instance registered by
+ using SetSubShell, which was previously registered, the previously
+ registered shell is popped automatically if possible. With pShell==0
+ the current sub-shell be can thus be unregistered.
*/
{
- // ist diese ViewShell "uberhaupt aktiv?
+ // Is this ViewShell even active?
SfxDispatcher *pDisp = pFrame->GetDispatcher();
if ( pDisp->IsActive(*this) )
{
- // Dispatcher updaten
+ // Update Dispatcher
if ( pSubShell )
pDisp->Pop(*pSubShell);
if ( pShell )
@@ -1777,26 +1769,25 @@ sal_Bool SfxViewShell::ExecKey_Impl(const KeyEvent& aKey)
bool SfxViewShell::KeyInput( const KeyEvent &rKeyEvent )
-/* [Beschreibung]
+/* [Description]
- Diese Methode f"uhrt das KeyEvent 'rKeyEvent' "uber die an dieser
- SfxViewShell direkt oder indirekt (z.B. via Applikation) konfigurierten
- Tasten (Accelerator) aus.
+ This Method executes the KeyEvent 'rKeyEvent' of the Keys (Accelerator)
+ configured either direct or indirect (for example by the Application)
+ in the SfxViewShell.
-
- [R"uckgabewert]
+ [Return value]
bool TRUE
- die Taste ist konfiguriert, der betreffende
- Handler wurde gerufen
+ The Key (Accelerator) is configured and the
+ the associated Handler was called
- FALSE
- die Taste ist nicht konfiguriert, es konnte
- also kein Handler gerufen werden
+ FALSE
+ The Key (Accelerator) is not configured and
+ subsequently no Handler was called
+ [Cross-reference]
- [Querverweise]
- <SfxApplication::KeyInput(const KeyEvent&)>
+ <SfxApplication::KeyInput(const KeyEvent&)>
*/
{
return ExecKey_Impl(rKeyEvent);
@@ -1811,11 +1802,11 @@ bool SfxViewShell::GlobalKeyInput_Impl( const KeyEvent &rKeyEvent )
void SfxViewShell::ShowCursor( bool /*bOn*/ )
-/* [Beschreibung]
+/* [Description]
- Diese Methode mu\s von Subklassen "uberladen werden, damit vom SFx
- aus der Cursor ein- und ausgeschaltet werden kann. Dies geschieht
- z.B. bei laufendem <SfxProgress>.
+ This Method has to be overloaded by the subclasses so that SFx from
+ the Cursor can be switched on and off. This happes for example with
+ with the running <SfxProgress>.
*/
{
@@ -1825,17 +1816,16 @@ void SfxViewShell::ShowCursor( bool /*bOn*/ )
void SfxViewShell::GotFocus() const
-/* [Beschreibung]
-
- Diese Methode mu\s vom Applikationsentwickler gerufen werden, wenn
- das Edit-Window den Focus erhalten hat. Der SFx hat so z.B. die
- M"oglichkeit, den Accelerator einzuschalten.
+/* [Description]
+ This Method has to be called by the programmer, when the
+ Edit window has received the focus. This gives for example the SFx
+ the power to turn on the accelerator.
- [Anmerkung]
+ [Note]
- <StarView> liefert leider keine M"oglichkeit, solche Events
- 'von der Seite' einzuh"angen.
+ <StarView> does sadly enough not provide the possibillity to attach
+ such "side-way" events.
*/
{
@@ -1880,7 +1870,7 @@ void SfxViewShell::QueryObjAreaPixel( Rectangle& ) const
void SfxViewShell::AdjustVisArea(const Rectangle& rRect)
{
- DBG_ASSERT (pFrame, "Kein Frame?");
+ DBG_ASSERT (pFrame, "No Frame?");
GetObjectShell()->SetVisArea( rRect );
}
@@ -1949,11 +1939,10 @@ sal_Bool SfxViewShell::PlugInsActive() const
//--------------------------------------------------------------------
void SfxViewShell::DiscardClients_Impl()
-/* [Beschreibung]
+/* [Description]
- Diese Methode dient dazu, vor dem Schlie\sen eines Dokuments das
- Speichern der Objekte zu verhindern, wenn der Benutzer Schlie\en ohne
- Speichern gew"ahlt hatte.
+ The purpose of this Method is to prevent the saving of Objects when closing
+ the Document, if the user has chosen to close without saving.
*/
{
@@ -2019,7 +2008,7 @@ const Size& SfxViewShell::GetMargin() const
void SfxViewShell::SetMargin( const Size& rSize )
{
- // Der default-Margin wurde "geeicht" mit www.apple.com !!
+ // the default margin was verified using www.apple.com !!
Size aMargin = rSize;
if ( aMargin.Width() == -1 )
aMargin.Width() = DEFAULT_MARGIN_WIDTH;
diff --git a/sfx2/workben/custompanel/ctp_factory.cxx b/sfx2/workben/custompanel/ctp_factory.cxx
index 40525347ac58..c49e5279ebbd 100755
--- a/sfx2/workben/custompanel/ctp_factory.cxx
+++ b/sfx2/workben/custompanel/ctp_factory.cxx
@@ -103,7 +103,7 @@ namespace sd { namespace colortoolpanel
}
if ( !xParentWindow.is() )
{
- OSL_ENSURE( false, "ToolPanelFactory::createUIElement: no parent window in the args!" );
+ OSL_FAIL( "ToolPanelFactory::createUIElement: no parent window in the args!" );
throw IllegalArgumentException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "No parent window provided in the creation arguments. Cannot create tool panel." ) ),
*this,
diff --git a/shell/source/cmdmail/cmdmailsuppl.cxx b/shell/source/cmdmail/cmdmailsuppl.cxx
index 7b1b1c1b2b8b..a01d75253726 100755
--- a/shell/source/cmdmail/cmdmailsuppl.cxx
+++ b/shell/source/cmdmail/cmdmailsuppl.cxx
@@ -220,7 +220,7 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM
{
m_xConfigurationProvider.clear();
OSL_TRACE( "RuntimeException caught accessing configuration provider." );
- OSL_TRACE( OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ OSL_TRACE( "%s", OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
throw e;
}
diff --git a/shell/source/unix/sysshell/recently_used_file_handler.cxx b/shell/source/unix/sysshell/recently_used_file_handler.cxx
index 1ef8c621dd3b..b34bb3ad81a3 100755
--- a/shell/source/unix/sysshell/recently_used_file_handler.cxx
+++ b/shell/source/unix/sysshell/recently_used_file_handler.cxx
@@ -513,15 +513,15 @@ extern "C" void add_to_recently_used_file_list(const rtl::OUString& file_url, co
}
catch(const char* ex)
{
- OSL_ENSURE(false, ex);
+ OSL_FAIL(ex);
}
catch(const xml_parser_exception&)
{
- OSL_ENSURE(false, "XML parser error");
+ OSL_FAIL("XML parser error");
}
catch(const unknown_xml_format_exception&)
{
- OSL_ENSURE(false, "XML format unknown");
+ OSL_FAIL("XML format unknown");
}
}
diff --git a/shell/source/win32/simplemail/senddoc.cxx b/shell/source/win32/simplemail/senddoc.cxx
index 7a16e81bbc4b..b1444dc30810 100755
--- a/shell/source/win32/simplemail/senddoc.cxx
+++ b/shell/source/win32/simplemail/senddoc.cxx
@@ -221,7 +221,7 @@ void initParameter(int argc, char* argv[])
{
if (!isKnownParameter(argv[i]))
{
- OSL_ENSURE(false, "Wrong parameter received");
+ OSL_FAIL("Wrong parameter received");
continue;
}
@@ -324,7 +324,7 @@ int main(int argc, char* argv[])
#endif
)
{
- OSL_ENSURE(false, ex.what());
+ OSL_FAIL(ex.what());
}
return ulRet;
}
diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc
index ed623cd2e699..8b25750af86a 100755
--- a/svx/inc/svx/dialogs.hrc
+++ b/svx/inc/svx/dialogs.hrc
@@ -581,6 +581,15 @@
#define RID_SVXSTR_SEABLUE (RID_SVX_START + 546)
#define RID_SVXSTR_COLOR_SUN (RID_SVX_START + 547)
+// LibreOffice palette colors
+#define RID_SVXSTR_LIBRE_GREEN_1 (RID_SVX_START + 548)
+#define RID_SVXSTR_LIBRE_GREEN_ACCENT (RID_SVX_START + 549)
+#define RID_SVXSTR_LIBRE_BLUE_ACCENT (RID_SVX_START + 550)
+#define RID_SVXSTR_LIBRE_ORANGE_ACCENT (RID_SVX_START + 551)
+#define RID_SVXSTR_LIBRE_PURPLE (RID_SVX_START + 552)
+#define RID_SVXSTR_LIBRE_PURPLE_ACCENT (RID_SVX_START + 553)
+#define RID_SVXSTR_LIBRE_YELLOW_ACCENT (RID_SVX_START + 554)
+
// JP: string resource ids for table-autoformat-names, used in SW/SC
// !!! Urgent: the order of Ids is persistent. New Ids have to append !!!
#define RID_SVXSTR_TBLAFMT_BEGIN (RID_SVX_START + 560)
@@ -638,6 +647,14 @@
#define RID_SVXSTR_COLOR_SUN_DEF (RID_SVX_START + 620)
#define RID_SVXSTR_COLOR_CHART (RID_SVX_START + 621)
#define RID_SVXSTR_COLOR_CHART_DEF (RID_SVX_START + 622)
+// LibreOffice palette colors
+#define RID_SVXSTR_LIBRE_GREEN_1_DEF (RID_SVX_START + 623)
+#define RID_SVXSTR_LIBRE_GREEN_ACCENT_DEF (RID_SVX_START + 624)
+#define RID_SVXSTR_LIBRE_BLUE_ACCENT_DEF (RID_SVX_START + 625)
+#define RID_SVXSTR_LIBRE_ORANGE_ACCENT_DEF (RID_SVX_START + 626)
+#define RID_SVXSTR_LIBRE_PURPLE_DEF (RID_SVX_START + 627)
+#define RID_SVXSTR_LIBRE_PURPLE_ACCENT_DEF (RID_SVX_START + 628)
+#define RID_SVXSTR_LIBRE_YELLOW_ACCENT_DEF (RID_SVX_START + 629)
// Default-Gradient-Names
#define RID_SVXSTR_GRDT0_DEF (RID_SVX_START + 631)
diff --git a/svx/inc/svx/fmpage.hxx b/svx/inc/svx/fmpage.hxx
index 07a6d719c163..8c32e46073a4 100755
--- a/svx/inc/svx/fmpage.hxx
+++ b/svx/inc/svx/fmpage.hxx
@@ -70,9 +70,7 @@ public:
// access to all forms
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer>& GetForms( bool _bForceCreate = true ) const;
-#ifndef SVX_LIGHT
FmFormPageImpl& GetImpl() const { return *m_pImpl; }
-#endif // SVX_LIGHT
public:
const String& GetName() const { return m_sPageName; }
diff --git a/svx/inc/svx/svditer.hxx b/svx/inc/svx/svditer.hxx
index 846c083c5d0c..85fc4b637570 100755
--- a/svx/inc/svx/svditer.hxx
+++ b/svx/inc/svx/svditer.hxx
@@ -29,8 +29,9 @@
#ifndef _SVDITER_HXX
#define _SVDITER_HXX
+#include <vector>
+
#include <sal/types.h>
-#include <tools/list.hxx>
#include "svx/svxdllapi.h"
class SdrObjList;
@@ -45,16 +46,16 @@ enum SdrIterMode { IM_FLAT, IM_DEEPWITHGROUPS, IM_DEEPNOGROUPS};
class SVX_DLLPUBLIC SdrObjListIter
{
- List maObjList;
+ std::vector<SdrObject*> maObjList;
sal_uInt32 mnIndex;
- sal_Bool mbReverse;
+ bool mbReverse;
- void ImpProcessObjectList(const SdrObjList& rObjList, SdrIterMode eMode, sal_Bool bUseZOrder);
+ void ImpProcessObjectList(const SdrObjList& rObjList, SdrIterMode eMode, bool bUseZOrder);
void ImpProcessMarkList(const SdrMarkList& rMarkList, SdrIterMode eMode);
- void ImpProcessObj(SdrObject* pObj, SdrIterMode eMode, sal_Bool bUseZOrder);
+ void ImpProcessObj(SdrObject* pObj, SdrIterMode eMode, bool bUseZOrder);
public:
- SdrObjListIter(const SdrObjList& rObjList, SdrIterMode eMode = IM_DEEPNOGROUPS, sal_Bool bReverse = sal_False);
+ SdrObjListIter(const SdrObjList& rObjList, SdrIterMode eMode = IM_DEEPNOGROUPS, bool bReverse = false);
/** This variant lets the user choose the order in which to travel over
the objects.
@param bUseZOrder
@@ -62,20 +63,24 @@ public:
Otherwise the navigation position as returned by
SdrObject::GetNavigationPosition() is used.
*/
- SdrObjListIter(const SdrObjList& rObjList, sal_Bool bUseZOrder, SdrIterMode eMode = IM_DEEPNOGROUPS, sal_Bool bReverse = sal_False);
+ SdrObjListIter(const SdrObjList& rObjList, bool bUseZOrder, SdrIterMode eMode = IM_DEEPNOGROUPS, bool bReverse = false);
/* SJ: the following function can now be used with every
SdrObject and is no longer limited to group objects */
- SdrObjListIter(const SdrObject& rObj, SdrIterMode eMode = IM_DEEPNOGROUPS, sal_Bool bReverse = sal_False);
+ SdrObjListIter(const SdrObject& rObj, SdrIterMode eMode = IM_DEEPNOGROUPS, bool bReverse = false);
/** Iterates over a list of marked objects received from the SdrMarkView. */
- SdrObjListIter(const SdrMarkList& rMarkList, SdrIterMode eMode = IM_DEEPNOGROUPS, sal_Bool bReverse = sal_False);
+ SdrObjListIter(const SdrMarkList& rMarkList, SdrIterMode eMode = IM_DEEPNOGROUPS, bool bReverse = false);
- void Reset() { mnIndex = (mbReverse ? maObjList.Count() : 0L); }
- sal_Bool IsMore() const { return (mbReverse ? mnIndex != 0 : ( mnIndex < maObjList.Count())); }
- SdrObject* Next() { return (SdrObject*)maObjList.GetObject(mbReverse ? --mnIndex : mnIndex++); }
+ void Reset() { mnIndex = (mbReverse ? maObjList.size() : 0L); }
+ bool IsMore() const { return (mbReverse ? mnIndex != 0 : ( mnIndex < maObjList.size())); }
+ SdrObject* Next()
+ {
+ sal_uInt32 idx = (mbReverse ? --mnIndex : mnIndex++);
+ return idx < maObjList.size() ? maObjList[idx] : NULL;
+ }
- sal_uInt32 Count() { return maObjList.Count(); }
+ sal_uInt32 Count() { return maObjList.size(); }
};
#endif //_SVDITER_HXX
diff --git a/svx/inc/svx/unomodel.hxx b/svx/inc/svx/unomodel.hxx
index 5bf74079f359..45b8dcd92ac9 100755
--- a/svx/inc/svx/unomodel.hxx
+++ b/svx/inc/svx/unomodel.hxx
@@ -29,8 +29,6 @@
#ifndef SVX_UNOMODEL_HXX
#define SVX_UNOMODEL_HXX
-#ifndef SVX_LIGHT
-
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/ucb/XAnyCompareFactory.hpp>
@@ -109,6 +107,4 @@ SVX_DLLPUBLIC extern sal_Bool SvxDrawingLayerImport( SdrModel* pModel, const com
#endif
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx
index f09d71e8fe92..fe80bc2ad759 100755
--- a/svx/source/accessibility/AccessibleTextHelper.cxx
+++ b/svx/source/accessibility/AccessibleTextHelper.cxx
@@ -451,13 +451,13 @@ namespace accessibility
// we just received the focus, also send caret event then
UpdateSelection();
- DBG_TRACE1("AccessibleTextHelper_Impl::SetChildFocus(): Paragraph %d received focus", nChild );
+ OSL_TRACE("AccessibleTextHelper_Impl::SetChildFocus(): Paragraph %d received focus", nChild );
}
else
{
maParaManager.SetFocus( -1 );
- DBG_TRACE1("AccessibleTextHelper_Impl::SetChildFocus(): Paragraph %d lost focus", nChild );
+ OSL_TRACE("AccessibleTextHelper_Impl::SetChildFocus(): Paragraph %d lost focus", nChild );
if( mbGroupHasFocus )
SetShapeFocus( sal_True );
@@ -474,7 +474,7 @@ namespace accessibility
mbGroupHasFocus = sal_True;
maParaManager.SetFocus( nNewChild );
- DBG_TRACE1("AccessibleTextHelper_Impl::ChangeChildFocus(): Paragraph %d received focus", nNewChild );
+ OSL_TRACE("AccessibleTextHelper_Impl::ChangeChildFocus(): Paragraph %d received focus", nNewChild );
}
void AccessibleTextHelper_Impl::SetShapeFocus( sal_Bool bHaveFocus ) SAL_THROW((::com::sun::star::uno::RuntimeException))
@@ -490,12 +490,12 @@ namespace accessibility
if( bHaveFocus )
{
GotPropertyEvent( uno::makeAny(AccessibleStateType::FOCUSED), AccessibleEventId::STATE_CHANGED );
- DBG_TRACE("AccessibleTextHelper_Impl::SetShapeFocus(): Parent object received focus" );
+ OSL_TRACE("AccessibleTextHelper_Impl::SetShapeFocus(): Parent object received focus" );
}
else
{
LostPropertyEvent( uno::makeAny(AccessibleStateType::FOCUSED), AccessibleEventId::STATE_CHANGED );
- DBG_TRACE("AccessibleTextHelper_Impl::SetShapeFocus(): Parent object lost focus" );
+ OSL_TRACE("AccessibleTextHelper_Impl::SetShapeFocus(): Parent object lost focus" );
}
}
}
@@ -524,7 +524,7 @@ namespace accessibility
SetShapeFocus( bHaveFocus );
}
- DBG_TRACE2("AccessibleTextHelper_Impl::SetFocus: focus changed, Object %d, state: %s", this, bHaveFocus ? "focused" : "not focused");
+ OSL_TRACE("AccessibleTextHelper_Impl::SetFocus: focus changed, Object %d, state: %s", this, bHaveFocus ? "focused" : "not focused");
}
sal_Bool AccessibleTextHelper_Impl::HaveFocus() SAL_THROW((::com::sun::star::uno::RuntimeException))
@@ -574,7 +574,7 @@ namespace accessibility
// #103998# Not that important, changed from assertion to trace
if( mbThisHasFocus )
{
- DBG_TRACE("AccessibleTextHelper_Impl::UpdateSelection(): Parent has focus!");
+ OSL_TRACE("AccessibleTextHelper_Impl::UpdateSelection(): Parent has focus!");
}
sal_uInt16 nMaxValidParaIndex( static_cast< sal_uInt16 >( GetTextForwarder().GetParagraphCount() ) - 1 );
@@ -599,7 +599,7 @@ namespace accessibility
ChangeChildFocus( aSelection.nEndPara );
- DBG_TRACE3("AccessibleTextHelper_Impl::UpdateSelection(): focus changed, Object: %d, Paragraph: %d, Last paragraph: %d",
+ OSL_TRACE("AccessibleTextHelper_Impl::UpdateSelection(): focus changed, Object: %d, Paragraph: %d, Last paragraph: %d",
this, aSelection.nEndPara, maLastSelection.nEndPara);
}
}
@@ -628,7 +628,7 @@ namespace accessibility
aOldCursor );
}
- DBG_TRACE5("AccessibleTextHelper_Impl::UpdateSelection(): caret changed, Object: %d, New pos: %d, Old pos: %d, New para: %d, Old para: %d",
+ OSL_TRACE("AccessibleTextHelper_Impl::UpdateSelection(): caret changed, Object: %d, New pos: %d, Old pos: %d, New para: %d, Old para: %d",
this, aSelection.nEndPos, maLastSelection.nEndPos, aSelection.nEndPara, maLastSelection.nEndPara);
// #108947# Sort new range before calling FireEvent
diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
index 29a5c7e79b23..c34702052013 100755
--- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
@@ -898,13 +898,13 @@ sal_Bool SAL_CALL SvxRectCtlChildAccessibleContext::isFocusTraversable() throw(
void SAL_CALL SvxRectCtlChildAccessibleContext::addFocusListener( const Reference< awt::XFocusListener >& /*xListener*/ )
throw( RuntimeException )
{
- OSL_ENSURE( false, "SvxRectCtlChildAccessibleContext::addFocusListener: not implemented" );
+ OSL_FAIL( "SvxRectCtlChildAccessibleContext::addFocusListener: not implemented" );
}
void SAL_CALL SvxRectCtlChildAccessibleContext::removeFocusListener( const Reference< awt::XFocusListener >& /*xListener*/ )
throw (RuntimeException)
{
- OSL_ENSURE( false, "SvxRectCtlChildAccessibleContext::removeFocusListener: not implemented" );
+ OSL_FAIL( "SvxRectCtlChildAccessibleContext::removeFocusListener: not implemented" );
}
void SAL_CALL SvxRectCtlChildAccessibleContext::grabFocus() throw( RuntimeException )
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 96f9e8341ad6..4a62898b3d8a 100755
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -1713,7 +1713,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm
{
ByteString aString( "CustomShapes::unknown PolyFlagValue :" );
aString.Append( ByteString::CreateFromInt32( nCommand ) );
- DBG_ERROR( aString.GetBuffer() );
+ OSL_FAIL( aString.GetBuffer() );
}
break;
#endif
diff --git a/svx/source/dialog/SpellDialogChildWindow.cxx b/svx/source/dialog/SpellDialogChildWindow.cxx
index 60c20b6da050..d41cf9d8f2f4 100755
--- a/svx/source/dialog/SpellDialogChildWindow.cxx
+++ b/svx/source/dialog/SpellDialogChildWindow.cxx
@@ -34,9 +34,7 @@
namespace svx {
-/*-------------------------------------------------------------------------
- -----------------------------------------------------------------------*/
SpellDialogChildWindow::SpellDialogChildWindow (
Window* _pParent,
sal_uInt16 nId,
@@ -55,39 +53,29 @@ SpellDialogChildWindow::SpellDialogChildWindow (
eChildAlignment = SFX_ALIGN_NOALIGNMENT;
SetHideNotDelete (sal_True);
}
-/*-------------------------------------------------------------------------
- -----------------------------------------------------------------------*/
SpellDialogChildWindow::~SpellDialogChildWindow (void)
{
}
-/*-------------------------------------------------------------------------
- -----------------------------------------------------------------------*/
SfxBindings& SpellDialogChildWindow::GetBindings (void) const
{
OSL_ASSERT (m_pAbstractSpellDialog != NULL);
return m_pAbstractSpellDialog->GetBindings();
}
-/*-------------------------------------------------------------------------
- -----------------------------------------------------------------------*/
void SpellDialogChildWindow::InvalidateSpellDialog()
{
OSL_ASSERT (m_pAbstractSpellDialog != NULL);
if(m_pAbstractSpellDialog)
m_pAbstractSpellDialog->Invalidate();
}
-/*-------------------------------------------------------------------------
- -----------------------------------------------------------------------*/
bool SpellDialogChildWindow::HasAutoCorrection()
{
return false;
}
-/*-------------------------------------------------------------------------
- -----------------------------------------------------------------------*/
void SpellDialogChildWindow::AddAutoCorrection(
const String& /*rOld*/,
const String& /*rNew*/,
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx
index 298f9c198a16..75d3a8dca672 100755
--- a/svx/source/dialog/rubydialog.cxx
+++ b/svx/source/dialog/rubydialog.cxx
@@ -202,9 +202,7 @@ void SvxRubyData_Impl::AssertOneEntry()
pValues[4].Name = C2U(cRubyCharStyleName);
}
}
-/* ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
SvxRubyDialog::SvxRubyDialog( SfxBindings *pBind, SfxChildWindow *pCW,
Window* _pParent, const ResId& rResId ) :
SfxModelessDialog( pBind, pCW, _pParent, rResId ),
diff --git a/svx/source/dialog/sdstring.src b/svx/source/dialog/sdstring.src
index ebc165173ee8..082f0dcbe7b2 100755
--- a/svx/source/dialog/sdstring.src
+++ b/svx/source/dialog/sdstring.src
@@ -1182,6 +1182,76 @@ String RID_SVXSTR_COLOR_USER
Text [ en-US ] = "User" ;
};
+String RID_SVXSTR_LIBRE_GREEN_1
+{
+ Text [ en-US ] = "Green 1 (LibreOffice Main Color)" ;
+};
+
+String RID_SVXSTR_LIBRE_GREEN_ACCENT
+{
+ Text [ en-US ] = "Green Accent" ;
+};
+
+String RID_SVXSTR_LIBRE_BLUE_ACCENT
+{
+ Text [ en-US ] = "Blue Accent" ;
+};
+
+String RID_SVXSTR_LIBRE_ORANGE_ACCENT
+{
+ Text [ en-US ] = "Orange Accent" ;
+};
+
+String RID_SVXSTR_LIBRE_PURPLE
+{
+ Text [ en-US ] = "Purple" ;
+};
+
+String RID_SVXSTR_LIBRE_PURPLE_ACCENT
+{
+ Text [ en-US ] = "Purple Accent" ;
+};
+
+String RID_SVXSTR_LIBRE_YELLOW_ACCENT
+{
+ Text [ en-US ] = "Yellow Accent" ;
+};
+
+String RID_SVXSTR_LIBRE_GREEN_1_DEF
+{
+ Text = "Green 1 (LibreOffice Main Color)" ;
+};
+
+String RID_SVXSTR_LIBRE_GREEN_ACCENT_DEF
+{
+ Text = "Green Accent" ;
+};
+
+String RID_SVXSTR_LIBRE_BLUE_ACCENT_DEF
+{
+ Text = "Blue Accent" ;
+};
+
+String RID_SVXSTR_LIBRE_ORANGE_ACCENT_DEF
+{
+ Text = "Orange Accent" ;
+};
+
+String RID_SVXSTR_LIBRE_PURPLE_DEF
+{
+ Text = "Purple" ;
+};
+
+String RID_SVXSTR_LIBRE_PURPLE_ACCENT_DEF
+{
+ Text = "Purple Accent" ;
+};
+
+String RID_SVXSTR_LIBRE_YELLOW_ACCENT_DEF
+{
+ Text = "Yellow Accent" ;
+};
+
String RID_SVXSTR_GALLERYPROPS_GALTHEME
{
Text [ en-US ] = "Gallery Theme" ;
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index aa4109f33809..1c6e978c1415 100755
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -1207,7 +1207,7 @@ void FmGridControl::DeleteSelectedRows()
}
catch(const Exception&)
{
- OSL_ENSURE(0,"Exception caught while deleting rows!");
+ OSL_FAIL("Exception caught while deleting rows!");
}
// An den DatenCursor anpassen
AdjustDataSource(sal_True);
@@ -2120,7 +2120,7 @@ void FmGridControl::KeyInput( const KeyEvent& rKEvt )
}
catch(const Exception&)
{
- OSL_ENSURE(0,"exception occurred while deleting a column");
+ OSL_FAIL("exception occurred while deleting a column");
}
}
}
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 138cda103bc9..35a15c082d49 100755
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -906,7 +906,7 @@ void DbCellControl::Init( Window& rParent, const Reference< XRowSet >& _rxCursor
case MouseWheelBehavior::SCROLL_FOCUS_ONLY: nVclSetting = MOUSE_WHEEL_FOCUS_ONLY; break;
case MouseWheelBehavior::SCROLL_ALWAYS: nVclSetting = MOUSE_WHEEL_ALWAYS; break;
default:
- OSL_ENSURE( false, "DbCellControl::Init: invalid MouseWheelBehavior!" );
+ OSL_FAIL( "DbCellControl::Init: invalid MouseWheelBehavior!" );
break;
}
@@ -3364,7 +3364,7 @@ void FmXGridCell::setLock(sal_Bool _bLock) throw( RuntimeException )
//------------------------------------------------------------------
void SAL_CALL FmXGridCell::setPosSize( ::sal_Int32 _XX, ::sal_Int32 _Y, ::sal_Int32 _Width, ::sal_Int32 _Height, ::sal_Int16 _Flags ) throw (RuntimeException)
{
- OSL_ENSURE( false, "FmXGridCell::setPosSize: not implemented" );
+ OSL_FAIL( "FmXGridCell::setPosSize: not implemented" );
(void)_XX;
(void)_Y;
(void)_Width;
@@ -3376,14 +3376,14 @@ void SAL_CALL FmXGridCell::setPosSize( ::sal_Int32 _XX, ::sal_Int32 _Y, ::sal_In
//------------------------------------------------------------------
awt::Rectangle SAL_CALL FmXGridCell::getPosSize( ) throw (RuntimeException)
{
- OSL_ENSURE( false, "FmXGridCell::getPosSize: not implemented" );
+ OSL_FAIL( "FmXGridCell::getPosSize: not implemented" );
return awt::Rectangle();
}
//------------------------------------------------------------------
void SAL_CALL FmXGridCell::setVisible( ::sal_Bool _Visible ) throw (RuntimeException)
{
- OSL_ENSURE( false, "FmXGridCell::setVisible: not implemented" );
+ OSL_FAIL( "FmXGridCell::setVisible: not implemented" );
(void)_Visible;
// not allowed to tamper with this for a grid cell
}
@@ -3391,7 +3391,7 @@ void SAL_CALL FmXGridCell::setVisible( ::sal_Bool _Visible ) throw (RuntimeExcep
//------------------------------------------------------------------
void SAL_CALL FmXGridCell::setEnable( ::sal_Bool _Enable ) throw (RuntimeException)
{
- OSL_ENSURE( false, "FmXGridCell::setEnable: not implemented" );
+ OSL_FAIL( "FmXGridCell::setEnable: not implemented" );
(void)_Enable;
// not allowed to tamper with this for a grid cell
}
@@ -3399,7 +3399,7 @@ void SAL_CALL FmXGridCell::setEnable( ::sal_Bool _Enable ) throw (RuntimeExcepti
//------------------------------------------------------------------
void SAL_CALL FmXGridCell::setFocus( ) throw (RuntimeException)
{
- OSL_ENSURE( false, "FmXGridCell::setFocus: not implemented" );
+ OSL_FAIL( "FmXGridCell::setFocus: not implemented" );
// not allowed to tamper with this for a grid cell
}
@@ -3466,14 +3466,14 @@ void SAL_CALL FmXGridCell::removeMouseMotionListener( const Reference< awt::XMou
//------------------------------------------------------------------
void SAL_CALL FmXGridCell::addPaintListener( const Reference< awt::XPaintListener >& _rxListener ) throw (RuntimeException)
{
- OSL_ENSURE( false, "FmXGridCell::addPaintListener: not implemented" );
+ OSL_FAIL( "FmXGridCell::addPaintListener: not implemented" );
(void)_rxListener;
}
//------------------------------------------------------------------
void SAL_CALL FmXGridCell::removePaintListener( const Reference< awt::XPaintListener >& _rxListener ) throw (RuntimeException)
{
- OSL_ENSURE( false, "FmXGridCell::removePaintListener: not implemented" );
+ OSL_FAIL( "FmXGridCell::removePaintListener: not implemented" );
(void)_rxListener;
}
diff --git a/svx/source/fmcomp/trace.cxx b/svx/source/fmcomp/trace.cxx
index f8b2af6fd753..09979f1a1400 100755
--- a/svx/source/fmcomp/trace.cxx
+++ b/svx/source/fmcomp/trace.cxx
@@ -58,7 +58,7 @@ Tracer::Tracer(const char* _pBlockDescription)
sMessage += sIndent;
sMessage += m_sBlockDescription;
sMessage += " {";
- DBG_TRACE(sMessage.GetBuffer());
+ OSL_TRACE(sMessage.GetBuffer());
}
//------------------------------------------------------------------------------
@@ -78,7 +78,7 @@ Tracer::~Tracer()
sMessage += sIndent;
sMessage += "} // ";
sMessage += m_sBlockDescription;
- DBG_TRACE(sMessage.GetBuffer());
+ OSL_TRACE(sMessage.GetBuffer());
}
//------------------------------------------------------------------------------
@@ -99,7 +99,7 @@ void Tracer::TraceString(const char* _pMessage)
sMessage += m_sBlockDescription;
sMessage += ": ";
sMessage += _pMessage;
- DBG_TRACE(sMessage.GetBuffer());
+ OSL_TRACE(sMessage.GetBuffer());
}
//------------------------------------------------------------------------------
@@ -120,7 +120,7 @@ void Tracer::TraceString1StringParam(const char* _pMessage, const char* _pParam)
sMessage += m_sBlockDescription;
sMessage += ": ";
sMessage += _pMessage;
- DBG_TRACE1(sMessage.GetBuffer(), _pParam);
+ OSL_TRACE(sMessage.GetBuffer(), _pParam);
}
#endif
diff --git a/svx/source/form/dataaccessdescriptor.cxx b/svx/source/form/dataaccessdescriptor.cxx
index 575481527996..0bfd01b0ad10 100755
--- a/svx/source/form/dataaccessdescriptor.cxx
+++ b/svx/source/form/dataaccessdescriptor.cxx
@@ -51,7 +51,6 @@ namespace svx
#define CONST_CHAR( propname ) propname, sizeof(propname) - 1
-#ifndef SVX_LIGHT
//====================================================================
//= ODADescriptorImpl
//====================================================================
@@ -325,67 +324,41 @@ namespace svx
// don't need to rebuild next time
m_bSetOutOfDate = sal_True;
}
-#endif
//====================================================================
//= ODataAccessDescriptor
//====================================================================
//--------------------------------------------------------------------
ODataAccessDescriptor::ODataAccessDescriptor()
-#ifndef SVX_LIGHT
:m_pImpl(new ODADescriptorImpl)
-#else
- :m_pImpl(NULL)
-#endif
{
}
//--------------------------------------------------------------------
ODataAccessDescriptor::ODataAccessDescriptor( const ODataAccessDescriptor& _rSource )
-#ifndef SVX_LIGHT
:m_pImpl(new ODADescriptorImpl(*_rSource.m_pImpl))
-#else
- :m_pImpl(NULL)
-#endif
{
}
//--------------------------------------------------------------------
const ODataAccessDescriptor& ODataAccessDescriptor::operator=(const ODataAccessDescriptor& _rSource)
{
-#ifndef SVX_LIGHT
delete m_pImpl;
m_pImpl = new ODADescriptorImpl(*_rSource.m_pImpl);
-#else
- OSL_ENSURE(sal_False, "ODataAccessDescriptor::operator=: not available in the SVX_LIGHT version!");
-#endif
return *this;
}
//--------------------------------------------------------------------
ODataAccessDescriptor::ODataAccessDescriptor( const Reference< XPropertySet >& _rValues )
-#ifndef SVX_LIGHT
:m_pImpl(new ODADescriptorImpl)
-#else
- :m_pImpl(NULL)
-#endif
{
-#ifndef SVX_LIGHT
m_pImpl->buildFrom(_rValues);
-#else
- OSL_ENSURE(sal_False, "ODataAccessDescriptor::ODataAccessDescriptor: not available in the SVX_LIGHT version!");
-#endif
}
//--------------------------------------------------------------------
ODataAccessDescriptor::ODataAccessDescriptor( const Any& _rValues )
-#ifndef SVX_LIGHT
:m_pImpl(new ODADescriptorImpl)
-#else
- :m_pImpl(NULL)
-#endif
{
-#ifndef SVX_LIGHT
// check if we know the format in the Any
Sequence< PropertyValue > aValues;
Reference< XPropertySet > xValues;
@@ -393,24 +366,13 @@ namespace svx
m_pImpl->buildFrom( aValues );
else if ( _rValues >>= xValues )
m_pImpl->buildFrom( xValues );
-#else
- OSL_ENSURE(sal_False, "ODataAccessDescriptor::ODataAccessDescriptor: not available in the SVX_LIGHT version!");
-#endif
}
//--------------------------------------------------------------------
ODataAccessDescriptor::ODataAccessDescriptor( const Sequence< PropertyValue >& _rValues )
-#ifndef SVX_LIGHT
:m_pImpl(new ODADescriptorImpl)
-#else
- :m_pImpl(NULL)
-#endif
{
-#ifndef SVX_LIGHT
m_pImpl->buildFrom(_rValues);
-#else
- OSL_ENSURE(sal_False, "ODataAccessDescriptor::ODataAccessDescriptor: not available in the SVX_LIGHT version!");
-#endif
}
//--------------------------------------------------------------------
@@ -422,35 +384,26 @@ namespace svx
//--------------------------------------------------------------------
void ODataAccessDescriptor::clear()
{
-#ifndef SVX_LIGHT
m_pImpl->m_aValues.clear();
-#endif
}
//--------------------------------------------------------------------
void ODataAccessDescriptor::erase(DataAccessDescriptorProperty _eWhich)
{
-#ifndef SVX_LIGHT
OSL_ENSURE(has(_eWhich), "ODataAccessDescriptor::erase: invalid call!");
if (has(_eWhich))
m_pImpl->m_aValues.erase(_eWhich);
-#endif
}
//--------------------------------------------------------------------
sal_Bool ODataAccessDescriptor::has(DataAccessDescriptorProperty _eWhich) const
{
-#ifndef SVX_LIGHT
return m_pImpl->m_aValues.find(_eWhich) != m_pImpl->m_aValues.end();
-#else
- return sal_False;
-#endif
}
//--------------------------------------------------------------------
const Any& ODataAccessDescriptor::operator [] ( DataAccessDescriptorProperty _eWhich ) const
{
-#ifndef SVX_LIGHT
if (!has(_eWhich))
{
OSL_ENSURE(sal_False, "ODataAccessDescriptor::operator[]: invalid acessor!");
@@ -459,58 +412,40 @@ namespace svx
}
return m_pImpl->m_aValues[_eWhich];
-#else
- static const Any aDummy;
- return aDummy;
-#endif
}
//--------------------------------------------------------------------
Any& ODataAccessDescriptor::operator[] ( DataAccessDescriptorProperty _eWhich )
{
-#ifndef SVX_LIGHT
m_pImpl->invalidateExternRepresentations();
return m_pImpl->m_aValues[_eWhich];
-#else
- static const Any aDummy;
- return aDummy;
-#endif
}
//--------------------------------------------------------------------
void ODataAccessDescriptor::initializeFrom(const Reference< XPropertySet >& _rxValues, sal_Bool _bClear)
{
-#ifndef SVX_LIGHT
if (_bClear)
clear();
m_pImpl->buildFrom(_rxValues);
-#endif
}
//--------------------------------------------------------------------
void ODataAccessDescriptor::initializeFrom(const Sequence< PropertyValue >& _rValues, sal_Bool _bClear)
{
-#ifndef SVX_LIGHT
if (_bClear)
clear();
m_pImpl->buildFrom(_rValues);
-#endif
}
//--------------------------------------------------------------------
Sequence< PropertyValue > ODataAccessDescriptor::createPropertyValueSequence()
{
-#ifndef SVX_LIGHT
m_pImpl->updateSequence();
return m_pImpl->m_aAsSequence;
-#else
- return Sequence< PropertyValue >();
-#endif
}
//--------------------------------------------------------------------
Sequence< Any > ODataAccessDescriptor::createAnySequence()
{
-#ifndef SVX_LIGHT
m_pImpl->updateSequence();
Sequence< Any > aRet(m_pImpl->m_aAsSequence.getLength());
const PropertyValue* pBegin = m_pImpl->m_aAsSequence.getConstArray();
@@ -518,39 +453,27 @@ namespace svx
for(sal_Int32 i=0;pBegin != pEnd;++pBegin,++i)
aRet[i] <<= *pBegin;
return aRet;
-#else
- return Sequence< createAnySequence >();
-#endif
}
//--------------------------------------------------------------------
Reference< XPropertySet > ODataAccessDescriptor::createPropertySet()
{
-#ifndef SVX_LIGHT
m_pImpl->updateSet();
return m_pImpl->m_xAsSet;
-#else
- return Reference< XPropertySet >();
-#endif
}
//--------------------------------------------------------------------
::rtl::OUString ODataAccessDescriptor::getDataSource() const
{
-#ifndef SVX_LIGHT
::rtl::OUString sDataSourceName;
if ( has(daDataSource) )
(*this)[daDataSource] >>= sDataSourceName;
else if ( has(daDatabaseLocation) )
(*this)[daDatabaseLocation] >>= sDataSourceName;
return sDataSourceName;
-#else
- return ::rtl::OUString();
-#endif
}
//--------------------------------------------------------------------
void ODataAccessDescriptor::setDataSource(const ::rtl::OUString& _sDataSourceNameOrLocation)
{
-#ifndef SVX_LIGHT
if ( _sDataSourceNameOrLocation.getLength() )
{
INetURLObject aURL(_sDataSourceNameOrLocation);
@@ -558,7 +481,6 @@ namespace svx
}
else
(*this)[ daDataSource ] <<= ::rtl::OUString();
-#endif
}
//........................................................................
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 6f6ecaeac42b..df4f2448342a 100755
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -755,12 +755,12 @@ namespace svxform
case MID_INSERT_CONTROL:
{
- OSL_ENSURE( false, "XFormsPage::DoToolboxAction: MID_INSERT_CONTROL not implemented, yet!" );
+ OSL_FAIL( "XFormsPage::DoToolboxAction: MID_INSERT_CONTROL not implemented, yet!" );
}
break;
default:
- OSL_ENSURE( false, "XFormsPage::DoToolboxAction: unknown ID!" );
+ OSL_FAIL( "XFormsPage::DoToolboxAction: unknown ID!" );
break;
}
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 6f6e714d7a32..1a9a2de3c636 100755
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -538,7 +538,7 @@ void SAL_CALL FmFilterAdapter::disjunctiveTermAdded( const FilterEvent& _Event )
bool bValidIndex = ( nInsertPos >= 0 ) && ( (size_t)nInsertPos <= pFormItem->GetChildren().size() );
if ( !bValidIndex )
{
- OSL_ENSURE( false, "FmFilterAdapter::disjunctiveTermAdded: invalid index!" );
+ OSL_FAIL( "FmFilterAdapter::disjunctiveTermAdded: invalid index!" );
return;
}
diff --git a/svx/source/form/fmcontrollayout.cxx b/svx/source/form/fmcontrollayout.cxx
index 5c590448b789..c49db3344f8a 100755
--- a/svx/source/form/fmcontrollayout.cxx
+++ b/svx/source/form/fmcontrollayout.cxx
@@ -163,7 +163,7 @@ namespace svxform
pCharLocalePropertyName = "CharLocaleComplex";
break;
default:
- OSL_ENSURE( false, "lcl_initializeControlFont: unexpected script type for system locale!" );
+ OSL_FAIL( "lcl_initializeControlFont: unexpected script type for system locale!" );
break;
}
diff --git a/svx/source/form/fmdocumentclassification.cxx b/svx/source/form/fmdocumentclassification.cxx
index 34083dae5108..f22d204f0cea 100755
--- a/svx/source/form/fmdocumentclassification.cxx
+++ b/svx/source/form/fmdocumentclassification.cxx
@@ -151,7 +151,7 @@ namespace svxform
}
// last: uhm, there is no last resort
- OSL_ENSURE( false, "DocumentClassification::classifyDocument: unknown document!" );
+ OSL_FAIL( "DocumentClassification::classifyDocument: unknown document!" );
}
catch( const Exception& )
{
diff --git a/svx/source/form/fmmodel.cxx b/svx/source/form/fmmodel.cxx
index 2dddaf0d7cb8..217e61f1df78 100755
--- a/svx/source/form/fmmodel.cxx
+++ b/svx/source/form/fmmodel.cxx
@@ -38,11 +38,7 @@
#include <svx/svdobj.hxx>
#include <tools/debug.hxx>
-#ifndef SVX_LIGHT
#include <sfx2/objsh.hxx>
-#else
-class SfxObjectShell;
-#endif
#include <boost/optional.hpp>
@@ -81,11 +77,9 @@ FmFormModel::FmFormModel(SfxItemPool* pPool, SfxObjectShell* pPers)
,m_bOpenInDesignMode(sal_False)
,m_bAutoControlFocus(sal_False)
{
-#ifndef SVX_LIGHT
m_pImpl = new FmFormModelImplData;
m_pImpl->pUndoEnv = new FmXUndoEnvironment(*this);
m_pImpl->pUndoEnv->acquire();
-#endif
}
/*************************************************************************
@@ -100,11 +94,9 @@ FmFormModel::FmFormModel(const XubString& rPath, SfxItemPool* pPool, SfxObjectSh
,m_bOpenInDesignMode(sal_False)
,m_bAutoControlFocus(sal_False)
{
-#ifndef SVX_LIGHT
m_pImpl = new FmFormModelImplData;
m_pImpl->pUndoEnv = new FmXUndoEnvironment(*this);
m_pImpl->pUndoEnv->acquire();
-#endif
}
/*************************************************************************
@@ -121,11 +113,9 @@ FmFormModel::FmFormModel(SfxItemPool* pPool, SfxObjectShell* pPers,
,m_bOpenInDesignMode(sal_False)
,m_bAutoControlFocus(sal_False)
{
-#ifndef SVX_LIGHT
m_pImpl = new FmFormModelImplData;
m_pImpl->pUndoEnv = new FmXUndoEnvironment(*this);
m_pImpl->pUndoEnv->acquire();
-#endif
}
/*************************************************************************
@@ -141,11 +131,9 @@ FmFormModel::FmFormModel(const XubString& rPath, SfxItemPool* pPool, SfxObjectSh
,m_bOpenInDesignMode(sal_False)
,m_bAutoControlFocus(sal_False)
{
-#ifndef SVX_LIGHT
m_pImpl = new FmFormModelImplData;
m_pImpl->pUndoEnv = new FmXUndoEnvironment(*this);
m_pImpl->pUndoEnv->acquire();
-#endif
}
/*************************************************************************
@@ -155,7 +143,6 @@ FmFormModel::FmFormModel(const XubString& rPath, SfxItemPool* pPool, SfxObjectSh
\************************************************************************/
FmFormModel::~FmFormModel()
{
-#ifndef SVX_LIGHT
if (m_pObjShell && m_pImpl->pUndoEnv->IsListening(*m_pObjShell))
SetObjectShell(NULL);
@@ -166,7 +153,6 @@ FmFormModel::~FmFormModel()
m_pImpl->pUndoEnv->release();
delete m_pImpl;
-#endif
}
/*************************************************************************
@@ -186,11 +172,9 @@ SdrPage* FmFormModel::AllocPage(bool bMasterPage)
\************************************************************************/
void FmFormModel::InsertPage(SdrPage* pPage, sal_uInt16 nPos)
{
-#ifndef SVX_LIGHT
// hack solange Methode intern
if (m_pObjShell && !m_pImpl->pUndoEnv->IsListening( *m_pObjShell ))
SetObjectShell(m_pObjShell);
-#endif
SdrModel::InsertPage( pPage, nPos );
}
@@ -202,16 +186,12 @@ void FmFormModel::InsertPage(SdrPage* pPage, sal_uInt16 nPos)
\************************************************************************/
void FmFormModel::MovePage( sal_uInt16 nPgNum, sal_uInt16 nNewPos )
{
-#ifndef SVX_LIGHT
m_pImpl->bMovingPage = sal_True;
// see InsertPage for this
-#endif
SdrModel::MovePage( nPgNum, nNewPos );
-#ifndef SVX_LIGHT
m_pImpl->bMovingPage = sal_False;
-#endif
}
/*************************************************************************
@@ -224,14 +204,12 @@ SdrPage* FmFormModel::RemovePage(sal_uInt16 nPgNum)
FmFormPage* pToBeRemovedPage = dynamic_cast< FmFormPage* >( GetPage( nPgNum ) );
OSL_ENSURE( pToBeRemovedPage, "FmFormModel::RemovePage: *which page*?" );
-#ifndef SVX_LIGHT
if ( pToBeRemovedPage )
{
Reference< XNameContainer > xForms( pToBeRemovedPage->GetForms( false ) );
if ( xForms.is() )
m_pImpl->pUndoEnv->RemoveForms( xForms );
}
-#endif
FmFormPage* pRemovedPage = (FmFormPage*)SdrModel::RemovePage(nPgNum);
OSL_ENSURE( pRemovedPage == pToBeRemovedPage, "FmFormModel::RemovePage: inconsistency!" );
@@ -245,11 +223,9 @@ SdrPage* FmFormModel::RemovePage(sal_uInt16 nPgNum)
\************************************************************************/
void FmFormModel::InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos)
{
-#ifndef SVX_LIGHT
// hack solange Methode intern
if (m_pObjShell && !m_pImpl->pUndoEnv->IsListening( *m_pObjShell ))
SetObjectShell(m_pObjShell);
-#endif
SdrModel::InsertMasterPage(pPage, nPos);
}
@@ -263,14 +239,12 @@ SdrPage* FmFormModel::RemoveMasterPage(sal_uInt16 nPgNum)
{
FmFormPage* pPage = (FmFormPage*)SdrModel::RemoveMasterPage(nPgNum);
-#ifndef SVX_LIGHT
if ( pPage )
{
Reference< XNameContainer > xForms( pPage->GetForms( false ) );
if ( xForms.is() )
m_pImpl->pUndoEnv->RemoveForms( xForms );
}
-#endif
return pPage;
}
@@ -298,18 +272,14 @@ void FmFormModel::implSetOpenInDesignMode( sal_Bool _bOpenDesignMode, sal_Bool _
//------------------------------------------------------------------------
void FmFormModel::SetOpenInDesignMode( sal_Bool bOpenDesignMode )
{
-#ifndef SVX_LIGHT
implSetOpenInDesignMode( bOpenDesignMode, sal_False );
-#endif
}
-#ifndef SVX_LIGHT
//------------------------------------------------------------------------
sal_Bool FmFormModel::OpenInDesignModeIsDefaulted( )
{
return m_pImpl->bOpenInDesignIsDefaulted;
}
-#endif
//------------------------------------------------------------------------
sal_Bool FmFormModel::ControlsUseRefDevice() const
@@ -327,19 +297,16 @@ sal_Bool FmFormModel::ControlsUseRefDevice() const
//------------------------------------------------------------------------
void FmFormModel::SetAutoControlFocus( sal_Bool _bAutoControlFocus )
{
-#ifndef SVX_LIGHT
if( _bAutoControlFocus != m_bAutoControlFocus )
{
m_bAutoControlFocus = _bAutoControlFocus;
m_pObjShell->SetModified( sal_True );
}
-#endif
}
//------------------------------------------------------------------------
void FmFormModel::SetObjectShell( SfxObjectShell* pShell )
{
-#ifndef SVX_LIGHT
if (pShell == m_pObjShell)
return;
@@ -360,7 +327,6 @@ void FmFormModel::SetObjectShell( SfxObjectShell* pShell )
m_pImpl->pUndoEnv->StartListening( *m_pObjShell );
}
-#endif
}
//------------------------------------------------------------------------
diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx
index 3887ec5f1a2d..f6c618151d88 100755
--- a/svx/source/form/fmpage.cxx
+++ b/svx/source/form/fmpage.cxx
@@ -38,36 +38,26 @@
#include <svx/fmmodel.hxx>
-#ifndef SVX_LIGHT
#include "fmobj.hxx"
-#endif
-#ifndef SVX_LIGHT
-#include "svx/fmresids.hrc"
-#endif
+#include <svx/fmresids.hrc>
#include <tools/shl.hxx>
#include <svx/dialmgr.hxx>
-#ifndef SVX_LIGHT
#include "fmpgeimp.hxx"
-#endif
-#ifndef SVX_LIGHT
#include <sfx2/objsh.hxx>
-#endif
-#include "svx/svditer.hxx"
+#include <svx/svditer.hxx>
#include <svx/svdview.hxx>
#include <tools/urlobj.hxx>
#include <vcl/help.hxx>
-#ifndef SVX_LIGHT
#include <svx/fmglob.hxx>
#include "fmprop.hrc"
#include "fmundo.hxx"
#include "svx/fmtools.hxx"
using namespace ::svxform;
-#endif
#include <comphelper/property.hxx>
#include <rtl/logfile.hxx>
@@ -81,11 +71,7 @@ TYPEINIT1(FmFormPage, SdrPage);
//------------------------------------------------------------------
FmFormPage::FmFormPage(FmFormModel& rModel, StarBASIC* _pBasic, bool bMasterPage)
:SdrPage(rModel, bMasterPage)
-#ifndef SVX_LIGHT
,m_pImpl( new FmFormPageImpl( *this ) )
-#else
- ,m_pImpl(NULL)
-#endif
,m_pBasic(_pBasic)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPage::FmFormPage" );
@@ -94,11 +80,7 @@ FmFormPage::FmFormPage(FmFormModel& rModel, StarBASIC* _pBasic, bool bMasterPage
//------------------------------------------------------------------
FmFormPage::FmFormPage(const FmFormPage& rPage)
:SdrPage(rPage)
-#ifndef SVX_LIGHT
,m_pImpl(new FmFormPageImpl( *this, rPage.GetImpl() ) )
-#else
- ,m_pImpl(NULL)
-#endif
,m_pBasic(0)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPage::FmFormPage" );
@@ -108,9 +90,7 @@ FmFormPage::FmFormPage(const FmFormPage& rPage)
//------------------------------------------------------------------
FmFormPage::~FmFormPage()
{
-#ifndef SVX_LIGHT
delete m_pImpl;
-#endif
}
//------------------------------------------------------------------
@@ -166,17 +146,14 @@ void FmFormPage::InsertObject(SdrObject* pObj, sal_uLong nPos,
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPage::InsertObject" );
SdrPage::InsertObject( pObj, nPos, pReason );
-#ifndef SVX_LIGHT
if (GetModel() && (!pReason || pReason->GetReason() != SDRREASON_STREAMING))
((FmFormModel*)GetModel())->GetUndoEnv().Inserted(pObj);
-#endif
}
//------------------------------------------------------------------
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > & FmFormPage::GetForms( bool _bForceCreate ) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPage::GetForms" );
-#ifndef SVX_LIGHT
const SdrPage& rMasterPage( *this );
const FmFormPage* pFormPage = dynamic_cast< const FmFormPage* >( &rMasterPage );
OSL_ENSURE( pFormPage, "FmFormPage::GetForms: referenced page is no FmFormPage - is this allowed?!" );
@@ -184,10 +161,6 @@ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContai
pFormPage = this;
return pFormPage->m_pImpl->getForms( _bForceCreate );
-#else
- static ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > aRef;
- return aRef;
-#endif
}
//------------------------------------------------------------------
@@ -195,7 +168,6 @@ sal_Bool FmFormPage::RequestHelp( Window* pWindow, SdrView* pView,
const HelpEvent& rEvt )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPage::RequestHelp" );
-#ifndef SVX_LIGHT
if( pView->IsAction() )
return sal_False;
@@ -255,7 +227,6 @@ sal_Bool FmFormPage::RequestHelp( Window* pWindow, SdrView* pView,
else
Help::ShowQuickHelp( pWindow, aItemRect, aHelpText );
}
-#endif
return sal_True;
}
@@ -264,10 +235,8 @@ SdrObject* FmFormPage::RemoveObject(sal_uLong nObjNum)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPage::RemoveObject" );
SdrObject* pObj = SdrPage::RemoveObject(nObjNum);
-#ifndef SVX_LIGHT
if (pObj && GetModel())
((FmFormModel*)GetModel())->GetUndoEnv().Removed(pObj);
-#endif
return pObj;
}
diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx
index 176d412028b5..a9e740d73baa 100755
--- a/svx/source/form/fmpgeimp.cxx
+++ b/svx/source/form/fmpgeimp.cxx
@@ -211,7 +211,7 @@ FmFormPageImpl::FmFormPageImpl( FmFormPage& _rPage, const FmFormPageImpl& rImpl
if ( bForeignIsForm != bOwnIsForm )
{
- OSL_ENSURE( false, "FmFormPageImpl::FmFormPageImpl: inconsistent ordering of objects!" );
+ OSL_FAIL( "FmFormPageImpl::FmFormPageImpl: inconsistent ordering of objects!" );
// don't attempt to do further assignments, something's completely messed up
break;
}
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index 78e4bf628b4f..42ef0bdcd361 100755
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -94,27 +94,6 @@
#include "svx/sdrobjectfilter.hxx"
-#define HANDLE_SQL_ERRORS( action, successflag, context, message ) \
- try \
- { \
- successflag = sal_False; \
- action; \
- successflag = sal_True; \
- } \
- catch(::com::sun::star::sdbc::SQLException& e) \
- { \
- ::com::sun::star::sdb::SQLContext eExtendedInfo = \
- GetImpl()->prependContextInfo(e, Reference< XInterface > (), context, ::rtl::OUString()); \
- displayException(eExtendedInfo); \
- } \
- catch(Exception&) \
- { \
- DBG_ERROR(message); \
- } \
-
-
-#define DO_SAFE_WITH_ERROR( action, message ) try { action; } catch(Exception&) { DBG_ERROR(message); }
-
#define FmFormShell
#include "svxslots.hxx"
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 2677a4d5fff2..cd5dcf70d983 100755
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -736,7 +736,7 @@ bool FmXFormShell::impl_checkDisposed() const
{
if ( !m_pShell )
{
- OSL_ENSURE( false, "FmXFormShell::impl_checkDisposed: already disposed!" );
+ OSL_FAIL( "FmXFormShell::impl_checkDisposed: already disposed!" );
return true;
}
return false;
@@ -2302,7 +2302,7 @@ IMPL_LINK(FmXFormShell, OnFoundData, FmFoundRecordInformation*, pfriWhere)
}
catch(const SQLException&)
{
- OSL_ENSURE(0,"Can position on bookmark!");
+ OSL_FAIL("Can position on bookmark!");
}
LoopGrids(GA_FORCE_SYNC);
@@ -2385,7 +2385,7 @@ IMPL_LINK(FmXFormShell, OnCanceledNotFound, FmFoundRecordInformation*, pfriWhere
}
catch(const SQLException&)
{
- OSL_ENSURE(0,"Can position on bookmark!");
+ OSL_FAIL("Can position on bookmark!");
}
diff --git a/svx/source/form/fmsrccfg.cxx b/svx/source/form/fmsrccfg.cxx
index b1a17c80cca7..2d286c00376b 100755
--- a/svx/source/form/fmsrccfg.cxx
+++ b/svx/source/form/fmsrccfg.cxx
@@ -143,7 +143,7 @@ namespace svxform
++pSearch;
}
- DBG_ERROR(
+ OSL_FAIL(
( ::rtl::OString( "lcl_implMapAsciiValue: could not convert the ascii value " )
+= ::rtl::OString( _rAsciiValue.getStr(), _rAsciiValue.getLength(), RTL_TEXTENCODING_ASCII_US )
+= ::rtl::OString( " !" )
@@ -164,7 +164,7 @@ namespace svxform
++pSearch;
}
- DBG_ERROR(
+ OSL_FAIL(
( ::rtl::OString( "lcl_implMapIntValue: could not convert the integer value " )
+= ::rtl::OString::valueOf( (sal_Int32)_nValue )
+= ::rtl::OString( " !" )
diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx
index 2189330515ab..8a2333d9b90f 100755
--- a/svx/source/form/fmsrcimp.cxx
+++ b/svx/source/form/fmsrcimp.cxx
@@ -255,7 +255,7 @@ sal_Bool FmSearchEngine::MoveCursor()
sDebugMessage.AssignAscii("FmSearchEngine::MoveCursor : catched a DatabaseException (");
sDebugMessage += (const sal_Unicode*)e.SQLState;
sDebugMessage.AppendAscii(") !");
- DBG_ERROR(ByteString(sDebugMessage, RTL_TEXTENCODING_ASCII_US).GetBuffer());
+ OSL_FAIL(ByteString(sDebugMessage, RTL_TEXTENCODING_ASCII_US).GetBuffer());
#endif
bSuccess = sal_False;
}
@@ -266,7 +266,7 @@ sal_Bool FmSearchEngine::MoveCursor()
sDebugMessage.AssignAscii("FmSearchEngine::MoveCursor : catched an Exception (");
sDebugMessage += (const sal_Unicode*)e.Message;
sDebugMessage.AppendAscii(") !");
- DBG_ERROR(ByteString(sDebugMessage, RTL_TEXTENCODING_ASCII_US).GetBuffer());
+ OSL_FAIL(ByteString(sDebugMessage, RTL_TEXTENCODING_ASCII_US).GetBuffer());
#endif
bSuccess = sal_False;
}
diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx
index 4ae0ad72dadb..1b45aca85ae9 100755
--- a/svx/source/form/fmtextcontrolshell.cxx
+++ b/svx/source/form/fmtextcontrolshell.cxx
@@ -478,7 +478,7 @@ namespace svx
sMessage += "(slot id: ";
sMessage += ::rtl::OString::valueOf( (sal_Int32)_nSlotId );
sMessage += ")";
- DBG_ERROR( sMessage );
+ OSL_FAIL( sMessage.getStr() );
}
#endif
return sSlotUnoName;
@@ -584,7 +584,7 @@ namespace svx
{
if ( m_bNeedClipboardInvalidation )
{
- DBG_TRACE( "FmTextControlShell::ClipBoard: invalidating clipboard slots" );
+ OSL_TRACE( "FmTextControlShell::ClipBoard: invalidating clipboard slots" );
m_rBindings.Invalidate( SID_CUT );
m_rBindings.Invalidate( SID_COPY );
m_rBindings.Invalidate( SID_PASTE );
@@ -648,7 +648,7 @@ namespace svx
sMessage += sUnoSlotNameAscii;
if ( !bFeatureIsEnabled )
sMessage += " (disabled)";
- DBG_TRACE( sMessage );
+ OSL_TRACE( "%s", sMessage.getStr() );
#endif
lcl_translateUnoStateToItem( nSlotId, aFeature->second->getFeatureState(), _rSet );
@@ -659,7 +659,7 @@ namespace svx
::rtl::OString sMessage( "FmTextControlShell::transferFeatureStatesToItemSet: found a feature state for " );
sMessage += sUnoSlotNameAscii;
sMessage += ", but could not translate it into an item!";
- DBG_TRACE( sMessage );
+ OSL_TRACE( "%s", sMessage.getStr() );
}
#endif
}
@@ -765,7 +765,7 @@ namespace svx
sError += ::rtl::OString( sUnoSlotName.getStr(), sUnoSlotName.getLength(), RTL_TEXTENCODING_ASCII_US );
else
sError += "unknown (no SfxSlot)";
- DBG_ERROR( sError.getStr() );
+ OSL_FAIL( sError.getStr() );
}
#endif
}
@@ -993,7 +993,7 @@ namespace svx
bNeedSelection = true;
bNeedTextComponent = true;
bNeedWriteableControl = true;
- DBG_TRACE( "FmTextControlShell::ClipBoard: need to invalidate again" );
+ OSL_TRACE( "FmTextControlShell::ClipBoard: need to invalidate again" );
m_bNeedClipboardInvalidation = true;
break;
@@ -1079,7 +1079,7 @@ namespace svx
#if OSL_DEBUG_LEVEL > 0
::rtl::OString sTrace( "FmTextControlShell::formActivated: 0x" );
sTrace += ::rtl::OString::valueOf( (sal_IntPtr)_rxController.get(), 16 );
- DBG_TRACE( sTrace );
+ OSL_TRACE( "%s", sTrace.getStr() );
#endif
DBG_ASSERT( _rxController.is(), "FmTextControlShell::formActivated: invalid controller!" );
@@ -1107,7 +1107,7 @@ namespace svx
#if OSL_DEBUG_LEVEL > 0
::rtl::OString sTrace( "FmTextControlShell::formDeactivated: 0x" );
sTrace += ::rtl::OString::valueOf( (sal_IntPtr)_rxController.get(), 16 );
- DBG_TRACE( sTrace );
+ OSL_TRACE( "%s", sTrace.getStr() );
#endif
(void)_rxController;
@@ -1193,7 +1193,7 @@ namespace svx
if ( m_xActiveTextComponent.is() )
{
- DBG_TRACE( "FmTextControlShell::ClipBoard: stopping timer for clipboard invalidation" );
+ OSL_TRACE( "FmTextControlShell::ClipBoard: stopping timer for clipboard invalidation" );
m_aClipboardInvalidation.Stop();
}
// no more active control
@@ -1258,7 +1258,7 @@ namespace svx
if ( m_xActiveTextComponent.is() )
{
- DBG_TRACE( "FmTextControlShell::ClipBoard: starting timer for clipboard invalidation" );
+ OSL_TRACE( "FmTextControlShell::ClipBoard: starting timer for clipboard invalidation" );
m_aClipboardInvalidation.Start();
}
@@ -1360,7 +1360,7 @@ namespace svx
#if OSL_DEBUG_LEVEL > 0
::rtl::OString sTrace( "FmTextControlShell::focusGained: 0x" );
sTrace += ::rtl::OString::valueOf( (sal_IntPtr)xControl.get(), 16 );
- DBG_TRACE( sTrace );
+ OSL_TRACE( "%s", sTrace.getStr() );
#endif
DBG_ASSERT( xControl.is(), "FmTextControlShell::focusGained: suspicious focus event!" );
@@ -1376,7 +1376,7 @@ namespace svx
#if OSL_DEBUG_LEVEL > 0
::rtl::OString sTrace( "FmTextControlShell::focusLost: 0x" );
sTrace += ::rtl::OString::valueOf( (sal_IntPtr)xControl.get(), 16 );
- DBG_TRACE( sTrace );
+ OSL_TRACE( "%s", sTrace.getStr() );
#endif
m_bActiveControl = false;
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index 43f9bd2fa068..8bbacd5b0a8e 100755
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -1638,7 +1638,7 @@ bool FmXFormView::createControlLabelPair( const ::comphelper::ComponentContext&
if ( xControlPropInfo->hasPropertyByName( FM_PROP_LABEL ) )
xControlSet->setPropertyValue( FM_PROP_LABEL, makeAny( sFieldName + _rFieldPostfix ) );
else
- OSL_ENSURE( false, "FmXFormView::createControlLabelPair: can't set a label for the control!" );
+ OSL_FAIL( "FmXFormView::createControlLabelPair: can't set a label for the control!" );
}
}
diff --git a/svx/source/form/formcontrolling.cxx b/svx/source/form/formcontrolling.cxx
index b76213fe84b7..197de8ccbee2 100755
--- a/svx/source/form/formcontrolling.cxx
+++ b/svx/source/form/formcontrolling.cxx
@@ -469,7 +469,7 @@ namespace svx
else if ( aError.hasValue() )
displayException( aError );
else
- OSL_ENSURE( false, "FormControllerHelper::impl_operateForm_nothrow: no success, but no error?" );
+ OSL_FAIL( "FormControllerHelper::impl_operateForm_nothrow: no success, but no error?" );
return false;
}
diff --git a/svx/source/items/algitem.cxx b/svx/source/items/algitem.cxx
index 57e70e49dd49..3f8adaacd408 100755
--- a/svx/source/items/algitem.cxx
+++ b/svx/source/items/algitem.cxx
@@ -255,7 +255,6 @@ SfxItemPresentation SvxMarginItem::GetPresentation
XubString& rText, const IntlWrapper *pIntl
) const
{
-#ifndef SVX_LIGHT
switch ( ePres )
{
case SFX_ITEM_PRESENTATION_NONE:
@@ -293,7 +292,6 @@ SfxItemPresentation SvxMarginItem::GetPresentation
}
default: ; //prevent warning
}
-#endif
return SFX_ITEM_PRESENTATION_NONE;
}
diff --git a/svx/source/sdr/contact/viewcontactofe3dscene.cxx b/svx/source/sdr/contact/viewcontactofe3dscene.cxx
index 4040abc5adca..13256264aeca 100755
--- a/svx/source/sdr/contact/viewcontactofe3dscene.cxx
+++ b/svx/source/sdr/contact/viewcontactofe3dscene.cxx
@@ -386,7 +386,7 @@ namespace sdr
{
// empty scene, no 3d action should be necessary. Prepare some
// fallback size
- OSL_ENSURE(false, "No need to get ViewInformation3D from an empty scene (!)");
+ OSL_FAIL("No need to get ViewInformation3D from an empty scene (!)");
aContentRange.expand(basegfx::B3DPoint(-100.0, -100.0, -100.0));
aContentRange.expand(basegfx::B3DPoint( 100.0, 100.0, 100.0));
}
diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
index fb08e2322073..46a8d4611021 100755
--- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
@@ -69,7 +69,7 @@ namespace sdr
if(!nPointCount)
{
- OSL_ENSURE(false, "PolyPolygon object without geometry detected, this should not be created (!)");
+ OSL_FAIL("PolyPolygon object without geometry detected, this should not be created (!)");
basegfx::B2DPolygon aFallbackLine;
aFallbackLine.append(basegfx::B2DPoint(0.0, 0.0));
aFallbackLine.append(basegfx::B2DPoint(1000.0, 1000.0));
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index 5125dabd1e3e..5bbe1082cbc4 100755
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -197,7 +197,7 @@ namespace sdr { namespace contact {
m_xControlView.set( m_xControl, UNO_QUERY );
if ( !m_xControlWindow.is() || !m_xControlView.is() )
{
- OSL_ENSURE( false, "ControlHolder::operator=: invalid XControl, missing required interfaces!" );
+ OSL_FAIL( "ControlHolder::operator=: invalid XControl, missing required interfaces!" );
clear();
}
}
@@ -1063,7 +1063,7 @@ namespace sdr { namespace contact {
UnoControlContactHelper::adjustControlGeometry_throw( m_aControl, pUnoObject->GetLogicRect(), _rViewTransformation, m_aZoomLevelNormalization );
}
else
- OSL_ENSURE( false, "ViewObjectContactOfUnoControl_Impl::positionAndZoomControl: no SdrUnoObj!" );
+ OSL_FAIL( "ViewObjectContactOfUnoControl_Impl::positionAndZoomControl: no SdrUnoObj!" );
}
catch( const Exception& )
{
@@ -1143,7 +1143,7 @@ namespace sdr { namespace contact {
{
if ( m_bCreatingControl )
{
- OSL_ENSURE( false, "ViewObjectContactOfUnoControl_Impl::impl_ensureControl_nothrow: reentrance is not really good here!" );
+ OSL_FAIL( "ViewObjectContactOfUnoControl_Impl::impl_ensureControl_nothrow: reentrance is not really good here!" );
// We once had a situation where this was called reentrantly, which lead to all kind of strange effects. All
// those affected the grid control, which is the only control so far which is visible in design mode (and
// not only in alive mode).
diff --git a/svx/source/sdr/overlay/overlayobject.cxx b/svx/source/sdr/overlay/overlayobject.cxx
index 780c85c480e5..076c2d83f875 100755
--- a/svx/source/sdr/overlay/overlayobject.cxx
+++ b/svx/source/sdr/overlay/overlayobject.cxx
@@ -73,7 +73,7 @@ namespace sdr
// Default implementation has to assert a missing implementation. It cannot
// be useful to have overlay object derivations which have no visualisation
// at all
- OSL_ENSURE(false, "OverlayObject derivation without visualisation definition (missing createOverlayObjectPrimitive2DSequence implementation) (!)");
+ OSL_FAIL("OverlayObject derivation without visualisation definition (missing createOverlayObjectPrimitive2DSequence implementation) (!)");
return drawinglayer::primitive2d::Primitive2DSequence();
}
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index 8aa08a1aa7da..8849ca59958b 100755
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -299,12 +299,8 @@ void SdrCreateView::TakeActionRect(Rectangle& rRect) const
sal_Bool SdrCreateView::CheckEdgeMode()
{
- sal_uInt32 nInv=nAktInvent;
- sal_uInt16 nIdn=nAktIdent;
if (pAktCreate!=NULL)
{
- nInv=pAktCreate->GetObjInventor();
- nIdn=pAktCreate->GetObjIdentifier();
// wird vom EdgeObj gemanaged
if (nAktInvent==SdrInventor && nAktIdent==OBJ_EDGE) return sal_False;
}
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index ed9d575d62bc..304915de299f 100755
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -986,7 +986,7 @@ void SdrEditView::CopyMarkedObj()
}
aStr += " Objektverbindungen werden nicht mitkopiert.";
- DBG_ERROR(aStr.GetBuffer());
+ OSL_FAIL(aStr.GetBuffer());
#endif
}
MarkListHasChanged();
diff --git a/svx/source/svdraw/svditer.cxx b/svx/source/svdraw/svditer.cxx
index 14a7e11adee0..efb55c74f4c3 100755
--- a/svx/source/svdraw/svditer.cxx
+++ b/svx/source/svdraw/svditer.cxx
@@ -37,46 +37,42 @@
// #99190#
#include <svx/scene3d.hxx>
-SdrObjListIter::SdrObjListIter(const SdrObjList& rObjList, SdrIterMode eMode, sal_Bool bReverse)
-: maObjList(1024, 64, 64),
- mnIndex(0L),
+SdrObjListIter::SdrObjListIter(const SdrObjList& rObjList, SdrIterMode eMode, bool bReverse)
+: mnIndex(0L),
mbReverse(bReverse)
{
- ImpProcessObjectList(rObjList, eMode, sal_True);
+ ImpProcessObjectList(rObjList, eMode, true);
Reset();
}
-SdrObjListIter::SdrObjListIter(const SdrObjList& rObjList, sal_Bool bUseZOrder, SdrIterMode eMode, sal_Bool bReverse)
-: maObjList(1024, 64, 64),
- mnIndex(0L),
+SdrObjListIter::SdrObjListIter(const SdrObjList& rObjList, bool bUseZOrder, SdrIterMode eMode, bool bReverse)
+: mnIndex(0L),
mbReverse(bReverse)
{
ImpProcessObjectList(rObjList, eMode, bUseZOrder);
Reset();
}
-SdrObjListIter::SdrObjListIter( const SdrObject& rObj, SdrIterMode eMode, sal_Bool bReverse )
-: maObjList(1024, 64, 64),
- mnIndex(0L),
+SdrObjListIter::SdrObjListIter( const SdrObject& rObj, SdrIterMode eMode, bool bReverse )
+: mnIndex(0L),
mbReverse(bReverse)
{
if ( rObj.ISA( SdrObjGroup ) )
- ImpProcessObjectList(*rObj.GetSubList(), eMode, sal_True);
+ ImpProcessObjectList(*rObj.GetSubList(), eMode, true);
else
- maObjList.Insert( (void*)&rObj, LIST_APPEND );
+ maObjList.push_back(const_cast<SdrObject*>(&rObj));
Reset();
}
-SdrObjListIter::SdrObjListIter( const SdrMarkList& rMarkList, SdrIterMode eMode, sal_Bool bReverse )
-: maObjList(1024, 64, 64),
- mnIndex(0L),
+SdrObjListIter::SdrObjListIter( const SdrMarkList& rMarkList, SdrIterMode eMode, bool bReverse )
+: mnIndex(0L),
mbReverse(bReverse)
{
ImpProcessMarkList(rMarkList, eMode);
Reset();
}
-void SdrObjListIter::ImpProcessObjectList(const SdrObjList& rObjList, SdrIterMode eMode, sal_Bool bUseZOrder)
+void SdrObjListIter::ImpProcessObjectList(const SdrObjList& rObjList, SdrIterMode eMode, bool bUseZOrder)
{
for( sal_uIntPtr nIdx = 0, nCount = rObjList.GetObjCount(); nIdx < nCount; ++nIdx )
{
@@ -92,10 +88,10 @@ void SdrObjListIter::ImpProcessMarkList( const SdrMarkList& rMarkList, SdrIterMo
{
for( sal_uIntPtr nIdx = 0, nCount = rMarkList.GetMarkCount(); nIdx < nCount; ++nIdx )
if( SdrObject* pObj = rMarkList.GetMark( nIdx )->GetMarkedSdrObj() )
- ImpProcessObj( pObj, eMode, sal_False );
+ ImpProcessObj( pObj, eMode, false );
}
-void SdrObjListIter::ImpProcessObj(SdrObject* pObj, SdrIterMode eMode, sal_Bool bUseZOrder)
+void SdrObjListIter::ImpProcessObj(SdrObject* pObj, SdrIterMode eMode, bool bUseZOrder)
{
bool bIsGroup = pObj->IsGroupObject();
// #99190# 3D objects are no group objects, IsGroupObject()
@@ -104,7 +100,7 @@ void SdrObjListIter::ImpProcessObj(SdrObject* pObj, SdrIterMode eMode, sal_Bool
bIsGroup = false;
if( !bIsGroup || (eMode != IM_DEEPNOGROUPS) )
- maObjList.Insert( pObj, LIST_APPEND );
+ maObjList.push_back(pObj);
if( bIsGroup && (eMode != IM_FLAT) )
ImpProcessObjectList( *pObj->GetSubList(), eMode, bUseZOrder );
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 0aa0febe0da4..5857a75d1b11 100755
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -313,7 +313,7 @@ SdrModel::~SdrModel()
aStr += ByteString(pAktUndoGroup->GetComment(), gsl_getSystemTextEncoding());
aStr += '\"';
- DBG_ERROR(aStr.GetBuffer());
+ OSL_FAIL(aStr.GetBuffer());
}
#endif
if (pAktUndoGroup!=NULL)
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index bf5eacc5906a..7be4672902d4 100755
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -974,7 +974,7 @@ sal_Bool SdrOle2Obj::UpdateLinkURL_Impl()
catch( ::com::sun::star::uno::Exception& e )
{
(void)e;
- DBG_ERROR(
+ OSL_FAIL(
(OString("SdrOle2Obj::UpdateLinkURL_Impl(), "
"exception caught: ") +
rtl::OUStringToOString(
@@ -1017,7 +1017,7 @@ void SdrOle2Obj::BreakFileLink_Impl()
catch( ::com::sun::star::uno::Exception& e )
{
(void)e;
- DBG_ERROR(
+ OSL_FAIL(
(OString("SdrOle2Obj::BreakFileLink_Impl(), "
"exception caught: ") +
rtl::OUStringToOString(
@@ -1069,7 +1069,7 @@ void SdrOle2Obj::CheckFileLink_Impl()
catch( ::com::sun::star::uno::Exception& e )
{
(void)e;
- DBG_ERROR(
+ OSL_FAIL(
(OString("SdrOle2Obj::CheckFileLink_Impl(), "
"exception caught: ") +
rtl::OUStringToOString(
@@ -1154,7 +1154,7 @@ void SdrOle2Obj::Connect_Impl()
catch( ::com::sun::star::uno::Exception& e )
{
(void)e;
- DBG_ERROR(
+ OSL_FAIL(
(OString("SdrOle2Obj::Connect_Impl(), "
"exception caught: ") +
rtl::OUStringToOString(
@@ -1242,7 +1242,7 @@ void SdrOle2Obj::RemoveListeners_Impl()
catch( ::com::sun::star::uno::Exception& e )
{
(void)e;
- DBG_ERROR(
+ OSL_FAIL(
(OString("SdrOle2Obj::RemoveListeners_Impl(), "
"exception caught: ") +
rtl::OUStringToOString(
@@ -1325,7 +1325,7 @@ void SdrOle2Obj::Disconnect_Impl()
catch( ::com::sun::star::uno::Exception& e )
{
(void)e;
- DBG_ERROR(
+ OSL_FAIL(
(OString("SdrOle2Obj::Disconnect_Impl(), "
"exception caught: ") +
rtl::OUStringToOString(
@@ -1383,7 +1383,7 @@ void SdrOle2Obj::SetModel(SdrModel* pNewModel)
catch( ::com::sun::star::uno::Exception& e )
{
(void)e;
- DBG_ERROR(
+ OSL_FAIL(
(OString("SdrOle2Obj::SetModel(), "
"exception caught: ") +
rtl::OUStringToOString(
@@ -1959,7 +1959,7 @@ sal_Bool SdrOle2Obj::Unload( const uno::Reference< embed::XEmbeddedObject >& xOb
catch( ::com::sun::star::uno::Exception& e )
{
(void)e;
- DBG_ERROR(
+ OSL_FAIL(
(OString("SdrOle2Obj::Unload=(), "
"exception caught: ") +
rtl::OUStringToOString(
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index 65db1d27db58..0361f9b98bd5 100755
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -2036,7 +2036,7 @@ SdrHdl* SdrPathObj::GetHdl(sal_uInt32 nHdlNum) const
{
// #i73248#
// Warn the user that this is ineffective and show alternatives. Should not be used at all.
- OSL_ENSURE(false, "SdrPathObj::GetHdl(): ineffective, use AddToHdlList instead (!)");
+ OSL_FAIL("SdrPathObj::GetHdl(): ineffective, use AddToHdlList instead (!)");
// to have an alternative, get single handle using the ineffective way
SdrHdl* pRetval = 0;
diff --git a/svx/source/svdraw/svdotxln.cxx b/svx/source/svdraw/svdotxln.cxx
index ac9476f8f428..d287bf04d77f 100755
--- a/svx/source/svdraw/svdotxln.cxx
+++ b/svx/source/svdraw/svdotxln.cxx
@@ -46,7 +46,6 @@
// #90477#
#include <tools/tenccvt.hxx>
-#ifndef SVX_LIGHT
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// @@@@ @@@@@ @@@@@@ @@@@@@ @@@@@@ @@ @@ @@@@@@ @@ @@ @@ @@ @@ @@
@@ -127,7 +126,6 @@ void ImpSdrObjTextLink::DataChanged( const String& /*rMimeType*/,
if (pSdrObj )
pSdrObj->ReloadLinkedText( bForceReload );
}
-#endif // SVX_LIGHT
////////////////////////////////////////////////////////////////////////////////////////////////////
//
@@ -151,9 +149,7 @@ ImpSdrObjTextLinkUserData::ImpSdrObjTextLinkUserData(SdrTextObj* pObj1):
ImpSdrObjTextLinkUserData::~ImpSdrObjTextLinkUserData()
{
-#ifndef SVX_LIGHT
delete pLink;
-#endif
}
SdrObjUserData* ImpSdrObjTextLinkUserData::Clone(SdrObject* pObj1) const
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 9857360ba62c..3b13fb9981f8 100755
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -242,7 +242,7 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
aStr += " Objektverbindungen werden nicht mitkopiert.";
- DBG_ERROR(aStr.GetBuffer());
+ OSL_FAIL(aStr.GetBuffer());
#endif
}
}
diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx
index c87a32f7d4d5..b78d10084ebe 100755
--- a/svx/source/svdraw/svdpagv.cxx
+++ b/svx/source/svdraw/svdpagv.cxx
@@ -451,7 +451,7 @@ void SdrPageView::DrawLayer(SdrLayerID nID, OutputDevice* pGivenTarget, sdr::con
}
else
{
- OSL_ENSURE(false, "SdrPageView::DrawLayer: Creating temporary SdrPageWindow (ObjectContact), this should never be needed (!)");
+ OSL_FAIL("SdrPageView::DrawLayer: Creating temporary SdrPageWindow (ObjectContact), this should never be needed (!)");
// None of the known OutputDevices is the target of this paint, use
// a temporary SdrPageWindow for this Redraw.
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index a28ca620205f..8ed0b81da33e 100755
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -1104,13 +1104,11 @@ Pointer SdrView::GetPreferedPointer(const Point& rMousePos, const OutputDevice*
// Sind 3D-Objekte selektiert?
sal_Bool b3DObjSelected = sal_False;
-#ifndef SVX_LIGHT
for (sal_uInt32 a=0; !b3DObjSelected && a<GetMarkedObjectCount(); a++) {
SdrObject* pObj = GetMarkedObjectByIndex(a);
if(pObj && pObj->ISA(E3dObject))
b3DObjSelected = sal_True;
}
-#endif
// Falls es um ein 3D-Objekt geht, muss trotz !IsShearAllowed
// weitergemacht werden, da es sich um eine Rotation statt um
// einen Shear handelt
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index a7b0c6dd36d7..d2abe39e9505 100755
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -463,7 +463,7 @@ sal_Bool SdrExchangeView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjL
aStr += " Objektverbindungen werden nicht mitkopiert.";
- DBG_ERROR(aStr.GetBuffer());
+ OSL_FAIL(aStr.GetBuffer());
#endif
}
}
@@ -849,7 +849,7 @@ SdrModel* SdrExchangeView::GetMarkedObjModel() const
aStr += " Objektverbindungen werden nicht mitkopiert.";
- DBG_ERROR(aStr.GetBuffer());
+ OSL_FAIL(aStr.GetBuffer());
#endif
}
}
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 09dc0f2beec0..b746de8aa849 100755
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -2452,7 +2452,7 @@ SdrHdl* SdrTableObj::GetHdl(sal_uInt32 nHdlNum) const
{
// #i73248#
// Warn the user that this is ineffective and show alternatives. Should not be used at all.
- OSL_ENSURE(false, "SdrTableObj::GetHdl(): ineffective, use AddToHdlList instead (!)");
+ OSL_FAIL("SdrTableObj::GetHdl(): ineffective, use AddToHdlList instead (!)");
// to have an alternative, get single handle using the ineffective way
SdrHdl* pRetval = 0;
diff --git a/svx/source/table/tabledesign.cxx b/svx/source/table/tabledesign.cxx
index 934f59f811ee..eee5a7c2c929 100755
--- a/svx/source/table/tabledesign.cxx
+++ b/svx/source/table/tabledesign.cxx
@@ -743,7 +743,7 @@ void SAL_CALL TableDesignFamily::removeEventListener( const Reference< XEventLis
Reference<XPropertySetInfo> TableDesignFamily::getPropertySetInfo() throw (RuntimeException)
{
- OSL_ENSURE( 0, "###unexpected!" );
+ OSL_FAIL( "###unexpected!" );
return Reference<XPropertySetInfo>();
}
@@ -751,7 +751,7 @@ Reference<XPropertySetInfo> TableDesignFamily::getPropertySetInfo() throw (Runti
void TableDesignFamily::setPropertyValue( const OUString& , const Any& ) throw (UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException)
{
- OSL_ENSURE( 0, "###unexpected!" );
+ OSL_FAIL( "###unexpected!" );
}
// ----------------------------------------------------------
@@ -773,28 +773,28 @@ Any TableDesignFamily::getPropertyValue( const OUString& PropertyName ) throw (U
void TableDesignFamily::addPropertyChangeListener( const OUString& , const Reference<XPropertyChangeListener>& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
{
- OSL_ENSURE( 0, "###unexpected!" );
+ OSL_FAIL( "###unexpected!" );
}
// ----------------------------------------------------------
void TableDesignFamily::removePropertyChangeListener( const OUString& , const Reference<XPropertyChangeListener>& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
{
- OSL_ENSURE( 0, "###unexpected!" );
+ OSL_FAIL( "###unexpected!" );
}
// ----------------------------------------------------------
void TableDesignFamily::addVetoableChangeListener( const OUString& , const Reference<XVetoableChangeListener>& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
{
- OSL_ENSURE( 0, "###unexpected!" );
+ OSL_FAIL( "###unexpected!" );
}
// ----------------------------------------------------------
void TableDesignFamily::removeVetoableChangeListener( const OUString& , const Reference<XVetoableChangeListener>& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
{
- OSL_ENSURE( 0, "###unexpected!" );
+ OSL_FAIL( "###unexpected!" );
}
// --------------------------------------------------------------------
diff --git a/svx/source/table/tablehandles.cxx b/svx/source/table/tablehandles.cxx
index 9d5f85d08bd2..0da2c9fd6288 100755
--- a/svx/source/table/tablehandles.cxx
+++ b/svx/source/table/tablehandles.cxx
@@ -89,7 +89,7 @@ void TableEdgeHdl::SetEdge( sal_Int32 nEdge, sal_Int32 nStart, sal_Int32 nEnd, T
}
else
{
- OSL_ENSURE( false, "sdr::table::TableEdgeHdl::SetEdge(), invalid edge!" );
+ OSL_FAIL( "sdr::table::TableEdgeHdl::SetEdge(), invalid edge!" );
}
}
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx
index 2ae3d172b653..c8f0b4fc263c 100755
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -210,7 +210,7 @@ bool TableLayouter::isEdgeVisible( sal_Int32 nEdgeX, sal_Int32 nEdgeY, bool bHor
}
else
{
- OSL_ENSURE( false, "sdr::table::TableLayouter::getBorderLine(), invalid edge!" );
+ OSL_FAIL( "sdr::table::TableLayouter::getBorderLine(), invalid edge!" );
}
return false;
@@ -234,7 +234,7 @@ SvxBorderLine* TableLayouter::getBorderLine( sal_Int32 nEdgeX, sal_Int32 nEdgeY,
}
else
{
- OSL_ENSURE( false, "sdr::table::TableLayouter::getBorderLine(), invalid edge!" );
+ OSL_FAIL( "sdr::table::TableLayouter::getBorderLine(), invalid edge!" );
}
return pLine;
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index cb25098087b5..76d44af7a300 100755
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -813,8 +813,8 @@ void SvxFontNameBox_Impl::Select()
#define WB_NO_DIRECTSELECT ((WinBits)0x04000000)
#endif
-#define PALETTE_X 10
-#define PALETTE_Y 11
+#define PALETTE_X 8
+#define PALETTE_Y 13
#define PALETTE_SIZE (PALETTE_X * PALETTE_Y)
SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand,
diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx
index 4431ab5f7c47..ac8e59655b31 100755
--- a/svx/source/unodraw/unomod.cxx
+++ b/svx/source/unodraw/unomod.cxx
@@ -79,8 +79,6 @@ using namespace ::com::sun::star;
//-////////////////////////////////////////////////////////////////////
-#ifndef SVX_LIGHT
-
class SvxUnoDrawPagesAccess : public ::cppu::WeakImplHelper2< ::com::sun::star::drawing::XDrawPages, ::com::sun::star::lang::XServiceInfo >
{
private:
@@ -107,10 +105,8 @@ public:
virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
};
-#endif
//-////////////////////////////////////////////////////////////////////
-#ifndef SVX_LIGHT
const SvEventDescription* ImplGetSupportedMacroItems()
{
static const SvEventDescription aMacroDescriptionsImpl[] =
@@ -122,7 +118,6 @@ const SvEventDescription* ImplGetSupportedMacroItems()
return aMacroDescriptionsImpl;
}
-#endif
//-////////////////////////////////////////////////////////////////////
@@ -247,8 +242,6 @@ uno::Sequence< OUString > SvxUnoDrawMSFactory::concatServiceNames( uno::Sequence
}
-#ifndef SVX_LIGHT
-
///
SvxUnoDrawingModel::SvxUnoDrawingModel( SdrModel* pDoc ) throw()
: mpDoc( pDoc )
@@ -751,6 +744,4 @@ com::sun::star::uno::Reference< com::sun::star::container::XIndexReplace > SvxCr
///////////////////////////////////////////////////////////////////////
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index fb6222e1bb32..3cd56093fb7b 100755
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -1276,7 +1276,14 @@ static sal_uInt16 SvxUnoColorNameDefResId[] =
RID_SVXSTR_SALMON_DEF,
RID_SVXSTR_SEABLUE_DEF,
RID_SVXSTR_COLOR_SUN_DEF,
- RID_SVXSTR_COLOR_CHART_DEF
+ RID_SVXSTR_COLOR_CHART_DEF,
+ RID_SVXSTR_LIBRE_GREEN_1_DEF,
+ RID_SVXSTR_LIBRE_GREEN_ACCENT_DEF,
+ RID_SVXSTR_LIBRE_BLUE_ACCENT_DEF,
+ RID_SVXSTR_LIBRE_ORANGE_ACCENT_DEF,
+ RID_SVXSTR_LIBRE_PURPLE_DEF,
+ RID_SVXSTR_LIBRE_PURPLE_ACCENT_DEF,
+ RID_SVXSTR_LIBRE_YELLOW_ACCENT_DEF
};
static sal_uInt16 SvxUnoColorNameResId[] =
@@ -1307,7 +1314,14 @@ static sal_uInt16 SvxUnoColorNameResId[] =
RID_SVXSTR_SALMON,
RID_SVXSTR_SEABLUE,
RID_SVXSTR_COLOR_SUN,
- RID_SVXSTR_COLOR_CHART
+ RID_SVXSTR_COLOR_CHART,
+ RID_SVXSTR_LIBRE_GREEN_1,
+ RID_SVXSTR_LIBRE_GREEN_ACCENT,
+ RID_SVXSTR_LIBRE_BLUE_ACCENT,
+ RID_SVXSTR_LIBRE_ORANGE_ACCENT,
+ RID_SVXSTR_LIBRE_PURPLE,
+ RID_SVXSTR_LIBRE_PURPLE_ACCENT,
+ RID_SVXSTR_LIBRE_YELLOW_ACCENT
};
bool SvxUnoConvertResourceString( sal_uInt16* pSourceResIds, sal_uInt16* pDestResIds, int nCount, String& rString ) throw()
@@ -1345,7 +1359,6 @@ bool SvxUnoConvertResourceString( sal_uInt16* pSourceResIds, sal_uInt16* pDestRe
*/
void SvxUnogetApiNameForItem( const sal_Int16 nWhich, const String& rInternalName, rtl::OUString& rApiName ) throw()
{
-#ifndef SVX_LIGHT
String aNew = rInternalName;
if( nWhich == XATTR_LINECOLOR )
@@ -1371,7 +1384,6 @@ void SvxUnogetApiNameForItem( const sal_Int16 nWhich, const String& rInternalNam
}
}
}
-#endif
// just use previous name, if nothing else was found.
rApiName = rInternalName;
@@ -1382,7 +1394,6 @@ void SvxUnogetApiNameForItem( const sal_Int16 nWhich, const String& rInternalNam
*/
void SvxUnogetInternalNameForItem( const sal_Int16 nWhich, const rtl::OUString& rApiName, String& rInternalName ) throw()
{
-#ifndef SVX_LIGHT
String aNew = rApiName;
if( nWhich == XATTR_LINECOLOR )
@@ -1408,7 +1419,6 @@ void SvxUnogetInternalNameForItem( const sal_Int16 nWhich, const rtl::OUString&
}
}
}
-#endif // !SVX_LIGHT
// just use previous name, if nothing else was found.
rInternalName = rApiName;
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index 1041ba7d85ca..ca1314055e6b 100755
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -1619,11 +1619,9 @@ uno::Sequence< OUString > SAL_CALL SvxShapePolyPolygonBezier::getSupportedServic
#include <com/sun/star/awt/XBitmap.hpp>
#include <vcl/cvtgrf.hxx>
#include <svx/svdograf.hxx>
-#ifndef SVX_LIGHT
#include <sfx2/docfile.hxx>
#include <sfx2/app.hxx>
#include <sfx2/fcontnr.hxx>
-#endif
#include "toolkit/unohlp.hxx"
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 4004d4e48b03..9a7c2e6fd44a 100755
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -39,10 +39,8 @@
#include <svx/svdoole2.hxx>
#include <svx/svdomedia.hxx>
#include <svx/svdpool.hxx>
-#ifndef SVX_LIGHT
#include <sot/clsids.hxx>
#include <sfx2/frmdescr.hxx>
-#endif
#include <vcl/svapp.hxx>
#include <osl/mutex.hxx>
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 057846b3935a..c14b3df874b7 100755
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -1488,14 +1488,14 @@ void SAL_CALL SvxShape::removePropertyChangeListener( const OUString& _propertyN
void SAL_CALL SvxShape::addVetoableChangeListener( const OUString& , const Reference< beans::XVetoableChangeListener >& ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- OSL_ENSURE( false, "SvxShape::addVetoableChangeListener: don't have any vetoable properties, so why ...?" );
+ OSL_FAIL( "SvxShape::addVetoableChangeListener: don't have any vetoable properties, so why ...?" );
}
//----------------------------------------------------------------------
void SAL_CALL SvxShape::removeVetoableChangeListener( const OUString& , const Reference< beans::XVetoableChangeListener >& ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- OSL_ENSURE( false, "SvxShape::removeVetoableChangeListener: don't have any vetoable properties, so why ...?" );
+ OSL_FAIL( "SvxShape::removeVetoableChangeListener: don't have any vetoable properties, so why ...?" );
}
//----------------------------------------------------------------------
@@ -3826,7 +3826,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
}
return *pSeq;
}
- OSL_ENSURE( false, "SvxShape::_getSupportedServiceNames: could not determine object type!" );
+ OSL_FAIL( "SvxShape::_getSupportedServiceNames: could not determine object type!" );
uno::Sequence< OUString > aSeq;
return aSeq;
}
diff --git a/svx/source/xoutdev/xtabbtmp.cxx b/svx/source/xoutdev/xtabbtmp.cxx
index 505ee6377a6e..48ca4fbc91d7 100755
--- a/svx/source/xoutdev/xtabbtmp.cxx
+++ b/svx/source/xoutdev/xtabbtmp.cxx
@@ -29,8 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
-#ifndef SVX_LIGHT
-
#include <com/sun/star/container/XNameContainer.hpp>
#include "svx/XPropertyTable.hxx"
#include <unotools/ucbstreamhelper.hxx>
@@ -38,8 +36,6 @@
#include "xmlxtexp.hxx"
#include "xmlxtimp.hxx"
-#endif
-
#include <tools/urlobj.hxx>
#include <vcl/virdev.hxx>
#include <svl/itemset.hxx>
diff --git a/svx/source/xoutdev/xtabcolr.cxx b/svx/source/xoutdev/xtabcolr.cxx
index f57e4a2798fc..dad41b9ff77f 100755
--- a/svx/source/xoutdev/xtabcolr.cxx
+++ b/svx/source/xoutdev/xtabcolr.cxx
@@ -29,8 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
-#ifndef SVX_LIGHT
-
#include <com/sun/star/container/XNameContainer.hpp>
#include "svx/XPropertyTable.hxx"
#include <unotools/ucbstreamhelper.hxx>
@@ -40,8 +38,6 @@
#include "xmlxtexp.hxx"
#include "xmlxtimp.hxx"
-#endif
-
#include <sfx2/docfile.hxx>
#include <tools/urlobj.hxx>
#include <svx/dialogs.hrc>
diff --git a/svx/source/xoutdev/xtabdash.cxx b/svx/source/xoutdev/xtabdash.cxx
index 5e338592318f..f5c71a65200a 100755
--- a/svx/source/xoutdev/xtabdash.cxx
+++ b/svx/source/xoutdev/xtabdash.cxx
@@ -31,8 +31,6 @@
// include ---------------------------------------------------------------
-#ifndef SVX_LIGHT
-
#include <com/sun/star/container/XNameContainer.hpp>
#include "svx/XPropertyTable.hxx"
#include <unotools/ucbstreamhelper.hxx>
@@ -40,7 +38,6 @@
#include "xmlxtexp.hxx"
#include "xmlxtimp.hxx"
-#endif
#include <vcl/svapp.hxx>
#include <tools/urlobj.hxx>
diff --git a/svx/source/xoutdev/xtabgrdt.cxx b/svx/source/xoutdev/xtabgrdt.cxx
index b115154d3091..87709fd57399 100755
--- a/svx/source/xoutdev/xtabgrdt.cxx
+++ b/svx/source/xoutdev/xtabgrdt.cxx
@@ -31,8 +31,6 @@
// include ---------------------------------------------------------------
-#ifndef SVX_LIGHT
-
#include <com/sun/star/container/XNameContainer.hpp>
#include "svx/XPropertyTable.hxx"
#include <unotools/ucbstreamhelper.hxx>
@@ -40,8 +38,6 @@
#include "xmlxtexp.hxx"
#include "xmlxtimp.hxx"
-#endif
-
#include <tools/urlobj.hxx>
#include <vcl/virdev.hxx>
#include <svl/itemset.hxx>
diff --git a/svx/source/xoutdev/xtabhtch.cxx b/svx/source/xoutdev/xtabhtch.cxx
index 2b1d4d260c24..ef83d3a8b78a 100755
--- a/svx/source/xoutdev/xtabhtch.cxx
+++ b/svx/source/xoutdev/xtabhtch.cxx
@@ -31,8 +31,6 @@
// include ---------------------------------------------------------------
-#ifndef SVX_LIGHT
-
#include <com/sun/star/container/XNameContainer.hpp>
#include "svx/XPropertyTable.hxx"
#include <unotools/ucbstreamhelper.hxx>
@@ -41,8 +39,6 @@
#include "xmlxtexp.hxx"
#include "xmlxtimp.hxx"
-#endif
-
#include <tools/urlobj.hxx>
#include <vcl/virdev.hxx>
#include <svl/itemset.hxx>
diff --git a/svx/source/xoutdev/xtablend.cxx b/svx/source/xoutdev/xtablend.cxx
index 7b37209b6e24..89818aaae434 100755
--- a/svx/source/xoutdev/xtablend.cxx
+++ b/svx/source/xoutdev/xtablend.cxx
@@ -31,8 +31,6 @@
// include ---------------------------------------------------------------
-#ifndef SVX_LIGHT
-
#include <com/sun/star/container/XNameContainer.hpp>
#include "svx/XPropertyTable.hxx"
#include <unotools/ucbstreamhelper.hxx>
@@ -40,7 +38,6 @@
#include "xmlxtexp.hxx"
#include "xmlxtimp.hxx"
-#endif
#include <tools/urlobj.hxx>
#include <vcl/virdev.hxx>
diff --git a/svx/workben/msview/xmlconfig.cxx b/svx/workben/msview/xmlconfig.cxx
index 62f414c15460..1ee7475cc2d3 100755
--- a/svx/workben/msview/xmlconfig.cxx
+++ b/svx/workben/msview/xmlconfig.cxx
@@ -343,7 +343,7 @@ void load_config( const OUString& rPath )
}
catch( Exception& r )
{
- DBG_ERROR(
+ OSL_FAIL(
(rtl::OString("load_config(), "
"exception caught: ") +
rtl::OUStringToOString(
diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx
index 2cd0f6d1d238..4124c8c6ec71 100755
--- a/ucb/source/core/ucb.cxx
+++ b/ucb/source/core/ucb.cxx
@@ -200,8 +200,7 @@ bool createContentProviderData(
if ( !( rxHierNameAccess->getByHierarchicalName(
aKeyBuffer.makeStringAndClear() ) >>= aValue ) )
{
- OSL_ENSURE( false,
- "UniversalContentBroker::getContentProviderData - "
+ OSL_FAIL( "UniversalContentBroker::getContentProviderData - "
"Error getting item value!" );
}
}
@@ -219,8 +218,7 @@ bool createContentProviderData(
if ( !( rxHierNameAccess->getByHierarchicalName(
aKeyBuffer.makeStringAndClear() ) >>= aValue ) )
{
- OSL_ENSURE( false,
- "UniversalContentBroker::getContentProviderData - "
+ OSL_FAIL( "UniversalContentBroker::getContentProviderData - "
"Error getting item value!" );
}
@@ -233,8 +231,7 @@ bool createContentProviderData(
if ( !( rxHierNameAccess->getByHierarchicalName(
aKeyBuffer.makeStringAndClear() ) >>= aValue ) )
{
- OSL_ENSURE( false,
- "UniversalContentBroker::getContentProviderData - "
+ OSL_FAIL( "UniversalContentBroker::getContentProviderData - "
"Error getting item value!" );
}
@@ -786,14 +783,14 @@ bool UniversalContentBroker::configureUcb()
if (m_aArguments.getLength() < 2
|| !(m_aArguments[0] >>= aKey1) || !(m_aArguments[1] >>= aKey2))
{
- OSL_ENSURE(false, "UniversalContentBroker::configureUcb(): Bad arguments");
+ OSL_FAIL("UniversalContentBroker::configureUcb(): Bad arguments");
return false;
}
ContentProviderDataList aData;
if (!getContentProviderData(aKey1, aKey2, aData))
{
- OSL_ENSURE(false, "UniversalContentBroker::configureUcb(): No configuration");
+ OSL_FAIL("UniversalContentBroker::configureUcb(): No configuration");
return false;
}
@@ -823,8 +820,7 @@ void UniversalContentBroker::prepareAndRegister(
}
else
- OSL_ENSURE(false,
- "UniversalContentBroker::prepareAndRegister(): Bad argument placeholders");
+ OSL_FAIL("UniversalContentBroker::prepareAndRegister(): Bad argument placeholders");
}
}
@@ -836,8 +832,7 @@ bool UniversalContentBroker::getContentProviderData(
{
if ( !m_xSMgr.is() || !rKey1.getLength() || !rKey2.getLength() )
{
- OSL_ENSURE( false,
- "UniversalContentBroker::getContentProviderData - Invalid argument!" );
+ OSL_FAIL( "UniversalContentBroker::getContentProviderData - Invalid argument!" );
return false;
}
@@ -913,8 +908,7 @@ bool UniversalContentBroker::getContentProviderData(
catch ( container::NoSuchElementException& )
{
// getByHierarchicalName
- OSL_ENSURE( false,
- "UniversalContentBroker::getContentProviderData - "
+ OSL_FAIL( "UniversalContentBroker::getContentProviderData - "
"caught NoSuchElementException!" );
}
}
@@ -922,16 +916,14 @@ bool UniversalContentBroker::getContentProviderData(
}
catch ( uno::RuntimeException& )
{
- OSL_ENSURE( false,
- "UniversalContentBroker::getContentProviderData - caught RuntimeException!" );
+ OSL_FAIL( "UniversalContentBroker::getContentProviderData - caught RuntimeException!" );
return false;
}
catch ( uno::Exception& )
{
// createInstance, createInstanceWithArguments
- OSL_ENSURE( false,
- "UniversalContentBroker::getContentProviderData - caught Exception!" );
+ OSL_FAIL( "UniversalContentBroker::getContentProviderData - caught Exception!" );
return false;
}
diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx
index 0fd4a8fa37b4..488fcbfcd731 100755
--- a/ucb/source/core/ucbcmds.cxx
+++ b/ucb/source/core/ucbcmds.cxx
@@ -1438,7 +1438,7 @@ void globalTransfer_(
"BUG: UnsupportedNameClashException not allowed here!" );
if (exc.NameClash != ucb::NameClash::ERROR) {
- OSL_ENSURE( false, "BUG: NameClash::ERROR expected!" );
+ OSL_FAIL( "BUG: NameClash::ERROR expected!" );
}
// No chance to solve name clashes, because I'm not able to detect
diff --git a/ucb/source/ucp/expand/ucpexpand.cxx b/ucb/source/ucp/expand/ucpexpand.cxx
index a4942cb687be..593eead0fbfd 100755
--- a/ucb/source/ucp/expand/ucpexpand.cxx
+++ b/ucb/source/ucp/expand/ucpexpand.cxx
@@ -244,8 +244,8 @@ sal_Int32 ExpandContentProviderImpl::compareContentIds(
catch (ucb::IllegalIdentifierException & exc)
{
(void) exc; // unused
- OSL_ENSURE(
- 0, ::rtl::OUStringToOString(
+ OSL_FAIL(
+ ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
return -1;
}
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx
index b83aa4f7b455..1ed589387280 100755
--- a/ucb/source/ucp/ext/ucpext_content.cxx
+++ b/ucb/source/ucp/ext/ucpext_content.cxx
@@ -385,7 +385,7 @@ namespace ucb { namespace ucp { namespace ext
}
default:
- OSL_ENSURE( false, "Content::getParentURL: unhandled case!" );
+ OSL_FAIL( "Content::getParentURL: unhandled case!" );
break;
}
return ::rtl::OUString();
@@ -514,11 +514,11 @@ namespace ucb { namespace ucp { namespace ext
}
default:
- OSL_ENSURE( false, "Content::getPropertyValues: unhandled case!" );
+ OSL_FAIL( "Content::getPropertyValues: unhandled case!" );
break;
}
- OSL_ENSURE( false, "Content::getPropertyValues: unreachable!" );
+ OSL_FAIL( "Content::getPropertyValues: unreachable!" );
return NULL;
}
diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.cxx b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
index 60b1ff72a4b3..8c40411a8c71 100755
--- a/ucb/source/ucp/ext/ucpext_datasupplier.cxx
+++ b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
@@ -194,7 +194,7 @@ namespace ucb { namespace ucp { namespace ext
}
break;
default:
- OSL_ENSURE( false, "DataSupplier::fetchData: unimplemented content type!" );
+ OSL_FAIL( "DataSupplier::fetchData: unimplemented content type!" );
break;
}
}
@@ -221,7 +221,7 @@ namespace ucb { namespace ucp { namespace ext
return sId;
}
- OSL_ENSURE( false, "DataSupplier::queryContentIdentifierString: illegal index, or illegal result entry id!" );
+ OSL_FAIL( "DataSupplier::queryContentIdentifierString: illegal index, or illegal result entry id!" );
return ::rtl::OUString();
}
@@ -344,7 +344,7 @@ namespace ucb { namespace ucp { namespace ext
}
break;
default:
- OSL_ENSURE( false, "DataSupplier::queryPropertyValues: unhandled case!" );
+ OSL_FAIL( "DataSupplier::queryPropertyValues: unhandled case!" );
break;
}
diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx
index 444ba7055881..8242276ad604 100755
--- a/ucb/source/ucp/file/bc.cxx
+++ b/ucb/source/ucp/file/bc.cxx
@@ -546,14 +546,12 @@ BaseContent::getContentType()
}
else
{
- OSL_ENSURE( false,
- "BaseContent::getContentType - Property value was null!" );
+ OSL_FAIL( "BaseContent::getContentType - Property value was null!" );
}
}
catch ( sdbc::SQLException const & )
{
- OSL_ENSURE( false,
- "BaseContent::getContentType - Caught SQLException!" );
+ OSL_FAIL( "BaseContent::getContentType - Caught SQLException!" );
}
}
}
@@ -679,15 +677,13 @@ BaseContent::createNewContent(
if ( xRow->wasNull() )
{
IsDocument = false;
-// OSL_ENSURE( false,
-// "BaseContent::createNewContent - Property value was null!" );
+// OSL_FAIL( // "BaseContent::createNewContent - Property value was null!" );
// return Reference< XContent >();
}
}
catch ( sdbc::SQLException const & )
{
- OSL_ENSURE( false,
- "BaseContent::createNewContent - Caught SQLException!" );
+ OSL_FAIL( "BaseContent::createNewContent - Caught SQLException!" );
return Reference< XContent >();
}
@@ -1215,8 +1211,7 @@ void SAL_CALL BaseContent::insert( sal_Int32 nMyCommandIdentifier,
}
catch ( sdbc::SQLException const & )
{
- OSL_ENSURE( false,
- "BaseContent::insert - Caught SQLException!" );
+ OSL_FAIL( "BaseContent::insert - Caught SQLException!" );
contentTypeSet = false;
}
diff --git a/ucb/source/ucp/file/filinpstr.cxx b/ucb/source/ucp/file/filinpstr.cxx
index 555a83bb0272..1299b33284ae 100755
--- a/ucb/source/ucp/file/filinpstr.cxx
+++ b/ucb/source/ucp/file/filinpstr.cxx
@@ -74,11 +74,11 @@ XInputStream_impl::~XInputStream_impl()
}
catch (io::IOException const &)
{
- OSL_ENSURE(false, "unexpected situation");
+ OSL_FAIL("unexpected situation");
}
catch (uno::RuntimeException const &)
{
- OSL_ENSURE(false, "unexpected situation");
+ OSL_FAIL("unexpected situation");
}
}
diff --git a/ucb/source/ucp/file/filstr.cxx b/ucb/source/ucp/file/filstr.cxx
index 63b8fd46b140..6ecf53620377 100755
--- a/ucb/source/ucp/file/filstr.cxx
+++ b/ucb/source/ucp/file/filstr.cxx
@@ -136,11 +136,11 @@ XStream_impl::~XStream_impl()
}
catch (io::IOException const &)
{
- OSL_ENSURE(false, "unexpected situation");
+ OSL_FAIL("unexpected situation");
}
catch (uno::RuntimeException const &)
{
- OSL_ENSURE(false, "unexpected situation");
+ OSL_FAIL("unexpected situation");
}
}
diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
index 318b884b7cf1..8f86aa48abab 100755
--- a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
@@ -402,8 +402,7 @@ HierarchyDataSource::createInstanceWithArguments(
if ( !bReadOnly && !bReadWrite )
{
- OSL_ENSURE( false,
- "HierarchyDataSource::createInstanceWithArguments - "
+ OSL_FAIL( "HierarchyDataSource::createInstanceWithArguments - "
"Unsupported service specifier!" );
return uno::Reference< uno::XInterface >();
}
@@ -434,8 +433,7 @@ HierarchyDataSource::createInstanceWithArguments(
rtl::OUString aConfigPath;
if ( !createConfigPath( aPath, aConfigPath ) )
{
- OSL_ENSURE( false,
- "HierarchyDataSource::"
+ OSL_FAIL( "HierarchyDataSource::"
"createInstanceWithArguments - "
"Invalid node path!" );
return uno::Reference< uno::XInterface >();
@@ -451,8 +449,7 @@ HierarchyDataSource::createInstanceWithArguments(
}
else
{
- OSL_ENSURE( false,
- "HierarchyDataSource::createInstanceWithArguments - "
+ OSL_FAIL( "HierarchyDataSource::createInstanceWithArguments - "
"Invalid type for property 'nodepath'!" );
return uno::Reference< uno::XInterface >();
}
@@ -470,8 +467,7 @@ HierarchyDataSource::createInstanceWithArguments(
}
else
{
- OSL_ENSURE( false,
- "HierarchyDataSource::createInstanceWithArguments - "
+ OSL_FAIL( "HierarchyDataSource::createInstanceWithArguments - "
"Invalid type for property 'lazywrite'!" );
return uno::Reference< uno::XInterface >();
}
@@ -481,8 +477,7 @@ HierarchyDataSource::createInstanceWithArguments(
if ( !bHasNodePath )
{
- OSL_ENSURE( false,
- "HierarchyDataSource::createInstanceWithArguments - "
+ OSL_FAIL( "HierarchyDataSource::createInstanceWithArguments - "
"No 'nodepath' property!" );
return uno::Reference< uno::XInterface >();
}
@@ -528,16 +523,14 @@ HierarchyDataSource::createInstanceWithArguments(
}
catch ( uno::Exception const & )
{
- OSL_ENSURE( false,
- "HierarchyDataSource::createInstanceWithArguments - "
+ OSL_FAIL( "HierarchyDataSource::createInstanceWithArguments - "
"Cannot instanciate configuration access!" );
throw;
}
if ( !xConfigAccess.is() )
{
- OSL_ENSURE( false,
- "HierarchyDataSource::createInstanceWithArguments - "
+ OSL_FAIL( "HierarchyDataSource::createInstanceWithArguments - "
"Cannot instanciate configuration access!" );
return xConfigAccess;
}
@@ -572,8 +565,7 @@ HierarchyDataSource::getConfigProvider()
}
catch ( uno::Exception const & )
{
- OSL_ENSURE( false,
- "HierarchyDataSource::getConfigProvider - "
+ OSL_FAIL( "HierarchyDataSource::getConfigProvider - "
"caught exception!" );
}
}
@@ -590,16 +582,14 @@ bool HierarchyDataSource::createConfigPath(
{
if ( rInPath.indexOf( '/' ) == 0 )
{
- OSL_ENSURE( false,
- "HierarchyDataSource::createConfigPath - "
+ OSL_FAIL( "HierarchyDataSource::createConfigPath - "
"Leading slash in node path!" );
return false;
}
if ( rInPath.lastIndexOf( '/' ) == rInPath.getLength() - 1 )
{
- OSL_ENSURE( false,
- "HierarchyDataSource::createConfigPath - "
+ OSL_FAIL( "HierarchyDataSource::createConfigPath - "
"Trailing slash in node path!" );
return false;
}
diff --git a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx
index 2a594a0de784..9bcaafadc7e2 100755
--- a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx
@@ -166,8 +166,7 @@ void SAL_CALL HierarchyContentProvider::initialize(
throw( uno::Exception, uno::RuntimeException )
{
if ( aArguments.getLength() > 0 )
- OSL_ENSURE( false,
- "HierarchyContentProvider::initialize : not supported!" );
+ OSL_FAIL( "HierarchyContentProvider::initialize : not supported!" );
}
//=========================================================================
diff --git a/ucb/source/ucp/odma/odma_content.cxx b/ucb/source/ucp/odma/odma_content.cxx
index 4ef70bec95c9..e32bbdbbfef8 100755
--- a/ucb/source/ucp/odma/odma_content.cxx
+++ b/ucb/source/ucp/odma/odma_content.cxx
@@ -394,7 +394,7 @@ uno::Any SAL_CALL Content::execute(
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception occurred while creating the file content!");
+ OSL_FAIL("Exception occurred while creating the file content!");
}
xDataSink->setInputStream( xIn );
}
diff --git a/ucb/source/ucp/odma/odma_inputstream.cxx b/ucb/source/ucp/odma/odma_inputstream.cxx
index 5ea4b95416d2..1c291bd2121c 100755
--- a/ucb/source/ucp/odma/odma_inputstream.cxx
+++ b/ucb/source/ucp/odma/odma_inputstream.cxx
@@ -77,11 +77,11 @@ OOdmaStream::~OOdmaStream()
}
catch (io::IOException const &)
{
- OSL_ENSURE(false, "unexpected situation");
+ OSL_FAIL("unexpected situation");
}
catch (uno::RuntimeException const &)
{
- OSL_ENSURE(false, "unexpected situation");
+ OSL_FAIL("unexpected situation");
}
}
// -----------------------------------------------------------------------------
diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx
index 1c0634b79acf..cc859e623dae 100755
--- a/ucb/source/ucp/tdoc/tdoc_content.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_content.cxx
@@ -2460,13 +2460,13 @@ bool Content::loadData( ContentProvider* pProvider,
catch ( lang::IllegalArgumentException const & )
{
// an illegal argument is provided
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
return false;
}
catch ( embed::InvalidStorageException const & )
{
// this storage is in invalid state for any reason
- OSL_ENSURE( false, "Caught InvalidStorageException!" );
+ OSL_FAIL( "Caught InvalidStorageException!" );
return false;
}
}
@@ -2485,7 +2485,7 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xData,
ContentType eType = m_aProps.getType();
if ( ( eType == ROOT ) || ( eType == DOCUMENT ) )
{
- OSL_ENSURE( false, "storeData not supported by root and documents!" );
+ OSL_FAIL( "storeData not supported by root and documents!" );
return false;
}
@@ -2519,22 +2519,22 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xData,
}
catch ( beans::UnknownPropertyException const & )
{
- OSL_ENSURE( false, "Property MediaType not supported!" );
+ OSL_FAIL( "Property MediaType not supported!" );
return false;
}
catch ( beans::PropertyVetoException const & )
{
- OSL_ENSURE( false, "Caught PropertyVetoException!" );
+ OSL_FAIL( "Caught PropertyVetoException!" );
return false;
}
catch ( lang::IllegalArgumentException const & )
{
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
return false;
}
catch ( lang::WrappedTargetException const & )
{
- OSL_ENSURE( false, "Caught WrappedTargetException!" );
+ OSL_FAIL( "Caught WrappedTargetException!" );
return false;
}
@@ -2580,21 +2580,21 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xData,
catch ( io::NotConnectedException const & )
{
// readSomeBytes, writeBytes
- OSL_ENSURE( false, "Caught NotConnectedException!" );
+ OSL_FAIL( "Caught NotConnectedException!" );
closeOutputStream( xOut );
return false;
}
catch ( io::BufferSizeExceededException const & )
{
// readSomeBytes, writeBytes
- OSL_ENSURE( false, "Caught BufferSizeExceededException!" );
+ OSL_FAIL( "Caught BufferSizeExceededException!" );
closeOutputStream( xOut );
return false;
}
catch ( io::IOException const & )
{
// readSomeBytes, writeBytes
- OSL_ENSURE( false, "Caught IOException!" );
+ OSL_FAIL( "Caught IOException!" );
closeOutputStream( xOut );
return false;
}
@@ -2611,7 +2611,7 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xData,
}
else
{
- OSL_ENSURE( false, "Unknown content type!" );
+ OSL_FAIL( "Unknown content type!" );
return false;
}
return true;
@@ -2627,7 +2627,7 @@ bool Content::renameData(
ContentType eType = m_aProps.getType();
if ( ( eType == ROOT ) || ( eType == DOCUMENT ) )
{
- OSL_ENSURE( false, "renameData not supported by root and documents!" );
+ OSL_FAIL( "renameData not supported by root and documents!" );
return false;
}
@@ -2648,37 +2648,37 @@ bool Content::renameData(
catch ( embed::InvalidStorageException const & )
{
// this storage is in invalid state for eny reason
- OSL_ENSURE( false, "Caught InvalidStorageException!" );
+ OSL_FAIL( "Caught InvalidStorageException!" );
return false;
}
catch ( lang::IllegalArgumentException const & )
{
// an illegal argument is provided
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
return false;
}
catch ( container::NoSuchElementException const & )
{
// there is no element with old name in this storage
- OSL_ENSURE( false, "Caught NoSuchElementException!" );
+ OSL_FAIL( "Caught NoSuchElementException!" );
return false;
}
catch ( container::ElementExistException const & )
{
// an element with new name already exists in this storage
- OSL_ENSURE( false, "Caught ElementExistException!" );
+ OSL_FAIL( "Caught ElementExistException!" );
return false;
}
catch ( io::IOException const & )
{
// in case of io errors during renaming
- OSL_ENSURE( false, "Caught IOException!" );
+ OSL_FAIL( "Caught IOException!" );
return false;
}
catch ( embed::StorageWrappedTargetException const & )
{
// wraps other exceptions
- OSL_ENSURE( false, "Caught StorageWrappedTargetException!" );
+ OSL_FAIL( "Caught StorageWrappedTargetException!" );
return false;
}
@@ -2693,7 +2693,7 @@ bool Content::removeData()
ContentType eType = m_aProps.getType();
if ( ( eType == ROOT ) || ( eType == DOCUMENT ) )
{
- OSL_ENSURE( false, "removeData not supported by root and documents!" );
+ OSL_FAIL( "removeData not supported by root and documents!" );
return false;
}
@@ -2712,31 +2712,31 @@ bool Content::removeData()
catch ( embed::InvalidStorageException const & )
{
// this storage is in invalid state for eny reason
- OSL_ENSURE( false, "Caught InvalidStorageException!" );
+ OSL_FAIL( "Caught InvalidStorageException!" );
return false;
}
catch ( lang::IllegalArgumentException const & )
{
// an illegal argument is provided
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
return false;
}
catch ( container::NoSuchElementException const & )
{
// there is no element with this name in this storage
- OSL_ENSURE( false, "Caught NoSuchElementException!" );
+ OSL_FAIL( "Caught NoSuchElementException!" );
return false;
}
catch ( io::IOException const & )
{
// in case of io errors during renaming
- OSL_ENSURE( false, "Caught IOException!" );
+ OSL_FAIL( "Caught IOException!" );
return false;
}
catch ( embed::StorageWrappedTargetException const & )
{
// wraps other exceptions
- OSL_ENSURE( false, "Caught StorageWrappedTargetException!" );
+ OSL_FAIL( "Caught StorageWrappedTargetException!" );
return false;
}
@@ -2751,7 +2751,7 @@ bool Content::copyData( const Uri & rSourceUri, const rtl::OUString & rNewName )
ContentType eType = m_aProps.getType();
if ( ( eType == ROOT ) || ( eType == STREAM ) )
{
- OSL_ENSURE( false, "copyData not supported by root and streams!" );
+ OSL_FAIL( "copyData not supported by root and streams!" );
return false;
}
@@ -2777,37 +2777,37 @@ bool Content::copyData( const Uri & rSourceUri, const rtl::OUString & rNewName )
catch ( embed::InvalidStorageException const & )
{
// this storage is in invalid state for eny reason
- OSL_ENSURE( false, "Caught InvalidStorageException!" );
+ OSL_FAIL( "Caught InvalidStorageException!" );
return false;
}
catch ( lang::IllegalArgumentException const & )
{
// an illegal argument is provided
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
return false;
}
catch ( container::NoSuchElementException const & )
{
// there is no element with this name in this storage
- OSL_ENSURE( false, "Caught NoSuchElementException!" );
+ OSL_FAIL( "Caught NoSuchElementException!" );
return false;
}
catch ( container::ElementExistException const & )
{
// there is no element with this name in this storage
- OSL_ENSURE( false, "Caught ElementExistException!" );
+ OSL_FAIL( "Caught ElementExistException!" );
return false;
}
catch ( io::IOException const & )
{
// in case of io errors during renaming
- OSL_ENSURE( false, "Caught IOException!" );
+ OSL_FAIL( "Caught IOException!" );
return false;
}
catch ( embed::StorageWrappedTargetException const & )
{
// wraps other exceptions
- OSL_ENSURE( false, "Caught StorageWrappedTargetException!" );
+ OSL_FAIL( "Caught StorageWrappedTargetException!" );
return false;
}
@@ -2829,12 +2829,12 @@ bool Content::commitStorage( const uno::Reference< embed::XStorage > & xStorage
}
catch ( io::IOException const & )
{
- OSL_ENSURE( false, "Caught IOException!" );
+ OSL_FAIL( "Caught IOException!" );
return false;
}
catch ( lang::WrappedTargetException const & )
{
- OSL_ENSURE( false, "Caught WrappedTargetException!" );
+ OSL_FAIL( "Caught WrappedTargetException!" );
return false;
}
@@ -2855,15 +2855,15 @@ bool Content::closeOutputStream(
}
catch ( io::NotConnectedException const & )
{
- OSL_ENSURE( false, "Caught NotConnectedException!" );
+ OSL_FAIL( "Caught NotConnectedException!" );
}
catch ( io::BufferSizeExceededException const & )
{
- OSL_ENSURE( false, "Caught BufferSizeExceededException!" );
+ OSL_FAIL( "Caught BufferSizeExceededException!" );
}
catch ( io::IOException const & )
{
- OSL_ENSURE( false, "Caught IOException!" );
+ OSL_FAIL( "Caught IOException!" );
}
}
return false;
diff --git a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx
index 319e2c8ad101..a3472dfd92e0 100755
--- a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx
@@ -440,7 +440,7 @@ bool ResultSetDataSupplier::queryNamesOfChildren()
m_pImpl->m_xContent->getIdentifier()->getContentIdentifier(),
*pNamesOfChildren ) )
{
- OSL_ENSURE( false, "Got no list of children!" );
+ OSL_FAIL( "Got no list of children!" );
m_pImpl->m_bThrowException = sal_True;
return false;
}
diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx
index ae46e4a7397b..cfa4c67496e3 100755
--- a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx
@@ -164,7 +164,7 @@ getDocumentId( const uno::Reference< uno::XInterface > & xDoc )
}
catch ( lang::WrappedTargetException const & )
{
- OSL_ENSURE( false, "Caught WrappedTargetException!" );
+ OSL_FAIL( "Caught WrappedTargetException!" );
}
}
@@ -722,11 +722,11 @@ bool OfficeDocumentsManager::isBasicIDE(
}
catch ( lang::IllegalArgumentException const & )
{
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
}
catch ( frame::UnknownModuleException const & )
{
- OSL_ENSURE( false, "Caught UnknownModuleException!" );
+ OSL_FAIL( "Caught UnknownModuleException!" );
}
if ( aModule.getLength() > 0 )
diff --git a/ucb/source/ucp/tdoc/tdoc_provider.cxx b/ucb/source/ucp/tdoc/tdoc_provider.cxx
index 408cf216cdac..810582cc6f76 100755
--- a/ucb/source/ucp/tdoc/tdoc_provider.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_provider.cxx
@@ -345,11 +345,11 @@ ContentProvider::queryStorage( const rtl::OUString & rUri,
}
catch ( embed::InvalidStorageException const & )
{
- OSL_ENSURE( false, "Caught InvalidStorageException!" );
+ OSL_FAIL( "Caught InvalidStorageException!" );
}
catch ( lang::IllegalArgumentException const & )
{
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
}
catch ( io::IOException const & )
{
@@ -358,7 +358,7 @@ ContentProvider::queryStorage( const rtl::OUString & rUri,
}
catch ( embed::StorageWrappedTargetException const & )
{
- OSL_ENSURE( false, "Caught embed::StorageWrappedTargetException!" );
+ OSL_FAIL( "Caught embed::StorageWrappedTargetException!" );
}
}
return uno::Reference< embed::XStorage >();
@@ -384,11 +384,11 @@ ContentProvider::queryStorageClone( const rtl::OUString & rUri ) const
}
catch ( embed::InvalidStorageException const & )
{
- OSL_ENSURE( false, "Caught InvalidStorageException!" );
+ OSL_FAIL( "Caught InvalidStorageException!" );
}
catch ( lang::IllegalArgumentException const & )
{
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
}
catch ( io::IOException const & )
{
@@ -397,7 +397,7 @@ ContentProvider::queryStorageClone( const rtl::OUString & rUri ) const
}
catch ( embed::StorageWrappedTargetException const & )
{
- OSL_ENSURE( false, "Caught embed::StorageWrappedTargetException!" );
+ OSL_FAIL( "Caught embed::StorageWrappedTargetException!" );
}
}
@@ -418,19 +418,19 @@ ContentProvider::queryInputStream( const rtl::OUString & rUri,
}
catch ( embed::InvalidStorageException const & )
{
- OSL_ENSURE( false, "Caught InvalidStorageException!" );
+ OSL_FAIL( "Caught InvalidStorageException!" );
}
catch ( lang::IllegalArgumentException const & )
{
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
}
catch ( io::IOException const & )
{
- OSL_ENSURE( false, "Caught IOException!" );
+ OSL_FAIL( "Caught IOException!" );
}
catch ( embed::StorageWrappedTargetException const & )
{
- OSL_ENSURE( false, "Caught embed::StorageWrappedTargetException!" );
+ OSL_FAIL( "Caught embed::StorageWrappedTargetException!" );
}
// catch ( packages::WrongPasswordException const & )
// {
@@ -457,11 +457,11 @@ ContentProvider::queryOutputStream( const rtl::OUString & rUri,
}
catch ( embed::InvalidStorageException const & )
{
- OSL_ENSURE( false, "Caught InvalidStorageException!" );
+ OSL_FAIL( "Caught InvalidStorageException!" );
}
catch ( lang::IllegalArgumentException const & )
{
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
}
catch ( io::IOException const & )
{
@@ -470,7 +470,7 @@ ContentProvider::queryOutputStream( const rtl::OUString & rUri,
}
catch ( embed::StorageWrappedTargetException const & )
{
- OSL_ENSURE( false, "Caught embed::StorageWrappedTargetException!" );
+ OSL_FAIL( "Caught embed::StorageWrappedTargetException!" );
}
// catch ( packages::WrongPasswordException const & )
// {
@@ -496,11 +496,11 @@ ContentProvider::queryStream( const rtl::OUString & rUri,
}
catch ( embed::InvalidStorageException const & )
{
- OSL_ENSURE( false, "Caught InvalidStorageException!" );
+ OSL_FAIL( "Caught InvalidStorageException!" );
}
catch ( lang::IllegalArgumentException const & )
{
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
}
catch ( io::IOException const & )
{
@@ -509,7 +509,7 @@ ContentProvider::queryStream( const rtl::OUString & rUri,
}
catch ( embed::StorageWrappedTargetException const & )
{
- OSL_ENSURE( false, "Caught embed::StorageWrappedTargetException!" );
+ OSL_FAIL( "Caught embed::StorageWrappedTargetException!" );
}
// catch ( packages::WrongPasswordException const & )
// {
@@ -560,11 +560,11 @@ bool ContentProvider::queryNamesOfChildren(
}
catch ( embed::InvalidStorageException const & )
{
- OSL_ENSURE( false, "Caught InvalidStorageException!" );
+ OSL_FAIL( "Caught InvalidStorageException!" );
}
catch ( lang::IllegalArgumentException const & )
{
- OSL_ENSURE( false, "Caught IllegalArgumentException!" );
+ OSL_FAIL( "Caught IllegalArgumentException!" );
}
catch ( io::IOException const & )
{
@@ -573,8 +573,7 @@ bool ContentProvider::queryNamesOfChildren(
}
catch ( embed::StorageWrappedTargetException const & )
{
- OSL_ENSURE( false,
- "Caught embed::StorageWrappedTargetException!" );
+ OSL_FAIL( "Caught embed::StorageWrappedTargetException!" );
}
}
}
diff --git a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
index 86bb91d15d71..104d66fa4908 100755
--- a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
@@ -111,7 +111,7 @@ Storage::Storage( const uno::Reference< lang::XMultiServiceFactory > & xSMgr,
}
catch ( uno::Exception const & )
{
- OSL_ENSURE( false, "Storage::Storage: Caught exception!" );
+ OSL_FAIL( "Storage::Storage: Caught exception!" );
}
OSL_ENSURE( m_xAggProxy.is(),
@@ -157,7 +157,7 @@ Storage::~Storage()
}
catch ( ... )
{
- OSL_ENSURE( false, "Storage::~Storage - Caught exception!" );
+ OSL_FAIL( "Storage::~Storage - Caught exception!" );
}
}
}
@@ -620,7 +620,7 @@ OutputStream::OutputStream(
}
catch ( uno::Exception const & )
{
- OSL_ENSURE( false, "OutputStream::OutputStream: Caught exception!" );
+ OSL_FAIL( "OutputStream::OutputStream: Caught exception!" );
}
OSL_ENSURE( m_xAggProxy.is(),
@@ -821,7 +821,7 @@ Stream::Stream(
}
catch ( uno::Exception const & )
{
- OSL_ENSURE( false, "OutputStream::OutputStream: Caught exception!" );
+ OSL_FAIL( "OutputStream::OutputStream: Caught exception!" );
}
OSL_ENSURE( m_xAggProxy.is(),
diff --git a/ucb/source/ucp/tdoc/tdoc_storage.cxx b/ucb/source/ucp/tdoc/tdoc_storage.cxx
index 42451a53ed4e..346dec1ce73b 100755
--- a/ucb/source/ucp/tdoc/tdoc_storage.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_storage.cxx
@@ -311,8 +311,7 @@ StorageElementFactory::createOutputStream( const rtl::OUString & rUri,
// Each stream must have a parent storage.
if ( !xParentStorage.is() )
{
- OSL_ENSURE( false,
- "StorageElementFactory::createOutputStream - "
+ OSL_FAIL( "StorageElementFactory::createOutputStream - "
"Unable to create parent storage!" );
return uno::Reference< io::XOutputStream >();
}
@@ -323,8 +322,7 @@ StorageElementFactory::createOutputStream( const rtl::OUString & rUri,
if ( !xStream.is() )
{
- OSL_ENSURE( false,
- "StorageElementFactory::createOutputStream - "
+ OSL_FAIL( "StorageElementFactory::createOutputStream - "
"Unable to create stream!" );
return uno::Reference< io::XOutputStream >();
}
@@ -359,8 +357,7 @@ StorageElementFactory::createStream( const rtl::OUString & rUri,
// Each stream must have a parent storage.
if ( !xParentStorage.is() )
{
- OSL_ENSURE( false,
- "StorageElementFactory::createStream - "
+ OSL_FAIL( "StorageElementFactory::createStream - "
"Unable to create parent storage!" );
return uno::Reference< io::XStream >();
}
@@ -371,8 +368,7 @@ StorageElementFactory::createStream( const rtl::OUString & rUri,
if ( !xStream.is() )
{
- OSL_ENSURE( false,
- "StorageElementFactory::createStream - "
+ OSL_FAIL( "StorageElementFactory::createStream - "
"Unable to create stream!" );
return uno::Reference< io::XStream >();
}
@@ -502,8 +498,8 @@ uno::Reference< embed::XStorage > StorageElementFactory::queryStorage(
}
else
{
- OSL_ENSURE(
- false, "Bug! Value of property OpenMode has wrong type!" );
+ OSL_FAIL(
+ "Bug! Value of property OpenMode has wrong type!" );
throw uno::RuntimeException(
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
@@ -513,7 +509,7 @@ uno::Reference< embed::XStorage > StorageElementFactory::queryStorage(
}
catch ( beans::UnknownPropertyException const & e )
{
- OSL_ENSURE( false, "Property OpenMode not supported!" );
+ OSL_FAIL( "Property OpenMode not supported!" );
throw embed::StorageWrappedTargetException(
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
@@ -523,7 +519,7 @@ uno::Reference< embed::XStorage > StorageElementFactory::queryStorage(
}
catch ( lang::WrappedTargetException const & e )
{
- OSL_ENSURE( false, "Caught WrappedTargetException!" );
+ OSL_FAIL( "Caught WrappedTargetException!" );
throw embed::StorageWrappedTargetException(
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
@@ -643,8 +639,7 @@ StorageElementFactory::queryStream(
break;
default:
- OSL_ENSURE( false,
- "StorageElementFactory::queryStream : Unknown open mode!" );
+ OSL_FAIL( "StorageElementFactory::queryStream : Unknown open mode!" );
throw embed::InvalidStorageException(
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index d3ed5300c14d..79362cc8cf10 100755
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -353,7 +353,7 @@ namespace
aMessage.append( "no type found for '" );
aMessage.append( ::rtl::OUStringToOString( i_rTypeName, RTL_TEXTENCODING_UTF8 ) );
aMessage.append( "'" );
- OSL_ENSURE( false, aMessage.makeStringAndClear().getStr() );
+ OSL_FAIL( aMessage.makeStringAndClear().getStr() );
#endif
return false;
}
@@ -1047,8 +1047,7 @@ UUIInteractionHelper::getInteractionHandlerList(
if ( !( xHierNameAccess->getByHierarchicalName(
aKeyBuffer.makeStringAndClear() ) >>= aValue ) )
{
- OSL_ENSURE( false,
- "GetInteractionHandlerList - "
+ OSL_FAIL( "GetInteractionHandlerList - "
"Error getting item value!" );
continue;
}
@@ -1062,8 +1061,7 @@ UUIInteractionHelper::getInteractionHandlerList(
{
// getByHierarchicalName
- OSL_ENSURE( false,
- "GetInteractionHandlerList - "
+ OSL_FAIL( "GetInteractionHandlerList - "
"caught NoSuchElementException!" );
}
}
@@ -1075,7 +1073,7 @@ UUIInteractionHelper::getInteractionHandlerList(
}
catch ( uno::Exception const & )
{
- OSL_ENSURE( false, "GetInteractionHandlerList - Caught Exception!" );
+ OSL_FAIL( "GetInteractionHandlerList - Caught Exception!" );
}
}
@@ -1451,8 +1449,7 @@ UUIInteractionHelper::handleFutureDocumentVersionUpdateRequest(
s_bDeferredToNextSession = true;
break;
default:
- OSL_ENSURE( false,
- "UUIInteractionHelper::handleFutureDocumentVersionUpdateRequest: "
+ OSL_FAIL( "UUIInteractionHelper::handleFutureDocumentVersionUpdateRequest: "
"unexpected dialog return value!" );
break;
}
diff --git a/vbahelper/inc/vbahelper/vbahelper.hxx b/vbahelper/inc/vbahelper/vbahelper.hxx
index 31c427529f42..b3307ea8214e 100755
--- a/vbahelper/inc/vbahelper/vbahelper.hxx
+++ b/vbahelper/inc/vbahelper/vbahelper.hxx
@@ -261,14 +261,6 @@ public:
namespace ov = ooo::vba;
-#ifdef DEBUG
-# define SC_VBA_FIXME(a) OSL_TRACE( a )
-# define SC_VBA_STUB() SC_VBA_FIXME(( "%s - stubbed\n", __FUNCTION__ ))
-#else
-# define SC_VBA_FIXME(a)
-# define SC_VBA_STUB()
-#endif
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vbahelper/source/msforms/vbacontrol.hxx b/vbahelper/source/msforms/vbacontrol.hxx
index 1e239b8a4c82..0f7d171a4eb8 100755
--- a/vbahelper/source/msforms/vbacontrol.hxx
+++ b/vbahelper/source/msforms/vbacontrol.hxx
@@ -76,7 +76,7 @@ public:
void setGeometryHelper( ov::AbstractGeometryAttributes* pHelper );
// sets the name of the associated library ( used for UserForm controls )
void setLibraryAndCodeName( const rtl::OUString& sLibCodeName ) { m_sLibraryAndCodeName = sLibCodeName; }
- rtl::OUString getLibraryAndCodeName() { return m_sLibraryAndCodeName; }
+ rtl::OUString getLibraryAndCodeName() const { return m_sLibraryAndCodeName; }
// XControl
virtual sal_Bool SAL_CALL getEnabled() throw (css::uno::RuntimeException);
diff --git a/vbahelper/source/vbahelper/vbadocumentbase.cxx b/vbahelper/source/vbahelper/vbadocumentbase.cxx
index ea6b6e19ba6c..7c34a2c7609c 100755
--- a/vbahelper/source/vbahelper/vbadocumentbase.cxx
+++ b/vbahelper/source/vbahelper/vbadocumentbase.cxx
@@ -205,7 +205,7 @@ VbaDocumentBase::Protect( const uno::Any &aPassword ) throw (uno::RuntimeExcepti
{
rtl::OUString rPassword;
uno::Reference< util::XProtectable > xProt( getModel(), uno::UNO_QUERY_THROW );
- SC_VBA_FIXME(("Workbook::Protect stub"));
+ OSL_TRACE("Workbook::Protect stub");
if( aPassword >>= rPassword )
xProt->protect( rPassword );
else
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 432c0dbf2ed2..6ae161656bbc 100755
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -1787,7 +1787,7 @@ Db* DataBaseIterator::nextDb( rtl::OUString* o_pExtensionPath, rtl::OUString* o_
}
case END_REACHED:
- OSL_ENSURE( false, "DataBaseIterator::nextDb(): Invalid case END_REACHED" );
+ OSL_FAIL( "DataBaseIterator::nextDb(): Invalid case END_REACHED" );
break;
}
}
@@ -1913,7 +1913,7 @@ rtl::OUString KeyDataBaseFileIterator::nextDbFile( bool& o_rbExtension )
}
case END_REACHED:
- OSL_ENSURE( false, "DataBaseIterator::nextDbFile(): Invalid case END_REACHED" );
+ OSL_FAIL( "DataBaseIterator::nextDbFile(): Invalid case END_REACHED" );
break;
}
}
@@ -1987,7 +1987,7 @@ Reference< XHierarchicalNameAccess > JarFileIterator::nextJarFile
}
case END_REACHED:
- OSL_ENSURE( false, "JarFileIterator::nextJarFile(): Invalid case END_REACHED" );
+ OSL_FAIL( "JarFileIterator::nextJarFile(): Invalid case END_REACHED" );
break;
}
}
@@ -2120,7 +2120,7 @@ rtl::OUString IndexFolderIterator::nextIndexFolder( bool& o_rbExtension, bool& o
}
case END_REACHED:
- OSL_ENSURE( false, "IndexFolderIterator::nextIndexFolder(): Invalid case END_REACHED" );
+ OSL_FAIL( "IndexFolderIterator::nextIndexFolder(): Invalid case END_REACHED" );
break;
}
}
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx
index 991e978862e1..6b74767acbed 100755
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -1225,7 +1225,7 @@ rtl::OUString TreeFileIterator::nextTreeFile( sal_Int32& rnFileSize )
}
case END_REACHED:
- OSL_ENSURE( false, "DataBaseIterator::nextTreeFile(): Invalid case END_REACHED" );
+ OSL_FAIL( "DataBaseIterator::nextTreeFile(): Invalid case END_REACHED" );
break;
}
}
diff --git a/xmloff/source/chart/ColorPropertySet.cxx b/xmloff/source/chart/ColorPropertySet.cxx
index 273080566cc6..e4a8525f5a1f 100755
--- a/xmloff/source/chart/ColorPropertySet.cxx
+++ b/xmloff/source/chart/ColorPropertySet.cxx
@@ -156,7 +156,7 @@ void SAL_CALL ColorPropertySet::addPropertyChangeListener( const OUString& /* aP
lang::WrappedTargetException,
uno::RuntimeException)
{
- OSL_ENSURE( false, "Not Implemented" );
+ OSL_FAIL( "Not Implemented" );
return;
}
@@ -165,7 +165,7 @@ void SAL_CALL ColorPropertySet::removePropertyChangeListener( const OUString& /*
lang::WrappedTargetException,
uno::RuntimeException)
{
- OSL_ENSURE( false, "Not Implemented" );
+ OSL_FAIL( "Not Implemented" );
return;
}
@@ -174,7 +174,7 @@ void SAL_CALL ColorPropertySet::addVetoableChangeListener( const OUString& /* Pr
lang::WrappedTargetException,
uno::RuntimeException)
{
- OSL_ENSURE( false, "Not Implemented" );
+ OSL_FAIL( "Not Implemented" );
return;
}
@@ -183,7 +183,7 @@ void SAL_CALL ColorPropertySet::removeVetoableChangeListener( const OUString& /*
lang::WrappedTargetException,
uno::RuntimeException)
{
- OSL_ENSURE( false, "Not Implemented" );
+ OSL_FAIL( "Not Implemented" );
return;
}
diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx
index f9828fa04931..5b9fb7c56b0f 100755
--- a/xmloff/source/chart/SchXMLAxisContext.cxx
+++ b/xmloff/source/chart/SchXMLAxisContext.cxx
@@ -192,7 +192,7 @@ Reference< drawing::XShape > SchXMLAxisContext::getTitleShape()
aPropName = OUString::createFromAscii( "HasZAxisTitle" );
break;
case SCH_XML_AXIS_UNDEF:
- DBG_ERROR( "Invalid axis" );
+ OSL_TRACE( "Invalid axis" );
break;
}
xDiaProp->setPropertyValue( aPropName, uno::makeAny(sal_True) );
@@ -229,7 +229,7 @@ void SchXMLAxisContext::CreateGrid( OUString sAutoStyleName, bool bIsMajor )
aPropName = OUString::createFromAscii("HasZAxisHelpGrid");
break;
case SCH_XML_AXIS_UNDEF:
- DBG_ERROR( "Invalid axis" );
+ OSL_TRACE( "Invalid axis" );
break;
}
xDiaProp->setPropertyValue( aPropName, uno::makeAny(sal_True) );
@@ -376,7 +376,7 @@ Reference< chart2::XAxis > lcl_getAxis( const Reference< frame::XModel >& xChart
}
catch( uno::Exception & )
{
- DBG_ERROR( "Couldn't get axis" );
+ OSL_TRACE( "Couldn't get axis" );
}
return xAxis;
@@ -435,7 +435,7 @@ void SchXMLAxisContext::CreateAxis()
aPropName = OUString::createFromAscii("HasSecondaryXAxis");
break;
case SCH_XML_AXIS_UNDEF:
- DBG_ERROR( "Invalid axis" );
+ OSL_TRACE( "Invalid axis" );
break;
}
try
@@ -444,7 +444,7 @@ void SchXMLAxisContext::CreateAxis()
}
catch( beans::UnknownPropertyException & )
{
- DBG_ERROR( "Couldn't turn on axis" );
+ OSL_TRACE( "Couldn't turn on axis" );
}
if( m_aCurrentAxis.eDimension==SCH_XML_AXIS_Z )
{
@@ -455,7 +455,7 @@ void SchXMLAxisContext::CreateAxis()
}
catch( beans::UnknownPropertyException & )
{
- DBG_ERROR( "Couldn't turn on z axis" );
+ OSL_TRACE( "Couldn't turn on z axis" );
}
if( !bSettingZAxisSuccedded )
return;
@@ -472,7 +472,7 @@ void SchXMLAxisContext::CreateAxis()
}
catch( beans::UnknownPropertyException & )
{
- DBG_ERROR( "Couldn't turn on x axis" );
+ OSL_TRACE( "Couldn't turn on x axis" );
}
}
@@ -614,7 +614,7 @@ void SchXMLAxisContext::SetAxisTitle()
}
catch( beans::UnknownPropertyException & )
{
- DBG_ERROR( "Property String for Title not available" );
+ OSL_TRACE( "Property String for Title not available" );
}
}
}
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index db59ca5442dc..131b7a97e73e 100755
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -117,7 +117,7 @@ void lcl_MoveDataToCandleStickSeries(
}
catch( uno::Exception & )
{
- OSL_ENSURE( false, "Exception caught while moving data to candlestick series" );
+ OSL_FAIL( "Exception caught while moving data to candlestick series" );
}
}
@@ -177,7 +177,7 @@ void lcl_removeEmptyChartTypeGroups( const uno::Reference< chart2::XChartDocumen
{
String aStr( ex.Message );
ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US );
- DBG_ERROR1( "Exception caught while removing empty chart types: %s", aBStr.GetBuffer());
+ OSL_TRACE( "Exception caught while removing empty chart types: %s", aBStr.GetBuffer());
}
}
@@ -1245,4 +1245,4 @@ SvXMLImportContext* SchXMLTitleContext::CreateChildContext(
// ----------------------------------------
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index b9eb63d4ee8b..05e090be09dd 100755
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -380,7 +380,7 @@ Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Referen
catch( uno::Exception & ex )
{
(void)ex; // avoid warning for pro build
- OSL_ENSURE( false, OUStringToOString(
+ OSL_FAIL( OUStringToOString(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) +
OUString::createFromAscii( typeid( ex ).name()) +
OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) +
@@ -498,7 +498,7 @@ bool lcl_isSeriesAttachedToFirstAxis(
catch( uno::Exception & ex )
{
(void)ex; // avoid warning for pro build
- OSL_ENSURE( false, OUStringToOString(
+ OSL_FAIL( OUStringToOString(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) +
OUString::createFromAscii( typeid( ex ).name()) +
OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) +
@@ -955,7 +955,7 @@ void lcl_exportNumberFormat( const OUString& rPropertyName, const Reference< bea
#ifdef DBG_UTIL
String aStr( rEx.Message );
ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US );
- DBG_ERROR1( "chart:exporting error bar ranges: %s", aBStr.GetBuffer());
+ OSL_TRACE( "chart:exporting error bar ranges: %s", aBStr.GetBuffer());
#else
(void)rEx; // avoid warning
#endif
@@ -1990,7 +1990,7 @@ void SchXMLExportHelper_Impl::exportPlotArea(
#ifdef DBG_UTIL
String aStr( rEx.Message );
ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US );
- DBG_ERROR1( "chart:TableNumberList property caught: %s", aBStr.GetBuffer());
+ OSL_TRACE( "chart:TableNumberList property caught: %s", aBStr.GetBuffer());
#else
(void)rEx; // avoid warning
#endif
@@ -2027,7 +2027,7 @@ void SchXMLExportHelper_Impl::exportPlotArea(
#ifdef DBG_UTIL
String aStr( rEx.Message );
ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US );
- DBG_ERROR1( "chart:exportPlotAreaException caught: %s", aBStr.GetBuffer());
+ OSL_TRACE( "chart:exportPlotAreaException caught: %s", aBStr.GetBuffer());
#else
(void)rEx; // avoid warning
#endif
@@ -2919,7 +2919,7 @@ void SchXMLExportHelper_Impl::exportSeries(
catch( uno::Exception & rEx )
{
(void)rEx; // avoid warning for pro build
- DBG_ERROR1( "Exception caught during Export of series - optional DataMeanValueProperties not available: %s",
+ OSL_TRACE( "Exception caught during Export of series - optional DataMeanValueProperties not available: %s",
OUStringToOString( rEx.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
}
@@ -2967,7 +2967,7 @@ void SchXMLExportHelper_Impl::exportSeries(
catch( uno::Exception & rEx )
{
(void)rEx; // avoid warning for pro build
- DBG_ERROR1( "Exception caught during Export of series - optional DataErrorProperties not available: %s",
+ OSL_TRACE( "Exception caught during Export of series - optional DataErrorProperties not available: %s",
OUStringToOString( rEx.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
}
@@ -3043,7 +3043,7 @@ void SchXMLExportHelper_Impl::exportRegressionCurve(
catch( uno::Exception & rEx )
{
(void)rEx; // avoid warning for pro build
- DBG_ERROR1( "Exception caught during Export of series - optional DataRegressionProperties not available: %s",
+ OSL_TRACE( "Exception caught during Export of series - optional DataRegressionProperties not available: %s",
OUStringToOString( rEx.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
}
@@ -3317,7 +3317,7 @@ void SchXMLExportHelper_Impl::exportDataPoints(
catch( uno::Exception & rEx )
{
(void)rEx; // avoid warning for pro build
- DBG_ERROR1( "Exception caught during Export of data point: %s",
+ OSL_TRACE( "Exception caught during Export of data point: %s",
OUStringToOString( rEx.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
}
}
@@ -3389,7 +3389,7 @@ void SchXMLExportHelper_Impl::exportDataPoints(
catch( uno::Exception & rEx )
{
(void)rEx; // avoid warning for pro build
- DBG_ERROR1( "Exception caught during Export of data point: %s",
+ OSL_TRACE( "Exception caught during Export of data point: %s",
OUStringToOString( rEx.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
}
if( xPropSet.is())
@@ -3769,7 +3769,7 @@ void SchXMLExportHelper_Impl::InitRangeSegmentationProperties( const Reference<
catch( uno::Exception & ex )
{
(void)ex; // avoid warning for pro build
- OSL_ENSURE( false, OUStringToOString(
+ OSL_FAIL( OUStringToOString(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) +
OUString::createFromAscii( typeid( ex ).name()) +
OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) +
diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx
index 16a54e367509..387f3a453eda 100755
--- a/xmloff/source/chart/SchXMLImport.cxx
+++ b/xmloff/source/chart/SchXMLImport.cxx
@@ -485,7 +485,7 @@ void SchXMLImportHelper::DeleteDataSeries(
catch( uno::Exception & ex )
{
(void)ex; // avoid warning for pro build
- OSL_ENSURE( false, OUStringToOString(
+ OSL_FAIL( OUStringToOString(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) +
OUString::createFromAscii( typeid( ex ).name()) +
OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) +
@@ -568,7 +568,7 @@ Reference< chart2::XDataSeries > SchXMLImportHelper::GetNewDataSeries(
catch( uno::Exception & ex )
{
(void)ex; // avoid warning for pro build
- OSL_ENSURE( false, OUStringToOString(
+ OSL_FAIL( OUStringToOString(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) +
OUString::createFromAscii( typeid( ex ).name()) +
OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) +
@@ -581,7 +581,7 @@ Reference< chart2::XDataSeries > SchXMLImportHelper::GetNewDataSeries(
Reference< chart2::data::XLabeledDataSequence > SchXMLImportHelper::GetNewLabeledDataSequence()
{
// @todo: remove this asap
- OSL_ENSURE( false, "Do not call this method" );
+ OSL_FAIL( "Do not call this method" );
Reference< chart2::data::XLabeledDataSequence > xResult;
// DO NOT USED -- DEPRECATED. Use SchXMLTools::GetNewLabeledDataSequence() instead
return xResult;
@@ -780,7 +780,7 @@ void SAL_CALL SchXMLImport::setTargetDocument( const uno::Reference< lang::XComp
#ifdef DBG_UTIL
String aStr( rEx.Message );
ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US );
- DBG_ERROR1( "SchXMLChartContext::StartElement(): Exception caught: %s", aBStr.GetBuffer());
+ OSL_TRACE( "SchXMLChartContext::StartElement(): Exception caught: %s", aBStr.GetBuffer());
#else
(void)rEx; // avoid warning for pro build
#endif
diff --git a/xmloff/source/chart/SchXMLLegendContext.cxx b/xmloff/source/chart/SchXMLLegendContext.cxx
index 6220fdfca46a..e97214645c62 100755
--- a/xmloff/source/chart/SchXMLLegendContext.cxx
+++ b/xmloff/source/chart/SchXMLLegendContext.cxx
@@ -118,7 +118,7 @@ void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttribu
}
catch( beans::UnknownPropertyException )
{
- DBG_ERROR( "Property HasLegend not found" );
+ OSL_TRACE( "Property HasLegend not found" );
}
}
@@ -126,7 +126,7 @@ void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttribu
uno::Reference< beans::XPropertySet > xLegendProps( xLegendShape, uno::UNO_QUERY );
if( !xLegendShape.is() || !xLegendProps.is() )
{
- DBG_ERROR( "legend could not be created" );
+ OSL_TRACE( "legend could not be created" );
return;
}
@@ -164,7 +164,7 @@ void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttribu
}
catch( beans::UnknownPropertyException )
{
- DBG_ERROR( "Property Alignment (legend) not found" );
+ OSL_TRACE( "Property Alignment (legend) not found" );
}
}
break;
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index 66cc842761bf..41288969af64 100755
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -132,7 +132,7 @@ void SchXML3DSceneAttributesHelper::getCameraDefaultFromDiagram( const uno::Refe
#ifdef DBG_UTIL
String aStr( rEx.Message );
ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US );
- DBG_ERROR1( "Exception caught for property NumberOfLines: %s", aBStr.GetBuffer());
+ OSL_TRACE( "Exception caught for property NumberOfLines: %s", aBStr.GetBuffer());
#else
(void)rEx; // avoid warning for pro build
#endif
@@ -437,7 +437,7 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri
#ifdef DBG_UTIL
String aStr( rEx.Message );
ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US );
- DBG_ERROR1( "PlotAreaContext:EndElement(): Exception caught: %s", aBStr.GetBuffer());
+ OSL_TRACE( "PlotAreaContext:EndElement(): Exception caught: %s", aBStr.GetBuffer());
#else
(void)rEx; // avoid warning for pro build
#endif
@@ -614,7 +614,7 @@ void SchXMLPlotAreaContext::EndElement()
#ifdef DBG_UTIL
String aStr( rEx.Message );
ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US );
- DBG_ERROR1( "Exception caught for property NumberOfLines: %s", aBStr.GetBuffer());
+ OSL_TRACE( "Exception caught for property NumberOfLines: %s", aBStr.GetBuffer());
#else
(void)rEx; // avoid warning for pro build
#endif
@@ -636,7 +636,7 @@ void SchXMLPlotAreaContext::EndElement()
#ifdef DBG_UTIL
String aStr( rEx.Message );
ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US );
- DBG_ERROR1( "Exception caught for property Volume: %s", aBStr.GetBuffer());
+ OSL_TRACE( "Exception caught for property Volume: %s", aBStr.GetBuffer());
#else
(void)rEx; // avoid warning for pro build
#endif
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index ace38d5bab71..d9fd9fdf5e53 100755
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -464,7 +464,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
catch( uno::Exception & ex )
{
(void)ex; // avoid warning for pro build
- OSL_ENSURE( false, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) +
::rtl::OUString::createFromAscii( typeid( ex ).name()) +
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) +
@@ -855,7 +855,7 @@ void SchXMLSeries2Context::setStylesToSeries( SeriesDefaultsAndStyles& rSeriesDe
catch( uno::Exception & rEx )
{
(void)rEx; // avoid warning for pro build
- DBG_ERROR1( "Exception caught during setting styles to series: %s",
+ OSL_TRACE( "Exception caught during setting styles to series: %s",
OUStringToOString( rEx.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
}
}
@@ -939,7 +939,7 @@ void SchXMLSeries2Context::setStylesToStatisticsObjects( SeriesDefaultsAndStyles
catch( uno::Exception & rEx )
{
(void)rEx; // avoid warning for pro build
- DBG_ERROR1( "Exception caught during setting styles to series: %s",
+ OSL_TRACE( "Exception caught during setting styles to series: %s",
OUStringToOString( rEx.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
}
}
@@ -1038,7 +1038,7 @@ void SchXMLSeries2Context::setStylesToDataPoints( SeriesDefaultsAndStyles& rSeri
catch( uno::Exception & rEx )
{
(void)rEx; // avoid warning for pro build
- DBG_ERROR1( "Exception caught during setting styles to data points: %s",
+ OSL_TRACE( "Exception caught during setting styles to data points: %s",
OUStringToOString( rEx.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
}
}
diff --git a/xmloff/source/chart/SchXMLSeriesHelper.cxx b/xmloff/source/chart/SchXMLSeriesHelper.cxx
index 0b0c3325abdc..4519b2c12ddd 100755
--- a/xmloff/source/chart/SchXMLSeriesHelper.cxx
+++ b/xmloff/source/chart/SchXMLSeriesHelper.cxx
@@ -83,7 +83,7 @@ using ::rtl::OUString;
{
(void)ex; // avoid warning for pro build
- OSL_ENSURE( false, OUStringToOString( OUString(
+ OSL_FAIL( OUStringToOString( OUString(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) +
OUString::createFromAscii( typeid( ex ).name()) +
OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) +
@@ -220,7 +220,7 @@ Reference< chart2::XDataSeries > SchXMLSeriesHelper::getFirstCandleStickSeries(
}
catch( const uno::Exception & )
{
- OSL_ENSURE( false, "Exception caught" );
+ OSL_FAIL( "Exception caught" );
}
return xResult;
}
@@ -253,7 +253,7 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPISeriesProp
catch( uno::Exception & rEx )
{
(void)rEx; // avoid warning for pro build
- DBG_ERROR1( "Exception caught SchXMLSeriesHelper::createOldAPISeriesPropertySet: %s",
+ OSL_TRACE( "Exception caught SchXMLSeriesHelper::createOldAPISeriesPropertySet: %s",
OUStringToOString( rEx.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
}
}
@@ -292,7 +292,7 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPIDataPointP
{
(void)rEx; // avoid warning for pro build
- DBG_ERROR1( "Exception caught SchXMLSeriesHelper::createOldAPIDataPointPropertySet: %s",
+ OSL_TRACE( "Exception caught SchXMLSeriesHelper::createOldAPIDataPointPropertySet: %s",
OUStringToOString( rEx.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
}
}
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx
index a3cd18e98b31..1158cc7487ee 100755
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -493,7 +493,7 @@ void CreateCategories(
catch( const lang::IllegalArgumentException & ex )
{
(void)ex; // avoid warning for pro build
- OSL_ENSURE( false, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IllegalArgumentException caught, Message: " )) +
ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
}
@@ -515,7 +515,7 @@ void CreateCategories(
}
catch( uno::Exception & )
{
- OSL_ENSURE( false, "Exception caught while creating Categories" );
+ OSL_FAIL( "Exception caught while creating Categories" );
}
}
@@ -670,7 +670,7 @@ void setXMLRangePropertyAtDataSequence(
catch( const uno::Exception & ex )
{
(void)ex; // avoid warning for pro build
- OSL_ENSURE( false, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught, Message: " )) +
ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
}
@@ -700,7 +700,7 @@ bool getXMLRangePropertyFromDataSequence(
catch( const uno::Exception & ex )
{
(void)ex; // avoid warning for pro build
- OSL_ENSURE( false, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught, Message: " )) +
ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
}
@@ -735,7 +735,7 @@ void copyProperties(
}
catch( const uno::Exception & )
{
- OSL_ENSURE( false, "Copying property sets failed!" );
+ OSL_FAIL( "Copying property sets failed!" );
}
}
diff --git a/xmloff/source/core/RDFaExportHelper.cxx b/xmloff/source/core/RDFaExportHelper.cxx
index 44443be77f5e..952c7cf6d229 100755
--- a/xmloff/source/core/RDFaExportHelper.cxx
+++ b/xmloff/source/core/RDFaExportHelper.cxx
@@ -224,7 +224,7 @@ RDFaExportHelper::AddRDFa(
}
catch (uno::Exception &)
{
- OSL_ENSURE(false, "AddRDFa: exception");
+ OSL_FAIL("AddRDFa: exception");
}
}
diff --git a/xmloff/source/core/RDFaImportHelper.cxx b/xmloff/source/core/RDFaImportHelper.cxx
index 2e4c5db72677..043b9f70e5fa 100755
--- a/xmloff/source/core/RDFaImportHelper.cxx
+++ b/xmloff/source/core/RDFaImportHelper.cxx
@@ -308,7 +308,7 @@ RDFaInserter::MakeURI( ::rtl::OUString const & i_rURI) const
}
catch (uno::Exception &)
{
- OSL_ENSURE(false, "MakeURI: cannot create URI");
+ OSL_FAIL("MakeURI: cannot create URI");
return 0;
}
}
@@ -403,7 +403,7 @@ void RDFaInserter::InsertRDFaEntry(
}
catch (uno::Exception &)
{
- OSL_ENSURE(false, "InsertRDFaEntry: setStatementRDFa failed?");
+ OSL_FAIL("InsertRDFaEntry: setStatementRDFa failed?");
}
}
@@ -455,12 +455,12 @@ RDFaImportHelper::AddRDFa(
{
if (!i_xObject.is())
{
- OSL_ENSURE(false, "AddRDFa: invalid arg: null textcontent");
+ OSL_FAIL("AddRDFa: invalid arg: null textcontent");
return;
}
if (!i_pRDFaAttributes.get())
{
- OSL_ENSURE(false, "AddRDFa: invalid arg: null RDFa attributes");
+ OSL_FAIL("AddRDFa: invalid arg: null RDFa attributes");
return;
}
m_RDFaEntries.push_back(RDFaEntry(i_xObject, i_pRDFaAttributes));
diff --git a/xmloff/source/core/xmlerror.cxx b/xmloff/source/core/xmlerror.cxx
index eab068a829b5..640720166428 100755
--- a/xmloff/source/core/xmlerror.cxx
+++ b/xmloff/source/core/xmlerror.cxx
@@ -195,7 +195,7 @@ void XMLErrors::AddRecord(
// convert to byte string and signal the error
ByteString aError( String( sMessage.makeStringAndClear() ),
RTL_TEXTENCODING_ASCII_US );
- DBG_ERROR( aError.GetBuffer() );
+ OSL_FAIL( aError.GetBuffer() );
#endif
}
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 7a37ec054e0b..eac3025029ea 100755
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -2503,7 +2503,7 @@ SvXMLExport::AddAttributeXmlId(uno::Reference<uno::XInterface> const & i_xIfc)
}
else
{
- OSL_ENSURE(false, "SvXMLExport::AddAttributeXmlId: "
+ OSL_FAIL("SvXMLExport::AddAttributeXmlId: "
"invalid stream name");
}
}
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 0a808c2281e9..44a8adc7c824 100755
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -1049,19 +1049,15 @@ XMLShapeImportHelper* SvXMLImport::CreateShapeImport()
return new XMLShapeImportHelper( *this, mxModel );
}
-#ifndef SVX_LIGHT
SchXMLImportHelper* SvXMLImport::CreateChartImport()
{
return new SchXMLImportHelper();
}
-#endif
-#ifndef SVX_LIGHT
::xmloff::OFormLayerXMLImport* SvXMLImport::CreateFormImport()
{
return new ::xmloff::OFormLayerXMLImport(*this);
}
-#endif // #ifndef SVX_LIGHT
///////////////////////////////////////////////////////////////////////////////
@@ -1492,7 +1488,6 @@ void SvXMLImport::AddNumberStyle(sal_Int32 nKey, const OUString& rName)
XMLEventImportHelper& SvXMLImport::GetEventImport()
{
-#ifndef SVX_LIGHT
if (!mpEventImportHelper)
{
// construct event helper and register StarBasic handler and standard
@@ -1511,7 +1506,6 @@ XMLEventImportHelper& SvXMLImport::GetEventImport()
mpEventImportHelper->RegisterFactory(sStarBasicCap,
new XMLStarBasicContextFactory());
}
-#endif
return *mpEventImportHelper;
}
@@ -1558,10 +1552,8 @@ void SvXMLImport::SetAutoStyles( SvXMLStylesContext *pAutoStyles )
mxAutoStyles = pAutoStyles;
GetTextImport()->SetAutoStyles( pAutoStyles );
GetShapeImport()->SetAutoStylesContext( pAutoStyles );
-#ifndef SVX_LIGHT
GetChartImport()->SetAutoStylesContext( pAutoStyles );
GetFormImport()->setAutoStyleContext( pAutoStyles );
-#endif
}
void SvXMLImport::SetMasterStyles( SvXMLStylesContext *pMasterStyles )
@@ -1974,7 +1966,7 @@ void SvXMLImport::SetXmlId(uno::Reference<uno::XInterface> const & i_xIfc,
}
}
} catch (uno::Exception &) {
- OSL_ENSURE(false, "SvXMLImport::SetXmlId: exception?");
+ OSL_FAIL("SvXMLImport::SetXmlId: exception?");
}
}
}
diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx
index 4a6a90f9b3e4..70db6e776a39 100755
--- a/xmloff/source/draw/XMLNumberStyles.cxx
+++ b/xmloff/source/draw/XMLNumberStyles.cxx
@@ -328,8 +328,6 @@ const SdXMLFixedDataStyle* aSdXMLFixedTimeFormats[SdXMLTimeFormatCount] =
///////////////////////////////////////////////////////////////////////
// export
-#ifndef SVX_LIGHT
-
static void SdXMLExportDataStyleNumber( SdXMLExport& rExport, SdXMLDataStyleNumber& rElement )
{
if( rElement.mbDecimal02 )
@@ -492,8 +490,6 @@ OUString SdXMLNumberStylesExporter::getDateStyleName(const sal_Int32 nDateFormat
}
}
-#endif // #ifndef SVX_LIGHT
-
///////////////////////////////////////////////////////////////////////
// import
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 645b960992d8..29db93ca8226 100755
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -1947,7 +1947,7 @@ void SdXMLExport::_ExportContent()
}
catch( Exception& )
{
- DBG_ERROR(" no \"BookmarkURL\" property at page?" );
+ OSL_FAIL(" no \"BookmarkURL\" property at page?" );
}
}
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 1bfebed19251..7a04bdca2e03 100755
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -1702,7 +1702,6 @@ void SdXMLControlShapeContext::StartElement(const uno::Reference< xml::sax::XAtt
DBG_ASSERT( maFormId.getLength(), "draw:control without a form:id attribute!" );
if( maFormId.getLength() )
{
-#ifndef SVX_LIGHT
if( GetImport().IsFormsSupported() )
{
uno::Reference< awt::XControlModel > xControlModel( GetImport().GetFormImport()->lookupControl( maFormId ), uno::UNO_QUERY );
@@ -1714,7 +1713,6 @@ void SdXMLControlShapeContext::StartElement(const uno::Reference< xml::sax::XAtt
}
}
-#endif // #ifndef SVX_LIGHT
}
SetStyle();
@@ -2512,14 +2510,12 @@ void SdXMLChartShapeContext::StartElement(const uno::Reference< xml::sax::XAttri
aAny <<= aCLSID;
xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("CLSID") ), aAny );
-#ifndef SVX_LIGHT
aAny = xProps->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Model") ) );
uno::Reference< frame::XModel > xChartModel;
if( aAny >>= xChartModel )
{
mpChartContext = GetImport().GetChartImport()->CreateChartContext( GetImport(), XML_NAMESPACE_SVG, GetXMLToken(XML_CHART), xChartModel, xAttrList );
}
-#endif
}
}
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index 4b1c586d312e..cddba2e0e02e 100755
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -375,7 +375,7 @@ namespace xmloff
::rtl::OString aMessage( "OElementImport::implApplyGenericProperties: encountered an unknown property (" );
aMessage += ::rtl::OUStringToOString( aPropValues->Name, RTL_TEXTENCODING_ASCII_US );
aMessage += "), but component is no PropertyBag!";
- OSL_ENSURE( false, aMessage.getStr() );
+ OSL_FAIL( aMessage.getStr() );
#endif
continue;
}
@@ -411,7 +411,7 @@ namespace xmloff
if ( bPropIsSequence != bValueIsSequence )
{
- OSL_ENSURE( false, "OElementImport::implApplyGenericProperties: either both value and property should be a sequence, or none of them!" );
+ OSL_FAIL( "OElementImport::implImportGenericProperties: either both value and property should be a sequence, or none of them!" );
continue;
}
@@ -465,13 +465,13 @@ namespace xmloff
aPropValues->Value <<= static_cast< sal_Int64 >( nVal );
break;
default:
- OSL_ENSURE( false, "OElementImport::implApplyGenericProperties: unsupported value type!" );
+ OSL_FAIL( "OElementImport::implImportGenericProperties: unsupported value type!" );
break;
}
}
break;
default:
- OSL_ENSURE( false, "OElementImport::implApplyGenericProperties: non-double values not supported!" );
+ OSL_FAIL( "OElementImport::implImportGenericProperties: non-double values not supported!" );
break;
}
}
diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx
index d4fe9f86948e..e10920dd4187 100755
--- a/xmloff/source/forms/layerexport.cxx
+++ b/xmloff/source/forms/layerexport.cxx
@@ -780,12 +780,7 @@ namespace xmloff
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("US")),
::rtl::OUString()
);
- // #110680#
- //Reference< XInterface > xFormatsSupplierUntyped =
- // ::comphelper::getProcessServiceFactory()->createInstanceWithArguments(
- // SERVICE_NUMBERFORMATSSUPPLIER,
- // aSupplierArgs
- // );
+
Reference< XInterface > xFormatsSupplierUntyped =
m_rContext.getServiceFactory()->createInstanceWithArguments(
SERVICE_NUMBERFORMATSSUPPLIER,
diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx
index e58df16726eb..d8eddeabd570 100755
--- a/xmloff/source/forms/layerimport.cxx
+++ b/xmloff/source/forms/layerimport.cxx
@@ -535,7 +535,7 @@ SvXMLImportContext* OFormLayerXMLImport_Impl::createContext(const sal_uInt16 _nP
if ( !pContext )
{
- OSL_ENSURE( false, "unknown element" );
+ OSL_FAIL( "unknown element" );
pContext =
new SvXMLImportContext(m_rImporter, _nPrefix, _rLocalName);
}
diff --git a/xmloff/source/forms/layerimport.hxx b/xmloff/source/forms/layerimport.hxx
index 999156e213fb..34cbbe6d1b6c 100755
--- a/xmloff/source/forms/layerimport.hxx
+++ b/xmloff/source/forms/layerimport.hxx
@@ -55,27 +55,6 @@ namespace xmloff
class OAttribute2Property;
//=====================================================================
- //= ControlReference
- //=====================================================================
- /// a structure containing a property set (the referred control) and a string (the list of referring controls)
-/* struct ControlReference
- {
- ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
- xReferredControl;
- ::rtl::OUString
- sReferringControls;
-
- ControlReference(
- const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxReferredControl,
- const ::rtl::OUString& _rReferringControls)
- :xReferredControl(_rxReferredControl)
- ,sReferringControls(_rReferringControls)
- {
- }
- };
-*/
-
- //=====================================================================
//= OFormLayerXMLImport_Impl
//=====================================================================
class OFormLayerXMLImport_Impl
diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx
index f250821a5c5d..47d2ab6d7c01 100755
--- a/xmloff/source/forms/propertyimport.cxx
+++ b/xmloff/source/forms/propertyimport.cxx
@@ -463,7 +463,6 @@ void OSinglePropertyContext::StartElement(const Reference< sax::XAttributeList >
for( sal_Int16 i=0; i < nAttrCount; i++ )
{
const ::rtl::OUString& rAttrName = _rxAttrList->getNameByIndex( i );
- //const ::rtl::OUString& rValue = _rxAttrList->getValueByIndex( i );
::rtl::OUString aLocalName;
sal_uInt16 nPrefix =
@@ -546,8 +545,7 @@ void OListPropertyContext::StartElement( const Reference< sax::XAttributeList >&
}
else
{
- OSL_ENSURE( false,
- ::rtl::OString( "OListPropertyContext::StartElement: unknown child element (\"")
+ OSL_FAIL( ::rtl::OString( "OListPropertyContext::StartElement: unknown child element (\"")
+= ::rtl::OString( sAttributeName.getStr(), sAttributeName.getLength(), RTL_TEXTENCODING_ASCII_US )
+= ::rtl::OString( "\")!" ) );
}
@@ -632,8 +630,7 @@ void OListValueContext::StartElement( const Reference< sax::XAttributeList >& _r
}
}
- OSL_ENSURE( false,
- ::rtl::OString( "OListValueContext::StartElement: unknown child element (\"")
+ OSL_FAIL( ::rtl::OString( "OListValueContext::StartElement: unknown child element (\"")
+= ::rtl::OString( sAttributeName.getStr(), sAttributeName.getLength(), RTL_TEXTENCODING_ASCII_US )
+= ::rtl::OString( "\")!" ) );
}
diff --git a/xmloff/source/meta/MetaImportComponent.cxx b/xmloff/source/meta/MetaImportComponent.cxx
index 115f16e941ca..a58cecb1f707 100755
--- a/xmloff/source/meta/MetaImportComponent.cxx
+++ b/xmloff/source/meta/MetaImportComponent.cxx
@@ -113,7 +113,6 @@ uno::Reference< uno::XInterface > SAL_CALL XMLMetaImportComponent_createInstance
throw( uno::Exception )
{
// #110680#
- // return (cppu::OWeakObject*)new XMLMetaImportComponent;
return (cppu::OWeakObject*)new XMLMetaImportComponent(rSMgr);
}
diff --git a/xmloff/source/meta/xmlmetae.cxx b/xmloff/source/meta/xmlmetae.cxx
index 029eb2f39362..e50be583d072 100755
--- a/xmloff/source/meta/xmlmetae.cxx
+++ b/xmloff/source/meta/xmlmetae.cxx
@@ -351,7 +351,6 @@ SvXMLMetaExport::~SvXMLMetaExport()
void SvXMLMetaExport::Export()
{
-// exportDom(xDOM, mrExport); // this would not work (root node, namespaces)
uno::Reference< xml::sax::XSAXSerializable> xSAXable(mxDocProps,
uno::UNO_QUERY);
if (xSAXable.is()) {
diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx
index cd23f7b0e200..8163dd5adbb1 100755
--- a/xmloff/source/meta/xmlversion.cxx
+++ b/xmloff/source/meta/xmlversion.cxx
@@ -383,7 +383,6 @@ void SAL_CALL XMLVersionListPersistence::store( const uno::Reference< embed::XSt
Reference< XDocumentHandler > xHandler( xWriter, uno::UNO_QUERY );
- // XMLVersionListExport aExp( pList, sVerName, xHandler );
XMLVersionListExport aExp( xServiceFactory, rVersions, sVerName, xHandler );
aExp.exportDoc( ::xmloff::token::XML_VERSION );
@@ -445,7 +444,6 @@ uno::Sequence< util::RevisionTag > SAL_CALL XMLVersionListPersistence::load( con
"XMLReader::Read: com.sun.star.xml.sax.Parser service missing" );
// get filter
- // Reference< XDocumentHandler > xFilter = new XMLVersionListImport( pList );
Reference< XDocumentHandler > xFilter = new XMLVersionListImport( xServiceFactory, aVersions );
// connect parser and filter
diff --git a/xmloff/source/script/XMLEventExport.cxx b/xmloff/source/script/XMLEventExport.cxx
index 28f209af9c24..ebb339348097 100755
--- a/xmloff/source/script/XMLEventExport.cxx
+++ b/xmloff/source/script/XMLEventExport.cxx
@@ -159,7 +159,7 @@ void XMLEventExport::Export( Reference<XNameAccess> & rAccess,
// don't proceed further
::rtl::OString aStr("Unknown event name:" );
aStr += ::rtl::OUStringToOString( aNames[i], RTL_TEXTENCODING_UTF8 );
- DBG_ERROR( aStr.getStr() );
+ OSL_FAIL( aStr.getStr() );
}
#endif
}
@@ -209,7 +209,7 @@ void XMLEventExport::ExportSingleEvent(
// don't proceed further
::rtl::OString aStr("Unknown event name:" );
aStr += ::rtl::OUStringToOString( rApiEventName, RTL_TEXTENCODING_UTF8 );
- DBG_ERROR( aStr.getStr() );
+ OSL_FAIL( aStr.getStr() );
}
#endif
}
diff --git a/xmloff/source/script/XMLEventsImportContext.cxx b/xmloff/source/script/XMLEventsImportContext.cxx
index 6e18f3b28169..3ce8cec3eec9 100755
--- a/xmloff/source/script/XMLEventsImportContext.cxx
+++ b/xmloff/source/script/XMLEventsImportContext.cxx
@@ -87,15 +87,6 @@ XMLEventsImportContext::~XMLEventsImportContext()
{
// // if, for whatever reason, the object gets destroyed prematurely,
// // we need to delete the collected events
-// EventsVector::iterator aEnd = aCollectEvents.end();
-// for(EventsVector::iterator aIter = aCollectEvents.begin();
-// aIter != aEnd;
-// aIter++)
-// {
-// EventNameValuesPair* pPair = &(*aIter);
-// delete pPair;
-// }
-// aCollectEvents.clear();
}
@@ -175,8 +166,6 @@ void XMLEventsImportContext::SetEvents(
++aIter)
{
AddEventValues(aIter->first, aIter->second);
-// EventNameValuesPair* pPair = &(*aIter);
-// delete pPair;
}
aCollectEvents.clear();
}
@@ -235,9 +224,6 @@ void XMLEventsImportContext::AddEventValues(
}
else
{
-// EventNameValuesPair* aPair = new EventNameValuesPair(rEventName,
-// rValues);
-// aCollectEvents.push_back(*aPair);
EventNameValuesPair aPair(rEventName, rValues);
aCollectEvents.push_back(aPair);
}
diff --git a/xmloff/source/script/XMLStarBasicContextFactory.cxx b/xmloff/source/script/XMLStarBasicContextFactory.cxx
index 208a4713a45b..51c2050be4bc 100755
--- a/xmloff/source/script/XMLStarBasicContextFactory.cxx
+++ b/xmloff/source/script/XMLStarBasicContextFactory.cxx
@@ -80,18 +80,6 @@ SvXMLImportContext* XMLStarBasicContextFactory::CreateContext(
if (XML_NAMESPACE_SCRIPT == nPrefix)
{
-// if (IsXMLToken(sLocalName, XML_LIBRARY))
-// {
-// sLibraryVal = xAttrList->getValueByIndex(nAttr);
-// }
-// if (IsXMLToken(sLocalName, XML_LOCATION))
-// {
-// sLibraryVal = xAttrList->getValueByIndex(nAttr);
-// if ( IsXMLToken( sLibraryVal, XML_APPLICATION ) )
-// sLibraryVal =
-// OUString(RTL_CONSTASCII_USTRINGPARAM("StarOffice"));
-// }
-// else
if (IsXMLToken(sLocalName, XML_MACRO_NAME))
{
sMacroNameVal = xAttrList->getValueByIndex(nAttr);
diff --git a/xmloff/source/style/DashStyle.cxx b/xmloff/source/style/DashStyle.cxx
index 6f0e403f607a..97f187b5178e 100755
--- a/xmloff/source/style/DashStyle.cxx
+++ b/xmloff/source/style/DashStyle.cxx
@@ -221,8 +221,6 @@ sal_Bool XMLDashStyleImport::importXML(
// Export
//-------------------------------------------------------------
-#ifndef SVX_LIGHT
-
XMLDashStyleExport::XMLDashStyleExport( SvXMLExport& rExp )
: rExport(rExp)
{
@@ -330,6 +328,4 @@ sal_Bool XMLDashStyleExport::exportXML(
return bRet;
}
-#endif // #ifndef SVX_LIGHT
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/style/FillStyleContext.cxx b/xmloff/source/style/FillStyleContext.cxx
index 945a42aae6e5..305b4932a2db 100755
--- a/xmloff/source/style/FillStyleContext.cxx
+++ b/xmloff/source/style/FillStyleContext.cxx
@@ -57,8 +57,6 @@ XMLGradientStyleContext::XMLGradientStyleContext( SvXMLImport& rImport, sal_uInt
const uno::Reference< xml::sax::XAttributeList >& xAttrList)
: SvXMLStyleContext(rImport, nPrfx, rLName, xAttrList)
{
- // set Family
-// SetFamily( XML_STYLE_FAMILY_FILLSTYLE_GRADIENT_ID );
// start import
XMLGradientStyleImport aGradientStyle( GetImport() );
diff --git a/xmloff/source/style/GradientStyle.cxx b/xmloff/source/style/GradientStyle.cxx
index 9ba744aea6fd..c468f2907d1e 100755
--- a/xmloff/source/style/GradientStyle.cxx
+++ b/xmloff/source/style/GradientStyle.cxx
@@ -235,8 +235,6 @@ sal_Bool XMLGradientStyleImport::importXML(
// Export
//-------------------------------------------------------------
-#ifndef SVX_LIGHT
-
XMLGradientStyleExport::XMLGradientStyleExport(
SvXMLExport& rExp )
: rExport(rExp)
@@ -342,6 +340,4 @@ sal_Bool XMLGradientStyleExport::exportXML(
return bRet;
}
-#endif // #ifndef SVX_LIGHT
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/style/HatchStyle.cxx b/xmloff/source/style/HatchStyle.cxx
index c8a2be62a269..ded1ad105cb7 100755
--- a/xmloff/source/style/HatchStyle.cxx
+++ b/xmloff/source/style/HatchStyle.cxx
@@ -189,8 +189,6 @@ sal_Bool XMLHatchStyleImport::importXML(
// Export
//-------------------------------------------------------------
-#ifndef SVX_LIGHT
-
XMLHatchStyleExport::XMLHatchStyleExport( SvXMLExport& rExp )
: rExport(rExp)
{
@@ -261,6 +259,4 @@ sal_Bool XMLHatchStyleExport::exportXML(
return bRet;
}
-#endif // #ifndef SVX_LIGHT
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/style/ImageStyle.cxx b/xmloff/source/style/ImageStyle.cxx
index 89f19482ca72..f306ede9eaa3 100755
--- a/xmloff/source/style/ImageStyle.cxx
+++ b/xmloff/source/style/ImageStyle.cxx
@@ -56,8 +56,6 @@ enum SvXMLTokenMapAttrs
XML_TOK_IMAGE_TYPE,
XML_TOK_IMAGE_SHOW,
XML_TOK_IMAGE_ACTUATE,
- /* XML_TOK_IMAGE_SIZEW,
- XML_TOK_IMAGE_SIZEH,*/
XML_TOK_TABSTOP_END=XML_TOK_UNKNOWN
};
@@ -70,8 +68,6 @@ XMLImageStyle::~XMLImageStyle()
{
}
-#ifndef SVX_LIGHT
-
sal_Bool XMLImageStyle::exportXML( const OUString& rStrName, const ::com::sun::star::uno::Any& rValue, SvXMLExport& rExport )
{
return ImpExportXML( rStrName, rValue, rExport );
@@ -108,18 +104,7 @@ sal_Bool XMLImageStyle::ImpExportXML( const OUString& rStrName, const uno::Any&
rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD );
}
-/*
- // size
- awt::Size aSize = xBitmap->getSize();
-
- rUnitConverter.convertNumber( aOut, aSize.Width );
- aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_SVG, XML_WIDTH, aStrValue );
-
- rUnitConverter.convertNumber( aOut, aSize.Height );
- aStrValue = aOut.makeStringAndClear();
- AddAttribute( XML_NAMESPACE_SVG, XML_HEIGHT, aStrValue );
-*/
+
// Do Write
SvXMLElementExport aElem( rExport, XML_NAMESPACE_DRAW, XML_FILL_IMAGE, sal_True, sal_True );
@@ -134,8 +119,6 @@ sal_Bool XMLImageStyle::ImpExportXML( const OUString& rStrName, const uno::Any&
return bRet;
}
-#endif // #ifndef SVX_LIGHT
-
sal_Bool XMLImageStyle::importXML( const uno::Reference< xml::sax::XAttributeList >& xAttrList, uno::Any& rValue, OUString& rStrName, SvXMLImport& rImport )
{
return ImpImportXML( xAttrList, rValue, rStrName, rImport );
@@ -160,8 +143,6 @@ sal_Bool XMLImageStyle::ImpImportXML( const uno::Reference< xml::sax::XAttribute
{ XML_NAMESPACE_XLINK, XML_TYPE, XML_TOK_IMAGE_TYPE },
{ XML_NAMESPACE_XLINK, XML_SHOW, XML_TOK_IMAGE_SHOW },
{ XML_NAMESPACE_XLINK, XML_ACTUATE, XML_TOK_IMAGE_ACTUATE },
- /*{ XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_IMAGE_URL },
- { XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_IMAGE_URL },*/
XML_TOKEN_MAP_END
};
diff --git a/xmloff/source/style/MarkerStyle.cxx b/xmloff/source/style/MarkerStyle.cxx
index 1235d9f18483..5cacaf44b08b 100755
--- a/xmloff/source/style/MarkerStyle.cxx
+++ b/xmloff/source/style/MarkerStyle.cxx
@@ -165,8 +165,6 @@ sal_Bool XMLMarkerStyleImport::importXML(
// Export
//-------------------------------------------------------------
-#ifndef SVX_LIGHT
-
XMLMarkerStyleExport::XMLMarkerStyleExport( SvXMLExport& rExp )
: rExport( rExp )
{
@@ -284,6 +282,4 @@ sal_Bool XMLMarkerStyleExport::exportXML(
return bRet;
}
-#endif // #ifndef SVX_LIGHT
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/style/PagePropertySetContext.cxx b/xmloff/source/style/PagePropertySetContext.cxx
index a17e124fa2ee..21c2c09ec31a 100755
--- a/xmloff/source/style/PagePropertySetContext.cxx
+++ b/xmloff/source/style/PagePropertySetContext.cxx
@@ -112,25 +112,15 @@ SvXMLImportContext *PagePropertySetContext::CreateChildContext(
break;
case CTF_PM_TEXTCOLUMNS:
-#ifndef SVX_LIGHT
pContext = new XMLTextColumnsContext( GetImport(), nPrefix,
rLocalName, xAttrList, rProp,
rProperties );
-#else
- // create default context to skip content
- pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
-#endif // #ifndef SVX_LIGHT
break;
case CTF_PM_FTN_LINE_WEIGTH:
-#ifndef SVX_LIGHT
pContext = new XMLFootnoteSeparatorImport(
GetImport(), nPrefix, rLocalName, rProperties,
mxMapper->getPropertySetMapper(), rProp.mnIndex);
-#else
- // create default context to skip content
- pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName);
-#endif // #ifndef SVX_LIGHT
break;
}
diff --git a/xmloff/source/style/TransGradientStyle.cxx b/xmloff/source/style/TransGradientStyle.cxx
index 458ebd038368..cf0ab56d0225 100755
--- a/xmloff/source/style/TransGradientStyle.cxx
+++ b/xmloff/source/style/TransGradientStyle.cxx
@@ -228,8 +228,6 @@ sal_Bool XMLTransGradientStyleImport::importXML(
// Export
//-------------------------------------------------------------
-#ifndef SVX_LIGHT
-
XMLTransGradientStyleExport::XMLTransGradientStyleExport( SvXMLExport& rExp )
: rExport(rExp)
{
@@ -327,6 +325,4 @@ sal_Bool XMLTransGradientStyleExport::exportXML(
return bRet;
}
-#endif // #ifndef SVX_LIGHT
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx
index 8df7116fc2cf..7def49621b27 100755
--- a/xmloff/source/style/XMLPageExport.cxx
+++ b/xmloff/source/style/XMLPageExport.cxx
@@ -149,13 +149,6 @@ sal_Bool XMLPageExport::exportStyle(
GetExport().EncodeStyleName( sNextName ) );
}
}
-// OUString sPageMaster = GetExport().GetAutoStylePool()->Find(
-// XML_STYLE_FAMILY_PAGE_MASTER,
-// xPropSet );
-// if( sPageMaster.getLength() )
-// GetExport().AddAttribute( XML_NAMESPACE_STYLE,
-// XML_PAGE_MASTER_NAME,
-// sPageMaster );
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
XML_MASTER_PAGE, sal_True, sal_True );
@@ -262,8 +255,6 @@ void XMLPageExport::exportDefaultStyle()
}
}
- // if ( xPropStates.size() != 0 &&
- // ( xPropStates.size() != 1 || xPropStates[0].mnIndex != -1 ) )
if( bExport )
{
//<style:default-page-layout>
diff --git a/xmloff/source/style/impastp4.cxx b/xmloff/source/style/impastp4.cxx
index 7e4d81efecc0..d6032f54b4ce 100755
--- a/xmloff/source/style/impastp4.cxx
+++ b/xmloff/source/style/impastp4.cxx
@@ -175,10 +175,6 @@ void SvXMLAutoStylePoolP_Impl::GetRegisteredNames(
// if not added, yet.
//
-/*OUString SvXMLAutoStylePoolP_Impl::Add( sal_Int32 nFamily,
- const OUString& rParent,
- const vector< XMLPropertyState >& rProperties,
- sal_Bool bCache )*/
sal_Bool SvXMLAutoStylePoolP_Impl::Add(OUString& rName, sal_Int32 nFamily,
const OUString& rParent,
const ::std::vector< XMLPropertyState >& rProperties,
diff --git a/xmloff/source/style/impastpl.hxx b/xmloff/source/style/impastpl.hxx
index 5c79e2d8cf44..77597257803a 100755
--- a/xmloff/source/style/impastpl.hxx
+++ b/xmloff/source/style/impastpl.hxx
@@ -191,9 +191,6 @@ public:
com::sun::star::uno::Sequence<sal_Int32>& aFamilies,
com::sun::star::uno::Sequence<rtl::OUString>& aNames );
-// ::rtl::OUString Add( sal_Int32 nFamily, const ::rtl::OUString& rParent,
-// const ::std::vector< XMLPropertyState >& rProperties,
-// sal_Bool bCache = sal_False );
sal_Bool Add( ::rtl::OUString& rName, sal_Int32 nFamily,
const ::rtl::OUString& rParent,
const ::std::vector< XMLPropertyState >& rProperties,
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx
index ec9038578faa..81b8dd3409e4 100755
--- a/xmloff/source/style/styleexp.cxx
+++ b/xmloff/source/style/styleexp.cxx
@@ -367,13 +367,10 @@ sal_Bool XMLStyleExport::exportDefaultStyle(
XML_DEFAULT_STYLE,
sal_True, sal_True );
// <style:properties>
- //::std::vector< XMLPropertyState > xPropStates =
- // rPropMapper->FilterDefaults( xPropSet );
::std::vector< XMLPropertyState > xPropStates =
rPropMapper->FilterDefaults( xPropSet );
rPropMapper->exportXML( GetExport(), xPropStates,
XML_EXPORT_FLAG_IGN_WS );
-// exportStyleContent( rStyle );
}
return sal_True;
}
diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx
index c13de7e1765d..de60e89e381d 100755
--- a/xmloff/source/style/xmlexppr.cxx
+++ b/xmloff/source/style/xmlexppr.cxx
@@ -727,14 +727,6 @@ vector< XMLPropertyState > SvXMLExportPropertyMapper::_Filter(
ContextFilter( aPropStateArray, xPropSet );
// Have to do if we change from a vector to a list or something like that
- /*vector< XMLPropertyState >::iterator aItr = aPropStateArray.begin();
- while (aItr != aPropStateArray.end())
- {
- if (aItr->mnIndex == -1)
- aItr = aPropStateArray.erase(aItr);
- else
- aItr++;
- }*/
if( bDelInfo )
delete pFilterInfo;
@@ -1106,7 +1098,7 @@ void SvXMLExportPropertyMapper::_exportXML(
MID_FLAG_MERGE_ATTRIBUTE ) != 0 )
{
aValue = rAttrList.getValueByName( sName );
- bRemove = sal_True; //aValue.getLength() != 0;
+ bRemove = sal_True;
}
if( maPropMapper->exportXML( aValue, rProperty, rUnitConverter ) )
diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx
index 92747da29722..cf09b6cdc53c 100755
--- a/xmloff/source/style/xmlimppr.cxx
+++ b/xmloff/source/style/xmlimppr.cxx
@@ -344,16 +344,6 @@ void SvXMLImportPropertyMapper::importXML(
}
finished( rProperties, nStartIdx, nEndIdx );
-
- // Have to do if we change from a vector to a list or something like that
- /*std::vector <XMLPropertyState>::iterator aItr = rProperties.begin();
- while (aItr != rProperties.end())
- {
- if (aItr->mnIndex == -1)
- aItr = rProperties.erase(aItr);
- else
- aItr++;
- }*/
}
/** this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_IMPORT flag set */
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index c410cb6d5daa..bc870bad0f05 100755
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -560,7 +560,6 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
aFDesc.Pitch = eBulletFontPitch;
aFDesc.CharSet = eBulletFontEncoding;
aFDesc.Weight = WEIGHT_DONTKNOW;
- //aFDesc.Transparant = sal_True;
sal_Bool bStarSymbol = sal_False;
if( aFDesc.Name.equalsIgnoreAsciiCase( sStarBats ) )
{
@@ -603,7 +602,6 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
else if( xBase64Stream.is() )
{
sStr = GetImport().ResolveGraphicObjectURLFromBase64( xBase64Stream );
-// xBase64Stream = 0;
}
if( sStr.getLength() )
@@ -1348,7 +1346,6 @@ void SvxXMLListStyleContext::SetDefaultStyle(
if( !bOrdered )
{
// TODO: Bullet-Font
- //aNumFmt.SetBulletFont( &SwNumRule::GetDefBulletFont() );
awt::FontDescriptor aFDesc;
aFDesc.Name = OUString(
#if defined UNX
@@ -1361,7 +1358,6 @@ void SvxXMLListStyleContext::SetDefaultStyle(
aFDesc.Pitch = PITCH_DONTKNOW ;
aFDesc.CharSet = RTL_TEXTENCODING_SYMBOL ;
aFDesc.Weight = WEIGHT_DONTKNOW;
- //aFDesc.Transparant = sal_True;
pProps->Name =
OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_BULLET_FONT ));
(pProps++)->Value <<= aFDesc;
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx
index c64c783698d4..b3343c307193 100755
--- a/xmloff/source/style/xmlstyle.cxx
+++ b/xmloff/source/style/xmlstyle.cxx
@@ -484,35 +484,20 @@ SvXMLStyleContext *SvXMLStylesContext::CreateStyleChildContext(
rLocalName, xAttrList, sal_True );
break;
case XML_TOK_TEXT_NOTE_CONFIG:
-#ifndef SVX_LIGHT
pStyle = new XMLFootnoteConfigurationImportContext(GetImport(),
p_nPrefix,
rLocalName,
xAttrList);
-#else
- // create default context to skip content
- pStyle = new SvXMLStyleContext( GetImport(), nPrefix, rLocalName, xAttrList );
-#endif // #ifndef SVX_LIGHT
break;
case XML_TOK_TEXT_BIBLIOGRAPHY_CONFIG:
-#ifndef SVX_LIGHT
pStyle = new XMLIndexBibliographyConfigurationContext(
GetImport(), p_nPrefix, rLocalName, xAttrList);
-#else
- // create default context to skip content
- pStyle = new SvXMLStyleContext( GetImport(), p_nPrefix, rLocalName, xAttrList );
-#endif // #ifndef SVX_LIGHT
break;
case XML_TOK_TEXT_LINENUMBERING_CONFIG:
-#ifndef SVX_LIGHT
pStyle = new XMLLineNumberingImportContext(
GetImport(), p_nPrefix, rLocalName, xAttrList);
-#else
- // create default context to skip content
- pStyle = new SvXMLStyleContext( GetImport(), p_nPrefix, rLocalName, xAttrList );
-#endif // #ifndef SVX_LIGHT
break;
//
@@ -714,7 +699,6 @@ UniReference < SvXMLImportPropertyMapper > SvXMLStylesContext::GetImportProperty
}
xMapper = mxShapeImpPropMapper;
break;
-#ifndef SVX_LIGHT
case XML_STYLE_FAMILY_SCH_CHART_ID:
if( ! mxChartImpPropMapper.is() )
{
@@ -723,7 +707,6 @@ UniReference < SvXMLImportPropertyMapper > SvXMLStylesContext::GetImportProperty
}
xMapper = mxChartImpPropMapper;
break;
-#endif
case XML_STYLE_FAMILY_PAGE_MASTER:
if( ! mxPageImpPropMapper.is() )
{
@@ -866,7 +849,6 @@ SvXMLImportContext *SvXMLStylesContext::CreateChildContext( sal_uInt16 nPrefix,
SvXMLStyleContext *pStyle =
CreateStyleChildContext( nPrefix, rLocalName, xAttrList );
-// DBG_ASSERT( pStyle->GetFamily(), "Style without a family" );
if( pStyle )
{
if( !pStyle->IsTransient() )
diff --git a/xmloff/source/style/xmltabe.cxx b/xmloff/source/style/xmltabe.cxx
index b4725e6c9837..d967e3d30618 100755
--- a/xmloff/source/style/xmltabe.cxx
+++ b/xmloff/source/style/xmltabe.cxx
@@ -125,10 +125,6 @@ void SvxXMLTabStopExport::Export( const uno::Any& rAny )
const ::com::sun::star::style::TabStop* pTabs = aSeq.getConstArray();
const sal_Int32 nTabs = aSeq.getLength();
- // ignore default tab stop here
- //if( 1 == nTabs && style::TabAlign_DEFAULT == pTabs[0].Alignment )
- // return;
-
SvXMLElementExport rElem( rExport, XML_NAMESPACE_STYLE, XML_TAB_STOPS,
sal_True, sal_True );
diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx
index 907d5710387b..e53e321257af 100755
--- a/xmloff/source/table/XMLTableExport.cxx
+++ b/xmloff/source/table/XMLTableExport.cxx
@@ -186,10 +186,6 @@ XMLTableExport::XMLTableExport(SvXMLExport& rExp, const rtl::Reference< SvXMLExp
OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME)),
mxRowExportPropertySetMapper.get(),
OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX)));
-// mrExport.GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_TABLE
-// OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME)),
-// xTableStylesExportPropertySetMapper,
-// OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_PREFIX)));
mrExport.GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_CELL,
OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME)),
mxCellExportPropertySetMapper.get(),
diff --git a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
index 3f59f2a31a10..0f9f5edad3d0 100755
--- a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
+++ b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
@@ -242,7 +242,7 @@ void XMLIndexBibliographyConfigurationContext::CreateAndInsert(sal_Bool)
while (i < nServiceCount && !bFound)
{
if (aServices[i].equals(sFieldMaster_Bibliography))
- // here we should use a methode which compares in reverse order if available
+ // here we should use a method which compares in reverse order if available
// #85282#
bFound = sal_True;
else
diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx
index cde2d6c4cc88..fd82a5f8f082 100755
--- a/xmloff/source/text/XMLIndexTOCContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCContext.cxx
@@ -362,7 +362,7 @@ SvXMLImportContext* XMLIndexTOCContext::CreateChildContext(
break;
default:
- OSL_ENSURE(false, "index type not implemented");
+ OSL_FAIL("index type not implemented");
break;
}
}
diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx
index df9744c37f8f..151a233f6f67 100755
--- a/xmloff/source/text/XMLSectionExport.cxx
+++ b/xmloff/source/text/XMLSectionExport.cxx
@@ -305,7 +305,7 @@ void XMLSectionExport::ExportSectionEnd(
break;
default:
- OSL_ENSURE(false, "unknown index type");
+ OSL_FAIL("unknown index type");
// default: skip index!
break;
}
@@ -331,7 +331,7 @@ void XMLSectionExport::ExportSectionEnd(
}
else
{
- OSL_ENSURE(false, "Need element name!");
+ OSL_FAIL("Need element name!");
}
}
// else: autostyles -> ignore
@@ -375,7 +375,7 @@ void XMLSectionExport::ExportIndexStart(
default:
// skip index
- OSL_ENSURE(false, "unknown index type");
+ OSL_FAIL("unknown index type");
break;
}
}
diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx
index 96ca9ed02ed7..ace0f99bc900 100755
--- a/xmloff/source/text/XMLTextMarkImportContext.cxx
+++ b/xmloff/source/text/XMLTextMarkImportContext.cxx
@@ -387,7 +387,7 @@ Reference<XTextContent> XMLTextMarkImportContext::CreateAndInsertMark(
if (!xIfc.is())
{
- OSL_ENSURE(false, "CreateAndInsertMark: cannot create service?");
+ OSL_FAIL("CreateAndInsertMark: cannot create service?");
return 0;
}
@@ -401,7 +401,7 @@ Reference<XTextContent> XMLTextMarkImportContext::CreateAndInsertMark(
{
if (sMarkName.getLength())
{
- OSL_ENSURE(false, "name given, but XNamed not supported?");
+ OSL_FAIL("name given, but XNamed not supported?");
return 0;
}
}
@@ -424,7 +424,7 @@ Reference<XTextContent> XMLTextMarkImportContext::CreateAndInsertMark(
}
catch (com::sun::star::lang::IllegalArgumentException &)
{
- OSL_ENSURE(false, "CreateAndInsertMark: cannot insert?");
+ OSL_FAIL("CreateAndInsertMark: cannot insert?");
return 0;
}
}
diff --git a/xmloff/source/text/XMLTextNumRuleInfo.cxx b/xmloff/source/text/XMLTextNumRuleInfo.cxx
index 7dbe95787cbc..f9e0912b9b79 100755
--- a/xmloff/source/text/XMLTextNumRuleInfo.cxx
+++ b/xmloff/source/text/XMLTextNumRuleInfo.cxx
@@ -172,7 +172,7 @@ void XMLTextNumRuleInfo::Set(
{
if( !(xPropSet->getPropertyValue( msNumberingIsNumber ) >>= mbIsNumbered ) )
{
- OSL_ENSURE( false, "numbered paragraph without number info" );
+ OSL_FAIL( "numbered paragraph without number info" );
mbIsNumbered = sal_False;
}
}
diff --git a/xmloff/source/text/XMLTextPropertySetContext.cxx b/xmloff/source/text/XMLTextPropertySetContext.cxx
index b5a43782e2bf..555d7b688745 100755
--- a/xmloff/source/text/XMLTextPropertySetContext.cxx
+++ b/xmloff/source/text/XMLTextPropertySetContext.cxx
@@ -79,14 +79,9 @@ SvXMLImportContext *XMLTextPropertySetContext::CreateChildContext(
rProperties );
break;
case CTF_TEXTCOLUMNS:
-#ifndef SVX_LIGHT
pContext = new XMLTextColumnsContext( GetImport(), nPrefix,
rLocalName, xAttrList, rProp,
rProperties );
-#else
- // create default context to skip content
- pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
-#endif // #ifndef SVX_LIGHT
break;
case CTF_DROPCAPFORMAT:
@@ -134,14 +129,12 @@ SvXMLImportContext *XMLTextPropertySetContext::CreateChildContext(
rProperties );
}
break;
-#ifndef SVX_LIGHT
case CTF_SECTION_FOOTNOTE_END:
case CTF_SECTION_ENDNOTE_END:
pContext = new XMLSectionFootnoteConfigImport(
GetImport(), nPrefix, rLocalName, rProperties,
mxMapper->getPropertySetMapper());
break;
-#endif // #ifndef SVX_LIGHT
}
if( !pContext )
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 1b7c82e0abd4..5a80d19b1096 100755
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -2386,12 +2386,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext(
case XML_TOK_TEXT_INDEX_TITLE:
case XML_TOK_TEXT_SECTION:
-#ifndef SVX_LIGHT
pContext = new XMLSectionImportContext( rImport, nPrefix, rLocalName );
-#else
- // create default context to skip content
- pContext = new SvXMLImportContext( rImport, nPrefix, rLocalName );
-#endif // #ifndef SVX_LIGHT
break;
case XML_TOK_TEXT_TOC:
@@ -2401,23 +2396,13 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext(
case XML_TOK_TEXT_USER_INDEX:
case XML_TOK_TEXT_ALPHABETICAL_INDEX:
case XML_TOK_TEXT_BIBLIOGRAPHY_INDEX:
-#ifndef SVX_LIGHT
if( XML_TEXT_TYPE_SHAPE != eType )
pContext = new XMLIndexTOCContext( rImport, nPrefix, rLocalName );
-#else
- // create default context to skip content
- pContext = new SvXMLImportContext( rImport, nPrefix, rLocalName );
-#endif // #ifndef SVX_LIGHT
break;
case XML_TOK_TEXT_TRACKED_CHANGES:
-#ifndef SVX_LIGHT
pContext = new XMLTrackedChangesImportContext( rImport, nPrefix,
rLocalName);
-#else
- // create default context to skip content
- pContext = new SvXMLImportContext( rImport, nPrefix, rLocalName );
-#endif // #ifndef SVX_LIGHT
bContent = sal_False;
break;
@@ -2432,12 +2417,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext(
break;
case XML_TOK_TEXT_FORMS:
-#ifndef SVX_LIGHT
pContext = rImport.GetFormImport()->createOfficeFormsContext(rImport, nPrefix, rLocalName);
-#else
- // create default context to skip content
- pContext = new SvXMLImportContext( rImport, nPrefix, rLocalName );
-#endif // #ifndef SVX_LIGHT
bContent = sal_False;
break;
@@ -2450,12 +2430,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext(
break;
case XML_TOK_TEXT_CALCULATION_SETTINGS:
-#ifndef SVX_LIGHT
pContext = new XMLCalculationSettingsContext ( rImport, nPrefix, rLocalName, xAttrList);
-#else
- // create default context to skip content
- pContext = new SvXMLImportContext( rImport, nPrefix, rLocalName );
-#endif // #ifndef SVX_LIGHT
bContent = sal_False;
break;
diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx
index 2444c1de79f9..58bedf74ee81 100755
--- a/xmloff/source/text/txtlists.cxx
+++ b/xmloff/source/text/txtlists.cxx
@@ -352,7 +352,7 @@ XMLTextListsHelper::GetNumberedParagraphListId(
const ::rtl::OUString i_StyleName)
{
if (!i_StyleName.getLength()) {
- OSL_ENSURE(false, "invalid numbered-paragraph: no style-name");
+ OSL_FAIL("invalid numbered-paragraph: no style-name");
}
if (i_StyleName.getLength()
&& (i_Level < mLastNumberedParagraphs.size())
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index c0c9bad2dcdc..ff9df73a6499 100755
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -30,10 +30,6 @@
#include "precompiled_xmloff.hxx"
#include "unointerfacetouniqueidentifiermapper.hxx"
#include <tools/debug.hxx>
-#ifndef _SVSTDARR_LONGS_DECL
-#define _SVSTDARR_LONGS
-#include <svl/svstdarr.hxx>
-#endif
#include <svl/svarray.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/types.h>
@@ -41,6 +37,7 @@
#include <vector>
#include <list>
#include <boost/unordered_map.hpp>
+#include <tools/string.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index 1c259bbef619..bc5149ca707a 100755
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -1696,7 +1696,6 @@ SvXMLImportContext *XMLImpSpanContext_Impl::CreateChildContext(
break;
case XML_TOK_TEXT_NOTE:
-#ifndef SVX_LIGHT
if (rImport.GetTextImport()->IsInFrame())
{
// we must not insert footnotes into text frames
@@ -1709,10 +1708,6 @@ SvXMLImportContext *XMLImpSpanContext_Impl::CreateChildContext(
*rImport.GetTextImport().get(),
nPrefix, rLocalName );
}
-#else
- // create default context to skip content
- pContext = new SvXMLImportContext( rImport, nPrefix, rLocalName );
-#endif // #ifndef SVX_LIGHT
rIgnoreLeadingSpace = sal_False;
break;
diff --git a/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx b/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx
index aa2aa7e6f355..6e5cd42a3bf8 100755
--- a/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx
+++ b/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx
@@ -150,7 +150,7 @@ void XMLAxisOASISContext::StartElement(
}
else
{
- OSL_ENSURE( false, "ChartAxis: Invalid attribute value" );
+ OSL_FAIL( "ChartAxis: Invalid attribute value" );
}
if( eToken != XML_TOKEN_INVALID )
diff --git a/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx b/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx
index 9413b664a234..e1b76c9700b9 100755
--- a/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx
+++ b/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx
@@ -114,7 +114,7 @@ void XMLAxisOOoContext::StartElement(
}
else
{
- OSL_ENSURE( false, "ChartAxis: Invalid attribute value" );
+ OSL_FAIL( "ChartAxis: Invalid attribute value" );
}
if( eToken != XML_TOKEN_INVALID )
diff --git a/xmloff/source/transform/EventOOoTContext.cxx b/xmloff/source/transform/EventOOoTContext.cxx
index 085655d5eb51..6c0a52386f1d 100755
--- a/xmloff/source/transform/EventOOoTContext.cxx
+++ b/xmloff/source/transform/EventOOoTContext.cxx
@@ -77,7 +77,7 @@ void XMLTransformerOOoEventMap_Impl::AddMap( XMLTransformerEventMapEntry *pInit
if( !insert( aVal ).second )
{
- OSL_ENSURE( false, "duplicate OOo event name extry" );
+ OSL_FAIL( "duplicate OOo event name extry" );
}
++pInit;
diff --git a/xmloff/source/transform/StyleOASISTContext.cxx b/xmloff/source/transform/StyleOASISTContext.cxx
index 0a5ebb9fcda8..f28ad09234b2 100755
--- a/xmloff/source/transform/StyleOASISTContext.cxx
+++ b/xmloff/source/transform/StyleOASISTContext.cxx
@@ -707,7 +707,7 @@ OUString XMLPropertiesTContext_Impl::MergeUnderline(
eUnderline = XML_BOLD_WAVE;
break;
default:
- OSL_ENSURE( false, "xmloff::XMLPropertiesTContext_Impl::MergeUnderline(), missing underline case!" );
+ OSL_FAIL( "xmloff::XMLPropertiesTContext_Impl::MergeUnderline(), missing underline case!" );
break;
}
}
@@ -722,7 +722,7 @@ OUString XMLPropertiesTContext_Impl::MergeUnderline(
eUnderline = XML_NONE;
break;
default:
- OSL_ENSURE( false, "xmloff::XMLPropertiesTContext_Impl::MergeUnderline(), missing underline case!" );
+ OSL_FAIL( "xmloff::XMLPropertiesTContext_Impl::MergeUnderline(), missing underline case!" );
break;
}
}
diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx
index 93e23c2aa34f..f74ebdeeda31 100755
--- a/xmloff/source/transform/StyleOOoTContext.cxx
+++ b/xmloff/source/transform/StyleOOoTContext.cxx
@@ -609,7 +609,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement(
bDouble = sal_False;
break;
default:
- OSL_ENSURE( false, "xmloff::XMLPropertiesOOoTContext_Impl::StartElement(), unknown underline token!" );
+ OSL_FAIL( "xmloff::XMLPropertiesOOoTContext_Impl::StartElement(), unknown underline token!" );
break;
}
pContext->AddAttribute(
@@ -712,7 +712,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement(
break;
default:
- OSL_ENSURE( false, "invalid spline type" );
+ OSL_FAIL( "invalid spline type" );
pContext->AddAttribute(
aNewAttrName, GetXMLToken( XML_NONE ));
break;
@@ -773,7 +773,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement(
eToken = XML_HOURGLASS;
break;
default:
- OSL_ENSURE( false, "invalid named symbol" );
+ OSL_FAIL( "invalid named symbol" );
break;
}
@@ -804,7 +804,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement(
aNewAttrName, GetXMLToken( XML_IMAGE ));
break;
default:
- OSL_ENSURE( false, "invalid symbol type" );
+ OSL_FAIL( "invalid symbol type" );
pContext->AddAttribute(
aNewAttrName, GetXMLToken( XML_NONE ));
break;
diff --git a/xmloff/source/xforms/xformsimport.cxx b/xmloff/source/xforms/xformsimport.cxx
index afc00df1fd3f..c2b06e0dcdc8 100755
--- a/xmloff/source/xforms/xformsimport.cxx
+++ b/xmloff/source/xforms/xformsimport.cxx
@@ -158,7 +158,7 @@ void applyXFormsSettings( const Reference< XNameAccess >& _rXForms, const Sequen
Reference< XNameAccess > xModelSettings( aSettings.get( "XFormModels" ), UNO_QUERY );
if ( !xModelSettings.is() )
{
- OSL_ENSURE( false, "applyXFormsSettings: wrong type for the XFormModels settings!" );
+ OSL_FAIL( "applyXFormsSettings: wrong type for the XFormModels settings!" );
return;
}
@@ -177,7 +177,7 @@ void applyXFormsSettings( const Reference< XNameAccess >& _rXForms, const Sequen
// the model itself
if ( !_rXForms->hasByName( *pModelName ) )
{
- OSL_ENSURE( false, "applyXFormsSettings: have settings for a non-existent XForms model!" );
+ OSL_FAIL( "applyXFormsSettings: have settings for a non-existent XForms model!" );
continue;
}
@@ -192,7 +192,7 @@ void applyXFormsSettings( const Reference< XNameAccess >& _rXForms, const Sequen
{
if ( !xModelPSI->hasPropertyByName( pSetting->Name ) )
{
- OSL_ENSURE( false, "applyXFormsSettings: non-existent model property!" );
+ OSL_FAIL( "applyXFormsSettings: non-existent model property!" );
continue;
}
diff --git a/xmlscript/source/xmldlg_imexp/exp_share.hxx b/xmlscript/source/xmldlg_imexp/exp_share.hxx
index aaf6bd6aeef6..385e9c977c1c 100755
--- a/xmlscript/source/xmldlg_imexp/exp_share.hxx
+++ b/xmlscript/source/xmldlg_imexp/exp_share.hxx
@@ -246,7 +246,7 @@ inline void ElementDescriptor::read(
if (a >>= v)
addAttribute( attrName, ::rtl::OUString::valueOf(v) );
else
- OSL_ENSURE( 0, "### unexpected property type!" );
+ OSL_FAIL( "### unexpected property type!" );
}
}
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
index 01f1efee03b2..9f91a337810c 100755
--- a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
@@ -256,7 +256,7 @@ void ElementDescriptor::readButtonModel( StyleBag * all_styles )
OUString( RTL_CONSTASCII_USTRINGPARAM("true") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected radio state!" );
+ OSL_FAIL( "### unexpected radio state!" );
break;
}
}
@@ -325,7 +325,7 @@ void ElementDescriptor::readCheckBoxModel( StyleBag * all_styles )
OSL_ENSURE( bTriState, "### detected tristate value, but TriState is not set!" );
break;
default:
- OSL_ENSURE( 0, "### unexpected checkbox state!" );
+ OSL_FAIL( "### unexpected checkbox state!" );
break;
}
}
@@ -532,7 +532,7 @@ void ElementDescriptor::readRadioButtonModel( StyleBag * all_styles )
OUString( RTL_CONSTASCII_USTRINGPARAM("true") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected radio state!" );
+ OSL_FAIL( "### unexpected radio state!" );
break;
}
}
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
index 4ae2ebdabc11..2dce75b26f67 100755
--- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
@@ -160,7 +160,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
break;
}
default:
- OSL_ENSURE( 0, "### unexpected border value!" );
+ OSL_FAIL( "### unexpected border value!" );
break;
}
}
@@ -183,7 +183,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUSTR("simple") );
break;
default:
- OSL_ENSURE( 0, "### unexpected visual effect value!" );
+ OSL_FAIL( "### unexpected visual effect value!" );
break;
}
}
@@ -247,7 +247,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("system") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-family!" );
+ OSL_FAIL( "### unexpected font-family!" );
break;
}
}
@@ -297,7 +297,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("symbol") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-charset!" );
+ OSL_FAIL( "### unexpected font-charset!" );
break;
}
}
@@ -315,7 +315,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("variable") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-pitch!" );
+ OSL_FAIL( "### unexpected font-pitch!" );
break;
}
}
@@ -353,7 +353,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("reverse_italic") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-slant!" );
+ OSL_FAIL( "### unexpected font-slant!" );
break;
}
}
@@ -431,7 +431,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("boldwave") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-underline!" );
+ OSL_FAIL( "### unexpected font-underline!" );
break;
}
}
@@ -461,7 +461,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("x") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-strikeout!" );
+ OSL_FAIL( "### unexpected font-strikeout!" );
break;
}
}
@@ -501,7 +501,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("scalable") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-type!" );
+ OSL_FAIL( "### unexpected font-type!" );
break;
}
}
@@ -523,7 +523,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("engraved") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-relief!" );
+ OSL_FAIL( "### unexpected font-relief!" );
break;
}
// dialog:font-emphasismark (none|dot|circle|disc|accent|above|below) #IMPLIED
@@ -562,7 +562,7 @@ Reference< xml::sax::XAttributeList > Style::createElement()
OUString( RTL_CONSTASCII_USTRINGPARAM("below") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected font-emphasismark!" );
+ OSL_FAIL( "### unexpected font-emphasismark!" );
break;
}
}
@@ -626,7 +626,7 @@ void ElementDescriptor::readStringAttr(
if (a >>= v)
addAttribute( rAttrName, v );
else
- OSL_ENSURE( 0, "### unexpected property type!" );
+ OSL_FAIL( "### unexpected property type!" );
}
}
@@ -694,7 +694,7 @@ void ElementDescriptor::readDateFormatAttr( OUString const & rPropName, OUString
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("short_YYYYMMDD_DIN5008") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected date format!" );
+ OSL_FAIL( "### unexpected date format!" );
break;
}
}
@@ -729,7 +729,7 @@ void ElementDescriptor::readTimeFormatAttr( OUString const & rPropName, OUString
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("Duration_long") ) );
break;
default:
- OSL_ENSURE( 0, "### unexpected time format!" );
+ OSL_FAIL( "### unexpected time format!" );
break;
}
}
@@ -755,7 +755,7 @@ void ElementDescriptor::readAlignAttr( OUString const & rPropName, OUString cons
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("right") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal alignment value!" );
+ OSL_FAIL( "### illegal alignment value!" );
break;
}
}
@@ -783,7 +783,7 @@ void ElementDescriptor::readVerticalAlignAttr( OUString const & rPropName, OUStr
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("bottom") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal vertical alignment value!" );
+ OSL_FAIL( "### illegal vertical alignment value!" );
break;
}
}
@@ -839,7 +839,7 @@ void ElementDescriptor::readImageAlignAttr( OUString const & rPropName, OUString
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("bottom") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal image alignment value!" );
+ OSL_FAIL( "### illegal image alignment value!" );
break;
}
}
@@ -895,7 +895,7 @@ void ElementDescriptor::readImagePositionAttr( OUString const & rPropName, OUStr
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("center") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal image position value!" );
+ OSL_FAIL( "### illegal image position value!" );
break;
}
}
@@ -924,7 +924,7 @@ void ElementDescriptor::readButtonTypeAttr( OUString const & rPropName, OUString
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("help") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal button-type value!" );
+ OSL_FAIL( "### illegal button-type value!" );
break;
}
}
@@ -947,7 +947,7 @@ void ElementDescriptor::readOrientationAttr( OUString const & rPropName, OUStrin
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("vertical") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal orientation value!" );
+ OSL_FAIL( "### illegal orientation value!" );
break;
}
}
@@ -973,7 +973,7 @@ void ElementDescriptor::readLineEndFormatAttr( OUString const & rPropName, OUStr
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("carriage-return-line-feed") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal line end format value!" );
+ OSL_FAIL( "### illegal line end format value!" );
break;
}
}
@@ -1066,7 +1066,7 @@ void ElementDescriptor::readSelectionTypeAttr( OUString const & rPropName, OUStr
addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("range") ) );
break;
default:
- OSL_ENSURE( 0, "### illegal selection type value!" );
+ OSL_FAIL( "### illegal selection type value!" );
break;
}
}
@@ -1114,7 +1114,7 @@ void ElementDescriptor::readDefaults( bool supportPrintable, bool supportVisible
}
else
{
- OSL_ENSURE( 0, "unexpected property type for \"Enabled\": not bool!" );
+ OSL_FAIL( "unexpected property type for \"Enabled\": not bool!" );
}
sal_Bool bVisible = sal_True;
@@ -1303,7 +1303,7 @@ void ElementDescriptor::readEvents()
}
else
{
- OSL_ENSURE( 0, "### unexpected event type in container!" );
+ OSL_FAIL( "### unexpected event type in container!" );
}
}
}
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
index e09f2d6b519e..2aa541b08efd 100755
--- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
@@ -722,7 +722,7 @@ void FormattedFieldElement::endElement()
}
catch (util::MalformedNumberFormatException & exc)
{
- OSL_ENSURE( 0, "### util::MalformedNumberFormatException occurred!" );
+ OSL_FAIL( "### util::MalformedNumberFormatException occurred!" );
// rethrow
throw xml::sax::SAXException( exc.Message, Reference< XInterface >(), Any() );
}
diff --git a/xmlscript/test/imexp.cxx b/xmlscript/test/imexp.cxx
index 45a76ffc15fa..100a3972101b 100755
--- a/xmlscript/test/imexp.cxx
+++ b/xmlscript/test/imexp.cxx
@@ -95,7 +95,7 @@ Reference< XComponentContext > createInitialComponentContext(
catch( Exception& rExc )
{
OString aStr( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, aStr.getStr() );
+ OSL_FAIL( aStr.getStr() );
}
return xContext;
@@ -178,7 +178,7 @@ void MyApp::Main()
{
if (GetCommandLineParamCount() < 2)
{
- OSL_ENSURE( 0, "usage: imexp inst_dir inputfile [outputfile]\n" );
+ OSL_FAIL( "usage: imexp inst_dir inputfile [outputfile]\n" );
return;
}
@@ -226,12 +226,12 @@ void MyApp::Main()
aStr += OString( " >>> " );
aStr += OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US );
}
- OSL_ENSURE( 0, aStr.getStr() );
+ OSL_FAIL( aStr.getStr() );
}
catch (uno::Exception & rExc)
{
OString aStr( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, aStr.getStr() );
+ OSL_FAIL( aStr.getStr() );
}
Reference< lang::XComponent > xComp( xContext, UNO_QUERY );