diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-23 15:27:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-24 07:58:51 +0100 |
commit | 35f5274ece0fcbb70753a71619b526ed0d4cbd6b (patch) | |
tree | 65ca5922a2d39b926e3ad219888afc04f96eeab9 /sw/source/filter/ww8/rtfexport.cxx | |
parent | 50915bababcf6b645fe3b57c265560a3cd0c6224 (diff) |
TypedWhichId for RES_CHRATR constants
Change-Id: Id6c45c237e9c8c55597d97b647b443eab9d1880a
Reviewed-on: https://gerrit.libreoffice.org/45147
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/ww8/rtfexport.cxx')
-rw-r--r-- | sw/source/filter/ww8/rtfexport.cxx | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index e4e51b6a23b4..779719756a85 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -669,8 +669,7 @@ void RtfExport::ExportDocument_Impl() .WriteChar('1') .WriteCharPtr(OOO_STRING_SVTOOLS_RTF_ANSI); Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_DEFF); - OutULong(m_aFontHelper.GetId( - static_cast<const SvxFontItem&>(m_pDoc->GetAttrPool().GetDefaultItem(RES_CHRATR_FONT)))); + OutULong(m_aFontHelper.GetId(m_pDoc->GetAttrPool().GetDefaultItem(RES_CHRATR_FONT))); // If this not exist, MS don't understand our ansi characters (0x80-0xff). Strm().WriteCharPtr("\\adeflang1025"); @@ -1174,15 +1173,12 @@ void RtfExport::OutColorTable() { auto pCol = static_cast<const SvxColorItem*>(GetDfltAttr(RES_CHRATR_COLOR)); InsColor(pCol->GetValue()); - if (nullptr - != (pCol - = static_cast<const SvxColorItem*>(rPool.GetPoolDefaultItem(RES_CHRATR_COLOR)))) + if ((pCol = rPool.GetPoolDefaultItem(RES_CHRATR_COLOR))) InsColor(pCol->GetValue()); nMaxItem = rPool.GetItemCount2(RES_CHRATR_COLOR); for (sal_uInt32 n = 0; n < nMaxItem; ++n) { - if (nullptr - != (pCol = static_cast<const SvxColorItem*>(rPool.GetItem2(RES_CHRATR_COLOR, n)))) + if ((pCol = rPool.GetItem2(RES_CHRATR_COLOR, n))) InsColor(pCol->GetValue()); } @@ -1191,9 +1187,7 @@ void RtfExport::OutColorTable() nMaxItem = rPool.GetItemCount2(RES_CHRATR_UNDERLINE); for (sal_uInt32 n = 0; n < nMaxItem; ++n) { - if (nullptr - != (pUnder = static_cast<const SvxUnderlineItem*>( - rPool.GetItem2(RES_CHRATR_UNDERLINE, n)))) + if ((pUnder = rPool.GetItem2(RES_CHRATR_UNDERLINE, n))) InsColor(pUnder->GetColor()); } @@ -1202,9 +1196,7 @@ void RtfExport::OutColorTable() nMaxItem = rPool.GetItemCount2(RES_CHRATR_OVERLINE); for (sal_uInt32 n = 0; n < nMaxItem; ++n) { - if (nullptr - != (pOver - = static_cast<const SvxOverlineItem*>(rPool.GetItem2(RES_CHRATR_OVERLINE, n)))) + if ((pOver = rPool.GetItem2(RES_CHRATR_OVERLINE, n))) InsColor(pOver->GetColor()); } } @@ -1265,15 +1257,12 @@ void RtfExport::OutColorTable() { const SvxBoxItem* pCharBox; - if (nullptr - != (pCharBox - = static_cast<const SvxBoxItem*>(rPool.GetPoolDefaultItem(RES_CHRATR_BOX)))) + if ((pCharBox = rPool.GetPoolDefaultItem(RES_CHRATR_BOX))) InsColorLine(*pCharBox); nMaxItem = rPool.GetItemCount2(RES_CHRATR_BOX); for (sal_uInt32 n = 0; n < nMaxItem; ++n) { - if (nullptr - != (pCharBox = static_cast<const SvxBoxItem*>(rPool.GetItem2(RES_CHRATR_BOX, n)))) + if ((pCharBox = rPool.GetItem2(RES_CHRATR_BOX, n))) InsColorLine(*pCharBox); } } |