summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-12-10 12:54:46 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-12-10 13:14:38 +0000
commite77c573811dd9d685f2e7e936edc62963739800f (patch)
treeedb729f302cd9c725c4d5be868131412a02e432a
parent1ecf9ed3fc33c984890848eacbecad5e009eb33d (diff)
fdo#76776 crashes after paste a table from Writer
Change-Id: If859352a7d8d409e5c3c651e0ffea0b3687007db
-rw-r--r--editeng/source/editeng/eertfpar.cxx7
-rw-r--r--include/svtools/rtftoken.h1
-rw-r--r--svtools/source/svrtf/rtfkeywd.cxx2
3 files changed, 10 insertions, 0 deletions
diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx
index 4eb6a03cca58..e3ab1dbe398f 100644
--- a/editeng/source/editeng/eertfpar.cxx
+++ b/editeng/source/editeng/eertfpar.cxx
@@ -197,6 +197,13 @@ void EditRTFParser::NextToken( int nToken )
ReadField();
}
break;
+ case RTF_SHPINST: // fdo#76776 process contents of shpinst
+ break;
+ case RTF_SP: // fdo#76776 but skip SP groups
+ {
+ SkipGroup();
+ }
+ break;
case RTF_PGDSCTBL: // #i29453# ignore \*\pgdsctbl destination
case RTF_LISTTEXT:
{
diff --git a/include/svtools/rtftoken.h b/include/svtools/rtftoken.h
index b799526e6d31..cb23f30ebf39 100644
--- a/include/svtools/rtftoken.h
+++ b/include/svtools/rtftoken.h
@@ -1100,6 +1100,7 @@ enum RTF_TOKEN_IDS {
RTF_SHPTXT,
RTF_SHPFHDR,
RTF_SHPGRP,
+ RTF_SHPINST,
RTF_SHPRIGHT,
RTF_SHPFBLWTXT,
RTF_SHPZ,
diff --git a/svtools/source/svrtf/rtfkeywd.cxx b/svtools/source/svrtf/rtfkeywd.cxx
index 18f7ad162fcc..ef032a547009 100644
--- a/svtools/source/svrtf/rtfkeywd.cxx
+++ b/svtools/source/svrtf/rtfkeywd.cxx
@@ -1000,6 +1000,7 @@ static RTF_TokenEntry aRTFTokenTab[] = {
{{OOO_STRING_SVTOOLS_RTF_SHPFBLWTXT}, RTF_SHPFBLWTXT},
{{OOO_STRING_SVTOOLS_RTF_SHPFHDR}, RTF_SHPFHDR},
{{OOO_STRING_SVTOOLS_RTF_SHPGRP}, RTF_SHPGRP},
+{{OOO_STRING_SVTOOLS_RTF_SHPINST}, RTF_SHPINST},
{{OOO_STRING_SVTOOLS_RTF_SHPLEFT}, RTF_SHPLEFT},
{{OOO_STRING_SVTOOLS_RTF_SHPLID}, RTF_SHPLID},
{{OOO_STRING_SVTOOLS_RTF_SHPLOCKANCHOR}, RTF_SHPLOCKANCHOR},
@@ -1227,6 +1228,7 @@ int GetRTFToken( const OUString& rSearch )
sizeof( RTF_TokenEntry ),
RTFKeyCompare )))
nRet = ((RTF_TokenEntry*)pFound)->nToken;
+
return nRet;
}