1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: SwXDocumentSettings.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SW_XDOCUMENT_SETTINGS_HXX
32 #define _SW_XDOCUMENT_SETTINGS_HXX
38 #ifndef _COMPHELPER_MASTERPROPERTYSET_HXX_
39 #include <comphelper/MasterPropertySet.hxx>
41 #ifndef _COM_SUN_STAR_TEXT_XTEXTDOCUMENT_HPP
42 #include <com/sun/star/text/XTextDocument.hpp>
44 #include <com/sun/star/lang/XServiceInfo.hpp>
45 #include <com/sun/star/lang/XTypeProvider.hpp>
46 #include <cppuhelper/weak.hxx>
47 #include <cppuhelper/implbase5.hxx>
50 class SwXTextDocument
;
55 class SwXDocumentSettings
:
56 public comphelper::MasterPropertySet
,
57 public com::sun::star::lang::XServiceInfo
,
58 public com::sun::star::lang::XTypeProvider
,
59 public cppu::OWeakObject
62 com::sun::star::uno::Reference
< com::sun::star::text::XTextDocument
> mxModel
;
63 SwXTextDocument
* mpModel
;
67 /** the printer should be set only once; since there are several
68 * printer-related properties, remember the last printer and set it in
70 SfxPrinter
* mpPrinter
;
72 virtual void _preSetValues ()
73 throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
);
74 virtual void _setSingleValue( const comphelper::PropertyInfo
& rInfo
, const ::com::sun::star::uno::Any
&rValue
)
75 throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
);
76 virtual void _postSetValues ()
77 throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
);
79 virtual void _preGetValues ()
80 throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
);
81 virtual void _getSingleValue( const comphelper::PropertyInfo
& rInfo
, ::com::sun::star::uno::Any
& rValue
)
82 throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
);
83 virtual void _postGetValues ()
84 throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
);
86 virtual ~SwXDocumentSettings()
89 SwXDocumentSettings( SwXTextDocument
* pModel
);
93 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface( const ::com::sun::star::uno::Type
& aType
)
94 throw (::com::sun::star::uno::RuntimeException
);
95 virtual void SAL_CALL
acquire( )
97 virtual void SAL_CALL
release( )
101 virtual ::rtl::OUString SAL_CALL
getImplementationName( )
102 throw(com::sun::star::uno::RuntimeException
);
103 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
104 throw(com::sun::star::uno::RuntimeException
);
105 virtual com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames( )
106 throw(com::sun::star::uno::RuntimeException
);
109 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes( ) throw (::com::sun::star::uno::RuntimeException
);
110 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId( ) throw (::com::sun::star::uno::RuntimeException
);