Ask Your Question

urbanhusky's profile - activity

2017-05-02 11:17:17 +0200 received badge  Famous Question (source)
2016-02-21 14:14:21 +0200 received badge  Famous Question (source)
2015-08-26 20:27:48 +0200 received badge  Notable Question (source)
2015-08-18 08:44:11 +0200 received badge  Notable Question (source)
2015-08-05 16:05:22 +0200 answered a question Writer: scroll entire pages in a readonly document with API (C++)

Since 4.4 the commands seem to be uno:ScrollToPrevious and .uno:ScrollToNext - this works almost perfectly (it is at least as buggy as when using the navigator).

2015-08-05 16:05:16 +0200 commented answer Writer: Get current displayed page number via API/SDK

Unfortunately the mailing list didn't provide any help here - has anyone got anything?

2015-08-03 21:16:59 +0200 received badge  Notable Question (source)
2015-07-13 11:50:28 +0200 received badge  Popular Question (source)
2015-07-10 17:19:16 +0200 commented answer Writer: Get current displayed page number via API/SDK

I just posted it to the user mailing list, I had the impression that the dev-list is more for actual development on libreoffice itself.

2015-07-10 11:34:50 +0200 commented answer Writer: Get current displayed page number via API/SDK

I tried it again with Basic this time. Since I hide all status bars etc. in readonly mode, I cannot access the status bar. This script generates a BASIC runtime error. Object variable not set I also have very little to no control over the locale used so parsing the output could be tricky too. (Environment is Ubuntu)

2015-07-10 10:08:38 +0200 commented question Writer: scroll entire pages in a readonly document with API (C++)

Toggling readonly before and after moving the cursor with .uno:EditDoc works in theory, but causes flickering. Cursor position is also not updated when doing .uno:GoUp or .uno:GoDown in readonly.

2015-07-10 10:08:38 +0200 received badge  Commentator
2015-07-10 09:04:00 +0200 commented answer Writer: scroll entire pages in a readonly document with API (C++)

Sadly doesn't work in readonly mode. Also shows the next page in the middle of the screen instead of on top (but tbh that was not something I actually asked for)

2015-07-09 17:14:54 +0200 answered a question Writer: get current zoom value (for ENTIRE_PAGE zoom type) with C++

This works, but not directly after setting the zoom to ENTIRE_PAGE on load (assuming that xControlleris the XControllerfor the current XModel):

Reference< XViewSettingsSupplier  > XViewSettingsSupplier(xController, UNO_QUERY);
Reference< XPropertySet  > viewprops = XViewSettingsSupplier->getViewSettings();
Any anyZoomValue = viewprops->getPropertyValue(OUString::createFromAscii("ZoomValue"));
sal_Int16 actualZoomValue = 0;
anyZoomValue >>= actualZoomValue;
2015-07-06 11:21:57 +0200 commented answer Writer: get current zoom value (for ENTIRE_PAGE zoom type) with C++

Yes, the only thing I have found so far is that ViewSettings returns an Any, which does not really implement any interface. That's not really documented :\

2015-07-06 11:20:56 +0200 received badge  Popular Question (source)
2015-07-06 08:07:43 +0200 commented answer Writer: get current zoom value (for ENTIRE_PAGE zoom type) with C++

Any idea how I could translate accessing the ViewSettings into C++? I have the current controller as an XController interface...

2015-07-06 08:05:57 +0200 received badge  Notable Question (source)
2015-07-02 14:53:25 +0200 commented answer Writer: scroll entire pages in a readonly document with API (C++)

Unfortunately, .uno:PageUp only scrolls roughly in screen sizes, not page sizes. This is more apparent at higher or low zoom levels

2015-07-02 14:19:36 +0200 asked a question Writer: scroll entire pages in a readonly document with API (C++)

How can I scroll entire pages, regardless of current zoom setting, in writer via C++?

The document is readonly, so XPageCursor->jumpToPreviousPage() does seem to do nothing. This also only would set the cursor, if I scroll in smaller increments then this would not move the cursor.

2015-07-02 14:15:06 +0200 asked a question Writer: get current zoom value (for ENTIRE_PAGE zoom type) with C++

Hi,

is it possible to read the current zoom value if the zoom type is set to ENTIRE_PAGE? If so, how would I achieve this with C++?

I want to know the value because setting the zoom to 125% or 85% and then back to 100% yields a different zoom than ENTIRE_PAGE does.

