Date: prev next · Thread: first prev next last
2019 Archives by date, by thread · List index


On 23/05/2019 17:18, Manfred Rebentisch wrote:
Hi,

if I start soffice with

--accept="socket,host=localhost,port=2083;urp;StarOffice.ServiceManager"

it runs normal.
But if I want to connect from client C++ programm:

sConnectionString =
"socket,host=localhost,port=2083;urp;StarOffice.ServiceManager";

xContextM = ::cppu::defaultBootstrap_InitialComponentContext();

xServiceManagerM = xContextM->getServiceManager();
xResolverM = Reference< XUnoUrlResolver > (xInterfaceM, UNO_QUERY);

xInterfaceM = Reference< XInterface >(
             xResolverM->resolve( sConnectionString ), UNO_QUERY );

it throws an exception with: "UNO URL does not start with "uno:" "

The soffice --accept command-line option and the UNO css.bridge.UnoUrlResolver service expect different kinds of arguments. The latter is documented to expect a full uno URL (see <http://udk.openoffice.org/common/man/spec/uno-url.html>), while the former takes only connection-type,params and optional (defaulting to "urp") protocol-name,params parts of such a URL. (Though the former was mis-documented to also take a uno URL, see <https://gerrit.libreoffice.org/#/c/72859/> "Fix documented 'soffice --accept' parameter syntax") for fixing that.

So run `soffice --accept=socket,host=localhost,port=2083\;urp` but call xResolver->resolve("uno:socket,host=localhost,port=2083;urp;StarOffice.ServiceManager").

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.