bump product version to 5.0.4.1
[LibreOffice.git] / sd / source / ui / inc / SdUnoDrawView.hxx
blob6a9ae21c83a821e27b42d56d2352d7db909ae8d9
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 INCLUDED_SD_SOURCE_UI_INC_SDUNODRAWVIEW_HXX
21 #define INCLUDED_SD_SOURCE_UI_INC_SDUNODRAWVIEW_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() 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,
55 std::exception) SAL_OVERRIDE;
57 virtual css::uno::Any SAL_CALL getSelection()
58 throw (css::uno::RuntimeException,
59 std::exception) SAL_OVERRIDE;
61 virtual void SAL_CALL addSelectionChangeListener (
62 const css::uno::Reference<css::view::XSelectionChangeListener>& rxListener)
63 throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
65 virtual void SAL_CALL removeSelectionChangeListener (
66 const css::uno::Reference<css::view::XSelectionChangeListener>& rxListener)
67 throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
69 // XDrawView
71 virtual void SAL_CALL setCurrentPage (
72 const css::uno::Reference<css::drawing::XDrawPage >& xPage)
73 throw (css::uno::RuntimeException,
74 std::exception) SAL_OVERRIDE;
76 virtual css::uno::Reference<css::drawing::XDrawPage> SAL_CALL getCurrentPage()
77 throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
79 // XFastPropertySet
81 virtual void SAL_CALL setFastPropertyValue (
82 sal_Int32 nHandle,
83 const css::uno::Any& rValue)
84 throw(css::beans::UnknownPropertyException,
85 css::beans::PropertyVetoException,
86 css::lang::IllegalArgumentException,
87 css::lang::WrappedTargetException,
88 css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
90 virtual css::uno::Any SAL_CALL getFastPropertyValue (
91 sal_Int32 nHandle)
92 throw(css::beans::UnknownPropertyException,
93 css::lang::WrappedTargetException,
94 css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
96 // XServiceInfo
97 virtual OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
98 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
99 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
101 protected:
102 bool getMasterPageMode() const throw();
103 void setMasterPageMode(bool MasterPageMode_) throw();
104 bool getLayerMode() const throw();
105 void setLayerMode(bool LayerMode_) throw();
106 public:
107 /** Return a reference to the active layer object.
108 @return
109 The returned value may be empty when the internal state of this
110 view is not valid (like during destruction.)
112 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XLayer> getActiveLayer() throw ();
113 protected:
114 /** Make the specified object the active layer.
115 @param rxLayer
116 The new layer object.
118 void setActiveLayer (const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XLayer>& rxLayer) throw (css::uno::RuntimeException);
120 void SetZoom( sal_Int16 nZoom );
121 sal_Int16 GetZoom() const;
123 void SetViewOffset(const com::sun::star::awt::Point& rWinPos );
124 com::sun::star::awt::Point GetViewOffset() const;
126 void SetZoomType( sal_Int16 nType );
128 ::com::sun::star::uno::Any getDrawViewMode() const;
130 private:
131 DrawViewShell& mrDrawViewShell;
132 sd::View& mrView;
134 SdXImpressDocument* GetModel() const throw();
137 } // end of namespace sd
139 #endif
141 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */