summaryrefslogtreecommitdiff
path: root/sw/source/core/txtnode/ndtxt.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-06-11 15:24:40 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-06-11 15:45:23 +0200
commita1762795e7c758bc55cfba039e280273a4f26cc5 (patch)
treebd04706bc759c397100dde8e9d304ea8bd3966a1 /sw/source/core/txtnode/ndtxt.cxx
parenteb5e3e3a4e82a55abfb1894dead6a1fb3c10bb41 (diff)
abi#3241 fix crash on RTF import
The problem was that SwTxtFmtColl::IsAssignedToListLevelOfOutlineStyle() returned true, because the style name started with "header". However, there were no real assignment, so SwTxtFmtColl::GetAssignedOutlineStyleLevel() returned -1 later, which resulted in a (valid) assertion failure. Fix this by handling -1 outline level as not assigned. Change-Id: I522f75002cf064ce7bc4da949683ac4e5ff4ec72
Diffstat (limited to 'sw/source/core/txtnode/ndtxt.cxx')
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 07f36ef82d06..8d4cdaf2f831 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1067,7 +1067,7 @@ void SwTxtNode::_ChgTxtCollUpdateNum( const SwTxtFmtColl *pOldColl,
const int nNewLevel = pNewColl && pNewColl->IsAssignedToListLevelOfOutlineStyle() ?
pNewColl->GetAssignedOutlineStyleLevel() : MAXLEVEL;
- if ( MAXLEVEL != nNewLevel )
+ if ( MAXLEVEL != nNewLevel && -1 != nNewLevel )
{
SetAttrListLevel(nNewLevel);
}