summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/fmtanchr.hxx2
-rw-r--r--sw/inc/fmtclbl.hxx2
-rw-r--r--sw/inc/fmtclds.hxx2
-rw-r--r--sw/inc/fmtcnct.hxx2
-rw-r--r--sw/inc/fmtcntnt.hxx2
-rw-r--r--sw/inc/fmteiro.hxx2
-rw-r--r--sw/inc/fmtfollowtextflow.hxx2
-rw-r--r--sw/inc/fmtfordr.hxx2
-rw-r--r--sw/inc/fmtfsize.hxx2
-rw-r--r--sw/inc/fmtftntx.hxx4
-rw-r--r--sw/inc/fmthdft.hxx4
-rw-r--r--sw/inc/fmtline.hxx2
-rw-r--r--sw/inc/fmtlsplt.hxx2
-rw-r--r--sw/inc/fmtornt.hxx4
-rw-r--r--sw/inc/fmtpdsc.hxx2
-rw-r--r--sw/inc/fmtrowsplt.hxx2
-rw-r--r--sw/inc/fmtsrnd.hxx2
-rw-r--r--sw/inc/fmturl.hxx2
-rw-r--r--sw/inc/fmtwrapinfluenceonobjpos.hxx2
-rw-r--r--sw/inc/frmatr.hxx28
-rw-r--r--sw/inc/hfspacingitem.hxx2
-rw-r--r--sw/inc/hintids.hxx93
-rw-r--r--sw/inc/tgrditem.hxx2
-rw-r--r--sw/inc/unostyle.hxx4
-rw-r--r--sw/source/core/doc/docdraw.cxx2
-rw-r--r--sw/source/core/doc/docfly.cxx2
-rw-r--r--sw/source/core/doc/docfmt.cxx2
-rw-r--r--sw/source/core/doc/doclay.cxx5
-rw-r--r--sw/source/core/doc/fmtcol.cxx4
-rw-r--r--sw/source/core/doc/ftnidx.cxx4
-rw-r--r--sw/source/core/doc/tblafmt.cxx20
-rw-r--r--sw/source/core/docnode/ndsect.cxx6
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx6
-rw-r--r--sw/source/core/docnode/section.cxx1
-rw-r--r--sw/source/core/fields/docufld.cxx2
-rw-r--r--sw/source/core/frmedt/fefly1.cxx8
-rw-r--r--sw/source/core/layout/tabfrm.cxx2
-rw-r--r--sw/source/core/undo/unattr.cxx7
-rw-r--r--sw/source/core/undo/undel.cxx4
-rw-r--r--sw/source/core/unocore/SwXTextDefaults.cxx1
-rw-r--r--sw/source/core/unocore/unodraw.cxx2
-rw-r--r--sw/source/core/unocore/unoframe.cxx34
-rw-r--r--sw/source/core/unocore/unostyle.cxx36
-rw-r--r--sw/source/core/unocore/unotbl.cxx6
-rw-r--r--sw/source/filter/basflt/fltini.cxx7
-rw-r--r--sw/source/filter/html/htmlatr.cxx9
-rw-r--r--sw/source/filter/html/htmlflywriter.cxx4
-rw-r--r--sw/source/filter/html/htmlnumreader.cxx3
-rw-r--r--sw/source/filter/html/htmlplug.cxx4
-rw-r--r--sw/source/filter/html/htmlsect.cxx2
-rw-r--r--sw/source/filter/html/htmltab.cxx4
-rw-r--r--sw/source/filter/html/swhtml.cxx4
-rw-r--r--sw/source/filter/html/wrthtml.cxx4
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx16
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx7
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx4
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx2
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx8
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx16
-rw-r--r--sw/source/filter/xml/xmlitemm.cxx1
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx2
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx10
-rw-r--r--sw/source/ui/envelp/envfmt.cxx3
-rw-r--r--sw/source/ui/frmdlg/column.cxx24
-rw-r--r--sw/source/ui/frmdlg/frmdlg.cxx3
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx46
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx29
-rw-r--r--sw/source/ui/index/cnttab.cxx2
-rw-r--r--sw/source/ui/misc/linenum.cxx2
-rw-r--r--sw/source/ui/misc/pgfnote.cxx4
-rw-r--r--sw/source/ui/misc/pggrid.cxx12
-rw-r--r--sw/source/ui/table/tabledlg.cxx3
-rw-r--r--sw/source/uibase/app/appopt.cxx3
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx20
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx12
-rw-r--r--sw/source/uibase/frmdlg/colex.cxx9
-rw-r--r--sw/source/uibase/frmdlg/colmgr.cxx6
-rw-r--r--sw/source/uibase/frmdlg/frmmgr.cxx6
-rw-r--r--sw/source/uibase/inc/frmmgr.hxx14
-rw-r--r--sw/source/uibase/ribbar/drawbase.cxx2
-rw-r--r--sw/source/uibase/shells/basesh.cxx29
-rw-r--r--sw/source/uibase/shells/frmsh.cxx12
-rw-r--r--sw/source/uibase/shells/grfsh.cxx2
-rw-r--r--sw/source/uibase/shells/tabsh.cxx5
-rw-r--r--sw/source/uibase/shells/textsh.cxx2
-rw-r--r--sw/source/uibase/shells/textsh1.cxx2
-rw-r--r--sw/source/uibase/shells/txtattr.cxx4
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx28
-rw-r--r--sw/source/uibase/wrtsh/delete.cxx2
91 files changed, 346 insertions, 378 deletions
diff --git a/sw/inc/fmtanchr.hxx b/sw/inc/fmtanchr.hxx
index 28361a7ac7cf..cfdc600562f7 100644
--- a/sw/inc/fmtanchr.hxx
+++ b/sw/inc/fmtanchr.hxx
@@ -76,7 +76,7 @@ public:
};
inline const SwFormatAnchor &SwAttrSet::GetAnchor(bool bInP) const
- { return static_cast<const SwFormatAnchor&>(Get(RES_ANCHOR, bInP)); }
+ { return Get(RES_ANCHOR, bInP); }
inline const SwFormatAnchor &SwFormat::GetAnchor(bool bInP) const
{ return m_aSet.GetAnchor(bInP); }
diff --git a/sw/inc/fmtclbl.hxx b/sw/inc/fmtclbl.hxx
index cf41b339f938..dcfdba05f7f1 100644
--- a/sw/inc/fmtclbl.hxx
+++ b/sw/inc/fmtclbl.hxx
@@ -37,7 +37,7 @@ public:
};
inline const SwFormatNoBalancedColumns &SwAttrSet::GetBalancedColumns(bool bInP) const
- { return static_cast<const SwFormatNoBalancedColumns&>(Get( RES_COLUMNBALANCE, bInP )); }
+ { return Get( RES_COLUMNBALANCE, bInP ); }
inline const SwFormatNoBalancedColumns &SwFormat::GetBalancedColumns(bool bInP) const
{ return m_aSet.GetBalancedColumns( bInP ); }
diff --git a/sw/inc/fmtclds.hxx b/sw/inc/fmtclds.hxx
index 9e94196729fb..6bb50990660f 100644
--- a/sw/inc/fmtclds.hxx
+++ b/sw/inc/fmtclds.hxx
@@ -162,7 +162,7 @@ public:
};
inline const SwFormatCol &SwAttrSet::GetCol(bool bInP) const
- { return static_cast<const SwFormatCol&>(Get( RES_COL,bInP)); }
+ { return Get( RES_COL,bInP); }
inline const SwFormatCol &SwFormat::GetCol(bool bInP) const
{ return m_aSet.GetCol(bInP); }
diff --git a/sw/inc/fmtcnct.hxx b/sw/inc/fmtcnct.hxx
index c95e87cc10e2..e85ac8db5b8b 100644
--- a/sw/inc/fmtcnct.hxx
+++ b/sw/inc/fmtcnct.hxx
@@ -65,7 +65,7 @@ SwFormatChain &SwFormatChain::operator=( const SwFormatChain &rCpy )
}
inline const SwFormatChain &SwAttrSet::GetChain(bool bInP) const
- { return static_cast<const SwFormatChain&>(Get( RES_CHAIN,bInP)); }
+ { return Get( RES_CHAIN,bInP); }
inline const SwFormatChain &SwFormat::GetChain(bool bInP) const
{ return m_aSet.GetChain(bInP); }
diff --git a/sw/inc/fmtcntnt.hxx b/sw/inc/fmtcntnt.hxx
index 8fcdae13542b..ad864a51fce7 100644
--- a/sw/inc/fmtcntnt.hxx
+++ b/sw/inc/fmtcntnt.hxx
@@ -50,7 +50,7 @@ public:
};
inline const SwFormatContent &SwAttrSet::GetContent(bool bInP) const
- { return static_cast<const SwFormatContent&>(Get( RES_CNTNT,bInP)); }
+ { return Get( RES_CNTNT,bInP); }
inline const SwFormatContent &SwFormat::GetContent(bool bInP) const
{ return m_aSet.GetContent(bInP); }
diff --git a/sw/inc/fmteiro.hxx b/sw/inc/fmteiro.hxx
index 8ea4e9964d7c..ab53d6d2bf93 100644
--- a/sw/inc/fmteiro.hxx
+++ b/sw/inc/fmteiro.hxx
@@ -43,7 +43,7 @@ public:
};
inline const SwFormatEditInReadonly &SwAttrSet::GetEditInReadonly(bool bInP) const
- { return static_cast<const SwFormatEditInReadonly&>(Get( RES_EDIT_IN_READONLY,bInP)); }
+ { return Get( RES_EDIT_IN_READONLY,bInP); }
inline const SwFormatEditInReadonly &SwFormat::GetEditInReadonly(bool bInP) const
{ return m_aSet.GetEditInReadonly(bInP); }
diff --git a/sw/inc/fmtfollowtextflow.hxx b/sw/inc/fmtfollowtextflow.hxx
index 7686edfeccd2..6cbc6dfe39e9 100644
--- a/sw/inc/fmtfollowtextflow.hxx
+++ b/sw/inc/fmtfollowtextflow.hxx
@@ -45,7 +45,7 @@ public:
};
inline const SwFormatFollowTextFlow &SwAttrSet::GetFollowTextFlow(bool bInP) const
- { return static_cast<const SwFormatFollowTextFlow&>(Get( RES_FOLLOW_TEXT_FLOW, bInP )); }
+ { return Get( RES_FOLLOW_TEXT_FLOW, bInP ); }
inline const SwFormatFollowTextFlow &SwFormat::GetFollowTextFlow(bool bInP) const
{ return m_aSet.GetFollowTextFlow( bInP ); }
diff --git a/sw/inc/fmtfordr.hxx b/sw/inc/fmtfordr.hxx
index 20b80d1d4b90..2518995dbe3a 100644
--- a/sw/inc/fmtfordr.hxx
+++ b/sw/inc/fmtfordr.hxx
@@ -51,7 +51,7 @@ inline SwFormatFillOrder &SwFormatFillOrder::operator=( const SwFormatFillOrder
}
inline const SwFormatFillOrder &SwAttrSet::GetFillOrder(bool bInP) const
- { return static_cast<const SwFormatFillOrder&>(Get( RES_FILL_ORDER,bInP)); }
+ { return Get( RES_FILL_ORDER,bInP); }
inline const SwFormatFillOrder &SwFormat::GetFillOrder(bool bInP) const
{ return m_aSet.GetFillOrder(bInP); }
diff --git a/sw/inc/fmtfsize.hxx b/sw/inc/fmtfsize.hxx
index 94edec0814ce..9cbfb2078198 100644
--- a/sw/inc/fmtfsize.hxx
+++ b/sw/inc/fmtfsize.hxx
@@ -105,7 +105,7 @@ public:
};
inline const SwFormatFrameSize &SwAttrSet::GetFrameSize(bool bInP) const
- { return static_cast<const SwFormatFrameSize&>(Get( RES_FRM_SIZE,bInP)); }
+ { return Get( RES_FRM_SIZE,bInP); }
inline const SwFormatFrameSize &SwFormat::GetFrameSize(bool bInP) const
{ return m_aSet.GetFrameSize(bInP); }
diff --git a/sw/inc/fmtftntx.hxx b/sw/inc/fmtftntx.hxx
index 5fc5832b224c..e8c747d7ad4b 100644
--- a/sw/inc/fmtftntx.hxx
+++ b/sw/inc/fmtftntx.hxx
@@ -102,9 +102,9 @@ public:
};
inline const SwFormatFootnoteAtTextEnd &SwAttrSet::GetFootnoteAtTextEnd(bool bInP) const
- { return static_cast<const SwFormatFootnoteAtTextEnd&>(Get( RES_FTN_AT_TXTEND, bInP)); }
+ { return Get( RES_FTN_AT_TXTEND, bInP); }
inline const SwFormatEndAtTextEnd &SwAttrSet::GetEndAtTextEnd(bool bInP) const
- { return static_cast<const SwFormatEndAtTextEnd&>(Get( RES_END_AT_TXTEND, bInP)); }
+ { return Get( RES_END_AT_TXTEND, bInP); }
inline const SwFormatFootnoteAtTextEnd &SwFormat::GetFootnoteAtTextEnd(bool bInP) const
{ return m_aSet.GetFootnoteAtTextEnd(bInP); }
diff --git a/sw/inc/fmthdft.hxx b/sw/inc/fmthdft.hxx
index 0c0804fa1d04..7fcb53ecf4d8 100644
--- a/sw/inc/fmthdft.hxx
+++ b/sw/inc/fmthdft.hxx
@@ -91,9 +91,9 @@ public:
};
inline const SwFormatHeader &SwAttrSet::GetHeader(bool bInP) const
- { return static_cast<const SwFormatHeader&>(Get( RES_HEADER,bInP)); }
+ { return Get( RES_HEADER,bInP); }
inline const SwFormatFooter &SwAttrSet::GetFooter(bool bInP) const
- { return static_cast<const SwFormatFooter&>(Get( RES_FOOTER,bInP)); }
+ { return Get( RES_FOOTER,bInP); }
inline const SwFormatHeader &SwFormat::GetHeader(bool bInP) const
{ return m_aSet.GetHeader(bInP); }
diff --git a/sw/inc/fmtline.hxx b/sw/inc/fmtline.hxx
index 523442f6c677..84e4d56e6e35 100644
--- a/sw/inc/fmtline.hxx
+++ b/sw/inc/fmtline.hxx
@@ -56,7 +56,7 @@ public:
};
inline const SwFormatLineNumber &SwAttrSet::GetLineNumber(bool bInP) const
- { return static_cast<const SwFormatLineNumber&>(Get( RES_LINENUMBER,bInP)); }
+ { return Get( RES_LINENUMBER,bInP); }
#endif
diff --git a/sw/inc/fmtlsplt.hxx b/sw/inc/fmtlsplt.hxx
index 85f10adadf00..89670136a5e9 100644
--- a/sw/inc/fmtlsplt.hxx
+++ b/sw/inc/fmtlsplt.hxx
@@ -41,7 +41,7 @@ public:
};
inline const SwFormatLayoutSplit &SwAttrSet::GetLayoutSplit(bool bInP) const
- { return static_cast<const SwFormatLayoutSplit&>(Get( RES_LAYOUT_SPLIT,bInP)); }
+ { return Get( RES_LAYOUT_SPLIT,bInP); }
inline const SwFormatLayoutSplit &SwFormat::GetLayoutSplit(bool bInP) const
{ return m_aSet.GetLayoutSplit(bInP); }
diff --git a/sw/inc/fmtornt.hxx b/sw/inc/fmtornt.hxx
index 8b8c3173afde..5de9f2ff6949 100644
--- a/sw/inc/fmtornt.hxx
+++ b/sw/inc/fmtornt.hxx
@@ -118,9 +118,9 @@ inline SwFormatHoriOrient &SwFormatHoriOrient::operator=( const SwFormatHoriOrie
}
inline const SwFormatVertOrient &SwAttrSet::GetVertOrient(bool bInP) const
- { return static_cast<const SwFormatVertOrient&>(Get( RES_VERT_ORIENT,bInP)); }
+ { return Get( RES_VERT_ORIENT,bInP); }
inline const SwFormatHoriOrient &SwAttrSet::GetHoriOrient(bool bInP) const
- { return static_cast<const SwFormatHoriOrient&>(Get( RES_HORI_ORIENT,bInP)); }
+ { return Get( RES_HORI_ORIENT,bInP); }
inline const SwFormatVertOrient &SwFormat::GetVertOrient(bool bInP) const
{ return m_aSet.GetVertOrient(bInP); }
diff --git a/sw/inc/fmtpdsc.hxx b/sw/inc/fmtpdsc.hxx
index 1d39f7b0343f..1b015cf2384f 100644
--- a/sw/inc/fmtpdsc.hxx
+++ b/sw/inc/fmtpdsc.hxx
@@ -78,7 +78,7 @@ public:
};
inline const SwFormatPageDesc &SwAttrSet::GetPageDesc(bool bInP) const
- { return static_cast<const SwFormatPageDesc&>(Get( RES_PAGEDESC,bInP)); }
+ { return Get( RES_PAGEDESC,bInP); }
inline const SwFormatPageDesc &SwFormat::GetPageDesc(bool bInP) const
{ return m_aSet.GetPageDesc(bInP); }
diff --git a/sw/inc/fmtrowsplt.hxx b/sw/inc/fmtrowsplt.hxx
index a17809b0c604..735625841dc4 100644
--- a/sw/inc/fmtrowsplt.hxx
+++ b/sw/inc/fmtrowsplt.hxx
@@ -41,7 +41,7 @@ public:
};
inline const SwFormatRowSplit &SwAttrSet::GetRowSplit(bool bInP) const
- { return static_cast<const SwFormatRowSplit&>(Get( RES_ROW_SPLIT,bInP)); }
+ { return Get( RES_ROW_SPLIT,bInP); }
inline const SwFormatRowSplit &SwFormat::GetRowSplit(bool bInP) const
{ return m_aSet.GetRowSplit(bInP); }
diff --git a/sw/inc/fmtsrnd.hxx b/sw/inc/fmtsrnd.hxx
index df4637842819..ae17719d32ff 100644
--- a/sw/inc/fmtsrnd.hxx
+++ b/sw/inc/fmtsrnd.hxx
@@ -71,7 +71,7 @@ inline SwFormatSurround &SwFormatSurround::operator=( const SwFormatSurround &rC
}
inline const SwFormatSurround &SwAttrSet::GetSurround(bool bInP) const
- { return static_cast<const SwFormatSurround&>(Get( RES_SURROUND,bInP)); }
+ { return Get( RES_SURROUND,bInP); }
inline const SwFormatSurround &SwFormat::GetSurround(bool bInP) const
{ return m_aSet.GetSurround(bInP); }
diff --git a/sw/inc/fmturl.hxx b/sw/inc/fmturl.hxx
index f7f472b558bb..de877239563e 100644
--- a/sw/inc/fmturl.hxx
+++ b/sw/inc/fmturl.hxx
@@ -73,7 +73,7 @@ public:
};
inline const SwFormatURL &SwAttrSet::GetURL(bool bInP) const
- { return static_cast<const SwFormatURL&>(Get( RES_URL,bInP)); }
+ { return Get( RES_URL,bInP); }
inline const SwFormatURL &SwFormat::GetURL(bool bInP) const
{ return m_aSet.GetURL(bInP); }
diff --git a/sw/inc/fmtwrapinfluenceonobjpos.hxx b/sw/inc/fmtwrapinfluenceonobjpos.hxx
index 7c9139d04dc7..bff1bd2945d8 100644
--- a/sw/inc/fmtwrapinfluenceonobjpos.hxx
+++ b/sw/inc/fmtwrapinfluenceonobjpos.hxx
@@ -57,7 +57,7 @@ public:
};
inline const SwFormatWrapInfluenceOnObjPos& SwAttrSet::GetWrapInfluenceOnObjPos(bool bInP) const
- { return static_cast<const SwFormatWrapInfluenceOnObjPos&>(Get( RES_WRAP_INFLUENCE_ON_OBJPOS,bInP)); }
+ { return Get( RES_WRAP_INFLUENCE_ON_OBJPOS,bInP); }
inline const SwFormatWrapInfluenceOnObjPos& SwFormat::GetWrapInfluenceOnObjPos(bool bInP) const
{ return m_aSet.GetWrapInfluenceOnObjPos(bInP); }
diff --git a/sw/inc/frmatr.hxx b/sw/inc/frmatr.hxx
index 02a1188c711c..51dda4f4a5d0 100644
--- a/sw/inc/frmatr.hxx
+++ b/sw/inc/frmatr.hxx
@@ -40,33 +40,33 @@
// Implementation of FrameAttribute methods of SwAttrSet.
inline const SvxPaperBinItem &SwAttrSet::GetPaperBin(bool bInP) const
- { return static_cast<const SvxPaperBinItem&>(Get( RES_PAPER_BIN,bInP)); }
+ { return Get( RES_PAPER_BIN,bInP); }
inline const SvxLRSpaceItem &SwAttrSet::GetLRSpace(bool bInP) const
- { return static_cast<const SvxLRSpaceItem&>(Get( RES_LR_SPACE,bInP)); }
+ { return Get( RES_LR_SPACE,bInP); }
inline const SvxULSpaceItem &SwAttrSet::GetULSpace(bool bInP) const
- { return static_cast<const SvxULSpaceItem&>(Get( RES_UL_SPACE,bInP)); }
+ { return Get( RES_UL_SPACE,bInP); }
inline const SvxPrintItem &SwAttrSet::GetPrint(bool bInP) const
- { return static_cast<const SvxPrintItem&>(Get( RES_PRINT,bInP)); }
+ { return Get( RES_PRINT,bInP); }
inline const SvxOpaqueItem &SwAttrSet::GetOpaque(bool bInP) const
- { return static_cast<const SvxOpaqueItem&>(Get( RES_OPAQUE,bInP)); }
+ { return Get( RES_OPAQUE,bInP); }
inline const SvxProtectItem &SwAttrSet::GetProtect(bool bInP) const
- { return static_cast<const SvxProtectItem&>(Get( RES_PROTECT,bInP)); }
+ { return Get( RES_PROTECT,bInP); }
inline const SvxBoxItem &SwAttrSet::GetBox(bool bInP) const
- { return static_cast<const SvxBoxItem&>(Get( RES_BOX,bInP)); }
+ { return Get( RES_BOX,bInP); }
inline const SvxFormatKeepItem &SwAttrSet::GetKeep(bool bInP) const
- { return static_cast<const SvxFormatKeepItem&>(Get( RES_KEEP,bInP)); }
+ { return Get( RES_KEEP,bInP); }
inline const SvxBrushItem &SwAttrSet::GetBackground(bool bInP) const
- { return static_cast<const SvxBrushItem&>(Get( RES_BACKGROUND,bInP)); }
+ { return Get( RES_BACKGROUND,bInP); }
inline const SvxShadowItem &SwAttrSet::GetShadow(bool bInP) const
- { return static_cast<const SvxShadowItem&>(Get( RES_SHADOW,bInP)); }
+ { return Get( RES_SHADOW,bInP); }
inline const SvxFormatBreakItem &SwAttrSet::GetBreak(bool bInP) const
- { return static_cast<const SvxFormatBreakItem&>(Get( RES_BREAK,bInP)); }
+ { return Get( RES_BREAK,bInP); }
inline const SvxMacroItem &SwAttrSet::GetMacro(bool bInP) const
- { return static_cast<const SvxMacroItem&>(Get( RES_FRMMACRO,bInP)); }
+ { return Get( RES_FRMMACRO,bInP); }
inline const SvxFrameDirectionItem &SwAttrSet::GetFrameDir(bool bInP) const
- { return static_cast<const SvxFrameDirectionItem&>(Get( RES_FRAMEDIR,bInP)); }
+ { return Get( RES_FRAMEDIR,bInP); }
inline const SdrTextVertAdjustItem &SwAttrSet::GetTextVertAdjust(bool bInP) const
- { return static_cast<const SdrTextVertAdjustItem&>(Get( RES_TEXT_VERT_ADJUST,bInP)); }
+ { return Get( RES_TEXT_VERT_ADJUST,bInP); }
// Implementation of FrameAttribute methods of SwFormat.
inline const SvxPaperBinItem &SwFormat::GetPaperBin(bool bInP) const
diff --git a/sw/inc/hfspacingitem.hxx b/sw/inc/hfspacingitem.hxx
index ec850a13bb46..136c4fc3e7d7 100644
--- a/sw/inc/hfspacingitem.hxx
+++ b/sw/inc/hfspacingitem.hxx
@@ -41,7 +41,7 @@ public:
};
inline const SwHeaderAndFooterEatSpacingItem &SwAttrSet::GetHeaderAndFooterEatSpacing(bool bInP) const
- { return static_cast<const SwHeaderAndFooterEatSpacingItem&>(Get( RES_HEADER_FOOTER_EAT_SPACING,bInP)); }
+ { return Get( RES_HEADER_FOOTER_EAT_SPACING,bInP); }
inline const SwHeaderAndFooterEatSpacingItem &SwFormat::GetHeaderAndFooterEatSpacing(bool bInP) const
{ return m_aSet.GetHeaderAndFooterEatSpacing(bInP); }
diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx
index ef869ddfe559..8e254b62ec0f 100644
--- a/sw/inc/hintids.hxx
+++ b/sw/inc/hintids.hxx
@@ -177,54 +177,51 @@
#define RES_PARATR_LIST_ISCOUNTED TypedWhichId<SfxBoolItem>(86)
#define RES_PARATR_LIST_END (87)
-enum RES_FRMATR
-{
-RES_FRMATR_BEGIN = RES_PARATR_LIST_END,
- RES_FILL_ORDER = RES_FRMATR_BEGIN, // 87
- RES_FRM_SIZE, // 88
- RES_PAPER_BIN, // 89
- RES_LR_SPACE, // 90
- RES_UL_SPACE, // 91
- RES_PAGEDESC, // 92
- RES_BREAK, // 93
- RES_CNTNT, // 94
- RES_HEADER, // 95
- RES_FOOTER, // 96
- RES_PRINT, // 97
- RES_OPAQUE, // 98
- RES_PROTECT, // 99
- RES_SURROUND, // 100
- RES_VERT_ORIENT, // 101
- RES_HORI_ORIENT, // 102
- RES_ANCHOR, // 103
- RES_BACKGROUND, // 104
- RES_BOX, // 105
- RES_SHADOW, // 106
- RES_FRMMACRO, // 107
- RES_COL, // 108
- RES_KEEP, // 109
- RES_URL, // 110
- RES_EDIT_IN_READONLY, // 111
- RES_LAYOUT_SPLIT, // 112
- RES_CHAIN, // 113
- RES_TEXTGRID, // 114
- RES_LINENUMBER , // 115
- RES_FTN_AT_TXTEND, // 116
- RES_END_AT_TXTEND, // 117
- RES_COLUMNBALANCE, // 118
- RES_FRAMEDIR, // 119
- RES_HEADER_FOOTER_EAT_SPACING, // 120
- RES_ROW_SPLIT, // 121
- RES_FOLLOW_TEXT_FLOW, // 122
- RES_COLLAPSING_BORDERS, // 123
- RES_WRAP_INFLUENCE_ON_OBJPOS, // 124
- RES_AUTO_STYLE, // 125
- RES_FRMATR_STYLE_NAME, // 126
- RES_FRMATR_CONDITIONAL_STYLE_NAME, // 127
- RES_FRMATR_GRABBAG, // 128
- RES_TEXT_VERT_ADJUST, // 129
-RES_FRMATR_END
-};
+#define RES_FRMATR_BEGIN RES_PARATR_LIST_END
+#define RES_FILL_ORDER TypedWhichId<SwFormatFillOrder>(RES_FRMATR_BEGIN)
+#define RES_FRM_SIZE TypedWhichId<SwFormatFrameSize>(88)
+#define RES_PAPER_BIN TypedWhichId<SvxPaperBinItem>(89)
+#define RES_LR_SPACE TypedWhichId<SvxLRSpaceItem>(90)
+#define RES_UL_SPACE TypedWhichId<SvxULSpaceItem>(91)
+#define RES_PAGEDESC TypedWhichId<SwFormatPageDesc>(92)
+#define RES_BREAK TypedWhichId<SvxFormatBreakItem>(93)
+#define RES_CNTNT TypedWhichId<SwFormatContent>(94)
+#define RES_HEADER TypedWhichId<SwFormatHeader>(95)
+#define RES_FOOTER TypedWhichId<SwFormatFooter>(96)
+#define RES_PRINT TypedWhichId<SvxPrintItem>(97)
+#define RES_OPAQUE TypedWhichId<SvxOpaqueItem>(98)
+#define RES_PROTECT TypedWhichId<SvxProtectItem>(99)
+#define RES_SURROUND TypedWhichId<SwFormatSurround>(100)
+#define RES_VERT_ORIENT TypedWhichId<SwFormatVertOrient>(101)
+#define RES_HORI_ORIENT TypedWhichId<SwFormatHoriOrient>(102)
+#define RES_ANCHOR TypedWhichId<SwFormatAnchor>(103)
+#define RES_BACKGROUND TypedWhichId<SvxBrushItem>(104)
+#define RES_BOX TypedWhichId<SvxBoxItem>(105)
+#define RES_SHADOW TypedWhichId<SvxShadowItem>(106)
+#define RES_FRMMACRO TypedWhichId<SvxMacroItem>(107)
+#define RES_COL TypedWhichId<SwFormatCol>(108)
+#define RES_KEEP TypedWhichId<SvxFormatKeepItem>(109)
+#define RES_URL TypedWhichId<SwFormatURL>(110)
+#define RES_EDIT_IN_READONLY TypedWhichId<SwFormatEditInReadonly>(111)
+#define RES_LAYOUT_SPLIT TypedWhichId<SwFormatLayoutSplit>(112)
+#define RES_CHAIN TypedWhichId<SwFormatChain>(113)
+#define RES_TEXTGRID TypedWhichId<SwTextGridItem>(114)
+#define RES_LINENUMBER TypedWhichId<SwFormatLineNumber>(115)
+#define RES_FTN_AT_TXTEND TypedWhichId<SwFormatFootnoteAtTextEnd>(116)
+#define RES_END_AT_TXTEND TypedWhichId<SwFormatEndAtTextEnd>(117)
+#define RES_COLUMNBALANCE TypedWhichId<SwFormatNoBalancedColumns>(118)
+#define RES_FRAMEDIR TypedWhichId<SvxFrameDirectionItem>(119)
+#define RES_HEADER_FOOTER_EAT_SPACING TypedWhichId<SwHeaderAndFooterEatSpacingItem>(120)
+#define RES_ROW_SPLIT TypedWhichId<SwFormatRowSplit>(121)
+#define RES_FOLLOW_TEXT_FLOW TypedWhichId<SwFormatFollowTextFlow>(122)
+#define RES_COLLAPSING_BORDERS TypedWhichId<SfxBoolItem>(123)
+#define RES_WRAP_INFLUENCE_ON_OBJPOS TypedWhichId<SwFormatWrapInfluenceOnObjPos>(124)
+#define RES_AUTO_STYLE TypedWhichId<SwFormatAutoFormat>(125)
+#define RES_FRMATR_STYLE_NAME TypedWhichId<SfxStringItem>(126)
+#define RES_FRMATR_CONDITIONAL_STYLE_NAME TypedWhichId<SfxStringItem>(127)
+#define RES_FRMATR_GRABBAG TypedWhichId<SfxGrabBagItem>(128)
+#define RES_TEXT_VERT_ADJUST TypedWhichId<SdrTextVertAdjustItem>(129)
+#define RES_FRMATR_END 130
#define RES_GRFATR_BEGIN RES_FRMATR_END
#define RES_GRFATR_MIRRORGRF TypedWhichId<SwMirrorGrf>(RES_GRFATR_BEGIN) // 130
diff --git a/sw/inc/tgrditem.hxx b/sw/inc/tgrditem.hxx
index be7fd137b7ec..30cf95066fb8 100644
--- a/sw/inc/tgrditem.hxx
+++ b/sw/inc/tgrditem.hxx
@@ -107,7 +107,7 @@ public:
};
inline const SwTextGridItem &SwFormat::GetTextGrid(bool bInP) const
- { return static_cast<const SwTextGridItem&>(m_aSet.Get( RES_TEXTGRID, bInP )); }
+ { return m_aSet.Get( RES_TEXTGRID, bInP ); }
#endif
diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx
index afd2a500ff38..5d76bd719808 100644
--- a/sw/inc/unostyle.hxx
+++ b/sw/inc/unostyle.hxx
@@ -104,8 +104,8 @@ namespace sw
class ICoreFrameStyle
{
public:
- virtual void SetItem(enum RES_FRMATR eAtr, const SfxPoolItem& rItem) =0;
- virtual const SfxPoolItem* GetItem(enum RES_FRMATR eAtr) =0;
+ virtual void SetItem(sal_uInt16 eAtr, const SfxPoolItem& rItem) =0;
+ virtual const SfxPoolItem* GetItem(sal_uInt16 eAtr) =0;
virtual css::document::XEventsSupplier& GetEventsSupplier() =0;
virtual ~ICoreFrameStyle() {};
};
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index a7f68a62f30c..ae759ef8aca3 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -110,7 +110,7 @@ static void lcl_AdjustPositioningAttr( SwDrawFrameFormat* _pFrameFormat,
// If no anchor frame exist - e.g. because no layout exists - the
// default layout direction is taken.
const SvxFrameDirectionItem& rDirItem =
- static_cast<const SvxFrameDirectionItem&>(_pFrameFormat->GetAttrSet().GetPool()->GetDefaultItem( RES_FRAMEDIR ));
+ _pFrameFormat->GetAttrSet().GetPool()->GetDefaultItem( RES_FRAMEDIR );
switch ( rDirItem.GetValue() )
{
case SvxFrameDirection::Vertical_LR_TB:
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index f06d3f6ab5cc..cc4a6552e18f 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -281,7 +281,7 @@ sal_Int8 SwDoc::SetFlyFrameAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, boo
const SwFormatAnchor &rOldAnch = rFormat.GetAnchor();
const RndStdIds nOld = rOldAnch.GetAnchorId();
- SwFormatAnchor aNewAnch( static_cast<const SwFormatAnchor&>(rSet.Get( RES_ANCHOR )) );
+ SwFormatAnchor aNewAnch( rSet.Get( RES_ANCHOR ) );
RndStdIds nNew = aNewAnch.GetAnchorId();
// Is the new anchor valid?
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 532c492e5ca2..c344a2f6e966 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1353,7 +1353,7 @@ void SwDoc::CopyPageDescHeaderFooterImpl( bool bCpyHeader,
{
// Treat the header and footer attributes in the right way:
// Copy content nodes across documents!
- sal_uInt16 nAttr = static_cast<sal_uInt16>( bCpyHeader ? RES_HEADER : RES_FOOTER );
+ sal_uInt16 nAttr = bCpyHeader ? sal_uInt16(RES_HEADER) : sal_uInt16(RES_FOOTER);
const SfxPoolItem* pItem;
if( SfxItemState::SET != rSrcFormat.GetAttrSet().GetItemState( nAttr, false, &pItem ))
return ;
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index fd6d5f415310..53f9c85c5833 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -352,7 +352,7 @@ SwFlyFrameFormat* SwDoc::MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rS
const SwSelBoxes* pSelBoxes,
SwFrameFormat *pParent )
{
- const SwFormatAnchor& rAnch = static_cast<const SwFormatAnchor&>(rSet.Get( RES_ANCHOR ));
+ const SwFormatAnchor& rAnch = rSet.Get( RES_ANCHOR );
GetIDocumentUndoRedo().StartUndo( SwUndoId::INSLAYFMT, nullptr );
@@ -1627,8 +1627,7 @@ SvxFrameDirection SwDoc::GetTextDirection( const SwPosition& rPos,
}
}
if( !pItem )
- pItem = static_cast<const SvxFrameDirectionItem*>(&GetAttrPool().GetDefaultItem(
- RES_FRAMEDIR ));
+ pItem = &GetAttrPool().GetDefaultItem( RES_FRAMEDIR );
nRet = pItem->GetValue();
}
return nRet;
diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx
index 0491f1d07428..1a3ca6e7755e 100644
--- a/sw/source/core/doc/fmtcol.cxx
+++ b/sw/source/core/doc/fmtcol.cxx
@@ -158,8 +158,8 @@ void SwTextFormatColl::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew
if( GetAttrSet().GetParent() )
{
const SfxItemSet* pParent = GetAttrSet().GetParent();
- pNewLRSpace = static_cast<const SvxLRSpaceItem*>(&pParent->Get( RES_LR_SPACE ));
- pNewULSpace = static_cast<const SvxULSpaceItem*>(&pParent->Get( RES_UL_SPACE ));
+ pNewLRSpace = &pParent->Get( RES_LR_SPACE );
+ pNewULSpace = &pParent->Get( RES_UL_SPACE );
aFontSizeArr[0] = &pParent->Get( RES_CHRATR_FONTSIZE );
aFontSizeArr[1] = &pParent->Get( RES_CHRATR_CJK_FONTSIZE );
aFontSizeArr[2] = &pParent->Get( RES_CHRATR_CTL_FONTSIZE );
diff --git a/sw/source/core/doc/ftnidx.cxx b/sw/source/core/doc/ftnidx.cxx
index d9bfbc238ad4..5b753c56733c 100644
--- a/sw/source/core/doc/ftnidx.cxx
+++ b/sw/source/core/doc/ftnidx.cxx
@@ -283,8 +283,8 @@ SwTextFootnote* SwFootnoteIdxs::SeekEntry( const SwNodeIndex& rPos, size_t* pFnd
const SwSectionNode* SwUpdFootnoteEndNtAtEnd::FindSectNdWithEndAttr(
const SwTextFootnote& rTextFootnote )
{
- sal_uInt16 nWh = static_cast<sal_uInt16>( rTextFootnote.GetFootnote().IsEndNote() ?
- RES_END_AT_TXTEND : RES_FTN_AT_TXTEND );
+ sal_uInt16 nWh = rTextFootnote.GetFootnote().IsEndNote() ?
+ sal_uInt16(RES_END_AT_TXTEND) : sal_uInt16(RES_FTN_AT_TXTEND);
sal_uInt16 nVal;
const SwSectionNode* pNd = rTextFootnote.GetTextNode().FindSectionNode();
while( pNd && FTNEND_ATTXTEND_OWNNUMSEQ != ( nVal =
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 3b0ceb86e03f..e818e67fac76 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -764,13 +764,13 @@ void SwTableAutoFormat::UpdateFromSet( sal_uInt8 nPos,
}
if( UPDATE_BOX & eFlags )
{
- pFormat->SetBox( static_cast<const SvxBoxItem&>(rSet.Get( RES_BOX )) );
+ pFormat->SetBox( rSet.Get( RES_BOX ) );
// FIXME - add attribute IDs for the diagonal line items
// pFormat->SetTLBR( (SvxLineItem&)rSet.Get( RES_... ) );
// pFormat->SetBLTR( (SvxLineItem&)rSet.Get( RES_... ) );
- pFormat->SetBackground( static_cast<const SvxBrushItem&>(rSet.Get( RES_BACKGROUND )) );
- pFormat->SetTextOrientation(static_cast<const SvxFrameDirectionItem&>(rSet.Get(RES_FRAMEDIR)));
- pFormat->SetVerticalAlignment(static_cast<const SwFormatVertOrient&>(rSet.Get(RES_VERT_ORIENT)));
+ pFormat->SetBackground( rSet.Get( RES_BACKGROUND ) );
+ pFormat->SetTextOrientation(rSet.Get(RES_FRAMEDIR));
+ pFormat->SetVerticalAlignment(rSet.Get(RES_VERT_ORIENT));
const SwTableBoxNumFormat* pNumFormatItem;
const SvNumberformat* pNumFormat = nullptr;
@@ -938,15 +938,15 @@ void SwTableAutoFormat::StoreTableProperties(const SwTable &table)
const SfxItemSet &rSet = pFormat->GetAttrSet();
- m_aBreak = static_cast<const SvxFormatBreakItem&>(rSet.Get(RES_BREAK));
- m_aPageDesc = static_cast<const SwFormatPageDesc&>(rSet.Get(RES_PAGEDESC));
- const SwFormatLayoutSplit &layoutSplit = static_cast<const SwFormatLayoutSplit&>(rSet.Get(RES_LAYOUT_SPLIT));
+ m_aBreak = rSet.Get(RES_BREAK);
+ m_aPageDesc = rSet.Get(RES_PAGEDESC);
+ const SwFormatLayoutSplit &layoutSplit = rSet.Get(RES_LAYOUT_SPLIT);
m_bLayoutSplit = layoutSplit.GetValue();
- m_bCollapsingBorders = static_cast<const SfxBoolItem&>(rSet.Get(RES_COLLAPSING_BORDERS)).GetValue();
+ m_bCollapsingBorders = rSet.Get(RES_COLLAPSING_BORDERS).GetValue();
- m_aKeepWithNextPara = static_cast<const SvxFormatKeepItem&>(rSet.Get(RES_KEEP));
+ m_aKeepWithNextPara = rSet.Get(RES_KEEP);
m_aRepeatHeading = table.GetRowsToRepeat();
- m_aShadow = static_cast<const SvxShadowItem&>(rSet.Get(RES_SHADOW));
+ m_aShadow = rSet.Get(RES_SHADOW);
}
bool SwTableAutoFormat::FirstRowEndColumnIsRow()
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index e5d2d017c799..51c57c7d74ce 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -350,12 +350,10 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
bool bUpdateFootnote = false;
if( GetFootnoteIdxs().size() && pAttr )
{
- sal_uInt16 nVal = static_cast<const SwFormatFootnoteAtTextEnd&>(pAttr->Get(
- RES_FTN_AT_TXTEND )).GetValue();
+ sal_uInt16 nVal = pAttr->Get( RES_FTN_AT_TXTEND ).GetValue();
if( ( FTNEND_ATTXTEND_OWNNUMSEQ == nVal ||
FTNEND_ATTXTEND_OWNNUMANDFMT == nVal ) ||
- ( FTNEND_ATTXTEND_OWNNUMSEQ == ( nVal = static_cast<const SwFormatEndAtTextEnd&>(
- pAttr->Get( RES_END_AT_TXTEND )).GetValue() ) ||
+ ( FTNEND_ATTXTEND_OWNNUMSEQ == ( nVal = pAttr->Get( RES_END_AT_TXTEND ).GetValue() ) ||
FTNEND_ATTXTEND_OWNNUMANDFMT == nVal ))
{
bUpdateFootnote = true;
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index 36208de5ca26..dc1ef66cb7d5 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -873,7 +873,7 @@ void SwDoc::SetTabLineStyle( const SwCursor& rCursor,
SvxBoxItem aBox( pFormat->GetBox() );
if ( !pBorderLine && bSetLine )
- aBox = *static_cast<const SvxBoxItem*>(::GetDfltAttr( RES_BOX ));
+ aBox = *::GetDfltAttr( RES_BOX );
else
{
if ( aBox.GetTop() )
@@ -922,7 +922,7 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet )
if( !aUnions.empty() )
{
- SvxBoxItem aSetBox (static_cast<const SvxBoxItem &>( rSet.Get(RES_BOX )));
+ SvxBoxItem aSetBox ( rSet.Get(RES_BOX ) );
SvxBoxInfoItem aSetBoxInfo( rSet.Get(SID_ATTR_BORDER_INNER) );
bool bTopSet = false,
@@ -1111,7 +1111,7 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet )
// fdo#62470 fix the reading for table format.
if ( bRTLTab )
{
- SvxBoxItem aTempBox (static_cast<const SvxBoxItem &>( rSet.Get(RES_BOX )));
+ SvxBoxItem aTempBox ( rSet.Get(RES_BOX ) );
SvxBoxInfoItem aTempBoxInfo( rSet.Get(SID_ATTR_BORDER_INNER) );
aTempBox.SetLine( aSetBox.GetRight(), SvxBoxItemLine::RIGHT);
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx
index e685ece04d61..469024234ec6 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -62,6 +62,7 @@
#include <swerror.h>
#include <unosection.hxx>
#include <calbck.hxx>
+#include <fmtclds.hxx>
#include <algorithm>
#include "ndsect.hxx"
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index 8e360155f1b8..fe2d9cf2cefe 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -145,7 +145,7 @@ void SwPageNumberFieldType::ChangeExpansion( SwDoc* pDoc,
for( sal_uInt32 n = 0; n < nMaxItems; ++n )
{
const SwFormatPageDesc *pDesc;
- if( nullptr != (pDesc = static_cast<const SwFormatPageDesc*>(rPool.GetItem2( RES_PAGEDESC, n )) )
+ if( nullptr != (pDesc = rPool.GetItem2( RES_PAGEDESC, n ) )
&& pDesc->GetNumOffset() && pDesc->GetDefinedIn() )
{
const SwContentNode* pNd = dynamic_cast<const SwContentNode*>( pDesc->GetDefinedIn() );
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index c06bbd6e2951..2cbeeeb4a3bc 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -109,7 +109,7 @@ static bool lcl_FindAnchorPos(
SfxItemSet& rSet )
{
bool bRet = true;
- SwFormatAnchor aNewAnch( static_cast<const SwFormatAnchor&>(rSet.Get( RES_ANCHOR )) );
+ SwFormatAnchor aNewAnch( rSet.Get( RES_ANCHOR ) );
RndStdIds nNew = aNewAnch.GetAnchorId();
const SwFrame *pNewAnch;
@@ -206,7 +206,7 @@ bool sw_ChkAndSetNewAnchor(
const SwFormatAnchor &rOldAnch = rFormat.GetAnchor();
const RndStdIds nOld = rOldAnch.GetAnchorId();
- RndStdIds nNew = static_cast<const SwFormatAnchor&>(rSet.Get( RES_ANCHOR )).GetAnchorId();
+ RndStdIds nNew = rSet.Get( RES_ANCHOR ).GetAnchorId();
if( nOld == nNew )
return false;
@@ -644,7 +644,7 @@ const SwFrameFormat *SwFEShell::NewFlyFrame( const SfxItemSet& rSet, bool bAnchV
const SwPosition& rPos = *pCursor->Start();
- SwFormatAnchor& rAnch = const_cast<SwFormatAnchor&>(static_cast<const SwFormatAnchor&>(rSet.Get( RES_ANCHOR )));
+ SwFormatAnchor& rAnch = const_cast<SwFormatAnchor&>(rSet.Get( RES_ANCHOR ));
RndStdIds eRndId = rAnch.GetAnchorId();
switch( eRndId )
{
@@ -1103,7 +1103,7 @@ bool SwFEShell::SetDrawingAttr( SfxItemSet& rSet )
StartAllAction();
if( SfxItemState::SET == rSet.GetItemState( RES_ANCHOR, false ))
{
- RndStdIds nNew = static_cast<const SwFormatAnchor&>(rSet.Get( RES_ANCHOR )).GetAnchorId();
+ RndStdIds nNew = rSet.Get( RES_ANCHOR ).GetAnchorId();
if ( nNew != pFormat->GetAnchor().GetAnchorId() )
{
ChgAnchor( nNew );
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index ee1af4668c5b..28b2b9934ea9 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -5330,7 +5330,7 @@ sal_uInt16 SwTabFrame::GetBottomLineSize() const
bool SwTabFrame::IsCollapsingBorders() const
{
- return static_cast<const SfxBoolItem&>(GetFormat()->GetAttrSet().Get( RES_COLLAPSING_BORDERS )).GetValue();
+ return GetFormat()->GetAttrSet().Get( RES_COLLAPSING_BORDERS ).GetValue();
}
/// Local helper function to calculate height of first text row
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index fda4e0f9c0e0..34262fd5ecc6 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -372,7 +372,7 @@ void SwUndoFormatAttr::SaveFlyAnchor( bool bSvDrwPt )
}
const SwFormatAnchor& rAnchor =
- static_cast<const SwFormatAnchor&>( m_pOldSet->Get( RES_ANCHOR, false ) );
+ m_pOldSet->Get( RES_ANCHOR, false );
if( !rAnchor.GetContentAnchor() )
return;
@@ -403,7 +403,7 @@ bool SwUndoFormatAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext)
SwDoc *const pDoc = & rContext.GetDoc();
SwFrameFormat* pFrameFormat = static_cast<SwFrameFormat*>(m_pFormat);
const SwFormatAnchor& rAnchor =
- static_cast<const SwFormatAnchor&>( m_pOldSet->Get( RES_ANCHOR, false ) );
+ m_pOldSet->Get( RES_ANCHOR, false );
SwFormatAnchor aNewAnchor( rAnchor.GetAnchorId() );
if (RndStdIds::FLY_AT_PAGE != rAnchor.GetAnchorId()) {
@@ -436,8 +436,7 @@ bool SwUndoFormatAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext)
if( pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() ) {
if( RES_DRAWFRMFMT == pFrameFormat->Which() ) {
// get the old cached value
- const SwFormatFrameSize& rOldSize = static_cast<const SwFormatFrameSize&>(
- m_pOldSet->Get( RES_FRM_SIZE ) );
+ const SwFormatFrameSize& rOldSize = m_pOldSet->Get( RES_FRM_SIZE );
aDrawSavePt.X() = rOldSize.GetWidth();
aDrawSavePt.Y() = rOldSize.GetHeight();
m_pOldSet->ClearItem( RES_FRM_SIZE );
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 809b0848dcc5..2795e84fbe14 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -946,8 +946,8 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
if( m_bResetPgDesc || m_bResetPgBrk )
{
- sal_uInt16 nStt = static_cast<sal_uInt16>( m_bResetPgDesc ? RES_PAGEDESC : RES_BREAK );
- sal_uInt16 nEnd = static_cast<sal_uInt16>( m_bResetPgBrk ? RES_BREAK : RES_PAGEDESC );
+ sal_uInt16 nStt = m_bResetPgDesc ? sal_uInt16(RES_PAGEDESC) : sal_uInt16(RES_BREAK);
+ sal_uInt16 nEnd = m_bResetPgBrk ? sal_uInt16(RES_BREAK) : sal_uInt16(RES_PAGEDESC);
SwNode* pNode = rDoc.GetNodes()[ nEndNode + 1 ];
if( pNode->IsContentNode() )
diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx b/sw/source/core/unocore/SwXTextDefaults.cxx
index 82e64091d08e..f9af14cb786c 100644
--- a/sw/source/core/unocore/SwXTextDefaults.cxx
+++ b/sw/source/core/unocore/SwXTextDefaults.cxx
@@ -35,6 +35,7 @@
#include <unoprnms.hxx>
#include <unocrsrhelper.hxx>
#include <hintids.hxx>
+#include <fmtpdsc.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 2131779573dd..e15629008b17 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -1145,7 +1145,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
// #i26791# - special handling for property FN_TEXT_RANGE
else if ( FN_TEXT_RANGE == pEntry->nWID )
{
- SwFormatAnchor aAnchor( static_cast<const SwFormatAnchor&>(aSet.Get( RES_ANCHOR )) );
+ SwFormatAnchor aAnchor( aSet.Get( RES_ANCHOR ) );
if (aAnchor.GetAnchorId() == RndStdIds::FLY_AT_PAGE)
{
// set property <TextRange> not valid for to-page anchored shapes
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index b62e4dce7bec..ef28818d61a2 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -193,7 +193,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
bool bRet = true;
// always add an anchor to the set
- SwFormatAnchor aAnchor ( static_cast < const SwFormatAnchor & > ( rFromSet.Get ( RES_ANCHOR ) ) );
+ SwFormatAnchor aAnchor ( rFromSet.Get ( RES_ANCHOR ) );
{
const ::uno::Any* pAnchorPgNo;
if(GetProperty(RES_ANCHOR, MID_ANCHOR_PAGENUM, pAnchorPgNo))
@@ -641,7 +641,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
GetProperty(RES_PROTECT, MID_PROTECT_SIZE, pName );
if(pCont||pPos||pName)
{
- SvxProtectItem aProt ( static_cast < const ::SvxProtectItem & > ( rFromSet.Get ( RES_PROTECT ) ) );
+ SvxProtectItem aProt ( rFromSet.Get ( RES_PROTECT ) );
if(pCont)
bRet &= static_cast<SfxPoolItem&>(aProt).PutValue(*pCont, MID_PROTECT_CONTENT);
if(pPos )
@@ -662,7 +662,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
GetProperty(RES_HORI_ORIENT, MID_HORIORIENT_PAGETOGGLE, pPageT);
if(pHori||pHoriP||pHoriR||pPageT)
{
- SwFormatHoriOrient aOrient ( static_cast < const ::SwFormatHoriOrient & > ( rFromSet.Get ( RES_HORI_ORIENT ) ) );
+ SwFormatHoriOrient aOrient ( rFromSet.Get ( RES_HORI_ORIENT ) );
if(pHori )
bRet &= static_cast<SfxPoolItem&>(aOrient).PutValue(*pHori, MID_HORIORIENT_ORIENT);
if(pHoriP)
@@ -684,7 +684,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
GetProperty(RES_VERT_ORIENT, MID_VERTORIENT_RELATION, pVertR );
if(pVert||pVertP||pVertR)
{
- SwFormatVertOrient aOrient ( static_cast < const ::SwFormatVertOrient & > ( rFromSet.Get ( RES_VERT_ORIENT ) ) );
+ SwFormatVertOrient aOrient ( rFromSet.Get ( RES_VERT_ORIENT ) );
if(pVert )
bRet &= static_cast<SfxPoolItem&>(aOrient).PutValue(*pVert, MID_VERTORIENT_ORIENT);
if(pVertP)
@@ -705,7 +705,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
GetProperty(RES_URL, MID_URL_SERVERMAP, pHySMp );
if(pURL||pTarget||pHyLNm||pHySMp)
{
- SwFormatURL aURL ( static_cast < const ::SwFormatURL & > ( rFromSet.Get ( RES_URL ) ) );
+ SwFormatURL aURL ( rFromSet.Get ( RES_URL ) );
if(pURL)
bRet &= static_cast<SfxPoolItem&>(aURL).PutValue(*pURL, MID_URL_URL);
if(pTarget)
@@ -723,7 +723,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
GetProperty(RES_LR_SPACE, MID_R_MARGIN|CONVERT_TWIPS, pR );
if(pL||pR)
{
- SvxLRSpaceItem aLR ( static_cast < const ::SvxLRSpaceItem & > ( rFromSet.Get ( RES_LR_SPACE ) ) );
+ SvxLRSpaceItem aLR ( rFromSet.Get ( RES_LR_SPACE ) );
if(pL)
bRet &= static_cast<SfxPoolItem&>(aLR).PutValue(*pL, MID_L_MARGIN|CONVERT_TWIPS);
if(pR)
@@ -736,7 +736,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
GetProperty(RES_UL_SPACE, MID_LO_MARGIN|CONVERT_TWIPS, pB );
if(pT||pB)
{
- SvxULSpaceItem aTB ( static_cast < const ::SvxULSpaceItem &> ( rFromSet.Get ( RES_UL_SPACE ) ) );
+ SvxULSpaceItem aTB ( rFromSet.Get ( RES_UL_SPACE ) );
if(pT)
bRet &= static_cast<SfxPoolItem&>(aTB).PutValue(*pT, MID_UP_MARGIN|CONVERT_TWIPS);
if(pB)
@@ -746,28 +746,28 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
const ::uno::Any* pOp;
if(GetProperty(RES_OPAQUE, 0, pOp))
{
- SvxOpaqueItem aOp ( static_cast < const ::SvxOpaqueItem& > ( rFromSet.Get ( RES_OPAQUE ) ) );
+ SvxOpaqueItem aOp ( rFromSet.Get ( RES_OPAQUE ) );
bRet &= static_cast<SfxPoolItem&>(aOp).PutValue(*pOp, 0);
rToSet.Put(aOp);
}
const ::uno::Any* pPrt;
if(GetProperty(RES_PRINT, 0, pPrt))
{
- SvxPrintItem aPrt ( static_cast < const ::SvxPrintItem & > ( rFromSet.Get ( RES_PRINT ) ) );
+ SvxPrintItem aPrt ( rFromSet.Get ( RES_PRINT ) );
bRet &= static_cast<SfxPoolItem&>(aPrt).PutValue(*pPrt, 0);
rToSet.Put(aPrt);
}
const ::uno::Any* pSh;
if(GetProperty(RES_SHADOW, CONVERT_TWIPS, pSh))
{
- SvxShadowItem aSh ( static_cast < const ::SvxShadowItem& > ( rFromSet.Get ( RES_SHADOW ) ) );
+ SvxShadowItem aSh ( rFromSet.Get ( RES_SHADOW ) );
bRet &= static_cast<SfxPoolItem&>(aSh).PutValue(*pSh, CONVERT_TWIPS);
rToSet.Put(aSh);
}
const ::uno::Any* pShTr;
if(GetProperty(RES_SHADOW, MID_SHADOW_TRANSPARENCE, pShTr) && rToSet.HasItem(RES_SHADOW))
{
- SvxShadowItem aSh(static_cast<const SvxShadowItem&>(rToSet.Get(RES_SHADOW)));
+ SvxShadowItem aSh(rToSet.Get(RES_SHADOW));
bRet &= aSh.PutValue(*pShTr, MID_SHADOW_TRANSPARENCE);
rToSet.Put(aSh);
}
@@ -777,7 +777,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
GetProperty(RES_SURROUND, MID_SURROUND_ANCHORONLY, pSurAnch);
if(pSur || pSurAnch)
{
- SwFormatSurround aSrnd ( static_cast < const ::SwFormatSurround & > ( rFromSet.Get ( RES_SURROUND ) ) );
+ SwFormatSurround aSrnd ( rFromSet.Get ( RES_SURROUND ) );
if(pSur)
bRet &= static_cast<SfxPoolItem&>(aSrnd).PutValue(*pSur, MID_SURROUND_SURROUNDTYPE );
if(pSurAnch)
@@ -810,7 +810,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
pLeftDistance || pRightDistance || pTopDistance || pBottomDistance ||
pLineStyle || pLineWidth )
{
- SvxBoxItem aBox ( static_cast < const ::SvxBoxItem & > ( rFromSet.Get ( RES_BOX ) ) );
+ SvxBoxItem aBox ( rFromSet.Get ( RES_BOX ) );
if( pLeft )
bRet &= static_cast<SfxPoolItem&>(aBox).PutValue(*pLeft, CONVERT_TWIPS|LEFT_BORDER );
if( pRight )
@@ -862,7 +862,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
pWidthType ||pSyncWidth || pSyncHeight )
{
rSizeFound = true;
- SwFormatFrameSize aFrameSz ( static_cast < const ::SwFormatFrameSize& > ( rFromSet.Get ( RES_FRM_SIZE ) ) );
+ SwFormatFrameSize aFrameSz ( rFromSet.Get ( RES_FRM_SIZE ) );
if(pWidth)
bRet &= static_cast<SfxPoolItem&>(aFrameSz).PutValue(*pWidth, MID_FRMSIZE_WIDTH|CONVERT_TWIPS);
if(pHeight)
@@ -946,7 +946,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
GetProperty(RES_TEXT_VERT_ADJUST, 0, pTextVertAdjust);
if ( pTextVertAdjust )
{
- SdrTextVertAdjustItem aTextVertAdjust(static_cast <const ::SdrTextVertAdjustItem & > ( rFromSet.Get ( RES_TEXT_VERT_ADJUST ) ));
+ SdrTextVertAdjustItem aTextVertAdjust( rFromSet.Get ( RES_TEXT_VERT_ADJUST ) );
bRet &= static_cast<SfxPoolItem&>(aTextVertAdjust).PutValue(*pTextVertAdjust, 0);
rToSet.Put(aTextVertAdjust);
}
@@ -972,7 +972,7 @@ static inline void lcl_FillCol ( SfxItemSet &rToSet, const ::SfxItemSet &rFromSe
{
if ( pAny )
{
- SwFormatCol aCol ( static_cast < const ::SwFormatCol & > ( rFromSet.Get ( RES_COL ) ) );
+ SwFormatCol aCol ( rFromSet.Get ( RES_COL ) );
static_cast<SfxPoolItem&>(aCol).PutValue( *pAny, MID_COLUMNS);
rToSet.Put(aCol);
}
@@ -3080,7 +3080,7 @@ void SwXFrame::attach(const uno::Reference< text::XTextRange > & xTextRange)
SfxItemSet aSet( pDoc->GetAttrPool(), svl::Items<RES_ANCHOR, RES_ANCHOR>{} );
aSet.SetParent(&pFormat->GetAttrSet());
- SwFormatAnchor aAnchor = static_cast<const SwFormatAnchor&>(aSet.Get(RES_ANCHOR));
+ SwFormatAnchor aAnchor = aSet.Get(RES_ANCHOR);
aAnchor.SetAnchor( aIntPam.Start() );
aSet.Put(aAnchor);
pDoc->SetFlyFrameAttr( *pFormat, aSet );
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 83c0439efd69..c560c3acf941 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -408,8 +408,8 @@ public:
virtual css::uno::Reference< css::container::XNameReplace > SAL_CALL getEvents( ) override;
//ICoreStyle
- virtual void SetItem(enum RES_FRMATR eAtr, const SfxPoolItem& rItem) override;
- virtual const SfxPoolItem* GetItem(enum RES_FRMATR eAtr) override;
+ virtual void SetItem(sal_uInt16 eAtr, const SfxPoolItem& rItem) override;
+ virtual const SfxPoolItem* GetItem(sal_uInt16 eAtr) override;
virtual css::document::XEventsSupplier& GetEventsSupplier() override
{ return *this; };
};
@@ -1668,7 +1668,7 @@ void SwXStyle::SetPropertyValue<OWN_ATTR_FILLBMP_MODE>(const SfxItemPropertySimp
rStyleSet.Put(XFillBmpTileItem(drawing::BitmapMode_REPEAT == eMode));
}
template<>
-void SwXStyle::SetPropertyValue<RES_PAPER_BIN>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<sal_uInt16(RES_PAPER_BIN)>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
if(!rValue.has<OUString>())
throw lang::IllegalArgumentException();
@@ -1768,7 +1768,7 @@ void SwXStyle::SetPropertyValue<FN_UNO_FOLLOW_STYLE>(const SfxItemPropertySimple
o_rStyleBase.getNewBase()->SetFollow(aString);
}
template<>
-void SwXStyle::SetPropertyValue<RES_PAGEDESC>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<sal_uInt16(RES_PAGEDESC)>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
if(MID_PAGEDESC_PAGEDESCNAME != rEntry.nMemberId)
{
@@ -1805,7 +1805,7 @@ void SwXStyle::SetPropertyValue<RES_PAGEDESC>(const SfxItemPropertySimpleEntry&
}
}
template<>
-void SwXStyle::SetPropertyValue<RES_TEXT_VERT_ADJUST>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<sal_uInt16(RES_TEXT_VERT_ADJUST)>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
if(m_rEntry.m_eFamily != SfxStyleFamily::Page)
{
@@ -1985,14 +1985,14 @@ void SwXStyle::SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const
{ XATTR_FILLHATCH, std::mem_fn(&SwXStyle::SetPropertyValue<sal_uInt16(XATTR_FILLGRADIENT)>) },
{ XATTR_FILLBITMAP, std::mem_fn(&SwXStyle::SetPropertyValue<sal_uInt16(XATTR_FILLGRADIENT)>) },
{ XATTR_FILLFLOATTRANSPARENCE, std::mem_fn(&SwXStyle::SetPropertyValue<sal_uInt16(XATTR_FILLGRADIENT)>) },
- { RES_BACKGROUND, std::mem_fn(&SwXStyle::SetPropertyValue<RES_BACKGROUND>) },
+ { RES_BACKGROUND, std::mem_fn(&SwXStyle::SetPropertyValue<sal_uInt16(RES_BACKGROUND)>) },
{ OWN_ATTR_FILLBMP_MODE, std::mem_fn(&SwXStyle::SetPropertyValue<OWN_ATTR_FILLBMP_MODE>) },
- { RES_PAPER_BIN, std::mem_fn(&SwXStyle::SetPropertyValue<RES_PAPER_BIN>) },
+ { RES_PAPER_BIN, std::mem_fn(&SwXStyle::SetPropertyValue<sal_uInt16(RES_PAPER_BIN)>) },
{ FN_UNO_NUM_RULES, std::mem_fn(&SwXStyle::SetPropertyValue<FN_UNO_NUM_RULES>) },
{ RES_PARATR_OUTLINELEVEL, std::mem_fn(&SwXStyle::SetPropertyValue<sal_uInt16(RES_PARATR_OUTLINELEVEL)>) },
{ FN_UNO_FOLLOW_STYLE, std::mem_fn(&SwXStyle::SetPropertyValue<FN_UNO_FOLLOW_STYLE>) },
- { RES_PAGEDESC, std::mem_fn(&SwXStyle::SetPropertyValue<RES_PAGEDESC>) },
- { RES_TEXT_VERT_ADJUST, std::mem_fn(&SwXStyle::SetPropertyValue<RES_TEXT_VERT_ADJUST>) },
+ { RES_PAGEDESC, std::mem_fn(&SwXStyle::SetPropertyValue<sal_uInt16(RES_PAGEDESC)>) },
+ { RES_TEXT_VERT_ADJUST, std::mem_fn(&SwXStyle::SetPropertyValue<sal_uInt16(RES_TEXT_VERT_ADJUST)>) },
{ FN_UNO_IS_AUTO_UPDATE, std::mem_fn(&SwXStyle::SetPropertyValue<FN_UNO_IS_AUTO_UPDATE>) },
{ 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>) },
@@ -2133,7 +2133,7 @@ uno::Any SwXStyle::GetStyleProperty<FN_UNO_STYLE_INTEROP_GRAB_BAG>(const SfxItem
return aRet;
}
template<>
-uno::Any SwXStyle::GetStyleProperty<RES_PAPER_BIN>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, SwStyleBase_Impl& rBase)
+uno::Any SwXStyle::GetStyleProperty<sal_uInt16(RES_PAPER_BIN)>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, SwStyleBase_Impl& rBase)
{
PrepareStyleBase(rBase);
SfxItemSet& rSet = rBase.GetItemSet();
@@ -2172,7 +2172,7 @@ uno::Any SwXStyle::GetStyleProperty<FN_UNO_FOLLOW_STYLE>(const SfxItemPropertySi
return uno::makeAny(aString);
}
template<>
-uno::Any SwXStyle::GetStyleProperty<RES_PAGEDESC>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, SwStyleBase_Impl& rBase)
+uno::Any SwXStyle::GetStyleProperty<sal_uInt16(RES_PAGEDESC)>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, SwStyleBase_Impl& rBase)
{
PrepareStyleBase(rBase);
const sal_uInt8 nMemberId(rEntry.nMemberId & (~SFX_METRIC_ITEM));
@@ -2269,7 +2269,7 @@ uno::Any SwXStyle::GetStyleProperty<SID_SWREGISTER_COLLECTION>(const SfxItemProp
return uno::makeAny(aName);
}
template<>
-uno::Any SwXStyle::GetStyleProperty<RES_BACKGROUND>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet&, SwStyleBase_Impl& rBase)
+uno::Any SwXStyle::GetStyleProperty<sal_uInt16(RES_BACKGROUND)>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet&, SwStyleBase_Impl& rBase)
{
PrepareStyleBase(rBase);
const SfxItemSet& rSet = rBase.GetItemSet();
@@ -2332,17 +2332,17 @@ uno::Any SwXStyle::GetStyleProperty_Impl(const SfxItemPropertySimpleEntry& rEntr
{ FN_UNO_IS_PHYSICAL, std::mem_fn(&SwXStyle::GetStyleProperty<FN_UNO_IS_PHYSICAL>) },
{ FN_UNO_HIDDEN, std::mem_fn(&SwXStyle::GetStyleProperty<FN_UNO_HIDDEN>) },
{ FN_UNO_STYLE_INTEROP_GRAB_BAG, std::mem_fn(&SwXStyle::GetStyleProperty<FN_UNO_STYLE_INTEROP_GRAB_BAG>) },
- { RES_PAPER_BIN, std::mem_fn(&SwXStyle::GetStyleProperty<RES_PAPER_BIN>) },
+ { RES_PAPER_BIN, std::mem_fn(&SwXStyle::GetStyleProperty<sal_uInt16(RES_PAPER_BIN)>) },
{ FN_UNO_NUM_RULES, std::mem_fn(&SwXStyle::GetStyleProperty<FN_UNO_NUM_RULES>) },
{ RES_PARATR_OUTLINELEVEL, std::mem_fn(&SwXStyle::GetStyleProperty<sal_uInt16(RES_PARATR_OUTLINELEVEL)>) },
{ FN_UNO_FOLLOW_STYLE, std::mem_fn(&SwXStyle::GetStyleProperty<FN_UNO_FOLLOW_STYLE>) },
- { RES_PAGEDESC, std::mem_fn(&SwXStyle::GetStyleProperty<RES_PAGEDESC>) },
+ { RES_PAGEDESC, std::mem_fn(&SwXStyle::GetStyleProperty<sal_uInt16(RES_PAGEDESC)>) },
{ FN_UNO_IS_AUTO_UPDATE, std::mem_fn(&SwXStyle::GetStyleProperty<FN_UNO_IS_AUTO_UPDATE>) },
{ FN_UNO_DISPLAY_NAME, std::mem_fn(&SwXStyle::GetStyleProperty<FN_UNO_DISPLAY_NAME>) },
{ FN_UNO_PARA_STYLE_CONDITIONS, std::mem_fn(&SwXStyle::GetStyleProperty<FN_UNO_PARA_STYLE_CONDITIONS>) },
{ FN_UNO_CATEGORY, std::mem_fn(&SwXStyle::GetStyleProperty<FN_UNO_CATEGORY>) },
{ SID_SWREGISTER_COLLECTION, std::mem_fn(&SwXStyle::GetStyleProperty<SID_SWREGISTER_COLLECTION>) },
- { RES_BACKGROUND, std::mem_fn(&SwXStyle::GetStyleProperty<RES_BACKGROUND>) },
+ { RES_BACKGROUND, std::mem_fn(&SwXStyle::GetStyleProperty<sal_uInt16(RES_BACKGROUND)>) },
{ OWN_ATTR_FILLBMP_MODE, std::mem_fn(&SwXStyle::GetStyleProperty<OWN_ATTR_FILLBMP_MODE>) }
});
}
@@ -3289,8 +3289,9 @@ SwXFrameStyle::SwXFrameStyle(SwDoc *pDoc)
: SwXStyle(pDoc, SfxStyleFamily::Frame, false)
{ }
-void SwXFrameStyle::SetItem(enum RES_FRMATR eAtr, const SfxPoolItem& rItem)
+void SwXFrameStyle::SetItem(sal_uInt16 eAtr, const SfxPoolItem& rItem)
{
+ assert(eAtr >= RES_FRMATR_BEGIN && eAtr < RES_FRMATR_END);
SfxStyleSheetBase* pBase = GetStyleSheetBase();
if(!pBase)
return;
@@ -3301,8 +3302,9 @@ void SwXFrameStyle::SetItem(enum RES_FRMATR eAtr, const SfxPoolItem& rItem)
xStyle->SetItemSet(aSet);
}
-const SfxPoolItem* SwXFrameStyle::GetItem(enum RES_FRMATR eAtr)
+const SfxPoolItem* SwXFrameStyle::GetItem(sal_uInt16 eAtr)
{
+ assert(eAtr >= RES_FRMATR_BEGIN && eAtr < RES_FRMATR_END);
SfxStyleSheetBase* pBase = GetStyleSheetBase();
if(!pBase)
return nullptr;
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 350656ff5365..cdd63b47805f 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -2822,7 +2822,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName)
aSet.Put(SvxBoxInfoItem( SID_ATTR_BORDER_INNER ));
SwDoc::GetTabBorders(rCursor, aSet);
const SvxBoxInfoItem& rBoxInfoItem = aSet.Get(SID_ATTR_BORDER_INNER);
- const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>(aSet.Get(RES_BOX));
+ const SvxBoxItem& rBox = aSet.Get(RES_BOX);
if (FN_UNO_TABLE_BORDER == pEntry->nWID)
{
@@ -3429,7 +3429,7 @@ SwXCellRange::setPropertyValue(const OUString& rPropertyName, const uno::Any& aV
SwDoc::GetTabBorders(rCursor, aSet);
aSet.Put(aBoxInfo);
- SvxBoxItem aBoxItem(static_cast<const SvxBoxItem&>(aSet.Get(RES_BOX)));
+ SvxBoxItem aBoxItem(aSet.Get(RES_BOX));
static_cast<SfxPoolItem&>(aBoxItem).PutValue(aValue, pEntry->nMemberId);
aSet.Put(aBoxItem);
pDoc->SetTabBorders(*m_pImpl->m_pTableCursor, aSet);
@@ -3519,7 +3519,7 @@ uno::Any SAL_CALL SwXCellRange::getPropertyValue(const OUString& rPropertyName)
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>{});
aSet.Put(SvxBoxInfoItem( SID_ATTR_BORDER_INNER ));
SwDoc::GetTabBorders(*m_pImpl->m_pTableCursor, aSet);
- const SvxBoxItem& rBoxItem = static_cast<const SvxBoxItem&>(aSet.Get(RES_BOX));
+ const SvxBoxItem& rBoxItem = aSet.Get(RES_BOX);
rBoxItem.QueryValue(aRet, pEntry->nMemberId);
}
break;
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx
index c0c3d992eff0..4d7c7ad48a2a 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -307,7 +307,7 @@ void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor,
if( SfxItemState::SET != rFlySet.GetItemState( RES_FRM_SIZE, true, &pItem ) ||
MINFLY > static_cast<const SwFormatFrameSize*>(pItem)->GetWidth() )
{
- SwFormatFrameSize aSz(static_cast<const SwFormatFrameSize&>(rFlySet.Get(RES_FRM_SIZE)));
+ SwFormatFrameSize aSz(rFlySet.Get(RES_FRM_SIZE));
if (pItem)
aSz = static_cast<const SwFormatFrameSize&>(*pItem);
@@ -320,8 +320,7 @@ void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor,
else
nWidth = nPageWidth;
- const SwNodeIndex* pSttNd = static_cast<const SwFormatContent&>(rFlySet.Get( RES_CNTNT )).
- GetContentIdx();
+ const SwNodeIndex* pSttNd = rFlySet.Get( RES_CNTNT ).GetContentIdx();
if( pSttNd )
{
bool bOnlyOneNode = true;
@@ -366,7 +365,7 @@ void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor,
}
// consider border and distance to content
- const SvxBoxItem& rBoxItem = static_cast<const SvxBoxItem&>(rFlySet.Get( RES_BOX ));
+ const SvxBoxItem& rBoxItem = rFlySet.Get( RES_BOX );
SvxBoxItemLine nLine = SvxBoxItemLine::LEFT;
for( int i = 0; i < 2; ++i )
{
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index a17e2426af8d..e82dc41be022 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -573,7 +573,7 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
// we will need the lower spacing of the paragraph later on
const SvxULSpaceItem& rULSpace =
- pNodeItemSet ? static_cast<const SvxULSpaceItem &>(pNodeItemSet->Get(RES_UL_SPACE))
+ pNodeItemSet ? pNodeItemSet->Get(RES_UL_SPACE)
: rFormat.GetULSpace();
if( (rHWrt.m_bOutHeader &&
@@ -627,7 +627,7 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
rWrt.pCurPam->GetMark()->nNode.GetIndex());
// If styles are exported, indented paragraphs become definition lists
const SvxLRSpaceItem& rLRSpace =
- pNodeItemSet ? static_cast<const SvxLRSpaceItem &>(pNodeItemSet->Get(RES_LR_SPACE))
+ pNodeItemSet ? pNodeItemSet->Get(RES_LR_SPACE)
: rFormat.GetLRSpace();
if( (!rHWrt.m_bCfgOutStyles || bForceDL) && !rInfo.bInNumBulList )
{
@@ -824,8 +824,7 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
// and the text direction
SvxFrameDirection nDir = rHWrt.GetHTMLDirection(
- (pNodeItemSet ? static_cast < const SvxFrameDirectionItem& >(
- pNodeItemSet->Get( RES_FRAMEDIR ) )
+ (pNodeItemSet ? pNodeItemSet->Get( RES_FRAMEDIR )
: rFormat.GetFrameDir() ).GetValue() );
// We only write a <P>, if
@@ -2515,7 +2514,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
{
HtmlWriter aHtml(rHTMLWrt.Strm());
aHtml.single(OOO_STRING_SVTOOLS_HTML_linebreak);
- const SvxULSpaceItem& rULSpace = static_cast<const SvxULSpaceItem&>( pNd->GetSwAttrSet().Get(RES_UL_SPACE) );
+ const SvxULSpaceItem& rULSpace = pNd->GetSwAttrSet().Get(RES_UL_SPACE);
if (rULSpace.GetLower() > 0 &&
!bEndOfCell &&
!rHTMLWrt.IsHTMLMode(HTMLMODE_NO_BR_AT_PAREND) )
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index 2bd0b7800f0c..1760b97bf4f4 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -2037,8 +2037,8 @@ void SwHTMLWriter::CollectLinkTargets()
nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_URL );
for( n = 0; n < nMaxItems; ++n )
{
- if( nullptr != (pURL = static_cast<const SwFormatURL*>(pDoc->GetAttrPool().GetItem2(
- RES_URL, n ) ) ) )
+ if( nullptr != (pURL = pDoc->GetAttrPool().GetItem2(
+ RES_URL, n ) ) )
{
AddLinkTarget( pURL->GetURL() );
const ImageMap *pIMap = pURL->GetMap();
diff --git a/sw/source/filter/html/htmlnumreader.cxx b/sw/source/filter/html/htmlnumreader.cxx
index 7ae3230f7332..4904426730ff 100644
--- a/sw/source/filter/html/htmlnumreader.cxx
+++ b/sw/source/filter/html/htmlnumreader.cxx
@@ -283,8 +283,7 @@ void SwHTMLParser::NewNumBulList( HtmlTokenId nToken )
if( aPropInfo.m_bTextIndent )
{
short nTextIndent =
- static_cast<const SvxLRSpaceItem &>(aItemSet.Get( RES_LR_SPACE ))
- .GetTextFirstLineOfst();
+ aItemSet.Get( RES_LR_SPACE ).GetTextFirstLineOfst();
aNumFormat.SetFirstLineOffset( nTextIndent );
bChangeNumFormat = true;
}
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index ed8bf7fa833b..3179bfa68e21 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -241,7 +241,7 @@ void SwHTMLParser::SetSpace( const Size& rPixSpace,
if( nLeftSpace )
{
const SwFormatHoriOrient& rHoriOri =
- static_cast<const SwFormatHoriOrient&>(rFlyItemSet.Get( RES_HORI_ORIENT ));
+ rFlyItemSet.Get( RES_HORI_ORIENT );
if( text::HoriOrientation::NONE == rHoriOri.GetHoriOrient() )
{
SwFormatHoriOrient aHoriOri( rHoriOri );
@@ -277,7 +277,7 @@ void SwHTMLParser::SetSpace( const Size& rPixSpace,
if( nUpperSpace )
{
const SwFormatVertOrient& rVertOri =
- static_cast<const SwFormatVertOrient&>(rFlyItemSet.Get( RES_VERT_ORIENT ));
+ rFlyItemSet.Get( RES_VERT_ORIENT );
if( text::VertOrientation::NONE == rVertOri.GetVertOrient() )
{
SwFormatVertOrient aVertOri( rVertOri );
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index 56149052609f..17995c420482 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -760,7 +760,7 @@ void SwHTMLParser::InsertFlyFrame( const SfxItemSet& rItemSet,
const OUString& rName )
{
RndStdIds eAnchorId =
- static_cast<const SwFormatAnchor&>(rItemSet.Get( RES_ANCHOR )).GetAnchorId();
+ rItemSet.Get( RES_ANCHOR ).GetAnchorId();
// create frame
SwFlyFrameFormat* pFlyFormat = m_xDoc->MakeFlySection( eAnchorId, m_pPam->GetPoint(),
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 80ddf65f2303..33c7de3e6fe3 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -3562,8 +3562,8 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
if( nSpace )
aFrameSet.Put( SvxULSpaceItem(nSpace,nSpace, RES_UL_SPACE) );
- RndStdIds eAnchorId = static_cast<const SwFormatAnchor&>(aFrameSet.
- Get( RES_ANCHOR )).
+ RndStdIds eAnchorId = aFrameSet.
+ Get( RES_ANCHOR ).
GetAnchorId();
SwFrameFormat *pFrameFormat = m_xDoc->MakeFlySection(
eAnchorId, m_pPam->GetPoint(), &aFrameSet );
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index d8b2398b7f20..1b1cd5c950e8 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -4869,7 +4869,7 @@ void SwHTMLParser::InsertSpacer()
// create the frame
RndStdIds eAnchorId =
- static_cast<const SwFormatAnchor &>(aFrameSet.Get(RES_ANCHOR)).GetAnchorId();
+ aFrameSet.Get(RES_ANCHOR).GetAnchorId();
SwFrameFormat *pFlyFormat = m_xDoc->MakeFlySection( eAnchorId,
m_pPam->GetPoint(), &aFrameSet );
// Possibly create frames and register auto-bound frames.
@@ -5131,7 +5131,7 @@ void SwHTMLParser::InsertLineBreak()
{
if( m_pCSS1Parser->SetFormatBreak( aItemSet, aPropInfo ) )
{
- aBreakItem = static_cast<const SvxFormatBreakItem &>(aItemSet.Get( RES_BREAK ));
+ aBreakItem = aItemSet.Get( RES_BREAK );
bBreakItem = true;
}
if( !aPropInfo.m_aId.isEmpty() )
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index fb27971cf060..3213ab5ef868 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -1295,9 +1295,7 @@ void SwHTMLWriter::OutLanguage( LanguageType nLang )
SvxFrameDirection SwHTMLWriter::GetHTMLDirection( const SfxItemSet& rItemSet ) const
{
- return GetHTMLDirection(
- static_cast < const SvxFrameDirectionItem& >( rItemSet.Get( RES_FRAMEDIR ) )
- .GetValue() );
+ return GetHTMLDirection( rItemSet.Get( RES_FRAMEDIR ).GetValue() );
}
SvxFrameDirection SwHTMLWriter::GetHTMLDirection( SvxFrameDirection nDir ) const
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index d46c2d205119..eaa3b84af42b 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -7603,7 +7603,7 @@ void DocxAttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust )
const SfxItemSet* pItems = GetExport().GetCurItemSet();
const SvxFrameDirectionItem* rFrameDir = pItems?
- static_cast< const SvxFrameDirectionItem* >( pItems->GetItem( RES_FRAMEDIR ) ): nullptr;
+ pItems->GetItem( RES_FRAMEDIR ) : nullptr;
SvxFrameDirection nDir = SvxFrameDirection::Environment;
if( rFrameDir != nullptr )
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 473bcddf8abf..181764bf4607 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -2914,7 +2914,7 @@ void RtfAttributeOutput::ParaNumRule_Impl(const SwTextNode* pTextNd, sal_Int32 n
m_aStyles.append(OOO_STRING_SVTOOLS_RTF_PLAIN);
m_aStyles.append(' ');
- SvxLRSpaceItem aLR(static_cast<const SvxLRSpaceItem&>(rNdSet.Get(RES_LR_SPACE)));
+ SvxLRSpaceItem aLR(rNdSet.Get(RES_LR_SPACE));
aLR.SetTextLeft(aLR.GetTextLeft() + pFormat->GetIndentAt());
aLR.SetTextFirstLineOfst(pFormat->GetFirstLineOffset());
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index f31ae9bba61b..e98751b1b976 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -733,7 +733,7 @@ void RtfExport::ExportDocument_Impl()
sal_uInt32 const nMaxItem = rPool.GetItemCount2(RES_PROTECT);
for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
- auto pProtect = static_cast<const SvxProtectItem*>(rPool.GetItem2(RES_PROTECT, n));
+ auto pProtect = rPool.GetItem2(RES_PROTECT, n);
if (pProtect && pProtect->IsContentProtected())
{
Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_FORMPROT);
@@ -766,7 +766,7 @@ void RtfExport::ExportDocument_Impl()
if (pSet)
{
std::size_t nPosInDoc;
- pSttPgDsc = static_cast<const SwFormatPageDesc*>(&pSet->Get(RES_PAGEDESC));
+ pSttPgDsc = &pSet->Get(RES_PAGEDESC);
if (!pSttPgDsc->GetPageDesc())
pSttPgDsc = nullptr;
else if (m_pDoc->FindPageDesc(pSttPgDsc->GetPageDesc()->GetName(), &nPosInDoc))
@@ -1224,18 +1224,16 @@ void RtfExport::OutColorTable()
// shadow color
{
- auto pShadow = static_cast<const SvxShadowItem*>(GetDfltAttr(RES_SHADOW));
+ auto pShadow = GetDfltAttr(RES_SHADOW);
InsColor(pShadow->GetColor());
- if (nullptr
- != (pShadow = static_cast<const SvxShadowItem*>(rPool.GetPoolDefaultItem(RES_SHADOW))))
+ if (nullptr != (pShadow = rPool.GetPoolDefaultItem(RES_SHADOW)))
{
InsColor(pShadow->GetColor());
}
nMaxItem = rPool.GetItemCount2(RES_SHADOW);
for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
- if (nullptr
- != (pShadow = static_cast<const SvxShadowItem*>(rPool.GetItem2(RES_SHADOW, n))))
+ if (nullptr != (pShadow = rPool.GetItem2(RES_SHADOW, n)))
{
InsColor(pShadow->GetColor());
}
@@ -1245,12 +1243,12 @@ void RtfExport::OutColorTable()
// frame border color
{
const SvxBoxItem* pBox;
- if (nullptr != (pBox = static_cast<const SvxBoxItem*>(rPool.GetPoolDefaultItem(RES_BOX))))
+ if (nullptr != (pBox = rPool.GetPoolDefaultItem(RES_BOX)))
InsColorLine(*pBox);
nMaxItem = rPool.GetItemCount2(RES_BOX);
for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
- if (nullptr != (pBox = static_cast<const SvxBoxItem*>(rPool.GetItem2(RES_BOX, n))))
+ if (nullptr != (pBox = rPool.GetItem2(RES_BOX, n)))
InsColorLine(*pBox);
}
}
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 8ca637f005cf..5619ff7639f9 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -2833,8 +2833,8 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode )
cannot export that, if it's ltr then that's ok as that is word's
default. Otherwise we must add a RTL attribute to our export list
*/
- const SvxFrameDirectionItem* pItem = static_cast<const SvxFrameDirectionItem*>(
- rNode.GetSwAttrSet().GetItem(RES_FRAMEDIR));
+ const SvxFrameDirectionItem* pItem =
+ rNode.GetSwAttrSet().GetItem(RES_FRAMEDIR);
if (
(!pItem || pItem->GetValue() == SvxFrameDirection::Environment) &&
aAttrIter.IsParaRTL()
@@ -3117,8 +3117,7 @@ void MSWordExportBase::OutputSectionNode( const SwSectionNode& rSectionNode )
if ( rNd.IsContentNode() )
{
pSet = &rNd.GetContentNode()->GetSwAttrSet();
- nRstLnNum = static_cast<const SwFormatLineNumber&>(pSet->Get(
- RES_LINENUMBER )).GetStartValue();
+ nRstLnNum = pSet->Get( RES_LINENUMBER ).GetStartValue();
}
else
pSet = nullptr;
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index a61cbbc76e81..3b692e9825a0 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -974,7 +974,7 @@ MSWordSections::MSWordSections( MSWordExportBase& rExport )
const SwNode* pNd = rExport.m_pCurPam->GetContentNode();
const SfxItemSet* pSet = pNd ? &static_cast<const SwContentNode*>(pNd)->GetSwAttrSet() : nullptr;
- sal_uLong nRstLnNum = pSet ? static_cast<const SwFormatLineNumber&>(pSet->Get( RES_LINENUMBER )).GetStartValue() : 0;
+ sal_uLong nRstLnNum = pSet ? pSet->Get( RES_LINENUMBER ).GetStartValue() : 0;
const SwTableNode* pTableNd = rExport.m_pCurPam->GetNode().FindTableNode();
const SwSectionNode* pSectNd;
@@ -1069,7 +1069,7 @@ sal_uInt16 MSWordSections::NumberOfColumns( const SwDoc &rDoc, const WW8_SepInfo
if ( rInfo.pSectionFormat && reinterpret_cast<SwSectionFormat*>(sal_IntPtr(-1)) != rInfo.pSectionFormat )
aSet.Put( rInfo.pSectionFormat->GetFormatAttr( RES_COL ) );
- const SwFormatCol& rCol = static_cast<const SwFormatCol&>(aSet.Get( RES_COL ));
+ const SwFormatCol& rCol = aSet.Get( RES_COL );
const SwColumns& rColumns = rCol.GetColumns();
return rColumns.size();
}
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index c9fe09f40dfc..4a3086511b59 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -3093,7 +3093,7 @@ void MSWordExportBase::CollectOutlineBookmarks(const SwDoc &rDoc)
nMaxItems = rDoc.GetAttrPool().GetItemCount2( RES_URL );
for (sal_uInt32 n = 0; n < nMaxItems; ++n)
{
- const SwFormatURL *pURL = static_cast<const SwFormatURL*>(rDoc.GetAttrPool().GetItem2(RES_URL, n));
+ const SwFormatURL *pURL = rDoc.GetAttrPool().GetItem2(RES_URL, n);
if (!pURL)
continue;
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 34a448ef2690..98f1a58d3c5a 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -3370,8 +3370,8 @@ static bool lcl_IsAtTextEnd(const SwFormatFootnote& rFootnote)
bool bRet = true;
if( rFootnote.GetTextFootnote() )
{
- sal_uInt16 nWh = static_cast< sal_uInt16 >(rFootnote.IsEndNote() ? RES_END_AT_TXTEND
- : RES_FTN_AT_TXTEND);
+ sal_uInt16 nWh = rFootnote.IsEndNote() ? sal_uInt16(RES_END_AT_TXTEND)
+ : sal_uInt16(RES_FTN_AT_TXTEND);
const SwSectionNode* pSectNd = rFootnote.GetTextFootnote()->GetTextNode().
FindSectionNode();
while( pSectNd && FTNEND_ATPGORDOCEND ==
@@ -4497,7 +4497,7 @@ void AttributeOutputBase::FormatColumns( const SwFormatCol& rCol )
nPageSize = pFormat->GetFrameSize().GetHeight();
nPageSize -= rUL.GetUpper() + rUL.GetLower();
- const SwFormatHeader *header = dynamic_cast<const SwFormatHeader *>(pFormat->GetAttrSet().GetItem(RES_HEADER));
+ const SwFormatHeader *header = pFormat->GetAttrSet().GetItem(RES_HEADER);
if ( header )
{
const SwFrameFormat *headerFormat = header->GetHeaderFormat();
@@ -4506,7 +4506,7 @@ void AttributeOutputBase::FormatColumns( const SwFormatCol& rCol )
nPageSize -= headerFormat->GetFrameSize().GetHeight();
}
}
- const SwFormatFooter *footer = dynamic_cast<const SwFormatFooter *>(pFormat->GetAttrSet().GetItem(RES_FOOTER));
+ const SwFormatFooter *footer = pFormat->GetAttrSet().GetItem(RES_FOOTER);
if ( footer )
{
const SwFrameFormat *footerFormat = footer->GetFooterFormat();
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index b61b8147932d..90110354b647 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -1639,16 +1639,14 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject const * pSdrObj,
const SfxItemSet& rOldSet = pSdrObj->GetMergedItemSet();
// some Items can be taken over directly
- const sal_uInt16 nDirectMatch = 2;
- static RES_FRMATR const aDirectMatch[ nDirectMatch ] =
+ static sal_uInt16 const aDirectMatch[]
{
RES_LR_SPACE, // outer spacing left/right: SvxLRSpaceItem
RES_UL_SPACE // outer spacing top/bottom: SvxULSpaceItem
};
const SfxPoolItem* pPoolItem;
- for(RES_FRMATR i : aDirectMatch)
- if( SfxItemState::SET == rOldSet.GetItemState(
- static_cast< sal_uInt16 >(i), false, &pPoolItem) )
+ for(sal_uInt16 i : aDirectMatch)
+ if( SfxItemState::SET == rOldSet.GetItemState(i, false, &pPoolItem) )
{
rFlySet.Put( *pPoolItem );
}
@@ -1713,7 +1711,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject const * pSdrObj,
}
else // If a size is set, adjust it to consider border thickness
{
- SwFormatFrameSize aSize = static_cast<const SwFormatFrameSize &>(rFlySet.Get(RES_FRM_SIZE));
+ SwFormatFrameSize aSize = rFlySet.Get(RES_FRM_SIZE);
SwFormatFrameSize aNewSize = SwFormatFrameSize(bFixSize ? ATT_FIX_SIZE : ATT_VAR_SIZE,
aSize.GetWidth() + 2*nOutside,
@@ -1726,13 +1724,11 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject const * pSdrObj,
// graphic in relation to the top left inside the border. We don't
if (nOutside)
{
- SwFormatHoriOrient aHori = static_cast<const SwFormatHoriOrient &>(rFlySet.Get(
- RES_HORI_ORIENT));
+ SwFormatHoriOrient aHori = rFlySet.Get(RES_HORI_ORIENT);
aHori.SetPos(MakeSafePositioningValue(aHori.GetPos()-nOutside));
rFlySet.Put(aHori);
- SwFormatVertOrient aVert = static_cast<const SwFormatVertOrient &>(rFlySet.Get(
- RES_VERT_ORIENT));
+ SwFormatVertOrient aVert = rFlySet.Get(RES_VERT_ORIENT);
aVert.SetPos(aVert.GetPos()-nOutside);
rFlySet.Put(aVert);
}
diff --git a/sw/source/filter/xml/xmlitemm.cxx b/sw/source/filter/xml/xmlitemm.cxx
index 998e430f108d..417e0a5d96c1 100644
--- a/sw/source/filter/xml/xmlitemm.cxx
+++ b/sw/source/filter/xml/xmlitemm.cxx
@@ -26,6 +26,7 @@
#include <xmloff/xmltoken.hxx>
#include <unomid.h>
+#include <fmtfsize.hxx>
using namespace ::xmloff::token;
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index ab3ab8889aa7..239b64060bd6 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -273,7 +273,7 @@ void SwParagraphNumTabPage::Reset(const SfxItemSet* rSet)
StyleHdl_Impl(*m_pNumberStyleLB.get());
if( SfxItemState::DEFAULT <= rSet->GetItemState(RES_LINENUMBER))
{
- const SwFormatLineNumber& rNum = static_cast<const SwFormatLineNumber&>(rSet->Get(RES_LINENUMBER));
+ const SwFormatLineNumber& rNum = rSet->Get(RES_LINENUMBER);
sal_uLong nStartValue = rNum.GetStartValue();
bool bCount = rNum.IsCount();
m_pCountParaCB->SetState( bCount ? TRISTATE_TRUE : TRISTATE_FALSE );
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 404b2a0f59bc..0b44307455c6 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -1443,7 +1443,7 @@ void SwInsertSectionTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
}
else if (nId == m_nColumnPageId)
{
- const SwFormatFrameSize& rSize = static_cast<const SwFormatFrameSize&>(GetInputSetImpl()->Get(RES_FRM_SIZE));
+ const SwFormatFrameSize& rSize = GetInputSetImpl()->Get(RES_FRM_SIZE);
static_cast<SwColumnPage&>(rPage).SetPageWidth(rSize.GetWidth());
static_cast<SwColumnPage&>(rPage).ShowBalance(true);
static_cast<SwColumnPage&>(rPage).SetInSection(true);
@@ -2010,10 +2010,8 @@ void SwSectionFootnoteEndTabPage::ResetState( bool bFootnote,
void SwSectionFootnoteEndTabPage::Reset( const SfxItemSet* rSet )
{
- ResetState( true, static_cast<const SwFormatFootnoteAtTextEnd&>(rSet->Get(
- RES_FTN_AT_TXTEND, false )));
- ResetState( false, static_cast<const SwFormatEndAtTextEnd&>(rSet->Get(
- RES_END_AT_TXTEND, false )));
+ ResetState( true, rSet->Get( RES_FTN_AT_TXTEND, false ));
+ ResetState( false, rSet->Get( RES_END_AT_TXTEND, false ));
}
VclPtr<SfxTabPage> SwSectionFootnoteEndTabPage::Create( vcl::Window* pParent,
@@ -2170,7 +2168,7 @@ void SwSectionIndentTabPage::Reset( const SfxItemSet* rSet)
if ( eItemState >= SfxItemState::DEFAULT )
{
const SvxLRSpaceItem& rSpace =
- static_cast<const SvxLRSpaceItem&>(rSet->Get( RES_LR_SPACE ));
+ rSet->Get( RES_LR_SPACE );
m_pBeforeMF->SetValue( m_pBeforeMF->Normalize(rSpace.GetLeft()), FUNIT_TWIP );
m_pAfterMF->SetValue( m_pAfterMF->Normalize(rSpace.GetRight()), FUNIT_TWIP );
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index 6a1371e4926c..3c87cd77f8cd 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -311,8 +311,7 @@ IMPL_LINK( SwEnvFormatPage, EditHdl, MenuButton *, pButton, void )
aTmpSet.Put( aTabPos );
// left border as offset
- const long nOff = static_cast<const SvxLRSpaceItem&>(aTmpSet.Get( RES_LR_SPACE )).
- GetTextLeft();
+ const long nOff = aTmpSet.Get( RES_LR_SPACE ).GetTextLeft();
SfxInt32Item aOff( SID_ATTR_TABSTOP_OFFSET, nOff );
aTmpSet.Put( aOff );
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 6242abbb954f..c510ed5b4b7d 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -285,7 +285,7 @@ IMPL_LINK_NOARG(SwColumnDlg, OkHdl, Button*, void)
if(pSelectionSet && SfxItemState::SET == pSelectionSet->GetItemState(RES_COL))
{
//insert region with columns
- const SwFormatCol& rColItem = static_cast<const SwFormatCol&>(pSelectionSet->Get(RES_COL));
+ const SwFormatCol& rColItem = pSelectionSet->Get(RES_COL);
//only if there actually are columns!
if(rColItem.GetNumCols() > 1)
rWrtShell.GetView().GetViewFrame()->GetDispatcher()->Execute(
@@ -603,8 +603,8 @@ void SwColumnPage::Reset(const SfxItemSet *rSet)
m_pColMgr->SetActualWidth(FRAME_FORMAT_WIDTH);
else
{
- const SwFormatFrameSize& rSize = static_cast<const SwFormatFrameSize&>(rSet->Get(RES_FRM_SIZE));
- const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>(rSet->Get(RES_BOX));
+ const SwFormatFrameSize& rSize = rSet->Get(RES_FRM_SIZE);
+ const SvxBoxItem& rBox = rSet->Get(RES_BOX);
m_pColMgr->SetActualWidth((sal_uInt16)rSize.GetSize().Width() - rBox.GetSmallestDistance());
}
}
@@ -620,7 +620,7 @@ void SwColumnPage::Reset(const SfxItemSet *rSet)
//text direction
if( SfxItemState::DEFAULT <= rSet->GetItemState( RES_FRAMEDIR ) )
{
- const SvxFrameDirectionItem& rItem = static_cast<const SvxFrameDirectionItem&>(rSet->Get(RES_FRAMEDIR));
+ const SvxFrameDirectionItem& rItem = rSet->Get(RES_FRAMEDIR);
SvxFrameDirection nVal = rItem.GetValue();
const sal_Int32 nPos = m_pTextDirectionLB->GetEntryPos( reinterpret_cast<void*>(nVal) );
m_pTextDirectionLB->SelectEntryPos( nPos );
@@ -1209,7 +1209,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
if (SfxItemState::DEFAULT <= rSet.GetItemState(RES_FRAMEDIR))
{
const SvxFrameDirectionItem& rDirItem =
- static_cast<const SvxFrameDirectionItem&>(rSet.Get(RES_FRAMEDIR));
+ rSet.Get(RES_FRAMEDIR);
bVertical = rDirItem.GetValue() == SvxFrameDirection::Vertical_RL_TB||
rDirItem.GetValue() == SvxFrameDirection::Vertical_LR_TB;
}
@@ -1224,17 +1224,15 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
if (!bVertical)
{
- const SvxLRSpaceItem& rLRSpace = static_cast<const SvxLRSpaceItem&>(rSet.Get(
- RES_LR_SPACE ));
- const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>( rSet.Get(RES_BOX));
+ const SvxLRSpaceItem& rLRSpace = rSet.Get(RES_LR_SPACE);
+ const SvxBoxItem& rBox = rSet.Get(RES_BOX);
nActWidth = rSize.GetSize().Width()
- rLRSpace.GetLeft() - rLRSpace.GetRight() - rBox.GetSmallestDistance();
}
else
{
- const SvxULSpaceItem& rULSpace = static_cast<const SvxULSpaceItem&>(rSet.Get(
- RES_UL_SPACE ));
- const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>( rSet.Get(RES_BOX));
+ const SvxULSpaceItem& rULSpace = rSet.Get( RES_UL_SPACE );
+ const SvxBoxItem& rBox = rSet.Get(RES_BOX);
nActWidth = rSize.GetSize().Height()
- rULSpace.GetUpper() - rULSpace.GetLower() - rBox.GetSmallestDistance();
@@ -1258,8 +1256,8 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
m_pFrameExampleWN->Show();
// Size
- const SwFormatFrameSize& rSize = static_cast<const SwFormatFrameSize&>(rSet.Get(RES_FRM_SIZE));
- const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>( rSet.Get(RES_BOX));
+ const SwFormatFrameSize& rSize = rSet.Get(RES_FRM_SIZE);
+ const SvxBoxItem& rBox = rSet.Get(RES_BOX);
sal_uInt16 nTotalWish;
if (m_bFormat)
diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx
index 43f37545cece..178ed41f3fd1 100644
--- a/sw/source/ui/frmdlg/frmdlg.cxx
+++ b/sw/source/ui/frmdlg/frmdlg.cxx
@@ -164,8 +164,7 @@ void SwFrameDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
static_cast<SwColumnPage&>(rPage).SetFrameMode(true);
static_cast<SwColumnPage&>(rPage).SetFormatUsed(m_bFormat);
- const SwFormatFrameSize& rSize = static_cast<const SwFormatFrameSize&>(
- m_rSet.Get( RES_FRM_SIZE ));
+ const SwFormatFrameSize& rSize = m_rSet.Get( RES_FRM_SIZE );
static_cast<SwColumnPage&>(rPage).SetPageWidth( rSize.GetWidth() );
}
else if (nId == m_nMacroId)
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 8574f8ce7e90..f93d0fcffbb9 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -910,7 +910,7 @@ void SwFramePage::Reset( const SfxItemSet *rSet )
SetMetric( *m_pAtVertPosED, aMetric );
const SfxPoolItem* pItem = nullptr;
- const SwFormatAnchor& rAnchor = static_cast<const SwFormatAnchor&>(rSet->Get(RES_ANCHOR));
+ const SwFormatAnchor& rAnchor = rSet->Get(RES_ANCHOR);
if (SfxItemState::SET == rSet->GetItemState(FN_OLE_IS_MATH, false, &pItem))
m_bIsMathOLE = static_cast<const SfxBoolItem*>(pItem)->GetValue();
@@ -965,7 +965,7 @@ void SwFramePage::Reset( const SfxItemSet *rSet )
}
else
{
- m_aGrfSize = static_cast<const SwFormatFrameSize&>(rSet->Get(RES_FRM_SIZE)).GetSize();
+ m_aGrfSize = rSet->Get(RES_FRM_SIZE).GetSize();
}
// entering procent value made possible
@@ -974,7 +974,7 @@ void SwFramePage::Reset( const SfxItemSet *rSet )
//the available space is not yet known so the RefValue has to be calculated from size and relative size values
//this is needed only if relative values are already set
- const SwFormatFrameSize& rFrameSize = static_cast<const SwFormatFrameSize&>(rSet->Get(RES_FRM_SIZE));
+ const SwFormatFrameSize& rFrameSize = rSet->Get(RES_FRM_SIZE);
m_pRelWidthRelationLB->InsertEntry(SvxSwFramePosString::GetString(SwFPos::FRAME));
m_pRelWidthRelationLB->InsertEntry(SvxSwFramePosString::GetString(SwFPos::REL_PG_FRAME));
@@ -1020,7 +1020,7 @@ void SwFramePage::Reset( const SfxItemSet *rSet )
// i#18732 - init checkbox value
{
const bool bFollowTextFlow =
- static_cast<const SwFormatFollowTextFlow&>(rSet->Get(RES_FOLLOW_TEXT_FLOW)).GetValue();
+ rSet->Get(RES_FOLLOW_TEXT_FLOW).GetValue();
m_pFollowTextFlowCB->Check( bFollowTextFlow );
}
@@ -1092,8 +1092,7 @@ bool SwFramePage::FillItemSet(SfxItemSet *rSet)
if ( m_pHMap )
{
- SwFormatHoriOrient aHoriOrient( static_cast<const SwFormatHoriOrient&>(
- rOldSet.Get(RES_HORI_ORIENT)) );
+ SwFormatHoriOrient aHoriOrient( rOldSet.Get(RES_HORI_ORIENT) );
const sal_Int32 nMapPos = GetMapPos(m_pHMap, *m_pHorizontalDLB);
const sal_Int16 eHOri = GetAlignment(m_pHMap, nMapPos, *m_pHoriRelationLB);
@@ -1128,8 +1127,7 @@ bool SwFramePage::FillItemSet(SfxItemSet *rSet)
if ( m_pVMap )
{
// alignment vertical
- SwFormatVertOrient aVertOrient( static_cast<const SwFormatVertOrient&>(
- rOldSet.Get(RES_VERT_ORIENT)) );
+ SwFormatVertOrient aVertOrient( rOldSet.Get(RES_VERT_ORIENT) );
const sal_Int32 nMapPos = GetMapPos(m_pVMap, *m_pVerticalDLB);
const sal_Int16 eVOri = GetAlignment(m_pVMap, nMapPos, *m_pVertRelationLB);
@@ -1173,7 +1171,7 @@ bool SwFramePage::FillItemSet(SfxItemSet *rSet)
// for a graphic that isn't even loaded, are set. Then no SetSize
// is done here when the size settings were not changed by the
// user.
- const SwFormatFrameSize& rOldSize = static_cast<const SwFormatFrameSize& >(rOldSet.Get(RES_FRM_SIZE));
+ const SwFormatFrameSize& rOldSize = rOldSet.Get(RES_FRM_SIZE);
SwFormatFrameSize aSz( rOldSize );
sal_Int32 nRelWidthRelation = m_pRelWidthRelationLB->GetSelectedEntryPos();
@@ -1869,7 +1867,7 @@ void SwFramePage::RangeModifyHdl()
if(GetTabDialog()->GetExampleSet() &&
SfxItemState::DEFAULT <= GetTabDialog()->GetExampleSet()->GetItemState(RES_COL))
{
- const SwFormatCol& rCol = static_cast<const SwFormatCol&>(GetTabDialog()->GetExampleSet()->Get(RES_COL));
+ const SwFormatCol& rCol = GetTabDialog()->GetExampleSet()->Get(RES_COL);
if ( rCol.GetColumns().size() > 1 )
{
for (const SwColumn & i : rCol.GetColumns())
@@ -2202,7 +2200,7 @@ void SwFramePage::Init(const SfxItemSet& rSet, bool bReset)
}
}
- const SwFormatFrameSize& rSize = static_cast<const SwFormatFrameSize&>(rSet.Get(RES_FRM_SIZE));
+ const SwFormatFrameSize& rSize = rSet.Get(RES_FRM_SIZE);
sal_Int64 nWidth = m_aWidthED.NormalizePercent(rSize.GetWidth());
sal_Int64 nHeight = m_aHeightED.NormalizePercent(rSize.GetHeight());
@@ -2258,7 +2256,7 @@ void SwFramePage::Init(const SfxItemSet& rSet, bool bReset)
m_pAutoHeightCB->Hide();
// organise circulation-gap for character bound frames
- const SvxULSpaceItem &rUL = static_cast<const SvxULSpaceItem &>(rSet.Get(RES_UL_SPACE));
+ const SvxULSpaceItem &rUL = rSet.Get(RES_UL_SPACE);
m_nUpperBorder = rUL.GetUpper();
m_nLowerBorder = rUL.GetLower();
@@ -2269,7 +2267,7 @@ void SwFramePage::Init(const SfxItemSet& rSet, bool bReset)
}
// columns
- SwFormatCol aCol( static_cast<const SwFormatCol&>(rSet.Get(RES_COL)) );
+ SwFormatCol aCol( rSet.Get(RES_COL) );
::FitToActualSize( aCol, (sal_uInt16)rSize.GetWidth() );
RndStdIds eAnchorId = GetAnchor();
@@ -2278,8 +2276,8 @@ void SwFramePage::Init(const SfxItemSet& rSet, bool bReset)
InitPos(eAnchorId, -1, 0, -1, 0, LONG_MAX, LONG_MAX);
else
{
- const SwFormatHoriOrient& rHori = static_cast<const SwFormatHoriOrient&>(rSet.Get(RES_HORI_ORIENT));
- const SwFormatVertOrient& rVert = static_cast<const SwFormatVertOrient&>(rSet.Get(RES_VERT_ORIENT));
+ const SwFormatHoriOrient& rHori = rSet.Get(RES_HORI_ORIENT);
+ const SwFormatVertOrient& rVert = rSet.Get(RES_VERT_ORIENT);
m_nOldH = rHori.GetHoriOrient();
m_nOldHRel = rHori.GetRelationOrient();
m_nOldV = rVert.GetVertOrient();
@@ -2311,12 +2309,12 @@ void SwFramePage::Init(const SfxItemSet& rSet, bool bReset)
// transparent for example
// circulation for example
- const SwFormatSurround& rSurround = static_cast<const SwFormatSurround&>(rSet.Get(RES_SURROUND));
+ const SwFormatSurround& rSurround = rSet.Get(RES_SURROUND);
m_pExampleWN->SetWrap( rSurround.GetSurround() );
if ( rSurround.GetSurround() == css::text::WrapTextMode_THROUGH )
{
- const SvxOpaqueItem& rOpaque = static_cast<const SvxOpaqueItem&>(rSet.Get(RES_OPAQUE));
+ const SvxOpaqueItem& rOpaque = rSet.Get(RES_OPAQUE);
m_pExampleWN->SetTransparent(!rOpaque.GetValue());
}
@@ -2462,7 +2460,7 @@ void SwGrfExtPage::Reset(const SfxItemSet *rSet)
void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet)
{
- const SvxProtectItem& rProt = static_cast<const SvxProtectItem& >(rSet.Get(RES_PROTECT));
+ const SvxProtectItem& rProt = rSet.Get(RES_PROTECT);
bool bProtContent = rProt.IsContentProtected();
const SfxPoolItem* pItem = nullptr;
@@ -3105,16 +3103,16 @@ void SwFrameAddPage::Reset(const SfxItemSet *rSet )
}
}
// Pos Protected
- const SvxProtectItem& rProt = static_cast<const SvxProtectItem& >(rSet->Get(RES_PROTECT));
+ const SvxProtectItem& rProt = rSet->Get(RES_PROTECT);
m_pProtectFrameCB->Check(rProt.IsPosProtected());
m_pProtectContentCB->Check(rProt.IsContentProtected());
m_pProtectSizeCB->Check(rProt.IsSizeProtected());
- const SwFormatEditInReadonly& rEdit = static_cast<const SwFormatEditInReadonly& >(rSet->Get(RES_EDIT_IN_READONLY));
+ const SwFormatEditInReadonly& rEdit = rSet->Get(RES_EDIT_IN_READONLY);
m_pEditInReadonlyCB->Check(rEdit.GetValue()); m_pEditInReadonlyCB->SaveValue();
// print
- const SvxPrintItem& rPrt = static_cast<const SvxPrintItem&>(rSet->Get(RES_PRINT));
+ const SvxPrintItem& rPrt = rSet->Get(RES_PRINT);
m_pPrintFrameCB->Check(rPrt.GetValue()); m_pPrintFrameCB->SaveValue();
// textflow
@@ -3130,7 +3128,7 @@ void SwFrameAddPage::Reset(const SfxItemSet *rSet )
{
m_pTextFlowLB->RemoveEntry(m_pTextFlowLB->GetEntryPos(reinterpret_cast<void*>(SvxFrameDirection::Vertical_RL_TB)));
}
- SvxFrameDirection nVal = static_cast<const SvxFrameDirectionItem&>(rSet->Get(RES_FRAMEDIR)).GetValue();
+ SvxFrameDirection nVal = rSet->Get(RES_FRAMEDIR).GetValue();
sal_Int32 nPos;
for( nPos = m_pTextFlowLB->GetEntryCount(); nPos; )
if( static_cast<SvxFrameDirection>(reinterpret_cast<sal_IntPtr>(m_pTextFlowLB->GetEntryData( --nPos ))) == nVal )
@@ -3147,7 +3145,7 @@ void SwFrameAddPage::Reset(const SfxItemSet *rSet )
// Content alignment
if ( rSet->GetItemState(RES_TEXT_VERT_ADJUST) > SfxItemState::DEFAULT )
{
- SdrTextVertAdjust nAdjust = static_cast<const SdrTextVertAdjustItem&>(rSet->Get(RES_TEXT_VERT_ADJUST)).GetValue();
+ SdrTextVertAdjust nAdjust = rSet->Get(RES_TEXT_VERT_ADJUST).GetValue();
sal_Int32 nPos = 0;
switch(nAdjust)
{
@@ -3172,7 +3170,7 @@ bool SwFrameAddPage::FillItemSet(SfxItemSet *rSet)
bRet |= nullptr != rSet->Put(SfxStringItem(FN_UNO_DESCRIPTION, m_pDescriptionED->GetText()));
const SfxPoolItem* pOldItem;
- SvxProtectItem aProt ( static_cast<const SvxProtectItem& >(GetItemSet().Get(RES_PROTECT)) );
+ SvxProtectItem aProt ( GetItemSet().Get(RES_PROTECT) );
aProt.SetContentProtect( m_pProtectContentCB->IsChecked() );
aProt.SetSizeProtect ( m_pProtectSizeCB->IsChecked() );
aProt.SetPosProtect ( m_pProtectFrameCB->IsChecked() );
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index 21f07d980816..2447745edc86 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -187,10 +187,10 @@ void SwWrapTabPage::Reset(const SfxItemSet *rSet)
SetMetric(*m_pTopMarginED, aMetric);
SetMetric(*m_pBottomMarginED, aMetric);
- const SwFormatSurround& rSurround = static_cast<const SwFormatSurround&>(rSet->Get(RES_SURROUND));
+ const SwFormatSurround& rSurround = rSet->Get(RES_SURROUND);
css::text::WrapTextMode nSur = rSurround.GetSurround();
- const SwFormatAnchor &rAnch = static_cast<const SwFormatAnchor&>(rSet->Get(RES_ANCHOR));
+ const SwFormatAnchor &rAnch = rSet->Get(RES_ANCHOR);
m_nAnchorId = rAnch.GetAnchorId();
if (((m_nAnchorId == RndStdIds::FLY_AT_PARA) || (m_nAnchorId == RndStdIds::FLY_AT_CHAR))
@@ -226,7 +226,7 @@ void SwWrapTabPage::Reset(const SfxItemSet *rSet)
if (!m_bDrawMode)
{
- const SvxOpaqueItem& rOpaque = static_cast<const SvxOpaqueItem&>(rSet->Get(RES_OPAQUE));
+ const SvxOpaqueItem& rOpaque = rSet->Get(RES_OPAQUE);
m_pWrapTransparentCB->Check(!rOpaque.GetValue());
}
break;
@@ -264,8 +264,8 @@ void SwWrapTabPage::Reset(const SfxItemSet *rSet)
}
m_pWrapTransparentCB->Enable( pBtn == m_pWrapThroughRB && !m_bHtmlMode );
- const SvxULSpaceItem& rUL = static_cast<const SvxULSpaceItem&>(rSet->Get(RES_UL_SPACE));
- const SvxLRSpaceItem& rLR = static_cast<const SvxLRSpaceItem&>(rSet->Get(RES_LR_SPACE));
+ const SvxULSpaceItem& rUL = rSet->Get(RES_UL_SPACE);
+ const SvxLRSpaceItem& rLR = rSet->Get(RES_LR_SPACE);
// gap to text
m_pLeftMarginED->SetValue(m_pLeftMarginED->Normalize(rLR.GetLeft()), FUNIT_TWIP);
@@ -282,14 +282,14 @@ bool SwWrapTabPage::FillItemSet(SfxItemSet *rSet)
{
bool bModified = false;
const SfxPoolItem* pOldItem;
- const SwFormatSurround& rOldSur = static_cast<const SwFormatSurround&>(GetItemSet().Get(RES_SURROUND));
+ const SwFormatSurround& rOldSur = GetItemSet().Get(RES_SURROUND);
SwFormatSurround aSur( rOldSur );
SvxOpaqueItem aOp( RES_OPAQUE);
if (!m_bDrawMode)
{
- const SvxOpaqueItem& rOpaque = static_cast<const SvxOpaqueItem&>(GetItemSet().Get(RES_OPAQUE));
+ const SvxOpaqueItem& rOpaque = GetItemSet().Get(RES_OPAQUE);
aOp = rOpaque;
aOp.SetValue(true);
}
@@ -383,7 +383,7 @@ bool SwWrapTabPage::FillItemSet(SfxItemSet *rSet)
void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
{
// anchor
- const SwFormatAnchor &rAnch = static_cast<const SwFormatAnchor&>(rSet.Get(RES_ANCHOR));
+ const SwFormatAnchor &rAnch = rSet.Get(RES_ANCHOR);
m_nAnchorId = rAnch.GetAnchorId();
bool bEnable = (m_nAnchorId != RndStdIds::FLY_AS_CHAR);
@@ -394,19 +394,18 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
SvxSwFrameValidation aVal;
// size
- const SwFormatFrameSize& rFrameSize = static_cast<const SwFormatFrameSize&>(rSet.Get(RES_FRM_SIZE));
+ const SwFormatFrameSize& rFrameSize = rSet.Get(RES_FRM_SIZE);
Size aSize = rFrameSize.GetSize();
// position
- const SwFormatHoriOrient& rHori = static_cast<const SwFormatHoriOrient&>(rSet.Get(RES_HORI_ORIENT));
- const SwFormatVertOrient& rVert = static_cast<const SwFormatVertOrient&>(rSet.Get(RES_VERT_ORIENT));
+ const SwFormatHoriOrient& rHori = rSet.Get(RES_HORI_ORIENT);
+ const SwFormatVertOrient& rVert = rSet.Get(RES_VERT_ORIENT);
aVal.nAnchorType = m_nAnchorId;
aVal.bAutoHeight = rFrameSize.GetHeightSizeType() == ATT_MIN_SIZE;
aVal.bMirror = rHori.IsPosToggle();
// #i18732#
- aVal.bFollowTextFlow =
- static_cast<const SwFormatFollowTextFlow&>(rSet.Get(RES_FOLLOW_TEXT_FLOW)).GetValue();
+ aVal.bFollowTextFlow = rSet.Get(RES_FOLLOW_TEXT_FLOW).GetValue();
aVal.nHoriOrient = (short)rHori.GetHoriOrient();
aVal.nVertOrient = (short)rVert.GetVertOrient();
@@ -473,13 +472,13 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
RangeModifyHdl(*m_pTopMarginED);
}
- const SwFormatSurround& rSurround = static_cast<const SwFormatSurround&>(rSet.Get(RES_SURROUND));
+ const SwFormatSurround& rSurround = rSet.Get(RES_SURROUND);
css::text::WrapTextMode nSur = rSurround.GetSurround();
m_pWrapTransparentCB->Enable( bEnable && !m_bHtmlMode && nSur == css::text::WrapTextMode_THROUGH );
if(m_bHtmlMode)
{
- const SwFormatHoriOrient& rHori = static_cast<const SwFormatHoriOrient&>(rSet.Get(RES_HORI_ORIENT));
+ const SwFormatHoriOrient& rHori = rSet.Get(RES_HORI_ORIENT);
sal_Int16 eHOrient = rHori.GetHoriOrient();
sal_Int16 eHRelOrient = rHori.GetRelationOrient();
m_pWrapOutlineCB->Hide();
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 0fbc5b42f22d..5d557f334c3d 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -357,7 +357,7 @@ void SwMultiTOXTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
}
else if(nId == m_nColumnId)
{
- const SwFormatFrameSize& rSize = static_cast<const SwFormatFrameSize&>(GetInputSetImpl()->Get(RES_FRM_SIZE));
+ const SwFormatFrameSize& rSize = GetInputSetImpl()->Get(RES_FRM_SIZE);
static_cast<SwColumnPage&>(rPage).SetPageWidth(rSize.GetWidth());
}
diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx
index 78a1b0149967..f086622de253 100644
--- a/sw/source/ui/misc/linenum.cxx
+++ b/sw/source/ui/misc/linenum.cxx
@@ -150,7 +150,7 @@ SwLineNumberingDlg::SwLineNumberingDlg(SwView const *pVw)
if(xStyleSheet.is())
{
SfxItemSet& rSet = xStyleSheet->GetItemSet();
- const SwFormatLineNumber &aFormat = static_cast<const SwFormatLineNumber&>(rSet.Get(RES_LINENUMBER));
+ const SwFormatLineNumber &aFormat = rSet.Get(RES_LINENUMBER);
if(aFormat.IsCount())
m_pNumberingOnFooterHeader->SetState(TRISTATE_TRUE);
else
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index 1de19dfc3340..3da76ea63a5b 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -281,7 +281,7 @@ bool SwFootNotePage::FillItemSet(SfxItemSet *rSet)
void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
{
- auto const & rSize = static_cast<SwFormatFrameSize const &>(rSet.Get( RES_FRM_SIZE ));
+ auto const & rSize = rSet.Get( RES_FRM_SIZE );
lMaxHeight = rSize.GetHeight();
const SfxPoolItem* pItem;
@@ -315,7 +315,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
if ( rSet.GetItemState( RES_UL_SPACE , false ) == SfxItemState::SET )
{
- const SvxULSpaceItem &rUL = static_cast<const SvxULSpaceItem&>(rSet.Get( RES_UL_SPACE ));
+ const SvxULSpaceItem &rUL = rSet.Get( RES_UL_SPACE );
lMaxHeight -= rUL.GetUpper() + rUL.GetLower();
}
diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index 3c39eb3ed1ab..b638fe796b67 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -209,7 +209,7 @@ void SwTextGridPage::Reset(const SfxItemSet *rSet)
{
if(SfxItemState::DEFAULT <= rSet->GetItemState(RES_TEXTGRID))
{
- const SwTextGridItem& rGridItem = static_cast<const SwTextGridItem&>(rSet->Get(RES_TEXTGRID));
+ const SwTextGridItem& rGridItem = rSet->Get(RES_TEXTGRID);
RadioButton* pButton = nullptr;
switch(rGridItem.GetGridType())
{
@@ -299,7 +299,7 @@ void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet)
if( SfxItemState::UNKNOWN != rSet.GetItemState( RES_FRAMEDIR ))
{
const SvxFrameDirectionItem& rDirItem =
- static_cast<const SvxFrameDirectionItem&>(rSet.Get(RES_FRAMEDIR));
+ rSet.Get(RES_FRAMEDIR);
m_bVertical = rDirItem.GetValue() == SvxFrameDirection::Vertical_RL_TB||
rDirItem.GetValue() == SvxFrameDirection::Vertical_LR_TB;
}
@@ -308,11 +308,9 @@ void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet)
return;
const SvxSizeItem& rSize = rSet.Get(SID_ATTR_PAGE_SIZE);
- const SvxLRSpaceItem& rLRSpace = static_cast<const SvxLRSpaceItem&>(rSet.Get(
- RES_LR_SPACE ));
- const SvxULSpaceItem& rULSpace = static_cast<const SvxULSpaceItem&>(rSet.Get(
- RES_UL_SPACE ));
- const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>( rSet.Get(RES_BOX));
+ const SvxLRSpaceItem& rLRSpace = rSet.Get( RES_LR_SPACE );
+ const SvxULSpaceItem& rULSpace = rSet.Get( RES_UL_SPACE );
+ const SvxBoxItem& rBox = rSet.Get(RES_BOX);
sal_Int32 nDistanceLR = rLRSpace.GetLeft() + rLRSpace.GetRight();
sal_Int32 nDistanceUL = rULSpace.GetUpper() + rULSpace.GetLower();
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 60a181468fef..6f8bdafbb0b4 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -1426,8 +1426,7 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet* rSet )
m_pPgBrkBeforeRB->IsValueChangedFromSaved() ||
m_pPgBrkRB->IsValueChangedFromSaved() ))
{
- SvxFormatBreakItem aBreak(
- static_cast<const SvxFormatBreakItem&>(GetItemSet().Get( RES_BREAK )) );
+ SvxFormatBreakItem aBreak( GetItemSet().Get( RES_BREAK ) );
if(bIsChecked)
{
diff --git a/sw/source/uibase/app/appopt.cxx b/sw/source/uibase/app/appopt.cxx
index 946e5f6a2aab..6be4c2407e13 100644
--- a/sw/source/uibase/app/appopt.cxx
+++ b/sw/source/uibase/app/appopt.cxx
@@ -342,8 +342,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
// Background only in WebDialog
if(SfxItemState::SET == rSet.GetItemState(RES_BACKGROUND))
{
- const SvxBrushItem& rBrushItem = static_cast<const SvxBrushItem&>(rSet.Get(
- RES_BACKGROUND));
+ const SvxBrushItem& rBrushItem = rSet.Get(RES_BACKGROUND);
aViewOpt.SetRetoucheColor( rBrushItem.GetColor() );
}
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 5154491973a6..d08e740121b1 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -465,7 +465,7 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
{
SfxItemSet aSet( m_pWrtShell->GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
m_pWrtShell->GetFlyFrameAttr( aSet );
- const SwFormatURL& rURL = static_cast<const SwFormatURL&>(aSet.Get( RES_URL ));
+ const SwFormatURL& rURL = aSet.Get( RES_URL );
if( rURL.GetMap() )
m_pImageMap.reset(new ImageMap( *rURL.GetMap() ));
else if( !rURL.GetURL().isEmpty() )
@@ -986,7 +986,7 @@ int SwTransferable::PrepareForCopy( bool bIsCut )
{
SfxItemSet aSet( m_pWrtShell->GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
m_pWrtShell->GetFlyFrameAttr( aSet );
- const SwFormatURL& rURL = static_cast<const SwFormatURL&>(aSet.Get( RES_URL ));
+ const SwFormatURL& rURL = aSet.Get( RES_URL );
if( rURL.GetMap() )
{
m_pImageMap.reset( new ImageMap( *rURL.GetMap() ) );
@@ -1991,7 +1991,7 @@ bool SwTransferable::PasteTargetURL( TransferableDataHelper& rData,
{
SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
rSh.GetFlyFrameAttr( aSet );
- SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) );
+ SwFormatURL aURL( aSet.Get( RES_URL ) );
if( aURL.GetURL() != aINetImg.GetTargetURL() ||
aURL.GetTargetFrameName() != aINetImg.GetTargetFrame() )
@@ -2381,7 +2381,7 @@ bool SwTransferable::PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
{
SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
rSh.GetFlyFrameAttr( aSet );
- SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) );
+ SwFormatURL aURL( aSet.Get( RES_URL ) );
aURL.SetURL( aBkmk.GetURL(), false );
aSet.Put( aURL );
rSh.SetFlyFrameAttr( aSet );
@@ -2437,7 +2437,7 @@ bool SwTransferable::PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
{
SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
rSh.GetFlyFrameAttr( aSet );
- SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) );
+ SwFormatURL aURL( aSet.Get( RES_URL ) );
aURL.SetMap( &aMap );
aSet.Put( aURL );
rSh.SetFlyFrameAttr( aSet );
@@ -2456,7 +2456,7 @@ bool SwTransferable::PasteImageMap( TransferableDataHelper& rData,
{
SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
rSh.GetFlyFrameAttr( aSet );
- SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) );
+ SwFormatURL aURL( aSet.Get( RES_URL ) );
const ImageMap* pOld = aURL.GetMap();
// set or replace, that is the question
@@ -2497,7 +2497,7 @@ bool SwTransferable::PasteAsHyperlink( TransferableDataHelper& rData,
{
SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
rSh.GetFlyFrameAttr( aSet );
- SwFormatURL aURL2( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) );
+ SwFormatURL aURL2( aSet.Get( RES_URL ) );
aURL2.SetURL( sFile, false );
if( aURL2.GetName().isEmpty() )
aURL2.SetName( sFile );
@@ -2591,7 +2591,7 @@ bool SwTransferable::PasteFileName( TransferableDataHelper& rData,
{
SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
rSh.GetFlyFrameAttr( aSet );
- SwFormatURL aURL2( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) );
+ SwFormatURL aURL2( aSet.Get( RES_URL ) );
aURL2.SetURL( sFile, false );
if( aURL2.GetName().isEmpty() )
aURL2.SetName( sFile );
@@ -3122,7 +3122,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
{
SfxItemSet aSet( m_pWrtShell->GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
m_pWrtShell->GetFlyFrameAttr( aSet );
- const SwFormatURL& rURL = static_cast<const SwFormatURL&>(aSet.Get( RES_URL ));
+ const SwFormatURL& rURL = aSet.Get( RES_URL );
if( rURL.GetMap() )
{
m_pImageMap.reset( new ImageMap( *rURL.GetMap() ) );
@@ -3332,7 +3332,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
{
SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
rSh.GetFlyFrameAttr( aSet );
- SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) );
+ SwFormatURL aURL( aSet.Get( RES_URL ) );
aURL.SetURL( aTmp.GetURL(), false );
aSet.Put( aURL );
rSh.SetFlyFrameAttr( aSet );
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index edb94d575e5d..748c4b2136fe 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -1019,7 +1019,7 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, bool bWeb )
RES_COL, RES_COL,
RES_FOLLOW_TEXT_FLOW, RES_FOLLOW_TEXT_FLOW>{});
rSh.GetFlyFrameAttr( aSet );
- RndStdIds eAnchorId = static_cast<const SwFormatAnchor&>(aSet.Get(RES_ANCHOR)).GetAnchorId();
+ RndStdIds eAnchorId = aSet.Get(RES_ANCHOR).GetAnchorId();
Size aSnap;
bool bHuge(MOVE_LEFT_HUGE == nDir ||
MOVE_UP_HUGE == nDir ||
@@ -1055,10 +1055,10 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, bool bWeb )
// adjustment for allowing vertical position
// aligned to page for fly frame anchored to paragraph or to character.
{
- SwFormatVertOrient aVert( static_cast<const SwFormatVertOrient&>(aSet.Get(RES_VERT_ORIENT)) );
+ SwFormatVertOrient aVert( aSet.Get(RES_VERT_ORIENT) );
const bool bFollowTextFlow =
- static_cast<const SwFormatFollowTextFlow&>(aSet.Get(RES_FOLLOW_TEXT_FLOW)).GetValue();
- const SwPosition* pToCharContentPos = static_cast<const SwFormatAnchor&>(aSet.Get(RES_ANCHOR)).GetContentAnchor();
+ aSet.Get(RES_FOLLOW_TEXT_FLOW).GetValue();
+ const SwPosition* pToCharContentPos = aSet.Get(RES_ANCHOR).GetContentAnchor();
rSh.CalcBoundRect( aBoundRect, eAnchorId,
text::RelOrientation::FRAME, aVert.GetRelationOrient(),
pToCharContentPos, bFollowTextFlow,
@@ -1109,7 +1109,7 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, bool bWeb )
aDiff = 0;
else if ( aDiff < -aTmp.Height() )
aDiff = -aTmp.Height();
- SwFormatVertOrient aVert( static_cast<const SwFormatVertOrient&>(aSet.Get(RES_VERT_ORIENT)) );
+ SwFormatVertOrient aVert( aSet.Get(RES_VERT_ORIENT) );
sal_Int16 eNew;
if( bWeb )
{
@@ -1150,7 +1150,7 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, bool bWeb )
if (bWeb && (RndStdIds::FLY_AT_PARA == eAnchorId)
&& ( nDir==MOVE_LEFT_SMALL || nDir==MOVE_RIGHT_BIG ))
{
- SwFormatHoriOrient aHori( static_cast<const SwFormatHoriOrient&>(aSet.Get(RES_HORI_ORIENT)) );
+ SwFormatHoriOrient aHori( aSet.Get(RES_HORI_ORIENT) );
sal_Int16 eNew;
eNew = aHori.GetHoriOrient();
switch( eNew )
diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx
index c7c481f35c3d..cd71648e72fc 100644
--- a/sw/source/uibase/frmdlg/colex.cxx
+++ b/sw/source/uibase/frmdlg/colex.cxx
@@ -44,8 +44,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
{
if (SfxItemState::DEFAULT <= rSet.GetItemState(RES_FRAMEDIR))
{
- const SvxFrameDirectionItem& rDirItem =
- static_cast<const SvxFrameDirectionItem&>(rSet.Get(RES_FRAMEDIR));
+ const SvxFrameDirectionItem& rDirItem = rSet.Get(RES_FRAMEDIR);
m_bVertical = rDirItem.GetValue() == SvxFrameDirection::Vertical_RL_TB||
rDirItem.GetValue() == SvxFrameDirection::Vertical_LR_TB;
}
@@ -128,7 +127,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
if(SfxItemState::SET == rHeaderSet.GetItemState(RES_BACKGROUND))
{
// create FillAttributes from SvxBrushItem //SetHdColor(rItem.GetColor());
- const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rHeaderSet.Get(RES_BACKGROUND));
+ const SvxBrushItem& rItem = rHeaderSet.Get(RES_BACKGROUND);
SfxItemSet aTempSet(*rHeaderSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
@@ -166,7 +165,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
if( rFooterSet.GetItemState( RES_BACKGROUND ) == SfxItemState::SET )
{
// create FillAttributes from SvxBrushItem //SetFtColor(rItem.GetColor());
- const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rFooterSet.Get(RES_BACKGROUND));
+ const SvxBrushItem& rItem = rFooterSet.Get(RES_BACKGROUND);
SfxItemSet aTempSet(*rFooterSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
@@ -612,7 +611,7 @@ void SwPageGridExample::UpdateExample( const SfxItemSet& rSet )
DELETEZ(pGridItem);
//get the grid information
if(SfxItemState::DEFAULT <= rSet.GetItemState(RES_TEXTGRID))
- pGridItem = static_cast<SwTextGridItem*>(static_cast<const SwTextGridItem&>(rSet.Get(RES_TEXTGRID)).Clone());
+ pGridItem = static_cast<SwTextGridItem*>(rSet.Get(RES_TEXTGRID).Clone());
SwPageExample::UpdateExample(rSet);
}
diff --git a/sw/source/uibase/frmdlg/colmgr.cxx b/sw/source/uibase/frmdlg/colmgr.cxx
index 5231eb6ef6b6..ade307c7c29c 100644
--- a/sw/source/uibase/frmdlg/colmgr.cxx
+++ b/sw/source/uibase/frmdlg/colmgr.cxx
@@ -110,12 +110,12 @@ void SwColMgr::SetActualWidth(sal_uInt16 nW)
// ctor
SwColMgr::SwColMgr(const SfxItemSet& rSet) :
- aFormatCol(static_cast<const SwFormatCol&>(rSet.Get(RES_COL)))
+ aFormatCol(rSet.Get(RES_COL))
{
- nWidth = (sal_uInt16)static_cast<const SwFormatFrameSize&>(rSet.Get(RES_FRM_SIZE)).GetWidth();
+ nWidth = (sal_uInt16)rSet.Get(RES_FRM_SIZE).GetWidth();
if (nWidth < MINLAY)
nWidth = USHRT_MAX;
- const SvxLRSpaceItem &rLR = static_cast<const SvxLRSpaceItem&>(rSet.Get(RES_LR_SPACE));
+ const SvxLRSpaceItem &rLR = rSet.Get(RES_LR_SPACE);
nWidth = nWidth - (sal_uInt16)rLR.GetLeft();
nWidth = nWidth - (sal_uInt16)rLR.GetRight();
::FitToActualSize(aFormatCol, nWidth);
diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx
index 2bf04a3cce44..2a7bce931465 100644
--- a/sw/source/uibase/frmdlg/frmmgr.cxx
+++ b/sw/source/uibase/frmdlg/frmmgr.cxx
@@ -254,7 +254,7 @@ void SwFlyFrameAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
// OD 18.09.2003 #i18732# - adjustment for allowing vertical position
// aligned to page for fly frame anchored to paragraph or to character.
const RndStdIds eAnchorType = rVal.nAnchorType;
- const SwFormatFrameSize& rSize = static_cast<const SwFormatFrameSize&>(m_aSet.Get(RES_FRM_SIZE));
+ const SwFormatFrameSize& rSize = m_aSet.Get(RES_FRM_SIZE);
m_pOwnSh->CalcBoundRect( aBoundRect, eAnchorType,
rVal.nHRelOrient,
rVal.nVRelOrient,
@@ -518,7 +518,7 @@ void SwFlyFrameAttrMgr::SetLRSpace( long nLeft, long nRight )
{
OSL_ENSURE( LONG_MAX != nLeft && LONG_MAX != nRight, "Which border to set?" );
- SvxLRSpaceItem aTmp( static_cast<const SvxLRSpaceItem&>(m_aSet.Get( RES_LR_SPACE )) );
+ SvxLRSpaceItem aTmp( m_aSet.Get( RES_LR_SPACE ) );
if( LONG_MAX != nLeft )
aTmp.SetLeft( sal_uInt16(nLeft) );
if( LONG_MAX != nRight )
@@ -530,7 +530,7 @@ void SwFlyFrameAttrMgr::SetULSpace( long nTop, long nBottom )
{
OSL_ENSURE(LONG_MAX != nTop && LONG_MAX != nBottom, "Which border to set?" );
- SvxULSpaceItem aTmp( static_cast<const SvxULSpaceItem&>(m_aSet.Get( RES_UL_SPACE )) );
+ SvxULSpaceItem aTmp( m_aSet.Get( RES_UL_SPACE ) );
if( LONG_MAX != nTop )
aTmp.SetUpper( sal_uInt16(nTop) );
if( LONG_MAX != nBottom )
diff --git a/sw/source/uibase/inc/frmmgr.hxx b/sw/source/uibase/inc/frmmgr.hxx
index e0f939ff2223..1bc51b9f1801 100644
--- a/sw/source/uibase/inc/frmmgr.hxx
+++ b/sw/source/uibase/inc/frmmgr.hxx
@@ -137,28 +137,28 @@ public:
inline const Size& SwFlyFrameAttrMgr::GetSize() const
{
- return static_cast<const SwFormatFrameSize&>(m_aSet.Get(RES_FRM_SIZE)).GetSize();
+ return m_aSet.Get(RES_FRM_SIZE).GetSize();
}
inline const SwFormatVertOrient &SwFlyFrameAttrMgr::GetVertOrient() const
{
- return static_cast<const SwFormatVertOrient&>(m_aSet.Get(RES_VERT_ORIENT));
+ return m_aSet.Get(RES_VERT_ORIENT);
}
inline const SwFormatHoriOrient &SwFlyFrameAttrMgr::GetHoriOrient() const
{
- return static_cast<const SwFormatHoriOrient &>(m_aSet.Get(RES_HORI_ORIENT));
+ return m_aSet.Get(RES_HORI_ORIENT);
}
inline const SwFormatFrameSize& SwFlyFrameAttrMgr::GetFrameSize() const
{
- return static_cast<const SwFormatFrameSize&>(m_aSet.Get(RES_FRM_SIZE));
+ return m_aSet.Get(RES_FRM_SIZE);
}
inline const SvxShadowItem &SwFlyFrameAttrMgr::GetShadow() const
{
- return static_cast<const SvxShadowItem&>(m_aSet.Get(RES_SHADOW));
+ return m_aSet.Get(RES_SHADOW);
}
inline const SvxBoxItem &SwFlyFrameAttrMgr::GetBox() const
{
- return static_cast<const SvxBoxItem&>(m_aSet.Get(RES_BOX));
+ return m_aSet.Get(RES_BOX);
}
inline Point SwFlyFrameAttrMgr::GetPos() const
{
@@ -166,7 +166,7 @@ inline Point SwFlyFrameAttrMgr::GetPos() const
}
inline RndStdIds SwFlyFrameAttrMgr::GetAnchor() const
{
- return static_cast<const SwFormatAnchor&>(m_aSet.Get(RES_ANCHOR)).GetAnchorId();
+ return m_aSet.Get(RES_ANCHOR).GetAnchorId();
}
#endif
diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx
index a32ee16bb905..7bfea2cb6b9d 100644
--- a/sw/source/uibase/ribbar/drawbase.cxx
+++ b/sw/source/uibase/ribbar/drawbase.cxx
@@ -286,7 +286,7 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
if(m_pWin->GetFrameColCount() > 1)
{
SfxItemSet aSet(m_pView->GetPool(),svl::Items<RES_COL,RES_COL>{});
- SwFormatCol aCol(static_cast<const SwFormatCol&>(aSet.Get(RES_COL)));
+ SwFormatCol aCol(aSet.Get(RES_COL));
aCol.Init(m_pWin->GetFrameColCount(), aCol.GetGutterWidth(), aCol.GetWishWidth());
aSet.Put(aCol);
// Template AutoUpdate
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 7428455dfb7b..df7f9072fce7 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -173,7 +173,7 @@ static void lcl_UpdateIMapDlg( SwWrtShell& rSh )
SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
rSh.GetFlyFrameAttr( aSet );
- const SwFormatURL &rURL = static_cast<const SwFormatURL&>(aSet.Get( RES_URL ));
+ const SwFormatURL &rURL = aSet.Get( RES_URL );
SvxIMapDlgChildWindow::UpdateIMapDlg(
aGrf, rURL.GetMap(), pList.get(), pEditObj );
}
@@ -996,7 +996,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
{
SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
rSh.GetFlyFrameAttr( aSet );
- SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) );
+ SwFormatURL aURL( aSet.Get( RES_URL ) );
aURL.SetMap( &pDlg->GetImageMap() );
aSet.Put( aURL );
rSh.SetFlyFrameAttr( aSet );
@@ -1031,7 +1031,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
rSh.StartAction();
SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_SURROUND, RES_SURROUND>{});
rSh.GetFlyFrameAttr( aSet );
- SwFormatSurround aSur( static_cast<const SwFormatSurround&>(aSet.Get( RES_SURROUND )) );
+ SwFormatSurround aSur( aSet.Get( RES_SURROUND ) );
if ( !aSur.IsContour() )
{
aSur.SetContour( true );
@@ -1094,9 +1094,9 @@ void SwBaseShell::Execute(SfxRequest &rReq)
SfxItemSet aSet(GetPool(), svl::Items<RES_SURROUND, RES_HORI_ORIENT>{});
rSh.GetFlyFrameAttr(aSet);
- const SwFormatSurround& rSurround = static_cast<const SwFormatSurround&>(aSet.Get(RES_SURROUND));
- const SwFormatVertOrient& rVert = static_cast<const SwFormatVertOrient&>(aSet.Get(RES_VERT_ORIENT));
- const SwFormatHoriOrient& rHori = static_cast<const SwFormatHoriOrient&>(aSet.Get(RES_HORI_ORIENT));
+ const SwFormatSurround& rSurround = aSet.Get(RES_SURROUND);
+ const SwFormatVertOrient& rVert = aSet.Get(RES_VERT_ORIENT);
+ const SwFormatHoriOrient& rHori = aSet.Get(RES_HORI_ORIENT);
sal_Int16 eVOrient = rVert.GetVertOrient();
sal_Int16 eHOrient = rHori.GetHoriOrient();
css::text::WrapTextMode eSurround = rSurround.GetSurround();
@@ -1340,7 +1340,7 @@ IMPL_LINK_NOARG(SwBaseShell, GraphicArrivedHdl, SwCursorShell&, void)
{
SfxItemSet aSet(GetPool(), svl::Items<RES_SURROUND, RES_SURROUND>{});
rSh.GetFlyFrameAttr(aSet);
- const SwFormatSurround& rWrap = static_cast<const SwFormatSurround&>(aSet.Get(RES_SURROUND));
+ const SwFormatSurround& rWrap = aSet.Get(RES_SURROUND);
bSetState = true;
bState = rWrap.IsContour();
}
@@ -1634,7 +1634,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
rSh.GetObjAttr(aSet);
else
rSh.GetFlyFrameAttr(aSet);
- RndStdIds eSet = static_cast<const SwFormatAnchor&>(aSet.Get(RES_ANCHOR)).GetAnchorId();
+ RndStdIds eSet = aSet.Get(RES_ANCHOR).GetAnchorId();
const bool bSet =
((nWhich == FN_TOOL_ANCHOR_PAGE) &&
(eSet == RndStdIds::FLY_AT_PAGE))
@@ -1682,11 +1682,11 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
else
{
rSh.GetFlyFrameAttr(aSet);
- nAnchorType = static_cast<const SwFormatAnchor&>(aSet.Get(RES_ANCHOR)).GetAnchorId();
+ nAnchorType = aSet.Get(RES_ANCHOR).GetAnchorId();
}
- const SwFormatSurround& rWrap = static_cast<const SwFormatSurround&>(aSet.Get(RES_SURROUND));
+ const SwFormatSurround& rWrap = aSet.Get(RES_SURROUND);
- const SvxOpaqueItem& rOpaque = static_cast<const SvxOpaqueItem&>(aSet.Get(RES_OPAQUE));
+ const SvxOpaqueItem& rOpaque = aSet.Get(RES_OPAQUE);
bool bOpaque = rOpaque.GetValue();
css::text::WrapTextMode nSurround = rWrap.GetSurround();
bool bSet = false;
@@ -1853,7 +1853,7 @@ void SwBaseShell::SetWrapMode( sal_uInt16 nSlot )
rSh.GetObjAttr(aSet);
else
rSh.GetFlyFrameAttr(aSet);
- SwFormatSurround aWrap( static_cast<const SwFormatSurround&>(aSet.Get(RES_SURROUND)) );
+ SwFormatSurround aWrap( aSet.Get(RES_SURROUND) );
css::text::WrapTextMode nOldSurround(aWrap.GetSurround());
css::text::WrapTextMode nSurround = css::text::WrapTextMode_PARALLEL;
@@ -1922,7 +1922,7 @@ void SwBaseShell::SetWrapMode( sal_uInt16 nSlot )
bOpaque = !rSh.GetLayerId();
else
{
- const SvxOpaqueItem aOpaque( static_cast<const SvxOpaqueItem&>(aSet.Get(RES_OPAQUE)) );
+ const SvxOpaqueItem aOpaque( aSet.Get(RES_OPAQUE) );
bOpaque = !aOpaque.GetValue();
}
}
@@ -2541,8 +2541,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
if ( pDlg->Execute() == RET_OK )
{
- rSh.SetBoxBackground( static_cast<const SvxBrushItem&>(
- pDlg->GetOutputItemSet()->Get( RES_BACKGROUND )));
+ rSh.SetBoxBackground( pDlg->GetOutputItemSet()->Get( RES_BACKGROUND ) );
pOutSet = pDlg->GetOutputItemSet();
}
}
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index cfb535a0dfa9..790c291aa5d9 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -168,7 +168,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
SfxItemSet aSet(GetPool(),svl::Items<RES_COL,RES_COL>{});
rSh.GetFlyFrameAttr( aSet );
- SwFormatCol aCol(static_cast<const SwFormatCol&>(aSet.Get(RES_COL)));
+ SwFormatCol aCol(aSet.Get(RES_COL));
// GutterWidth will not always passed, hence get firstly
// (see view2: Execute on this slot)
sal_uInt16 nGutterWidth = aCol.GetGutterWidth();
@@ -203,7 +203,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
SfxItemSet aSet( rSh.GetAttrPool(), svl::Items<RES_URL, RES_URL>{} );
rSh.GetFlyFrameAttr( aSet );
- SwFormatURL aURL( static_cast<const SwFormatURL&>(aSet.Get( RES_URL )) );
+ SwFormatURL aURL( aSet.Get( RES_URL ) );
OUString sOldName(rHLinkItem.GetName().toAsciiUpperCase());
OUString sFlyName(rSh.GetFlyName().toAsciiUpperCase());
@@ -457,7 +457,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
aSet.SetParent( aMgr.GetAttrSet().GetParent() );
// On % values initialize size
- SwFormatFrameSize& rSize = const_cast<SwFormatFrameSize&>(static_cast<const SwFormatFrameSize&>(aSet.Get(RES_FRM_SIZE)));
+ SwFormatFrameSize& rSize = const_cast<SwFormatFrameSize&>(aSet.Get(RES_FRM_SIZE));
if (rSize.GetWidthPercent() && rSize.GetWidthPercent() != SwFormatFrameSize::SYNCED)
rSize.SetWidth(rSh.GetAnyCurRect(CurRectType::FlyEmbedded).Width());
if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != SwFormatFrameSize::SYNCED)
@@ -999,13 +999,13 @@ void SwFrameShell::ExecFrameStyle(SfxRequest const & rReq)
// At first pick the default BoxItem out of the pool.
// If unequal to regular box item, then it has already
// been changed (New one is no default).
- const SvxBoxItem* pPoolBoxItem = static_cast<const SvxBoxItem*>(::GetDfltAttr(RES_BOX));
+ const SvxBoxItem* pPoolBoxItem = ::GetDfltAttr(RES_BOX);
const SfxItemSet *pArgs = rReq.GetArgs();
SfxItemSet aFrameSet(rSh.GetAttrPool(), svl::Items<RES_BOX, RES_BOX>{});
rSh.GetFlyFrameAttr( aFrameSet );
- const SvxBoxItem& rBoxItem = static_cast<const SvxBoxItem&>(aFrameSet.Get(RES_BOX));
+ const SvxBoxItem& rBoxItem = aFrameSet.Get(RES_BOX);
if (pPoolBoxItem == &rBoxItem)
bDefault = true;
@@ -1198,7 +1198,7 @@ void SwFrameShell::GetLineStyleState(SfxItemSet &rSet)
rSh.GetFlyFrameAttr(aFrameSet);
- const SvxBorderLine* pLine = static_cast<const SvxBoxItem&>(aFrameSet.Get(RES_BOX)).GetTop();
+ const SvxBorderLine* pLine = aFrameSet.Get(RES_BOX).GetTop();
rSet.Put(SvxColorItem(pLine ? pLine->GetColor() : Color(), SID_FRAME_LINECOLOR));
}
}
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index bda2b2b395ff..a8d2850bccbd 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -336,7 +336,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
aSet.SetParent( aMgr.GetAttrSet().GetParent() );
// At percentage values initialize size
- SwFormatFrameSize aSizeCopy = static_cast<const SwFormatFrameSize&>(aSet.Get(RES_FRM_SIZE));
+ SwFormatFrameSize aSizeCopy = aSet.Get(RES_FRM_SIZE);
if (aSizeCopy.GetWidthPercent() && aSizeCopy.GetWidthPercent() != SwFormatFrameSize::SYNCED)
aSizeCopy.SetWidth(rSh.GetAnyCurRect(CurRectType::FlyEmbedded).Width());
if (aSizeCopy.GetHeightPercent() && aSizeCopy.GetHeightPercent() != SwFormatFrameSize::SYNCED)
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 818a1074ba73..330d72a10269 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -477,8 +477,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
SvxBoxInfoItem aCoreInfo( SID_ATTR_BORDER_INNER );
aCoreSet.Put(aCoreInfo);
rSh.GetTabBorders( aCoreSet );
- const SvxBoxItem& rCoreBox = static_cast<const SvxBoxItem&>(
- aCoreSet.Get(RES_BOX));
+ const SvxBoxItem& rCoreBox = aCoreSet.Get(RES_BOX);
const SfxPoolItem *pBoxItem = nullptr;
if ( pArgs->GetItemState(RES_BOX, true, &pBoxItem) == SfxItemState::SET )
{
@@ -1446,7 +1445,7 @@ void SwTableShell::GetLineStyleState(SfxItemSet &rSet)
aCoreSet.Put(aCoreInfo);
GetShell().GetTabBorders( aCoreSet );
- const SvxBoxItem& rBoxItem = static_cast<const SvxBoxItem&>(aCoreSet.Get( RES_BOX ));
+ const SvxBoxItem& rBoxItem = aCoreSet.Get( RES_BOX );
const SvxBorderLine* pLine = rBoxItem.GetTop();
rSet.Put( SvxColorItem( pLine ? pLine->GetColor() : Color(), SID_FRAME_LINECOLOR ) );
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index 98f453e299ab..5f12d98a3a5d 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -867,7 +867,7 @@ SfxItemSet SwTextShell::CreateInsertFrameItemSet(SwFlyFrameAttrMgr& rMgr)
// Delete minimum size in columns.
SvxBoxInfoItem aBoxInfo(aSet.Get(SID_ATTR_BORDER_INNER));
- const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>(aSet.Get(RES_BOX));
+ const SvxBoxItem& rBox = aSet.Get(RES_BOX);
aBoxInfo.SetMinDist(false);
aBoxInfo.SetDefDist(rBox.GetDistance(SvxBoxItemLine::LEFT));
aSet.Put(aBoxInfo);
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 191dc8683f05..7303d53b3566 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -959,7 +959,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
// Left border as offset
//#i24363# tab stops relative to indent
const long nOff = rWrtSh.getIDocumentSettingAccess().get(DocumentSettingId::TABS_RELATIVE_TO_INDENT) ?
- static_cast<const SvxLRSpaceItem&>(aCoreSet.Get( RES_LR_SPACE )).GetTextLeft() : 0;
+ aCoreSet.Get( RES_LR_SPACE ).GetTextLeft() : 0;
SfxInt32Item aOff( SID_ATTR_TABSTOP_OFFSET, nOff );
aCoreSet.Put( aOff );
diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx
index 101d0d3a1122..765d116811a5 100644
--- a/sw/source/uibase/shells/txtattr.cxx
+++ b/sw/source/uibase/shells/txtattr.cxx
@@ -720,7 +720,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
eState = aCoreSet.GetItemState(RES_LR_SPACE);
if( eState >= SfxItemState::DEFAULT )
{
- SvxLRSpaceItem aLR = static_cast<const SvxLRSpaceItem&>( aCoreSet.Get( RES_LR_SPACE ) );
+ SvxLRSpaceItem aLR = aCoreSet.Get( RES_LR_SPACE );
aLR.SetWhich(nSlot);
rSet.Put(aLR);
}
@@ -746,7 +746,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
aCoreSet.GetItemState( RES_FRAMEDIR, false ) >= SfxItemState::DEFAULT)
{
SvxFrameDirection eFrameDir =
- static_cast<const SvxFrameDirectionItem& >(aCoreSet.Get(RES_FRAMEDIR)).GetValue();
+ aCoreSet.Get(RES_FRAMEDIR).GetValue();
if (SvxFrameDirection::Environment == eFrameDir)
{
eFrameDir = rSh.IsInRightToLeftText() ?
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index 06ed70fa4def..c4e79e9e4199 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -629,7 +629,7 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
// Default tab at pos 0
SfxItemSet aSet( GetPool(), svl::Items<RES_LR_SPACE, RES_LR_SPACE>{} );
rSh.GetCurAttr( aSet );
- const SvxLRSpaceItem& rLR = static_cast<const SvxLRSpaceItem&>(aSet.Get(RES_LR_SPACE));
+ const SvxLRSpaceItem& rLR = aSet.Get(RES_LR_SPACE);
if ( rLR.GetTextFirstLineOfst() < 0 )
{
@@ -656,7 +656,7 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
{
SfxItemSet aLRSpaceSet( GetPool(), svl::Items<RES_LR_SPACE, RES_LR_SPACE>{} );
rSh.GetCurAttr( aLRSpaceSet );
- SvxLRSpaceItem aParaMargin( static_cast<const SvxLRSpaceItem&>( aLRSpaceSet.Get( RES_LR_SPACE ) ) );
+ SvxLRSpaceItem aParaMargin( aLRSpaceSet.Get( RES_LR_SPACE ) );
SvxLRSpaceItem aNewMargin( RES_LR_SPACE );
aNewMargin.SetTextLeft( aParaMargin.GetTextLeft() + aParaMargin.GetTextFirstLineOfst() );
@@ -686,8 +686,7 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
// has to consider the left indent of the paragraph
SfxItemSet aSet( GetPool(), svl::Items<RES_LR_SPACE, RES_LR_SPACE>{} );
rSh.GetCurAttr( aSet );
- const SvxLRSpaceItem& rLR =
- static_cast<const SvxLRSpaceItem&>(aSet.Get(RES_LR_SPACE));
+ const SvxLRSpaceItem& rLR = aSet.Get(RES_LR_SPACE);
SwPosition aPos(*m_pNumRuleNodeFromDoc);
// #i90078#
@@ -772,8 +771,7 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
{
SfxItemSet aULSpaceSet( GetPool(), svl::Items<RES_UL_SPACE, RES_UL_SPACE>{} );
rSh.GetCurAttr( aULSpaceSet );
- SvxULSpaceItem aULSpace(
- static_cast< const SvxULSpaceItem& >( aULSpaceSet.Get( RES_UL_SPACE ) ) );
+ SvxULSpaceItem aULSpace( aULSpaceSet.Get( RES_UL_SPACE ) );
sal_uInt16 nUpper = aULSpace.GetUpper();
sal_uInt16 nLower = aULSpace.GetLower();
@@ -907,7 +905,7 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
SwFormatCol aCols(
bSect ?
pSectFormat->GetCol() :
- static_cast<const SwFormatCol&>(aSet.Get( RES_COL, false )));
+ aSet.Get( RES_COL, false ));
SwRect aCurRect = rSh.GetAnyCurRect(bSect ? CurRectType::SectionPrt : CurRectType::FlyEmbeddedPrt);
const long lWidth = bVerticalWriting ? aCurRect.Height() : aCurRect.Width();
::lcl_ConvertToCols( aColItem, lWidth, aCols );
@@ -1477,7 +1475,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SvxLRSpaceItem aLR( RES_LR_SPACE );
if ( !IsTabColFromDoc() )
{
- aLR = static_cast<const SvxLRSpaceItem&>(aCoreSet.Get(RES_LR_SPACE));
+ aLR = aCoreSet.Get(RES_LR_SPACE);
// #i23726#
if (m_pNumRuleNodeFromDoc)
@@ -1505,7 +1503,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
case SID_PARASPACE_INCREASE:
case SID_PARASPACE_DECREASE:
{
- SvxULSpaceItem aUL = static_cast<const SvxULSpaceItem&>(aCoreSet.Get(RES_UL_SPACE));
+ SvxULSpaceItem aUL = aCoreSet.Get(RES_UL_SPACE);
SfxItemState e = aCoreSet.GetItemState(RES_UL_SPACE);
if( e >= SfxItemState::DEFAULT )
{
@@ -1558,14 +1556,14 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
aCoreSet.Put( aBoxInfo );
rSh.GetFlyFrameAttr( aCoreSet );
- const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>(aCoreSet.Get(RES_BOX));
+ const SvxBoxItem& rBox = aCoreSet.Get(RES_BOX);
aDistLR.SetLeft(rBox.GetDistance(SvxBoxItemLine::LEFT));
aDistLR.SetRight(rBox.GetDistance(SvxBoxItemLine::RIGHT));
//add the paragraph border distance
SfxItemSet aCoreSet1( GetPool(), svl::Items<RES_BOX, RES_BOX>{} );
rSh.GetCurAttr( aCoreSet1 );
- const SvxBoxItem& rParaBox = static_cast<const SvxBoxItem&>(aCoreSet1.Get(RES_BOX));
+ const SvxBoxItem& rParaBox = aCoreSet1.Get(RES_BOX);
aDistLR.SetLeft(aDistLR.GetLeft() + rParaBox.GetDistance(SvxBoxItemLine::LEFT));
aDistLR.SetRight(aDistLR.GetRight() + rParaBox.GetDistance(SvxBoxItemLine::RIGHT));
}
@@ -1585,14 +1583,14 @@ void SwView::StateTabWin(SfxItemSet& rSet)
aBoxInfo.SetDist(true);
aCoreSet2.Put(aBoxInfo);
rSh.GetTabBorders( aCoreSet2 );
- const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>(aCoreSet2.Get(RES_BOX));
+ const SvxBoxItem& rBox = aCoreSet2.Get(RES_BOX);
aDistLR.SetLeft(rBox.GetDistance(SvxBoxItemLine::LEFT));
aDistLR.SetRight(rBox.GetDistance(SvxBoxItemLine::RIGHT));
//add the border distance of the paragraph
SfxItemSet aCoreSet1( GetPool(), svl::Items<RES_BOX, RES_BOX>{} );
rSh.GetCurAttr( aCoreSet1 );
- const SvxBoxItem& rParaBox = static_cast<const SvxBoxItem&>(aCoreSet1.Get(RES_BOX));
+ const SvxBoxItem& rParaBox = aCoreSet1.Get(RES_BOX);
aDistLR.SetLeft(aDistLR.GetLeft() + rParaBox.GetDistance(SvxBoxItemLine::LEFT));
aDistLR.SetRight(aDistLR.GetRight() + rParaBox.GetDistance(SvxBoxItemLine::RIGHT));
rSet.Put(aDistLR);
@@ -1603,7 +1601,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
//get the page/header/footer border distance
const SwFrameFormat& rMaster = rDesc.GetMaster();
- const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>(rMaster.GetAttrSet().Get(RES_BOX));
+ const SvxBoxItem& rBox = rMaster.GetAttrSet().Get(RES_BOX);
aDistLR.SetLeft(rBox.GetDistance(SvxBoxItemLine::LEFT));
aDistLR.SetRight(rBox.GetDistance(SvxBoxItemLine::RIGHT));
@@ -1632,7 +1630,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
//add the border distance of the paragraph
SfxItemSet aCoreSetTmp( GetPool(), svl::Items<RES_BOX, RES_BOX>{} );
rSh.GetCurAttr( aCoreSetTmp );
- const SvxBoxItem& rParaBox = static_cast<const SvxBoxItem&>(aCoreSetTmp.Get(RES_BOX));
+ const SvxBoxItem& rParaBox = aCoreSetTmp.Get(RES_BOX);
aDistLR.SetLeft(aDistLR.GetLeft() + rParaBox.GetDistance(SvxBoxItemLine::LEFT));
aDistLR.SetRight(aDistLR.GetRight() + rParaBox.GetDistance(SvxBoxItemLine::RIGHT));
rSet.Put(aDistLR);
diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx
index 2b2c90f5ac2e..6c2a7d04d272 100644
--- a/sw/source/uibase/wrtsh/delete.cxx
+++ b/sw/source/uibase/wrtsh/delete.cxx
@@ -50,7 +50,7 @@ bool SwWrtShell::TryRemoveIndent()
SfxItemSet aAttrSet(GetAttrPool(), svl::Items<RES_LR_SPACE, RES_LR_SPACE>{});
GetCurAttr(aAttrSet);
- SvxLRSpaceItem aItem = static_cast<const SvxLRSpaceItem &>(aAttrSet.Get(RES_LR_SPACE));
+ SvxLRSpaceItem aItem = aAttrSet.Get(RES_LR_SPACE);
short aOldFirstLineOfst = aItem.GetTextFirstLineOfst();
if (aOldFirstLineOfst > 0)