Re: [Libreoffice] Howto develop an extension with URE?

2011-11-18 Thread Christian Ehrlicher

Stephan Bergmann schrieb:

Now when I try to use the provided rdb I get an error when I try to
load a
document:
LoadFromUrl failed: Binary URP bridge disposed during call -
file:///home/chehrlic/Dokumente/test.odp
Out of curiosity the documentloader example can load my document and I
can't
find a difference between the example and my code.


Binary URP bridge disposed during call indeed hints at broken
plumbing, like the two ends of the bridge using different type
descriptions (which appears unlikely if you use the offapi.rdb from
LibO's basis layer---together with the types.rdb from LibO's URE layer)
or something like that.

The easiest would be if you presented a (stripped down) version of your
failing code. It might be that you fail to include the URE's types.rdb,
for example.

This was a good idea although not with the result I expected. After my 
testcase finally worked I found out that soffice is crashing during the 
connect procedure (my application is starting the soffice binary by its 
own and therefore I had no real chance to debug this end of the wire) 
gdb shows the problem:


-8
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffda7fd700 (LWP 18110)]
qt_toX11Pixmap (pixmap=...) at image/qpixmap_x11.cpp:98
98  image/qpixmap_x11.cpp: Datei oder Verzeichnis nicht gefunden.
in image/qpixmap_x11.cpp
(gdb) bt
#0  qt_toX11Pixmap (pixmap=...) at image/qpixmap_x11.cpp:98
#1  0x7fffeb647a40 in QX11PaintEngine::drawPixmap (this=optimized 
out, r=optimized out, px=optimized out, _sr=optimized out)

at painting/qpaintengine_x11.cpp:1918
#2  0x7fffeb583bf5 in QPaintEngine::drawImage (this=0x1df9fb0, 
r=..., image=..., sr=optimized out, flags=optimized out)

at painting/qpaintengine.cpp:624
#3  0x7fffeb64bc72 in QX11PaintEngine::drawImage (this=0x1df9fb0, 
r=..., image=..., sr=..., flags=...)

at painting/qpaintengine_x11.cpp:1903
#4  0x7fffeb59dc1e in QPainter::drawImage (this=0x7fffda7f98b0, 
targetRect=..., image=..., sourceRect=..., flags=...)

at painting/qpainter.cpp:5720
#5  0x7fffed747914 in ?? () from 
/usr/lib64/libreoffice/basis3.4/program/libvclplug_kde4lx.so
#6  0x739d4667 in SalGraphics::DrawNativeControl(unsigned int, 
unsigned int, Rectangle const, unsigned int, ImplControlValue const, 
rtl::OUString const, OutputDevice const*) () from 
/usr/lib64/libreoffice/program/../basis-link/program/libvcllx.so
#7  0x73947e7e in OutputDevice::DrawNativeControl(unsigned int, 
unsigned int, Rectangle const, unsigned int, ImplControlValue const, 
rtl::OUString) () from 
/usr/lib64/libreoffice/program/../basis-link/program/libvcllx.so
#8  0x73945d5b in OutputDevice::Erase() () from 
/usr/lib64/libreoffice/program/../basis-link/program/libvcllx.so
#9  0x73a8fae2 in ?? () from 
/usr/lib64/libreoffice/program/../basis-link/program/libvcllx.so
#10 0x73a8fd13 in Window::Update() () from 
/usr/lib64/libreoffice/program/../basis-link/program/libvcllx.so

#11 0x73a62025 in StatusBar::SetProgressValue(unsigned short) ()
   from /usr/lib64/libreoffice/program/../basis-link/program/libvcllx.so
#12 0x7fffdda90d54 in ?? () from 
/usr/lib64/libreoffice/program/../basis-link/program/libfwklx.so
#13 0x7fffdda9e270 in ?? () from 
/usr/lib64/libreoffice/program/../basis-link/program/libfwklx.so
#14 0x7fffdd954e81 in ?? () from 
/usr/lib64/libreoffice/program/../basis-link/program/libfwklx.so
#15 0x7fffdd951475 in ?? () from 
/usr/lib64/libreoffice/program/../basis-link/program/libfwklx.so
#16 0x7fffd8363378 in ProgressBarHelper::SetValue(int) () from 
/usr/lib64/libreoffice/program/../basis-link/program/libxolx.so
#17 0x7fffd842e127 in ?? () from 
/usr/lib64/libreoffice/program/../basis-link/program/libxolx.so
#18 0x7fffd8434e4b in ?? () from 
/usr/lib64/libreoffice/program/../basis-link/program/libxolx.so
#19 0x7fffd843ac74 in ?? () from 
/usr/lib64/libreoffice/program/../basis-link/program/libxolx.so
#20 0x7fffd8396328 in SvXMLImport::startElement(rtl::OUString 
const, 
com::sun::star::uno::Referencecom::sun::star::xml::sax::XAttributeList 
const) () from 
/usr/lib64/libreoffice/program/../basis-link/program/libxolx.so
#21 0x7fffd80455f0 in ?? () from 
/usr/lib64/libreoffice/program/../basis-link/program/sax.uno.so

#22 0x7fffe6debaf6 in ?? () from /lib64/libexpat.so.1
---Type return to continue, or q return to quit---q
-8

The kde4 plugin for libreoffice has a problem - creating qpixmaps 
outside the main thread is no allowed - crashes and the other end gives 
me the error message.
The crash doesn't happen every time and it looks like a 

Re: [Libreoffice] Howto develop an extension with URE?

2011-11-18 Thread Michael Stahl
On 18/11/11 20:41, Christian Ehrlicher wrote:
 The kde4 plugin for libreoffice has a problem - creating qpixmaps 
 outside the main thread is no allowed - crashes and the other end gives 
 me the error message.

in case this is your only problem you can select another VCL plugin:
e.g. use this if you like the 90s:
 export SAL_USE_VCLPLUGIN=gen

(look at the libvclplug* libraries to see what's available on your system)

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Howto develop an extension with URE?

2011-11-14 Thread Stephan Bergmann

On 11/12/2011 03:09 PM, Christian Ehrlicher wrote:

Ok, next step - is it correct that I don't need a custom rdb anymore? The
example formerly created an own rdb but is now using offapi.rdb from basis-
link/program
The old rdb creation procedure also used some libs which are not there anymore
- remotebridge.uno.so and bridgefac.uno.so


Conceptually, there are two kinds of rdbs, those for types and those for 
services.  For types, LibO itself uses a types.rdb in the URE layer (for 
the general URE types) and an offapi.rdb in the basis layer (for the 
office-suite-specific types).  For services, LibO similarly uses a 
services.rdb in the URE layer and one in the basis layer.



Now when I try to use the provided rdb I get an error when I try to load a
document:
LoadFromUrl failed: Binary URP bridge disposed during call -
file:///home/chehrlic/Dokumente/test.odp
Out of curiosity the documentloader example can load my document and I can't
find a difference between the example and my code.


Binary URP bridge disposed during call indeed hints at broken 
plumbing, like the two ends of the bridge using different type 
descriptions (which appears unlikely if you use the offapi.rdb from 
LibO's basis layer---together with the types.rdb from LibO's URE layer) 
or something like that.


The easiest would be if you presented a (stripped down) version of your 
failing code.  It might be that you fail to include the URE's types.rdb, 
for example.


Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Howto develop an extension with URE?

2011-11-13 Thread Stephan Bergmann

On 11/12/2011 12:43 PM, Michael Meeks wrote:

It seems a nonsense to me to not ship the pre-built C++ headers in the
sdk - particularly if that would make things easier for developers.

Stephan - is there a really good reason for not doing that ? clearly
the easier we make the sdk to use the better, and those headers can be
cut/pasted around / included into the code without problems surely.


No fundamental reason not to.  Probably more directed by the rationale 
to not ship what is easily (for whatever definition of easily) 
generated.  And I gather that if you use the SDK in the intended way, 
the included makefiles take care of header generation just fine.  (I do 
not argue that the way the SDK was designed to be used is necessarily 
useful, however.)  Plus, as soon as you want to introduce your own 
UNOIDL constructs, you need to use cppumaker etc. anyway.


Feel free to go ahead, I would say.

Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Howto develop an extension with URE?

2011-11-12 Thread Michael Meeks

On Fri, 2011-11-11 at 22:52 +0100, Christian Ehrlicher wrote:
  thx - this brings me a step further but can someone explain me how to
  create the headers out of the idl-files? They formerly were part of
  ure-devel iirc.
  
 Ok, forgive my ignorance :)

Not at all ! :-) it is a rather good question.

 After studiing the examples provided by sdk-doc again I found the cppumaker - 
 command. Now I only have to adjust my cmake script to generate those headers 
 dynamically too. 

It seems a nonsense to me to not ship the pre-built C++ headers in the
sdk - particularly if that would make things easier for developers.

Stephan - is there a really good reason for not doing that ? clearly
the easier we make the sdk to use the better, and those headers can be
cut/pasted around / included into the code without problems surely.

ATB,

Michael.

-- 
michael.me...@suse.com  , Pseudo Engineer, itinerant idiot

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Howto develop an extension with URE?

2011-11-12 Thread Christian Ehrlicher
Am Samstag, 12. November 2011, 12:43:47 schrieb Michael Meeks:
 On Fri, 2011-11-11 at 22:52 +0100, Christian Ehrlicher wrote:
   thx - this brings me a step further but can someone explain me how to
   create the headers out of the idl-files? They formerly were part of
   ure-devel iirc.
  
  Ok, forgive my ignorance :)
 
   Not at all ! :-) it is a rather good question.
 
  After studiing the examples provided by sdk-doc again I found the
  cppumaker - command. Now I only have to adjust my cmake script to
  generate those headers dynamically too.
 
Ok, next step - is it correct that I don't need a custom rdb anymore? The 
example formerly created an own rdb but is now using offapi.rdb from basis-
link/program
The old rdb creation procedure also used some libs which are not there anymore 
- remotebridge.uno.so and bridgefac.uno.so

Now when I try to use the provided rdb I get an error when I try to load a 
document:
LoadFromUrl failed: Binary URP bridge disposed during call - 
file:///home/chehrlic/Dokumente/test.odp
Out of curiosity the documentloader example can load my document and I can't 
find a difference between the example and my code.

I found a bugreport about this message in ubuntu ( 
https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/787539 ) but this 
did not help me further.

Is there a wiki about this? All I can find are old instructions ... 

Thx,
Christian
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Howto develop an extension with URE?

2011-11-11 Thread Jan Holesovsky
Hi Christian,

On 2011-11-11 at 06:37 +0100, Christian Ehrlicher wrote:

  The URE is still there in SUSE - it just lives in the libreoffice-sdk
  package.
 
 I can't find this here: http://download.opensuse.org/update/11.3/rpm/x86_64/

No idea why it is not in the update, but I'd add the following
repository to your install, and install the libreoffice-sdk from there:

http://download.opensuse.org/repositories/LibreOffice:/Stable/openSUSE_11.3/

Hope that helps,
Kendy

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Howto develop an extension with URE?

2011-11-11 Thread Christian Ehrlicher
Am Freitag, 11. November 2011, 17:27:56 schrieb Jan Holesovsky:
 Hi Christian,
 
 On 2011-11-11 at 06:37 +0100, Christian Ehrlicher wrote:
 The URE is still there in SUSE - it just lives in the libreoffice-sdk
   
   package.
  
  I can't find this here:
  http://download.opensuse.org/update/11.3/rpm/x86_64/
 
 No idea why it is not in the update, but I'd add the following
 repository to your install, and install the libreoffice-sdk from there:
 
 http://download.opensuse.org/repositories/LibreOffice:/Stable/openSUSE_11.3
 /
Hi,

thx - this brings me a step further but can someone explain me how to create 
the headers out of the idl-files? They formerly were part of ure-devel iirc.

Thx,
Christian
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Howto develop an extension with URE?

2011-11-11 Thread Christian Ehrlicher
Am Freitag, 11. November 2011, 18:25:26 schrieb Christian Ehrlicher:
 Am Freitag, 11. November 2011, 17:27:56 schrieb Jan Holesovsky:
  Hi Christian,
  
  On 2011-11-11 at 06:37 +0100, Christian Ehrlicher wrote:
The URE is still there in SUSE - it just lives in the
libreoffice-sdk

package.
   
   I can't find this here:
   http://download.opensuse.org/update/11.3/rpm/x86_64/
  
  No idea why it is not in the update, but I'd add the following
  repository to your install, and install the libreoffice-sdk from there:
  
  http://download.opensuse.org/repositories/LibreOffice:/Stable/openSUSE_11
  .3 /
 
 Hi,
 
 thx - this brings me a step further but can someone explain me how to
 create the headers out of the idl-files? They formerly were part of
 ure-devel iirc.
 
Ok, forgive my ignorance :)
After studiing the examples provided by sdk-doc again I found the cppumaker - 
command. Now I only have to adjust my cmake script to generate those headers 
dynamically too. 

Thx for the help and clarification,
Christian
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] Howto develop an extension with URE?

2011-11-10 Thread Christian Ehrlicher

Hi,

I've developed an extension to automatically load and store documents 
from/in a database. I can also start and control a slide show. This all 
works fine except some minor glitches inside libreoffice which I wanted 
to fix once my stuff is stable enough and I find some time.
For development I was using the ure and ure-devel packages from 
openSUSE. The problem now is that those packages are no longer available 
( https://bugzilla.novell.com/show_bug.cgi?id=728561 ) which leaves me 
alone in the dark. I tried to somehow get the sdk working but I failed 
generating the headers from the idl files... so my question is - how to 
use this sdk and is it safe to rely on this sdk or just switch back to 
M$ office programming + a terminal server? The M$ office solution was 
used before I managed to established openoffice/libreoffice for this 
task and now I'm a little bit puzzled if this was a good decision after 
all...


So what's the current state of ure in libreoffice?
Christian Ehrlicher
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Howto develop an extension with URE?

2011-11-10 Thread Michael Meeks
Hi Christian,

On Thu, 2011-11-10 at 19:51 +0100, Christian Ehrlicher wrote:
 I've developed an extension to automatically load and store documents 
 from/in a database. I can also start and control a slide show.

Great :-)

  This all works fine except some minor glitches inside libreoffice
 which I wanted  to fix once my stuff is stable enough and I find some time.

Much appreciated of course.

 For development I was using the ure and ure-devel packages from 
 openSUSE. The problem now is that those packages are no longer available 
 ( https://bugzilla.novell.com/show_bug.cgi?id=728561 ) which leaves me 
 alone in the dark. I tried to somehow get the sdk working but I failed 
 generating the headers from the idl files... so my question is - how to 
 use this sdk and is it safe to rely on this sdk

So - prolly safer. Previously we installed a lot of the internal
headers and tools to get the split build going - this meant that they
worked out of the box on many systems. In -theory- the URE has the same
tools and functionality ;-) in reality ... most likely it needs
improvement around packaging and particularly usability.

The URE is still there in SUSE - it just lives in the libreoffice-sdk
package.

  or just switch back to M$ office programming + a terminal server?

Heh, sounds even worse to me.

 The M$ office solution was used before I managed to established
 openoffice/libreoffice for this task and now I'm a little bit puzzled
 if this was a good decision after all...

Sure it was a good decision.

 So what's the current state of ure in libreoffice?

It's still there, and it should work, anything else is a bug.

More details such as: error messages from the idl / header compiler - I
assume you're running:
/usr/lib/libreoffice/basis3.4/sdk/bin/idlc for example ?

Of course, sharing the source or an equivalent piece of test code would
be even better to allow people to help you.

All the best,

Michael.

-- 
michael.me...@suse.com  , Pseudo Engineer, itinerant idiot

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Howto develop an extension with URE?

2011-11-10 Thread Christian Ehrlicher

Michael Meeks schrieb:

Hi Christian,

On Thu, 2011-11-10 at 19:51 +0100, Christian Ehrlicher wrote:

I've developed an extension to automatically load and store documents
from/in a database. I can also start and control a slide show.


Great :-)


  This all works fine except some minor glitches inside libreoffice
which I wanted  to fix once my stuff is stable enough and I find some time.


Much appreciated of course.


For development I was using the ure and ure-devel packages from
openSUSE. The problem now is that those packages are no longer available
( https://bugzilla.novell.com/show_bug.cgi?id=728561 ) which leaves me
alone in the dark. I tried to somehow get the sdk working but I failed
generating the headers from the idl files... so my question is - how to
use this sdk and is it safe to rely on this sdk


So - prolly safer. Previously we installed a lot of the internal
headers and tools to get the split build going - this meant that they
worked out of the box on many systems. In -theory- the URE has the same
tools and functionality ;-) in reality ... most likely it needs
improvement around packaging and particularly usability.

The URE is still there in SUSE - it just lives in the libreoffice-sdk
package.


I can't find this here: http://download.opensuse.org/update/11.3/rpm/x86_64/


Christian
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice