Skip to content
This repository was archived by the owner on Aug 20, 2023. It is now read-only.

Support text selection in Impress & Calc OR Show a meaninful message box #34

Open
kinafu opened this issue Nov 19, 2018 · 7 comments
Open
Labels

Comments

@kinafu
Copy link

kinafu commented Nov 19, 2018

The Add-On works great within LibreOffice Writer.

In Impress and Calc (I tried only both of them) it doesn't.
After selecting a text and choosing the desired langue there comes the following error.

Screenshot from Windows 10

  • version information:
    Win: Version: "Version: 6.1.2.1 (x64) Build-ID: 65905a128db06ba48db947242809d14d3f9a93fe CPU-Threads: 4; BS: Windows 10.0; UI-Render: GL; Gebietsschema: de-DE (de_DE); Calc: CL

  • text message from the picture

  • grafik

Screenshot from Ubuntu 18.10,

  • version information: Version: 6.1.2.1 Build-ID: 1:6.1.2-0ubuntu1 CPU-Threads: 4; BS: Linux 4.18; UI-Render: Standard; VCL: gtk3; Gebietsschema: de-DE (de_DE.UTF-8); Calc: group threaded
  • grafik
@kinafu kinafu changed the title Add-On works inly in LibreOffice Writer Add-On works only in LibreOffice Writer Nov 19, 2018
@kinafu kinafu changed the title Add-On works only in LibreOffice Writer Add-On only works in LibreOffice Writer Nov 19, 2018
@kinafu
Copy link
Author

kinafu commented Nov 19, 2018

This issue might be related to #31.

@slgobinath
Copy link
Owner

Hi,
How did you use the HighLighter in Impress? The original way of highlighting a code snippet using this addon is as follows:

  1. Create a Text Box (Insert --> Text Box)
  2. Enter the Code into the text box
  3. Select the text box (not the text. Highlighting selected text is added by @medovina. This feature works only in writer)
  4. Choose the language in the Highlight menu
    You can see the detailed instruction with screenshots here

I tried this method in my LO 6.0.6.2 in Writer, Impress and Calc. All are working as expected. If you still encounter any issues, please do let me know.
Thanks

@slgobinath slgobinath changed the title Add-On only works in LibreOffice Writer Support text selection in Impress & Calc OR Show a meaninful message box Dec 6, 2018
@slgobinath slgobinath added the bug label Dec 6, 2018
@newtekboy
Copy link

运行 Python 脚本 vnd.sun.star.script:codehighlighter.oxt|python|highlight.py$highlight_py3tb_default?language=Python&location=user:uno_packages 时出现脚本框架错误。

消息: <class 'ImportError'>: No module named 'pygments' (or 'pygments.styles' is unknown)
File "/opt/libreoffice6.0/program/pythonscript.py", line 1024, in getScript
mod = self.provCtx.getModuleByUrl( fileUri )
File "/opt/libreoffice6.0/program/pythonscript.py", line 484, in getModuleByUrl
exec(code, entry.module.dict)
File "/home/newtekboy/.config/libreoffice/4/user/uno_packages/cache/uno_packages/lu16772kqkqk.tmp_/codehighlighter.oxt/python/highlight.py", line 19, in
from pygments import styles
File "/opt/libreoffice6.0/program/uno.py", line 425, in _uno_import
raise uno_import_exc
File "/opt/libreoffice6.0/program/uno.py", line 347, in _uno_import
return _builtin_import(name, *optargs, **kwargs)

@slgobinath
Copy link
Owner

Please check the latest release v1.5.

@kinafu
Copy link
Author

kinafu commented Apr 24, 2019

Highlighting text within a text box by clicking on the box works. Thanks for pointing out that feature.

Nevertheless the functionality implemented by @slgobinath for Writer would be nice to have for Impress, Calc, ...

@virajtshah
Copy link

A Scripting Framework error occurred while running the Python script vnd.sun.star.script:codehighlighter.oxt|python|highlight.py$highlight_cpp_default?language=Python&location=user:uno_packages.

Message: <class 'ImportError'>: No module named 'pygments' (or 'pygments.styles' is unknown)
File "/usr/lib/libreoffice/program/pythonscript.py", line 1024, in getScript
mod = self.provCtx.getModuleByUrl( fileUri )
File "/usr/lib/libreoffice/program/pythonscript.py", line 484, in getModuleByUrl
exec(code, entry.module.dict)
File "/home/viraj/.config/libreoffice/4/user/uno_packages/cache/uno_packages/lu27796ed10bk.tmp_/codehighlighter.oxt/python/highlight.py", line 19, in
from pygments import styles
File "/usr/lib/python3/dist-packages/uno.py", line 428, in _uno_import
raise uno_import_exc
File "/usr/lib/python3/dist-packages/uno.py", line 350, in _uno_import
return _builtin_import(name, *optargs, **kwargs)

I downloaded the v1.5 but i am getting above error

@mwinko
Copy link

mwinko commented Jan 5, 2020

Did you solve the issue, I also have this issue on LO 6.1.2.1 (x64)... Mayby the 64 bit version is the root cause?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants