tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / connectivity / source / drivers / mozab / bootstrap / MMozillaBootstrap.cxx
blob37cfb087a70fb5a94b74ce6d6f37e1cce9f260af
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
21 #include <cppuhelper/factory.hxx>
22 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
23 #include <cppuhelper/supportsservice.hxx>
24 #include <cppuhelper/weak.hxx>
25 #include "MMozillaBootstrap.hxx"
26 #include "MNSProfileDiscover.hxx"
28 using namespace com::sun::star::uno;
29 using namespace com::sun::star::lang;
30 using namespace com::sun::star::mozilla;
31 using namespace connectivity::mozab;
33 using ::com::sun::star::uno::Reference;
34 using ::com::sun::star::uno::Sequence;
36 MozillaBootstrap::MozillaBootstrap()
37 : OMozillaBootstrap_BASE(m_aMutex)
39 m_ProfileAccess.reset(new ProfileAccess);
40 bootupProfile(css::mozilla::MozillaProductType_Mozilla,OUString());
43 MozillaBootstrap::~MozillaBootstrap()
47 void MozillaBootstrap::disposing()
49 ::osl::MutexGuard aGuard(m_aMutex);
50 OMozillaBootstrap_BASE::disposing();
53 OUString SAL_CALL MozillaBootstrap::getImplementationName( )
55 return u"com.sun.star.comp.mozilla.MozillaBootstrap"_ustr;
58 sal_Bool SAL_CALL MozillaBootstrap::supportsService( const OUString& _rServiceName )
60 return cppu::supportsService(this, _rServiceName);
63 Sequence< OUString > SAL_CALL MozillaBootstrap::getSupportedServiceNames( )
65 // which service is supported
66 // for more information @see com.sun.star.mozilla.MozillaBootstrap
67 return { u"com.sun.star.mozilla.MozillaBootstrap"_ustr };
71 // XProfileDiscover
72 ::sal_Int32 SAL_CALL MozillaBootstrap::getProfileCount( css::mozilla::MozillaProductType product)
74 return m_ProfileAccess->getProfileCount(product);
76 ::sal_Int32 SAL_CALL MozillaBootstrap::getProfileList( css::mozilla::MozillaProductType product, css::uno::Sequence< OUString >& list )
78 return m_ProfileAccess->getProfileList(product,list);
80 OUString SAL_CALL MozillaBootstrap::getDefaultProfile( css::mozilla::MozillaProductType product )
82 return m_ProfileAccess->getDefaultProfile(product);
84 OUString SAL_CALL MozillaBootstrap::getProfilePath( css::mozilla::MozillaProductType product, const OUString& profileName )
86 return m_ProfileAccess->getProfilePath(product,profileName);
88 sal_Bool SAL_CALL MozillaBootstrap::isProfileLocked( css::mozilla::MozillaProductType /*product*/, const OUString& /*profileName*/ )
90 return true;
92 sal_Bool SAL_CALL MozillaBootstrap::getProfileExists( css::mozilla::MozillaProductType product, const OUString& profileName )
94 return m_ProfileAccess->getProfileExists(product,profileName);
97 // XProfileManager
98 ::sal_Int32 SAL_CALL MozillaBootstrap::bootupProfile( css::mozilla::MozillaProductType, const OUString& )
100 return -1;
102 ::sal_Int32 SAL_CALL MozillaBootstrap::shutdownProfile( )
104 return -1;
106 css::mozilla::MozillaProductType SAL_CALL MozillaBootstrap::getCurrentProduct( )
108 return css::mozilla::MozillaProductType_Default;
110 OUString SAL_CALL MozillaBootstrap::getCurrentProfile( )
112 return OUString();
114 sal_Bool SAL_CALL MozillaBootstrap::isCurrentProfileLocked( )
116 return true;
118 OUString SAL_CALL MozillaBootstrap::setCurrentProfile( css::mozilla::MozillaProductType, const OUString& )
120 return OUString();
123 // XProxyRunner
124 ::sal_Int32 SAL_CALL MozillaBootstrap::Run( const css::uno::Reference< css::mozilla::XCodeProxy >& )
126 return -1;
129 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
130 connectivity_moz_MozillaBootstrap_get_implementation(
131 css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&)
133 return cppu::acquire(new connectivity::mozab::MozillaBootstrap());
136 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */