CWS-TOOLING: integrate CWS os150
[LibreOffice.git] / sd / source / ui / inc / SdUnoDrawView.hxx
blobd29ca3b09d32a637388bfab0997d3bea249e0c8f
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef SD_UNO_DRAW_VIEW_HXX
29 #define SD_UNO_DRAW_VIEW_HXX
31 #include "DrawSubController.hxx"
32 #include "DrawController.hxx"
33 #include "DrawViewShell.hxx"
34 #include <cppuhelper/basemutex.hxx>
36 class SdXImpressDocument;
37 class SdPage;
39 namespace css = ::com::sun::star;
41 namespace com { namespace sun { namespace star { namespace drawing {
42 class XLayer;
43 } } } }
45 namespace sd {
47 class DrawController;
48 class DrawViewShell;
50 /** This class implements the DrawViewShell specific part of the controller.
52 class SdUnoDrawView
53 : private cppu::BaseMutex,
54 public DrawSubControllerInterfaceBase
56 public:
57 SdUnoDrawView (
58 DrawController& rController,
59 DrawViewShell& rViewShell,
60 View& rView) throw();
61 virtual ~SdUnoDrawView (void) throw();
63 // XSelectionSupplier
65 virtual sal_Bool SAL_CALL select (
66 const css::uno::Any& aSelection)
67 throw(css::lang::IllegalArgumentException,
68 css::uno::RuntimeException);
70 virtual css::uno::Any SAL_CALL getSelection (void)
71 throw(css::uno::RuntimeException);
73 virtual void SAL_CALL addSelectionChangeListener (
74 const css::uno::Reference<css::view::XSelectionChangeListener>& rxListener)
75 throw(css::uno::RuntimeException);
77 virtual void SAL_CALL removeSelectionChangeListener (
78 const css::uno::Reference<css::view::XSelectionChangeListener>& rxListener)
79 throw(css::uno::RuntimeException);
82 // XDrawView
84 virtual void SAL_CALL setCurrentPage (
85 const css::uno::Reference<css::drawing::XDrawPage >& xPage)
86 throw(css::uno::RuntimeException);
88 virtual css::uno::Reference<css::drawing::XDrawPage> SAL_CALL getCurrentPage (void)
89 throw(css::uno::RuntimeException);
92 // XFastPropertySet
94 virtual void SAL_CALL setFastPropertyValue (
95 sal_Int32 nHandle,
96 const css::uno::Any& rValue)
97 throw(css::beans::UnknownPropertyException,
98 css::beans::PropertyVetoException,
99 css::lang::IllegalArgumentException,
100 css::lang::WrappedTargetException,
101 css::uno::RuntimeException);
103 virtual css::uno::Any SAL_CALL getFastPropertyValue (
104 sal_Int32 nHandle)
105 throw(css::beans::UnknownPropertyException,
106 css::lang::WrappedTargetException,
107 css::uno::RuntimeException);
109 // XServiceInfo
110 virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
111 virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
112 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
114 protected:
115 sal_Bool getMasterPageMode(void) const throw();
116 void setMasterPageMode(sal_Bool MasterPageMode_) throw();
117 sal_Bool getLayerMode(void) const throw();
118 void setLayerMode(sal_Bool LayerMode_) throw();
120 /** Return a reference to the active layer object.
121 @return
122 The returned value may be empty when the internal state of this
123 view is not valid (like during destruction.)
125 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XLayer> getActiveLayer (void) throw ();
127 /** Make the specified object the active layer.
128 @param rxLayer
129 The new layer object.
131 void setActiveLayer (const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XLayer>& rxLayer) throw ();
133 void SetZoom( sal_Int16 nZoom );
134 sal_Int16 GetZoom(void) const;
136 void SetViewOffset(const com::sun::star::awt::Point& rWinPos );
137 com::sun::star::awt::Point GetViewOffset() const;
139 void SetZoomType( sal_Int16 nType );
141 ::com::sun::star::uno::Any getDrawViewMode() const;
143 private:
144 DrawController& mrController;
145 DrawViewShell& mrDrawViewShell;
146 sd::View& mrView;
148 SdXImpressDocument* GetModel (void) const throw();
151 } // end of namespace sd
153 #endif