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 _SW_XDOCUMENT_SETTINGS_HXX
21 #define _SW_XDOCUMENT_SETTINGS_HXX
23 #include <comphelper/MasterPropertySet.hxx>
24 #include <com/sun/star/text/XTextDocument.hpp>
25 #include <com/sun/star/lang/XServiceInfo.hpp>
26 #include <com/sun/star/lang/XTypeProvider.hpp>
27 #include <cppuhelper/weak.hxx>
28 #include <cppuhelper/implbase5.hxx>
31 class SwXTextDocument
;
36 class SwXDocumentSettings
:
37 public comphelper::MasterPropertySet
,
38 public com::sun::star::lang::XServiceInfo
,
39 public com::sun::star::lang::XTypeProvider
,
40 public cppu::OWeakObject
43 com::sun::star::uno::Reference
< com::sun::star::text::XTextDocument
> mxModel
;
44 SwXTextDocument
* mpModel
;
48 /** the printer should be set only once; since there are several
49 * printer-related properties, remember the last printer and set it in
51 SfxPrinter
* mpPrinter
;
53 virtual void _preSetValues ()
54 throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
);
55 virtual void _setSingleValue( const comphelper::PropertyInfo
& rInfo
, const ::com::sun::star::uno::Any
&rValue
)
56 throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
);
57 virtual void _postSetValues ()
58 throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
);
60 virtual void _preGetValues ()
61 throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
);
62 virtual void _getSingleValue( const comphelper::PropertyInfo
& rInfo
, ::com::sun::star::uno::Any
& rValue
)
63 throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
);
64 virtual void _postGetValues ()
65 throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
);
67 virtual ~SwXDocumentSettings()
70 SwXDocumentSettings( SwXTextDocument
* pModel
);
74 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface( const ::com::sun::star::uno::Type
& aType
)
75 throw (::com::sun::star::uno::RuntimeException
);
76 virtual void SAL_CALL
acquire( )
78 virtual void SAL_CALL
release( )
82 virtual OUString SAL_CALL
getImplementationName( )
83 throw(com::sun::star::uno::RuntimeException
);
84 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
85 throw(com::sun::star::uno::RuntimeException
);
86 virtual com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames( )
87 throw(com::sun::star::uno::RuntimeException
);
90 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes( ) throw (::com::sun::star::uno::RuntimeException
);
91 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId( ) throw (::com::sun::star::uno::RuntimeException
);
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */