LibreOffice Module sc (master) 1
editsrc.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include "address.hxx"
23#include <editeng/unoedsrc.hxx>
24#include <svl/lstner.hxx>
25
26#include <memory>
27
30
31class ScDocShell;
32class ScCellTextData;
35class SdrObject;
36
38{
39public:
41};
42
50{
51private:
53
54public:
56 virtual ~ScHeaderFooterEditSource() override;
57
58 // GetEditEngine is needed because the forwarder doesn't have field functions
59 virtual ScEditEngineDefaulter* GetEditEngine() override;
60
61 virtual std::unique_ptr<SvxEditSource> Clone() const override;
62 virtual SvxTextForwarder* GetTextForwarder() override;
63 virtual void UpdateData() override;
64};
65
73class ScCellEditSource final : public ScEditSource
74{
75private:
76 std::unique_ptr<ScCellTextData> pCellTextData;
77
78public:
79 ScCellEditSource(ScDocShell* pDocSh, const ScAddress& rP);
80 virtual ~ScCellEditSource() override;
81
82 // GetEditEngine is needed because the forwarder doesn't have field functions
83 virtual ScEditEngineDefaulter* GetEditEngine() override;
84
85 virtual std::unique_ptr<SvxEditSource> Clone() const override;
86 virtual SvxTextForwarder* GetTextForwarder() override;
87
88 virtual void UpdateData() override;
89
90 void SetDoUpdateData(bool bValue);
91 bool IsDirty() const;
92};
93
95{
96private:
99 std::unique_ptr<ScEditEngineDefaulter> pEditEngine;
100 std::unique_ptr<SvxEditEngineForwarder> pForwarder;
102
104public:
105 ScAnnotationEditSource(ScDocShell* pDocSh, const ScAddress& rP);
106 virtual ~ScAnnotationEditSource() override;
107
108 virtual std::unique_ptr<SvxEditSource> Clone() const override ;
109 virtual SvxTextForwarder* GetTextForwarder() override;
110 virtual void UpdateData() override;
111
112 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
113};
114
115// EditSource with a shared forwarder for all children of one text object
116
118{
119private:
121
122public:
124 virtual ~ScSimpleEditSource() override;
125
126 virtual std::unique_ptr<SvxEditSource> Clone() const override ;
127 virtual SvxTextForwarder* GetTextForwarder() override;
128 virtual void UpdateData() override;
129
130};
131
133{
134private:
135 ::std::unique_ptr < ScAccessibleTextData > mpAccessibleTextData;
136
137public:
138 ScAccessibilityEditSource( ::std::unique_ptr < ScAccessibleTextData > && pAccessibleCellTextData );
139 virtual ~ScAccessibilityEditSource() override;
140
141 virtual std::unique_ptr<SvxEditSource> Clone() const override;
142 virtual SvxTextForwarder* GetTextForwarder() override;
143 virtual SvxViewForwarder* GetViewForwarder() override;
144 virtual SvxEditViewForwarder* GetEditViewForwarder( bool bCreate = false ) override;
145 virtual void UpdateData() override;
146 virtual SfxBroadcaster& GetBroadcaster() const override;
147};
148
149/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual SvxTextForwarder * GetTextForwarder() override
Definition: editsrc.cxx:247
virtual std::unique_ptr< SvxEditSource > Clone() const override
Definition: editsrc.cxx:242
virtual SvxEditViewForwarder * GetEditViewForwarder(bool bCreate=false) override
Definition: editsrc.cxx:257
::std::unique_ptr< ScAccessibleTextData > mpAccessibleTextData
Definition: editsrc.hxx:135
virtual ~ScAccessibilityEditSource() override
Definition: editsrc.cxx:238
virtual SvxViewForwarder * GetViewForwarder() override
Definition: editsrc.cxx:252
ScAccessibilityEditSource(::std::unique_ptr< ScAccessibleTextData > &&pAccessibleCellTextData)
Definition: editsrc.cxx:233
virtual void UpdateData() override
Definition: editsrc.cxx:262
virtual SfxBroadcaster & GetBroadcaster() const override
Definition: editsrc.cxx:267
virtual SvxTextForwarder * GetTextForwarder() override
Definition: editsrc.cxx:133
virtual std::unique_ptr< SvxEditSource > Clone() const override
Definition: editsrc.cxx:122
ScDocShell * pDocShell
Definition: editsrc.hxx:97
virtual void UpdateData() override
Definition: editsrc.cxx:163
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: editsrc.cxx:185
std::unique_ptr< ScEditEngineDefaulter > pEditEngine
Definition: editsrc.hxx:99
virtual ~ScAnnotationEditSource() override
Definition: editsrc.cxx:111
std::unique_ptr< SvxEditEngineForwarder > pForwarder
Definition: editsrc.hxx:100
SdrObject * GetCaptionObj()
Definition: editsrc.cxx:127
ScAnnotationEditSource(ScDocShell *pDocSh, const ScAddress &rP)
Definition: editsrc.cxx:102
Data (incl.
Definition: editsrc.hxx:74
virtual std::unique_ptr< SvxEditSource > Clone() const override
Definition: editsrc.cxx:72
ScCellEditSource(ScDocShell *pDocSh, const ScAddress &rP)
Definition: editsrc.cxx:65
bool IsDirty() const
Definition: editsrc.cxx:92
std::unique_ptr< ScCellTextData > pCellTextData
Definition: editsrc.hxx:76
virtual void UpdateData() override
Definition: editsrc.cxx:82
virtual ScEditEngineDefaulter * GetEditEngine() override
Definition: editsrc.cxx:97
virtual ~ScCellEditSource() override
Definition: editsrc.cxx:68
virtual SvxTextForwarder * GetTextForwarder() override
Definition: editsrc.cxx:77
void SetDoUpdateData(bool bValue)
Definition: editsrc.cxx:87
virtual ScEditEngineDefaulter * GetEditEngine()=0
ScHeaderFooterTextObj keeps the authoritative copy of ScHeaderFooterTextData that this class holds re...
Definition: editsrc.hxx:50
virtual SvxTextForwarder * GetTextForwarder() override
Definition: editsrc.cxx:55
ScHeaderFooterEditSource(ScHeaderFooterTextData &rData)
Definition: editsrc.cxx:40
virtual ScEditEngineDefaulter * GetEditEngine() override
Definition: editsrc.cxx:45
virtual void UpdateData() override
Definition: editsrc.cxx:60
virtual std::unique_ptr< SvxEditSource > Clone() const override
Definition: editsrc.cxx:50
ScHeaderFooterTextData & mrTextData
Definition: editsrc.hxx:52
virtual ~ScHeaderFooterEditSource() override
Definition: editsrc.cxx:43
virtual ~ScSimpleEditSource() override
Definition: editsrc.cxx:214
SvxTextForwarder * pForwarder
Definition: editsrc.hxx:120
ScSimpleEditSource(SvxTextForwarder *pForw)
Definition: editsrc.cxx:206
virtual SvxTextForwarder * GetTextForwarder() override
Definition: editsrc.cxx:223
virtual std::unique_ptr< SvxEditSource > Clone() const override
Definition: editsrc.cxx:218
virtual void UpdateData() override
Definition: editsrc.cxx:228