"oSheet" 中的 "o" 代表什么?

What does the "o" of "oSheet" stand for?

我在网上注意到许多示例,其中 OOoBasic 和 Libre Office Basic 使用 "o" 约定来命名对象。

我们总是看到 oSheetoCell 等等。

"o" 代表 object 吗?是否有列出这些约定的文件?

是的,"o" 代表 Object。基本上是 Hungarian notation.

看看 Andrew Pitonyak's Macro document,尤其是 3.5. Accessing And Creating Objects In OpenOffice 部分。快速浏览文档会显示以下前缀:

  • o "Object",一个非常有用的类型,用于与 UNO API。
  • 一起工作
  • x 对应 UNO interface。 Java 代码中需要其中的许多变量。
  • s "String"
  • v "Variant"
  • b "Boolean"
  • i "Integer"
  • l "Long"
  • n "number"
  • a "array" 或 "argument"
  • m 或者 class 或 "member" 结构
  • c 或者 "constant"