bump product version to 4.2.0.1
[LibreOffice.git] / include / svx / unoshtxt.hxx
blob88972bd193c913ea72e9d621433e3e123e19b6d9
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_SVX_UNOSHTXT_HXX
21 #define INCLUDED_SVX_UNOSHTXT_HXX
23 #include <memory>
24 #include <editeng/unoedsrc.hxx>
25 #include <svx/svxdllapi.h>
27 namespace com { namespace sun { namespace star {
28 namespace uno {
29 class XInterface;
31 namespace accessibility {
32 struct TextSegment;
34 } } }
36 class SvxTextForwarder;
37 class SdrObject;
38 class SdrModel;
39 class SdrView;
40 class Window;
41 class SvxTextEditSourceImpl;
42 class SdrText;
44 class SVX_DLLPUBLIC SvxTextEditSource : public SvxEditSource, public SvxViewForwarder
46 public:
47 SvxTextEditSource( SdrObject* pObj, SdrText* pText, ::com::sun::star::uno::XInterface* pOwner);
49 /** Since the views don't broadcast their dying, make sure that
50 this object gets destroyed if the view becomes invalid
52 The window is necessary, since our views can display on multiple windows
54 SvxTextEditSource( SdrObject& rObj, SdrText* pText, SdrView& rView, const Window& rViewWindow );
56 virtual ~SvxTextEditSource();
58 virtual SvxEditSource* Clone() const;
59 virtual SvxTextForwarder* GetTextForwarder();
60 virtual SvxViewForwarder* GetViewForwarder();
61 virtual SvxEditViewForwarder* GetEditViewForwarder( sal_Bool bCreate = sal_False );
62 virtual void UpdateData();
64 virtual void addRange( SvxUnoTextRangeBase* pNewRange );
65 virtual void removeRange( SvxUnoTextRangeBase* pOldRange );
66 virtual const SvxUnoTextRangeBaseList& getRanges() const;
68 virtual SfxBroadcaster& GetBroadcaster() const;
70 void lock();
71 void unlock();
73 // the SvxViewForwarder interface
74 virtual sal_Bool IsValid() const;
75 virtual Rectangle GetVisArea() const;
76 virtual Point LogicToPixel( const Point&, const MapMode& ) const;
77 virtual Point PixelToLogic( const Point&, const MapMode& ) const;
79 void ChangeModel( SdrModel* pNewModel );
81 void UpdateOutliner();
83 private:
84 SVX_DLLPRIVATE SvxTextEditSource( SvxTextEditSourceImpl* pImpl );
86 SvxTextEditSourceImpl* mpImpl;
89 #endif
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */