c++ app samples that communicates with libreoffice, to work with a CALC doc.

nicholas ferguson nicholasferguson at wingarch.com
Mon Sep 29 05:49:14 PDT 2014


I only need a simple c++ sample, that in its main, includes code to:  ( I'm
not sure if what follows below is old or new libreoffice architecture
terms?)
+ get a remote office component context
+ get the remote office service manager
+ get an instance of the remote office desktop UNO service 
+ query for the XComponentLoader interface 
+ Open a spreadsheet document, with a handle to doc

-----Original Message-----
From: LibreOffice [mailto:libreoffice-bounces at lists.freedesktop.org] On
Behalf Of nicholas ferguson
Sent: Monday, September 29, 2014 8:26 AM
To: 'libreoffice'
Subject: c++ app samples that communicates with libreoffice, to work with a
CALC doc.

I'm working up an independent c++ app (win32 console application) that talks
to Libreoffice, "preferably via pipes"... and will open, close and manage a
Calc spreadsheet. This is a proof of concept..to see if LibreOffice can add
value.  Can anyone send me a sample.  sample can be for a linux or windows
platform.

An independent C++ application (console application) can talk to libreoffice
via tcp.ip, pipes or ole. ( could be others?)  The problem is that
LibreOffice samples that work with a  calc doc, that I have found googling,
cover two different LibreOffice architectures.   

Todate, I have only found one c++ sample that works with a calc doc, that
uses Windows DCOM, that built and worked without any error codes.

All samples that I have found, googling, use a deprecated libreoffice
architecture. ( except for one ole dcom sample)
Deprecated architecture: Samples work with LibreOffices by using file
<comphelper/processfactory.hxx>,  Last seen in version 4.0.0.3 ( about)

Plus there are architecture differences in working with rdb files, etc...

And then functions,in a current version of LibreOffice, that are deprecated
due to architecture changes,  return abort().  This increases difficulty in
debugging.  Because this allows a build, but then if that function is
called, it makes an app crash.  It's hard to fanthom why this approach was
used.

A good example 

cppuhelper/source/compat.hxx

line 56.  Reference<XSimpleRegistry>createSimpleRegistry(OUString const&)
returns std::abort. 
There is a comment "//avoid "must return a value warning"










_______________________________________________
LibreOffice mailing list
LibreOffice at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice





More information about the LibreOffice mailing list