I'm struggling with some code using LibreOffice 7.1.0
on Windows 10
to append images from a folder into separate slides in Impress
. I've been looking here and OpenOffice documentation. This call continuously fails (null)
: xMultiServiceFactory.createInstance("com.sun.star.drawing.BitmapTable");
and I cannot understand why? I tried using XMultiComponentFactory
also, but no luck. Has it got something to do with Slide Layout
, but despite being of blank type, I could drag-drop an image and it gets added in the slide.
Unfortunately, full code is on restricted system, so I have this much only. Any hints on potential causes would be very helpful.
Asked
Active
Viewed 22 times
0

user2338150
- 479
- 5
- 14
1 Answers
0
It was simple issue: I needed to initialize xMultiServiceFactory
with xComponent
. I had earlier initialized it with xComponentContext.getServiceManager()
. I realize again, this is why learning object model is very important. COM could get tricky unless, one knew what they were doing.

user2338150
- 479
- 5
- 14