Lines 747-753
Link Here
|
747 |
bNeedListening( sal_False ), |
747 |
bNeedListening( sal_False ), |
748 |
aPos( rPos ) |
748 |
aPos( rPos ) |
749 |
{ |
749 |
{ |
750 |
pCode = rCell.pCode->Clone(); |
750 |
pCode = (rCell.pCode) ? (rCell.pCode->Clone()) : NULL; |
751 |
|
751 |
|
752 |
if ( nCloneFlags & SC_CLONECELL_ADJUST3DREL ) |
752 |
if ( nCloneFlags & SC_CLONECELL_ADJUST3DREL ) |
753 |
pCode->ReadjustRelative3DReferences( rCell.aPos, aPos ); |
753 |
pCode->ReadjustRelative3DReferences( rCell.aPos, aPos ); |
Lines 912-918
Link Here
|
912 |
void ScFormulaCell::Compile( const String& rFormula, sal_Bool bNoListening, |
912 |
void ScFormulaCell::Compile( const String& rFormula, sal_Bool bNoListening, |
913 |
const FormulaGrammar::Grammar eGrammar ) |
913 |
const FormulaGrammar::Grammar eGrammar ) |
914 |
{ |
914 |
{ |
915 |
if ( pDocument->IsClipOrUndo() ) return; |
915 |
if ( pDocument->IsClipOrUndo() && (pCode != NULL) ) |
|
|
916 |
{ |
917 |
// the initialization for pCode should not be ignored! |
918 |
return; |
919 |
} |
920 |
|
916 |
sal_Bool bWasInFormulaTree = pDocument->IsInFormulaTree( this ); |
921 |
sal_Bool bWasInFormulaTree = pDocument->IsInFormulaTree( this ); |
917 |
if ( bWasInFormulaTree ) |
922 |
if ( bWasInFormulaTree ) |
918 |
pDocument->RemoveFromFormulaTree( this ); |
923 |
pDocument->RemoveFromFormulaTree( this ); |