openoffice--Slot Processing
来源:互联网 发布:python好玩的程序 编辑:程序博客网 时间:2024/05/15 15:26
In former (Pre-UNO) time the slots where not only used for command dispatching but also for the implementation of our Basic API (up to StarOffice 5.2), so the slot arrays where "real" interfaces. There are a lot residues of the in the sdi files (see below), but they aren't used anymore.
The use case explains why there are two different kinds of slots, property slots and method slots, and the difference between them can be spotted easily from the definition of a slot in the sdi file. Here are two examples, the first one describing a method slot and the second one describing a property slot:
SfxVoidItem About SID_ABOUT () [ /* flags: */ AutoUpdate = FALSE, Cachable = Cachable, FastCall = FALSE, HasCoreId = FALSE, HasDialog = TRUE, ReadyOnlyDoc = TRUE, Toggle = FALSE, Container = FALSE, RecordAbsolute = FALSE, RecordPerSet; Synchron; /* config */ AccelConfig = TRUE, MenuConfig = TRUE, StatusBarConfig = FALSE, ToolBoxConfig = TRUE, GroupId = GID_APPLICATION; ] SfxBoolItem DesignerDialog SID_STYLE_DESIGNER [ /* flags: */ AutoUpdate = TRUE, Cachable = Cachable, FastCall = TRUE, HasCoreId = FALSE, HasDialog = FALSE, ReadyOnlyDoc = FALSE, Toggle = FALSE, Container = FALSE, RecordAbsolute = FALSE, RecordPerSet; Synchron; Readyonly = FALSE, /* config */ AccelConfig = TRUE, MenuConfig = TRUE, StatusBarConfig = FALSE, ToolBoxConfig = TRUE, GroupId = GID_FORMAT; ]
Each slot is a block in rectangular bracket filled with attributes that is preceded by two lines that identify the slot and define its nature. The exact meaning of all the attributes is explained below, the most notable difference is seen in the second line of each block: the paranthesis of the "About" slot classify it as a method while the other one (without paranthesis) is a property. As explained above, this classification goes back to the old Basic API but besides that it's important for the implementation of macro recording that is also based on the Dispatch API (and for SFX component it's implemented using slots). "Method" and "property" slots are recorded differently.
The name in the middle of each first line of a block was used as the name of the property or method in the Basic API and today this name is the internal command name that is matched to any ".uno:xxx" CommandURLs of the Dispatch API. As an example, the slot named "Undo" is assigned to the ".uno:Undo" command. This matching requires that the internal command names have to be unique in the complete module. This uniqueness is verified by the svidl compiler that breaks in case if name clashes in a module.
The last part of each first line is the so called SlotID that in former times was the real identifier (not as today the internal command name) and it was also used inside the GUI element configuration files where today CommandURLs are used. So this SlotID had to be unique for the module at least, currently it's even globally unique but at least theoretically it is now obsolete. Inside the slot processing only the textual representation of the SlotID is relevant , not its numerical value.
Property slots have a type specified by the first part of the first line. The same data in a method slot specifies the return value of the associated method. Method slots also can gave parameters (non empty paranthesis) and a return value that could be used in the old Basic API of StarOffice, but also in internal methods of the SfxDispatcher. Strictly speaking the latter is still possible but we try to get rid of this. Here are two examples for slots with arguments, with and without return value:
FALSE: in case of OLE inplace editing this slot is automatically disabled by SFX if the component is the container. RecordAbsolute Obsolete RecordPerSet (RecordPerItem, NoRecord) See explanation for Recording. Synchron (Asynchron) Asynchron: SFX execute the slot by posting a user event instead of directly calling the execute function of the slot Readonly Obsolete AccelConfig Slot may be offered in the configuration dialog for keyboard shortcuts MenuConfig Slot may be offered in the configuration dialog for menus StatusBarConfig Slot may be offered in the configuration dialog for status bar ToolboxConfig Slot may be offered in the configuration dialog for toolbars GroupId Assign the slot to a function group in the configuration dialogs (module is free to define categories) ImageRotation Toolbar images are rotated in case of writing direction from right to left ImageReflection Toolbar images are rotated in case of vertical text orientation
- openoffice--Slot Processing
- Slot
- slot
- slot
- slot
- OpenOffice
- OpenOffice
- OpenOffice
- Signal & Slot
- sig/slot
- slot分发
- map slot 和 reduce slot
- openoffice 2.01
- openoffice 安装
- 加速openoffice
- openoffice 3.0
- openOffice开发
- openoffice二三事
- .NET2.0正则表达式搜魂者
- ftok函数
- dhtml 用法网站
- 成功使用vmware Converter 和 vmware Player结合迁物理服务器
- 批处理文件
- openoffice--Slot Processing
- S60中绘制动态图片
- 两道智力题
- Java性能的优化
- 根据表名和字段得到约束名称 创建默认值的sql
- 空间的作用和用法
- 研究生必读1--如何获取文献--转
- 谨慎出手 近期有跌价趋势手机汇总
- 研究生必读2--如何积极的进行交流--转载