[Libreoffice-commits] .: Branch 'integration/dev300_m106' - 146 commits - avmedia/source basic/inc basic/source basic/util connectivity/inc connectivity/qa connectivity/source desktop/source drawinglayer/inc drawinglayer/prj drawinglayer/source editeng/source formula/inc formula/source fpicker/source framework/inc framework/Library_fwe.mk framework/Library_fwk.mk framework/Package_inc.mk framework/source officecfg/registry oovbaapi/ooo readlicense_oo/docs scripting/source sfx2/source svx/inc svx/source ucb/source uui/source vbahelper/inc vbahelper/Library_msforms.mk vbahelper/Library_vbahelper.mk vbahelper/Package_inc.mk vbahelper/source xmloff/inc xmloff/source
Thorsten Behrens
thorsten at kemper.freedesktop.org
Wed Apr 27 15:12:54 PDT 2011
avmedia/source/gstreamer/makefile.mk | 2
basic/inc/basic/sbxdef.hxx | 4
basic/inc/basic/vbahelper.hxx | 49
basic/source/basmgr/vbahelper.cxx | 158 +
basic/source/classes/sb.cxx | 38
basic/source/classes/sbunoobj.cxx | 39
basic/source/classes/sbxmod.cxx | 121 +
basic/source/comp/codegen.cxx | 2
basic/source/comp/dim.cxx | 7
basic/source/comp/makefile.mk | 11
basic/source/comp/sbcomp.cxx | 675 +++++++
basic/source/comp/symtbl.cxx | 1
basic/source/comp/token.cxx | 6
basic/source/inc/codegen.hxx | 3
basic/source/inc/namecont.hxx | 178 +-
basic/source/inc/runtime.hxx | 2
basic/source/inc/sbtrace.hxx | 13
basic/source/inc/scriptcont.hxx | 16
basic/source/inc/symtbl.hxx | 3
basic/source/runtime/methods.cxx | 65
basic/source/runtime/methods1.cxx | 7
basic/source/runtime/rtlproto.hxx | 1
basic/source/runtime/runtime.cxx | 27
basic/source/runtime/stdobj.cxx | 2
basic/source/runtime/step0.cxx | 2
basic/source/runtime/step1.cxx | 11
basic/source/runtime/step2.cxx | 6
basic/source/uno/namecont.cxx | 233 +-
basic/util/makefile.mk | 3
connectivity/inc/connectivity/predicateinput.hxx | 8
connectivity/inc/connectivity/sqlnode.hxx | 2
connectivity/qa/connectivity/tools/CRMDatabase.java | 5
connectivity/qa/makefile.mk | 9
connectivity/source/commontools/FValue.cxx | 50
connectivity/source/commontools/predicateinput.cxx | 135 +
connectivity/source/drivers/ado/AColumn.cxx | 5
connectivity/source/drivers/ado/AConnection.cxx | 5
connectivity/source/drivers/ado/AResultSet.cxx | 2
connectivity/source/drivers/ado/ado.xcu | 5
connectivity/source/drivers/dbase/DNoException.cxx | 15
connectivity/source/drivers/dbase/DTable.cxx | 2
connectivity/source/drivers/dbase/dindexnode.cxx | 13
connectivity/source/drivers/file/fcomp.cxx | 17
connectivity/source/drivers/flat/ETable.cxx | 5
connectivity/source/drivers/hsqldb/HDriver.cxx | 18
connectivity/source/drivers/hsqldb/HTerminateListener.cxx | 1
connectivity/source/drivers/jdbc/JConnection.cxx | 2
connectivity/source/drivers/jdbc/jdbc.xcu | 5
connectivity/source/drivers/jdbc/tools.cxx | 1
connectivity/source/drivers/macab/MacabRecord.cxx | 2
connectivity/source/drivers/odbc/odbc.xcu | 5
connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx | 22
connectivity/source/drivers/odbcbase/OResultSet.cxx | 19
connectivity/source/drivers/odbcbase/OResultSetMetaData.cxx | 6
connectivity/source/drivers/odbcbase/OStatement.cxx | 14
connectivity/source/inc/hsqldb/HDriver.hxx | 1
connectivity/source/parse/PColumn.cxx | 16
connectivity/source/parse/sqlbison.y | 474 +++++
connectivity/source/parse/sqlflex.l | 27
connectivity/source/parse/sqliterator.cxx | 34
connectivity/source/parse/sqlnode.cxx | 2
desktop/source/app/app.cxx | 8
desktop/source/deployment/dp_services.cxx | 2
desktop/source/deployment/registry/component/dp_component.cxx | 26
drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx | 1
drawinglayer/inc/drawinglayer/primitive2d/rendergraphicprimitive2d.hxx | 95 +
drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx | 2
drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx | 2
drawinglayer/prj/d.lst | 1
drawinglayer/source/primitive2d/graphicprimitive2d.cxx | 69
drawinglayer/source/primitive2d/makefile.mk | 1
drawinglayer/source/primitive2d/metafileprimitive2d.cxx | 238 +-
drawinglayer/source/primitive2d/rendergraphicprimitive2d.cxx | 92 +
drawinglayer/source/processor2d/hittestprocessor2d.cxx | 2
drawinglayer/source/processor2d/linegeometryextractor2d.cxx | 1
drawinglayer/source/processor2d/textaspolygonextractor2d.cxx | 1
drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 9
drawinglayer/source/processor2d/vclpixelprocessor2d.cxx | 7
drawinglayer/source/processor2d/vclprocessor2d.cxx | 127 +
editeng/source/editeng/impedit2.cxx | 22
formula/inc/formula/compiler.hrc | 126 -
formula/inc/formula/opcode.hxx | 4
formula/inc/formula/token.hxx | 20
formula/inc/formula/tokenarray.hxx | 4
formula/source/core/api/token.cxx | 67
formula/source/core/resource/core_resource.src | 24
fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx | 2
fpicker/source/win32/filepicker/VistaFilePicker.cxx | 16
fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx | 54
fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx | 53
fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx | 12
fpicker/source/win32/filepicker/WinFileOpenImpl.cxx | 33
fpicker/source/win32/filepicker/platform_vista.h | 1
fpicker/source/win32/filepicker/previewadapter.cxx | 2
framework/Library_fwe.mk | 2
framework/Library_fwk.mk | 2
framework/Package_inc.mk | 1
framework/inc/framework/imagesconfiguration.hxx | 128 -
framework/inc/xml/imagesconfiguration.hxx | 128 +
framework/inc/xml/imagesdocumenthandler.hxx | 10
framework/source/fwe/xml/imagesconfiguration.cxx | 227 --
framework/source/fwe/xml/imagesdocumenthandler.cxx | 851 ----------
framework/source/helper/persistentwindowstate.cxx | 5
framework/source/layoutmanager/toolbarlayoutmanager.cxx | 8
framework/source/uiconfiguration/imagemanager.cxx | 3
framework/source/uiconfiguration/imagemanagerimpl.cxx | 3
framework/source/uiconfiguration/moduleimagemanager.cxx | 3
framework/source/uielement/menubarmanager.cxx | 60
framework/source/xml/imagesconfiguration.cxx | 228 ++
framework/source/xml/imagesdocumenthandler.cxx | 851 ++++++++++
officecfg/registry/data/org/openoffice/Setup.xcu | 2
officecfg/registry/schema/org/openoffice/Office/Common.xcs | 47
oovbaapi/ooo/vba/XApplicationBase.idl | 1
oovbaapi/ooo/vba/XCollectionBase.idl | 56
oovbaapi/ooo/vba/XControlProvider.idl | 2
oovbaapi/ooo/vba/XExecutableDialog.idl | 58
oovbaapi/ooo/vba/excel/SheetObjects.idl | 26
oovbaapi/ooo/vba/excel/XApplication.idl | 4
oovbaapi/ooo/vba/makefile.mk | 2
oovbaapi/ooo/vba/msforms/XButton.idl | 47
oovbaapi/ooo/vba/msforms/XCheckBox.idl | 3
oovbaapi/ooo/vba/msforms/XComboBox.idl | 18
oovbaapi/ooo/vba/msforms/XCommandButton.idl | 56
oovbaapi/ooo/vba/msforms/XControl.idl | 2
oovbaapi/ooo/vba/msforms/XFrame.idl | 55
oovbaapi/ooo/vba/msforms/XGroupBox.idl | 6
oovbaapi/ooo/vba/msforms/XLabel.idl | 7
oovbaapi/ooo/vba/msforms/XListBox.idl | 11
oovbaapi/ooo/vba/msforms/XNewFont.idl | 57
oovbaapi/ooo/vba/msforms/XRadioButton.idl | 7
oovbaapi/ooo/vba/msforms/XTextBox.idl | 10
oovbaapi/ooo/vba/msforms/XToggleButton.idl | 7
oovbaapi/ooo/vba/msforms/XUserForm.idl | 2
oovbaapi/ooo/vba/msforms/makefile.mk | 5
readlicense_oo/docs/readme.xsl | 58
readlicense_oo/docs/readme/eval.xsl | 2
readlicense_oo/docs/readme/readme.xrm | 4
scripting/source/dlgprov/dlgevtatt.cxx | 25
sfx2/source/appl/appdata.cxx | 2
sfx2/source/appl/appinit.cxx | 11
sfx2/source/appl/appopen.cxx | 5
sfx2/source/appl/appquit.cxx | 2
sfx2/source/appl/sfx.src | 13
sfx2/source/appl/shutdowniconaqua.mm | 1
sfx2/source/config/evntconf.cxx | 2
sfx2/source/control/unoctitm.cxx | 2
sfx2/source/dialog/filedlghelper.cxx | 2
sfx2/source/doc/DocumentMetadataAccess.cxx | 10
sfx2/source/doc/guisaveas.cxx | 8
sfx2/source/doc/objstor.cxx | 42
sfx2/source/doc/objxtor.cxx | 97 -
sfx2/source/inc/appdata.hxx | 3
svx/inc/svx/svdograf.hxx | 2
svx/inc/svx/xoutbmp.hxx | 1
svx/source/dialog/_bmpmask.cxx | 3
svx/source/fmcomp/gridctrl.cxx | 12
svx/source/form/fmobj.cxx | 4
svx/source/form/fmpage.cxx | 3
svx/source/form/fmpgeimp.cxx | 76
svx/source/form/fmshell.cxx | 6
svx/source/gallery2/galtheme.cxx | 3
svx/source/inc/fmpgeimp.hxx | 4
svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx | 3
svx/source/svdraw/svdedtv.cxx | 6
svx/source/svdraw/svdfmtf.cxx | 41
svx/source/svdraw/svdfmtf.hxx | 5
svx/source/svdraw/svdograf.cxx | 23
svx/source/svdraw/svdouno.cxx | 65
svx/source/tbxctrls/grafctrl.cxx | 148 +
svx/source/xml/xmlgrhlp.cxx | 8
svx/source/xoutdev/_xoutbmp.cxx | 6
ucb/source/ucp/gvfs/gvfs_content.cxx | 2
uui/source/iahndl-ssl.cxx | 67
vbahelper/Library_msforms.mk | 12
vbahelper/Library_vbahelper.mk | 15
vbahelper/Package_inc.mk | 2
vbahelper/inc/vbahelper/collectionbase.hxx | 214 ++
vbahelper/inc/vbahelper/vbaapplicationbase.hxx | 1
vbahelper/inc/vbahelper/vbacollectionimpl.hxx | 4
vbahelper/inc/vbahelper/vbadocumentbase.hxx | 1
vbahelper/inc/vbahelper/vbaeventshelperbase.hxx | 70
vbahelper/inc/vbahelper/vbahelper.hxx | 123 -
vbahelper/inc/vbahelper/vbawindowbase.hxx | 37
vbahelper/inc/vbahelper/weakreference.hxx | 94 +
vbahelper/source/msforms/vbabutton.cxx | 55
vbahelper/source/msforms/vbabutton.hxx | 15
vbahelper/source/msforms/vbacheckbox.cxx | 11
vbahelper/source/msforms/vbacheckbox.hxx | 1
vbahelper/source/msforms/vbacombobox.cxx | 117 +
vbahelper/source/msforms/vbacombobox.hxx | 14
vbahelper/source/msforms/vbacontrol.cxx | 138 -
vbahelper/source/msforms/vbacontrol.hxx | 24
vbahelper/source/msforms/vbacontrols.cxx | 187 +-
vbahelper/source/msforms/vbacontrols.hxx | 27
vbahelper/source/msforms/vbaframe.cxx | 75
vbahelper/source/msforms/vbaframe.hxx | 30
vbahelper/source/msforms/vbalabel.cxx | 9
vbahelper/source/msforms/vbalabel.hxx | 1
vbahelper/source/msforms/vbalistbox.cxx | 9
vbahelper/source/msforms/vbalistbox.hxx | 3
vbahelper/source/msforms/vbamultipage.cxx | 9
vbahelper/source/msforms/vbamultipage.hxx | 9
vbahelper/source/msforms/vbanewfont.cxx | 160 +
vbahelper/source/msforms/vbanewfont.hxx | 73
vbahelper/source/msforms/vbaradiobutton.cxx | 10
vbahelper/source/msforms/vbaradiobutton.hxx | 1
vbahelper/source/msforms/vbatextbox.cxx | 41
vbahelper/source/msforms/vbatextbox.hxx | 6
vbahelper/source/msforms/vbatogglebutton.cxx | 54
vbahelper/source/msforms/vbatogglebutton.hxx | 12
vbahelper/source/msforms/vbauserform.cxx | 38
vbahelper/source/msforms/vbauserform.hxx | 14
vbahelper/source/vbahelper/collectionbase.cxx | 332 +++
vbahelper/source/vbahelper/vbaapplicationbase.cxx | 27
vbahelper/source/vbahelper/vbacommandbarcontrol.cxx | 74
vbahelper/source/vbahelper/vbacommandbarcontrol.hxx | 11
vbahelper/source/vbahelper/vbacommandbarcontrols.cxx | 27
vbahelper/source/vbahelper/vbacommandbarcontrols.hxx | 19
vbahelper/source/vbahelper/vbacommandbarhelper.hxx | 1
vbahelper/source/vbahelper/vbadocumentbase.cxx | 16
vbahelper/source/vbahelper/vbaeventshelperbase.cxx | 247 ++
vbahelper/source/vbahelper/vbahelper.cxx | 414 ++--
vbahelper/source/vbahelper/vbawindowbase.cxx | 142 -
xmloff/inc/xmloff/PageMasterStyleMap.hxx | 17
xmloff/inc/xmloff/txtprmap.hxx | 8
xmloff/inc/xmloff/xmlmetai.hxx | 10
xmloff/inc/xmloff/xmltoken.hxx | 2
xmloff/source/core/xmltoken.cxx | 2
xmloff/source/draw/sdxmlimp.cxx | 17
xmloff/source/forms/elementimport.cxx | 6
xmloff/source/meta/xmlmetai.cxx | 113 -
xmloff/source/style/PageMasterExportPropMapper.cxx | 44
xmloff/source/style/PageMasterImportPropMapper.cxx | 75
xmloff/source/style/PageMasterStyleMap.cxx | 25
xmloff/source/text/txtexppr.cxx | 121 -
xmloff/source/text/txtimppr.cxx | 78
xmloff/source/text/txtprmap.cxx | 23
237 files changed, 7843 insertions(+), 3238 deletions(-)
New commits:
commit b969af6f23727b21115dc9be9caa6bd5959f715b
Merge: 06b6df6... 10b8226...
Author: Thorsten Behrens <tbehrens at novell.com>
Date: Thu Apr 28 00:12:58 2011 +0200
Merge commit 'ooo/DEV300_m106' into integration/dev300_m106
Conflicts:
avmedia/source/gstreamer/gstframegrabber.cxx
avmedia/source/gstreamer/gstplayer.cxx
avmedia/source/gstreamer/gstplayer.hxx
basic/inc/basic/sbxdef.hxx
basic/source/classes/sbxmod.cxx
basic/source/comp/makefile.mk
basic/source/comp/sbcomp.cxx
basic/source/inc/namecont.hxx
basic/source/inc/scriptcont.hxx
basic/source/runtime/methods.cxx
basic/source/runtime/runtime.cxx
basic/source/runtime/stdobj.cxx
basic/source/runtime/step1.cxx
basic/source/uno/namecont.cxx
basic/util/makefile.mk
connectivity/source/commontools/predicateinput.cxx
connectivity/source/drivers/dbase/DNoException.cxx
connectivity/source/drivers/dbase/DTable.cxx
connectivity/source/drivers/file/fcomp.cxx
connectivity/source/drivers/jdbc/JConnection.cxx
connectivity/source/drivers/odbcbase/OResultSet.cxx
connectivity/source/drivers/odbcbase/OStatement.cxx
connectivity/source/parse/sqlnode.cxx
desktop/source/app/app.cxx
drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
drawinglayer/source/processor2d/vclprocessor2d.cxx
formula/inc/formula/token.hxx
formula/source/core/api/token.cxx
fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
fpicker/source/win32/filepicker/platform_vista.h
framework/source/helper/persistentwindowstate.cxx
framework/source/uielement/menubarmanager.cxx
oovbaapi/ooo/vba/XFoundFiles.idl
oovbaapi/ooo/vba/excel/XApplication.idl
oovbaapi/ooo/vba/msforms/XCheckBox.idl
oovbaapi/ooo/vba/msforms/XComboBox.idl
oovbaapi/ooo/vba/msforms/XControl.idl
oovbaapi/ooo/vba/msforms/XGroupBox.idl
oovbaapi/ooo/vba/msforms/XLabel.idl
oovbaapi/ooo/vba/msforms/XListBox.idl
oovbaapi/ooo/vba/msforms/XNewFont.idl
oovbaapi/ooo/vba/msforms/XRadioButton.idl
oovbaapi/ooo/vba/msforms/XTextBox.idl
oovbaapi/ooo/vba/msforms/XToggleButton.idl
scripting/source/dlgprov/dlgevtatt.cxx
sfx2/source/control/unoctitm.cxx
sfx2/source/doc/objstor.cxx
sfx2/source/doc/objxtor.cxx
svx/inc/svx/svdograf.hxx
svx/source/form/fmpage.cxx
svx/source/form/fmpgeimp.cxx
svx/source/svdraw/svdedtv.cxx
svx/source/svdraw/svdfmtf.cxx
svx/source/svdraw/svdograf.cxx
svx/source/svdraw/svdouno.cxx
svx/source/xml/xmlgrhlp.cxx
uui/source/iahndl-ssl.cxx
vbahelper/Library_msforms.mk
vbahelper/Library_vbahelper.mk
vbahelper/inc/vbahelper/vbahelper.hxx
vbahelper/prj/build.lst
vbahelper/source/msforms/vbacombobox.cxx
vbahelper/source/msforms/vbacontrol.cxx
vbahelper/source/msforms/vbacontrols.cxx
vbahelper/source/msforms/vbaframe.cxx
vbahelper/source/msforms/vbaframe.hxx
vbahelper/source/msforms/vbalabel.cxx
vbahelper/source/msforms/vbalabel.hxx
vbahelper/source/msforms/vbalistbox.cxx
vbahelper/source/msforms/vbalistbox.hxx
vbahelper/source/msforms/vbamultipage.cxx
vbahelper/source/msforms/vbatogglebutton.cxx
vbahelper/source/msforms/vbauserform.cxx
vbahelper/source/vbahelper/vbacommandbar.cxx
vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
vbahelper/source/vbahelper/vbacommandbarcontrols.hxx
vbahelper/source/vbahelper/vbahelper.cxx
vbahelper/source/vbahelper/vbawindowbase.cxx
xmloff/source/meta/xmlmetai.cxx
xmloff/source/style/PageMasterExportPropMapper.cxx
xmloff/source/style/PageMasterStyleMap.cxx
xmloff/source/text/txtexppr.cxx
xmloff/source/text/txtprmap.cxx
diff --cc avmedia/source/gstreamer/makefile.mk
index 0bea133,857c591..c87d43a
mode 100755,100644..100755
--- a/avmedia/source/gstreamer/makefile.mk
+++ b/avmedia/source/gstreamer/makefile.mk
diff --cc basic/inc/basic/sbxdef.hxx
index e40ad07,6464c20..6fe310e
--- a/basic/inc/basic/sbxdef.hxx
+++ b/basic/inc/basic/sbxdef.hxx
@@@ -207,68 -231,106 +209,70 @@@ typedef sal_uIntPtr SbxError; // Pres
#ifndef __RSC
// Map old codes to new ones
-#define SbxERR_OK ERRCODE_SBX_OK
-#define SbxERR_SYNTAX ERRCODE_SBX_SYNTAX
-#define SbxERR_NOTIMP ERRCODE_SBX_NOTIMP
-#define SbxERR_OVERFLOW ERRCODE_SBX_OVERFLOW
-#define SbxERR_BOUNDS ERRCODE_SBX_BOUNDS
-#define SbxERR_ZERODIV ERRCODE_SBX_ZERODIV
-#define SbxERR_CONVERSION ERRCODE_SBX_CONVERSION
-#define SbxERR_BAD_PARAMETER ERRCODE_SBX_BAD_PARAMETER
-#define SbxERR_PROC_UNDEFINED ERRCODE_SBX_PROC_UNDEFINED
-#define SbxERR_ERROR ERRCODE_SBX_ERROR
-#define SbxERR_NO_OBJECT ERRCODE_SBX_NO_OBJECT
-#define SbxERR_CANNOT_LOAD ERRCODE_SBX_CANNOT_LOAD
-#define SbxERR_BAD_INDEX ERRCODE_SBX_BAD_INDEX
-#define SbxERR_NO_ACTIVE_OBJECT ERRCODE_SBX_NO_ACTIVE_OBJECT
-#define SbxERR_BAD_PROP_VALUE ERRCODE_SBX_BAD_PROP_VALUE
-#define SbxERR_PROP_READONLY ERRCODE_SBX_PROP_READONLY
-#define SbxERR_PROP_WRITEONLY ERRCODE_SBX_PROP_WRITEONLY
-#define SbxERR_INVALID_OBJECT ERRCODE_SBX_INVALID_OBJECT
-#define SbxERR_NO_METHOD ERRCODE_SBX_NO_METHOD
-#define SbxERR_INVALID_USAGE_OBJECT ERRCODE_SBX_INVALID_USAGE_OBJECT
-#define SbxERR_NO_OLE ERRCODE_SBX_NO_OLE
-#define SbxERR_BAD_METHOD ERRCODE_SBX_BAD_METHOD
-#define SbxERR_OLE_ERROR ERRCODE_SBX_OLE_ERROR
-#define SbxERR_BAD_ACTION ERRCODE_SBX_BAD_ACTION
-#define SbxERR_NO_NAMED_ARGS ERRCODE_SBX_NO_NAMED_ARGS
-#define SbxERR_BAD_LOCALE ERRCODE_SBX_BAD_LOCALE
-#define SbxERR_NAMED_NOT_FOUND ERRCODE_SBX_NAMED_NOT_FOUND
-#define SbxERR_NOT_OPTIONAL ERRCODE_SBX_NOT_OPTIONAL
-#define SbxERR_WRONG_ARGS ERRCODE_SBX_WRONG_ARGS
-#define SbxERR_NOT_A_COLL ERRCODE_SBX_NOT_A_COLL
-
-
-/* Old codes with VB error codes
-enum SbxError { // Ergebnis einer Rechenoperation/Konversion
- SbxERR_OK = 0, // durchgefuehrt
- SbxERR_SYNTAX = 2, // Syntaxfehler im Parser
- SbxERR_NOTIMP = 5, // nicht moeglich
- SbxERR_OVERFLOW = 6, // Ueberlauf
- SbxERR_BOUNDS = 9, // Array-Index ungueltig
- SbxERR_ZERODIV = 11, // Division durch Null
- SbxERR_CONVERSION = 13, // falscher Datentyp
- SbxERR_BAD_PARAMETER = 14, // ungltiger Parameter
- SbxERR_PROC_UNDEFINED = 35, // BASIC-Sub oder Function undefiniert
- SbxERR_ERROR = 51, // andere Fehler
- // Objektbezogene Fehler
- SbxERR_NO_OBJECT = 91, // Objektvariable nicht belegt
- SbxERR_CANNOT_LOAD = 323, // Objekt kann nicht geladen/eingerichtet werden
- SbxERR_BAD_INDEX = 341, // Invalid object index
- SbxERR_NO_ACTIVE_OBJECT=366,// Objekt ist nicht aktiviert
- SbxERR_BAD_PROP_VALUE = 380,// Bad property value
- SbxERR_PROP_READONLY = 382, // Property is read only
- SbxERR_PROP_WRITEONLY = 394,// Property is write only
- SbxERR_INVALID_OBJECT = 420,// Invalid object reference
- SbxERR_NO_METHOD = 423, // Property oder Methode unbekannt
- SbxERR_INVALID_USAGE_OBJECT=425,// Falsche Verwendung eines Objekts
- SbxERR_NO_OLE = 430, // Kein OLE-Objekt
- SbxERR_BAD_METHOD = 438, // Methode nicht untersttzt
- SbxERR_OLE_ERROR = 440, // OLE Automation-Fehler
- SbxERR_BAD_ACTION = 445, // Aktion nicht untersttzt
- SbxERR_NO_NAMED_ARGS = 446, // Keine benannten Argumente
- SbxERR_BAD_LOCALE = 447, // Laenderspezifische Einstellungen nicht untersttzt
- SbxERR_NAMED_NOT_FOUND = 448,// Unbekanntes benanntes Argument
- SbxERR_NOT_OPTIONAL = 449, // Argument nicht optional
- SbxERR_WRONG_ARGS = 450, // Falsche Zahl von Argumenten
- SbxERR_NOT_A_COLL = 451 // Objekt enthlt keine Elemente
-};
-*/
+#define SbxERR_OK ERRCODE_SBX_OK
+#define SbxERR_SYNTAX ERRCODE_SBX_SYNTAX
+#define SbxERR_NOTIMP ERRCODE_SBX_NOTIMP
+#define SbxERR_OVERFLOW ERRCODE_SBX_OVERFLOW
+#define SbxERR_BOUNDS ERRCODE_SBX_BOUNDS
+#define SbxERR_ZERODIV ERRCODE_SBX_ZERODIV
+#define SbxERR_CONVERSION ERRCODE_SBX_CONVERSION
+#define SbxERR_BAD_PARAMETER ERRCODE_SBX_BAD_PARAMETER
+#define SbxERR_PROC_UNDEFINED ERRCODE_SBX_PROC_UNDEFINED
+#define SbxERR_ERROR ERRCODE_SBX_ERROR
+#define SbxERR_NO_OBJECT ERRCODE_SBX_NO_OBJECT
+#define SbxERR_CANNOT_LOAD ERRCODE_SBX_CANNOT_LOAD
+#define SbxERR_BAD_INDEX ERRCODE_SBX_BAD_INDEX
+#define SbxERR_NO_ACTIVE_OBJECT ERRCODE_SBX_NO_ACTIVE_OBJECT
+#define SbxERR_BAD_PROP_VALUE ERRCODE_SBX_BAD_PROP_VALUE
+#define SbxERR_PROP_READONLY ERRCODE_SBX_PROP_READONLY
+#define SbxERR_PROP_WRITEONLY ERRCODE_SBX_PROP_WRITEONLY
+#define SbxERR_INVALID_OBJECT ERRCODE_SBX_INVALID_OBJECT
+#define SbxERR_NO_METHOD ERRCODE_SBX_NO_METHOD
+#define SbxERR_INVALID_USAGE_OBJECT ERRCODE_SBX_INVALID_USAGE_OBJECT
+#define SbxERR_NO_OLE ERRCODE_SBX_NO_OLE
+#define SbxERR_BAD_METHOD ERRCODE_SBX_BAD_METHOD
+#define SbxERR_OLE_ERROR ERRCODE_SBX_OLE_ERROR
+#define SbxERR_BAD_ACTION ERRCODE_SBX_BAD_ACTION
+#define SbxERR_NO_NAMED_ARGS ERRCODE_SBX_NO_NAMED_ARGS
+#define SbxERR_BAD_LOCALE ERRCODE_SBX_BAD_LOCALE
+#define SbxERR_NAMED_NOT_FOUND ERRCODE_SBX_NAMED_NOT_FOUND
+#define SbxERR_NOT_OPTIONAL ERRCODE_SBX_NOT_OPTIONAL
+#define SbxERR_WRONG_ARGS ERRCODE_SBX_WRONG_ARGS
+#define SbxERR_NOT_A_COLL ERRCODE_SBX_NOT_A_COLL
+
// Flag-Bits:
-#define SBX_READ 0x0001 // Read permission
-#define SBX_WRITE 0x0002 // Write permission
-#define SBX_READWRITE 0x0003 // Read/Write permission
-#define SBX_DONTSTORE 0x0004 // Don't store object
-#define SBX_MODIFIED 0x0008 // Object was changed
-#define SBX_FIXED 0x0010 // Fixed data type (SbxVariable)
-#define SBX_CONST 0x0020 // Definition of const value
-#define SBX_OPTIONAL 0x0040 // Parameter is optional
-#define SBX_HIDDEN 0x0080 // Element is invisible
-#define SBX_INVISIBLE 0x0100 // Element is not found by Find()
-#define SBX_EXTSEARCH 0x0200 // Object is searched completely
-#define SBX_EXTFOUND 0x0400 // Variable was found through extended search
-#define SBX_GBLSEARCH 0x0800 // Global search via Parents
-#define SBX_RESERVED 0x1000 // reserved
-#define SBX_PRIVATE 0x1000 // #110004, #112015, cannot conflict with SBX_RESERVED
-#define SBX_NO_BROADCAST 0x2000 // No broadcast on Get/Put
-#define SBX_REFERENCE 0x4000 // Parameter is Reference (DLL-call)
-#define SBX_NO_MODIFY 0x8000 // SetModified is suppressed
-#define SBX_WITH_EVENTS 0x0080 // Same value as unused SBX_HIDDEN
+#define SBX_READ 0x0001 // Read permission
+#define SBX_WRITE 0x0002 // Write permission
+#define SBX_READWRITE 0x0003 // Read/Write permission
+#define SBX_DONTSTORE 0x0004 // Don't store object
+#define SBX_MODIFIED 0x0008 // Object was changed
+#define SBX_FIXED 0x0010 // Fixed data type (SbxVariable)
+#define SBX_CONST 0x0020 // Definition of const value
+#define SBX_OPTIONAL 0x0040 // Parameter is optional
+#define SBX_HIDDEN 0x0080 // Element is invisible
+#define SBX_INVISIBLE 0x0100 // Element is not found by Find()
+#define SBX_EXTSEARCH 0x0200 // Object is searched completely
+#define SBX_EXTFOUND 0x0400 // Variable was found through extended search
+#define SBX_GBLSEARCH 0x0800 // Global search via Parents
+#define SBX_RESERVED 0x1000 // reserved
+#define SBX_PRIVATE 0x1000 // #110004, #112015, cannot conflict with SBX_RESERVED
+#define SBX_NO_BROADCAST 0x2000 // No broadcast on Get/Put
+#define SBX_REFERENCE 0x4000 // Parameter is Reference (DLL-call)
+#define SBX_NO_MODIFY 0x8000 // SetModified is suppressed
+#define SBX_WITH_EVENTS 0x0080 // Same value as unused SBX_HIDDEN
#define SBX_DIM_AS_NEW 0x0800 // Same value as SBX_GBLSEARCH, cannot conflict as one
// is used for objects, the other for variables only
+ #define SBX_VAR_TO_DIM 0x2000 // Same value as SBX_NO_BROADCAST, cannot conflict as
+ // used for variables without broadcaster only
// Broadcaster-IDs:
-#define SBX_HINT_DYING SFX_HINT_DYING
-#define SBX_HINT_DATAWANTED SFX_HINT_USER00
-#define SBX_HINT_DATACHANGED SFX_HINT_DATACHANGED
-#define SBX_HINT_CONVERTED SFX_HINT_USER01
-#define SBX_HINT_INFOWANTED SFX_HINT_USER02
-#define SBX_HINT_OBJECTCHANGED SFX_HINT_USER03
+#define SBX_HINT_DYING SFX_HINT_DYING
+#define SBX_HINT_DATAWANTED SFX_HINT_USER00
+#define SBX_HINT_DATACHANGED SFX_HINT_DATACHANGED
+#define SBX_HINT_CONVERTED SFX_HINT_USER01
+#define SBX_HINT_INFOWANTED SFX_HINT_USER02
+#define SBX_HINT_OBJECTCHANGED SFX_HINT_USER03
// List of all creators for Load/Store
diff --cc basic/source/classes/sbunoobj.cxx
index 8a079a6,e469997..3f11cce
mode 100644,100755..100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@@ -1789,11 -1764,11 +1803,11 @@@ bool checkUnoObjectType( SbUnoObject* p
Reference<XIdlClass> xClass = TypeToIdlClass( rType );
if( !xClass.is() )
{
- DBG_ERROR("failed to get XIdlClass for type");
+ OSL_FAIL("failed to get XIdlClass for type");
break;
}
- ::rtl::OUString sClassName = xClass->getName();
- if ( sClassName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.oleautomation.XAutomationObject" ) ) ) )
+ ::rtl::OUString aInterfaceName = xClass->getName();
+ if ( aInterfaceName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.oleautomation.XAutomationObject" ) ) ) )
{
// there is a hack in the extensions/source/ole/oleobj.cxx to return the typename of the automation object, lets check if it
// matches
@@@ -1804,9 -1779,9 +1818,9 @@@
xInv->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("$GetTypeName") ) ) >>= sTypeName;
if ( sTypeName.getLength() == 0 || sTypeName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IDispatch") ) ) )
// can't check type, leave it pass
- result = true;
+ result = true;
else
- result = sTypeName.equals( aClass );
+ result = sTypeName.equals( rClass );
}
break; // finished checking automation object
}
diff --cc basic/source/classes/sbxmod.cxx
index 15c6989,7014468..4f0fe18
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@@ -58,7 -61,7 +58,8 @@@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/script/ModuleType.hpp>
#include <com/sun/star/script/vba/XVBACompatibility.hpp>
+#include <com/sun/star/document/XVbaMethodParameter.hpp>
+ #include <com/sun/star/script/vba/VBAScriptEventId.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/document/XEventBroadcaster.hpp>
#include <com/sun/star/document/XEventListener.hpp>
@@@ -86,10 -89,8 +87,9 @@@ using namespace com::sun::star
#include <cppuhelper/implbase1.hxx>
#include <basic/sbobjmod.hxx>
#include <com/sun/star/uno/XAggregation.hpp>
- #include <map>
#include <com/sun/star/script/XInvocation.hpp>
- using namespace ::com::sun::star;
++using namespace ::com::sun::star;
using namespace com::sun::star::lang;
using namespace com::sun::star::reflection;
using namespace com::sun::star::beans;
@@@ -498,23 -513,10 +511,22 @@@ IMPL_LINK( AsyncQuitHandler, OnAsyncQui
return 0L;
}
-/////////////////////////////////////////////////////////////////////////////
+void VBAUnlockDocuments( StarBASIC* pBasic )
+{
+ if ( pBasic && pBasic->IsDocBasic() )
+ {
+ SbUnoObject* pGlobs = dynamic_cast< SbUnoObject* >( pBasic->Find( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ThisComponent" ) ), SbxCLASS_DONTCARE ) );
+ if ( pGlobs )
+ {
+ uno::Reference< frame::XModel > xModel( pGlobs->getUnoAny(), uno::UNO_QUERY );
+ ::basic::vba::lockControllersOfAllDocuments( xModel, sal_False );
+ ::basic::vba::enableContainerWindowsOfAllDocuments( xModel, sal_True );
+ }
+ }
+}
-
-// Ein BASIC-Modul hat EXTSEARCH gesetzt, damit die im Modul enthaltenen
-// Elemente von anderen Modulen aus gefunden werden koennen.
+// A Basic module has set EXTSEARCH, so that the elements, that the modul contains,
+// could be found from other module.
SbModule::SbModule( const String& rName, sal_Bool bVBACompat )
: SbxObject( String( RTL_CONSTASCII_USTRINGPARAM("StarBASICModule") ) ),
@@@ -1102,16 -1028,60 +1114,58 @@@ sal_uInt16 SbModule::Run( SbMethod* pMe
sal_uInt16 nRes = 0;
sal_Bool bDelInst = sal_Bool( pINST == NULL );
+ bool bQuit = false;
StarBASICRef xBasic;
+ uno::Reference< frame::XModel > xModel;
+ uno::Reference< script::vba::XVBACompatibility > xVBACompat;
if( bDelInst )
{
-#ifdef DBG_TRACE_BASIC
- dbg_InitTrace();
-#endif
- // #32779: Basic waehrend der Ausfuehrung festhalten
+ // #32779: Hold Basic during the execution
xBasic = (StarBASIC*) GetParent();
pINST = new SbiInstance( (StarBASIC*) GetParent() );
+ /* If a VBA script in a document is started, get the VBA compatibility
+ interface from the document Basic library container, and notify all
+ VBA script listeners about the started script. */
+ if( mbVBACompat )
+ {
+ StarBASIC* pBasic = static_cast< StarBASIC* >( GetParent() );
+ if( pBasic && pBasic->IsDocBasic() ) try
+ {
+ xModel.set( getDocumentModel( pBasic ), uno::UNO_SET_THROW );
+ xVBACompat.set( getVBACompatibility( xModel ), uno::UNO_SET_THROW );
+ xVBACompat->broadcastVBAScriptEvent( script::vba::VBAScriptEventId::SCRIPT_STARTED, GetName() );
+ }
+ catch( uno::Exception& )
+ {
+ }
+ }
+
+ // Launcher problem
+ // i80726 The Find below will genarate an error in Testtool so we reset it unless there was one before already
+ sal_Bool bWasError = SbxBase::GetError() != 0;
+ SbxVariable* pMSOMacroRuntimeLibVar = Find( aMSOMacroRuntimeLibName, SbxCLASS_OBJECT );
+ if ( !bWasError && (SbxBase::GetError() == SbxERR_PROC_UNDEFINED) )
+ SbxBase::ResetError();
+ if( pMSOMacroRuntimeLibVar )
+ {
+ StarBASIC* pMSOMacroRuntimeLib = PTR_CAST(StarBASIC,pMSOMacroRuntimeLibVar);
+ if( pMSOMacroRuntimeLib )
+ {
+ sal_uInt16 nGblFlag = pMSOMacroRuntimeLib->GetFlags() & SBX_GBLSEARCH;
+ pMSOMacroRuntimeLib->ResetFlag( SBX_GBLSEARCH );
+ SbxVariable* pAppSymbol = pMSOMacroRuntimeLib->Find( aMSOMacroRuntimeAppSymbol, SbxCLASS_METHOD );
+ pMSOMacroRuntimeLib->SetFlag( nGblFlag );
+ if( pAppSymbol )
+ {
+ pMSOMacroRuntimeLib->SetFlag( SBX_EXTSEARCH ); // Could have been disabled before
+ GetSbData()->pMSOMacroRuntimLib = pMSOMacroRuntimeLib;
+ }
+ }
+ }
+
- // Error-Stack loeschen
+ // Delete the Error-Stack
SbErrorStack*& rErrStack = GetSbData()->pErrStack;
delete rErrStack;
rErrStack = NULL;
@@@ -2319,8 -2304,9 +2384,8 @@@ public
uno::Reference< document::XVbaMethodParameter > xVbaMethodParameter( xControl->getPeer(), uno::UNO_QUERY );
if ( xVbaMethodParameter.is() )
{
-#endif
sal_Int8 nCancel = 0;
- sal_Int8 nCloseMode = 0;
+ sal_Int8 nCloseMode = ::ooo::vba::VbQueryClose::vbFormControlMenu;
Sequence< Any > aParams;
aParams.realloc(2);
@@@ -2625,9 -2607,12 +2689,12 @@@ void SbUserFormModule::InitObject(
try
{
String aHook( RTL_CONSTASCII_USTRINGPARAM( "VBAGlobals" ) );
- SbUnoObject* pGlobs = (SbUnoObject*)GetParent()->Find( aHook, SbxCLASS_DONTCARE );
+ SbUnoObject* pGlobs = (SbUnoObject*)GetParent()->Find( aHook, SbxCLASS_DONTCARE );
if ( m_xModel.is() && pGlobs )
{
+ // broadcast INITIALIZE_USERFORM script event before the dialog is created
+ Reference< script::vba::XVBACompatibility > xVBACompat( getVBACompatibility( m_xModel ), uno::UNO_SET_THROW );
+ xVBACompat->broadcastVBAScriptEvent( script::vba::VBAScriptEventId::INITIALIZE_USERFORM, GetName() );
uno::Reference< lang::XMultiServiceFactory > xVBAFactory( pGlobs->getUnoAny(), uno::UNO_QUERY_THROW );
uno::Reference< lang::XMultiServiceFactory > xFactory = comphelper::getProcessServiceFactory();
diff --cc basic/source/comp/dim.cxx
index 8fae1a4,37c156c..a81aec0
--- a/basic/source/comp/dim.cxx
+++ b/basic/source/comp/dim.cxx
@@@ -52,9 -49,13 +52,13 @@@ SbiSymDef* SbiParser::VarDecl( SbiDimLi
SbxDataType t = eScanType;
SbiSymDef* pDef = bConst ? new SbiConstDef( aSym ) : new SbiSymDef( aSym );
SbiDimList* pDim = NULL;
- // Klammern?
+ // Brackets?
if( Peek() == LPAREN )
+ {
pDim = new SbiDimList( this );
+ if( !pDim->GetDims() )
+ pDef->SetWithBrackets();
+ }
pDef->SetType( t );
if( bStatic )
pDef->SetStatic();
diff --cc basic/source/comp/makefile.mk
index 5fe64ce,1e17b35..d8b03c1
mode 100755,100644..100755
--- a/basic/source/comp/makefile.mk
+++ b/basic/source/comp/makefile.mk
@@@ -46,11 -50,11 +46,12 @@@ SLOFILES=
$(SLO)$/token.obj
EXCEPTIONSFILES= \
- $(SLO)$/codegen.obj \
- $(SLO)$/dim.obj \
- $(SLO)$/exprtree.obj \
- $(SLO)$/parser.obj \
- $(SLO)$/scanner.obj
+ $(SLO)$/codegen.obj \
+ $(SLO)$/dim.obj \
+ $(SLO)$/exprtree.obj \
+ $(SLO)$/parser.obj \
++ $(SLO)$/scanner.obj \
+ $(SLO)$/sbcomp.obj
# --- Targets --------------------------------------------------------------
diff --cc basic/source/comp/sbcomp.cxx
index 729ec83,4467fb8..a12fda3
mode 100644,100755..100644
--- a/basic/source/comp/sbcomp.cxx
+++ b/basic/source/comp/sbcomp.cxx
@@@ -32,13 -31,26 +32,19 @@@
#include <basic/sbx.hxx>
#include "sbcomp.hxx"
#include "image.hxx"
-#include "sbtrace.hxx"
#include <basic/sbobjmod.hxx>
+ #include <stdio.h>
// To activate tracing enable in sbtrace.hxx
#ifdef DBG_TRACE_BASIC
-#include <hash_map>
-
+ // Trace ini file (set NULL to ignore)
+ // can be overridden with the environment variable OOO_BASICTRACEINI
+ static char GpTraceIniFile[] = "~/BasicTrace.ini";
+ //static char* GpTraceIniFile = NULL;
+
-
// Trace Settings, used if no ini file / not found in ini file
- static char GpTraceFileNameDefault[] = "d:\\zBasic.Asm\\BasicTrace.txt";
+ static char GpTraceFileNameDefault[] = "~/BasicTrace.txt";
static char* GpTraceFileName = GpTraceFileNameDefault;
// GbTraceOn:
diff --cc basic/source/inc/codegen.hxx
index 16e5ee3,7e81e8c..bc127c5
--- a/basic/source/inc/codegen.hxx
+++ b/basic/source/inc/codegen.hxx
@@@ -88,8 -87,7 +88,9 @@@ public
// #111897 PARAM_INFO flags start at 0x00010000 to not
// conflict with DefaultId in SbxParamInfo::nUserData
- #define PARAM_INFO_PARAMARRAY 0x0010000
+ #define PARAM_INFO_PARAMARRAY 0x0010000
+ #define PARAM_INFO_WITHBRACKETS 0x0020000
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --cc basic/source/inc/namecont.hxx
index 3d4a1ff,f984d99..f377e15
--- a/basic/source/inc/namecont.hxx
+++ b/basic/source/inc/namecont.hxx
@@@ -56,65 -63,25 +64,60 @@@
#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/basemutex.hxx>
#include <sot/storage.hxx>
+ #include <comphelper/listenernotification.hxx>
#include <xmlscript/xmllib_imexp.hxx>
+#include <com/sun/star/deployment/XPackage.hpp>
+
+#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/compbase8.hxx>
+#include <cppuhelper/compbase9.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
+#include <com/sun/star/script/vba/XVBACompatibility.hpp>
class BasicManager;
namespace basic
{
-//============================================================================
+typedef ::cppu::WeakComponentImplHelper9<
+ ::com::sun::star::lang::XInitialization,
+ ::com::sun::star::script::XStorageBasedLibraryContainer,
+ ::com::sun::star::script::XLibraryContainerPassword,
+ ::com::sun::star::script::XLibraryContainerExport,
+ ::com::sun::star::script::XLibraryContainer3,
+ ::com::sun::star::container::XContainer,
+ ::com::sun::star::script::XLibraryQueryExecutable,
+ ::com::sun::star::script::vba::XVBACompatibility,
+ ::com::sun::star::lang::XServiceInfo > LibraryContainerHelper;
+
+typedef ::cppu::WeakImplHelper2< ::com::sun::star::container::XNameContainer,
+ ::com::sun::star::container::XContainer > NameContainerHelper;
+ typedef ::cppu::WeakImplHelper3<
+ ::com::sun::star::container::XNameContainer,
+ ::com::sun::star::container::XContainer,
+ ::com::sun::star::util::XChangesNotifier > NameContainer_BASE;
- struct hashName_Impl
- {
- size_t operator()(const ::rtl::OUString Str) const
- {
- return (size_t)Str.hashCode();
- }
- };
-
- struct eqName_Impl
+ class NameContainer : public ::cppu::BaseMutex, public NameContainer_BASE
{
- typedef std::hash_map< ::rtl::OUString, sal_Int32, ::rtl::OUStringHash > NameContainerNameMap;
+ sal_Bool operator()(const ::rtl::OUString Str1, const ::rtl::OUString Str2) const
+ {
+ return ( Str1 == Str2 );
+ }
+};
+
+typedef boost::unordered_map
+<
+ ::rtl::OUString,
+ sal_Int32,
+ hashName_Impl,
+ eqName_Impl
+>
+NameContainerNameMap;
+
+
+//============================================================================
- class NameContainer : public ::cppu::BaseMutex, public NameContainerHelper
- {
NameContainerNameMap mHashMap;
::com::sun::star::uno::Sequence< ::rtl::OUString > mNames;
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > mValues;
@@@ -171,12 -140,20 +176,20 @@@ public
::com::sun::star::uno::RuntimeException);
// Methods XContainer
- virtual void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference<
- ::com::sun::star::container::XContainerListener >& xListener )
+ virtual void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XContainerListener >& xListener )
throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference<
- ::com::sun::star::container::XContainerListener >& xListener )
+ virtual void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XContainerListener >& xListener )
throw (::com::sun::star::uno::RuntimeException);
+
+ // Methods XChangesNotifier
+ virtual void SAL_CALL addChangesListener( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::util::XChangesListener >& xListener )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeChangesListener( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::util::XChangesListener >& xListener )
+ throw (::com::sun::star::uno::RuntimeException);
};
//============================================================================
@@@ -221,11 -187,43 +223,44 @@@ public
}
};
- class SfxLibraryContainer :public LibraryContainerHelper
- ,public ::utl::OEventListenerAdapter
+ //============================================================================
+
+ typedef ::comphelper::OListenerContainerBase<
+ ::com::sun::star::script::vba::XVBAScriptListener,
+ ::com::sun::star::script::vba::VBAScriptEvent > VBAScriptListenerContainer_BASE;
+
+ class VBAScriptListenerContainer : public VBAScriptListenerContainer_BASE
+ {
+ public:
+ explicit VBAScriptListenerContainer( ::osl::Mutex& rMutex );
+
+ private:
+ virtual bool implTypedNotify(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::script::vba::XVBAScriptListener >& rxListener,
+ const ::com::sun::star::script::vba::VBAScriptEvent& rEvent )
+ throw (::com::sun::star::uno::Exception);
+ };
+
+ //============================================================================
+
+ class SfxLibrary;
+
+ typedef ::cppu::WeakComponentImplHelper8<
+ ::com::sun::star::lang::XInitialization,
+ ::com::sun::star::script::XStorageBasedLibraryContainer,
+ ::com::sun::star::script::XLibraryContainerPassword,
+ ::com::sun::star::script::XLibraryContainerExport,
+ ::com::sun::star::script::XLibraryContainer3,
+ ::com::sun::star::container::XContainer,
+ ::com::sun::star::script::vba::XVBACompatibility,
+ ::com::sun::star::lang::XServiceInfo > SfxLibraryContainer_BASE;
+
+ class SfxLibraryContainer : public SfxLibraryContainer_BASE, public ::utl::OEventListenerAdapter
{
+ VBAScriptListenerContainer maVBAScriptListeners;
+ sal_Int32 mnRunningVBAScripts;
sal_Bool mbVBACompat;
+ rtl::OUString msProjectName;
protected:
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > mxSFI;
@@@ -513,12 -518,24 +555,24 @@@ public
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
throw (::com::sun::star::uno::RuntimeException) = 0;
// Methods XVBACompatibility
- virtual ::sal_Bool SAL_CALL getVBACompatibilityMode()
- throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setVBACompatibilityMode( ::sal_Bool _vbacompatmodeon )
- throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getVBACompatibilityMode() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setVBACompatibilityMode( ::sal_Bool _vbacompatmodeon ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getProjectName() throw (::com::sun::star::uno::RuntimeException) { return msProjectName; }
+ virtual void SAL_CALL setProjectName( const ::rtl::OUString& _projectname ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getRunningVBAScripts()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVBAScriptListener(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::script::vba::XVBAScriptListener >& Listener )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVBAScriptListener(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::script::vba::XVBAScriptListener >& Listener )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL broadcastVBAScriptEvent( sal_Int32 nIdentifier, const ::rtl::OUString& rModuleName )
+ throw (::com::sun::star::uno::RuntimeException);
};
+ //============================================================================
+
class LibraryContainerMethodGuard
{
private:
@@@ -670,13 -687,21 +724,21 @@@ public
throw( ::com::sun::star::uno::RuntimeException );
// Methods XContainer
- virtual void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference<
- ::com::sun::star::container::XContainerListener >& xListener )
+ virtual void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XContainerListener >& xListener )
throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference<
- ::com::sun::star::container::XContainerListener >& xListener )
+ virtual void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XContainerListener >& xListener )
throw (::com::sun::star::uno::RuntimeException);
+ // Methods XChangesNotifier
+ virtual void SAL_CALL addChangesListener( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::util::XChangesListener >& xListener )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeChangesListener( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::util::XChangesListener >& xListener )
+ throw (::com::sun::star::uno::RuntimeException);
+
public:
struct LibraryContainerAccess { friend class SfxLibraryContainer; private: LibraryContainerAccess() { } };
void removeElementWithoutChecks( const ::rtl::OUString& _rElementName, LibraryContainerAccess )
diff --cc basic/source/inc/runtime.hxx
index 59aeffc,4a59e6d..a2ed23e
--- a/basic/source/inc/runtime.hxx
+++ b/basic/source/inc/runtime.hxx
@@@ -436,8 -464,9 +436,10 @@@ public
SbMethod* GetCaller();
SbxArray* GetLocals();
SbxArray* GetParams();
+ SbxVariable* GetExternalCaller(){ return mpExtCaller; }
+ SbiForStack* FindForStackItemForCollection( class BasicCollection* pCollection );
+
SbxBase* FindElementExtern( const String& rName );
static bool isVBAEnabled();
diff --cc basic/source/inc/sbtrace.hxx
index bf2caf1,de5c78a..8cc889f
mode 100644,100755..100644
--- a/basic/source/inc/sbtrace.hxx
+++ b/basic/source/inc/sbtrace.hxx
diff --cc basic/source/inc/scriptcont.hxx
index 33a6fa75,c235212..949575a
--- a/basic/source/inc/scriptcont.hxx
+++ b/basic/source/inc/scriptcont.hxx
@@@ -143,13 -140,10 +143,11 @@@ public
};
//============================================================================
+typedef boost::unordered_map< ::rtl::OUString, ::com::sun::star::script::ModuleInfo, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > ModuleInfoMap;
- typedef ::cppu::ImplHelper1 < ::com::sun::star::script::vba::XVBAModuleInfo
- > SfxScriptLibrary_BASE;
+ typedef ::cppu::ImplHelper1< ::com::sun::star::script::vba::XVBAModuleInfo > SfxScriptLibrary_BASE;
- class SfxScriptLibrary : public SfxLibrary
- , public SfxScriptLibrary_BASE
+ class SfxScriptLibrary : public SfxLibrary, public SfxScriptLibrary_BASE
{
friend class SfxScriptLibraryContainer;
diff --cc basic/source/runtime/methods.cxx
index 6a846eb,e90a6bf..379d321
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@@ -78,8 -82,12 +78,9 @@@ using namespace com::sun::star::uno
using namespace com::sun::star::lang;
using namespace com::sun::star::ucb;
using namespace com::sun::star::io;
+using namespace com::sun::star::script;
+ using namespace com::sun::star::frame;
-#endif /* _USE_UNO */
-
-//#define _ENABLE_CUR_DIR
-
#include "stdobj.hxx"
#include <basic/sbstdobj.hxx>
#include "rtlproto.hxx"
@@@ -479,13 -510,35 +507,18 @@@ RTLFUNC(CurDir
#endif
}
-RTLFUNC(ChDir) // JSM
+RTLFUNC(ChDir)
{
(void)bWrite;
rPar.Get(0)->PutEmpty();
- if (rPar.Count() != 2)
+ if (rPar.Count() == 2)
+ {
-#ifdef _ENABLE_CUR_DIR
- String aPath = rPar.Get(1)->GetString();
- sal_Bool bError = sal_False;
-#ifdef WNT
- // #55997 Laut MI hilft es bei File-URLs einen DirEntry zwischenzuschalten
- // #40996 Harmoniert bei Verwendung der WIN32-Funktion nicht mit getdir
- DirEntry aEntry( aPath );
- ByteString aFullPath( aEntry.GetFull(), gsl_getSystemTextEncoding() );
- if( chdir( aFullPath.GetBuffer()) )
- bError = sal_True;
-#else
- if (!DirEntry(aPath).SetCWD())
- bError = sal_True;
-#endif
- if( bError )
- StarBASIC::Error( SbERR_PATH_NOT_FOUND );
-#endif
+ // VBA: track current directory per document type (separately for Writer, Calc, Impress, etc.)
+ if( SbiRuntime::isVBAEnabled() )
+ ::basic::vba::registerCurrentDirectory( getDocumentModel( pBasic ), rPar.Get(1)->GetString() );
+ }
+ else
StarBASIC::Error( SbERR_BAD_ARGUMENT );
}
@@@ -689,7 -768,7 +722,7 @@@ void implRemoveDirRecursive( const Stri
FileBase::RC nRet = DirectoryItem::get( aDirPath, aItem );
sal_Bool bExists = (nRet == FileBase::E_None);
-- FileStatus aFileStatus( FileStatusMask_Type );
++ FileStatus aFileStatus( osl_FileStatus_Mask_Type );
nRet = aItem.getFileStatus( aFileStatus );
FileStatus::Type aType = aFileStatus.getFileType();
sal_Bool bFolder = isFolder( aType );
@@@ -716,7 -795,7 +749,7 @@@
break;
// Handle flags
-- FileStatus aFileStatus2( FileStatusMask_Type | FileStatusMask_FileURL );
++ FileStatus aFileStatus2( osl_FileStatus_Mask_Type | osl_FileStatus_Mask_FileURL );
nRet = aItem2.getFileStatus( aFileStatus2 );
::rtl::OUString aPath = aFileStatus2.getFileURL();
@@@ -842,12 -931,18 +875,12 @@@ RTLFUNC(FileLen
}
}
else
- // --> UCB
{
-#ifdef _OLD_FILE_IMPL
- FileStat aStat = DirEntry( aStr );
- nLen = aStat.GetSize();
-#else
DirectoryItem aItem;
- FileBase::RC nRet = DirectoryItem::get( getFullPathUNC( aStr ), aItem );
- FileStatus aFileStatus( FileStatusMask_FileSize );
- nRet = aItem.getFileStatus( aFileStatus );
+ DirectoryItem::get( getFullPathUNC( aStr ), aItem );
- FileStatus aFileStatus( FileStatusMask_FileSize );
++ FileStatus aFileStatus( osl_FileStatus_Mask_FileSize );
+ aItem.getFileStatus( aFileStatus );
nLen = (sal_Int32)aFileStatus.getFileSize();
-#endif
}
rPar.Get(0)->PutLong( (long)nLen );
}
@@@ -2459,7 -2513,7 +2492,7 @@@ String getDirectoryPath( String aPathSt
FileBase::RC nRet = DirectoryItem::get( aPathStr, aItem );
if( nRet == FileBase::E_None )
{
-- FileStatus aFileStatus( FileStatusMask_Type );
++ FileStatus aFileStatus( osl_FileStatus_Mask_Type );
nRet = aItem.getFileStatus( aFileStatus );
if( nRet == FileBase::E_None )
{
@@@ -2470,7 -2524,7 +2503,7 @@@
}
else if( aType == FileStatus::Link )
{
-- FileStatus aFileStatus2( FileStatusMask_LinkTargetURL );
++ FileStatus aFileStatus2( osl_FileStatus_Mask_LinkTargetURL );
nRet = aItem.getFileStatus( aFileStatus2 );
if( nRet == FileBase::E_None )
aRetStr = getDirectoryPath( aFileStatus2.getLinkTargetURL() );
@@@ -2817,7 -2928,7 +2850,7 @@@ RTLFUNC(Dir
}
// Handle flags
-- FileStatus aFileStatus( FileStatusMask_Type | FileStatusMask_FileName );
++ FileStatus aFileStatus( osl_FileStatus_Mask_Type | osl_FileStatus_Mask_FileName );
nRet = aItem.getFileStatus( aFileStatus );
// Only directories?
@@@ -2914,11 -3027,12 +2947,11 @@@ RTLFUNC(GetAttr
}
}
else
- // --> UCB
{
DirectoryItem aItem;
- FileBase::RC nRet = DirectoryItem::get( getFullPathUNC( rPar.Get(1)->GetString() ), aItem );
- FileStatus aFileStatus( FileStatusMask_Attributes | FileStatusMask_Type );
- nRet = aItem.getFileStatus( aFileStatus );
+ DirectoryItem::get( getFullPathUNC( rPar.Get(1)->GetString() ), aItem );
- FileStatus aFileStatus( FileStatusMask_Attributes | FileStatusMask_Type );
++ FileStatus aFileStatus( osl_FileStatus_Mask_Attributes | osl_FileStatus_Mask_Type );
+ aItem.getFileStatus( aFileStatus );
sal_uInt64 nAttributes = aFileStatus.getAttributes();
sal_Bool bReadOnly = (nAttributes & Attribute_ReadOnly) != 0;
@@@ -2966,11 -3081,18 +2999,11 @@@ RTLFUNC(FileDateTime
}
}
else
- // --> UCB
{
-#ifdef _OLD_FILE_IMPL
- DirEntry aEntry( aPath );
- FileStat aStat( aEntry );
- aTime = Time( aStat.TimeModified() );
- aDate = Date( aStat.DateModified() );
-#else
DirectoryItem aItem;
- FileBase::RC nRet = DirectoryItem::get( getFullPathUNC( aPath ), aItem );
- FileStatus aFileStatus( FileStatusMask_ModifyTime );
- nRet = aItem.getFileStatus( aFileStatus );
+ DirectoryItem::get( getFullPathUNC( aPath ), aItem );
- FileStatus aFileStatus( FileStatusMask_ModifyTime );
++ FileStatus aFileStatus( osl_FileStatus_Mask_ModifyTime );
+ aItem.getFileStatus( aFileStatus );
TimeValue aTimeVal = aFileStatus.getModifyTime();
oslDateTime aDT;
osl_getDateTimeFromTimeValue( &aTimeVal, &aDT );
diff --cc basic/source/runtime/runtime.cxx
index 7178492,7419b84..308550a
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@@ -657,9 -654,11 +658,11 @@@ void SbiRuntime::SetParameters( SbxArra
bByVal |= sal_Bool( ( p->eType & SbxBYREF ) == 0 );
t = (SbxDataType) ( p->eType & 0x0FFF );
- if( !bByVal && t != SbxVARIANT &&
+ if( !bByVal && t != SbxVARIANT &&
(!v->IsFixed() || (SbxDataType)(v->GetType() & 0x0FFF ) != t) )
bByVal = sal_True;
+
+ bTargetTypeIsArray = (p->nUserData & PARAM_INFO_WITHBRACKETS) != 0;
}
if( bByVal )
{
@@@ -1230,7 -1242,31 +1235,29 @@@ void SbiRuntime::ClearForStack(
PopFor();
}
+ SbiForStack* SbiRuntime::FindForStackItemForCollection( class BasicCollection* pCollection )
+ {
+ SbiForStack* pRet = NULL;
+
+ SbiForStack* p = pForStk;
+ while( p )
+ {
+ SbxVariable* pVar = p->refEnd.Is() ? (SbxVariable*)p->refEnd : NULL;
+ if( p->eForType == FOR_EACH_COLLECTION && pVar != NULL &&
+ (pCollection = PTR_CAST(BasicCollection,pVar)) == pCollection )
+ {
+ pRet = p;
+ break;
+ }
+ }
+
+ return pRet;
+ }
+
+
+ //////////////////////////////////////////////////////////////////////////
+ //
// DLL-Aufrufe
-//
-//////////////////////////////////////////////////////////////////////////
void SbiRuntime::DllCall
( const String& aFuncName, // Funktionsname
diff --cc basic/source/runtime/stdobj.cxx
index a15457c,77e942a..e48d1ce
--- a/basic/source/runtime/stdobj.cxx
+++ b/basic/source/runtime/stdobj.cxx
@@@ -148,7 -128,7 +148,7 @@@ static Methods aMethods[] =
{ "Chr", SbxSTRING, 1 | _FUNCTION, RTLNAME(Chr),0 },
{ "string", SbxINTEGER, 0,NULL,0 },
- { "ChrW", SbxSTRING, 1 | _FUNCTION | _COMPATONLY, RTLNAME(Chr),0},
-{ "ChrW", SbxSTRING, 1 | _FUNCTION | _COMPTMASK, RTLNAME(ChrW),0},
++{ "ChrW", SbxSTRING, 1 | _FUNCTION | _COMPATONLY, RTLNAME(ChrW),0},
{ "string", SbxINTEGER, 0,NULL,0 },
{ "CInt", SbxINTEGER, 1 | _FUNCTION, RTLNAME(CInt),0 },
diff --cc basic/source/runtime/step0.cxx
index a9dddab,1237ebc..0733e0d
--- a/basic/source/runtime/step0.cxx
+++ b/basic/source/runtime/step0.cxx
@@@ -799,9 -794,11 +799,11 @@@ void SbiRuntime::DimImpl( SbxVariableRe
{
SbxDataType eType = refVar->IsFixed() ? refVar->GetType() : SbxVARIANT;
SbxDimArray* pArray = new SbxDimArray( eType );
- // AB 2.4.1996, auch Arrays ohne Dimensionsangaben zulassen (VB-komp.)
+ // auch Arrays ohne Dimensionsangaben zulassen (VB-komp.)
if( pDims )
{
+ refVar->ResetFlag( SBX_VAR_TO_DIM );
+
for( sal_uInt16 i = 1; i < pDims->Count(); )
{
sal_Int32 lb = pDims->Get( i++ )->GetLong();
diff --cc basic/source/runtime/step1.cxx
index 8e0e931,10cfdc0..cbb7d4d
--- a/basic/source/runtime/step1.cxx
+++ b/basic/source/runtime/step1.cxx
@@@ -437,15 -426,15 +436,15 @@@ void SbiRuntime::StepPRCHAR( sal_uInt3
// Check, ob TOS eine bestimmte Objektklasse ist (+StringID)
--bool SbiRuntime::implIsClass( SbxObject* pObj, const String& aClass )
++bool SbiRuntime::implIsClass( SbxObject* pObj, const ::rtl::String& aClass )
{
bool bRet = true;
-- if( aClass.Len() != 0 )
++ if( aClass.getLenth() != 0 )
{
bRet = pObj->IsClass( aClass );
if( !bRet )
-- bRet = aClass.EqualsIgnoreCaseAscii( String( RTL_CONSTASCII_USTRINGPARAM("object") ) );
++ bRet = aClass.equalsIgnoreCaseAscii( String( RTL_CONSTASCII_USTRINGPARAM("object") ) );
if( !bRet )
{
String aObjClass = pObj->GetClassName();
@@@ -462,8 -451,8 +461,8 @@@
return bRet;
}
-bool SbiRuntime::checkClass_Impl( const SbxVariableRef& refVal,
- const String& aClass, bool bRaiseErrors, bool bDefault )
+bool SbiRuntime::checkClass_Impl( const SbxVariableRef& refVal,
- const String& aClass, bool bRaiseErrors, bool bDefault )
++ const ::rtl::OUString& aClass, bool bRaiseErrors, bool bDefault )
{
bool bOk = bDefault;
diff --cc basic/source/runtime/step2.cxx
index cd7aa82,996b37d..845f104
mode 100644,100755..100644
--- a/basic/source/runtime/step2.cxx
+++ b/basic/source/runtime/step2.cxx
diff --cc basic/source/uno/namecont.cxx
index 444a4ed,672cdea..097ec93
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@@ -34,12 -33,10 +34,10 @@@
#include <com/sun/star/embed/XTransactedObject.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <vcl/svapp.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
- #ifndef __RSC //autogen
#include <tools/errinf.hxx>
- #endif
#include <osl/mutex.hxx>
-#include <vos/diagnose.hxx>
+#include <osl/diagnose.h>
#include <rtl/uri.hxx>
#include <rtl/strbuf.hxx>
#include <comphelper/processfactory.hxx>
@@@ -64,12 -61,11 +62,13 @@@
#include <com/sun/star/uno/DeploymentException.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/script/LibraryNotLoadedException.hpp>
- #include "com/sun/star/deployment/ExtensionManager.hpp"
+ #include <com/sun/star/script/vba/VBAScriptEventId.hpp>
+ #include <com/sun/star/deployment/ExtensionManager.hpp>
#include <comphelper/storagehelper.hxx>
+#include <comphelper/anytostring.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <basic/sbmod.hxx>
+#include <boost/scoped_ptr.hpp>
namespace basic
{
@@@ -2827,18 -2889,43 +2873,55 @@@ void SAL_CALL SfxLibraryContainer::setV
}
}
+void SAL_CALL SfxLibraryContainer::setProjectName( const ::rtl::OUString& _projectname ) throw (RuntimeException)
+{
+ msProjectName = _projectname;
+ BasicManager* pBasMgr = getBasicManager();
+ // Temporary HACK
+ // Some parts of the VBA handling ( e.g. in core basic )
+ // code expect the name of the VBA project to be set as the name of
+ // the basic manager. Provide fail back here.
+ if( pBasMgr )
+ pBasMgr->SetName( msProjectName );
+}
+
+ sal_Int32 SAL_CALL SfxLibraryContainer::getRunningVBAScripts() throw (RuntimeException)
+ {
+ LibraryContainerMethodGuard aGuard( *this );
+ return mnRunningVBAScripts;
+ }
+
+ void SAL_CALL SfxLibraryContainer::addVBAScriptListener( const Reference< vba::XVBAScriptListener >& rxListener ) throw (RuntimeException)
+ {
+ maVBAScriptListeners.addTypedListener( rxListener );
+ }
+
+ void SAL_CALL SfxLibraryContainer::removeVBAScriptListener( const Reference< vba::XVBAScriptListener >& rxListener ) throw (RuntimeException)
+ {
+ maVBAScriptListeners.removeTypedListener( rxListener );
+ }
+
+ void SAL_CALL SfxLibraryContainer::broadcastVBAScriptEvent( sal_Int32 nIdentifier, const ::rtl::OUString& rModuleName ) throw (RuntimeException)
+ {
+ // own lock for accessing the number of running scripts
+ enterMethod();
+ switch( nIdentifier )
+ {
+ case vba::VBAScriptEventId::SCRIPT_STARTED:
+ ++mnRunningVBAScripts;
+ break;
+ case vba::VBAScriptEventId::SCRIPT_STOPPED:
+ --mnRunningVBAScripts;
+ break;
+ }
+ leaveMethod();
+
+ Reference< XModel > xModel = mxOwnerDocument; // weak-ref -> ref
+ Reference< XInterface > xSender( xModel, UNO_QUERY_THROW );
+ vba::VBAScriptEvent aEvent( xSender, nIdentifier, rModuleName );
+ maVBAScriptListeners.notify( aEvent );
+ }
+
// Methods XServiceInfo
::sal_Bool SAL_CALL SfxLibraryContainer::supportsService( const ::rtl::OUString& _rServiceName )
throw (RuntimeException)
@@@ -2919,11 -3006,23 +3002,14 @@@ Any SAL_CALL SfxLibrary::queryInterface
{
Any aRet;
- aRet = Any( ::cppu::queryInterface( rType,
- static_cast< XContainer * >( this ),
- static_cast< XNameContainer * >( this ),
- static_cast< XNameAccess * >( this ) ) );
-
- /*
- if( mbReadOnly )
- {
- aRet = Any( ::cppu::queryInterface( rType,
- static_cast< XContainer * >( this ),
- static_cast< XNameAccess * >( this ) ) );
- }
- else
- {
- */
- aRet = Any( ::cppu::queryInterface( rType,
++ aRet = Any(
++ ::cppu::queryInterface(
++ rType,
+ static_cast< XContainer * >( this ),
+ static_cast< XNameContainer * >( this ),
+ static_cast< XNameAccess * >( this ),
+ static_cast< XElementAccess * >( this ),
+ static_cast< XChangesNotifier * >( this ) ) );
- //}
if( !aRet.hasValue() )
aRet = OComponentHelper::queryInterface( rType );
return aRet;
diff --cc basic/util/makefile.mk
index 635b293,ae4456c..29564fd
mode 100755,100644..100755
--- a/basic/util/makefile.mk
+++ b/basic/util/makefile.mk
@@@ -62,8 -63,16 +62,11 @@@ SHL1STDLIBS=
$(COMPHELPERLIB) \
$(UNOTOOLSLIB) \
$(SOTLIB) \
- $(VOSLIB) \
$(XMLSCRIPTLIB)
+ # Uncomment the following line if DBG_TRACE_PROFILING is active in source/inc/sbtrace.hxx
+ # SHL1STDLIBS+=$(CANVASTOOLSLIB)
+
-.IF "$(SOLAR_JAVA)" != "TRUE"
-SHL1STDLIBS+=$(SJLIB)
-.ENDIF
-
.IF "$(GUI)"=="WNT"
SHL1STDLIBS+= \
$(UWINAPILIB) \
diff --cc connectivity/qa/connectivity/tools/CRMDatabase.java
index aa5811e,0e55318..0e55318
mode 100755,100644..100755
--- a/connectivity/qa/connectivity/tools/CRMDatabase.java
+++ b/connectivity/qa/connectivity/tools/CRMDatabase.java
diff --cc connectivity/qa/makefile.mk
index ee41cab,c087ab9..c087ab9
mode 100755,100644..100755
--- a/connectivity/qa/makefile.mk
+++ b/connectivity/qa/makefile.mk
diff --cc connectivity/source/commontools/predicateinput.cxx
index a4bd5ae,0164244..0c264e0
--- a/connectivity/source/commontools/predicateinput.cxx
+++ b/connectivity/source/commontools/predicateinput.cxx
@@@ -357,32 -406,38 +407,37 @@@ namespace dbtool
}
else
{
- if ( pParseNode->count() >= 3 )
+ OSQLParseNode* pValueNode = pOdbcSpec->getChild(1);
+ if ( SQL_NODE_STRING == pValueNode->getNodeType() )
+ sReturn = pValueNode->getTokenValue();
+ else
+ pValueNode->parseNodeToStr(sReturn, m_xConnection, &m_aParser.getContext(), sal_False, sal_True);
- // sReturn = pOdbcSpec->getChild(1)->getTokenValue();
+ }
+ }
+ else
+ {
+ if ( pParseNode->count() >= 3 )
+ {
+ OSQLParseNode* pValueNode = pParseNode->getChild(2);
+ OSL_ENSURE( pValueNode, "OPredicateInputController::getPredicateValue: invalid node child!" );
+ if ( !_bForStatementUse )
{
- OSQLParseNode* pValueNode = pParseNode->getChild(2);
- OSL_ENSURE( pValueNode, "OPredicateInputController::getPredicateValue: invalid node child!" );
- if ( !_bForStatementUse )
- {
- if ( SQL_NODE_STRING == pValueNode->getNodeType() )
- sReturn = pValueNode->getTokenValue();
- else
- pValueNode->parseNodeToStr(
- sReturn, m_xConnection, &m_aParser.getContext(), sal_False, sal_True
- );
- }
+ if ( SQL_NODE_STRING == pValueNode->getNodeType() )
+ sReturn = pValueNode->getTokenValue();
else
pValueNode->parseNodeToStr(
sReturn, m_xConnection, &m_aParser.getContext(), sal_False, sal_True
);
}
else
- OSL_FAIL( "OPredicateInputController::getPredicateValue: unknown/invalid structure (noodbc)!" );
+ pValueNode->parseNodeToStr(
+ sReturn, m_xConnection, &m_aParser.getContext(), sal_False, sal_True
+ );
}
-
- delete pParseNode;
+ else
- OSL_ENSURE( sal_False, "OPredicateInputController::getPredicateValue: unknown/invalid structure (noodbc)!" );
++ OSL_FAIL( "OPredicateInputController::getPredicateValue: unknown/invalid structure (noodbc)!" );
}
}
-
return sReturn;
}
//.........................................................................
diff --cc connectivity/source/drivers/ado/ado.xcu
index d7ea2c4,3ef8b4c..3ef8b4c
mode 100644,100755..100644
--- a/connectivity/source/drivers/ado/ado.xcu
+++ b/connectivity/source/drivers/ado/ado.xcu
diff --cc connectivity/source/drivers/dbase/DNoException.cxx
index b18e20b,b679a31..f1d0272
--- a/connectivity/source/drivers/dbase/DNoException.cxx
+++ b/connectivity/source/drivers/dbase/DNoException.cxx
@@@ -224,8 -241,8 +224,8 @@@ void ODbaseTable::AllocBuffer(
m_pBuffer = NULL;
}
- // Falls noch kein Puffer vorhanden: allozieren:
+ // If no buffer available: allocate
- if (m_pBuffer == NULL && nSize)
+ if (m_pBuffer == NULL && nSize > 0)
{
m_nBufferSize = nSize;
m_pBuffer = new sal_uInt8[m_nBufferSize+1];
diff --cc connectivity/source/drivers/dbase/DTable.cxx
index f309944,e82aff2..a54aebe
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@@ -2774,8 -2821,8 +2774,8 @@@ void ODbaseTable::AllocBuffer(
m_pBuffer = NULL;
}
- // Falls noch kein Puffer vorhanden: allozieren:
+ // if there is no buffer available: allocate:
- if (m_pBuffer == NULL && nSize)
+ if (m_pBuffer == NULL && nSize > 0)
{
m_nBufferSize = nSize;
m_pBuffer = new sal_uInt8[m_nBufferSize+1];
diff --cc connectivity/source/drivers/file/fcomp.cxx
index d054360,ab07769..fd7ce73
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@@ -115,8 -117,7 +115,8 @@@ void OPredicateCompiler::start(OSQLPars
pWhereClause = pTableExp->getChild(1);
- pOrderbyClause = pTableExp->getChild(4);
+ pOrderbyClause = pTableExp->getChild(ORDER_BY_CHILD_POS);
+ (void)pOrderbyClause;
}
else if (SQL_ISRULE(pSQLParseNode,update_statement_searched))
{
diff --cc connectivity/source/drivers/jdbc/JConnection.cxx
index 9621b33,1f15784..3b3648e
--- a/connectivity/source/drivers/jdbc/JConnection.cxx
+++ b/connectivity/source/drivers/jdbc/JConnection.cxx
@@@ -819,11 -818,11 +819,11 @@@ sal_Bool java_sql_Connection::construct
if ( t.pEnv && m_Driver_theClass && m_pDriverobject )
{
- // temporaere Variable initialisieren
+ // initialize temporary Variable
static const char * cSignature = "(Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection;";
static const char * cMethodName = "connect";
- // Java-Call absetzen
+ // Java-Call
- static jmethodID mID = NULL;
+ jmethodID mID = NULL;
if ( !mID )
mID = t.pEnv->GetMethodID( m_Driver_theClass, cMethodName, cSignature );
if ( mID )
diff --cc connectivity/source/drivers/jdbc/jdbc.xcu
index 49ae3b4,dd0da5d..dd0da5d
mode 100644,100755..100644
--- a/connectivity/source/drivers/jdbc/jdbc.xcu
+++ b/connectivity/source/drivers/jdbc/jdbc.xcu
diff --cc connectivity/source/drivers/macab/MacabRecord.cxx
index bb6eb60,5aad8fa..3bf9cac
mode 100644,100755..100644
--- a/connectivity/source/drivers/macab/MacabRecord.cxx
+++ b/connectivity/source/drivers/macab/MacabRecord.cxx
diff --cc connectivity/source/drivers/odbc/odbc.xcu
index f8efe2e,b664b38..b664b38
mode 100644,100755..100644
--- a/connectivity/source/drivers/odbc/odbc.xcu
+++ b/connectivity/source/drivers/odbc/odbc.xcu
diff --cc connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
index 99a30de,f8d6faa..4a6062a
--- a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
@@@ -979,10 -979,9 +979,11 @@@ void ODatabaseMetaDataResultSet::openCo
m_bFreeHandle = sal_True;
::rtl::OString aPKQ,aPKO,aPKN,aCOL;
- aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding);
+ if ( catalog.hasValue() )
+ aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding);
aPKO = ::rtl::OUStringToOString(schema,m_nTextEncoding);
+ aPKN = ::rtl::OUStringToOString(table,m_nTextEncoding);
+ aCOL = ::rtl::OUStringToOString(columnNamePattern,m_nTextEncoding);
const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL,
*pPKO = pSchemaPat && pSchemaPat->getLength() ? aPKO.getStr() : NULL,
@@@ -1013,10 -1012,9 +1014,11 @@@ void ODatabaseMetaDataResultSet::openCo
m_bFreeHandle = sal_True;
::rtl::OString aPKQ,aPKO,aPKN,aCOL;
- aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding);
+ if ( catalog.hasValue() )
+ aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding);
aPKO = ::rtl::OUStringToOString(schemaPattern,m_nTextEncoding);
+ aPKN = ::rtl::OUStringToOString(tableNamePattern,m_nTextEncoding);
+ aCOL = ::rtl::OUStringToOString(columnNamePattern,m_nTextEncoding);
const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL,
*pPKO = pSchemaPat && pSchemaPat->getLength() && pSchemaPat->getLength() ? aPKO.getStr() : NULL,
@@@ -1081,10 -1079,9 +1083,11 @@@ void ODatabaseMetaDataResultSet::openPr
m_bFreeHandle = sal_True;
::rtl::OString aPKQ,aPKO,aPKN,aCOL;
- aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding);
+ if ( catalog.hasValue() )
+ aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding);
aPKO = ::rtl::OUStringToOString(schemaPattern,m_nTextEncoding);
+ aPKN = ::rtl::OUStringToOString(procedureNamePattern,m_nTextEncoding);
+ aCOL = ::rtl::OUStringToOString(columnNamePattern,m_nTextEncoding);
const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL,
*pPKO = pSchemaPat && pSchemaPat->getLength() ? aPKO.getStr() : NULL,
@@@ -1116,9 -1113,9 +1119,10 @@@ void ODatabaseMetaDataResultSet::openPr
m_bFreeHandle = sal_True;
::rtl::OString aPKQ,aPKO,aPKN,aCOL;
- aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding);
+ if ( catalog.hasValue() )
+ aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding);
aPKO = ::rtl::OUStringToOString(schemaPattern,m_nTextEncoding);
+ aPKN = ::rtl::OUStringToOString(procedureNamePattern,m_nTextEncoding);
const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL,
*pPKO = pSchemaPat && pSchemaPat->getLength() ? aPKO.getStr() : NULL,
@@@ -1146,9 -1143,9 +1150,10 @@@ void ODatabaseMetaDataResultSet::openSp
m_bFreeHandle = sal_True;
::rtl::OString aPKQ,aPKO,aPKN,aCOL;
+ if ( catalog.hasValue() )
aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding);
aPKO = ::rtl::OUStringToOString(schema,m_nTextEncoding);
+ aPKN = ::rtl::OUStringToOString(table,m_nTextEncoding);
const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL,
*pPKO = pSchemaPat && pSchemaPat->getLength() ? aPKO.getStr() : NULL,
diff --cc connectivity/source/drivers/odbcbase/OResultSet.cxx
index 909143b,715afbb..06a225c
--- a/connectivity/source/drivers/odbcbase/OResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx
@@@ -1368,15 -1365,24 +1368,24 @@@ sal_Bool OResultSet::isBookmarkable()
//------------------------------------------------------------------------------
void OResultSet::setFetchDirection(sal_Int32 _par0)
{
- N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_CURSOR_TYPE,(SQLPOINTER)(sal_IntPtr)_par0,SQL_IS_UINTEGER);
+ OSL_ENSURE(_par0>0,"Illegal fetch direction!");
+ if ( _par0 > 0 )
+ {
- N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_CURSOR_TYPE,(SQLPOINTER)_par0,SQL_IS_UINTEGER);
++ N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_CURSOR_TYPE,(SQLPOINTER)(sal_IntPtr)_par0,SQL_IS_UINTEGER);
+ }
}
//------------------------------------------------------------------------------
void OResultSet::setFetchSize(sal_Int32 _par0)
{
- N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_ARRAY_SIZE,(SQLPOINTER)(sal_IntPtr)_par0,SQL_IS_UINTEGER);
- delete m_pRowStatusArray;
- m_pRowStatusArray = new SQLUSMALLINT[_par0];
- N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_STATUS_PTR,m_pRowStatusArray,SQL_IS_POINTER);
+ OSL_ENSURE(_par0>0,"Illegal fetch size!");
+ if ( _par0 > 0 )
+ {
- N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_ARRAY_SIZE,(SQLPOINTER)_par0,SQL_IS_UINTEGER);
++ N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_ARRAY_SIZE,(SQLPOINTER)(sal_IntPtr)_par0,SQL_IS_UINTEGER);
+ delete m_pRowStatusArray;
+
+ m_pRowStatusArray = new SQLUSMALLINT[_par0];
+ N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_STATUS_PTR,m_pRowStatusArray,SQL_IS_POINTER);
+ }
}
// -------------------------------------------------------------------------
IPropertyArrayHelper* OResultSet::createArrayHelper( ) const
diff --cc connectivity/source/drivers/odbcbase/OStatement.cxx
index ec2bd0d,9b61f02..9b8dc8a
--- a/connectivity/source/drivers/odbcbase/OStatement.cxx
+++ b/connectivity/source/drivers/odbcbase/OStatement.cxx
@@@ -877,13 -875,16 +877,15 @@@ void OStatement_Base::setFetchDirection
void OStatement_Base::setFetchSize(sal_Int32 _par0)
{
OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!");
+ OSL_ENSURE(_par0>0,"Illegal fetch size!");
+ if ( _par0 > 0 )
+ {
-
- SQLRETURN nRetCode = N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_ARRAY_SIZE,(SQLPOINTER)_par0,SQL_IS_UINTEGER);
++ SQLRETURN nRetCode = N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_ARRAY_SIZE,(SQLPOINTER)(sal_IntPtr)_par0,SQL_IS_UINTEGER);
- SQLRETURN nRetCode = N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_ARRAY_SIZE,(SQLPOINTER)(sal_IntPtr)_par0,SQL_IS_UINTEGER);
-
- delete m_pRowStatusArray;
- m_pRowStatusArray = new SQLUSMALLINT[_par0];
- nRetCode = N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_STATUS_PTR,m_pRowStatusArray,SQL_IS_POINTER);
- OSL_UNUSED( nRetCode );
+ delete m_pRowStatusArray;
+ m_pRowStatusArray = new SQLUSMALLINT[_par0];
+ nRetCode = N3SQLSetStmtAttr(m_aStatementHandle,SQL_ATTR_ROW_STATUS_PTR,m_pRowStatusArray,SQL_IS_POINTER);
+ }
}
//------------------------------------------------------------------------------
void OStatement_Base::setMaxFieldSize(sal_Int32 _par0)
diff --cc connectivity/source/parse/sqlbison.y
index dbfbd7a,ad271e8..7abcacd
mode 100755,100644..100755
--- a/connectivity/source/parse/sqlbison.y
+++ b/connectivity/source/parse/sqlbison.y
diff --cc connectivity/source/parse/sqlflex.l
index c959230,35a9278..85296a8
mode 100755,100644..100755
--- a/connectivity/source/parse/sqlflex.l
+++ b/connectivity/source/parse/sqlflex.l
diff --cc connectivity/source/parse/sqlnode.cxx
index 0c13673,240a4b9..0f9170b
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@@ -2470,8 -2468,8 +2470,8 @@@ void OSQLParseNode::parseLeaf(::rtl::OU
if (rString.getLength())
rString.appendAscii(" ");
- const ::rtl::OString sT = OSQLParser::TokenIDToStr(m_nNodeID, &rParam.m_rContext);
+ const ::rtl::OString sT = OSQLParser::TokenIDToStr(m_nNodeID, rParam.bInternational ? &rParam.m_rContext : NULL);
- rString.append(::rtl::OUString(sT,sT.getLength(),RTL_TEXTENCODING_UTF8));
+ rString.append(::rtl::OStringToOUString(sT,RTL_TEXTENCODING_UTF8));
} break;
case SQL_NODE_STRING:
if (rString.getLength())
diff --cc desktop/source/app/app.cxx
index 1544b20,b47a33a..28fa402
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@@ -1722,9 -1731,47 +1722,17 @@@ int Desktop::Main(
SynchronizeExtensionRepositories();
bool bAbort = CheckExtensionDependencies();
if ( bAbort )
- return;
+ return EXIT_FAILURE;
+ {
+ ::comphelper::ComponentContext aContext( xSMgr );
+ xRestartManager.set( aContext.getSingleton( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.OfficeRestartManager" ) ) ), UNO_QUERY );
+ }
+
+ // check whether the shutdown is caused by restart
+ pExecGlobals->bRestartRequested = ( xRestartManager.is() && xRestartManager->isRestartRequested( sal_True ) );
+
- // First Start Wizard allowed ?
- if ( ! pCmdLineArgs->IsNoFirstStartWizard() && !pExecGlobals->bRestartRequested )
- {
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ FirstStartWizard" );
-
- if (IsFirstStartWizardNeeded())
- {
- ::utl::RegOptions().removeReminder(); // remove patch registration reminder
- Reference< XJob > xFirstStartJob( xSMgr->createInstance(
- DEFINE_CONST_UNICODE( "com.sun.star.comp.desktop.FirstStart" ) ), UNO_QUERY );
- if (xFirstStartJob.is())
- {
- sal_Bool bDone = sal_False;
- Sequence< NamedValue > lArgs(2);
- lArgs[0].Name = ::rtl::OUString::createFromAscii("LicenseNeedsAcceptance");
- lArgs[0].Value <<= LicenseNeedsAcceptance();
- lArgs[1].Name = ::rtl::OUString::createFromAscii("LicensePath");
- lArgs[1].Value <<= GetLicensePath();
-
- xFirstStartJob->execute(lArgs) >>= bDone;
- if ( !bDone )
- {
- return;
- }
- }
- }
- else if ( RegistrationPage::hasReminderDateCome() )
- RegistrationPage::executeSingleMode();
-
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "} FirstStartWizard" );
- }
+ Migration::migrateSettingsIfNecessary();
// keep a language options instance...
pExecGlobals->pLanguageOptions.reset( new SvtLanguageOptions(sal_True));
diff --cc drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
index 9c985a6,8c4f79b..22ee5b5
--- a/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
@@@ -104,7 -103,7 +104,8 @@@
#define PRIMITIVE2D_ID_EPSPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 60)
#define PRIMITIVE2D_ID_DISCRETESHADOWPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 61)
#define PRIMITIVE2D_ID_HIDDENGEOMETRYPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 62)
-#define PRIMITIVE2D_ID_RENDERGRAPHICPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 63)
+#define PRIMITIVE2D_ID_CLIPPEDBORDERLINEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 63)
++#define PRIMITIVE2D_ID_RENDERGRAPHICPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 64)
//////////////////////////////////////////////////////////////////////////////
diff --cc drawinglayer/prj/d.lst
index 375889e,10e6927..2aa9246
--- a/drawinglayer/prj/d.lst
+++ b/drawinglayer/prj/d.lst
@@@ -13,8 -13,8 +13,9 @@@ mkdir: %_DEST%\inc%_EXT%\drawinglayer\p
..\inc\drawinglayer\primitive2d\backgroundcolorprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\backgroundcolorprimitive2d.hxx
..\inc\drawinglayer\primitive2d\baseprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\baseprimitive2d.hxx
..\inc\drawinglayer\primitive2d\bitmapprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\bitmapprimitive2d.hxx
+ ..\inc\drawinglayer\primitive2d\rendergraphicprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\rendergraphicprimitive2d.hxx
..\inc\drawinglayer\primitive2d\borderlineprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\borderlineprimitive2d.hxx
+..\inc\drawinglayer\primitive2d\clippedborderlineprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\clippedborderlineprimitive2d.hxx
..\inc\drawinglayer\primitive2d\chartprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\chartprimitive2d.hxx
..\inc\drawinglayer\primitive2d\controlprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\controlprimitive2d.hxx
..\inc\drawinglayer\primitive2d\discretebitmapprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\discretebitmapprimitive2d.hxx
diff --cc drawinglayer/source/primitive2d/graphicprimitive2d.cxx
index 6447d78,07a10be..4088854
--- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
@@@ -290,36 -307,487 +294,45 @@@ namespace drawinglaye
case GRAPHIC_GDIMETAFILE :
{
-#ifdef USE_DEBUG_CODE_TO_TEST_METAFILE_DECOMPOSE
- static bool bDoTest(false);
-
- if(bDoTest)
- {
- // All this is/was test code for testing MetafilePrimitive2D::create2DDecomposition
- // extensively. It may be needed again when diverse actions need debugging, so i leave
- // it in here, but take it out using USE_DEBUG_CODE_TO_TEST_METAFILE_DECOMPOSE.
- // Use it by compiling with the code, insert any DrawObject, convert to Metafile. The
- // debugger will then stop here (when breakpoint set, of course). You may enter single
- // parts of actions and/or change to true what You want to check.
- GDIMetaFile aMtf;
- VirtualDevice aOut;
- const basegfx::B2DRange aRange(getB2DRange(rViewInformation));
- const Rectangle aRectangle(
- basegfx::fround(aRange.getMinX()), basegfx::fround(aRange.getMinY()),
- basegfx::fround(aRange.getMaxX()), basegfx::fround(aRange.getMaxY()));
- const Point aOrigin(aRectangle.TopLeft());
- const Fraction aScaleX(aRectangle.getWidth());
- const Fraction aScaleY(aRectangle.getHeight());
- MapMode aMapMode(MAP_100TH_MM, aOrigin, aScaleX, aScaleY);
-
- Size aDummySize(2, 2);
- aOut.SetOutputSizePixel(aDummySize);
- aOut.EnableOutput(FALSE);
- aOut.SetMapMode(aMapMode);
-
- aMtf.Clear();
- aMtf.Record(&aOut);
-
- const Fraction aNeutralFraction(1, 1);
- const MapMode aRelativeMapMode(
- MAP_RELATIVE,
- Point(-aRectangle.Left(), -aRectangle.Top()),
- aNeutralFraction, aNeutralFraction);
- aOut.SetMapMode(aRelativeMapMode);
-
- if(false)
- {
- const sal_Int32 nHor(aRectangle.getWidth() / 4);
- const sal_Int32 nVer(aRectangle.getHeight() / 4);
- const Rectangle aCenteredRectangle(
- aRectangle.Left() + nHor, aRectangle.Top() + nVer,
- aRectangle.Right() - nHor, aRectangle.Bottom() - nVer);
- aOut.SetClipRegion(aCenteredRectangle);
- }
-
- if(false)
- {
- const Rectangle aRightRectangle(aRectangle.TopCenter(), aRectangle.BottomRight());
- aOut.IntersectClipRegion(aRightRectangle);
- }
-
- if(false)
- {
- const Rectangle aRightRectangle(aRectangle.TopCenter(), aRectangle.BottomRight());
- const Rectangle aBottomRectangle(aRectangle.LeftCenter(), aRectangle.BottomRight());
- Region aRegion(aRightRectangle);
- aRegion.Intersect(aBottomRectangle);
- aOut.IntersectClipRegion(aRegion);
- }
-
- if(false)
- {
- const sal_Int32 nHor(aRectangle.getWidth() / 10);
- const sal_Int32 nVer(aRectangle.getHeight() / 10);
- aOut.MoveClipRegion(nHor, nVer);
- }
-
- if(false)
- {
- Wallpaper aWallpaper(Color(COL_BLACK));
- aOut.DrawWallpaper(aRectangle, aWallpaper);
- }
-
- if(false)
- {
- Wallpaper aWallpaper(Gradient(GRADIENT_LINEAR, Color(COL_RED), Color(COL_GREEN)));
- aOut.DrawWallpaper(aRectangle, aWallpaper);
- }
-
- if(false)
- {
- SvFileStream aRead((const String&)String(ByteString( "c:\\test.png" ), RTL_TEXTENCODING_UTF8), STREAM_READ);
- vcl::PNGReader aPNGReader(aRead);
- BitmapEx aBitmapEx(aPNGReader.Read());
- Wallpaper aWallpaper(aBitmapEx);
- aOut.DrawWallpaper(aRectangle, aWallpaper);
- }
-
- if(false)
- {
- const double fHor(aRectangle.getWidth());
- const double fVer(aRectangle.getHeight());
- Color aColor(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0));
-
- for(sal_uInt32 a(0); a < 5000; a++)
- {
- const Point aPoint(
- aRectangle.Left() + basegfx::fround(rand() * (fHor / 32767.0)),
- aRectangle.Top() + basegfx::fround(rand() * (fVer / 32767.0)));
-
- if(!(a % 3))
- {
- aColor = Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0));
- }
-
- aOut.DrawPixel(aPoint, aColor);
- }
- }
-
- if(false)
- {
- const double fHor(aRectangle.getWidth());
- const double fVer(aRectangle.getHeight());
-
- aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0)));
- aOut.SetFillColor();
-
- for(sal_uInt32 a(0); a < 5000; a++)
- {
- const Point aPoint(
- aRectangle.Left() + basegfx::fround(rand() * (fHor / 32767.0)),
- aRectangle.Top() + basegfx::fround(rand() * (fVer / 32767.0)));
- aOut.DrawPixel(aPoint);
- }
- }
-
- if(false)
- {
- const double fHor(aRectangle.getWidth());
- const double fVer(aRectangle.getHeight());
-
- aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0)));
- aOut.SetFillColor();
-
- Point aStart(
- aRectangle.Left() + basegfx::fround(rand() * (fHor / 32767.0)),
- aRectangle.Top() + basegfx::fround(rand() * (fVer / 32767.0)));
- Point aStop(
- aRectangle.Left() + basegfx::fround(rand() * (fHor / 32767.0)),
- aRectangle.Top() + basegfx::fround(rand() * (fVer / 32767.0)));
-
- LineInfo aLineInfo(LINE_SOLID, basegfx::fround(fHor / 50.0));
- bool bUseLineInfo(false);
-
- for(sal_uInt32 a(0); a < 20; a++)
- {
- if(!(a%6))
- {
- bUseLineInfo = !bUseLineInfo;
- }
-
- if(!(a%4))
- {
- aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0)));
- }
-
- if(a%3)
- {
- aStart = aStop;
- aStop = Point(
- aRectangle.Left() + basegfx::fround(rand() * (fHor / 32767.0)),
- aRectangle.Top() + basegfx::fround(rand() * (fVer / 32767.0)));
- }
- else
- {
- aStart = Point(
- aRectangle.Left() + basegfx::fround(rand() * (fHor / 32767.0)),
- aRectangle.Top() + basegfx::fround(rand() * (fVer / 32767.0)));
- aStop = Point(
- aRectangle.Left() + basegfx::fround(rand() * (fHor / 32767.0)),
- aRectangle.Top() + basegfx::fround(rand() * (fVer / 32767.0)));
- }
-
- if(bUseLineInfo)
- {
- aOut.DrawLine(aStart, aStop, aLineInfo);
- }
- else
- {
- aOut.DrawLine(aStart, aStop);
- }
- }
- }
-
- if(false)
- {
- aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0)));
- aOut.SetFillColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0)));
- aOut.DrawRect(aRectangle);
- }
-
- if(false)
- {
- aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0)));
- aOut.SetFillColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0)));
- const sal_uInt32 nHor(aRectangle.getWidth() / 10);
- const sal_uInt32 nVer(aRectangle.getHeight() / 10);
- aOut.DrawRect(aRectangle, nHor, nVer);
- }
-
- if(false)
- {
- aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0)));
- aOut.SetFillColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0)));
- aOut.DrawEllipse(aRectangle);
- }
-
- if(false)
- {
- aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0)));
- aOut.SetFillColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0)));
- aOut.DrawArc(aRectangle, aRectangle.TopLeft(), aRectangle.BottomCenter());
- }
-
- if(false)
- {
- aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0)));
- aOut.SetFillColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0)));
- aOut.DrawPie(aRectangle, aRectangle.TopLeft(), aRectangle.BottomCenter());
- }
-
- if(false)
- {
- aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0)));
- aOut.SetFillColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0)));
- aOut.DrawChord(aRectangle, aRectangle.TopLeft(), aRectangle.BottomCenter());
- }
-
- if(false)
- {
- const double fHor(aRectangle.getWidth());
- const double fVer(aRectangle.getHeight());
-
- for(sal_uInt32 b(0); b < 5; b++)
- {
- const sal_uInt32 nCount(basegfx::fround(rand() * (20 / 32767.0)));
- const bool bClose(basegfx::fround(rand() / 32767.0));
- Polygon aPolygon(nCount + (bClose ? 1 : 0));
-
- for(sal_uInt32 a(0); a < nCount; a++)
- {
- const Point aPoint(
- aRectangle.Left() + basegfx::fround(rand() * (fHor / 32767.0)),
- aRectangle.Top() + basegfx::fround(rand() * (fVer / 32767.0)));
- aPolygon[a] = aPoint;
- }
-
- if(bClose)
- {
- aPolygon[aPolygon.GetSize() - 1] = aPolygon[0];
- }
-
- aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0)));
- aOut.SetFillColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0)));
-
- if(!(b%2))
- {
- const LineInfo aLineInfo(LINE_SOLID, basegfx::fround(fHor / 50.0));
- aOut.DrawPolyLine(aPolygon, aLineInfo);
- }
- else
- {
- aOut.DrawPolyLine(aPolygon);
- }
- }
- }
-
- if(false)
- {
- const double fHor(aRectangle.getWidth());
- const double fVer(aRectangle.getHeight());
-
- for(sal_uInt32 b(0); b < 5; b++)
- {
- const sal_uInt32 nCount(basegfx::fround(rand() * (20 / 32767.0)));
- const bool bClose(basegfx::fround(rand() / 32767.0));
- Polygon aPolygon(nCount + (bClose ? 1 : 0));
-
- for(sal_uInt32 a(0); a < nCount; a++)
- {
- const Point aPoint(
- aRectangle.Left() + basegfx::fround(rand() * (fHor / 32767.0)),
- aRectangle.Top() + basegfx::fround(rand() * (fVer / 32767.0)));
- aPolygon[a] = aPoint;
- }
-
- if(bClose)
- {
- aPolygon[aPolygon.GetSize() - 1] = aPolygon[0];
- }
-
- aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0)));
- aOut.SetFillColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0)));
- aOut.DrawPolygon(aPolygon);
- }
- }
-
- if(false)
- {
- const double fHor(aRectangle.getWidth());
- const double fVer(aRectangle.getHeight());
- PolyPolygon aPolyPolygon;
-
- for(sal_uInt32 b(0); b < 3; b++)
- {
- const sal_uInt32 nCount(basegfx::fround(rand() * (6 / 32767.0)));
- const bool bClose(basegfx::fround(rand() / 32767.0));
- Polygon aPolygon(nCount + (bClose ? 1 : 0));
-
- for(sal_uInt32 a(0); a < nCount; a++)
- {
- const Point aPoint(
- aRectangle.Left() + basegfx::fround(rand() * (fHor / 32767.0)),
- aRectangle.Top() + basegfx::fround(rand() * (fVer / 32767.0)));
- aPolygon[a] = aPoint;
- }
-
- if(bClose)
- {
- aPolygon[aPolygon.GetSize() - 1] = aPolygon[0];
- }
-
- aPolyPolygon.Insert(aPolygon);
- }
-
- aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0)));
- aOut.SetFillColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0)));
- aOut.DrawPolyPolygon(aPolyPolygon);
- }
-
- if(false)
- {
- SvFileStream aRead((const String&)String(ByteString( "c:\\test.png" ), RTL_TEXTENCODING_UTF8), STREAM_READ);
- vcl::PNGReader aPNGReader(aRead);
- BitmapEx aBitmapEx(aPNGReader.Read());
- aOut.DrawBitmapEx(aRectangle.TopLeft(), aBitmapEx);
- }
-
- if(false)
- {
- SvFileStream aRead((const String&)String(ByteString( "c:\\test.png" ), RTL_TEXTENCODING_UTF8), STREAM_READ);
- vcl::PNGReader aPNGReader(aRead);
- BitmapEx aBitmapEx(aPNGReader.Read());
- aOut.DrawBitmapEx(aRectangle.TopLeft(), aRectangle.GetSize(), aBitmapEx);
- }
-
- if(false)
- {
- SvFileStream aRead((const String&)String(ByteString( "c:\\test.png" ), RTL_TEXTENCODING_UTF8), STREAM_READ);
- vcl::PNGReader aPNGReader(aRead);
- BitmapEx aBitmapEx(aPNGReader.Read());
- const Size aSizePixel(aBitmapEx.GetSizePixel());
- aOut.DrawBitmapEx(
- aRectangle.TopLeft(),
- aRectangle.GetSize(),
- Point(0, 0),
- Size(aSizePixel.Width() /2, aSizePixel.Height() / 2),
- aBitmapEx);
- }
-
- if(false)
- {
- const double fHor(aRectangle.getWidth());
- const double fVer(aRectangle.getHeight());
- const Point aPointA(
- aRectangle.Left() + basegfx::fround(fHor * 0.2),
- aRectangle.Top() + basegfx::fround(fVer * 0.3));
- const Point aPointB(
- aRectangle.Left() + basegfx::fround(fHor * 0.2),
- aRectangle.Top() + basegfx::fround(fVer * 0.5));
- const Point aPointC(
- aRectangle.Left() + basegfx::fround(fHor * 0.2),
- aRectangle.Top() + basegfx::fround(fVer * 0.7));
- const String aText(ByteString("Hello, World!"), RTL_TEXTENCODING_UTF8);
-
- const String aFontName(ByteString("Comic Sans MS"), RTL_TEXTENCODING_UTF8);
- Font aFont(aFontName, Size(0, 1000));
- aFont.SetAlign(ALIGN_BASELINE);
- aFont.SetColor(COL_RED);
- //sal_Int32* pDXArray = new sal_Int32[aText.Len()];
-
- aFont.SetOutline(true);
- aOut.SetFont(aFont);
- aOut.DrawText(aPointA, aText, 0, aText.Len());
-
- aFont.SetShadow(true);
- aOut.SetFont(aFont);
- aOut.DrawText(aPointB, aText, 0, aText.Len());
-
- aFont.SetRelief(RELIEF_EMBOSSED);
- aOut.SetFont(aFont);
- aOut.DrawText(aPointC, aText, 0, aText.Len());
-
- //delete pDXArray;
- }
-
- if(false)
- {
- const double fHor(aRectangle.getWidth());
- const double fVer(aRectangle.getHeight());
- const Point aPointA(
- aRectangle.Left() + basegfx::fround(fHor * 0.2),
- aRectangle.Top() + basegfx::fround(fVer * 0.3));
- const Point aPointB(
- aRectangle.Left() + basegfx::fround(fHor * 0.2),
- aRectangle.Top() + basegfx::fround(fVer * 0.5));
- const Point aPointC(
- aRectangle.Left() + basegfx::fround(fHor * 0.2),
- aRectangle.Top() + basegfx::fround(fVer * 0.7));
- const String aText(ByteString("Hello, World!"), RTL_TEXTENCODING_UTF8);
-
- const String aFontName(ByteString("Comic Sans MS"), RTL_TEXTENCODING_UTF8);
- Font aFont(aFontName, Size(0, 1000));
- aFont.SetAlign(ALIGN_BASELINE);
- aFont.SetColor(COL_RED);
-
- aOut.SetFont(aFont);
- const sal_Int32 nWidth(aOut.GetTextWidth(aText, 0, aText.Len()));
- aOut.DrawText(aPointA, aText, 0, aText.Len());
- aOut.DrawTextLine(aPointA, nWidth, STRIKEOUT_SINGLE, UNDERLINE_SINGLE, UNDERLINE_SMALLWAVE);
- aOut.DrawTextLine(aPointB, nWidth, STRIKEOUT_SINGLE, UNDERLINE_SINGLE, UNDERLINE_SMALLWAVE);
- aOut.DrawTextLine(aPointC, nWidth, STRIKEOUT_SINGLE, UNDERLINE_SINGLE, UNDERLINE_SMALLWAVE);
- }
-
- aMtf.Stop();
- aMtf.WindStart();
- aMtf.SetPrefMapMode(MapMode(MAP_100TH_MM));
- aMtf.SetPrefSize(Size(aRectangle.getWidth(), aRectangle.getHeight()));
-
- xPrimitive = Primitive2DReference(
- new MetafilePrimitive2D(
- aTransform,
- aMtf));
- }
- else
- {
-#endif // USE_DEBUG_CODE_TO_TEST_METAFILE_DECOMPOSE
// create MetafilePrimitive2D
- const Graphic aGraphic(getGraphicObject().GetGraphic());
const GDIMetaFile& rMetafile = aTransformedGraphic.GetGDIMetaFile();
- xPrimitive = Primitive2DReference(
- new MetafilePrimitive2D(
- aTransform,
- rMetafile));
-
- // #i100357# find out if clipping is needed for this primitive. Unfortunately,
- // there exist Metafiles who's content is bigger than the proposed PrefSize set
- // at them. This is an error, but we need to work around this
- const Size aMetaFilePrefSize(rMetafile.GetPrefSize());
- const Size aMetaFileRealSize(
- const_cast< GDIMetaFile& >(rMetafile).GetBoundRect(
- *Application::GetDefaultDevice()).GetSize());
-
- if(aMetaFileRealSize.getWidth() > aMetaFilePrefSize.getWidth()
- || aMetaFileRealSize.getHeight() > aMetaFilePrefSize.getHeight())
+ if( aTransformedGraphic.IsRenderGraphic() )
{
- // clipping needed. Embed to MaskPrimitive2D. Create childs and mask polygon
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list