sw/inc/hintids.hxx | 89 +++++++++++++++----------------- sw/inc/ndtxt.hxx | 6 +- sw/source/core/crsr/crstrvl.cxx | 2 sw/source/core/doc/doc.cxx | 2 sw/source/core/doc/doctxm.cxx | 2 sw/source/core/doc/visiturl.cxx | 2 sw/source/core/txtnode/ndtxt.cxx | 11 ++- sw/source/core/undo/rolbck.cxx | 4 - sw/source/core/undo/unins.cxx | 2 sw/source/core/unocore/unoframe.cxx | 1 sw/source/core/unocore/unomap.cxx | 1 sw/source/core/unocore/unomap1.cxx | 4 + sw/source/core/unocore/unosrch.cxx | 1 sw/source/core/unocore/unostyle.cxx | 7 +- sw/source/filter/html/htmlflywriter.cxx | 3 - sw/source/filter/html/htmlgrin.cxx | 1 sw/source/filter/ww8/wrtww8.cxx | 2 sw/source/uibase/uno/unotxdoc.cxx | 1 18 files changed, 76 insertions(+), 65 deletions(-)
New commits: commit 97c80a73a76037057051e54b083193f33ba24a99 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Tue Dec 12 15:36:11 2017 +0200 TypedWhichId in sw (TXTATTR) Change-Id: If59983d236c336a7ab136110e2e18f6801111902 Reviewed-on: https://gerrit.libreoffice.org/46303 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx index f8bcc291de9a..bb20ee86704d 100644 --- a/sw/inc/hintids.hxx +++ b/sw/inc/hintids.hxx @@ -102,9 +102,7 @@ #define RES_CHRATR_END (46) // this Attribute used only in a TextNodes SwpAttr-Array -enum RES_TXTATR -{ -RES_TXTATR_BEGIN = RES_CHRATR_END, +#define RES_TXTATR_BEGIN RES_CHRATR_END /** text attributes with start and end. #i105453#: @@ -122,31 +120,30 @@ RES_TXTATR_BEGIN = RES_CHRATR_END, - INETFMT should precede CJK_RUBY (for UNO API it does not matter...) - META and METAFIELD must precede CJK_RUBY and INETFMT */ -RES_TXTATR_WITHEND_BEGIN = RES_TXTATR_BEGIN , - RES_TXTATR_REFMARK = RES_TXTATR_WITHEND_BEGIN, // 46 - RES_TXTATR_TOXMARK, // 47 - RES_TXTATR_META, // 48 - RES_TXTATR_METAFIELD, // 49 - RES_TXTATR_AUTOFMT, // 50 - RES_TXTATR_INETFMT, // 51 - RES_TXTATR_CHARFMT, // 52 - RES_TXTATR_CJK_RUBY, // 53 - RES_TXTATR_UNKNOWN_CONTAINER, // 54 - RES_TXTATR_INPUTFIELD, // 55 -RES_TXTATR_WITHEND_END, +#define RES_TXTATR_WITHEND_BEGIN RES_TXTATR_BEGIN +#define RES_TXTATR_REFMARK TypedWhichId<SwFormatRefMark>(RES_TXTATR_WITHEND_BEGIN) // 46 +#define RES_TXTATR_TOXMARK TypedWhichId<SwTOXMark>(47) +#define RES_TXTATR_META TypedWhichId<SwFormatMeta>(48) +#define RES_TXTATR_METAFIELD TypedWhichId<SwFormatMeta>(49) +#define RES_TXTATR_AUTOFMT TypedWhichId<SwFormatAutoFormat>(50) +#define RES_TXTATR_INETFMT TypedWhichId<SwFormatINetFormat>(51) +#define RES_TXTATR_CHARFMT TypedWhichId<SwFormatCharFormat>(52) +#define RES_TXTATR_CJK_RUBY TypedWhichId<SwFormatRuby>(53) +#define RES_TXTATR_UNKNOWN_CONTAINER TypedWhichId<SvXMLAttrContainerItem>(54) +#define RES_TXTATR_INPUTFIELD TypedWhichId<SwFormatField>(55) +#define RES_TXTATR_WITHEND_END 56 // all TextAttributes without an end -RES_TXTATR_NOEND_BEGIN = RES_TXTATR_WITHEND_END, - RES_TXTATR_FIELD = RES_TXTATR_NOEND_BEGIN, // 56 - RES_TXTATR_FLYCNT, // 57 - RES_TXTATR_FTN, // 58 - RES_TXTATR_ANNOTATION, // 59 - RES_TXTATR_DUMMY3, // 60 - RES_TXTATR_DUMMY1, // 61 - RES_TXTATR_DUMMY2, // 62 -RES_TXTATR_NOEND_END, -RES_TXTATR_END = RES_TXTATR_NOEND_END -}; +#define RES_TXTATR_NOEND_BEGIN RES_TXTATR_WITHEND_END +#define RES_TXTATR_FIELD TypedWhichId<SwFormatField>(RES_TXTATR_NOEND_BEGIN) // 56 +#define RES_TXTATR_FLYCNT TypedWhichId<SwFormatFlyCnt>(57) +#define RES_TXTATR_FTN TypedWhichId<SwFormatFootnote>(58) +#define RES_TXTATR_ANNOTATION TypedWhichId<SwFormatField>(59) +#define RES_TXTATR_DUMMY3 TypedWhichId<SfxBoolItem>(60) +#define RES_TXTATR_DUMMY1 TypedWhichId<SfxBoolItem>(61) +#define RES_TXTATR_DUMMY2 TypedWhichId<SfxBoolItem>(62) +#define RES_TXTATR_NOEND_END 63 +#define RES_TXTATR_END RES_TXTATR_NOEND_END #define RES_PARATR_BEGIN RES_TXTATR_END #define RES_PARATR_LINESPACING TypedWhichId<SvxLineSpacingItem>(RES_PARATR_BEGIN) // 63 @@ -231,30 +228,30 @@ RES_FRMATR_END #define RES_GRFATR_BEGIN RES_FRMATR_END #define RES_GRFATR_MIRRORGRF TypedWhichId<SwMirrorGrf>(RES_GRFATR_BEGIN) // 130 -#define RES_GRFATR_CROPGRF TypedWhichId<SwCropGrf>(131) // 131 - -#define RES_GRFATR_ROTATION TypedWhichId<SwRotationGrf>(132) // 132 -#define RES_GRFATR_LUMINANCE TypedWhichId<SwLuminanceGrf>(133) // 133 -#define RES_GRFATR_CONTRAST TypedWhichId<SwContrastGrf>(134) // 134 -#define RES_GRFATR_CHANNELR TypedWhichId<SwChannelRGrf>(135) // 135 -#define RES_GRFATR_CHANNELG TypedWhichId<SwChannelGGrf>(136) // 136 -#define RES_GRFATR_CHANNELB TypedWhichId<SwChannelBGrf>(137) // 137 -#define RES_GRFATR_GAMMA TypedWhichId<SwGammaGrf>(138) // 138 -#define RES_GRFATR_INVERT TypedWhichId<SwInvertGrf>(139) // 139 -#define RES_GRFATR_TRANSPARENCY TypedWhichId<SwTransparencyGrf>(140) // 140 -#define RES_GRFATR_DRAWMODE TypedWhichId<SwDrawModeGrf>(141) // 141 - -#define RES_GRFATR_DUMMY1 TypedWhichId<SfxBoolItem>(142) // 142 -#define RES_GRFATR_DUMMY2 TypedWhichId<SfxBoolItem>(143) // 143 -#define RES_GRFATR_DUMMY3 TypedWhichId<SfxBoolItem>(144) // 144 -#define RES_GRFATR_DUMMY4 TypedWhichId<SfxBoolItem>(145) // 145 -#define RES_GRFATR_DUMMY5 TypedWhichId<SfxBoolItem>(146) // 146 +#define RES_GRFATR_CROPGRF TypedWhichId<SwCropGrf>(131) + +#define RES_GRFATR_ROTATION TypedWhichId<SwRotationGrf>(132) +#define RES_GRFATR_LUMINANCE TypedWhichId<SwLuminanceGrf>(133) +#define RES_GRFATR_CONTRAST TypedWhichId<SwContrastGrf>(134) +#define RES_GRFATR_CHANNELR TypedWhichId<SwChannelRGrf>(135) +#define RES_GRFATR_CHANNELG TypedWhichId<SwChannelGGrf>(136) +#define RES_GRFATR_CHANNELB TypedWhichId<SwChannelBGrf>(137) +#define RES_GRFATR_GAMMA TypedWhichId<SwGammaGrf>(138) +#define RES_GRFATR_INVERT TypedWhichId<SwInvertGrf>(139) +#define RES_GRFATR_TRANSPARENCY TypedWhichId<SwTransparencyGrf>(140) +#define RES_GRFATR_DRAWMODE TypedWhichId<SwDrawModeGrf>(141) + +#define RES_GRFATR_DUMMY1 TypedWhichId<SfxBoolItem>(142) +#define RES_GRFATR_DUMMY2 TypedWhichId<SfxBoolItem>(143) +#define RES_GRFATR_DUMMY3 TypedWhichId<SfxBoolItem>(144) +#define RES_GRFATR_DUMMY4 TypedWhichId<SfxBoolItem>(145) +#define RES_GRFATR_DUMMY5 TypedWhichId<SfxBoolItem>(146) #define RES_GRFATR_END (147) #define RES_BOXATR_BEGIN RES_GRFATR_END #define RES_BOXATR_FORMAT TypedWhichId<SwTableBoxNumFormat>(RES_BOXATR_BEGIN) // 147 -#define RES_BOXATR_FORMULA TypedWhichId<SwTableBoxFormula>(148) // 148 -#define RES_BOXATR_VALUE TypedWhichId<SwTableBoxValue>(149) // 149 +#define RES_BOXATR_FORMULA TypedWhichId<SwTableBoxFormula>(148) +#define RES_BOXATR_VALUE TypedWhichId<SwTableBoxValue>(149) #define RES_BOXATR_END (150) #define RES_UNKNOWNATR_BEGIN RES_BOXATR_END diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index 1992227207b5..78e9921ce6e0 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -368,7 +368,7 @@ public: */ SwTextAttr *GetTextAttrAt( sal_Int32 const nIndex, - RES_TXTATR const nWhich, + sal_uInt16 const nWhich, enum GetTextAttrMode const eMode = DEFAULT ) const; /** get the innermost text attributes covering position nIndex. @@ -377,7 +377,7 @@ public: */ std::vector<SwTextAttr *> GetTextAttrsAt( sal_Int32 const nIndex, - RES_TXTATR const nWhich ) const; + sal_uInt16 const nWhich ) const; /** get the text attribute at position nIndex which owns the dummy character CH_TXTATR_* at that position, if one exists. @@ -388,7 +388,7 @@ public: */ SwTextAttr *GetTextAttrForCharAt( const sal_Int32 nIndex, - const RES_TXTATR nWhich = RES_TXTATR_END ) const; + const sal_uInt16 nWhich = RES_TXTATR_END ) const; SwTextField* GetFieldTextAttrAt( const sal_Int32 nIndex, diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 8c1a0627f1d0..c55970bdfe1e 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -1782,7 +1782,7 @@ bool SwCursorShell::SelectTextAttr( sal_uInt16 nWhich, SwTextNode* pTextNd = rPos.nNode.GetNode().GetTextNode(); pTextAttr = pTextNd ? pTextNd->GetTextAttrAt(rPos.nContent.GetIndex(), - static_cast<RES_TXTATR>(nWhich), + nWhich, bExpand ? SwTextNode::EXPAND : SwTextNode::DEFAULT) : nullptr; } diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 2d45bac285f0..cf9dbdd06885 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1225,7 +1225,7 @@ const SwFormatINetFormat* SwDoc::FindINetAttr( const OUString& rName ) const sal_uInt32 n, nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT ); for( n = 0; n < nMaxItems; ++n ) { - pItem = static_cast<const SwFormatINetFormat*>( GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ) ); + pItem = GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ); if( nullptr != pItem && pItem->GetName() == rName && nullptr != ( pTextAttr = pItem->GetTextINetFormat()) && diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 71b961e1522b..74dc25118e1c 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -87,7 +87,7 @@ void SwDoc::GetTOIKeys( SwTOIKeyType eTyp, std::vector<OUString>& rArr ) const const sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_TOXMARK ); for( sal_uInt32 i = 0; i < nMaxItems; ++i ) { - const SwTOXMark* pItem = static_cast<const SwTOXMark*>(GetAttrPool().GetItem2( RES_TXTATR_TOXMARK, i )); + const SwTOXMark* pItem = GetAttrPool().GetItem2( RES_TXTATR_TOXMARK, i ); if( !pItem ) continue; const SwTOXType* pTOXType = pItem->GetTOXType(); diff --git a/sw/source/core/doc/visiturl.cxx b/sw/source/core/doc/visiturl.cxx index 1ea5d3464856..fcc5677ef756 100644 --- a/sw/source/core/doc/visiturl.cxx +++ b/sw/source/core/doc/visiturl.cxx @@ -59,7 +59,7 @@ void SwURLStateChanged::Notify( SfxBroadcaster& , const SfxHint& rHint ) sal_uInt32 nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT ); for( sal_uInt32 n = 0; n < nMaxItems; ++n ) { - const SwFormatINetFormat* pItem = static_cast<const SwFormatINetFormat*>(pDoc->GetAttrPool().GetItem2(RES_TXTATR_INETFMT, n )); + const SwFormatINetFormat* pItem = pDoc->GetAttrPool().GetItem2(RES_TXTATR_INETFMT, n ); if( pItem != nullptr && ( pItem->GetValue() == sURL || ( !sBkmk.isEmpty() && pItem->GetValue() == sBkmk ))) { diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 6df3af529232..49ada34c9920 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -1333,9 +1333,10 @@ lcl_GetTextAttrs( std::vector<SwTextAttr *> *const pVector, SwTextAttr **const ppTextAttr, SwpHints const *const pSwpHints, - sal_Int32 const nIndex, RES_TXTATR const nWhich, + sal_Int32 const nIndex, sal_uInt16 const nWhich, enum SwTextNode::GetTextAttrMode const eMode) { + assert(nWhich >= RES_TXTATR_BEGIN && nWhich < RES_TXTATR_END); size_t const nSize = pSwpHints ? pSwpHints->Count() : 0; sal_Int32 nPreviousIndex(0); // index of last hint with nWhich bool (*pMatchFunc)(sal_Int32, sal_Int32, sal_Int32)=nullptr; @@ -1393,15 +1394,16 @@ lcl_GetTextAttrs( } std::vector<SwTextAttr *> -SwTextNode::GetTextAttrsAt(sal_Int32 const nIndex, RES_TXTATR const nWhich) const +SwTextNode::GetTextAttrsAt(sal_Int32 const nIndex, sal_uInt16 const nWhich) const { + assert(nWhich >= RES_TXTATR_BEGIN && nWhich < RES_TXTATR_END); std::vector<SwTextAttr *> ret; lcl_GetTextAttrs(& ret, nullptr, m_pSwpHints, nIndex, nWhich, DEFAULT); return ret; } SwTextAttr * -SwTextNode::GetTextAttrAt(sal_Int32 const nIndex, RES_TXTATR const nWhich, +SwTextNode::GetTextAttrAt(sal_Int32 const nIndex, sal_uInt16 const nWhich, enum GetTextAttrMode const eMode) const { assert( (nWhich == RES_TXTATR_META) @@ -2692,8 +2694,9 @@ SwContentNode* SwTextNode::AppendNode( const SwPosition & rPos ) SwTextAttr * SwTextNode::GetTextAttrForCharAt( const sal_Int32 nIndex, - const RES_TXTATR nWhich ) const + const sal_uInt16 nWhich ) const { + assert(nWhich >= RES_TXTATR_BEGIN && nWhich <= RES_TXTATR_END); if ( HasHints() ) { for ( size_t i = 0; i < m_pSwpHints->Count(); ++i ) diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index f10e66c17fbb..79eb17e30dc8 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -1311,10 +1311,10 @@ bool SwRegHistory::InsertItems( const SfxItemSet& rSet, for (SfxPoolItem const* pItem = aIter.FirstItem(); pItem; pItem = aIter.NextItem()) { // check that the history recorded a hint to reset every item sal_uInt16 const nWhich(pItem->Which()); - RES_TXTATR const nExpected( + sal_uInt16 const nExpected( (isCHRATR(nWhich) || RES_TXTATR_UNKNOWN_CONTAINER == nWhich) ? RES_TXTATR_AUTOFMT - : static_cast<RES_TXTATR>(nWhich)); + : nWhich); if (RES_TXTATR_AUTOFMT == nExpected) continue; // special case, may get set on text node itself // tdf#105077 even worse, node's set could cause diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index 049339c8d5bd..23723aff8a69 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -53,6 +53,8 @@ #include <docary.hxx> #include <acorrect.hxx> #include <dcontact.hxx> +#include <fmtautofmt.hxx> +#include <fchrfmt.hxx> #include <strings.hrc> diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 64e06adf9138..b62e4dce7bec 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -143,6 +143,7 @@ #include <svx/xfltrit.hxx> #include <swunohelper.hxx> #include <fefly.hxx> +#include <fmtflcnt.hxx> using namespace ::com::sun::star; diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx index c6c187c6591f..8a18ddd379f6 100644 --- a/sw/source/core/unocore/unomap.cxx +++ b/sw/source/core/unocore/unomap.cxx @@ -85,6 +85,7 @@ #include <unomid.h> #include <cmdid.h> #include <unofldmid.h> +#include <fmtruby.hxx> #include <editeng/colritem.hxx> #include <editeng/contouritem.hxx> #include <editeng/crossedoutitem.hxx> diff --git a/sw/source/core/unocore/unomap1.cxx b/sw/source/core/unocore/unomap1.cxx index 16302aecf264..3724e930672e 100644 --- a/sw/source/core/unocore/unomap1.cxx +++ b/sw/source/core/unocore/unomap1.cxx @@ -83,6 +83,10 @@ #include <unomid.h> #include <cmdid.h> #include <unofldmid.h> +#include <fchrfmt.hxx> +#include <fmtruby.hxx> +#include <fmtinfmt.hxx> +#include <fmtautofmt.hxx> #include <editeng/autokernitem.hxx> #include <editeng/blinkitem.hxx> #include <editeng/boxitem.hxx> diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx index 24dc547087a4..a3e967320bcf 100644 --- a/sw/source/core/unocore/unosrch.cxx +++ b/sw/source/core/unocore/unosrch.cxx @@ -23,6 +23,7 @@ #include <unomap.hxx> #include <unobaseclass.hxx> #include <unomid.h> +#include <fchrfmt.hxx> #include <i18nutil/searchopt.hxx> #include <o3tl/any.hxx> diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 5a31f787a55d..d4c32eefe5d5 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -72,6 +72,7 @@ #include <fmtfsize.hxx> #include <numrule.hxx> #include <tblafmt.hxx> +#include <fmtautofmt.hxx> #include <comphelper/servicehelper.hxx> #include <cppuhelper/supportsservice.hxx> @@ -1895,7 +1896,7 @@ void SwXStyle::SetPropertyValue<SID_SWREGISTER_COLLECTION>(const SfxItemProperty o_rStyleBase.GetItemSet().Put(SfxStringItem(SID_SWREGISTER_COLLECTION, aString ) ); } template<> -void SwXStyle::SetPropertyValue<RES_TXTATR_CJK_RUBY>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase) +void SwXStyle::SetPropertyValue<sal_uInt16(RES_TXTATR_CJK_RUBY)>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase) { if(MID_RUBY_CHARSTYLE != rEntry.nMemberId) return; @@ -1996,7 +1997,7 @@ void SwXStyle::SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const { FN_UNO_PARA_STYLE_CONDITIONS, std::mem_fn(&SwXStyle::SetPropertyValue<FN_UNO_PARA_STYLE_CONDITIONS>) }, { FN_UNO_CATEGORY, std::mem_fn(&SwXStyle::SetPropertyValue<FN_UNO_CATEGORY>) }, { SID_SWREGISTER_COLLECTION, std::mem_fn(&SwXStyle::SetPropertyValue<SID_SWREGISTER_COLLECTION>) }, - { RES_TXTATR_CJK_RUBY, std::mem_fn(&SwXStyle::SetPropertyValue<RES_TXTATR_CJK_RUBY>) }, + { RES_TXTATR_CJK_RUBY, std::mem_fn(&SwXStyle::SetPropertyValue<sal_uInt16(RES_TXTATR_CJK_RUBY)>) }, { RES_PARATR_DROP, std::mem_fn(&SwXStyle::SetPropertyValue<sal_uInt16(RES_PARATR_DROP)>) }, { RES_PARATR_NUMRULE, std::mem_fn(&SwXStyle::SetPropertyValue<sal_uInt16(RES_PARATR_NUMRULE)>) } }); @@ -3731,7 +3732,7 @@ SwAutoStylesEnumImpl::SwAutoStylesEnumImpl( SwDoc* pInitDoc, IStyleAccess::SwAut for ( sal_uInt32 nI = 0; nI < nCount; ++nI ) { - const SwFormatRuby* pItem = static_cast<const SwFormatRuby*>(rAttrPool.GetItem2( RES_TXTATR_CJK_RUBY, nI )); + const SwFormatRuby* pItem = rAttrPool.GetItem2( RES_TXTATR_CJK_RUBY, nI ); if ( pItem && pItem->GetTextRuby() ) { std::pair< sal_uInt16, text::RubyAdjust > aPair( pItem->GetPosition(), pItem->GetAdjustment() ); diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx index 6016c46374a5..2bd0b7800f0c 100644 --- a/sw/source/filter/html/htmlflywriter.cxx +++ b/sw/source/filter/html/htmlflywriter.cxx @@ -2024,8 +2024,7 @@ void SwHTMLWriter::CollectLinkTargets() { const SwTextNode* pTextNd; - if( nullptr != (pINetFormat = static_cast<const SwFormatINetFormat*>(pDoc->GetAttrPool().GetItem2( - RES_TXTATR_INETFMT, n ) ) ) && + if( nullptr != ( pINetFormat = pDoc->GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ) ) && nullptr != ( pTextAttr = pINetFormat->GetTextINetFormat()) && nullptr != ( pTextNd = pTextAttr->GetpTextNode() ) && pTextNd->GetNodes().IsDocNodes() ) diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index 620bcf6d101d..e2781d6e7d5f 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -66,6 +66,7 @@ #include "swcss1.hxx" #include "swhtml.hxx" #include <numrule.hxx> +#include <fmtflcnt.hxx> #include <vcl/graphicfilter.hxx> #include <tools/urlobj.hxx> diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 3f6c736f2bd1..c9fe09f40dfc 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3072,7 +3072,7 @@ void MSWordExportBase::CollectOutlineBookmarks(const SwDoc &rDoc) sal_uInt32 nMaxItems = rDoc.GetAttrPool().GetItemCount2(RES_TXTATR_INETFMT); for (sal_uInt32 n = 0; n < nMaxItems; ++n) { - const SwFormatINetFormat* pINetFormat = static_cast<const SwFormatINetFormat*>(rDoc.GetAttrPool().GetItem2(RES_TXTATR_INETFMT, n)); + const SwFormatINetFormat* pINetFormat = rDoc.GetAttrPool().GetItem2(RES_TXTATR_INETFMT, n); if (!pINetFormat) continue; diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 1143d21d914b..c1081276d4f0 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -173,6 +173,7 @@ #include <comphelper/servicehelper.hxx> #include <SwSpellDialogChildWindow.hxx> #include <memory> +#include <fchrfmt.hxx> #define TWIPS_PER_PIXEL 15 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits