ooInsertRow | Вставка новой строки в таблицу |
ooDeleteRow | Удаление строки из таблицы |
ooSelectRow | Выделение строки в таблице |
ooSelectCell | Выделение ячейки |
ooMergCell | Объединение ячеек |
ooSplitCell | Разделение ячейки |
ooDrawBorder | Прорисовка бордюра ячейки |
ooGoRight | Переход вправо |
ooGoLeft | Переход влево |
ooGoUp | Переход вверх |
ooGoDown | Переход вниз |
ooNextCell | Переход в следующую ячейку |
ooPrevCell | Переход в предыдущую ячейку |
ooParaKeepTogether | Связать таблицу со следующим абзацем (свойства таблицы) |
procedure
TOpenOffice.ooInsertRow; var oDispatcher,oArray:variant; CoreReflection,propertyValue0:variant; oFrame:variant; begin oDispatcher:=StarOffice.createInstance('com.sun.star.frame.DispatchHelper'); CoreReflection:=StarOffice.createInstance('com.sun.star.reflection.CoreReflection'); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue0); oArray:=VarArrayCreate([0,0],varVariant); propertyValue0.Name:=''; propertyValue0.Value:=0; oArray[0]:=propertyValue0; oFrame:=Document.getCurrentController.getFrame; oDispatcher.executeDispatch(oFrame,'.uno:InsertRows','',0,oArray); end; |
procedure
TOpenOffice.ooDeleteRow; var oDispatcher,oArray:variant; CoreReflection,propertyValue0:variant; oFrame:variant; begin oDispatcher:=StarOffice.createInstance('com.sun.star.frame.DispatchHelper'); CoreReflection:=StarOffice.createInstance('com.sun.star.reflection.CoreReflection'); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue0); oArray:=VarArrayCreate([0,0],varVariant); propertyValue0.Name:=''; propertyValue0.Value:=0; oArray[0]:=propertyValue0; oFrame:=Document.getCurrentController.getFrame; oDispatcher.executeDispatch(oFrame,'.uno:DeleteRows','',0,oArray); end; |
procedure
TOpenOffice.ooSelectRow; var oDispatcher,oArray:variant; CoreReflection,propertyValue0:variant; oFrame:variant; begin oDispatcher:=StarOffice.createInstance('com.sun.star.frame.DispatchHelper'); CoreReflection:=StarOffice.createInstance('com.sun.star.reflection.CoreReflection'); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue0); oArray:=VarArrayCreate([0,0],varVariant); propertyValue0.Name:=''; propertyValue0.Value:=0; oArray[0]:=propertyValue0; oFrame:=Document.getCurrentController.getFrame; oDispatcher.executeDispatch(oFrame,'.uno:EntireRow','',0,oArray); end; |
procedure
TOpenOffice.ooSelectCell(kol:integer); var oDispatcher,oArgs:variant; CoreReflection,propertyValue0:variant; oFrame:variant; i:integer; begin oDispatcher:=StarOffice.createInstance('com.sun.star.frame.DispatchHelper'); CoreReflection:=StarOffice.createInstance('com.sun.star.reflection.CoreReflection'); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue0); oArgs:=VarArrayCreate([0,0],varVariant); propertyValue0.Name:=''; propertyValue0.Value:=0 ; oArgs[0]:=propertyValue0; oFrame:=Document.getCurrentController.getFrame; oDispatcher.executeDispatch(oFrame,'.uno:EntireCell','',0,oArgs); if kol>1 then for i:=1 to kol-1 do oDispatcher.executeDispatch(oFrame,'.uno:JumpToNextCell','',0,oArgs); end; |
procedure
TOpenOffice.ooMergCell; var oDispatcher,oArray:variant; CoreReflection,propertyValue0:variant; oFrame:variant; begin oDispatcher:=StarOffice.createInstance('com.sun.star.frame.DispatchHelper'); CoreReflection:=StarOffice.createInstance('com.sun.star.reflection.CoreReflection'); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue0); oArray:=VarArrayCreate([0,0],varVariant); propertyValue0.Name:=''; propertyValue0.Value:=0; oArray[0]:=propertyValue0; oFrame:=Document.getCurrentController.getFrame; oDispatcher.executeDispatch(oFrame,'.uno:MergeCells','',0,oArray); end; |
procedure
TOpenOffice.ooSplitCell(kol:integer); var oDispatcher,oArgs:variant; CoreReflection,propertyValue0,propertyValue1,propertyValue2:variant; oFrame:variant; begin oDispatcher:=StarOffice.createInstance('com.sun.star.frame.DispatchHelper'); CoreReflection:=StarOffice.createInstance('com.sun.star.reflection.CoreReflection'); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue0); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue1); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue2); oArgs:=VarArrayCreate([0,2],varVariant); propertyValue0.Name:='Amount'; propertyValue0.Value:=kol; oArgs[0]:=propertyValue0; propertyValue1.Name:='Horizontal'; propertyValue1.Value:=false; oArgs[1]:=propertyValue1; propertyValue2.Name:='Proportional'; propertyValue2.Value:=false; oArgs[2]:=propertyValue2; oFrame:=Document.getCurrentController.getFrame; oDispatcher.executeDispatch(oFrame,'.uno:SplitCell','',0,oArgs); end; |
procedure
TOpenOffice.ooDrawBorder(Top:boolean;Bottom:boolean); var oDispatcher,oArgs,oArgs1,oArgs2,oArgs3:variant; CoreReflection,propertyValue0,propertyValue1,propertyValue2:variant; propertyValue3,propertyValue4,propertyValue5:variant; propertyValue6,propertyValue7,propertyValue8:variant; propertyValue9,propertyValue10,propertyValue11,propertyValue12:variant; oFrame:variant; Array1:array[0..2,0..2,0..2,0..2] of integer; begin oDispatcher:=StarOffice.createInstance('com.sun.star.frame.DispatchHelper'); CoreReflection:=StarOffice.createInstance('com.sun.star.reflection.CoreReflection'); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue0); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue1); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue2); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue3); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue4); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue5); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue6); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue7); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue8); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue9); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue10); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue11); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue12); oArgs:=VarArrayCreate([0,4],varVariant); oArgs1:=VarArrayCreate([0,7],varVariant); oArgs2:=VarArrayCreate([0,3],varinteger); oArgs3:=VarArrayCreate([0,3],varinteger); oArgs2[0]:=0; oArgs2[1]:=0; oArgs2[2]:=2; oArgs2[3]:=0; oArgs3[0]:=0; oArgs3[1]:=0; oArgs3[2]:=0; oArgs3[3]:=0; propertyValue0.Name:='BorderInner.Horizontal'; propertyValue0.value:=oArgs2 ; oArgs[0]:=propertyValue0; propertyValue1.Name:='BorderInner.Vertical'; propertyValue1.Value:=oArgs2 ; oArgs[1]:=propertyValue1; propertyValue2.Name:='BorderInner.Flags'; propertyValue2.Value:=3 ; oArgs[2]:=propertyValue2; propertyValue3.Name:='BorderInner.ValidFlags'; propertyValue3.Value:=127 ; oArgs[3]:=propertyValue3; propertyValue4.Name:='BorderInner.DefaultDistance'; propertyValue4.Value:=0 ; oArgs[4]:=propertyValue4; oFrame:=Document.getCurrentController.getFrame; oDispatcher.executeDispatch(oFrame,'.uno:BorderInner','',0,oArgs); propertyValue5.Name:='BorderOuter.LeftBorder'; propertyValue5.Value:=oArgs2 ; oArgs1[0]:=propertyValue5; propertyValue6.Name:='BorderOuter.LeftDistance'; propertyValue6.Value:=97 ; oArgs1[1]:=propertyValue6; propertyValue7.Name:='BorderOuter.RightBorder'; propertyValue7.Value:=oArgs2 ; oArgs1[2]:=propertyValue7; propertyValue8.Name:='BorderOuter.RightDistance'; propertyValue8.Value:=97 ; oArgs1[3]:=propertyValue8; propertyValue9.Name:='BorderOuter.TopBorder'; if Top=True then propertyValue9.Value:=oArgs2 else propertyValue9.Value:=oArgs3; oArgs1[4]:=propertyValue9; propertyValue10.Name:='BorderOuter.TopDistance'; propertyValue10.Value:=97 ; oArgs1[5]:=propertyValue10; propertyValue11.Name:='BorderOuter.BottomBorder'; if Bottom=True then propertyValue11.Value:=oArgs2 else propertyValue11.Value:=oArgs3 ; oArgs1[6]:=propertyValue11; propertyValue12.Name:='BorderOuter.BottomDistance'; propertyValue12.Value:=97 ; oArgs1[7]:=propertyValue12; oFrame:=Document.getCurrentController.getFrame; oDispatcher.executeDispatch(oFrame,'.uno:BorderOuter','',0,oArgs1); end; |
procedure
TOpenOffice.ooGoRight(col:integer); var oDispatcher,oArgs:variant; CoreReflection,propertyValue0,propertyValue1:variant; oFrame:variant; i:integer; begin oDispatcher:=StarOffice.createInstance('com.sun.star.frame.DispatchHelper'); CoreReflection:=StarOffice.createInstance('com.sun.star.reflection.CoreReflection'); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue0); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue1); oArgs:=VarArrayCreate([0,1],varVariant); propertyValue0.Name:='Count'; propertyValue0.Value:=1; oArgs[0]:=propertyValue0; propertyValue1.Name:='Select'; propertyValue1.Value:=False; oArgs[1]:=propertyValue1; oFrame:=Document.getCurrentController.getFrame; for I:=1 to col do oDispatcher.executeDispatch(oFrame,'.uno:GoRight','',0,oArgs); end; |
procedure
TOpenOffice.ooGoleft(col:Integer;flag:boolean); var oDispatcher,oArgs:variant; CoreReflection,propertyValue0,propertyValue1:variant; oFrame:variant; i:integer; begin oDispatcher:=StarOffice.createInstance('com.sun.star.frame.DispatchHelper'); CoreReflection:=StarOffice.createInstance('com.sun.star.reflection.CoreReflection'); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue0); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue1); oArgs:=VarArrayCreate([0,1],varVariant); propertyValue0.Name:='Count'; propertyValue0.Value:=1; oArgs[0]:=propertyValue0; propertyValue1.Name:='Select'; propertyValue1.Value:=flag; oArgs[1]:=propertyValue1; oFrame:=Document.getCurrentController.getFrame; for I:=1 to col do oDispatcher.executeDispatch(oFrame,'.uno:GoLeft','',0,oArgs); end; |
procedure
TOpenOffice.ooGoUp(col: Integer); var oDispatcher,oArgs:variant; CoreReflection,propertyValue0,propertyValue1:variant; oFrame:variant; i:integer; begin oDispatcher:=StarOffice.createInstance('com.sun.star.frame.DispatchHelper'); CoreReflection:=StarOffice.createInstance('com.sun.star.reflection.CoreReflection'); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue0); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue1); oArgs:=VarArrayCreate([0,1],varVariant); propertyValue0.Name:='Count'; propertyValue0.Value:=1; oArgs[0]:=propertyValue0; propertyValue1.Name:='Select'; propertyValue1.Value:=False; oArgs[1]:=propertyValue1; oFrame:=Document.getCurrentController.getFrame; for I:=1 to col do oDispatcher.executeDispatch(oFrame,'.uno:GoUp','',0,oArgs); end; |
procedure
TOpenOffice.ooGoDown(col:Integer; selected:boolean); var oDispatcher,oArgs:variant; CoreReflection,propertyValue0,propertyValue1:variant; oFrame:variant; i:integer; begin oDispatcher:=StarOffice.createInstance('com.sun.star.frame.DispatchHelper'); CoreReflection:=StarOffice.createInstance('com.sun.star.reflection.CoreReflection'); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue0); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue1); oArgs:=VarArrayCreate([0,1],varVariant); propertyValue0.Name:='Count'; propertyValue0.Value:=1; oArgs[0]:=propertyValue0; propertyValue1.Name:='Select'; propertyValue1.Value:=selected; oArgs[1]:=propertyValue1; oFrame:=Document.getCurrentController.getFrame; for I:=1 to col do oDispatcher.executeDispatch(oFrame,'.uno:GoDown','',0,oArgs); end; |
procedure
TOpenOffice.ooNextCell(col:integer); var oDispatcher,oArray:variant; CoreReflection,propertyValue0:variant; oFrame:variant; i:integer; begin oDispatcher:=StarOffice.createInstance('com.sun.star.frame.DispatchHelper'); CoreReflection:=StarOffice.createInstance('com.sun.star.reflection.CoreReflection'); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue0); oArray:=VarArrayCreate([0,0],varVariant); propertyValue0.Name:=''; propertyValue0.Value:=0; oArray[0]:=propertyValue0; oFrame:=Document.getCurrentController.getFrame; for I:=1 to col do oDispatcher.executeDispatch(oFrame,'.uno:JumpToNextCell','',0,oArray); end; |
procedure
TOpenOffice.ooPrevCell(col:integer); var oDispatcher,oArray:variant; CoreReflection,propertyValue0:variant; oFrame:variant; i:integer; begin oDispatcher:=StarOffice.createInstance('com.sun.star.frame.DispatchHelper'); CoreReflection:=StarOffice.createInstance('com.sun.star.reflection.CoreReflection'); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue0); oArray:=VarArrayCreate([0,0],varVariant); propertyValue0.Name:=''; propertyValue0.Value:=0; oArray[0]:=propertyValue0; oFrame:=Document.getCurrentController.getFrame; for I:=1 to col do oDispatcher.executeDispatch(oFrame,'.uno:JumpToPrevCell','',0,oArray); end; |
procedure
TOpenOffice.ooParaKeepTogether; var oDispatcher,oArray:variant; CoreReflection,propertyValue0:variant; oFrame:variant; i:integer; begin oDispatcher:=StarOffice.createInstance('com.sun.star.frame.DispatchHelper'); CoreReflection:=StarOffice.createInstance('com.sun.star.reflection.CoreReflection'); CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(propertyValue0); oArray:=VarArrayCreate([0,0],varVariant); propertyValue0.Name:='ParaKeepTogether'; propertyValue0.Value:=true; oArray[0]:=propertyValue0; oFrame:=Document.getCurrentController.getFrame; oDispatcher.executeDispatch(oFrame,'.uno:ParaKeepTogether','',0,oArray); end; |