[Libreoffice-commits] .: src/lib
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Feb 12 00:28:07 PST 2013
src/lib/MSPUBCollector.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 9d110f9105a08934f9e6343ac6c282f5808342c8
Author: Brennan Vincent <brennan.vincent at gmail.com>
Date: Sun Feb 3 09:13:39 2013 -0700
Default to first default character style if none specified (cf: TS102911911.pub)
diff --git a/src/lib/MSPUBCollector.cpp b/src/lib/MSPUBCollector.cpp
index ad3006a..bceb8f4 100644
--- a/src/lib/MSPUBCollector.cpp
+++ b/src/lib/MSPUBCollector.cpp
@@ -1179,7 +1179,11 @@ WPXPropertyList libmspub::MSPUBCollector::getParaStyleProps(const ParagraphStyle
WPXPropertyList libmspub::MSPUBCollector::getCharStyleProps(const CharacterStyle &style, boost::optional<unsigned> defaultCharStyleIndex) const
{
CharacterStyle _nothing = CharacterStyle(false, false, false);
- const CharacterStyle &defaultCharStyle = defaultCharStyleIndex.is_initialized() && defaultCharStyleIndex.get() < m_defaultCharStyles.size() ? m_defaultCharStyles[defaultCharStyleIndex.get()] : _nothing;
+ if (!defaultCharStyleIndex.is_initialized())
+ {
+ defaultCharStyleIndex = 0;
+ }
+ const CharacterStyle &defaultCharStyle = defaultCharStyleIndex.get() < m_defaultCharStyles.size() ? m_defaultCharStyles[defaultCharStyleIndex.get()] : _nothing;
WPXPropertyList ret;
if (style.italic ^ defaultCharStyle.italic)
{
More information about the Libreoffice-commits
mailing list