Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

[In addition to [my comments here](http://ask.libreoffice.org/en/question/18406/change-of-quotation-mark/?answer=18408#post-id-18408)]

You may try as follows:
Reset the Localized Options to Default, and use these macros for « and » (in Writer)

Sub left_guillemet
Dim oDoc as variant
    oDoc = ThisComponent
Dim oCurrentController as variant
    oCurrentController = oDoc.getCurrentController()
Dim oTextViewCursor as variant
    oTextViewCursor = oCurrentController.getViewCursor()
Dim oText as variant
If IsEmpty(oTextViewCursor.Cell) Then
    oText=oTextViewCursor.Text
Else
    oText=oTextViewCursor.Cell.Text
End If
oText.insertString(oTextViewCursor,chr(clng("&H00AB")),false)
End Sub


Sub right_guillemet
Dim oDoc as variant
    oDoc = ThisComponent
Dim oCurrentController as variant
    oCurrentController = oDoc.getCurrentController()
Dim oTextViewCursor as variant
    oTextViewCursor = oCurrentController.getViewCursor()
Dim oText as variant
If IsEmpty(oTextViewCursor.Cell) Then
    oText=oTextViewCursor.Text
Else
    oText=oTextViewCursor.Cell.Text
End If
oText.insertString(oTextViewCursor,chr(clng("&H00BB")),false)
End Sub

Tools → Macros → Organize Macros → LibreOffice Basic... → Edit/New

Assign the macros to shortcut keys, e.g.:
« = Alt+Shift+L
» = Alt+Shift+R.

More details here and here.

[In In addition to [my my comments here](http://ask.libreoffice.org/en/question/18406/change-of-quotation-mark/?answer=18408#post-id-18408)]here.

You may try as follows:
Reset the Localized Options to Default, and use these macros for « and » (in Writer)

Sub left_guillemet
Dim oDoc as variant
    oDoc = ThisComponent
Dim oCurrentController as variant
    oCurrentController = oDoc.getCurrentController()
Dim oTextViewCursor as variant
    oTextViewCursor = oCurrentController.getViewCursor()
Dim oText as variant
If IsEmpty(oTextViewCursor.Cell) Then
    oText=oTextViewCursor.Text
Else
    oText=oTextViewCursor.Cell.Text
End If
oText.insertString(oTextViewCursor,chr(clng("&H00AB")),false)
End Sub


Sub right_guillemet
Dim oDoc as variant
    oDoc = ThisComponent
Dim oCurrentController as variant
    oCurrentController = oDoc.getCurrentController()
Dim oTextViewCursor as variant
    oTextViewCursor = oCurrentController.getViewCursor()
Dim oText as variant
If IsEmpty(oTextViewCursor.Cell) Then
    oText=oTextViewCursor.Text
Else
    oText=oTextViewCursor.Cell.Text
End If
oText.insertString(oTextViewCursor,chr(clng("&H00BB")),false)
End Sub

Tools → Macros → Organize Macros → LibreOffice Basic... → Edit/New

Assign the macros to shortcut keys, e.g.:
« = Alt+Shift+L
» = Alt+Shift+R.

More details here and here.

In addition to my comments here.

You may try as follows:
Reset the Localized Options to Default, and use these macros for « and » »
(in Writer)

Sub left_guillemet
Dim oDoc as variant
    oDoc = ThisComponent
Dim oCurrentController as variant
    oCurrentController = oDoc.getCurrentController()
Dim oTextViewCursor as variant
    oTextViewCursor = oCurrentController.getViewCursor()
Dim oText as variant
If IsEmpty(oTextViewCursor.Cell) Then
    oText=oTextViewCursor.Text
Else
    oText=oTextViewCursor.Cell.Text
End If
oText.insertString(oTextViewCursor,chr(clng("&H00AB")),false)
End Sub


Sub right_guillemet
Dim oDoc as variant
    oDoc = ThisComponent
Dim oCurrentController as variant
    oCurrentController = oDoc.getCurrentController()
Dim oTextViewCursor as variant
    oTextViewCursor = oCurrentController.getViewCursor()
Dim oText as variant
If IsEmpty(oTextViewCursor.Cell) Then
    oText=oTextViewCursor.Text
Else
    oText=oTextViewCursor.Cell.Text
End If
oText.insertString(oTextViewCursor,chr(clng("&H00BB")),false)
End Sub

Tools → Macros → Organize Macros → LibreOffice Basic... → Edit/New

Assign the macros to shortcut keys, e.g.:
« = Alt+Shift+L
» = Alt+Shift+R.

More details here and here.