[Libreoffice-commits] .: writerperfect/source
Fridrich Strba
fridrich at kemper.freedesktop.org
Tue Sep 20 05:55:29 PDT 2011
writerperfect/source/filter/OdtGenerator.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit a93b298808635b2571f1e506a42fa1df0f2598c0
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Tue Sep 20 14:54:43 2011 +0200
A bit more defensive programming
diff --git a/writerperfect/source/filter/OdtGenerator.cxx b/writerperfect/source/filter/OdtGenerator.cxx
index 1e64a3b..8c12e6f 100644
--- a/writerperfect/source/filter/OdtGenerator.cxx
+++ b/writerperfect/source/filter/OdtGenerator.cxx
@@ -797,7 +797,7 @@ void OdtGenerator::defineOrderedListLevel(const WPXPropertyList &propList)
// and reach those levels. See gradguide0405_PC.wpd in the regression suite
for (std::vector<ListStyle *>::iterator iterOrderedListStyles = mpImpl->mListStyles.begin(); iterOrderedListStyles != mpImpl->mListStyles.end(); ++iterOrderedListStyles)
{
- if ((* iterOrderedListStyles)->getListID() == id)
+ if ((* iterOrderedListStyles) && (* iterOrderedListStyles)->getListID() == id && propList["libwpd:level"])
(* iterOrderedListStyles)->updateListLevel((propList["libwpd:level"]->getInt() - 1), propList);
}
}
@@ -825,7 +825,7 @@ void OdtGenerator::defineUnorderedListLevel(const WPXPropertyList &propList)
// See comment in OdtGenerator::defineOrderedListLevel
for (std::vector<ListStyle *>::iterator iterUnorderedListStyles = mpImpl->mListStyles.begin(); iterUnorderedListStyles != mpImpl->mListStyles.end(); ++iterUnorderedListStyles)
{
- if ((* iterUnorderedListStyles)->getListID() == id)
+ if ((* iterUnorderedListStyles) && (* iterUnorderedListStyles)->getListID() == id && propList["libwpd:level"])
(* iterUnorderedListStyles)->updateListLevel((propList["libwpd:level"]->getInt() - 1), propList);
}
}
More information about the Libreoffice-commits
mailing list