bump product version to 4.1.6.2
[LibreOffice.git] / sd / source / ui / inc / SdUnoDrawView.hxx
blob27935df07462754839fa73df8ee566f8654d3c59
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 #ifndef SD_UNO_DRAW_VIEW_HXX
21 #define SD_UNO_DRAW_VIEW_HXX
23 #include "DrawSubController.hxx"
24 #include "DrawViewShell.hxx"
25 #include <cppuhelper/basemutex.hxx>
27 class SdXImpressDocument;
29 namespace com { namespace sun { namespace star { namespace drawing {
30 class XLayer;
31 } } } }
33 namespace sd {
35 class DrawViewShell;
37 /** This class implements the DrawViewShell specific part of the controller.
39 class SdUnoDrawView
40 : private cppu::BaseMutex,
41 public DrawSubControllerInterfaceBase
43 public:
44 SdUnoDrawView (
45 DrawViewShell& rViewShell,
46 View& rView) throw();
47 virtual ~SdUnoDrawView (void) throw();
49 // XSelectionSupplier
51 virtual sal_Bool SAL_CALL select (
52 const css::uno::Any& aSelection)
53 throw(css::lang::IllegalArgumentException,
54 css::uno::RuntimeException);
56 virtual css::uno::Any SAL_CALL getSelection (void)
57 throw(css::uno::RuntimeException);
59 virtual void SAL_CALL addSelectionChangeListener (
60 const css::uno::Reference<css::view::XSelectionChangeListener>& rxListener)
61 throw(css::uno::RuntimeException);
63 virtual void SAL_CALL removeSelectionChangeListener (
64 const css::uno::Reference<css::view::XSelectionChangeListener>& rxListener)
65 throw(css::uno::RuntimeException);
68 // XDrawView
70 virtual void SAL_CALL setCurrentPage (
71 const css::uno::Reference<css::drawing::XDrawPage >& xPage)
72 throw(css::uno::RuntimeException);
74 virtual css::uno::Reference<css::drawing::XDrawPage> SAL_CALL getCurrentPage (void)
75 throw(css::uno::RuntimeException);
78 // XFastPropertySet
80 virtual void SAL_CALL setFastPropertyValue (
81 sal_Int32 nHandle,
82 const css::uno::Any& rValue)
83 throw(css::beans::UnknownPropertyException,
84 css::beans::PropertyVetoException,
85 css::lang::IllegalArgumentException,
86 css::lang::WrappedTargetException,
87 css::uno::RuntimeException);
89 virtual css::uno::Any SAL_CALL getFastPropertyValue (
90 sal_Int32 nHandle)
91 throw(css::beans::UnknownPropertyException,
92 css::lang::WrappedTargetException,
93 css::uno::RuntimeException);
95 // XServiceInfo
96 virtual OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
97 virtual ::sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
98 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
100 protected:
101 sal_Bool getMasterPageMode(void) const throw();
102 void setMasterPageMode(sal_Bool MasterPageMode_) throw();
103 sal_Bool getLayerMode(void) const throw();
104 void setLayerMode(sal_Bool LayerMode_) throw();
106 /** Return a reference to the active layer object.
107 @return
108 The returned value may be empty when the internal state of this
109 view is not valid (like during destruction.)
111 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XLayer> getActiveLayer (void) throw ();
113 /** Make the specified object the active layer.
114 @param rxLayer
115 The new layer object.
117 void setActiveLayer (const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XLayer>& rxLayer) throw ();
119 void SetZoom( sal_Int16 nZoom );
120 sal_Int16 GetZoom(void) const;
122 void SetViewOffset(const com::sun::star::awt::Point& rWinPos );
123 com::sun::star::awt::Point GetViewOffset() const;
125 void SetZoomType( sal_Int16 nType );
127 ::com::sun::star::uno::Any getDrawViewMode() const;
129 private:
130 DrawViewShell& mrDrawViewShell;
131 sd::View& mrView;
133 SdXImpressDocument* GetModel (void) const throw();
136 } // end of namespace sd
138 #endif
140 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */