Bugzilla – Attachment 93872 Details for
Bug 74846
Wrong date format in a BASIC script
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
The macro, with wrong date format
Module1.xba (text/plain), 6.04 KB, created by
kanyi
on 2014-02-11 16:07:10 UTC
(
hide
)
Description:
The macro, with wrong date format
Filename:
MIME Type:
Creator:
kanyi
Created:
2014-02-11 16:07:10 UTC
Size:
6.04 KB
patch
obsolete
><?xml version="1.0" encoding="UTF-8"?> ><!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> ><script:module xmlns:script="http://openoffice.org/2000/script" script:name="Module1" script:language="StarBasic">REM ***** BASIC ***** > >Sub Main > >End Sub > > >sub datum_alairas >rem ---------------------------------------------------------------------- >rem define variables >dim document as object >dim dispatcher as object >rem ---------------------------------------------------------------------- >rem get access to the document >document = ThisComponent.CurrentController.Frame >dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") > >rem ---------------------------------------------------------------------- >dim args1(0) as new com.sun.star.beans.PropertyValue >args1(0).Name = "Text" >args1(0).Value = CHR$(9)+"Dátum:" > >dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args1()) > >rem ---------------------------------------------------------------------- >dim args2(5) as new com.sun.star.beans.PropertyValue >args2(0).Name = "Type" >args2(0).Value = 0 >args2(1).Name = "SubType" >args2(1).Value = 0 >args2(2).Name = "Name" >args2(2).Value = "" >args2(3).Name = "Content" >args2(3).Value = "0" >args2(4).Name = "Format" >args2(4).Value = 10076 >args2(5).Name = "Separator" >args2(5).Value = " " > >dispatcher.executeDispatch(document, ".uno:InsertField", "", 0, args2()) > >rem ---------------------------------------------------------------------- >dim args3(1) as new com.sun.star.beans.PropertyValue >args3(0).Name = "Count" >args3(0).Value = 1 >args3(1).Name = "Select" >args3(1).Value = false > >dispatcher.executeDispatch(document, ".uno:GoLeft", "", 0, args3()) > >rem ---------------------------------------------------------------------- >dim args4(0) as new com.sun.star.beans.PropertyValue >args4(0).Name = "Text" >args4(0).Value = " " > >dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args4()) > >rem ---------------------------------------------------------------------- >dim args5(1) as new com.sun.star.beans.PropertyValue >args5(0).Name = "Count" >args5(0).Value = 1 >args5(1).Name = "Select" >args5(1).Value = false > >dispatcher.executeDispatch(document, ".uno:GoRight", "", 0, args5()) > >rem ---------------------------------------------------------------------- >dim args6(0) as new com.sun.star.beans.PropertyValue >args6(0).Name = "Text" >args6(0).Value = CHR$(9)+CHR$(9)+CHR$(9)+CHR$(9)+CHR$(9)+"Ãrtékelte: Balázs Attila" > >dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args6()) > > >end sub > > >sub datum_alairas_rogzitettdatum_2 >rem ---------------------------------------------------------------------- >rem define variables >dim document as object >dim dispatcher as object >rem ---------------------------------------------------------------------- >rem get access to the document >document = ThisComponent.CurrentController.Frame >dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") > >rem ---------------------------------------------------------------------- >dim args1(0) as new com.sun.star.beans.PropertyValue >args1(0).Name = "Text" >args1(0).Value = CHR$(9)+"Dátum: " > >dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args1()) > >rem ---------------------------------------------------------------------- >dim args2(5) as new com.sun.star.beans.PropertyValue >args2(0).Name = "Type" >args2(0).Value = 0 >args2(1).Name = "SubType" >args2(1).Value = 0 >args2(2).Name = "Name" >args2(2).Value = "" >args2(3).Name = "Content" >args2(3).Value = "0" >args2(4).Name = "Format" >args2(4).Value = 10081 >args2(5).Name = "Separator" >args2(5).Value = " " > >dispatcher.executeDispatch(document, ".uno:InsertField", "", 0, args2()) > >rem ---------------------------------------------------------------------- >dim args3(0) as new com.sun.star.beans.PropertyValue >args3(0).Name = "Text" >args3(0).Value = CHR$(9)+CHR$(9)+CHR$(9)+CHR$(9)+CHR$(9)+"Ãrtékelte: Balázs Attila" > >dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args3()) > > >end sub > > >sub test >rem ---------------------------------------------------------------------- >rem define variables >dim document as object >dim dispatcher as object >rem ---------------------------------------------------------------------- >rem get access to the document >document = ThisComponent.CurrentController.Frame >dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") > >rem ---------------------------------------------------------------------- >dim args1(0) as new com.sun.star.beans.PropertyValue >args1(0).Name = "Text" >args1(0).Value = "Date: " > >dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args1()) > >rem ---------------------------------------------------------------------- >dim args2(5) as new com.sun.star.beans.PropertyValue >args2(0).Name = "Type" >args2(0).Value = 0 >args2(1).Name = "SubType" >args2(1).Value = 0 >args2(2).Name = "Name" >args2(2).Value = "" >args2(3).Name = "Content" >args2(3).Value = "0" >args2(4).Name = "Format" >args2(4).Value = 10076 >args2(5).Name = "Separator" >args2(5).Value = " " > >dispatcher.executeDispatch(document, ".uno:InsertField", "", 0, args2()) > >rem ---------------------------------------------------------------------- >dim args3(0) as new com.sun.star.beans.PropertyValue >args3(0).Name = "Text" >args3(0).Value = CHR$(9)+CHR$(9)+CHR$(9)+CHR$(9)+CHR$(9)+"Balazs Attila" > >dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args3()) > > >end sub ></script:module>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 74846
: 93872