merge the formfield patch from ooo-build
[ooovba.git] / sd / source / ui / unoidl / unovwcrs.cxx
blobc4ce12fcedbaced5c861bef66a39252a88ee5a76
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: unovwcrs.cxx,v $
10 * $Revision: 1.10 $
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 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_sd.hxx"
33 #include <com/sun/star/text/XTextViewCursor.hpp>
34 #include <com/sun/star/view/XScreenCursor.hpp>
35 #include <sfx2/request.hxx>
36 #include <vos/mutex.hxx>
37 #include "View.hxx"
38 #ifndef SVX_LIGHT
39 #ifndef SD_DRAW_DOC_SHELL_HXX
40 #include "DrawDocShell.hxx"
41 #endif
42 #endif
43 #include "ViewShell.hxx"
44 #include "slideshow.hxx"
46 #include <cppuhelper/implbase2.hxx>
47 #include <vcl/svapp.hxx>
49 using namespace ::vos;
50 using namespace ::rtl;
51 using namespace ::com::sun::star;
53 class SdXTextViewCursor
54 : public ::cppu::WeakImplHelper2<
55 text::XTextViewCursor,
56 view::XScreenCursor >
58 public:
59 SdXTextViewCursor(::sd::View* pVw) throw();
60 virtual ~SdXTextViewCursor() throw();
62 //XTextViewCursor
63 virtual sal_Bool SAL_CALL isVisible(void) throw( uno::RuntimeException );
64 virtual void SAL_CALL setVisible(sal_Bool bVisible) throw( uno::RuntimeException );
65 virtual awt::Point SAL_CALL getPosition(void) throw( uno::RuntimeException );
67 //XTextCursor
68 virtual void SAL_CALL collapseToStart(void) throw( uno::RuntimeException );
69 virtual void SAL_CALL collapseToEnd(void) throw( uno::RuntimeException );
70 virtual sal_Bool SAL_CALL isCollapsed(void) throw( uno::RuntimeException );
71 virtual sal_Bool SAL_CALL goLeft(sal_Int16 nCount, sal_Bool Expand) throw( uno::RuntimeException );
72 virtual sal_Bool SAL_CALL goRight(sal_Int16 nCount, sal_Bool Expand) throw( uno::RuntimeException );
73 virtual void SAL_CALL gotoStart(sal_Bool Expand) throw( uno::RuntimeException );
74 virtual void SAL_CALL gotoEnd(sal_Bool Expand) throw( uno::RuntimeException );
75 virtual void SAL_CALL gotoRange(const uno::Reference< text::XTextRange > & rRange, sal_Bool bExpand ) throw (::com::sun::star::uno::RuntimeException);
77 //XTextRange
78 virtual uno::Reference< text::XText > SAL_CALL getText(void) throw( uno::RuntimeException );
79 virtual uno::Reference< text::XTextRange > SAL_CALL getStart(void) throw( uno::RuntimeException );
80 virtual uno::Reference< text::XTextRange > SAL_CALL getEnd(void) throw( uno::RuntimeException );
81 virtual OUString SAL_CALL getString(void) throw( uno::RuntimeException );
82 virtual void SAL_CALL setString(const OUString& aString) throw( uno::RuntimeException );
84 //XScreenCursor
85 virtual sal_Bool SAL_CALL screenDown(void) throw( uno::RuntimeException );
86 virtual sal_Bool SAL_CALL screenUp(void) throw( uno::RuntimeException );
88 void Invalidate() { mpView = 0; }
90 private:
91 ::sd::View* mpView;
95 text::XTextViewCursor* CreateSdXTextViewCursor(::sd::View* mpView )
97 return new SdXTextViewCursor( mpView );
100 SdXTextViewCursor::SdXTextViewCursor(::sd::View* pSdView ) throw()
101 : mpView(pSdView)
106 SdXTextViewCursor::~SdXTextViewCursor() throw()
110 sal_Bool SdXTextViewCursor::isVisible(void) throw( uno::RuntimeException )
112 DBG_WARNING("not implemented");
113 return sal_True;
116 void SdXTextViewCursor::setVisible(sal_Bool ) throw( uno::RuntimeException )
118 DBG_WARNING("not implemented");
121 awt::Point SdXTextViewCursor::getPosition(void) throw( uno::RuntimeException )
123 DBG_WARNING("not implemented");
124 return awt::Point();
127 void SdXTextViewCursor::collapseToStart(void) throw( uno::RuntimeException )
129 DBG_WARNING("not implemented");
132 void SdXTextViewCursor::collapseToEnd(void) throw( uno::RuntimeException )
134 DBG_WARNING("not implemented");
137 sal_Bool SdXTextViewCursor::isCollapsed(void) throw( uno::RuntimeException )
139 DBG_WARNING("not implemented");
140 return sal_True;
144 sal_Bool SdXTextViewCursor::goLeft(sal_Int16 , sal_Bool ) throw( uno::RuntimeException )
146 DBG_WARNING("not implemented");
147 return sal_False;
150 sal_Bool SdXTextViewCursor::goRight(sal_Int16, sal_Bool ) throw( uno::RuntimeException )
152 DBG_WARNING("not implemented");
153 return sal_False;
156 void SdXTextViewCursor::gotoRange(const uno::Reference< text::XTextRange > &, sal_Bool ) throw (::com::sun::star::uno::RuntimeException)
158 DBG_WARNING("not implemented");
161 void SdXTextViewCursor::gotoStart(sal_Bool ) throw( uno::RuntimeException )
163 DBG_WARNING("not implemented");
166 void SdXTextViewCursor::gotoEnd(sal_Bool ) throw( uno::RuntimeException )
168 DBG_WARNING("not implemented");
171 sal_Bool SdXTextViewCursor::screenDown(void) throw( uno::RuntimeException )
173 OGuard aGuard(Application::GetSolarMutex());
174 return sal_False;
177 sal_Bool SdXTextViewCursor::screenUp(void) throw( uno::RuntimeException )
179 OGuard aGuard(Application::GetSolarMutex());
180 return sal_False;
183 uno::Reference< text::XText > SdXTextViewCursor::getText(void) throw( uno::RuntimeException )
185 DBG_WARNING("not implemented");
186 return uno::Reference< text::XText > ();
189 uno::Reference< text::XTextRange > SdXTextViewCursor::getStart(void) throw( uno::RuntimeException )
191 DBG_WARNING("not implemented");
192 return uno::Reference< text::XTextRange > ();
195 uno::Reference< text::XTextRange > SdXTextViewCursor::getEnd(void) throw( uno::RuntimeException )
197 DBG_WARNING("not implemented");
198 return uno::Reference< text::XTextRange > ();
201 OUString SdXTextViewCursor::getString(void) throw( uno::RuntimeException )
203 DBG_WARNING("not implemented");
204 return OUString();
207 void SdXTextViewCursor::setString(const OUString& ) throw( uno::RuntimeException )
209 DBG_WARNING("not implemented");