| View previous topic :: View next topic |
| Author |
Message |
xfvigour Guest
|
Posted: Fri Dec 12, 2003 5:58 am Post subject: insert document revision in a cell |
|
|
Hi,
As I export my starCalc document in HTML, I'ld like to have a revision number displayed.
How can I make it in suche a way that the field is automatically updated when I
save the document
thank |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
avantman42 Super User

Joined: 28 Jul 2003 Posts: 751 Location: Staffordshire, UK
|
Posted: Fri Dec 12, 2003 7:32 am Post subject: |
|
|
An easier alternative might be to display the date and/or time that the document was saved, using the DATE() or TIME() functions.
Russ |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
Posted: Fri Dec 12, 2003 10:29 am Post subject: |
|
|
Here is an exemple of event Listener :
| Code: |
Dim oGroup As Object
Sub XChartData
Dim oSCalcDocument,oSheet as Object
oListener = createUnoListener("OOO_","com.sun.star.chart.XChartDataChangeEventListener")
oScalcDocument=ThisComponent
oSheet = oScalcDocument.Sheets(0)
oGroup=oSheet.getCellRangeByName("A1:A6")
'XRay.XRay oGroup
oGroup.addChartDataChangeEventListener(oListener)
End Sub
Sub OOO_chartDataChanged
msgbox "Coucou"
End Sub
Sub OOO_disposing(oEvent)
'I don't know if we have or not to write this Sub ??
End Sub
Sub RemoveListener
oGroup.removeChartDataChangeEventListener(oListener)
End Sub
|
What does it do ?
It defines a group of cells A1:A6 and when a data is changed in this group print CouCou
When you want to use an event listener you have to find the kind of event listener (here : "com.sun.star.chart.XChartDataChangeEventListener") and how do you install it (here : addChartDataChangeEventListener(oListener))
For this search you need XRay. _________________ Linux & Windows OOo3.0
UNO & C++ : WIKI
http://wiki.services.openoffice.org/wiki/Using_Cpp_with_the_OOo_SDK
In French
http://wiki.services.openoffice.org/wiki/Documentation/FR/Cpp_Guide |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
peter733 Newbie

Joined: 03 Jan 2009 Posts: 3
|
Posted: Sat Jan 03, 2009 12:21 am Post subject: |
|
|
the pros : copy and paste the code and i can use it right away without changing anything
the cons : why does it pop up the message 16 times ? i haven't alter the code in any way _________________ http://cli.gs/peter |
|
| Back to top |
|
 |
|