From e82f6024f3380403f858e58383bfa4e6540110ef Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 5 Dec 2013 09:16:22 +0100 Subject: [PATCH] -Werror=uninitialized Change-Id: I3ad9cad8a19eceec1b6a86a0210f4a6d0fa9bf0b --- sw/source/filter/ww8/wrtw8nds.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 6899165a7ea4..9fd7336c762b 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -393,7 +393,7 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bRuby ) const SvxFontItem &rParentFont = ItemGet( (const SwTxtFmtColl&)rNd.GetAnyFmtColl(), nFontId); const SvxFontItem *pFont = &rParentFont; - const SfxPoolItem *aGrabBag; + const SfxPoolItem *pGrabBag = 0; SfxItemSet aExportSet(*rNd.GetSwAttrSet().GetPool(), RES_CHRATR_BEGIN, RES_TXTATR_END - 1); @@ -438,7 +438,7 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bRuby ) if (nWhichId == nFontId) pFont = &(item_cast(*pItem)); else if (nWhichId == RES_CHRATR_GRABBAG) - aGrabBag = pItem; + pGrabBag = pItem; else aRangeItems[nWhichId] = pItem; } @@ -515,7 +515,8 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bRuby ) } // Output grab bag attributes - m_rExport.AttrOutput().OutputItem( *aGrabBag ); + if (pGrabBag) + m_rExport.AttrOutput().OutputItem( *pGrabBag ); } void SwWW8AttrIter::OutFlys(sal_Int32 nSwPos)