| View previous topic :: View next topic |
| Author |
Message |
stuartb Newbie

Joined: 27 Sep 2003 Posts: 1
|
Posted: Sat Sep 27, 2003 5:16 pm Post subject: Auto replace; doesnt work with my own entries |
|
|
HI
I am trying to write out a very long project, that has much use of m² and ºC, however if i try and use auto correct, for example m<2> replaced with m² it doesnt work, the modified entries appear in the list, but they do not work!!
Also if i modify a standard one allready in the list, it stops working
please can anyone help, ive tried 1.1rc3 and 1.1rc5, but there both the same.
Any help will be greatly appreciated
Stuart |
|
| Back to top |
|
 |
Gabor Super User

Joined: 21 Sep 2003 Posts: 610 Location: Hungary (E-Europe)
|
Posted: Sun Sep 28, 2003 3:29 am Post subject: use macros |
|
|
Perhaps you may try macros.
The one below is defjnitely NOT my invention, I only modified it to my needs.
[code]Function insertSpecialChar(sChar)
'sChar is the char to be inserted
Dim oDocument as Object
Dim oText as Object
Dim oVCursor, oCursor As Object
oDocument=thiscomponent
oText = oDocument.Text
' after this, an obscure call gets the current cursor position
oVCursor = oDocument.currentcontroller.getViewCursor()
oText.insertString(oVCursor.getStart(),sChar,false)
End Function
Sub degree
'for example ...
insertSpecialChar("°C")
End Sub
Sub m2
'for example ...
insertSpecialChar("m²")
End Sub[/code]
Include this in Macros>Standard>Module1 (or any other module) and then assign key combinations to them.
On the HOW TO, please go and see
[url]http://www.oooforum.org/forum/viewtopic.php?p=10144#10144[/url]
and find DannyB's posts of
Posted: Thu Sep 18, 2003 4:52 pm
Posted: Fri Sep 19, 2003 4:55 am |
|
| Back to top |
|
 |
Gabor Super User

Joined: 21 Sep 2003 Posts: 610 Location: Hungary (E-Europe)
|
Posted: Sun Sep 28, 2003 3:36 am Post subject: don't copy |
|
|
From my above message do not copy these signs only what is in between them
[code] [/code]
[url] [/url] |
|
| Back to top |
|
 |
JohnV Administrator

Joined: 07 Mar 2003 Posts: 8976 Location: Lexinton, Kentucky, USA
|
Posted: Sun Sep 28, 2003 5:31 am Post subject: |
|
|
| There was once a long tread on auto replace not working. Turned out the poster had at some time unchecked the Use Replacement Table item on the Options tab. If this is the case I think you may have to close OO and restart it before the change is recognized (at least I seem to remember there was something unusual like that). |
|
| Back to top |
|
 |
|