REM ***** BASIC ***** '************************************************************************ '* 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/>. '* '************************************************************************ 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