2021-02-19 22:53:23 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
2021-05-04 11:50:02 +01:00
|
|
|
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ApZotUtilities" script:language="StarBasic">REM ***** BASIC *****
|
2021-02-19 22:53:23 +00:00
|
|
|
|
2021-05-04 11:50:02 +01:00
|
|
|
'************************************************************************
|
|
|
|
'* Copyright 2021 by Bastien Dumont (bastien.dumont@posteo.net)
|
|
|
|
'*
|
|
|
|
'* This file is part of the ApresZotero library.
|
|
|
|
'*
|
|
|
|
'* ApresZotero is free software: you can redistribute it and/or modify
|
|
|
|
'* it under the terms of the GNU General Public License as published by
|
|
|
|
'* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
'* (at your option) any later version.
|
|
|
|
'*
|
|
|
|
'* ApresZotero is distributed in the hope that it will be useful,
|
|
|
|
'* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
'* GNU General Public License for more details.
|
|
|
|
'*
|
|
|
|
'* You should have received a copy of the GNU General Public License
|
|
|
|
'* along with ApresZotero. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
'*
|
|
|
|
'************************************************************************
|
2021-02-19 22:53:23 +00:00
|
|
|
|
|
|
|
Sub CountOccurrencesPerReference
|
|
|
|
Dim vSortedItemMap As Variant
|
|
|
|
Dim oScope As Object
|
|
|
|
|
|
|
|
oScope = ThisComponent
|
|
|
|
|
|
|
|
vSortedItemMap = getOccurrencesCount(oScope)
|
|
|
|
PrintMap(vSortedItemMap)
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
Sub ChangeGreekFont
|
|
|
|
Dim oSearch As Object
|
|
|
|
Dim oDocument As Object
|
|
|
|
Dim oResult As Object
|
|
|
|
Dim i As Integer
|
|
|
|
Dim oFound As Object
|
|
|
|
Dim oFoundCursor As Object
|
|
|
|
|
|
|
|
oDocument = ThisComponent
|
|
|
|
oSearch = oDocument.createSearchDescriptor
|
|
|
|
oSearch.SearchString = sGreekTextRegex
|
|
|
|
oSearch.SearchRegularExpression = TRUE
|
|
|
|
oResult = oDocument.findAll(oSearch)
|
|
|
|
For i = 0 To oResult.count - 1
|
|
|
|
oFound = oResult.getByIndex(i)
|
|
|
|
oFoundCursor = oFound.Text.createTextCursorByRange(oFound)
|
|
|
|
oFoundCursor.CharFontName = GreekFont
|
|
|
|
Next i
|
|
|
|
|
|
|
|
End Sub
|
2021-05-04 11:50:02 +01:00
|
|
|
</script:module>
|