2015-07-02 11:15:34 +0200 commented answer Writer: Get current displayed page number via API/SDK

Well, if I try to get the status bar, but have hidden it, I get NULL for it.

2015-07-02 10:23:47 +0200 commented answer Writer: Get current displayed page number via API/SDK

Unfortunately I hide the status bar so I don't seem to be able to access it this way.

2015-06-30 08:23:14 +0200 received badge  Popular Question (source)
2015-06-29 08:28:17 +0200 received badge  Popular Question (source)
2015-06-26 10:47:08 +0200 commented answer Freeze with 100% CPU after opening documents via API

There is a known memory leak that hasn't been fixed for years now, which is most likely the issue here. Happens when starting OO/LO in headless mode (which is also what the bootstrap does).

2015-06-26 10:43:38 +0200 asked a question Writer: Get current displayed page number via API/SDK

Hi,

I'm trying to get the current page number of where the document is shown (scrolled to), not where the cursor is located. How is this possible with the API?

P.S.: I'm using C++

2015-06-26 10:39:39 +0200 answered a question soffice.bin at 44% cpu under Debian 6.0, peaking at 99%

There is a very old memory leak in OO/LO when starting it in headless mode - could this be related?

2015-06-05 23:06:41 +0200 received badge  Famous Question (source)
2015-06-03 21:01:08 +0200 received badge  Notable Question (source)
2015-06-03 13:13:08 +0200 answered a question Freeze with 100% CPU after opening documents via API

This is most likely related to the memory leak in headless office processes...

2015-06-02 08:16:16 +0200 received badge  Enthusiast
2015-05-28 13:32:05 +0200 received badge  Popular Question (source)
2015-05-27 19:41:08 +0200 received badge  Popular Question (source)
2015-05-27 13:45:53 +0200 commented answer Scroll in Calc via API

Okay, got it. I can get it directly from the XController (from XModel->getcurrentController, from resolving the XModel from the XComponent)

2015-05-27 13:44:56 +0200 received badge  Scholar (source)
2015-05-27 13:16:09 +0200 commented answer Scroll in Calc via API

So SetFirstVisibleColumn seems to be part of the XViewPane interface - but that's as far as I get. How can I resolve it, starting at the component (which was loaded via XComponentLoader->loadComponentFromURL)?

2015-05-27 09:35:15 +0200 asked a question Scroll in Calc via API

How can I scroll in Calc without moving the selection via the API? (C++)

I tried dispatching .uno:GoLeft etc. but that only moves the selected cell.

2015-05-21 13:53:54 +0200 asked a question Hide impress edit view when showing presentation

When a presentation is to be shown (e.g. soffice --show <file>), then the file is first opened in the edit view before showing the presentation/slide show in fullscreen.

Can this be suppressed in any way? I'm especially looking for a solution via the API (since I'm opening and controlling the presentation via the API)

2015-05-21 11:02:13 +0200 received badge  Editor (source)
2015-05-21 10:51:57 +0200 asked a question Freeze with 100% CPU after opening documents via API

Hi,

I'm using the C++ API/SDK to open documents in fullscreen on Ubuntu Desktop 14.04.02 LTS. Libreoffice is version 4.4.3.2 (English)

I open the document via the XComponentLoader->loadComponentFromUrl with the "Hidden" property set. Then I use the XLayoutManager to hide all controls before showing the corresponding XWindow.

After a few iterations the API hangs at the call

xContainerWindow->setVisible(sal_True);

In the terminal I see the message

(soffice:44857): GLib-CRITICAL **: g_hash_table_iter_next: assertion 'ri->version == ri->hash_table->version' failed

The soffice process is now blocked (and would also prevent the bootstrap from completing etc.)

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
44857 boss 20 0 2189916 210692 141440 R 169,1 10,3 59:20.48 soffice.bin

I tried killing the office process before opening a new document, but that causes the following issue on the same line of code:

(soffice:55244): GLib-CRITICAL **: g_variant_new_string: assertion 'g_utf8_validate (string, -1, NULL)' failed

(soffice:55244): GLib-CRITICAL **: g_hash_table_iter_next: assertion 'ri->version == ri->hash_table->version' failed

The soffice.bin process then also is stuck at 100% CPU and my application eats more and more memory until it freezes at that call.

What could be the cause of this?

Edit It sometimes also fails when bootstrapping (using the new, simple bootstrap):

Warning: failed to launch javaldx - java may not function correctly ERROR 4 forking process