summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-09-01 14:06:07 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-09-01 14:48:50 -0400
commitb796e268630dd02f35a312b84867f63b3fa8da2f (patch)
tree218ea5a0c719585c0a0a5593dc1dafbf897abd16 /editeng
parent309c766d99cc7efc11fc439d119ba1944f2d710a (diff)
Fix a crash when inserting a multi-line content into cell.
Change-Id: Idf2b6ca6873860a9bb3d2dae646b0383435e58c9
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editdoc.cxx6
-rw-r--r--editeng/source/editeng/editdoc.hxx1
-rw-r--r--editeng/source/editeng/impedit4.cxx1
3 files changed, 8 insertions, 0 deletions
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 3fefacbccaa5..d0919806249f 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -1732,6 +1732,12 @@ sal_Unicode ContentNode::GetChar(sal_uInt16 nPos) const
return maString.GetChar(nPos);
}
+void ContentNode::EnsureWrongList()
+{
+ if (!mpWrongList)
+ CreateWrongList();
+}
+
WrongList* ContentNode::GetWrongList()
{
return mpWrongList.get();
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx
index b2928a60f5aa..3a4a4a042c56 100644
--- a/editeng/source/editeng/editdoc.hxx
+++ b/editeng/source/editeng/editdoc.hxx
@@ -283,6 +283,7 @@ public:
void CreateDefFont();
+ void EnsureWrongList();
WrongList* GetWrongList();
const WrongList* GetWrongList() const;
void SetWrongList( WrongList* p );
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 72bfa8959491..1b094f3dfaee 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -2285,6 +2285,7 @@ void ImpEditEngine::DoOnlineSpelling( ContentNode* pThisNodeOnly, bool bSpellAtC
if ( pThisNodeOnly )
pNode = pThisNodeOnly;
+ pNode->EnsureWrongList();
if (!pNode->GetWrongList()->IsValid())
{
WrongList* pWrongList = pNode->GetWrongList();