1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 #ifndef _SFX_DOCTEMPLATES_HXX_
21 #define _SFX_DOCTEMPLATES_HXX_
23 #include <cppuhelper/weak.hxx>
24 #include <cppuhelper/implbase3.hxx>
25 #include <com/sun/star/container/XNameAccess.hpp>
26 #include <com/sun/star/frame/XDocumentTemplates.hpp>
27 #include <com/sun/star/frame/XStorable.hpp>
28 #include <com/sun/star/frame/XModel.hpp>
29 #include <com/sun/star/lang/Locale.hpp>
30 #include <com/sun/star/lang/XLocalizable.hpp>
31 #include <com/sun/star/lang/XServiceInfo.hpp>
32 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
33 #include <com/sun/star/ucb/XContent.hpp>
34 #include <com/sun/star/beans/PropertyValue.hpp>
35 #include <com/sun/star/uno/RuntimeException.hpp>
36 #include <com/sun/star/uno/XInterface.hpp>
37 #include <ucbhelper/content.hxx>
38 #include <sfx2/sfxuno.hxx>
41 class SfxDocTplService_Impl
;
43 class SfxDocTplService
: public ::cppu::WeakImplHelper3
< css::lang::XLocalizable
, css::frame::XDocumentTemplates
, css::lang::XServiceInfo
>
45 SfxDocTplService_Impl
*pImp
;
50 SfxDocTplService( const css::uno::Reference
< css::lang::XMultiServiceFactory
>& xFactory
);
53 // --- XLocalizable ---
54 void SAL_CALL
setLocale( const css::lang::Locale
& eLocale
) throw( css::uno::RuntimeException
);
55 css::lang::Locale SAL_CALL
getLocale() throw( css::uno::RuntimeException
);
57 // --- XDocumentTemplates ---
58 css::uno::Reference
< css::ucb::XContent
> SAL_CALL
getContent() throw( css::uno::RuntimeException
);
59 sal_Bool SAL_CALL
storeTemplate( const OUString
& GroupName
,
60 const OUString
& TemplateName
,
61 const css::uno::Reference
< css::frame::XStorable
>& Storable
) throw( css::uno::RuntimeException
);
62 sal_Bool SAL_CALL
addTemplate( const OUString
& GroupName
,
63 const OUString
& TemplateName
,
64 const OUString
& SourceURL
) throw( css::uno::RuntimeException
);
65 sal_Bool SAL_CALL
removeTemplate( const OUString
& GroupName
,
66 const OUString
& TemplateName
) throw( css::uno::RuntimeException
);
67 sal_Bool SAL_CALL
renameTemplate( const OUString
& GroupName
,
68 const OUString
& OldTemplateName
,
69 const OUString
& NewTemplateName
) throw( css::uno::RuntimeException
);
70 sal_Bool SAL_CALL
addGroup( const OUString
& GroupName
) throw( css::uno::RuntimeException
);
71 sal_Bool SAL_CALL
removeGroup( const OUString
& GroupName
) throw( css::uno::RuntimeException
);
72 sal_Bool SAL_CALL
renameGroup( const OUString
& OldGroupName
,
73 const OUString
& NewGroupName
) throw( css::uno::RuntimeException
);
74 void SAL_CALL
update() throw( css::uno::RuntimeException
);
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */