LibreOffice macro get index current sheet - libreoffice

Does someone know how to get the index of the current sheet in LibreOffice Macro Basic?
I successed to get the name:
cursheet = my_doc.getcurrentcontroller.activesheet.Name
But how to get index?
Moreover is there a place to find the documentation of all this component and basic language?
TY for your help.

Looks like two qestions in one... Regarding the documentation, you may start at the OOo Wiki or the LO Wiki on Basic, respectively. For a more complete guide, check Andrew Pitonyak's resources on OpenOffice macros. Usually, all solutions working for OpenOffice.org should work with LO, too.
Regarding the index of the current sheet: as usual, the OpenOffice.org forums know the answer:
sSheet.RangeAddress.Sheet

Related

Custom Hyperlinks on Ctrl+Mouseover for custom pattern

I'm trying to write an extension for vs-code that does the following:
I want to have each of the "XY-#" expressions in the comments of gtests to be highlighted and clickable when holding down ctrl. Each link should open the default browser with an url
https://website/<number>
e.g. for the first expression in the example https://website/1912603
/// #requirement XY-#1912603, XY-#1884770, XY-#1885273
TEST_P(SomeFixture, Foo)
{
SUCCEED();
}
So what I will probably need is
some kind of regex pattern matching
code highlighting based on the matched pattern
reaction to ctrl-key
Link creation with the parsed and stripped <number>
I've been looking around for a while but couldn't find any example extension with a similar usecase. Any one of you came across some good examples to look into?
Thanks in advance,
Flo
You have to use a registerDocumentLinkProvider

What does the value of data-p means in JSSOR demos and examples?

I've looked through all the examples and demos and browsed the documentation, but I can't find the meaning of the numerical values of data-p attribute inside of some DIV tags. I see the numbers such as 816.0, 170.0 and 112.50, but can't figure it out. What does it mean?
Please advice.
Thanks.
It means css style perspective.
170 means
style="perspective: 170px;"

Is it possible to create a central glossary with doxygen

I want to create and link to a central glossary using doxygen.
For creating the glossary, I would use a "glossary.md" file in my doxygen search path. The content is available through "related pages".
Would it be possible to link to entries in this glossary page from anywhere in my documentation?
Best regards
Andreas
I was able to solve the problem using the sections command and references onto them, but more elegant solutions would be welcome.
So my glossary.md file looks like:
#section GLOSSARY_ISR ISR
Interrupt service routine: ...
In my Doxyfile I added
ALIASES = "glos{1}=[\1](\ref GLOSSARY_\1)"
to be able to use a simple syntax from my code documentation as the following
Therefore an \glos{ISR} is used

MS Word Mail Merge - Suppress page if condition is met?

Is there a way to have MS Word suppress a full page IF a condition is met for a Mail Merge?
I.e.
{ IF { MERGEFIELD x } = "True" "insert text here" [SUPPRESS PAGE] }
?
Perhaps there is another way to look at this if there is no straight forward answer. Any help would be greatly appreciated.
One possible solution could be to wrap the conditional content in a section and then hide this section. There is some explanation about how to do it here.
Another option is to use some toolkit based on OpenXML to show/hide conditional content. I have done this myself on several projects using Docentric toolkit, which is not free, but can be tailored to all kinds of possible scenarios, including yours. An example of conditional content is shown here.
I hope you will find something of the above useful.

Generate a list of keywords using Doxygen

I am curious if it is possible to generate a list of keywords, a index if you will, for easy reference by doxygen ? I am not talking of list of classes etc. but specific words that are used as indexes.
This is possible but AFAIK only with the Latex/pdf output, with the command \addindex
See the manual.
If anybody knows a way to produce an index with the HTML, I would be very interested too.
xrefitem
With this you can create a page for each of your keywords. One example they already make an alias for:
\xrefitem todo "Todo" "Todo List"
You can add other aliases in your Doxygen file:
ALIASES += "reminder=\xrefitem reminders \"Reminder\" \"Reminders\""
Then in the code you can do something like:
\reminder Add the cool feature here.
And you'll get a Reminder page with the list of reminders on it.