ooo-build r12660 - in trunk: . patches/vba
- From: noelpwer svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r12660 - in trunk: . patches/vba
- Date: Mon, 26 May 2008 10:12:26 +0000 (UTC)
Author: noelpwer
Date: Mon May 26 10:12:26 2008
New Revision: 12660
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12660&view=rev
Log:
2008-05-26 Noel Power <noel power novell com>
* patches/vba/patches/vba/vba-check-for-macro.diff: fix compile
* errors
error(s) raising the IDE for security check
Modified:
trunk/ChangeLog
trunk/patches/vba/vba-check-for-macro.diff
Modified: trunk/patches/vba/vba-check-for-macro.diff
==============================================================================
--- trunk/patches/vba/vba-check-for-macro.diff (original)
+++ trunk/patches/vba/vba-check-for-macro.diff Mon May 26 10:12:26 2008
@@ -55,12 +55,40 @@
diff -rup /data4/scratch/dev300-ObjectModule/basic/source/classes/sbxmod.cxx basic/source/classes/sbxmod.cxx
--- /data4/scratch/dev300-ObjectModule/basic/source/classes/sbxmod.cxx 2008-05-13 20:13:54.000000000 +0100
+++ basic/source/classes/sbxmod.cxx 2008-05-21 00:33:28.000000000 +0100
-@@ -1280,6 +1289,20 @@ BOOL SbModule::ExceedsLegacyModuleSize()
+@@ -1280,6 +1347,48 @@ BOOL SbModule::ExceedsLegacyModuleSize()
return false;
}
++class ErrorHdlResetter
++{
++ Link mErrHandler;
++ bool mbError;
++ public:
++ ErrorHdlResetter() : mbError( false )
++ {
++ // save error handler
++ mErrHandler = StarBASIC::GetGlobalErrorHdl();
++ // set new error handler
++ StarBASIC::SetGlobalErrorHdl( LINK( this, ErrorHdlResetter, BasicErrorHdl ) );
++ }
++ ~ErrorHdlResetter()
++ {
++ // restore error handler
++ StarBASIC::SetGlobalErrorHdl(mErrHandler);
++ }
++ DECL_LINK( BasicErrorHdl, StarBASIC * );
++ bool HasError() { return mbError; }
++};
++IMPL_LINK( ErrorHdlResetter, BasicErrorHdl, StarBASIC *, /*pBasic*/)
++{
++ mbError = true;
++ return 0;
++}
++
+bool SbModule::HasExeCode()
+{
++
++ ErrorHdlResetter aGblErrHdl;
+ // And empty Image always has the Global Chain set up
+ static const unsigned char pEmptyImage[] = { 0x45, 0x0 , 0x0, 0x0, 0x0 };
+ // lets be stricter for the moment than VBA
@@ -69,7 +97,7 @@
+ if ( !IsCompiled() )
+ Compile();
+ if ( pImage && !( pImage->GetCodeSize() == 5 && ( memcmp( pImage->GetCode(), pEmptyImage, pImage->GetCodeSize() ) == 0 ) )
-+ || StarBASIC::GetErrorCode() )
++ || aGblErrHdl.HasError() )
+ bRes = true;
+ return bRes;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]