diff options
author | Sascha Ballach <sab@openoffice.org> | 2002-10-01 15:33:47 +0000 |
---|---|---|
committer | Sascha Ballach <sab@openoffice.org> | 2002-10-01 15:33:47 +0000 |
commit | 338f626b0203b30f607a9e8deec586fe9babf50f (patch) | |
tree | d1494144dd58c109251ea9a3f19f887d5af86810 | |
parent | 0316f45d28bbf06bb92b792108fef9e3168b0d77 (diff) |
#103902#; add virtual method to get the text of the cell
-rw-r--r-- | sc/inc/textuno.hxx | 7 | ||||
-rw-r--r-- | sc/source/ui/unoobj/textuno.cxx | 15 |
2 files changed, 17 insertions, 5 deletions
diff --git a/sc/inc/textuno.hxx b/sc/inc/textuno.hxx index 76f4198f1d45..dabbac583c52 100644 --- a/sc/inc/textuno.hxx +++ b/sc/inc/textuno.hxx @@ -2,9 +2,9 @@ * * $RCSfile: textuno.hxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: sab $ $Date: 2002-03-01 08:33:18 $ + * last change: $Author: sab $ $Date: 2002-10-01 16:33:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -405,6 +405,9 @@ protected: BOOL bDirty; BOOL bDoUpdate; +protected: + virtual void GetCellText(const ScAddress& rCellPos, String& rText); + public: ScCellTextData(ScDocShell* pDocSh, const ScAddress& rP); virtual ~ScCellTextData(); diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx index 2c45cd151251..e59506407f6b 100644 --- a/sc/source/ui/unoobj/textuno.cxx +++ b/sc/source/ui/unoobj/textuno.cxx @@ -2,9 +2,9 @@ * * $RCSfile: textuno.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: sab $ $Date: 2002-03-04 14:06:48 $ + * last change: $Author: sab $ $Date: 2002-10-01 16:33:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -975,6 +975,15 @@ ScSharedCellEditSource* ScCellTextData::GetOriginalSource() return pOriginalSource; } +void ScCellTextData::GetCellText(const ScAddress& rCellPos, String& rText) +{ + if (pDocShell) + { + ScDocument* pDoc = pDocShell->GetDocument(); + pDoc->GetInputString( rCellPos.Col(), rCellPos.Row(), rCellPos.Tab(), rText ); + } +} + SvxTextForwarder* ScCellTextData::GetTextForwarder() { if (!pEditEngine) @@ -1023,7 +1032,7 @@ SvxTextForwarder* ScCellTextData::GetTextForwarder() pEditEngine->SetTextNewDefaults( *((const ScEditCell*)pCell)->GetData(), aDefaults ); else { - pDoc->GetInputString( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab(), aText ); + GetCellText( aCellPos, aText ); if (aText.Len()) pEditEngine->SetTextNewDefaults( aText, aDefaults ); else |