My CAT tool https://www.cafetran.com uses LibreOffice Writer as a preview tool: https://youtu.be/PVqzHF6uxYo
There is an issue when a documents contains several instances of the same paragraph:
======
Introduction
Blablabbla. Blablabbla, blablabbla.Blablabbla. Blablabbla, blablabbla.Blablabbla. Blablabbla, blablabbla.Blablabbla. Blablabbla, blablabbla.Blablabbla. Blablabbla, blablabbla.Blablabbla. Blablabbla, blablabbla.Blablabbla. Blablabbla, blablabbla.Blablabbla. Blablabbla, blablabbla.
Introduction
Blablabbla. Blablabbla, blablabbla.Blablabbla. Blablabbla, blablabbla.Blablabbla. Blablabbla, blablabbla.Blablabbla. Blablabbla, blablabbla.Blablabbla. Blablabbla, blablabbla.Blablabbla. Blablabbla, blablabbla.Blablabbla. Blablabbla, blablabbla.Blablabbla. Blablabbla, blablabbla.
======
Is there anyway to differentiate between the instances of the same paragraph? BTW: I'm not sure what automation tool the developer used for controlling Writer from CafeTran Espresso. It must be one that is cross platform.
Thank you in advance for your input!
Hans
Can I identify the paragraph number?
-
- Posts: 2
- Joined: Sun Nov 06, 2022 9:07 am
Can I identify the paragraph number?
LibreOffice Mac Intel 7.4.2.3
Re: Can I identify the paragraph number?
If you use MRI to have a look you'll see that each paragraph has its own identifying ID - localname/metadatareference/stringvalue
Edit:
Note: the same ID may not persist when the document is closed and reopened.
Edit:
Note: the same ID may not persist when the document is closed and reopened.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: Can I identify the paragraph number?
Nor mght it persist if the file is edited, particularly if editing is done before the object paragraph.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Re: Can I identify the paragraph number?
Its real easy to get all the non-empty paragraph ranges with a find all, if that's any help...
Code: Select all
vDescriptor = ThisComponent.createSearchDescriptor()
With vDescriptor
.SearchString = ".*"
.SearchRegularExpression = true
End With
vFound = ThisComponent.findall(vDescriptor)
msgbox vfound.count
msgbox vfound(3).string 'fourth NON-EMPTY paragraph string
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)