From 20fd76c5712bfa2a4ae1ffe490788a2b63163267 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Thu, 7 Jun 2001 18:06:48 +0000 Subject: #79771# share EditEngine between child objects of cell text --- sc/inc/textuno.hxx | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) (limited to 'sc/inc/textuno.hxx') diff --git a/sc/inc/textuno.hxx b/sc/inc/textuno.hxx index 74596e01a605..0b3a502c9ee6 100644 --- a/sc/inc/textuno.hxx +++ b/sc/inc/textuno.hxx @@ -2,9 +2,9 @@ * * $RCSfile: textuno.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: nn $ $Date: 2001-02-15 18:05:39 $ + * last change: $Author: nn $ $Date: 2001-06-07 19:05:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -62,6 +62,10 @@ #ifndef SC_TEXTSUNO_HXX #define SC_TEXTSUNO_HXX +#ifndef SC_SCGLOB_HXX +#include "global.hxx" // ScRange, ScAddress +#endif + #ifndef _SVX_UNOTEXT_HXX #include #endif @@ -69,6 +73,9 @@ #ifndef _SFXBRDCST_HXX #include #endif +#ifndef _SFXLSTNER_HXX +#include +#endif #ifndef _COM_SUN_STAR_TEXT_XTEXTFIELDSSUPPLIER_HPP_ #include @@ -98,6 +105,7 @@ class ScDocShell; class ScAddress; class ScCellObj; class ScSimpleEditSource; +class ScSharedCellEditSource; class ScEditEngineDefaulter; struct ScHeaderFieldData; @@ -352,5 +360,43 @@ public: }; +// ScCellTextData: shared data between sub objects of a cell text object + +class ScCellTextData : public SfxListener +{ + ScDocShell* pDocShell; + ScAddress aCellPos; + ScEditEngineDefaulter* pEditEngine; + SvxEditEngineForwarder* pForwarder; + BOOL bDataValid; + BOOL bInUpdate; + ScSharedCellEditSource* pOriginalSource; + +public: + ScCellTextData(ScDocShell* pDocSh, const ScAddress& rP); + virtual ~ScCellTextData(); + + virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); + + // helper functions for ScSharedCellEditSource: + SvxTextForwarder* GetTextForwarder(); + void UpdateData(); + ScEditEngineDefaulter* GetEditEngine() { GetTextForwarder(); return pEditEngine; } + + ScSharedCellEditSource* GetOriginalSource(); // used as argument for SvxUnoText ctor + + // used for ScCellEditSource: + ScDocShell* GetDocShell() const { return pDocShell; } + const ScAddress& GetCellPos() const { return aCellPos; } +}; + +class ScCellTextObj : public ScCellTextData, public SvxUnoText +{ +public: + ScCellTextObj(ScDocShell* pDocSh, const ScAddress& rP); + virtual ~ScCellTextObj(); +}; + + #endif -- cgit