// 新手,自己看代码的理解。
// Simple client application using the UnoUrlResolver service.
#include <stdio.h>
#include <wchar.h>
#include <sal/main.h>
#include <cppuhelper/bootstrap.hxx>
#include <osl/file.hxx>
#include <osl/process.h>
#include <rtl/process.h>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/registry/XSimpleRegistry.hpp>
#include <string.h>
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::beans;
using namespace com::sun::star::bridge;
using namespace com::sun::star::frame;
using namespace com::sun::star::registry;
using ::rtl::OUString;
using ::rtl::OUStringToOString;
SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
{
OUString sConnectionString("uno:socket,host=localhost,port=2083;urp;StarOffice.ServiceManager");
sal_Int32 nCount = (sal_Int32)rtl_getAppCommandArgCount();
if (nCount < 1)

本文探讨了LibreOffice中XComponentContext组件环境的重要性,特别指出在获取服务时必须通过该组件环境。文章同时也对代码中可能引起混淆的变量命名进行了讨论,如xComponentContext与xMultiComponentFactoryServer,提出了对 Dispose 方法使用的问题。

4390

被折叠的 条评论
为什么被折叠?



