Use writer instead of calc to run a macro - libreoffice-basic

I am trying to write an extension to install a macro. I have followed all the steps mentioned in the tutorial.
https://github.com/luane-aquino/helloworld-libreoffice-extension
It is working as expected. The only problem is that I need the icon to be available in writer and not in calc.

Related

Plot Viewer is not working anymore - how to fix?

I am currently working with VS Code and the Jupyter Extension. Until today the GUI of the Extension looked like this: old gui
But today this GUI changed to something like this: new gui
Problem is: If I now plot something I cannot open it in the Plot Viewer (before: double-clicking on the image would open it in a new file) but only save it in very low quality:
old version
vs.
new version
The 'Expand Image' Button is gone and now there is only a 'Save As' Button.
The GUI only changes to the newer version if I reopen the files. As long as a file is open in VS Code the old GUI remains and I can still open the images.
I already tried out to use older version of the Jupyter Extension, but it did not help.
If you need more in order to help, please write it and I will provide it.
The problem is probably very trivial but at this point, I am just very confused.
Thanks in advance and have a great day.
So I've found out that the Plot Viewer is no longer supported but will be added again soon.
Until then, if you want to use the Plot Viewer you need to do the following:
Install an older version of the Yupiter Extension (2021.2.0 worked for me).
this version does not work with the newest version of vs code
Install older Version of VS Code (https://code.visualstudio.com/updates/v1_57 worked for me).
After VS Code is installed you can open it and disable the auto update inside the VS Code settings.
Now you should be able to work with the old Jupyter Extension that includes the Plot Viewer.
If you update the Jupyter Extension you will need to do the above steps again.
Maybe this can help some lost souls searching for the old Plot Viewer.

Batch plotting dwg & dxf files to pdf in AutoCAD

I have a problem with making the batch plotting files in the autoCAD.
The similar query is here, but it solves an issue within 1 file only.
Convert dwg file to pdf
In turn, the main tutorial doesn't explain it enough.
https://knowledge.autodesk.com/support/autocad/learn-explore/caas/sfdcarticles/sfdcarticles/How-to-publish-multiple-drawings-into-PDF-in-AutoCAD.html
I have the problem with creating the batch list itself.
My problem looks like this.
I have got a command "Layout not initialized", as per below:
As a result I have got nothing.
Is anyone able to help?
One of the solutions is running the command PAGESETUP and setting the page layout for each document, as follows:
https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/layout-not-initialized-when-publish.html

Enabling right click copy for ipython plots?

Is there a way to enable matplotlib/ipython so I can right click my plots (in Chrome) and copy then paste elsewhere such as MS Word etc?
I know I can code and save to image etc, but often when I am playing around investigating data it would be very useful to just copy / paste into a document for safekeeping and reports.
EDIT: Problem seems to be using MS Word (2010) and any dynamic image from any Browser (IE/Chrome), If I use other progs like Write it works okay. I found some advice to change the "Pasting from other programs" option in Word settings but it has no effect.
Also another article says the problem is based on the contents of the "HTML Format" format stored in the clipboard.
Guess I need to post this question elsewhere seems to be an MS Word issue!
If you control-shift right click, it'll return to the standard Chrome context menu instead of the iPython one.
EDIT: the below answer doesn't always work anymore (something changed I think), but there is another stack overflow question here with an answer that is working, namely using Ctrl+Alt+V to do a paste-special:
Jupyter Notebook: How to copy paste image into MS word?
A straight Ctrl+V will generally fail in MS Office for this purpose, but there is the "paste image" option which is what is working for me.
If you're using ipython notebook (which I guess you must be, since you're mentioning using Chrome), you can just right-click on your graph and choose Copy Image then paste into whatever software
Drag and drop worked for me using Chrome and MS Word on macOS.

Running VBA macros in documents created using template

I have macro-enabled templete (.dotm) wich has number of macros generally connected with adding and deleting parts of document using custom building blocks stored in the template.
When I execute macros at the actual template file everything works smooth.
But when I try to execute them in documents created using this template macros stop working after one run of the particular function (attached to checkbox).
Additionally in some cases checkboxes turn into pictures when saving documents as .docx files.
What could be wrong with this document?
The problem was solved by recreating problem checkbox.

How do I keep formatting when copying from gedit into open office?

I am editing octave files in gedit, and it does a nice job highlighting them. However, when I try to copy and paste the code into Open Office, it loses all formatting. Even when I try paste > special, it still doesn't work.
Is there any way to do this without having to manually go through all my code highlighting keywords?
The free and open source editor KATE can actually export in HTML Octave's code keeping the correct syntax highlighting.
I had the same problem and I found this very usefull page: http://tohtml.com/
So you don't need to install any other editor or stuff, just copy paste to the page and let it do it.
PS: It seems like the owner likes to sell the domain, so hopefully the project will stay online, otherwise you will find other solutions google: "cpp online syntaxhighlighter"
I don't know if this can be any good, but if you open the script with the MatlabĀ® editor, then you can make copy and paste (paste > special), keeping the Octave syntax highlighting.
If you don't want to install KDE dependencies for run Kate I found a solution that could work until Scite implementation in GNU/Linux (?) haven't got the command "Copy as RTF", take a look here
So let's go:
sudo apt-get install wine synapse
wine: Windows Emulator ;)
synapse: fast application launcher
download notepad++ installer version
go to Downloads, chmod +x executable file (permissions to execute, could do graphically with properties of file, in permissions)
install it! (with default values works)
now you can run it easily with synapse:
if is launched: Ctrl+Space (or Super (windows key)+Space) and type "notepad" (if no appear, press Arrow Down and search it!)
write a text in, for example:
for i=1:3
%comment!
end
and now select it, with right button of mouse "plugin commands > copy text with syntax highlighting"
paste it!
in LibreOffice Writer: be carefull, use Ctrl+Shift+V or Edit>Paste Especial>Formated Text [RTF]
in Abiword works with Ctrl+V