LibreOffice
LibreOffice 24.2 SDK API Reference
Variables
com::sun::star::script::vba::VBAEventId Constant Group Reference

Constants used to identify VBA document events. More...

Variables

const long NO_EVENT = -1
 An identifier not corresponding to any VBA document event. More...
 
const long AUTO_NEW = 1
 New document opened from template. More...
 
const long AUTO_OPEN = 2
 Document opened (loaded). More...
 
const long AUTO_CLOSE = 3
 Document about to be closed. More...
 
const long AUTO_EXEC = 4
 Application start. More...
 
const long AUTO_EXIT = 5
 Application exit. More...
 
const long DOCUMENT_NEW = 1001
 New text document opened from template. More...
 
const long DOCUMENT_OPEN = 1002
 Text document opened (loaded). More...
 
const long DOCUMENT_CLOSE = 1003
 Document about to be closed. More...
 
const long WORKBOOK_ACTIVATE = 2001
 Document activated. More...
 
const long WORKBOOK_DEACTIVATE = 2002
 Document deactivated. More...
 
const long WORKBOOK_OPEN = 2003
 Document opened (loaded). More...
 
const long WORKBOOK_BEFORECLOSE = 2004
 Document about to be closed. More...
 
const long WORKBOOK_BEFOREPRINT = 2005
 Document about to be printed. More...
 
const long WORKBOOK_BEFORESAVE = 2006
 Document about to be saved. More...
 
const long WORKBOOK_AFTERSAVE = 2007
 Document has been saved. More...
 
const long WORKBOOK_NEWSHEET = 2008
 New sheet inserted. More...
 
const long WORKBOOK_WINDOWACTIVATE = 2009
 Document window has been activated. More...
 
const long WORKBOOK_WINDOWDEACTIVATE = 2010
 Document window has been deactivated. More...
 
const long WORKBOOK_WINDOWRESIZE = 2011
 Document window has been resized. More...
 
const long WORKSHEET_ACTIVATE = 2101
 Worksheet has been activated (made visible). More...
 
const long WORKSHEET_DEACTIVATE = 2102
 Worksheet has been deactivated (made not visible). More...
 
const long WORKSHEET_BEFOREDOUBLECLICK = 2103
 Double click in the sheet. More...
 
const long WORKSHEET_BEFORERIGHTCLICK = 2104
 Right click in the sheet. More...
 
const long WORKSHEET_CALCULATE = 2105
 Cells in sheet have been recalculated. More...
 
const long WORKSHEET_CHANGE = 2106
 Cells in sheet have been changed. More...
 
const long WORKSHEET_SELECTIONCHANGE = 2107
 Selection in sheet has been changed. More...
 
const long WORKSHEET_FOLLOWHYPERLINK = 2108
 Hyperlink has been clicked. More...
 
const long USERDEFINED_START = 1000000
 Implementations are allowed to use identifiers above this value for any internal purpose. More...
 

Detailed Description

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 XVBAEventProcessor::processVbaEvent().

See also
XVBAEventProcessor

Variable Documentation

◆ AUTO_CLOSE

const long AUTO_CLOSE = 3

Document about to be closed.

No arguments.

◆ AUTO_EXEC

const long AUTO_EXEC = 4

Application start.

No arguments.

◆ AUTO_EXIT

const long AUTO_EXIT = 5

Application exit.

No arguments.

◆ AUTO_NEW

const long AUTO_NEW = 1

New document opened from template.

No arguments.

◆ AUTO_OPEN

const long AUTO_OPEN = 2

Document opened (loaded).

No arguments.

◆ DOCUMENT_CLOSE

const long DOCUMENT_CLOSE = 1003

Document about to be closed.

No arguments.

◆ DOCUMENT_NEW

const long DOCUMENT_NEW = 1001

New text document opened from template.

No arguments.

◆ DOCUMENT_OPEN

const long DOCUMENT_OPEN = 1002

Text document opened (loaded).

No arguments.

◆ NO_EVENT

const long NO_EVENT = -1

An identifier not corresponding to any VBA document event.

◆ USERDEFINED_START

const long USERDEFINED_START = 1000000

Implementations are allowed to use identifiers above this value for any internal purpose.

◆ WORKBOOK_ACTIVATE

const long WORKBOOK_ACTIVATE = 2001

Document activated.

No arguments.

◆ WORKBOOK_AFTERSAVE

const long WORKBOOK_AFTERSAVE = 2007

Document has been saved.

Arguments: boolean bSuccess.

◆ WORKBOOK_BEFORECLOSE

const long WORKBOOK_BEFORECLOSE = 2004

Document about to be closed.

Arguments: [out] boolean bCancel.

◆ WORKBOOK_BEFOREPRINT

const long WORKBOOK_BEFOREPRINT = 2005

Document about to be printed.

Arguments: [out] boolean bCancel.

◆ WORKBOOK_BEFORESAVE

const long WORKBOOK_BEFORESAVE = 2006

Document about to be saved.

Arguments: boolean bSaveAs, [out] boolean bCancel.

◆ WORKBOOK_DEACTIVATE

const long WORKBOOK_DEACTIVATE = 2002

Document deactivated.

No arguments.

◆ WORKBOOK_NEWSHEET

const long WORKBOOK_NEWSHEET = 2008

New sheet inserted.

Arguments: short nSheet.

◆ WORKBOOK_OPEN

const long WORKBOOK_OPEN = 2003

Document opened (loaded).

No arguments.

◆ WORKBOOK_WINDOWACTIVATE

const long WORKBOOK_WINDOWACTIVATE = 2009

Document window has been activated.

Arguments: XController aController.

◆ WORKBOOK_WINDOWDEACTIVATE

const long WORKBOOK_WINDOWDEACTIVATE = 2010

Document window has been deactivated.

Arguments: XController aController.

◆ WORKBOOK_WINDOWRESIZE

const long WORKBOOK_WINDOWRESIZE = 2011

Document window has been resized.

Arguments: XController aController.

◆ WORKSHEET_ACTIVATE

const long WORKSHEET_ACTIVATE = 2101

Worksheet has been activated (made visible).

Arguments: short nSheet.

◆ WORKSHEET_BEFOREDOUBLECLICK

const long WORKSHEET_BEFOREDOUBLECLICK = 2103

Double click in the sheet.

Arguments: XRange/XSheetCellRangeContainer aRange, [out] boolean bCancel.

◆ WORKSHEET_BEFORERIGHTCLICK

const long WORKSHEET_BEFORERIGHTCLICK = 2104

Right click in the sheet.

Arguments: XRange/XSheetCellRangeContainer aRange, [out] boolean bCancel.

◆ WORKSHEET_CALCULATE

const long WORKSHEET_CALCULATE = 2105

Cells in sheet have been recalculated.

Arguments: short nSheet.

◆ WORKSHEET_CHANGE

const long WORKSHEET_CHANGE = 2106

Cells in sheet have been changed.

Arguments: XRange/XSheetCellRangeContainer aRange.

◆ WORKSHEET_DEACTIVATE

const long WORKSHEET_DEACTIVATE = 2102

Worksheet has been deactivated (made not visible).

Arguments: short nSheet.

◆ WORKSHEET_FOLLOWHYPERLINK

const long WORKSHEET_FOLLOWHYPERLINK = 2108

Hyperlink has been clicked.

Arguments: XCell aCell.

◆ WORKSHEET_SELECTIONCHANGE

const long WORKSHEET_SELECTIONCHANGE = 2107

Selection in sheet has been changed.

Arguments: XRange/XSheetCellRangeContainer aRange.