![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Openoffice
xt_chaoji
我是一个性格开朗、自律、自信、有活力,待人热情、真诚。工作认真负责,积极主动,能吃苦耐劳。有较强的组织能力、实际动手能力和团体协作精神,能很好的适应各种环境,并融入其中。我同时也是一名热爱运动的有着健康体魄的有志青年!!
展开
-
同一篇打开两次office无响应的bug
我们用office打开一篇文档后,一般会产生一个.~lock.速度极慢.odt#样子的文件,该文件预示着该文档已经被锁住了,如果你要打开该文档,则必须是只读方式打开 但是我写的接口OpenDocument第二个参数一般都是传的是2,也就是可读写,这样一来进入到NsoBean后调原创 2011-07-07 14:54:07 · 1654 阅读 · 0 评论 -
openoffice获取当前文档的段落和表格总数
工作期间需要统计出当前文档所有段落和表格,摘出其中一段宏:Sub enumerateParagraphsAndTable Dim oEnum 'com.sun.star.container.XEnumerationAccess Dim oPar 'Paragraph of some sort Dim nPars As原创 2012-05-21 15:43:03 · 1083 阅读 · 0 评论 -
openoffice Persistent = true失效的问题
对于操作openoffice的菜单或者工具栏,如果希望做的改变可以在下次重启后仍然存在,必须使用UI Configuration Manager如下例子所示:REM ***** BASIC *****Sub Main sMenuBarResUrl = "private:resource/menubar/menubar" oDesktop = createU原创 2012-08-29 14:32:47 · 664 阅读 · 0 评论 -
openoffice在当前段落插入制表位
REM ***** BASIC *****Sub Main sel = thiscomponent.getCurrentController().getSelection().getByIndex(0) Dim tab(0 To 1) As New com.sun.star.style.TabStop For j =LBound(tab) To UBou原创 2012-08-29 14:29:11 · 724 阅读 · 0 评论 -
openoffice 在当前光标位置插入批注的宏
REM ***** BASIC *****sub MainoDoc = ThisComponentDim vDoc, vViewCursor, oCurs, vTextFieldDim s$'Lets lie and say that this was added ten days ago!Dim aDate As New com.sun.star.uti原创 2012-08-29 14:36:21 · 1776 阅读 · 0 评论 -
openoffice如何把光标跳转到当前段落的段首或者段尾(宏实现)
Sub MainoDoc = ThisComponent 'Get the current active document.oViewCur = oDoc.getCurrentController().getViewCursor()'msgbox oViewCur.dbg_methodsoTextCur = oDoc.getText().createTextCursorByRang原创 2012-08-24 17:18:21 · 1396 阅读 · 0 评论 -
查看当前ooo文档类型的宏
Sub detectType() Dim mediaDescr(3) as new com.sun.star.beans.PropertyValue docurl = thisComponent.getURL() mediaDescr(0).Name = "URL" mediaDescr(0).Value = docurl typ原创 2012-09-24 13:15:30 · 987 阅读 · 1 评论 -
查看openoffice的版本号
sub main ooVersion = OOoVersion() msgbox ooVersionend subFunction OOoVersion() As String Dim aSettings, aConfigProvider Dim aParams2(0) As new com.sun.star.beans.PropertyValue原创 2012-09-24 13:06:19 · 3906 阅读 · 0 评论 -
openoffice表格操作相关的一些宏例子
Sub Maindim table as objectr_Tables = thiscomponent.getTextTables()iCount = r_Tables.getCount'msgbox iCounttTableNames = r_Tables.getElementNamesfor i = 0 to iCount-1 if tTableNames(i原创 2012-10-31 17:37:48 · 3837 阅读 · 0 评论 -
openoffice监听键盘事件宏代码
REM ***** BASIC *****Sub subAddKeyHandler oDoc = ThisComponent.CurrentController oKeyHandler = createUnoListener("funKeyHandler_", "com.sun.star.awt.XKeyHandler") oDoc.addKeyHand原创 2012-10-31 17:39:43 · 1233 阅读 · 0 评论 -
openoffice --查找文本并设置文本字体的宏
Sub Main Dim oDocument As Object Dim oSearch As Object, oResult As Object Dim oFound As Object, oFoundCursor As Object Dim n As Long oDocument = ThisComponent oSearch = o原创 2013-01-30 14:00:13 · 1241 阅读 · 0 评论 -
openoffice --替换文本的宏
Sub Main Dim mBritishWords(5) As String Dim mUSWords(5) As String Dim n As Long Dim oDocument As Object Dim oReplace As Object mBritishWords() = Array("colour", "neighbou原创 2013-01-30 14:34:35 · 1507 阅读 · 0 评论 -
Eclipse editor does not contain a main type的解决方案
在用eclipse的过程中,打算运行一个带有main函数的class时,出现editor does not contain a main type的错误框 只需要做如下操作即可:原创 2013-01-16 14:46:22 · 1280 阅读 · 0 评论 -
openoffice 获取当前文档的所有的样式
可以通过oo新建一篇字处理或者其他类型的文档,然后新建宏,将该代码copy到宏窗口Sub DisplayAllStyles Dim mFamilyNames As Variant, mStyleNames As Variant Dim sMsg As String, n%, i% Dim oFamilies As Object, oStyle As Object, oSt原创 2012-05-15 14:03:19 · 824 阅读 · 0 评论 -
通过宏将字符串信息写入到odt文档
有的时候希望查询一个服务或者接口有哪些方法通过msgbox查看不太方便,于是想到一个方法将其输出到odt文档然后通过查找功能查找即可REM ***** BASIC *****Sub Main InsertStringToOdt(thiscomponent.dbg_methods)End SubFunction InsertStringToOdt(st原创 2012-05-08 14:21:51 · 690 阅读 · 0 评论 -
openoffice源代码模块介绍
agg antigrain图形库 ( http://www.antigrain.com/), 用于canvas模块. animation css::animation UNO API原创 2011-07-07 17:38:41 · 3720 阅读 · 0 评论 -
openoffice源码编译顺序
module solenv module boost module stlport module soltools module external module expat module zlib module libxml2 module libxslt mo原创 2011-07-07 17:46:28 · 1541 阅读 · 0 评论 -
关于no office executable found!解决方法
笔者写了一个简单新建swriter的代码com.sun.star.uno.XComponentContext xContext = null; try { // get the remote office c原创 2011-07-06 16:56:50 · 5854 阅读 · 8 评论 -
OpenOffice中各种文件的功能(扩展名解释)
This page lists the filename extensions, or suffixes, used in the source code.File Extension File Type.a UNIX static library原创 2011-07-08 14:59:02 · 3030 阅读 · 0 评论 -
openoffice中一个将java代码转换为c++代码的例子
java代码如下://Listing 33 A Java Code Example// Java// create new writer document and get text, then manipulate text XComponent xWriterComponent原创 2011-07-22 13:57:23 · 1152 阅读 · 0 评论 -
OpenOffice开发者指南笔记
一、1. Text Document modal 是document模型,其下有一个controller,controller不是用来改变document的,而是用来负责显示效果,比如自动换行,光标,放大缩小。 其包括5部分:text service manager原创 2011-07-14 15:07:49 · 11030 阅读 · 26 评论 -
The OOoBean offers methods that can be applied to all OpenOffice.org document types.
Methods of com.sun.star.comp.beans.OOoBeanOOoBean()constructor - creates an OOoBean with an implicit connectionOOoBean(OfficeConnection)cons原创 2011-07-14 10:53:00 · 2018 阅读 · 0 评论 -
Insert table in Openoffice Swriter(插入一个表格)
protected XTextTable insertTable(XTextDocument xDoc, XTextCursor xTxCurs, int row, int col) { try { XMultiServi原创 2011-07-18 17:37:33 · 1613 阅读 · 1 评论 -
solution “no office executable found!”
public static void main(String[] args) {com.sun.star.uno.XComponentContext xContext = null; try { // get the remote office原创 2011-07-19 16:15:19 · 2693 阅读 · 0 评论 -
通过java操作openoffice写文本
1. 首先要得到远程office组件的上下文.通过:com.sun.star.uno.XComponentContext xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();得到,如果OpenOffice安装路径不是原创 2011-07-19 16:21:43 · 3610 阅读 · 4 评论 -
关于Openoffice的Any类型说明
OpenOffice.org API 经常使用 any 类型,此类型是与其他环境能够识别的 Variant 类型相对应的类型。any 类型具有任意一个 UNO 类型的属性。any 类型尤其常用于一般 UNO 接口。 在以下一些常用方法的方法参数和返回值中就会用原创 2011-08-04 17:44:02 · 1282 阅读 · 0 评论 -
openoffice --将文本写入到状态栏的宏
Sub Main StatusText("hello world")End SubFunction ProgressBar ProgressBar = ThisComponent.CurrentController.StatusIndicatorEnd FunctionREM display text in status bar Sub Sta原创 2013-01-30 14:58:14 · 747 阅读 · 0 评论