2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-07-04 15:25:45 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2003-04-04 18:13:01 +00:00
|
|
|
|
|
|
|
#include <sfx2/docfac.hxx>
|
2008-03-06 17:45:45 +00:00
|
|
|
#include <sfx2/sfxmodelfactory.hxx>
|
2003-04-04 18:13:01 +00:00
|
|
|
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
|
|
|
|
2014-04-14 21:37:24 +02:00
|
|
|
#include "register.hxx"
|
2003-09-19 07:53:50 +00:00
|
|
|
#include "smdll.hxx"
|
|
|
|
#include "document.hxx"
|
2010-10-16 03:22:02 -05:00
|
|
|
#include <osl/mutex.hxx>
|
2003-04-04 18:13:01 +00:00
|
|
|
#include <vcl/svapp.hxx>
|
|
|
|
|
|
|
|
using namespace ::com::sun::star;
|
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString SAL_CALL SmDocument_getImplementationName() throw()
|
2003-04-04 18:13:01 +00:00
|
|
|
{
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "com.sun.star.comp.Math.FormulaDocument" );
|
2003-04-04 18:13:01 +00:00
|
|
|
}
|
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
uno::Sequence< OUString > SAL_CALL SmDocument_getSupportedServiceNames() throw()
|
2003-04-04 18:13:01 +00:00
|
|
|
{
|
2015-03-02 18:35:54 +09:00
|
|
|
return uno::Sequence<OUString>{ "com.sun.star.formula.FormulaProperties" };
|
2003-04-04 18:13:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
uno::Reference< uno::XInterface > SAL_CALL SmDocument_createInstance(
|
2015-04-09 16:35:22 +02:00
|
|
|
const uno::Reference< lang::XMultiServiceFactory > & /*rSMgr*/, SfxModelFlags _nCreationFlags ) throw( uno::Exception )
|
2003-04-04 18:13:01 +00:00
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2011-05-22 16:41:01 +01:00
|
|
|
SmGlobals::ensure();
|
2010-01-06 21:34:53 +01:00
|
|
|
SfxObjectShell* pShell = new SmDocShell( _nCreationFlags );
|
2011-05-22 16:41:01 +01:00
|
|
|
return uno::Reference< uno::XInterface >( pShell->GetModel() );
|
2003-04-04 18:13:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-10-14 08:30:41 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|