summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/wrtw8nds.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/ww8/wrtw8nds.cxx')
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx56
1 files changed, 28 insertions, 28 deletions
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 86e884fc8794..2e19f4e5bae6 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -555,45 +555,45 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bWriteCombChars)
void SwWW8AttrIter::handleToggleProperty(SfxItemSet& rExportSet, const SwFormatCharFormat* pCharFormatItem,
sal_uInt16 nWhich, const SfxPoolItem* pValue)
{
- if (!rExportSet.HasItem(nWhich) && pValue)
- {
- bool hasPropertyInCharStyle = false;
- bool hasPropertyInParaStyle = false;
+ if (!(!rExportSet.HasItem(nWhich) && pValue))
+ return;
- // get bold flag from specified character style
- if (pCharFormatItem)
+ bool hasPropertyInCharStyle = false;
+ bool hasPropertyInParaStyle = false;
+
+ // get bold flag from specified character style
+ if (pCharFormatItem)
+ {
+ if (const SwCharFormat* pCharFormat = pCharFormatItem->GetCharFormat())
{
- if (const SwCharFormat* pCharFormat = pCharFormatItem->GetCharFormat())
+ const SfxPoolItem* pItem = nullptr;
+ if (pCharFormat->GetAttrSet().HasItem(nWhich, &pItem))
{
- const SfxPoolItem* pItem = nullptr;
- if (pCharFormat->GetAttrSet().HasItem(nWhich, &pItem))
- {
- hasPropertyInCharStyle = (*pItem == *pValue);
- }
+ hasPropertyInCharStyle = (*pItem == *pValue);
}
}
+ }
- // get bold flag from specified paragraph style
+ // get bold flag from specified paragraph style
+ {
+ SwTextFormatColl& rTextColl = static_cast<SwTextFormatColl&>( rNd.GetAnyFormatColl() );
+ sal_uInt16 nStyle = m_rExport.m_pStyles->GetSlot( &rTextColl );
+ nStyle = ( nStyle != 0xfff ) ? nStyle : 0;
+ const SwFormat* pFormat = m_rExport.m_pStyles->GetSwFormat(nStyle);
+ if (pFormat)
{
- SwTextFormatColl& rTextColl = static_cast<SwTextFormatColl&>( rNd.GetAnyFormatColl() );
- sal_uInt16 nStyle = m_rExport.m_pStyles->GetSlot( &rTextColl );
- nStyle = ( nStyle != 0xfff ) ? nStyle : 0;
- const SwFormat* pFormat = m_rExport.m_pStyles->GetSwFormat(nStyle);
- if (pFormat)
+ const SfxPoolItem* pItem = nullptr;
+ if (pFormat->GetAttrSet().HasItem(nWhich, &pItem))
{
- const SfxPoolItem* pItem = nullptr;
- if (pFormat->GetAttrSet().HasItem(nWhich, &pItem))
- {
- hasPropertyInParaStyle = (*pItem == *pValue);
- }
+ hasPropertyInParaStyle = (*pItem == *pValue);
}
}
+ }
- // add inline property
- if (hasPropertyInCharStyle && hasPropertyInParaStyle)
- {
- rExportSet.Put(*pValue);
- }
+ // add inline property
+ if (hasPropertyInCharStyle && hasPropertyInParaStyle)
+ {
+ rExportSet.Put(*pValue);
}
}