1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
24 #include <editeng/unoedsrc.hxx>
25 #include <svx/svxdllapi.h>
27 namespace com
{ namespace sun
{ namespace star
{
31 namespace accessibility
{
36 class SvxTextForwarder
;
40 namespace vcl
{ class Window
; }
41 class SvxTextEditSourceImpl
;
44 class SVX_DLLPUBLIC SvxTextEditSource
: public SvxEditSource
, public SvxViewForwarder
47 SvxTextEditSource( SdrObject
* pObj
, SdrText
* pText
);
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 vcl::Window
& rViewWindow
);
55 SvxTextEditSource(const SvxTextEditSource
&) = delete;
56 SvxTextEditSource
& operator=(const SvxTextEditSource
&) = delete;
57 virtual ~SvxTextEditSource() override
;
59 virtual SvxEditSource
* Clone() const override
;
60 virtual SvxTextForwarder
* GetTextForwarder() override
;
61 virtual SvxViewForwarder
* GetViewForwarder() override
;
62 virtual SvxEditViewForwarder
* GetEditViewForwarder( bool bCreate
= false ) override
;
63 virtual void UpdateData() override
;
65 virtual void addRange( SvxUnoTextRangeBase
* pNewRange
) override
;
66 virtual void removeRange( SvxUnoTextRangeBase
* pOldRange
) override
;
67 virtual const SvxUnoTextRangeBaseList
& getRanges() const override
;
69 virtual SfxBroadcaster
& GetBroadcaster() const override
;
74 // the SvxViewForwarder interface
75 virtual bool IsValid() const override
;
76 virtual tools::Rectangle
GetVisArea() const override
;
77 virtual Point
LogicToPixel( const Point
&, const MapMode
& ) const override
;
78 virtual Point
PixelToLogic( const Point
&, const MapMode
& ) const override
;
80 void ChangeModel( SdrModel
* pNewModel
);
82 void UpdateOutliner();
85 SVX_DLLPRIVATE
SvxTextEditSource( SvxTextEditSourceImpl
* pImpl
);
87 rtl::Reference
<SvxTextEditSourceImpl
> mpImpl
;
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */