From b103addffc04b4ac0072992f2ec077135150d3ba Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Tue, 6 Jul 2010 19:34:53 +0200 Subject: [PATCH 1/7] mib17: #i112634# add VBA sheet event handling, based on a patch from Noel Power --- .../sun/star/script/vba/EventIdentifier.idl | 140 ++++++++++++++++++ .../sun/star/script/vba/EventProcessor.idl | 51 +++++++ .../script/vba/SpreadsheetEventProcessor.idl | 50 +++++++ .../star/script/vba/TextEventProcessor.idl | 50 +++++++ .../star/script/vba/XCoreEventProcessor.idl | 79 ++++++++++ .../sun/star/script/vba/XEventProcessor.idl | 114 ++++++++++++++ offapi/com/sun/star/script/vba/makefile.mk | 51 +++++++ offapi/prj/build.lst | 5 +- offapi/prj/d.lst | 2 + offapi/util/makefile.mk | 1 + offuh/prj/d.lst | 3 + 11 files changed, 544 insertions(+), 2 deletions(-) create mode 100755 offapi/com/sun/star/script/vba/EventIdentifier.idl create mode 100755 offapi/com/sun/star/script/vba/EventProcessor.idl create mode 100755 offapi/com/sun/star/script/vba/SpreadsheetEventProcessor.idl create mode 100755 offapi/com/sun/star/script/vba/TextEventProcessor.idl create mode 100755 offapi/com/sun/star/script/vba/XCoreEventProcessor.idl create mode 100755 offapi/com/sun/star/script/vba/XEventProcessor.idl create mode 100755 offapi/com/sun/star/script/vba/makefile.mk diff --git a/offapi/com/sun/star/script/vba/EventIdentifier.idl b/offapi/com/sun/star/script/vba/EventIdentifier.idl new file mode 100755 index 000000000000..ea200c858c30 --- /dev/null +++ b/offapi/com/sun/star/script/vba/EventIdentifier.idl @@ -0,0 +1,140 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_script_vba_EventIdentifier_idl__ +#define __com_sun_star_script_vba_EventIdentifier_idl__ + +//============================================================================= + +module com { module sun { module star { module script { module vba { + +//============================================================================= + +/** Constants used to identify VBA document events. + +

If one of these events is fired, a specific VBA macro in a specific + document code module will be executed.

+ +

Each event expects some specific arguments to be passed to + XEventProcessor::processVbaEvent.

+ + @see XEventProcessor + */ +constants EventIdentifier +{ + //========================================================================= + + /** An identifier not corresponding to any VBA document event. */ + const long NO_EVENT = -1; + + //========================================================================= + // Global events (identifiers from 1 to 999) + + /** New document opened from template. No arguments. */ + const long AUTO_NEW = 1; + /** Document opened (loaded). No arguments. */ + const long AUTO_OPEN = 2; + /** Document about to be closed. No arguments. */ + const long AUTO_CLOSE = 3; + /** Application start. No arguments. */ + const long AUTO_EXEC = 4; + /** Application exit. No arguments. */ + const long AUTO_EXIT = 5; + + //========================================================================= + // MS Word (identifiers from 1001 to 1999) + + /** New text document opened from template. No arguments. */ + const long DOCUMENT_NEW = 1001; + /** Text document opened (loaded). No arguments. */ + const long DOCUMENT_OPEN = 1002; + /** Document about to be closed. No arguments. */ + const long DOCUMENT_CLOSE = 1003; + + //========================================================================= + // MS Excel (identifiers from 2001 to 2999) + + //------------------------------------------------------------------------- + // document events (2001-2099) + + /** Document activated. No arguments. */ + const long WORKBOOK_ACTIVATE = 2001; + /** Document deactivated. No arguments. */ + const long WORKBOOK_DEACTIVATE = 2002; + /** Document opened (loaded). No arguments. */ + const long WORKBOOK_OPEN = 2003; + /** Document about to be closed. No arguments. Cancellable. */ + const long WORKBOOK_BEFORECLOSE = 2004; + /** Document about to be printed. No arguments. Cancellable. */ + const long WORKBOOK_BEFOREPRINT = 2005; + /** Document about to be saved. Arguments: boolean bSaveAs. Cancellable. */ + const long WORKBOOK_BEFORESAVE = 2006; + /** Document has been saved. Arguments: boolean bSuccess. */ + const long WORKBOOK_AFTERSAVE = 2007; + /** New sheet inserted. Arguments: short nSheet. */ + const long WORKBOOK_NEWSHEET = 2008; + /** Document window has been activated. No arguments. */ + const long WORKBOOK_WINDOWACTIVATE = 2009; + /** Document window has been deactivated. No arguments. */ + const long WORKBOOK_WINDOWDEACTIVATE = 2010; + /** Document window has been resized. No arguments. */ + const long WORKBOOK_WINDOWRESIZE = 2011; + + //------------------------------------------------------------------------- + // sheet events (2101-2199) + + /** Worksheet has been activated (made visible). Arguments: short nSheet. */ + const long WORKSHEET_ACTIVATE = 2101; + /** Worksheet has been activated (made visible). Arguments: short nSheet. */ + const long WORKSHEET_DEACTIVATE = 2102; + /** Double click in the sheet. Arguments: XRange/XSheetCellRangeContainer aRange. */ + const long WORKSHEET_BEFOREDOUBLECLICK = 2103; + /** Right click in the sheet. Arguments: XRange/XSheetCellRangeContainer aRange. */ + const long WORKSHEET_BEFORERIGHTCLICK = 2104; + /** Cells in sheet have been recalculated. Arguments: short nSheet. */ + const long WORKSHEET_CALCULATE = 2105; + /** Cells in sheet have been changed. Arguments: XRange/XSheetCellRangeContainer aRange. */ + const long WORKSHEET_CHANGE = 2106; + /** Selection in sheet has been changed. Arguments: XRange/XSheetCellRangeContainer aRange. */ + const long WORKSHEET_SELECTIONCHANGE = 2107; + /** Hyperlink has been clicked. Arguments: XCell aCell. */ + const long WORKSHEET_FOLLOWHYPERLINK = 2108; + + //========================================================================= + + /** Implementations are allowed to use identifiers above this value for any + internal purpose. */ + const long USERDEFINED_START = 1000000; +}; + +//============================================================================= + +}; }; }; }; }; + +//============================================================================= + +#endif diff --git a/offapi/com/sun/star/script/vba/EventProcessor.idl b/offapi/com/sun/star/script/vba/EventProcessor.idl new file mode 100755 index 000000000000..78b2d9c23fdb --- /dev/null +++ b/offapi/com/sun/star/script/vba/EventProcessor.idl @@ -0,0 +1,51 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_script_vba_EventProcessor_idl__ +#define __com_sun_star_script_vba_EventProcessor_idl__ + +#include + +module com { module sun { module star { module frame { interface XModel; }; }; }; }; + +//============================================================================= + +module com { module sun { module star { module script { module vba { + +//============================================================================= + +service EventProcessor : XEventProcessor +{ +}; + +//============================================================================= + +}; }; }; }; }; + +//============================================================================= + +#endif diff --git a/offapi/com/sun/star/script/vba/SpreadsheetEventProcessor.idl b/offapi/com/sun/star/script/vba/SpreadsheetEventProcessor.idl new file mode 100755 index 000000000000..680a0e1069aa --- /dev/null +++ b/offapi/com/sun/star/script/vba/SpreadsheetEventProcessor.idl @@ -0,0 +1,50 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_script_vba_SpreadsheetEventProcessor_idl__ +#define __com_sun_star_script_vba_SpreadsheetEventProcessor_idl__ + +#include + +//============================================================================= + +module com { module sun { module star { module script { module vba { + +//============================================================================= + +service SpreadsheetEventProcessor +{ + service EventProcessor; +}; + +//============================================================================= + +}; }; }; }; }; + +//============================================================================= + +#endif diff --git a/offapi/com/sun/star/script/vba/TextEventProcessor.idl b/offapi/com/sun/star/script/vba/TextEventProcessor.idl new file mode 100755 index 000000000000..ae2d36a223c6 --- /dev/null +++ b/offapi/com/sun/star/script/vba/TextEventProcessor.idl @@ -0,0 +1,50 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_script_vba_TextEventProcessor_idl__ +#define __com_sun_star_script_vba_TextEventProcessor_idl__ + +#include + +//============================================================================= + +module com { module sun { module star { module script { module vba { + +//============================================================================= + +service TextEventProcessor +{ + service EventProcessor; +}; + +//============================================================================= + +}; }; }; }; }; + +//============================================================================= + +#endif diff --git a/offapi/com/sun/star/script/vba/XCoreEventProcessor.idl b/offapi/com/sun/star/script/vba/XCoreEventProcessor.idl new file mode 100755 index 000000000000..be152a8ba7fd --- /dev/null +++ b/offapi/com/sun/star/script/vba/XCoreEventProcessor.idl @@ -0,0 +1,79 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_script_vba_XCoreEventProcessor_idl__ +#define __com_sun_star_script_vba_XCoreEventProcessor_idl__ + +#include +#include +#include +#include + +//============================================================================= + +module com { module sun { module star { module script { module vba { + +//============================================================================= + +/** Executes VBA event handlers based on a specific core model event. + */ +interface XCoreEventProcessor +{ + //------------------------------------------------------------------------- + + /** Executes a VBA compatible event handler for a core event. + + @param nSlotId + The implementation defined identifier of the core event. + + @throws IllegalArgumentException + if the passed slot identifier is not supported. + + @throws ScriptFrameworkErrorException + if the VBA event handler could not be invoked. Reasons may be, that + handling of VBA events is not enabled, that the VBA event handler + macro has not been found, or that the execution of the macro has + been aborted with an error. + + @throws VetoException + if the VBA event handler has indicated to veto the event. + **/ + void processCoreVbaEvent( [in] long nSlotId ) + raises (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::script::provider::ScriptFrameworkErrorException, + ::com::sun::star::util::VetoException); + + //------------------------------------------------------------------------- +}; + +//============================================================================= + +}; }; }; }; }; + +//============================================================================= + +#endif diff --git a/offapi/com/sun/star/script/vba/XEventProcessor.idl b/offapi/com/sun/star/script/vba/XEventProcessor.idl new file mode 100755 index 000000000000..579cdf881963 --- /dev/null +++ b/offapi/com/sun/star/script/vba/XEventProcessor.idl @@ -0,0 +1,114 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_script_vba_XEventProcessor_idl__ +#define __com_sun_star_script_vba_XEventProcessor_idl__ + +#include +#include +#include +#include + +//============================================================================= + +module com { module sun { module star { module script { module vba { + +//============================================================================= + +/** Executes VBA event handlers. + */ +interface XEventProcessor +{ + //------------------------------------------------------------------------- + + /** Specifies whether VBA event handling is currently disabled. + */ + [attribute] boolean IgnoreEvents; + + //------------------------------------------------------------------------- + + /** Returns whether a VBA event handler exists. + + @param nEventId + The identifier of the event. Must be a constant from + EventIdentifier. + + @param aArgs + Additional arguments needed to identify some event handlers, e.g. a + sheet index for spreadsheet events. + + @return + , if the VBA event handler exists. + + @throws IllegalArgumentException + if the passed event identifier is not supported, or if the passed + specifier is required but invalid. + **/ + boolean hasVbaEventHandler( [in] long nEventId, [in] sequence< any > aArgs ) + raises (::com::sun::star::lang::IllegalArgumentException); + + //------------------------------------------------------------------------- + + /** Executes a VBA event handler. + + @param nEventId + The identifier of the event. Must be a constant from + EventIdentifier. + + @param aArgs + The input arguments needed to create the argument list of the VBA + event handler. + + @throws IllegalArgumentException + if the passed event identifier is not supported, or if the passed + arguments do not conform to the arguments expected by the specified + event. + + @throws ScriptFrameworkErrorException + if the VBA event handler could not be invoked. Reasons may be, that + handling of VBA events is not enabled, that the VBA event handler + macro has not been found, or that the execution of the macro has + been aborted with an error. + + @throws VetoException + if the VBA event handler has indicated to veto the event. + **/ + void processVbaEvent( [in] long nEventId, [in] sequence< any > aArgs ) + raises (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::script::provider::ScriptFrameworkErrorException, + ::com::sun::star::util::VetoException); + + //------------------------------------------------------------------------- +}; + +//============================================================================= + +}; }; }; }; }; + +//============================================================================= + +#endif diff --git a/offapi/com/sun/star/script/vba/makefile.mk b/offapi/com/sun/star/script/vba/makefile.mk new file mode 100755 index 000000000000..c9526d86b070 --- /dev/null +++ b/offapi/com/sun/star/script/vba/makefile.mk @@ -0,0 +1,51 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ=..$/..$/..$/..$/.. + +PRJNAME=offapi + +TARGET=cssscriptvba +PACKAGE=com$/sun$/star$/script$/vba + +# --- Settings ----------------------------------------------------- +.INCLUDE : $(PRJ)$/util$/makefile.pmk + +# ------------------------------------------------------------------------ + +IDLFILES=\ + EventIdentifier.idl \ + EventProcessor.idl \ + SpreadsheetEventProcessor.idl \ + TextEventProcessor.idl \ + XCoreEventProcessor.idl \ + XEventProcessor.idl + +# ------------------------------------------------------------------ + +.INCLUDE : target.mk +.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/offapi/prj/build.lst b/offapi/prj/build.lst index a0be2398f429..bc6dda566031 100644 --- a/offapi/prj/build.lst +++ b/offapi/prj/build.lst @@ -3,6 +3,7 @@ oa offapi usr1 - all oa_mkout NULL oa offapi\com\sun\star\script nmake - all oa_script oa_embed NULL oa offapi\com\sun\star\script\browse nmake - all oa_sfbrowse NULL oa offapi\com\sun\star\script\provider nmake - all oa_sfprovider NULL +oa offapi\com\sun\star\script\vba nmake - all oa_script_vba NULL oa offapi\com\sun\star\auth nmake - all oa_auth NULL oa offapi\com\sun\star\accessibility nmake - all oa_accessibility oa_awt NULL oa offapi\com\sun\star\awt nmake - all oa_awt NULL @@ -21,10 +22,10 @@ oa offapi\com\sun\star\datatransfer\dnd nmake - all oa_datatrans_dnd oa_awt NULL oa offapi\com\sun\star\deployment nmake - all oa_deployment oa_ucb oa_xml_input NULL oa offapi\com\sun\star\deployment\test nmake - all oa_deploymenttest oa_ucb NULL oa offapi\com\sun\star\deployment\ui nmake - all oa_deployment_ui oa_awt oa_ui_dialogs NULL -oa offapi\com\sun\star\embed nmake - all oa_embed NULL oa offapi\com\sun\star\document nmake - all oa_docu oa_embed NULL oa offapi\com\sun\star\drawing nmake - all oa_draw NULL oa offapi\com\sun\star\drawing\framework nmake - all oa_draw_framework NULL +oa offapi\com\sun\star\embed nmake - all oa_embed NULL oa offapi\com\sun\star\form nmake - all oa_form oa_inspection NULL oa offapi\com\sun\star\form\component nmake - all oa_fcomp oa_form oa_form_submission NULL oa offapi\com\sun\star\form\inspection nmake - all oa_finsp oa_fcomp oa_inspection NULL @@ -105,4 +106,4 @@ oa offapi\com\sun\star\rendering nmake - all oa_rendering oa_geometry NU oa offapi\com\sun\star\rdf nmake - all oa_rdf oa_datatransfer oa_text NULL oa offapi\com\sun\star\office nmake - all oa_office oa_text NULL oa offapi\drafts\com\sun\star\form nmake - all oa_drafts_form NULL -oa offapi\util nmake - all oa_util oa_auth oa_awt oa_awttree oa_awtgrid oa_chart oa_chart2 oa_chart2_data oa_config oa_configbootstrap oa_configbackend oa_configbackend_xml oa_datatrans_clip oa_datatrans_dnd oa_datatransfer oa_docu oa_draw oa_draw_framework oa_embed oa_fcomp oa_finsp oa_fcontr oa_fieldmaster oa_form oa_xforms oa_formula oa_frame oa_i18n oa_inst oa_ldap oa_ling2 oa_logging oa_mail oa_media oa_mozilla oa_packages oa_manifest oa_zippackage oa_plug oa_pres oa_animations oa_putil oa_resrc oa_sax oa_xml_input oa_scan oa_sdb oa_sdbtools oa_sdbapp oa_sdbc oa_sdbcx oa_setup oa_sheet oa_style oa_svg oa_sync oa_sync2 oa_system oa_table oa_task oa_text oa_textfield oa_docinfo oa_ucb oa_view oa_xml oa_xml_dom oa_xml_xpath oa_xml_views oa_xml_events oa_image oa_xsd oa_inspection oa_ui oa_ui_dialogs oa_accessibility oa_form_binding oa_form_validation oa_form_submission oa_fruntime oa_geometry oa_rendering oa_sfprovider oa_sfbrowse oa_drafts_form oa_deployment oa_deploymenttest oa_deployment_ui oa_frame_status oa_gallery oa_graphic oa_security oa_crypto_sax oa_crypto oa_csax oa_wrapper oa_script oa_smarttags oa_report oa_reportins oa_reportmeta oa_rdf oa_oooimprovement oa_office oa_prestextfield oa_starme NULL +oa offapi\util nmake - all oa_util oa_auth oa_awt oa_awttree oa_awtgrid oa_chart oa_chart2 oa_chart2_data oa_config oa_configbootstrap oa_configbackend oa_configbackend_xml oa_datatrans_clip oa_datatrans_dnd oa_datatransfer oa_docu oa_draw oa_draw_framework oa_embed oa_fcomp oa_finsp oa_fcontr oa_fieldmaster oa_form oa_xforms oa_formula oa_frame oa_i18n oa_inst oa_ldap oa_ling2 oa_logging oa_mail oa_media oa_mozilla oa_packages oa_manifest oa_zippackage oa_plug oa_pres oa_animations oa_putil oa_resrc oa_sax oa_xml_input oa_scan oa_sdb oa_sdbtools oa_sdbapp oa_sdbc oa_sdbcx oa_setup oa_sheet oa_style oa_svg oa_sync oa_sync2 oa_system oa_table oa_task oa_text oa_textfield oa_docinfo oa_ucb oa_view oa_xml oa_xml_dom oa_xml_xpath oa_xml_views oa_xml_events oa_image oa_xsd oa_inspection oa_ui oa_ui_dialogs oa_accessibility oa_form_binding oa_form_validation oa_form_submission oa_fruntime oa_geometry oa_rendering oa_sfprovider oa_sfbrowse oa_drafts_form oa_deployment oa_deploymenttest oa_deployment_ui oa_frame_status oa_gallery oa_graphic oa_security oa_crypto_sax oa_crypto oa_csax oa_wrapper oa_script oa_script_vba oa_smarttags oa_report oa_reportins oa_reportmeta oa_rdf oa_oooimprovement oa_office oa_prestextfield oa_starme NULL diff --git a/offapi/prj/d.lst b/offapi/prj/d.lst index 9532cd773c6f..764521f3e944 100644 --- a/offapi/prj/d.lst +++ b/offapi/prj/d.lst @@ -69,6 +69,7 @@ mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\scanner mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\script mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\script\browse mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\script\provider +mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\script\vba mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\sdb mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\sdb\application mkdir: %COMMON_DEST%\idl%_EXT%\com\sun\star\sdb\tools @@ -185,6 +186,7 @@ mkdir: %COMMON_DEST%\idl%_EXT%\drafts\com\sun\star\form ..\com\sun\star\script\*.idl %COMMON_DEST%\idl%_EXT%\com\sun\star\script ..\com\sun\star\script\browse\*.idl %COMMON_DEST%\idl%_EXT%\com\sun\star\script\browse ..\com\sun\star\script\provider\*.idl %COMMON_DEST%\idl%_EXT%\com\sun\star\script\provider +..\com\sun\star\script\vba\*.idl %COMMON_DEST%\idl%_EXT%\com\sun\star\script\vba ..\com\sun\star\sdb\*.idl %COMMON_DEST%\idl%_EXT%\com\sun\star\sdb ..\com\sun\star\sdb\application\*.idl %COMMON_DEST%\idl%_EXT%\com\sun\star\sdb\application ..\com\sun\star\sdb\tools\*.idl %COMMON_DEST%\idl%_EXT%\com\sun\star\sdb\tools diff --git a/offapi/util/makefile.mk b/offapi/util/makefile.mk index 0ed4feba57b6..016180d7765c 100644 --- a/offapi/util/makefile.mk +++ b/offapi/util/makefile.mk @@ -95,6 +95,7 @@ UNOIDLDBFILES= \ $(UCR)$/cssdomevents.db \ $(UCR)$/cssscanner.db \ $(UCR)$/cssscript.db \ + $(UCR)$/cssscriptvba.db \ $(UCR)$/csssdb.db \ $(UCR)$/csssdbc.db \ $(UCR)$/csssdbcx.db \ diff --git a/offuh/prj/d.lst b/offuh/prj/d.lst index ba7343039eae..a88257dc695d 100644 --- a/offuh/prj/d.lst +++ b/offuh/prj/d.lst @@ -72,6 +72,7 @@ mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\sdbc mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\sdbcx mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\scanner mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\script +mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\script\vba mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\sheet mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\smarttags mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\style @@ -271,6 +272,8 @@ mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\rdf ..\%__SRC%\inc\offuh\com\sun\star\scanner\*.hpp %_DEST%\inc%_EXT%\offuh\com\sun\star\scanner\*.hpp ..\%__SRC%\inc\offuh\com\sun\star\script\*.hdl %_DEST%\inc%_EXT%\offuh\com\sun\star\script\*.hdl ..\%__SRC%\inc\offuh\com\sun\star\script\*.hpp %_DEST%\inc%_EXT%\offuh\com\sun\star\script\*.hpp +..\%__SRC%\inc\offuh\com\sun\star\script\vba\*.hdl %_DEST%\inc%_EXT%\offuh\com\sun\star\script\vba\*.hdl +..\%__SRC%\inc\offuh\com\sun\star\script\vba\*.hpp %_DEST%\inc%_EXT%\offuh\com\sun\star\script\vba\*.hpp ..\%__SRC%\inc\offuh\com\sun\star\sheet\*.hdl %_DEST%\inc%_EXT%\offuh\com\sun\star\sheet\*.hdl ..\%__SRC%\inc\offuh\com\sun\star\sheet\*.hpp %_DEST%\inc%_EXT%\offuh\com\sun\star\sheet\*.hpp ..\%__SRC%\inc\offuh\com\sun\star\smarttags\*.hdl %_DEST%\inc%_EXT%\offuh\com\sun\star\smarttags\*.hdl From ecc8b1ae1dd2ca82d37c7e660dd5949caefe37f6 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Wed, 7 Jul 2010 19:44:06 +0200 Subject: [PATCH 2/7] mib17: adjusted codename handling in xls filter, do not restrict vba event handling to xls files --- offapi/com/sun/star/script/vba/EventIdentifier.idl | 10 +++++----- offapi/com/sun/star/script/vba/XCoreEventProcessor.idl | 1 - offapi/com/sun/star/script/vba/XEventProcessor.idl | 1 - 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/offapi/com/sun/star/script/vba/EventIdentifier.idl b/offapi/com/sun/star/script/vba/EventIdentifier.idl index ea200c858c30..f70a84d9ace8 100755 --- a/offapi/com/sun/star/script/vba/EventIdentifier.idl +++ b/offapi/com/sun/star/script/vba/EventIdentifier.idl @@ -87,11 +87,11 @@ constants EventIdentifier const long WORKBOOK_DEACTIVATE = 2002; /** Document opened (loaded). No arguments. */ const long WORKBOOK_OPEN = 2003; - /** Document about to be closed. No arguments. Cancellable. */ + /** Document about to be closed. Arguments: [out] boolean bCancel. */ const long WORKBOOK_BEFORECLOSE = 2004; - /** Document about to be printed. No arguments. Cancellable. */ + /** Document about to be printed. Arguments: [out] boolean bCancel. */ const long WORKBOOK_BEFOREPRINT = 2005; - /** Document about to be saved. Arguments: boolean bSaveAs. Cancellable. */ + /** Document about to be saved. Arguments: boolean bSaveAs, [out] boolean bCancel. */ const long WORKBOOK_BEFORESAVE = 2006; /** Document has been saved. Arguments: boolean bSuccess. */ const long WORKBOOK_AFTERSAVE = 2007; @@ -111,9 +111,9 @@ constants EventIdentifier const long WORKSHEET_ACTIVATE = 2101; /** Worksheet has been activated (made visible). Arguments: short nSheet. */ const long WORKSHEET_DEACTIVATE = 2102; - /** Double click in the sheet. Arguments: XRange/XSheetCellRangeContainer aRange. */ + /** Double click in the sheet. Arguments: XRange/XSheetCellRangeContainer aRange. [out] boolean bCancel. */ const long WORKSHEET_BEFOREDOUBLECLICK = 2103; - /** Right click in the sheet. Arguments: XRange/XSheetCellRangeContainer aRange. */ + /** Right click in the sheet. Arguments: XRange/XSheetCellRangeContainer aRange. [out] boolean bCancel. */ const long WORKSHEET_BEFORERIGHTCLICK = 2104; /** Cells in sheet have been recalculated. Arguments: short nSheet. */ const long WORKSHEET_CALCULATE = 2105; diff --git a/offapi/com/sun/star/script/vba/XCoreEventProcessor.idl b/offapi/com/sun/star/script/vba/XCoreEventProcessor.idl index be152a8ba7fd..989b1f4039cb 100755 --- a/offapi/com/sun/star/script/vba/XCoreEventProcessor.idl +++ b/offapi/com/sun/star/script/vba/XCoreEventProcessor.idl @@ -30,7 +30,6 @@ #include #include -#include #include //============================================================================= diff --git a/offapi/com/sun/star/script/vba/XEventProcessor.idl b/offapi/com/sun/star/script/vba/XEventProcessor.idl index 579cdf881963..d856aeaa0a99 100755 --- a/offapi/com/sun/star/script/vba/XEventProcessor.idl +++ b/offapi/com/sun/star/script/vba/XEventProcessor.idl @@ -30,7 +30,6 @@ #include #include -#include #include //============================================================================= From 9eaf48be9b8a9317459383caf11b98e68b038955 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Mon, 12 Jul 2010 11:17:00 +0200 Subject: [PATCH 3/7] mib17: #i112634# API changes --- .../vba/{EventIdentifier.idl => VBAEventId.idl} | 14 +++++++------- ...extEventProcessor.idl => VBAEventProcessor.idl} | 9 ++++----- ...cessor.idl => VBASpreadsheetEventProcessor.idl} | 11 +++++------ ...ventProcessor.idl => VBATextEventProcessor.idl} | 10 +++++----- ...{XEventProcessor.idl => XVBAEventProcessor.idl} | 12 +++++------- offapi/com/sun/star/script/vba/makefile.mk | 10 +++++----- 6 files changed, 31 insertions(+), 35 deletions(-) rename offapi/com/sun/star/script/vba/{EventIdentifier.idl => VBAEventId.idl} (95%) rename offapi/com/sun/star/script/vba/{TextEventProcessor.idl => VBAEventProcessor.idl} (87%) rename offapi/com/sun/star/script/vba/{EventProcessor.idl => VBASpreadsheetEventProcessor.idl} (84%) rename offapi/com/sun/star/script/vba/{SpreadsheetEventProcessor.idl => VBATextEventProcessor.idl} (86%) rename offapi/com/sun/star/script/vba/{XEventProcessor.idl => XVBAEventProcessor.idl} (94%) diff --git a/offapi/com/sun/star/script/vba/EventIdentifier.idl b/offapi/com/sun/star/script/vba/VBAEventId.idl similarity index 95% rename from offapi/com/sun/star/script/vba/EventIdentifier.idl rename to offapi/com/sun/star/script/vba/VBAEventId.idl index f70a84d9ace8..fda83a18d495 100755 --- a/offapi/com/sun/star/script/vba/EventIdentifier.idl +++ b/offapi/com/sun/star/script/vba/VBAEventId.idl @@ -25,8 +25,8 @@ * ************************************************************************/ -#ifndef __com_sun_star_script_vba_EventIdentifier_idl__ -#define __com_sun_star_script_vba_EventIdentifier_idl__ +#ifndef __com_sun_star_script_vba_VBAEventId_idl__ +#define __com_sun_star_script_vba_VBAEventId_idl__ //============================================================================= @@ -40,11 +40,11 @@ module com { module sun { module star { module script { module vba { document code module will be executed.

Each event expects some specific arguments to be passed to - XEventProcessor::processVbaEvent.

+ XVBAEventProcessor::processVbaEvent.

- @see XEventProcessor + @see XVBAEventProcessor */ -constants EventIdentifier +constants VBAEventId { //========================================================================= @@ -111,9 +111,9 @@ constants EventIdentifier const long WORKSHEET_ACTIVATE = 2101; /** Worksheet has been activated (made visible). Arguments: short nSheet. */ const long WORKSHEET_DEACTIVATE = 2102; - /** Double click in the sheet. Arguments: XRange/XSheetCellRangeContainer aRange. [out] boolean bCancel. */ + /** Double click in the sheet. Arguments: XRange/XSheetCellRangeContainer aRange, [out] boolean bCancel. */ const long WORKSHEET_BEFOREDOUBLECLICK = 2103; - /** Right click in the sheet. Arguments: XRange/XSheetCellRangeContainer aRange. [out] boolean bCancel. */ + /** Right click in the sheet. Arguments: XRange/XSheetCellRangeContainer aRange, [out] boolean bCancel. */ const long WORKSHEET_BEFORERIGHTCLICK = 2104; /** Cells in sheet have been recalculated. Arguments: short nSheet. */ const long WORKSHEET_CALCULATE = 2105; diff --git a/offapi/com/sun/star/script/vba/TextEventProcessor.idl b/offapi/com/sun/star/script/vba/VBAEventProcessor.idl similarity index 87% rename from offapi/com/sun/star/script/vba/TextEventProcessor.idl rename to offapi/com/sun/star/script/vba/VBAEventProcessor.idl index ae2d36a223c6..d993b37ae250 100755 --- a/offapi/com/sun/star/script/vba/TextEventProcessor.idl +++ b/offapi/com/sun/star/script/vba/VBAEventProcessor.idl @@ -25,10 +25,10 @@ * ************************************************************************/ -#ifndef __com_sun_star_script_vba_TextEventProcessor_idl__ -#define __com_sun_star_script_vba_TextEventProcessor_idl__ +#ifndef __com_sun_star_script_vba_VBAEventProcessor_idl__ +#define __com_sun_star_script_vba_VBAEventProcessor_idl__ -#include +#include //============================================================================= @@ -36,9 +36,8 @@ module com { module sun { module star { module script { module vba { //============================================================================= -service TextEventProcessor +service VBAEventProcessor : XVBAEventProcessor { - service EventProcessor; }; //============================================================================= diff --git a/offapi/com/sun/star/script/vba/EventProcessor.idl b/offapi/com/sun/star/script/vba/VBASpreadsheetEventProcessor.idl similarity index 84% rename from offapi/com/sun/star/script/vba/EventProcessor.idl rename to offapi/com/sun/star/script/vba/VBASpreadsheetEventProcessor.idl index 78b2d9c23fdb..ce202da4f54c 100755 --- a/offapi/com/sun/star/script/vba/EventProcessor.idl +++ b/offapi/com/sun/star/script/vba/VBASpreadsheetEventProcessor.idl @@ -25,12 +25,10 @@ * ************************************************************************/ -#ifndef __com_sun_star_script_vba_EventProcessor_idl__ -#define __com_sun_star_script_vba_EventProcessor_idl__ +#ifndef __com_sun_star_script_vba_VBASpreadsheetEventProcessor_idl__ +#define __com_sun_star_script_vba_VBASpreadsheetEventProcessor_idl__ -#include - -module com { module sun { module star { module frame { interface XModel; }; }; }; }; +#include //============================================================================= @@ -38,8 +36,9 @@ module com { module sun { module star { module script { module vba { //============================================================================= -service EventProcessor : XEventProcessor +service VBASpreadsheetEventProcessor { + service VBAEventProcessor; }; //============================================================================= diff --git a/offapi/com/sun/star/script/vba/SpreadsheetEventProcessor.idl b/offapi/com/sun/star/script/vba/VBATextEventProcessor.idl similarity index 86% rename from offapi/com/sun/star/script/vba/SpreadsheetEventProcessor.idl rename to offapi/com/sun/star/script/vba/VBATextEventProcessor.idl index 680a0e1069aa..fd3c7f895d8d 100755 --- a/offapi/com/sun/star/script/vba/SpreadsheetEventProcessor.idl +++ b/offapi/com/sun/star/script/vba/VBATextEventProcessor.idl @@ -25,10 +25,10 @@ * ************************************************************************/ -#ifndef __com_sun_star_script_vba_SpreadsheetEventProcessor_idl__ -#define __com_sun_star_script_vba_SpreadsheetEventProcessor_idl__ +#ifndef __com_sun_star_script_vba_VBATextEventProcessor_idl__ +#define __com_sun_star_script_vba_VBATextEventProcessor_idl__ -#include +#include //============================================================================= @@ -36,9 +36,9 @@ module com { module sun { module star { module script { module vba { //============================================================================= -service SpreadsheetEventProcessor +service VBATextEventProcessor { - service EventProcessor; + service VBAEventProcessor; }; //============================================================================= diff --git a/offapi/com/sun/star/script/vba/XEventProcessor.idl b/offapi/com/sun/star/script/vba/XVBAEventProcessor.idl similarity index 94% rename from offapi/com/sun/star/script/vba/XEventProcessor.idl rename to offapi/com/sun/star/script/vba/XVBAEventProcessor.idl index d856aeaa0a99..7853d71d65ac 100755 --- a/offapi/com/sun/star/script/vba/XEventProcessor.idl +++ b/offapi/com/sun/star/script/vba/XVBAEventProcessor.idl @@ -25,8 +25,8 @@ * ************************************************************************/ -#ifndef __com_sun_star_script_vba_XEventProcessor_idl__ -#define __com_sun_star_script_vba_XEventProcessor_idl__ +#ifndef __com_sun_star_script_vba_XVBAEventProcessor_idl__ +#define __com_sun_star_script_vba_XVBAEventProcessor_idl__ #include #include @@ -40,7 +40,7 @@ module com { module sun { module star { module script { module vba { /** Executes VBA event handlers. */ -interface XEventProcessor +interface XVBAEventProcessor { //------------------------------------------------------------------------- @@ -53,8 +53,7 @@ interface XEventProcessor /** Returns whether a VBA event handler exists. @param nEventId - The identifier of the event. Must be a constant from - EventIdentifier. + The identifier of the event. Must be a constant from VBAEventId. @param aArgs Additional arguments needed to identify some event handlers, e.g. a @@ -75,8 +74,7 @@ interface XEventProcessor /** Executes a VBA event handler. @param nEventId - The identifier of the event. Must be a constant from - EventIdentifier. + The identifier of the event. Must be a constant from VBAEventId. @param aArgs The input arguments needed to create the argument list of the VBA diff --git a/offapi/com/sun/star/script/vba/makefile.mk b/offapi/com/sun/star/script/vba/makefile.mk index c9526d86b070..857df4f9bf63 100755 --- a/offapi/com/sun/star/script/vba/makefile.mk +++ b/offapi/com/sun/star/script/vba/makefile.mk @@ -38,12 +38,12 @@ PACKAGE=com$/sun$/star$/script$/vba # ------------------------------------------------------------------------ IDLFILES=\ - EventIdentifier.idl \ - EventProcessor.idl \ - SpreadsheetEventProcessor.idl \ - TextEventProcessor.idl \ + VBAEventId.idl \ + VBAEventProcessor.idl \ + VBASpreadsheetEventProcessor.idl \ + VBATextEventProcessor.idl \ XCoreEventProcessor.idl \ - XEventProcessor.idl + XVBAEventProcessor.idl # ------------------------------------------------------------------ From 5e171284bb76b6fc12478ceeb6ce7da243d795b6 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Thu, 15 Jul 2010 14:30:44 +0200 Subject: [PATCH 4/7] mib17: #i112634# do not use an UNO interface to handle VBA BeforeSave and BeforePrint events --- .../star/script/vba/XCoreEventProcessor.idl | 78 ------------------- offapi/com/sun/star/script/vba/makefile.mk | 1 - 2 files changed, 79 deletions(-) delete mode 100755 offapi/com/sun/star/script/vba/XCoreEventProcessor.idl diff --git a/offapi/com/sun/star/script/vba/XCoreEventProcessor.idl b/offapi/com/sun/star/script/vba/XCoreEventProcessor.idl deleted file mode 100755 index 989b1f4039cb..000000000000 --- a/offapi/com/sun/star/script/vba/XCoreEventProcessor.idl +++ /dev/null @@ -1,78 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef __com_sun_star_script_vba_XCoreEventProcessor_idl__ -#define __com_sun_star_script_vba_XCoreEventProcessor_idl__ - -#include -#include -#include - -//============================================================================= - -module com { module sun { module star { module script { module vba { - -//============================================================================= - -/** Executes VBA event handlers based on a specific core model event. - */ -interface XCoreEventProcessor -{ - //------------------------------------------------------------------------- - - /** Executes a VBA compatible event handler for a core event. - - @param nSlotId - The implementation defined identifier of the core event. - - @throws IllegalArgumentException - if the passed slot identifier is not supported. - - @throws ScriptFrameworkErrorException - if the VBA event handler could not be invoked. Reasons may be, that - handling of VBA events is not enabled, that the VBA event handler - macro has not been found, or that the execution of the macro has - been aborted with an error. - - @throws VetoException - if the VBA event handler has indicated to veto the event. - **/ - void processCoreVbaEvent( [in] long nSlotId ) - raises (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::script::provider::ScriptFrameworkErrorException, - ::com::sun::star::util::VetoException); - - //------------------------------------------------------------------------- -}; - -//============================================================================= - -}; }; }; }; }; - -//============================================================================= - -#endif diff --git a/offapi/com/sun/star/script/vba/makefile.mk b/offapi/com/sun/star/script/vba/makefile.mk index 857df4f9bf63..2cb93401ae00 100755 --- a/offapi/com/sun/star/script/vba/makefile.mk +++ b/offapi/com/sun/star/script/vba/makefile.mk @@ -42,7 +42,6 @@ IDLFILES=\ VBAEventProcessor.idl \ VBASpreadsheetEventProcessor.idl \ VBATextEventProcessor.idl \ - XCoreEventProcessor.idl \ XVBAEventProcessor.idl # ------------------------------------------------------------------ From c4e382c4e91e35c71d09530eed21ad22d4a507a0 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Tue, 27 Jul 2010 11:53:35 +0200 Subject: [PATCH 5/7] mib17: #i112634# prepare loading VBA with document events from ODF and XLSM --- offapi/com/sun/star/script/vba/XVBAEventProcessor.idl | 6 ------ 1 file changed, 6 deletions(-) diff --git a/offapi/com/sun/star/script/vba/XVBAEventProcessor.idl b/offapi/com/sun/star/script/vba/XVBAEventProcessor.idl index 7853d71d65ac..badc78728c51 100755 --- a/offapi/com/sun/star/script/vba/XVBAEventProcessor.idl +++ b/offapi/com/sun/star/script/vba/XVBAEventProcessor.idl @@ -44,12 +44,6 @@ interface XVBAEventProcessor { //------------------------------------------------------------------------- - /** Specifies whether VBA event handling is currently disabled. - */ - [attribute] boolean IgnoreEvents; - - //------------------------------------------------------------------------- - /** Returns whether a VBA event handler exists. @param nEventId From 549c7c352a25280a9eb038220a9920c1110fd91b Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Tue, 27 Jul 2010 14:43:33 +0200 Subject: [PATCH 6/7] mib17: move VBA specific interfaces into vba subdir --- offapi/com/sun/star/script/makefile.mk | 4 +- .../XVBACompatibility.idl} | 27 +++++----- .../star/script/{ => vba}/XVBAModuleInfo.idl | 49 ++++++++++--------- offapi/com/sun/star/script/vba/makefile.mk | 4 +- 4 files changed, 43 insertions(+), 41 deletions(-) rename offapi/com/sun/star/script/{XVBACompat.idl => vba/XVBACompatibility.idl} (72%) rename offapi/com/sun/star/script/{ => vba}/XVBAModuleInfo.idl (70%) diff --git a/offapi/com/sun/star/script/makefile.mk b/offapi/com/sun/star/script/makefile.mk index b694a753f7d7..4215ade1c6ea 100644 --- a/offapi/com/sun/star/script/makefile.mk +++ b/offapi/com/sun/star/script/makefile.mk @@ -48,10 +48,8 @@ IDLFILES=\ XPersistentLibraryContainer.idl\ XStorageBasedLibraryContainer.idl\ ModuleSizeExceededRequest.idl\ - XVBACompat.idl\ - XVBAModuleInfo.idl\ ModuleInfo.idl\ - ModuleType.idl\ + ModuleType.idl # ------------------------------------------------------------------ diff --git a/offapi/com/sun/star/script/XVBACompat.idl b/offapi/com/sun/star/script/vba/XVBACompatibility.idl similarity index 72% rename from offapi/com/sun/star/script/XVBACompat.idl rename to offapi/com/sun/star/script/vba/XVBACompatibility.idl index 09da54eb27cd..9027338718b2 100644 --- a/offapi/com/sun/star/script/XVBACompat.idl +++ b/offapi/com/sun/star/script/vba/XVBACompatibility.idl @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XLibraryContainer.idl,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,23 +24,27 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef __com_sun_star_script_XVBACompat_idl__ -#define __com_sun_star_script_XVBACompat_idl__ -#ifndef __com_sun_star_uno_XInterface_idl__ -#include -#endif +#ifndef __com_sun_star_script_vba_XVBACompatibility_idl__ +#define __com_sun_star_script_vba_XVBACompatibility_idl__ //============================================================================= -module com { module sun { module star { module script { +module com { module sun { module star { module script { module vba { -interface XVBACompat: com::sun::star::uno::XInterface +interface XVBACompatibility { + //------------------------------------------------------------------------- -//============================================================================= - [attribute ] boolean VBACompatModeOn; + [attribute] boolean VBACompatibilityMode; + + //------------------------------------------------------------------------- +}; }; }; }; }; + +//============================================================================= + }; + #endif diff --git a/offapi/com/sun/star/script/XVBAModuleInfo.idl b/offapi/com/sun/star/script/vba/XVBAModuleInfo.idl similarity index 70% rename from offapi/com/sun/star/script/XVBAModuleInfo.idl rename to offapi/com/sun/star/script/vba/XVBAModuleInfo.idl index f9c4e64223c3..919f54148e4a 100644 --- a/offapi/com/sun/star/script/XVBAModuleInfo.idl +++ b/offapi/com/sun/star/script/vba/XVBAModuleInfo.idl @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XLibraryContainer.idl,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,47 +24,51 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef __com_sun_star_script_XVBACompat_idl__ -#define __com_sun_star_script_XVBACompat_idl__ -#ifndef __com_sun_star_uno_XInterface_idl__ -#include -#endif -#ifndef __com_sun_star_script_ModuleInfo_idl__ +#ifndef __com_sun_star_script_vba_XVBAModuleInfo_idl__ +#define __com_sun_star_script_vba_XVBAModuleInfo_idl__ + #include -#endif -#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ #include -#endif -#ifndef __com_sun_star_container_ElementExistException_idl__ #include -#endif -#ifndef __com_sun_star_lang_WrappedTargetException_idl__ #include -#endif -#ifndef __com_sun_star_container_NoSuchElementException_idl__ #include -#endif //============================================================================= -module com { module sun { module star { module script { +module com { module sun { module star { module script { module vba { -interface XVBAModuleInfo: com::sun::star::uno::XInterface +interface XVBAModuleInfo { + //------------------------------------------------------------------------- - com::sun::star::script::ModuleInfo getModuleInfo( [in] string ModuleName ) + com::sun::star::script::ModuleInfo getModuleInfo( [in] string ModuleName ) raises( com::sun::star::container::NoSuchElementException, com::sun::star::lang::WrappedTargetException ); - boolean hasModuleInfo( [in] string ModuleName ); + + //------------------------------------------------------------------------- + + boolean hasModuleInfo( [in] string ModuleName ); + + //------------------------------------------------------------------------- + void insertModuleInfo( [in] string ModuleName, [in] com::sun::star::script::ModuleInfo ModuleInfo ) raises( com::sun::star::lang::IllegalArgumentException, com::sun::star::container::ElementExistException, com::sun::star::lang::WrappedTargetException ); + + //------------------------------------------------------------------------- + void removeModuleInfo( [in] string ModuleName ) raises( com::sun::star::container::NoSuchElementException, com::sun::star::lang::WrappedTargetException ); -}; }; }; }; + + //------------------------------------------------------------------------- }; + +}; }; }; }; }; + +//============================================================================= + #endif diff --git a/offapi/com/sun/star/script/vba/makefile.mk b/offapi/com/sun/star/script/vba/makefile.mk index 2cb93401ae00..4657b587d7d8 100755 --- a/offapi/com/sun/star/script/vba/makefile.mk +++ b/offapi/com/sun/star/script/vba/makefile.mk @@ -42,7 +42,9 @@ IDLFILES=\ VBAEventProcessor.idl \ VBASpreadsheetEventProcessor.idl \ VBATextEventProcessor.idl \ - XVBAEventProcessor.idl + XVBACompatibility.idl \ + XVBAEventProcessor.idl \ + XVBAModuleInfo.idl # ------------------------------------------------------------------ From 8b75670936364c84f0879470154ada5aad2dddda Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Wed, 28 Jul 2010 16:02:20 +0200 Subject: [PATCH 7/7] mib17: missing includes --- offapi/com/sun/star/script/vba/XVBACompatibility.idl | 6 +++--- offapi/com/sun/star/script/vba/XVBAEventProcessor.idl | 1 + offapi/com/sun/star/script/vba/XVBAModuleInfo.idl | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/offapi/com/sun/star/script/vba/XVBACompatibility.idl b/offapi/com/sun/star/script/vba/XVBACompatibility.idl index 9027338718b2..bfa9d01655fa 100644 --- a/offapi/com/sun/star/script/vba/XVBACompatibility.idl +++ b/offapi/com/sun/star/script/vba/XVBACompatibility.idl @@ -28,6 +28,8 @@ #ifndef __com_sun_star_script_vba_XVBACompatibility_idl__ #define __com_sun_star_script_vba_XVBACompatibility_idl__ +#include + //============================================================================= module com { module sun { module star { module script { module vba { @@ -41,10 +43,8 @@ interface XVBACompatibility //------------------------------------------------------------------------- }; -}; }; }; }; +}; }; }; }; }; //============================================================================= -}; - #endif diff --git a/offapi/com/sun/star/script/vba/XVBAEventProcessor.idl b/offapi/com/sun/star/script/vba/XVBAEventProcessor.idl index badc78728c51..4a3534de8412 100755 --- a/offapi/com/sun/star/script/vba/XVBAEventProcessor.idl +++ b/offapi/com/sun/star/script/vba/XVBAEventProcessor.idl @@ -28,6 +28,7 @@ #ifndef __com_sun_star_script_vba_XVBAEventProcessor_idl__ #define __com_sun_star_script_vba_XVBAEventProcessor_idl__ +#include #include #include #include diff --git a/offapi/com/sun/star/script/vba/XVBAModuleInfo.idl b/offapi/com/sun/star/script/vba/XVBAModuleInfo.idl index 919f54148e4a..9954281a5a71 100644 --- a/offapi/com/sun/star/script/vba/XVBAModuleInfo.idl +++ b/offapi/com/sun/star/script/vba/XVBAModuleInfo.idl @@ -28,6 +28,7 @@ #ifndef __com_sun_star_script_vba_XVBAModuleInfo_idl__ #define __com_sun_star_script_vba_XVBAModuleInfo_idl__ +#include #include #include #include