summaryrefslogtreecommitdiff
path: root/sc/source/ui/inc/viewfunc.hxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-02-12 11:23:26 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-02-12 12:33:00 -0500
commit0585322e70d3c0f1d26d6bd9c04a388a1ff55abf (patch)
treebd206df6f4f80ab4ea461137deccb6887dc72777 /sc/source/ui/inc/viewfunc.hxx
parent117b3a13b82aaac0977fd17ee5b7b63204e659f4 (diff)
Go through all ScEditCell instantiations and fix memory leaks.
Changed the signature of the constructor (one that clones the text object) to take a reference instead of a pointer, to smoke out the callers that use this constructor. Went through all its callers and made changes to either 1) pass ownership to the cell instance (if the text object uses the SfxItemPool instance returned from ScDocument::GetEditPool()), or 2) pass as const reference to make it clear that the instance will get cloned. Change-Id: I669e066d4739536bf8d3b356186503dcdfa303b0
Diffstat (limited to 'sc/source/ui/inc/viewfunc.hxx')
-rw-r--r--sc/source/ui/inc/viewfunc.hxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index 057a74cf3a94..2ef5b44c02b4 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -81,10 +81,15 @@ public:
void EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString,
const EditTextObject* pData = NULL );
void EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
- const EditTextObject* pData, bool bTestSimple = false );
+ const EditTextObject& rData, bool bTestSimple = false );
void EnterValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rValue );
void EnterMatrix( const String& rString, ::formula::FormulaGrammar::Grammar eGram );
+
+ /**
+ * @param pData The caller must manage the life cycle of the object this
+ * pointer points to. NULL is allowed.
+ */
void EnterBlock( const String& rString, const EditTextObject* pData );
void EnterDataAtCursor( const String& rString ); //! Not used?