summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-12-11 20:57:45 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-12-12 21:12:10 +0100
commit2431477337f4ac4384ba615f76bfb5904f1a3b47 (patch)
tree6f676441983e9b3c8440600d09a49478353e1faf /sw
parent23cfd3d1004f5ddda8cd79878c00b6c64f20068c (diff)
use covariant return type for SfxPoolItem::Clone
and can then remove some casting Change-Id: Id821c32ca2cbcdb7f57ef7a5fa1960042e630ffc Reviewed-on: https://gerrit.libreoffice.org/85022 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/ccoll.hxx2
-rw-r--r--sw/inc/cellatr.hxx6
-rw-r--r--sw/inc/fchrfmt.hxx2
-rw-r--r--sw/inc/fmtanchr.hxx2
-rw-r--r--sw/inc/fmtautofmt.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/fmtflcnt.hxx2
-rw-r--r--sw/inc/fmtfld.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/fmtftn.hxx2
-rw-r--r--sw/inc/fmtftntx.hxx4
-rw-r--r--sw/inc/fmthdft.hxx4
-rw-r--r--sw/inc/fmtinfmt.hxx2
-rw-r--r--sw/inc/fmtline.hxx2
-rw-r--r--sw/inc/fmtlsplt.hxx2
-rw-r--r--sw/inc/fmtmeta.hxx2
-rw-r--r--sw/inc/fmtornt.hxx4
-rw-r--r--sw/inc/fmtpdsc.hxx2
-rw-r--r--sw/inc/fmtrfmrk.hxx2
-rw-r--r--sw/inc/fmtrowsplt.hxx2
-rw-r--r--sw/inc/fmtruby.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/grfatr.hxx24
-rw-r--r--sw/inc/hfspacingitem.hxx2
-rw-r--r--sw/inc/hints.hxx2
-rw-r--r--sw/inc/paratr.hxx8
-rw-r--r--sw/inc/tblafmt.hxx10
-rw-r--r--sw/inc/tgrditem.hxx2
-rw-r--r--sw/inc/tox.hxx2
-rw-r--r--sw/source/core/attr/cellatr.cxx6
-rw-r--r--sw/source/core/attr/fmtfollowtextflow.cxx2
-rw-r--r--sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx2
-rw-r--r--sw/source/core/attr/format.cxx2
-rw-r--r--sw/source/core/attr/hints.cxx2
-rw-r--r--sw/source/core/doc/DocumentStylePoolManager.cxx10
-rw-r--r--sw/source/core/doc/doclay.cxx4
-rw-r--r--sw/source/core/doc/tblafmt.cxx16
-rw-r--r--sw/source/core/doc/tblrwcl.cxx2
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx4
-rw-r--r--sw/source/core/graphic/grfatr.cxx25
-rw-r--r--sw/source/core/layout/atrfrm.cxx46
-rw-r--r--sw/source/core/layout/frmtool.cxx2
-rw-r--r--sw/source/core/para/paratr.cxx9
-rw-r--r--sw/source/core/text/porfld.cxx2
-rw-r--r--sw/source/core/tox/ToxTextGenerator.cxx3
-rw-r--r--sw/source/core/tox/tox.cxx2
-rw-r--r--sw/source/core/txtnode/atrfld.cxx2
-rw-r--r--sw/source/core/txtnode/atrflyin.cxx2
-rw-r--r--sw/source/core/txtnode/atrftn.cxx2
-rw-r--r--sw/source/core/txtnode/atrref.cxx2
-rw-r--r--sw/source/core/txtnode/fmtatr2.cxx10
-rw-r--r--sw/source/core/undo/unattr.cxx3
-rw-r--r--sw/source/core/unocore/unoframe.cxx4
-rw-r--r--sw/source/core/unocore/unosett.cxx2
-rw-r--r--sw/source/core/unocore/unostyle.cxx10
-rw-r--r--sw/source/core/unocore/unotbl.cxx12
-rw-r--r--sw/source/filter/basflt/fltini.cxx2
-rw-r--r--sw/source/filter/basflt/fltshell.cxx10
-rw-r--r--sw/source/filter/html/htmlcss1.cxx2
-rw-r--r--sw/source/filter/html/svxcss1.cxx2
-rw-r--r--sw/source/filter/html/swhtml.cxx2
-rw-r--r--sw/source/filter/inc/fltshell.hxx10
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx9
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx4
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx4
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx2
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx2
-rw-r--r--sw/source/uibase/chrdlg/ccoll.cxx2
-rw-r--r--sw/source/uibase/config/cfgitems.cxx10
-rw-r--r--sw/source/uibase/dialog/swwrtshitem.cxx2
-rw-r--r--sw/source/uibase/envelp/envimg.cxx2
-rw-r--r--sw/source/uibase/envelp/labimg.cxx2
-rw-r--r--sw/source/uibase/frmdlg/colex.cxx2
-rw-r--r--sw/source/uibase/inc/cfgitems.hxx10
-rw-r--r--sw/source/uibase/inc/envimg.hxx2
-rw-r--r--sw/source/uibase/inc/labimg.hxx2
-rw-r--r--sw/source/uibase/inc/swwrtshitem.hxx2
-rw-r--r--sw/source/uibase/inc/uiitems.hxx8
-rw-r--r--sw/source/uibase/shells/frmsh.cxx2
-rw-r--r--sw/source/uibase/shells/textsh.cxx2
-rw-r--r--sw/source/uibase/uiview/srcview.cxx2
-rw-r--r--sw/source/uibase/uiview/viewsrch.cxx6
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx4
-rw-r--r--sw/source/uibase/utlui/uiitems.cxx10
95 files changed, 216 insertions, 219 deletions
diff --git a/sw/inc/ccoll.hxx b/sw/inc/ccoll.hxx
index 9fa8e7468321..b4d94c5c483f 100644
--- a/sw/inc/ccoll.hxx
+++ b/sw/inc/ccoll.hxx
@@ -52,7 +52,7 @@ public:
SwCondCollItem & operator =(SwCondCollItem const &) = delete; // due to SfxPoolItem
SwCondCollItem & operator =(SwCondCollItem &&) = delete; // due to SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwCondCollItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
static const CommandStruct* GetCmds() { return aCmds; }
diff --git a/sw/inc/cellatr.hxx b/sw/inc/cellatr.hxx
index 3b9de189478f..9c4c8a58281b 100644
--- a/sw/inc/cellatr.hxx
+++ b/sw/inc/cellatr.hxx
@@ -40,7 +40,7 @@ public:
// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwTableBoxNumFormat* Clone( SfxItemPool* pPool = nullptr ) const override;
SwTableBoxNumFormat& operator=( const SwTableBoxNumFormat& rAttr )
{
@@ -59,7 +59,7 @@ public:
// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwTableBoxFormula* Clone( SfxItemPool* pPool = nullptr ) const override;
const SwModify* GetDefinedIn() const { return m_pDefinedIn; }
void ChgDefinedIn( const SwModify* pNew )
@@ -84,7 +84,7 @@ public:
// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwTableBoxValue* Clone( SfxItemPool* pPool = nullptr ) const override;
SwTableBoxValue& operator=( const SwTableBoxValue& rCmp )
{
diff --git a/sw/inc/fchrfmt.hxx b/sw/inc/fchrfmt.hxx
index bef670ffef5f..acca285590ea 100644
--- a/sw/inc/fchrfmt.hxx
+++ b/sw/inc/fchrfmt.hxx
@@ -50,7 +50,7 @@ public:
/// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwFormatCharFormat* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
diff --git a/sw/inc/fmtanchr.hxx b/sw/inc/fmtanchr.hxx
index 6bba4ce42267..d04b2afcd488 100644
--- a/sw/inc/fmtanchr.hxx
+++ b/sw/inc/fmtanchr.hxx
@@ -52,7 +52,7 @@ public:
/// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwFormatAnchor* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
diff --git a/sw/inc/fmtautofmt.hxx b/sw/inc/fmtautofmt.hxx
index 9d7638b67a44..5773bffd5329 100644
--- a/sw/inc/fmtautofmt.hxx
+++ b/sw/inc/fmtautofmt.hxx
@@ -35,7 +35,7 @@ public:
/// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwFormatAutoFormat* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
diff --git a/sw/inc/fmtclbl.hxx b/sw/inc/fmtclbl.hxx
index 8b6914771fc2..9520f438e5d6 100644
--- a/sw/inc/fmtclbl.hxx
+++ b/sw/inc/fmtclbl.hxx
@@ -32,7 +32,7 @@ public:
: SfxBoolItem( RES_COLUMNBALANCE, bFlag ) {}
/// "pure virtual methods" of SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwFormatNoBalancedColumns* Clone( SfxItemPool *pPool = nullptr ) const override;
void dumpAsXml(xmlTextWriterPtr pWriter) const override;
};
diff --git a/sw/inc/fmtclds.hxx b/sw/inc/fmtclds.hxx
index c300c60d1e54..1828e5f11eac 100644
--- a/sw/inc/fmtclds.hxx
+++ b/sw/inc/fmtclds.hxx
@@ -99,7 +99,7 @@ public:
/// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwFormatCol* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
diff --git a/sw/inc/fmtcnct.hxx b/sw/inc/fmtcnct.hxx
index 4dcc89b44970..e34299748e55 100644
--- a/sw/inc/fmtcnct.hxx
+++ b/sw/inc/fmtcnct.hxx
@@ -41,7 +41,7 @@ public:
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwFormatChain* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
diff --git a/sw/inc/fmtcntnt.hxx b/sw/inc/fmtcntnt.hxx
index 655c2ed8d7a3..afb8ce66fc01 100644
--- a/sw/inc/fmtcntnt.hxx
+++ b/sw/inc/fmtcntnt.hxx
@@ -41,7 +41,7 @@ public:
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwFormatContent* Clone( SfxItemPool* pPool = nullptr ) const override;
const SwNodeIndex *GetContentIdx() const { return m_pStartNode.get(); }
void SetNewContentIdx( const SwNodeIndex *pIdx );
diff --git a/sw/inc/fmteiro.hxx b/sw/inc/fmteiro.hxx
index 3f73105a04a0..f3e2d5d6de18 100644
--- a/sw/inc/fmteiro.hxx
+++ b/sw/inc/fmteiro.hxx
@@ -33,7 +33,7 @@ public:
bool bPrt = false ) : SfxBoolItem( nId, bPrt ) {}
/// "pure virtual method" of SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwFormatEditInReadonly* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
diff --git a/sw/inc/fmtflcnt.hxx b/sw/inc/fmtflcnt.hxx
index dcda6c11aff7..882e1b328abc 100644
--- a/sw/inc/fmtflcnt.hxx
+++ b/sw/inc/fmtflcnt.hxx
@@ -40,7 +40,7 @@ public:
SwFormatFlyCnt( SwFrameFormat *pFrameFormat );
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwFormatFlyCnt* Clone( SfxItemPool* pPool = nullptr ) const override;
SwFrameFormat *GetFrameFormat() const { return m_pFormat; }
/// For Undo: delete the FlyFrameFormat "logically"; it is kept in Undo-object.
diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx
index 34c7d73aab5d..18d8ffb136f8 100644
--- a/sw/inc/fmtfld.hxx
+++ b/sw/inc/fmtfld.hxx
@@ -61,7 +61,7 @@ public:
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwFormatField* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetInfo( SfxPoolItem& rInfo ) const override;
diff --git a/sw/inc/fmtfollowtextflow.hxx b/sw/inc/fmtfollowtextflow.hxx
index fdb0a5d755ed..01e6da304c4d 100644
--- a/sw/inc/fmtfollowtextflow.hxx
+++ b/sw/inc/fmtfollowtextflow.hxx
@@ -35,7 +35,7 @@ public:
{}
/// "pure virtual methods" of SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwFormatFollowTextFlow* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
diff --git a/sw/inc/fmtfordr.hxx b/sw/inc/fmtfordr.hxx
index 6c648123b8ae..d9f922a1272f 100644
--- a/sw/inc/fmtfordr.hxx
+++ b/sw/inc/fmtfordr.hxx
@@ -39,7 +39,7 @@ public:
SwFormatFillOrder( SwFillOrder = ATT_TOP_DOWN );
/// "Pure virtual methods" of SfxPoolItem.
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwFormatFillOrder* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual sal_uInt16 GetValueCount() const override;
};
diff --git a/sw/inc/fmtfsize.hxx b/sw/inc/fmtfsize.hxx
index e2c1e999468e..2eb3dbf13678 100644
--- a/sw/inc/fmtfsize.hxx
+++ b/sw/inc/fmtfsize.hxx
@@ -68,7 +68,7 @@ public:
SwTwips nWidth = 0, SwTwips nHeight = 0 );
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwFormatFrameSize* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
diff --git a/sw/inc/fmtftn.hxx b/sw/inc/fmtftn.hxx
index de36d8b29e96..57ff12beafb1 100644
--- a/sw/inc/fmtftn.hxx
+++ b/sw/inc/fmtftn.hxx
@@ -60,7 +60,7 @@ public:
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwFormatFootnote* Clone( SfxItemPool* pPool = nullptr ) const override;
// SwClient
virtual void Modify(SfxPoolItem const* pOld, SfxPoolItem const* pNew)
diff --git a/sw/inc/fmtftntx.hxx b/sw/inc/fmtftntx.hxx
index b6afeff29cdb..c3783178b714 100644
--- a/sw/inc/fmtftntx.hxx
+++ b/sw/inc/fmtftntx.hxx
@@ -88,7 +88,7 @@ public:
: SwFormatFootnoteEndAtTextEnd( RES_FTN_AT_TXTEND, ePos )
{}
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwFormatFootnoteAtTextEnd* Clone( SfxItemPool *pPool = nullptr ) const override;
};
class SW_DLLPUBLIC SwFormatEndAtTextEnd : public SwFormatFootnoteEndAtTextEnd
@@ -100,7 +100,7 @@ public:
SetNumType( SVX_NUM_ROMAN_LOWER );
}
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwFormatEndAtTextEnd* Clone( SfxItemPool *pPool = nullptr ) const override;
};
inline const SwFormatFootnoteAtTextEnd &SwAttrSet::GetFootnoteAtTextEnd(bool bInP) const
diff --git a/sw/inc/fmthdft.hxx b/sw/inc/fmthdft.hxx
index 25b338759062..08b4d11c86ad 100644
--- a/sw/inc/fmthdft.hxx
+++ b/sw/inc/fmthdft.hxx
@@ -44,7 +44,7 @@ public:
/// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwFormatHeader* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
@@ -75,7 +75,7 @@ public:
/// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwFormatFooter* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
diff --git a/sw/inc/fmtinfmt.hxx b/sw/inc/fmtinfmt.hxx
index 731773f6f2b3..1abc322bbf2a 100644
--- a/sw/inc/fmtinfmt.hxx
+++ b/sw/inc/fmtinfmt.hxx
@@ -57,7 +57,7 @@ public:
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwFormatINetFormat* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
diff --git a/sw/inc/fmtline.hxx b/sw/inc/fmtline.hxx
index c0589d53ffed..82a444829f77 100644
--- a/sw/inc/fmtline.hxx
+++ b/sw/inc/fmtline.hxx
@@ -45,7 +45,7 @@ public:
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwFormatLineNumber* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
diff --git a/sw/inc/fmtlsplt.hxx b/sw/inc/fmtlsplt.hxx
index 89670136a5e9..4d473f29b26a 100644
--- a/sw/inc/fmtlsplt.hxx
+++ b/sw/inc/fmtlsplt.hxx
@@ -32,7 +32,7 @@ public:
SwFormatLayoutSplit( bool bSplit = true ) : SfxBoolItem( RES_LAYOUT_SPLIT, bSplit ) {}
/// "pure virtual methods" of SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwFormatLayoutSplit* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx
index 498376e0e871..e148d86ccf17 100644
--- a/sw/inc/fmtmeta.hxx
+++ b/sw/inc/fmtmeta.hxx
@@ -114,7 +114,7 @@ public:
/// SfxPoolItem
virtual bool operator==( const SfxPoolItem & ) const override;
- virtual SfxPoolItem * Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwFormatMeta* Clone( SfxItemPool *pPool = nullptr ) const override;
/// notify clients registered at m_pMeta that this meta is being (re-)moved
void NotifyChangeTextNode(SwTextNode *const pTextNode);
diff --git a/sw/inc/fmtornt.hxx b/sw/inc/fmtornt.hxx
index 24ffdc907e26..0a8ab6f1a619 100644
--- a/sw/inc/fmtornt.hxx
+++ b/sw/inc/fmtornt.hxx
@@ -42,7 +42,7 @@ public:
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwFormatVertOrient* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
@@ -75,7 +75,7 @@ public:
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwFormatHoriOrient* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
diff --git a/sw/inc/fmtpdsc.hxx b/sw/inc/fmtpdsc.hxx
index 1db805950fed..9b5a59702952 100644
--- a/sw/inc/fmtpdsc.hxx
+++ b/sw/inc/fmtpdsc.hxx
@@ -50,7 +50,7 @@ public:
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwFormatPageDesc* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
diff --git a/sw/inc/fmtrfmrk.hxx b/sw/inc/fmtrfmrk.hxx
index a11d7b6e32bd..8e4c732c4674 100644
--- a/sw/inc/fmtrfmrk.hxx
+++ b/sw/inc/fmtrfmrk.hxx
@@ -53,7 +53,7 @@ public:
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwFormatRefMark* Clone( SfxItemPool* pPool = nullptr ) const override;
// SwClient
virtual void Modify(SfxPoolItem const* pOld, SfxPoolItem const* pNew)
diff --git a/sw/inc/fmtrowsplt.hxx b/sw/inc/fmtrowsplt.hxx
index 735625841dc4..f216aba8766b 100644
--- a/sw/inc/fmtrowsplt.hxx
+++ b/sw/inc/fmtrowsplt.hxx
@@ -32,7 +32,7 @@ public:
SwFormatRowSplit( bool bSplit = true ) : SfxBoolItem( RES_ROW_SPLIT, bSplit ) {}
// "pure virtual methods" of SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwFormatRowSplit* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
diff --git a/sw/inc/fmtruby.hxx b/sw/inc/fmtruby.hxx
index a2b7379531c3..7ac18fef4f83 100644
--- a/sw/inc/fmtruby.hxx
+++ b/sw/inc/fmtruby.hxx
@@ -45,7 +45,7 @@ public:
// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwFormatRuby* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
diff --git a/sw/inc/fmtsrnd.hxx b/sw/inc/fmtsrnd.hxx
index 30bd3f0a2610..e672d84f06eb 100644
--- a/sw/inc/fmtsrnd.hxx
+++ b/sw/inc/fmtsrnd.hxx
@@ -38,7 +38,7 @@ public:
// "Pure virtual Methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwFormatSurround* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual sal_uInt16 GetValueCount() const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
diff --git a/sw/inc/fmturl.hxx b/sw/inc/fmturl.hxx
index 9f9db75e9e9b..0f14b6dd3648 100644
--- a/sw/inc/fmturl.hxx
+++ b/sw/inc/fmturl.hxx
@@ -49,7 +49,7 @@ public:
/// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwFormatURL* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
diff --git a/sw/inc/fmtwrapinfluenceonobjpos.hxx b/sw/inc/fmtwrapinfluenceonobjpos.hxx
index 897e825b14ff..84d3961a3a5d 100644
--- a/sw/inc/fmtwrapinfluenceonobjpos.hxx
+++ b/sw/inc/fmtwrapinfluenceonobjpos.hxx
@@ -48,7 +48,7 @@ public:
/// pure virtual methods of class <SfxPoolItem>
virtual bool operator==( const SfxPoolItem& _rAttr ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwFormatWrapInfluenceOnObjPos* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
diff --git a/sw/inc/grfatr.hxx b/sw/inc/grfatr.hxx
index bb8f41311fb7..f43fd0c1dd3d 100644
--- a/sw/inc/grfatr.hxx
+++ b/sw/inc/grfatr.hxx
@@ -46,7 +46,7 @@ public:
{}
// pure virtual methods of SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwMirrorGrf* Clone( SfxItemPool *pPool = nullptr ) const override;
// pure virtual methods of SfxEnumItem
virtual sal_uInt16 GetValueCount() const override;
@@ -74,7 +74,7 @@ public:
sal_Int32 nTop, sal_Int32 nBottom );
// "pure virtual methods" of SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwCropGrf* Clone( SfxItemPool *pPool = nullptr ) const override;
};
class SAL_DLLPUBLIC_RTTI SwRotationGrf : public SfxUInt16Item
@@ -93,7 +93,7 @@ public:
SwRotationGrf( sal_Int16 nVal, const Size& rSz );
// pure virtual methods from SfxInt16Item
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwRotationGrf* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
@@ -116,7 +116,7 @@ public:
{}
// pure virtual methods from SfxInt16Item
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwLuminanceGrf* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
@@ -132,7 +132,7 @@ public:
{}
// pure virtual methods from SfxInt16Item
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwContrastGrf* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
@@ -162,7 +162,7 @@ public:
SwChannelRGrf( sal_Int16 nVal = 0 )
: SwChannelGrf( nVal, RES_GRFATR_CHANNELR )
{}
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwChannelRGrf* Clone( SfxItemPool *pPool = nullptr ) const override;
};
class SwChannelGGrf : public SwChannelGrf
{
@@ -170,7 +170,7 @@ public:
SwChannelGGrf( sal_Int16 nVal = 0 )
: SwChannelGrf( nVal, RES_GRFATR_CHANNELG )
{}
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwChannelGGrf* Clone( SfxItemPool *pPool = nullptr ) const override;
};
class SwChannelBGrf : public SwChannelGrf
{
@@ -178,7 +178,7 @@ public:
SwChannelBGrf( sal_Int16 nVal = 0 )
: SwChannelGrf( nVal, RES_GRFATR_CHANNELB )
{}
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwChannelBGrf* Clone( SfxItemPool *pPool = nullptr ) const override;
};
class SW_DLLPUBLIC SwGammaGrf : public SfxPoolItem
@@ -193,7 +193,7 @@ public:
{}
// pure virtual methods from SfxEnumItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwGammaGrf* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
@@ -217,7 +217,7 @@ public:
{}
// pure virtual methods from SfxInt16Item
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwInvertGrf* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
@@ -233,7 +233,7 @@ public:
{}
// pure virtual methods from SfxInt16Item
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwTransparencyGrf* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
@@ -260,7 +260,7 @@ public:
{}
// pure virtual methods of SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwDrawModeGrf* Clone( SfxItemPool *pPool = nullptr ) const override;
// pure virtual methods of SfxEnumItem
virtual sal_uInt16 GetValueCount() const override;
diff --git a/sw/inc/hfspacingitem.hxx b/sw/inc/hfspacingitem.hxx
index 136c4fc3e7d7..4b061bd50dde 100644
--- a/sw/inc/hfspacingitem.hxx
+++ b/sw/inc/hfspacingitem.hxx
@@ -32,7 +32,7 @@ public:
bool bPrt = false ) : SfxBoolItem( nId, bPrt ) {}
// "pure virtual methods" of SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwHeaderAndFooterEatSpacingItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
index dded9cc5f089..bb322c4c640a 100644
--- a/sw/inc/hints.hxx
+++ b/sw/inc/hints.hxx
@@ -42,7 +42,7 @@ public:
// "Overhead" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwMsgPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
};
// SwPtrMsgPoolItem (old SwObjectDying!)
diff --git a/sw/inc/paratr.hxx b/sw/inc/paratr.hxx
index a66ec00beebd..7cc18282eed6 100644
--- a/sw/inc/paratr.hxx
+++ b/sw/inc/paratr.hxx
@@ -74,7 +74,7 @@ public:
/// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwFormatDrop* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
@@ -115,7 +115,7 @@ public:
inline SwRegisterItem( const bool bRegister = false );
/// "pure virtual methods" of SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwRegisterItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
@@ -142,7 +142,7 @@ public:
/// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwNumRuleItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
@@ -162,7 +162,7 @@ public:
inline SwParaConnectBorderItem( const bool bConnect = true );
/// "pure virtual methods" of SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwParaConnectBorderItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx
index 2d87284eb3a6..bf6719833766 100644
--- a/sw/inc/tblafmt.hxx
+++ b/sw/inc/tblafmt.hxx
@@ -81,8 +81,8 @@ public:
const LanguageType& GetNumFormatLanguage() const { return m_eNumFormatLanguage; }
// The set-methods.
- void SetTextOrientation( const SvxFrameDirectionItem& rNew ) { m_aTextOrientation.reset(static_cast<SvxFrameDirectionItem*>(rNew.Clone())); }
- void SetVerticalAlignment( const SwFormatVertOrient& rNew ) { m_aVerticalAlignment.reset(static_cast<SwFormatVertOrient*>(rNew.Clone())); }
+ void SetTextOrientation( const SvxFrameDirectionItem& rNew ) { m_aTextOrientation.reset(rNew.Clone()); }
+ void SetVerticalAlignment( const SwFormatVertOrient& rNew ) { m_aVerticalAlignment.reset(rNew.Clone()); }
void SetValueFormat( const OUString& rFormat, LanguageType eLng, LanguageType eSys )
{ m_sNumFormatString = rFormat; m_eNumFormatLanguage = eLng; m_eSysLanguage = eSys; }
@@ -195,9 +195,9 @@ public:
const SvxFormatKeepItem& GetKeepWithNextPara() const { return *m_aKeepWithNextPara; }
const SvxShadowItem& GetShadow() const { return *m_aShadow; }
- void SetBreak(const SvxFormatBreakItem& rNew) { m_aBreak.reset(static_cast<SvxFormatBreakItem*>(rNew.Clone())); }
- void SetKeepWithNextPara(const SvxFormatKeepItem& rNew) { m_aKeepWithNextPara.reset(static_cast<SvxFormatKeepItem*>(rNew.Clone())); }
- void SetShadow(const SvxShadowItem& rNew) { m_aShadow.reset(static_cast<SvxShadowItem*>(rNew.Clone())); }
+ void SetBreak(const SvxFormatBreakItem& rNew) { m_aBreak.reset(rNew.Clone()); }
+ void SetKeepWithNextPara(const SvxFormatKeepItem& rNew) { m_aKeepWithNextPara.reset(rNew.Clone()); }
+ void SetShadow(const SvxShadowItem& rNew) { m_aShadow.reset(rNew.Clone()); }
void SetBoxFormat( const SwBoxAutoFormat& rNew, sal_uInt8 nPos );
const SwBoxAutoFormat& GetBoxFormat( sal_uInt8 nPos ) const;
diff --git a/sw/inc/tgrditem.hxx b/sw/inc/tgrditem.hxx
index c44e288cefae..8e4977344f38 100644
--- a/sw/inc/tgrditem.hxx
+++ b/sw/inc/tgrditem.hxx
@@ -57,7 +57,7 @@ public:
// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwTextGridItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx
index aecda558fcb5..b6cfb3298360 100644
--- a/sw/inc/tox.hxx
+++ b/sw/inc/tox.hxx
@@ -94,7 +94,7 @@ public:
// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SwTOXMark* Clone( SfxItemPool* pPool = nullptr ) const override;
void InvalidateTOXMark();
diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx
index f0fa52017d38..908a9d2a5553 100644
--- a/sw/source/core/attr/cellatr.cxx
+++ b/sw/source/core/attr/cellatr.cxx
@@ -49,7 +49,7 @@ bool SwTableBoxNumFormat::operator==( const SfxPoolItem& rAttr ) const
return GetValue() == static_cast<const SwTableBoxNumFormat&>(rAttr).GetValue();
}
-SfxPoolItem* SwTableBoxNumFormat::Clone( SfxItemPool* ) const
+SwTableBoxNumFormat* SwTableBoxNumFormat::Clone( SfxItemPool* ) const
{
return new SwTableBoxNumFormat( GetValue() );
}
@@ -68,7 +68,7 @@ bool SwTableBoxFormula::operator==( const SfxPoolItem& rAttr ) const
m_pDefinedIn == static_cast<const SwTableBoxFormula&>(rAttr).m_pDefinedIn;
}
-SfxPoolItem* SwTableBoxFormula::Clone( SfxItemPool* ) const
+SwTableBoxFormula* SwTableBoxFormula::Clone( SfxItemPool* ) const
{
// switch to external rendering
SwTableBoxFormula* pNew = new SwTableBoxFormula( GetFormula() );
@@ -218,7 +218,7 @@ bool SwTableBoxValue::operator==( const SfxPoolItem& rAttr ) const
: ( m_nValue == rOther.m_nValue );
}
-SfxPoolItem* SwTableBoxValue::Clone( SfxItemPool* ) const
+SwTableBoxValue* SwTableBoxValue::Clone( SfxItemPool* ) const
{
return new SwTableBoxValue( m_nValue );
}
diff --git a/sw/source/core/attr/fmtfollowtextflow.cxx b/sw/source/core/attr/fmtfollowtextflow.cxx
index f979fd27d499..8b04869afc5a 100644
--- a/sw/source/core/attr/fmtfollowtextflow.cxx
+++ b/sw/source/core/attr/fmtfollowtextflow.cxx
@@ -22,7 +22,7 @@
#include <sal/log.hxx>
-SfxPoolItem* SwFormatFollowTextFlow::Clone( SfxItemPool * ) const
+SwFormatFollowTextFlow* SwFormatFollowTextFlow::Clone( SfxItemPool * ) const
{
return new SwFormatFollowTextFlow(*this);
}
diff --git a/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx b/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx
index 4182bb90a95a..21ceec2f0e68 100644
--- a/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx
+++ b/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx
@@ -47,7 +47,7 @@ bool SwFormatWrapInfluenceOnObjPos::operator==( const SfxPoolItem& rAttr ) const
&& mnOverlapVertOffset == rAttribute.mnOverlapVertOffset);
}
-SfxPoolItem* SwFormatWrapInfluenceOnObjPos::Clone( SfxItemPool * ) const
+SwFormatWrapInfluenceOnObjPos* SwFormatWrapInfluenceOnObjPos::Clone( SfxItemPool * ) const
{
return new SwFormatWrapInfluenceOnObjPos(*this);
}
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx
index 50180ce53eec..f030e78ec9e0 100644
--- a/sw/source/core/attr/format.cxx
+++ b/sw/source/core/attr/format.cxx
@@ -792,7 +792,7 @@ std::shared_ptr<SvxBrushItem> SwFormat::makeBackgroundBrushItem(bool bInP) const
return getSvxBrushItemFromSourceSet(m_aSet, RES_BACKGROUND, bInP);
}
- return std::shared_ptr<SvxBrushItem>(static_cast<SvxBrushItem*>(m_aSet.GetBackground(bInP).Clone()));
+ return std::shared_ptr<SvxBrushItem>(m_aSet.GetBackground(bInP).Clone());
}
drawinglayer::attribute::SdrAllFillAttributesHelperPtr SwFormat::getSdrAllFillAttributesHelper() const
diff --git a/sw/source/core/attr/hints.cxx b/sw/source/core/attr/hints.cxx
index 1b92d14c4f8d..b8d626e1b45f 100644
--- a/sw/source/core/attr/hints.cxx
+++ b/sw/source/core/attr/hints.cxx
@@ -143,7 +143,7 @@ bool SwMsgPoolItem::operator==( const SfxPoolItem& ) const
return false;
}
-SfxPoolItem* SwMsgPoolItem::Clone( SfxItemPool* ) const
+SwMsgPoolItem* SwMsgPoolItem::Clone( SfxItemPool* ) const
{
OSL_FAIL( "SwMsgPoolItem knows no Clone" );
return nullptr;
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index 3fdc20e00271..1b9d524e33a0 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -1315,7 +1315,7 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId,
aLR.SetLeft( GetMetricVal( CM_1 ));
aLR.SetRight( GetMetricVal( CM_1 ));
aSet.Put( aLR );
- std::unique_ptr<SvxULSpaceItem> aUL(static_cast<SvxULSpaceItem*>(pNewColl->GetULSpace().Clone()));
+ std::unique_ptr<SvxULSpaceItem> aUL(pNewColl->GetULSpace().Clone());
aUL->SetLower( HTML_PARSPACE );
aSet.Put(std::move(aUL));
}
@@ -1330,7 +1330,7 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId,
// The lower paragraph distance is set explicitly (makes
// assigning hard attributes easier)
- std::unique_ptr<SvxULSpaceItem> aULSpaceItem(static_cast<SvxULSpaceItem*>(pNewColl->GetULSpace().Clone()));
+ std::unique_ptr<SvxULSpaceItem> aULSpaceItem(pNewColl->GetULSpace().Clone());
aULSpaceItem->SetLower( 0 );
aSet.Put(std::move(aULSpaceItem));
}
@@ -1350,7 +1350,7 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId,
std::unique_ptr<SvxULSpaceItem> aUL;
{
pNewColl->SetNextTextFormatColl( *GetTextCollFromPool( RES_POOLCOLL_TEXT ));
- aUL.reset(static_cast<SvxULSpaceItem*>(pNewColl->GetULSpace().Clone()));
+ aUL.reset(pNewColl->GetULSpace().Clone());
}
aUL->SetLower( HTML_PARSPACE );
aSet.Put(std::move(aUL));
@@ -1362,7 +1362,7 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId,
case RES_POOLCOLL_HTML_DD:
{
- std::unique_ptr<SvxLRSpaceItem> aLR(static_cast<SvxLRSpaceItem*>(pNewColl->GetLRSpace().Clone()));
+ std::unique_ptr<SvxLRSpaceItem> aLR(pNewColl->GetLRSpace().Clone());
// We indent by 1 cm. The IDs are always 2 away from each other!
aLR->SetLeft( GetMetricVal( CM_1 ));
aSet.Put(std::move(aLR));
@@ -1373,7 +1373,7 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId,
std::unique_ptr<SvxLRSpaceItem> aLR;
{
pNewColl->SetNextTextFormatColl( *GetTextCollFromPool( RES_POOLCOLL_HTML_DD ));
- aLR.reset(static_cast<SvxLRSpaceItem*>(pNewColl->GetLRSpace().Clone()));
+ aLR.reset(pNewColl->GetLRSpace().Clone());
}
// We indent by 0 cm. The IDs are always 2 away from each other!
aLR->SetLeft( 0 );
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index ad864f3ae15c..4ff478498dcc 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -767,7 +767,7 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable,
pNewSet->Put( pOldFormat->GetAnchor() );
// The new one should be changeable in its height.
- std::unique_ptr<SwFormatFrameSize> aFrameSize(static_cast<SwFormatFrameSize*>(pOldFormat->GetFrameSize().Clone()));
+ std::unique_ptr<SwFormatFrameSize> aFrameSize(pOldFormat->GetFrameSize().Clone());
aFrameSize->SetHeightSizeType( SwFrameSize::Minimum );
pNewSet->Put( std::move(aFrameSize) );
@@ -816,7 +816,7 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable,
pNewSet->Put( SwFormatVertOrient( 0, eVert ) );
pNewSet->Put( SwFormatHoriOrient( 0, text::HoriOrientation::CENTER ) );
- aFrameSize.reset(static_cast<SwFormatFrameSize*>(pOldFormat->GetFrameSize().Clone()));
+ aFrameSize.reset(pOldFormat->GetFrameSize().Clone());
SwOLENode* pOleNode = rDoc.GetNodes()[nNdIdx + 1]->GetOLENode();
bool isMath = false;
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index d0ec125537e6..ae7c3e6fadbb 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -266,8 +266,8 @@ SwBoxAutoFormat::SwBoxAutoFormat()
SwBoxAutoFormat::SwBoxAutoFormat( const SwBoxAutoFormat& rNew )
: AutoFormatBase(rNew),
- m_aTextOrientation(static_cast<SvxFrameDirectionItem*>(rNew.m_aTextOrientation->Clone())),
- m_aVerticalAlignment(static_cast<SwFormatVertOrient*>(rNew.m_aVerticalAlignment->Clone())),
+ m_aTextOrientation(rNew.m_aTextOrientation->Clone()),
+ m_aVerticalAlignment(rNew.m_aVerticalAlignment->Clone()),
m_sNumFormatString( rNew.m_sNumFormatString ),
m_eSysLanguage( rNew.m_eSysLanguage ),
m_eNumFormatLanguage( rNew.m_eNumFormatLanguage ),
@@ -421,14 +421,14 @@ SwTableAutoFormat& SwTableAutoFormat::operator=( const SwTableAutoFormat& rNew )
m_bInclValueFormat = rNew.m_bInclValueFormat;
m_bInclWidthHeight = rNew.m_bInclWidthHeight;
- m_aBreak.reset(static_cast<SvxFormatBreakItem*>(rNew.m_aBreak->Clone()));
+ m_aBreak.reset(rNew.m_aBreak->Clone());
m_aPageDesc = rNew.m_aPageDesc;
- m_aKeepWithNextPara.reset(static_cast<SvxFormatKeepItem*>(rNew.m_aKeepWithNextPara->Clone()));
+ m_aKeepWithNextPara.reset(rNew.m_aKeepWithNextPara->Clone());
m_aRepeatHeading = rNew.m_aRepeatHeading;
m_bLayoutSplit = rNew.m_bLayoutSplit;
m_bRowSplit = rNew.m_bRowSplit;
m_bCollapsingBorders = rNew.m_bCollapsingBorders;
- m_aShadow.reset(static_cast<SvxShadowItem*>(rNew.m_aShadow->Clone()));
+ m_aShadow.reset(rNew.m_aShadow->Clone());
m_bHidden = rNew.m_bHidden;
m_bUserDefined = rNew.m_bUserDefined;
@@ -716,15 +716,15 @@ void SwTableAutoFormat::StoreTableProperties(const SwTable &table)
const SfxItemSet &rSet = pFormat->GetAttrSet();
- m_aBreak.reset(static_cast<SvxFormatBreakItem*>(rSet.Get(RES_BREAK).Clone()));
+ m_aBreak.reset(rSet.Get(RES_BREAK).Clone());
m_aPageDesc = rSet.Get(RES_PAGEDESC);
const SwFormatLayoutSplit &layoutSplit = rSet.Get(RES_LAYOUT_SPLIT);
m_bLayoutSplit = layoutSplit.GetValue();
m_bCollapsingBorders = rSet.Get(RES_COLLAPSING_BORDERS).GetValue();
- m_aKeepWithNextPara.reset(static_cast<SvxFormatKeepItem*>(rSet.Get(RES_KEEP).Clone()));
+ m_aKeepWithNextPara.reset(rSet.Get(RES_KEEP).Clone());
m_aRepeatHeading = table.GetRowsToRepeat();
- m_aShadow.reset(static_cast<SvxShadowItem*>(rSet.Get(RES_SHADOW).Clone()));
+ m_aShadow.reset(rSet.Get(RES_SHADOW).Clone());
}
bool SwTableAutoFormat::FirstRowEndColumnIsRow()
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 0ff6475968cc..d075c7015c55 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -1834,7 +1834,7 @@ static void lcl_CopyBoxToDoc(FndBox_ const& rFndBox, CpyPara *const pCpyPara)
if(!DoCopyIt)
{
aFindFrame = pCpyPara->rTabFrameArr[ nFndPos ];
- aFrameSz.reset(static_cast<SwFormatFrameSize*>(aFindFrame.pNewFrameFormat->GetFrameSize().Clone()));
+ aFrameSz.reset(aFindFrame.pNewFrameFormat->GetFrameSize().Clone());
DoCopyIt = aFrameSz->GetWidth() != static_cast<SwTwips>(nSize);
}
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index 8fe8c6d0f5c6..05ca3c0b8133 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -884,11 +884,11 @@ void SwDoc::SetTabLineStyle( const SwCursor& rCursor,
const_cast<SwTableBox*>(pCell->GetTabBox())->ClaimFrameFormat();
SwFrameFormat *pFormat = pCell->GetFormat();
- std::shared_ptr<SvxBoxItem> aBox(static_cast<SvxBoxItem*>(pFormat->GetBox().Clone()));
+ std::shared_ptr<SvxBoxItem> aBox(pFormat->GetBox().Clone());
if ( !pBorderLine && bSetLine )
{
- aBox.reset(static_cast<SvxBoxItem*>(::GetDfltAttr(RES_BOX)->Clone()));
+ aBox.reset(::GetDfltAttr(RES_BOX)->Clone());
}
else
{
diff --git a/sw/source/core/graphic/grfatr.cxx b/sw/source/core/graphic/grfatr.cxx
index e82f7e5a3f74..a8e2e63c7dcb 100644
--- a/sw/source/core/graphic/grfatr.cxx
+++ b/sw/source/core/graphic/grfatr.cxx
@@ -28,8 +28,7 @@
using namespace ::com::sun::star;
-
-SfxPoolItem* SwMirrorGrf::Clone( SfxItemPool* ) const
+SwMirrorGrf* SwMirrorGrf::Clone( SfxItemPool* ) const
{
return new SwMirrorGrf( *this );
}
@@ -141,7 +140,7 @@ SwCropGrf::SwCropGrf(sal_Int32 nL, sal_Int32 nR, sal_Int32 nT, sal_Int32 nB )
: SvxGrfCrop( nL, nR, nT, nB, RES_GRFATR_CROPGRF )
{}
-SfxPoolItem* SwCropGrf::Clone( SfxItemPool* ) const
+SwCropGrf* SwCropGrf::Clone( SfxItemPool* ) const
{
return new SwCropGrf( *this );
}
@@ -171,7 +170,7 @@ SwRotationGrf::SwRotationGrf( sal_Int16 nVal, const Size& rSz )
{
}
-SfxPoolItem* SwRotationGrf::Clone( SfxItemPool * ) const
+SwRotationGrf* SwRotationGrf::Clone( SfxItemPool * ) const
{
return new SwRotationGrf( *this );
}
@@ -209,32 +208,32 @@ bool SwRotationGrf::PutValue( const uno::Any& rVal, sal_uInt8 )
// Sw___Grf::Clone(..)
-SfxPoolItem* SwLuminanceGrf::Clone( SfxItemPool * ) const
+SwLuminanceGrf* SwLuminanceGrf::Clone( SfxItemPool * ) const
{
return new SwLuminanceGrf( *this );
}
-SfxPoolItem* SwContrastGrf::Clone( SfxItemPool * ) const
+SwContrastGrf* SwContrastGrf::Clone( SfxItemPool * ) const
{
return new SwContrastGrf( *this );
}
-SfxPoolItem* SwChannelRGrf::Clone( SfxItemPool * ) const
+SwChannelRGrf* SwChannelRGrf::Clone( SfxItemPool * ) const
{
return new SwChannelRGrf( *this );
}
-SfxPoolItem* SwChannelGGrf::Clone( SfxItemPool * ) const
+SwChannelGGrf* SwChannelGGrf::Clone( SfxItemPool * ) const
{
return new SwChannelGGrf( *this );
}
-SfxPoolItem* SwChannelBGrf::Clone( SfxItemPool * ) const
+SwChannelBGrf* SwChannelBGrf::Clone( SfxItemPool * ) const
{
return new SwChannelBGrf( *this );
}
-SfxPoolItem* SwGammaGrf::Clone( SfxItemPool * ) const
+SwGammaGrf* SwGammaGrf::Clone( SfxItemPool * ) const
{
return new SwGammaGrf( *this );
}
@@ -260,12 +259,12 @@ bool SwGammaGrf::PutValue( const uno::Any& rVal, sal_uInt8 )
// Sw___Grf::Clone(..) cont'd
-SfxPoolItem* SwInvertGrf::Clone( SfxItemPool * ) const
+SwInvertGrf* SwInvertGrf::Clone( SfxItemPool * ) const
{
return new SwInvertGrf( *this );
}
-SfxPoolItem* SwTransparencyGrf::Clone( SfxItemPool * ) const
+SwTransparencyGrf* SwTransparencyGrf::Clone( SfxItemPool * ) const
{
return new SwTransparencyGrf( *this );
}
@@ -304,7 +303,7 @@ bool SwTransparencyGrf::PutValue( const uno::Any& rVal,
// Sw___Grf::Clone(..) cont'd
-SfxPoolItem* SwDrawModeGrf::Clone( SfxItemPool * ) const
+SwDrawModeGrf* SwDrawModeGrf::Clone( SfxItemPool * ) const
{
return new SwDrawModeGrf( *this );
}
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 3ee1be7590e3..09f0974d22d1 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -210,7 +210,7 @@ bool SwFormatFrameSize::operator==( const SfxPoolItem& rAttr ) const
m_eHeightPercentRelation == static_cast<const SwFormatFrameSize&>(rAttr).GetHeightPercentRelation() );
}
-SfxPoolItem* SwFormatFrameSize::Clone( SfxItemPool* ) const
+SwFormatFrameSize* SwFormatFrameSize::Clone( SfxItemPool* ) const
{
return new SwFormatFrameSize( *this );
}
@@ -433,7 +433,8 @@ void SwFormatFrameSize::dumpAsXml(xmlTextWriterPtr pWriter) const
SwFormatFillOrder::SwFormatFillOrder( SwFillOrder nFO )
: SfxEnumItem( RES_FILL_ORDER, nFO )
{}
-SfxPoolItem* SwFormatFillOrder::Clone( SfxItemPool* ) const
+
+SwFormatFillOrder* SwFormatFillOrder::Clone( SfxItemPool* ) const
{
return new SwFormatFillOrder( GetValue() );
}
@@ -478,7 +479,7 @@ bool SwFormatHeader::operator==( const SfxPoolItem& rAttr ) const
m_bActive == static_cast<const SwFormatHeader&>(rAttr).IsActive() );
}
-SfxPoolItem* SwFormatHeader::Clone( SfxItemPool* ) const
+SwFormatHeader* SwFormatHeader::Clone( SfxItemPool* ) const
{
return new SwFormatHeader( *this );
}
@@ -528,7 +529,7 @@ bool SwFormatFooter::operator==( const SfxPoolItem& rAttr ) const
m_bActive == static_cast<const SwFormatFooter&>(rAttr).IsActive() );
}
-SfxPoolItem* SwFormatFooter::Clone( SfxItemPool* ) const
+SwFormatFooter* SwFormatFooter::Clone( SfxItemPool* ) const
{
return new SwFormatFooter( *this );
}
@@ -566,7 +567,7 @@ bool SwFormatContent::operator==( const SfxPoolItem& rAttr ) const
return true;
}
-SfxPoolItem* SwFormatContent::Clone( SfxItemPool* ) const
+SwFormatContent* SwFormatContent::Clone( SfxItemPool* ) const
{
return new SwFormatContent( *this );
}
@@ -623,7 +624,7 @@ bool SwFormatPageDesc::operator==( const SfxPoolItem& rAttr ) const
( GetPageDesc() == static_cast<const SwFormatPageDesc&>(rAttr).GetPageDesc() );
}
-SfxPoolItem* SwFormatPageDesc::Clone( SfxItemPool* ) const
+SwFormatPageDesc* SwFormatPageDesc::Clone( SfxItemPool* ) const
{
return new SwFormatPageDesc( *this );
}
@@ -885,7 +886,7 @@ bool SwFormatCol::operator==( const SfxPoolItem& rAttr ) const
return true;
}
-SfxPoolItem* SwFormatCol::Clone( SfxItemPool* ) const
+SwFormatCol* SwFormatCol::Clone( SfxItemPool* ) const
{
return new SwFormatCol( *this );
}
@@ -1166,7 +1167,7 @@ bool SwFormatSurround::operator==( const SfxPoolItem& rAttr ) const
m_bOutside== static_cast<const SwFormatSurround&>(rAttr).m_bOutside );
}
-SfxPoolItem* SwFormatSurround::Clone( SfxItemPool* ) const
+SwFormatSurround* SwFormatSurround::Clone( SfxItemPool* ) const
{
return new SwFormatSurround( *this );
}
@@ -1272,7 +1273,7 @@ bool SwFormatVertOrient::operator==( const SfxPoolItem& rAttr ) const
m_eRelation == static_cast<const SwFormatVertOrient&>(rAttr).m_eRelation );
}
-SfxPoolItem* SwFormatVertOrient::Clone( SfxItemPool* ) const
+SwFormatVertOrient* SwFormatVertOrient::Clone( SfxItemPool* ) const
{
return new SwFormatVertOrient( *this );
}
@@ -1366,7 +1367,7 @@ bool SwFormatHoriOrient::operator==( const SfxPoolItem& rAttr ) const
m_bPosToggle == static_cast<const SwFormatHoriOrient&>(rAttr).m_bPosToggle );
}
-SfxPoolItem* SwFormatHoriOrient::Clone( SfxItemPool* ) const
+SwFormatHoriOrient* SwFormatHoriOrient::Clone( SfxItemPool* ) const
{
return new SwFormatHoriOrient( *this );
}
@@ -1521,7 +1522,7 @@ bool SwFormatAnchor::operator==( const SfxPoolItem& rAttr ) const
(*m_pContentAnchor == *rFormatAnchor.GetContentAnchor()))));
}
-SfxPoolItem* SwFormatAnchor::Clone( SfxItemPool* ) const
+SwFormatAnchor* SwFormatAnchor::Clone( SfxItemPool* ) const
{
return new SwFormatAnchor( *this );
}
@@ -1718,7 +1719,7 @@ bool SwFormatURL::operator==( const SfxPoolItem &rAttr ) const
return bRet;
}
-SfxPoolItem* SwFormatURL::Clone( SfxItemPool* ) const
+SwFormatURL* SwFormatURL::Clone( SfxItemPool* ) const
{
return new SwFormatURL( *this );
}
@@ -1829,22 +1830,22 @@ bool SwFormatURL::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
return bRet;
}
-SfxPoolItem* SwFormatEditInReadonly::Clone( SfxItemPool* ) const
+SwFormatEditInReadonly* SwFormatEditInReadonly::Clone( SfxItemPool* ) const
{
return new SwFormatEditInReadonly( *this );
}
-SfxPoolItem* SwFormatLayoutSplit::Clone( SfxItemPool* ) const
+SwFormatLayoutSplit* SwFormatLayoutSplit::Clone( SfxItemPool* ) const
{
return new SwFormatLayoutSplit( *this );
}
-SfxPoolItem* SwFormatRowSplit::Clone( SfxItemPool* ) const
+SwFormatRowSplit* SwFormatRowSplit::Clone( SfxItemPool* ) const
{
return new SwFormatRowSplit( *this );
}
-SfxPoolItem* SwFormatNoBalancedColumns::Clone( SfxItemPool* ) const
+SwFormatNoBalancedColumns* SwFormatNoBalancedColumns::Clone( SfxItemPool* ) const
{
return new SwFormatNoBalancedColumns( *this );
}
@@ -1983,14 +1984,14 @@ bool SwFormatFootnoteEndAtTextEnd::PutValue( const uno::Any& rVal, sal_uInt8 nMe
// class SwFormatFootnoteAtTextEnd
-SfxPoolItem* SwFormatFootnoteAtTextEnd::Clone( SfxItemPool* ) const
+SwFormatFootnoteAtTextEnd* SwFormatFootnoteAtTextEnd::Clone( SfxItemPool* ) const
{
return new SwFormatFootnoteAtTextEnd(*this);
}
// class SwFormatEndAtTextEnd
-SfxPoolItem* SwFormatEndAtTextEnd::Clone( SfxItemPool* ) const
+SwFormatEndAtTextEnd* SwFormatEndAtTextEnd::Clone( SfxItemPool* ) const
{
return new SwFormatEndAtTextEnd(*this);
}
@@ -2012,7 +2013,7 @@ SwFormatChain::SwFormatChain( const SwFormatChain &rCpy ) :
SetNext( rCpy.GetNext() );
}
-SfxPoolItem* SwFormatChain::Clone( SfxItemPool* ) const
+SwFormatChain* SwFormatChain::Clone( SfxItemPool* ) const
{
SwFormatChain *pRet = new SwFormatChain;
pRet->SetPrev( GetPrev() );
@@ -2079,7 +2080,7 @@ bool SwFormatLineNumber::operator==( const SfxPoolItem &rAttr ) const
m_bCountLines == static_cast<const SwFormatLineNumber&>(rAttr).IsCount();
}
-SfxPoolItem* SwFormatLineNumber::Clone( SfxItemPool* ) const
+SwFormatLineNumber* SwFormatLineNumber::Clone( SfxItemPool* ) const
{
return new SwFormatLineNumber( *this );
}
@@ -2159,7 +2160,7 @@ bool SwTextGridItem::operator==( const SfxPoolItem& rAttr ) const
&& m_bSquaredMode == rOther.GetSquaredMode();
}
-SfxPoolItem* SwTextGridItem::Clone( SfxItemPool* ) const
+SwTextGridItem* SwTextGridItem::Clone( SfxItemPool* ) const
{
return new SwTextGridItem( *this );
}
@@ -2399,12 +2400,11 @@ void SwTextGridItem::Init()
}
}
-SfxPoolItem* SwHeaderAndFooterEatSpacingItem::Clone( SfxItemPool* ) const
+SwHeaderAndFooterEatSpacingItem* SwHeaderAndFooterEatSpacingItem::Clone( SfxItemPool* ) const
{
return new SwHeaderAndFooterEatSpacingItem( Which(), GetValue() );
}
-
SwFrameFormat::SwFrameFormat(
SwAttrPool& rPool,
const sal_Char* pFormatNm,
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 862db2c8a211..b8798af8a835 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -2043,7 +2043,7 @@ SwBorderAttrs::SwBorderAttrs(const SwModify *pMod, const SwFrame *pConstructor)
, m_rUL(m_rAttrSet.GetULSpace())
// #i96772#
// LRSpaceItem is copied due to the possibility that it is adjusted - see below
- , m_rLR(static_cast<SvxLRSpaceItem*>(m_rAttrSet.GetLRSpace().Clone()))
+ , m_rLR(m_rAttrSet.GetLRSpace().Clone())
, m_rBox(m_rAttrSet.GetBox())
, m_rShadow(m_rAttrSet.GetShadow())
, m_aFrameSize(m_rAttrSet.GetFrameSize().GetSize())
diff --git a/sw/source/core/para/paratr.cxx b/sw/source/core/para/paratr.cxx
index 6c1853e01476..e12a7180585c 100644
--- a/sw/source/core/para/paratr.cxx
+++ b/sw/source/core/para/paratr.cxx
@@ -101,7 +101,7 @@ bool SwFormatDrop::operator==( const SfxPoolItem& rAttr ) const
m_pDefinedIn == static_cast<const SwFormatDrop&>(rAttr).m_pDefinedIn );
}
-SfxPoolItem* SwFormatDrop::Clone( SfxItemPool* ) const
+SwFormatDrop* SwFormatDrop::Clone( SfxItemPool* ) const
{
return new SwFormatDrop( *this );
}
@@ -188,15 +188,16 @@ bool SwFormatDrop::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
return true;
}
-SfxPoolItem* SwRegisterItem::Clone( SfxItemPool * ) const
+SwRegisterItem* SwRegisterItem::Clone( SfxItemPool * ) const
{
return new SwRegisterItem( *this );
}
-SfxPoolItem* SwNumRuleItem::Clone( SfxItemPool * ) const
+SwNumRuleItem* SwNumRuleItem::Clone( SfxItemPool * ) const
{
return new SwNumRuleItem( *this );
}
+
bool SwNumRuleItem::operator==( const SfxPoolItem& rAttr ) const
{
assert(SfxPoolItem::operator==(rAttr));
@@ -227,7 +228,7 @@ void SwNumRuleItem::dumpAsXml(xmlTextWriterPtr pWriter) const
xmlTextWriterEndElement(pWriter);
}
-SfxPoolItem* SwParaConnectBorderItem::Clone( SfxItemPool * ) const
+SwParaConnectBorderItem* SwParaConnectBorderItem::Clone( SfxItemPool * ) const
{
return new SwParaConnectBorderItem( *this );
}
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index a6e69a82e64c..2b8bd65a446a 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -768,7 +768,7 @@ SwGrfNumPortion::SwGrfNumPortion(
m_bReplace = false;
if( pGrfBrush )
{
- pBrush.reset(static_cast<SvxBrushItem*>(pGrfBrush->Clone()));
+ pBrush.reset(pGrfBrush->Clone());
const Graphic* pGraph = pGrfBrush->GetGraphic(referer);
if( pGraph )
SetAnimated( pGraph->IsAnimated() );
diff --git a/sw/source/core/tox/ToxTextGenerator.cxx b/sw/source/core/tox/ToxTextGenerator.cxx
index 9a92776160eb..d5795458ca8f 100644
--- a/sw/source/core/tox/ToxTextGenerator.cxx
+++ b/sw/source/core/tox/ToxTextGenerator.cxx
@@ -330,8 +330,7 @@ void ToxTextGenerator::GetAttributesForNode(
sal_Int32 const nEnd(aConversionMap.ConvertToViewPosition(pHint->GetAnyEnd()));
if (nStart != nEnd) // might be in delete redline, and useless anyway
{
- std::unique_ptr<SwFormatAutoFormat> pClone(
- static_cast<SwFormatAutoFormat*>(pHint->GetAutoFormat().Clone()));
+ std::unique_ptr<SwFormatAutoFormat> pClone(pHint->GetAutoFormat().Clone());
pClone->SetStyleHandle(attributesToClone);
rResult.autoFormats.push_back(std::move(pClone));
// note the rStripper is on the whole merged text, so need rOffset
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index 24c5675fd5c4..7857b2eaa2c5 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -141,7 +141,7 @@ bool SwTOXMark::operator==( const SfxPoolItem& rAttr ) const
return GetRegisteredIn() == static_cast<const SwTOXMark&>(rAttr).GetRegisteredIn();
}
-SfxPoolItem* SwTOXMark::Clone( SfxItemPool* ) const
+SwTOXMark* SwTOXMark::Clone( SfxItemPool* ) const
{
return new SwTOXMark( *this );
}
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index a0f1b83f2cfc..c7587c328a85 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -208,7 +208,7 @@ bool SwFormatField::operator==( const SfxPoolItem& rAttr ) const
( !mpField && !static_cast<const SwFormatField&>(rAttr).mpField );
}
-SfxPoolItem* SwFormatField::Clone( SfxItemPool* ) const
+SwFormatField* SwFormatField::Clone( SfxItemPool* ) const
{
return new SwFormatField( *this );
}
diff --git a/sw/source/core/txtnode/atrflyin.cxx b/sw/source/core/txtnode/atrflyin.cxx
index 3fcb11019402..3fc62f51a368 100644
--- a/sw/source/core/txtnode/atrflyin.cxx
+++ b/sw/source/core/txtnode/atrflyin.cxx
@@ -49,7 +49,7 @@ bool SwFormatFlyCnt::operator==( const SfxPoolItem& rAttr ) const
m_pFormat == static_cast<const SwFormatFlyCnt&>(rAttr).GetFrameFormat() );
}
-SfxPoolItem* SwFormatFlyCnt::Clone( SfxItemPool* ) const
+SwFormatFlyCnt* SwFormatFlyCnt::Clone( SfxItemPool* ) const
{
return new SwFormatFlyCnt( m_pFormat );
}
diff --git a/sw/source/core/txtnode/atrftn.cxx b/sw/source/core/txtnode/atrftn.cxx
index 548ef6131e7c..a3f0332cb654 100644
--- a/sw/source/core/txtnode/atrftn.cxx
+++ b/sw/source/core/txtnode/atrftn.cxx
@@ -139,7 +139,7 @@ bool SwFormatFootnote::operator==( const SfxPoolItem& rAttr ) const
m_bEndNote == static_cast<const SwFormatFootnote&>(rAttr).m_bEndNote;
}
-SfxPoolItem* SwFormatFootnote::Clone( SfxItemPool* ) const
+SwFormatFootnote* SwFormatFootnote::Clone( SfxItemPool* ) const
{
SwFormatFootnote* pNew = new SwFormatFootnote;
pNew->m_aNumber = m_aNumber;
diff --git a/sw/source/core/txtnode/atrref.cxx b/sw/source/core/txtnode/atrref.cxx
index d9078b5e5f98..88292c8a2f7d 100644
--- a/sw/source/core/txtnode/atrref.cxx
+++ b/sw/source/core/txtnode/atrref.cxx
@@ -50,7 +50,7 @@ bool SwFormatRefMark::operator==( const SfxPoolItem& rAttr ) const
return m_aRefName == static_cast<const SwFormatRefMark&>(rAttr).m_aRefName;
}
-SfxPoolItem* SwFormatRefMark::Clone( SfxItemPool* ) const
+SwFormatRefMark* SwFormatRefMark::Clone( SfxItemPool* ) const
{
return new SwFormatRefMark( *this );
}
diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx
index 31a64a9ed5cd..77ee06fcd7d7 100644
--- a/sw/source/core/txtnode/fmtatr2.cxx
+++ b/sw/source/core/txtnode/fmtatr2.cxx
@@ -78,7 +78,7 @@ bool SwFormatCharFormat::operator==( const SfxPoolItem& rAttr ) const
return GetCharFormat() == static_cast<const SwFormatCharFormat&>(rAttr).GetCharFormat();
}
-SfxPoolItem* SwFormatCharFormat::Clone( SfxItemPool* ) const
+SwFormatCharFormat* SwFormatCharFormat::Clone( SfxItemPool* ) const
{
return new SwFormatCharFormat( *this );
}
@@ -120,7 +120,7 @@ bool SwFormatAutoFormat::operator==( const SfxPoolItem& rAttr ) const
return mpHandle == static_cast<const SwFormatAutoFormat&>(rAttr).mpHandle;
}
-SfxPoolItem* SwFormatAutoFormat::Clone( SfxItemPool* ) const
+SwFormatAutoFormat* SwFormatAutoFormat::Clone( SfxItemPool* ) const
{
return new SwFormatAutoFormat( *this );
}
@@ -220,7 +220,7 @@ bool SwFormatINetFormat::operator==( const SfxPoolItem& rAttr ) const
return rOwn == rOther;
}
-SfxPoolItem* SwFormatINetFormat::Clone( SfxItemPool* ) const
+SwFormatINetFormat* SwFormatINetFormat::Clone( SfxItemPool* ) const
{
return new SwFormatINetFormat( *this );
}
@@ -430,7 +430,7 @@ bool SwFormatRuby::operator==( const SfxPoolItem& rAttr ) const
m_eAdjustment == static_cast<const SwFormatRuby&>(rAttr).m_eAdjustment;
}
-SfxPoolItem* SwFormatRuby::Clone( SfxItemPool* ) const
+SwFormatRuby* SwFormatRuby::Clone( SfxItemPool* ) const
{
return new SwFormatRuby( *this );
}
@@ -561,7 +561,7 @@ bool SwFormatMeta::operator==( const SfxPoolItem & i_rOther ) const
&& m_pMeta == static_cast<SwFormatMeta const &>( i_rOther ).m_pMeta;
}
-SfxPoolItem * SwFormatMeta::Clone( SfxItemPool * /*pPool*/ ) const
+SwFormatMeta* SwFormatMeta::Clone( SfxItemPool * /*pPool*/ ) const
{
// if this is indeed a copy, then DoCopy must be called later!
return m_pMeta // #i105148# pool default may be cloned also!
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index 0401f3b4be17..d2c584884ac6 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -871,8 +871,7 @@ void SwUndoDefaultAttr::UndoImpl(::sw::UndoRedoContext & rContext)
}
if (m_pTabStop)
{
- std::unique_ptr<SvxTabStopItem> pOld(static_cast<SvxTabStopItem*>(
- rDoc.GetDefault( RES_PARATR_TABSTOP ).Clone() ));
+ std::unique_ptr<SvxTabStopItem> pOld(rDoc.GetDefault(RES_PARATR_TABSTOP).Clone());
rDoc.SetDefault( *m_pTabStop );
m_pTabStop = std::move( pOld );
}
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 743ba6b7fb9e..f37db815f23f 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1748,7 +1748,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
{
const SwAttrSet& rSet = pFormat->GetAttrSet();
const std::shared_ptr<SvxBrushItem> aOriginalBrushItem(getSvxBrushItemFromSourceSet(rSet, RES_BACKGROUND, true, pDoc->IsInXMLImport()));
- std::shared_ptr<SvxBrushItem> aChangedBrushItem(static_cast<SvxBrushItem*>(aOriginalBrushItem->Clone()));
+ std::shared_ptr<SvxBrushItem> aChangedBrushItem(aOriginalBrushItem->Clone());
aChangedBrushItem->PutValue(aValue, nMemberId);
@@ -2756,7 +2756,7 @@ void SwXFrame::attachToRange(uno::Reference<text::XTextRange> const& xTextRange,
// to prevent conflicts if the to-be-anchored position is part of the to-be-copied text
if (eAnchorId != RndStdIds::FLY_AT_PAGE)
{
- pAnchorItem.reset(static_cast<SwFormatAnchor*>(aFrameSet.Get(RES_ANCHOR).Clone()));
+ pAnchorItem.reset(aFrameSet.Get(RES_ANCHOR).Clone());
aFrameSet.Put( SwFormatAnchor( RndStdIds::FLY_AT_PAGE, 1 ));
}
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 9b202ea03ae2..b7658b949927 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -1982,7 +1982,7 @@ void SwXNumberingRules::SetPropertiesToNumFormat(
if(!pSetVOrient)
{
if(aFormat.GetGraphicOrientation())
- pSetVOrient.reset( static_cast<SwFormatVertOrient*>(aFormat.GetGraphicOrientation()->Clone()) );
+ pSetVOrient.reset(aFormat.GetGraphicOrientation()->Clone());
else
pSetVOrient.reset(new SwFormatVertOrient);
}
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index e2c8459da312..011cd2dabf2f 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1660,7 +1660,7 @@ void SwXStyle::SetPropertyValue<sal_uInt16(RES_BACKGROUND)>(const SfxItemPropert
{
SfxItemSet& rStyleSet = o_rStyleBase.GetItemSet();
const std::shared_ptr<SvxBrushItem> aOriginalBrushItem(getSvxBrushItemFromSourceSet(rStyleSet, RES_BACKGROUND, true, m_pDoc->IsInXMLImport()));
- std::shared_ptr<SvxBrushItem> aChangedBrushItem(static_cast<SvxBrushItem*>(aOriginalBrushItem->Clone()));
+ std::shared_ptr<SvxBrushItem> aChangedBrushItem(aOriginalBrushItem->Clone());
uno::Any aValue(rValue);
const auto nMemberId(lcl_TranslateMetric(rEntry, m_pDoc, aValue));
@@ -2713,7 +2713,7 @@ void SAL_CALL SwXStyle::setAllPropertiesToDefault()
}
else
{
- aFrameSz.reset(static_cast<SwFormatFrameSize*>(pStdPgDsc->GetMaster().GetFrameSize().Clone()));
+ aFrameSz.reset(pStdPgDsc->GetMaster().GetFrameSize().Clone());
}
if(pStdPgDsc->GetLandscape())
@@ -2823,7 +2823,7 @@ SwXPageStyle::SwXPageStyle(SwDocShell* pDocSh)
void SwXStyle::PutItemToSet(const SvxSetItem* pSetItem, const SfxItemPropertySet& rPropSet, const SfxItemPropertySimpleEntry& rEntry, const uno::Any& rVal, SwStyleBase_Impl& rBaseImpl)
{
// create a new SvxSetItem and get it's ItemSet as new target
- const std::unique_ptr<SvxSetItem> pNewSetItem(static_cast<SvxSetItem*>(pSetItem->Clone()));
+ const std::unique_ptr<SvxSetItem> pNewSetItem(pSetItem->Clone());
SfxItemSet& rSetSet = pNewSetItem->GetItemSet();
// set parent to ItemSet to ensure XFILL_NONE as XFillStyleItem
@@ -2972,7 +2972,7 @@ void SwXPageStyle::SetPropertyValues_Impl(const uno::Sequence<OUString>& rProper
if(SfxItemState::SET == aBaseImpl.GetItemSet().GetItemState(bFooter ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET, false, reinterpret_cast<const SfxPoolItem**>(&pSetItem)))
{
// create a new SvxSetItem and get it's ItemSet as new target
- std::unique_ptr<SvxSetItem> pNewSetItem(static_cast<SvxSetItem*>(pSetItem->Clone()));
+ std::unique_ptr<SvxSetItem> pNewSetItem(pSetItem->Clone());
SfxItemSet& rSetSet = pNewSetItem->GetItemSet();
// set parent to ItemSet to ensure XFILL_NONE as XFillStyleItem
@@ -3653,7 +3653,7 @@ uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle(
case RES_BACKGROUND:
{
const std::shared_ptr<SvxBrushItem> aOriginalBrushItem(getSvxBrushItemFromSourceSet(aSet, RES_BACKGROUND, true, m_pDocShell->GetDoc()->IsInXMLImport()));
- std::shared_ptr<SvxBrushItem> aChangedBrushItem(static_cast<SvxBrushItem*>(aOriginalBrushItem->Clone()));
+ std::shared_ptr<SvxBrushItem> aChangedBrushItem(aOriginalBrushItem->Clone());
aChangedBrushItem->PutValue(aValue, nMemberId);
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 3844f4de8fd3..a8615e109a03 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -1985,10 +1985,10 @@ void SwTableProperties_Impl::ApplyTableAttr(const SwTable& rTable, SwDoc& rDoc)
}
if(bPutBreak)
- AddItemToSet<std::shared_ptr<SvxFormatBreakItem>>(aSet, [&rFrameFormat]() { return std::shared_ptr<SvxFormatBreakItem>(static_cast<SvxFormatBreakItem*>(rFrameFormat.GetBreak().Clone())); }, RES_BREAK, {0});
- AddItemToSet<std::shared_ptr<SvxShadowItem>>(aSet, [&rFrameFormat]() { return std::shared_ptr<SvxShadowItem>(static_cast<SvxShadowItem*>(rFrameFormat.GetShadow().Clone())); }, RES_SHADOW, {0}, true);
- AddItemToSet<std::shared_ptr<SvxFormatKeepItem>>(aSet, [&rFrameFormat]() { return std::shared_ptr<SvxFormatKeepItem>(static_cast<SvxFormatKeepItem*>(rFrameFormat.GetKeep().Clone())); }, RES_KEEP, {0});
- AddItemToSet<std::shared_ptr<SwFormatHoriOrient>>(aSet, [&rFrameFormat]() { return std::shared_ptr<SwFormatHoriOrient>(static_cast<SwFormatHoriOrient*>(rFrameFormat.GetHoriOrient().Clone())); }, RES_HORI_ORIENT, {MID_HORIORIENT_ORIENT}, true);
+ AddItemToSet<std::shared_ptr<SvxFormatBreakItem>>(aSet, [&rFrameFormat]() { return std::shared_ptr<SvxFormatBreakItem>(rFrameFormat.GetBreak().Clone()); }, RES_BREAK, {0});
+ AddItemToSet<std::shared_ptr<SvxShadowItem>>(aSet, [&rFrameFormat]() { return std::shared_ptr<SvxShadowItem>(rFrameFormat.GetShadow().Clone()); }, RES_SHADOW, {0}, true);
+ AddItemToSet<std::shared_ptr<SvxFormatKeepItem>>(aSet, [&rFrameFormat]() { return std::shared_ptr<SvxFormatKeepItem>(rFrameFormat.GetKeep().Clone()); }, RES_KEEP, {0});
+ AddItemToSet<std::shared_ptr<SwFormatHoriOrient>>(aSet, [&rFrameFormat]() { return std::shared_ptr<SwFormatHoriOrient>(rFrameFormat.GetHoriOrient().Clone()); }, RES_HORI_ORIENT, {MID_HORIORIENT_ORIENT}, true);
const uno::Any* pSzRel(nullptr);
GetProperty(FN_TABLE_IS_RELATIVE_WIDTH, 0xff, pSzRel);
@@ -2015,10 +2015,10 @@ void SwTableProperties_Impl::ApplyTableAttr(const SwTable& rTable, SwDoc& rDoc)
aSz.SetWidth(MINLAY);
aSet.Put(aSz);
}
- AddItemToSet<std::shared_ptr<SvxLRSpaceItem>>(aSet, [&rFrameFormat]() { return std::shared_ptr<SvxLRSpaceItem>(static_cast<SvxLRSpaceItem*>(rFrameFormat.GetLRSpace().Clone())); }, RES_LR_SPACE, {
+ AddItemToSet<std::shared_ptr<SvxLRSpaceItem>>(aSet, [&rFrameFormat]() { return std::shared_ptr<SvxLRSpaceItem>(rFrameFormat.GetLRSpace().Clone()); }, RES_LR_SPACE, {
MID_L_MARGIN|CONVERT_TWIPS,
MID_R_MARGIN|CONVERT_TWIPS });
- AddItemToSet<std::shared_ptr<SvxULSpaceItem>>(aSet, [&rFrameFormat]() { return std::shared_ptr<SvxULSpaceItem>(static_cast<SvxULSpaceItem*>(rFrameFormat.GetULSpace().Clone())); }, RES_UL_SPACE, {
+ AddItemToSet<std::shared_ptr<SvxULSpaceItem>>(aSet, [&rFrameFormat]() { return std::shared_ptr<SvxULSpaceItem>(rFrameFormat.GetULSpace().Clone()); }, RES_UL_SPACE, {
MID_UP_MARGIN|CONVERT_TWIPS,
MID_LO_MARGIN|CONVERT_TWIPS });
const::uno::Any* pSplit(nullptr);
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx
index 847930fc84a1..80593b032411 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -308,7 +308,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() )
{
- std::shared_ptr<SwFormatFrameSize> aSz(static_cast<SwFormatFrameSize*>(rFlySet.Get(RES_FRM_SIZE).Clone()));
+ std::shared_ptr<SwFormatFrameSize> aSz(rFlySet.Get(RES_FRM_SIZE).Clone());
if (pItem)
aSz.reset(static_cast<SwFormatFrameSize*>(pItem->Clone()));
diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx
index 950a3b0c2029..359ab5628e77 100644
--- a/sw/source/filter/basflt/fltshell.cxx
+++ b/sw/source/filter/basflt/fltshell.cxx
@@ -970,7 +970,7 @@ bool SwFltAnchor::operator==(const SfxPoolItem& rItem) const
pFrameFormat == static_cast<const SwFltAnchor&>(rItem).pFrameFormat;
}
-SfxPoolItem* SwFltAnchor::Clone(SfxItemPool*) const
+SwFltAnchor* SwFltAnchor::Clone(SfxItemPool*) const
{
return new SwFltAnchor(*this);
}
@@ -999,7 +999,7 @@ bool SwFltRedline::operator==(const SfxPoolItem& rItem) const
this == &rItem;
}
-SfxPoolItem* SwFltRedline::Clone( SfxItemPool* ) const
+SwFltRedline* SwFltRedline::Clone( SfxItemPool* ) const
{
return new SwFltRedline(*this);
}
@@ -1033,7 +1033,7 @@ bool SwFltBookmark::operator==(const SfxPoolItem& rItem) const
&& mnHandle == static_cast<const SwFltBookmark&>(rItem).mnHandle;
}
-SfxPoolItem* SwFltBookmark::Clone(SfxItemPool*) const
+SwFltBookmark* SwFltBookmark::Clone(SfxItemPool*) const
{
return new SwFltBookmark(*this);
}
@@ -1054,7 +1054,7 @@ bool SwFltRDFMark::operator==(const SfxPoolItem& rItem) const
return m_nHandle == rMark.m_nHandle && m_aAttributes == rMark.m_aAttributes;
}
-SfxPoolItem* SwFltRDFMark::Clone(SfxItemPool*) const
+SwFltRDFMark* SwFltRDFMark::Clone(SfxItemPool*) const
{
return new SwFltRDFMark(*this);
}
@@ -1092,7 +1092,7 @@ bool SwFltTOX::operator==(const SfxPoolItem& rItem) const
m_xTOXBase.get() == static_cast<const SwFltTOX&>(rItem).m_xTOXBase.get();
}
-SfxPoolItem* SwFltTOX::Clone(SfxItemPool*) const
+SwFltTOX* SwFltTOX::Clone(SfxItemPool*) const
{
return new SwFltTOX(*this);
}
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index 40a2395ad793..8d7499a82aa2 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -382,7 +382,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush,
std::shared_ptr<SvxFrameDirectionItem> aFrameDirItem(std::make_shared<SvxFrameDirectionItem>(SvxFrameDirection::Environment, RES_FRAMEDIR));
bool bSetBrush = pBrush!=nullptr, bSetBox = false, bSetFrameDir = false;
if( pBrush )
- aBrushItem.reset(static_cast<SvxBrushItem*>(pBrush->Clone()));
+ aBrushItem.reset(pBrush->Clone());
if( pItemSet2 )
{
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index cbfbe2e919f3..6d4621c392af 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -599,7 +599,7 @@ void SvxCSS1PropertyInfo::SetBoxItem( SfxItemSet& rItemSet,
std::shared_ptr<SvxBoxItem> aBoxItem(std::make_shared<SvxBoxItem>(aItemIds.nBox));
if( pDfltItem )
- aBoxItem.reset(static_cast<SvxBoxItem*>(pDfltItem->Clone()));
+ aBoxItem.reset(pDfltItem->Clone());
SvxCSS1BorderInfo *pInfo = GetBorderInfo( SvxBoxItemLine::TOP, false );
if( pInfo )
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index f1fcfbbbacf2..7cc45bbe1a04 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -5160,7 +5160,7 @@ void SwHTMLParser::InsertLineBreak()
{
if( m_pCSS1Parser->SetFormatBreak( aItemSet, aPropInfo ) )
{
- aBreakItem.reset(static_cast<SvxFormatBreakItem*>(aItemSet.Get(RES_BREAK).Clone()));
+ aBreakItem.reset(aItemSet.Get(RES_BREAK).Clone());
bBreakItem = true;
}
if( !aPropInfo.m_aId.isEmpty() )
diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx
index 83478a939cb5..3bff180bc1cf 100644
--- a/sw/source/filter/inc/fltshell.hxx
+++ b/sw/source/filter/inc/fltshell.hxx
@@ -192,7 +192,7 @@ public:
// "purely virtual methods" of SfxPoolItem
virtual bool operator==(const SfxPoolItem&) const override;
- virtual SfxPoolItem* Clone(SfxItemPool* = nullptr) const override;
+ virtual SwFltAnchor* Clone(SfxItemPool* = nullptr) const override;
void SetFrameFormat(SwFrameFormat* _pFrameFormat);
const SwFrameFormat* GetFrameFormat() const { return pFrameFormat; }
SwFrameFormat* GetFrameFormat() { return pFrameFormat; }
@@ -224,7 +224,7 @@ public:
// "purely virtual methods" of SfxPoolItem
virtual bool operator==(const SfxPoolItem& rItem) const override;
- virtual SfxPoolItem* Clone(SfxItemPool* = nullptr) const override;
+ virtual SwFltRedline* Clone(SfxItemPool* = nullptr) const override;
};
class SW_DLLPUBLIC SwFltBookmark : public SfxPoolItem
@@ -244,7 +244,7 @@ public:
// "purely virtual methods" of SfxPoolItem
virtual bool operator==(const SfxPoolItem&) const override;
- virtual SfxPoolItem* Clone(SfxItemPool* = nullptr) const override;
+ virtual SwFltBookmark* Clone(SfxItemPool* = nullptr) const override;
long GetHandle() const { return mnHandle; }
const OUString& GetName() const { return maName; }
@@ -265,7 +265,7 @@ public:
SwFltRDFMark();
virtual bool operator==(const SfxPoolItem&) const override;
- virtual SfxPoolItem* Clone(SfxItemPool* = nullptr) const override;
+ virtual SwFltRDFMark* Clone(SfxItemPool* = nullptr) const override;
void SetHandle(long nHandle);
long GetHandle() const;
@@ -282,7 +282,7 @@ public:
SwFltTOX(SwTOXBase* pBase);
// "purely virtual methods" of SfxPoolItem
virtual bool operator==(const SfxPoolItem&) const override;
- virtual SfxPoolItem* Clone(SfxItemPool* = nullptr) const override;
+ virtual SwFltTOX* Clone(SfxItemPool* = nullptr) const override;
const SwTOXBase& GetBase() const { return *m_xTOXBase; }
void SetHadBreakItem( bool bVal ) { bHadBreakItem = bVal; }
void SetHadPageDescItem( bool bVal ) { bHadPageDescItem = bVal; }
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index f3d1fb00997e..18f8386751b1 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -1602,7 +1602,7 @@ void SwBasicEscherEx::WriteGrfBullet(const Graphic& rGrf)
std::shared_ptr<SvxBrushItem> aBrush(std::make_shared<SvxBrushItem>(aTmpColor, RES_BACKGROUND));
const SvxBrushItem* pRet = rWrt.GetCurrentPageBgBrush();
if (pRet && (pRet->GetGraphic() ||( pRet->GetColor() != COL_TRANSPARENT)))
- aBrush.reset(static_cast<SvxBrushItem*>(pRet->Clone()));
+ aBrush.reset(pRet->Clone());
WriteBrushAttr(*aBrush, aPropOpt);
aPropOpt.AddOpt( ESCHER_Prop_pictureActive, 0 );
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 83563e42aa0f..b3afd2ce0729 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -483,7 +483,7 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bWriteCombChars)
{
if (const SfxGrabBagItem *pCharFmtGrabBag = aExportSet.GetItem<SfxGrabBagItem>(RES_CHRATR_GRABBAG, false))
{
- std::unique_ptr<SfxGrabBagItem> pNewCharFmtGrabBag(static_cast<SfxGrabBagItem*>(pCharFmtGrabBag->Clone()));
+ std::unique_ptr<SfxGrabBagItem> pNewCharFmtGrabBag(pCharFmtGrabBag->Clone());
assert(pNewCharFmtGrabBag);
auto & rNewFmtMap = pNewCharFmtGrabBag->GetGrabBag();
for (auto const & item : pAutoFmtGrabBag->GetGrabBag())
@@ -1655,7 +1655,7 @@ std::shared_ptr<SvxBrushItem> WW8Export::TrueFrameBgBrush(const SwFrameFormat &r
if (pRet && (pRet->GetGraphic() ||( pRet->GetColor() != COL_TRANSPARENT)))
{
- aRet.reset(static_cast<SvxBrushItem*>(pRet->Clone()));
+ aRet.reset(pRet->Clone());
}
return aRet;
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index ecdb725c3e76..f0aee3225cdc 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -1762,7 +1762,7 @@ void SwWW8ImplReader::RegisterNumFormatOnStyle(sal_uInt16 nStyle)
if (rStyleInf.m_bValid && rStyleInf.m_pFormat)
{
//Save old pre-list modified indent, which are the word indent values
- rStyleInf.maWordLR.reset(static_cast<SvxLRSpaceItem*>(ItemGet<SvxLRSpaceItem>(*rStyleInf.m_pFormat, RES_LR_SPACE).Clone()));
+ rStyleInf.maWordLR.reset(ItemGet<SvxLRSpaceItem>(*rStyleInf.m_pFormat, RES_LR_SPACE).Clone());
// Phase 2: refresh StyleDef after reading all Lists
SwNumRule* pNmRule = nullptr;
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index a27b27749c0a..f16ca7565bd7 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -3621,8 +3621,7 @@ void SwWW8ImplReader::Read_UnderlineColor(sal_uInt16, const sal_uInt8* pData, sh
if (nLen >= 4)
{
const SwAttrSet& aSet = m_pCurrentColl->GetAttrSet();
- std::unique_ptr<SvxUnderlineItem> pUnderline(
- static_cast<SvxUnderlineItem *>(aSet.Get( RES_CHRATR_UNDERLINE, false ).Clone()));
+ std::unique_ptr<SvxUnderlineItem> pUnderline(aSet.Get(RES_CHRATR_UNDERLINE, false).Clone());
pUnderline->SetColor( msfilter::util::BGRToRGB(SVBT32ToUInt32(pData)) );
m_pCurrentColl->SetFormatAttr( *pUnderline );
}
@@ -3634,7 +3633,7 @@ void SwWW8ImplReader::Read_UnderlineColor(sal_uInt16, const sal_uInt8* pData, sh
{
if (nLen >= 4)
{
- std::unique_ptr<SvxUnderlineItem> pUnderline(static_cast<SvxUnderlineItem*>(m_xCurrentItemSet->Get(RES_CHRATR_UNDERLINE, false).Clone()));
+ std::unique_ptr<SvxUnderlineItem> pUnderline(m_xCurrentItemSet->Get(RES_CHRATR_UNDERLINE, false).Clone());
pUnderline->SetColor( msfilter::util::BGRToRGB(SVBT32ToUInt32(pData)) );
m_xCurrentItemSet->Put( std::move(pUnderline) );
}
@@ -5010,7 +5009,7 @@ void SwWW8ImplReader::Read_Border(sal_uInt16 , const sal_uInt8*, short nLen)
= static_cast<const SvxBoxItem*>(GetFormatAttr( RES_BOX ));
std::shared_ptr<SvxBoxItem> aBox(std::make_shared<SvxBoxItem>(RES_BOX));
if (pBox)
- aBox.reset(static_cast<SvxBoxItem*>(pBox->Clone()));
+ aBox.reset(pBox->Clone());
short aSizeArray[5]={0};
SetBorder(*aBox, aBrcs, &aSizeArray[0], nBorder);
@@ -5057,7 +5056,7 @@ void SwWW8ImplReader::Read_CharBorder(sal_uInt16 nId, const sal_uInt8* pData, sh
= static_cast<const SvxBoxItem*>(GetFormatAttr( RES_CHRATR_BOX ));
if( pBox )
{
- std::shared_ptr<SvxBoxItem> aBoxItem(static_cast<SvxBoxItem*>(pBox->Clone()));
+ std::shared_ptr<SvxBoxItem> aBoxItem(pBox->Clone());
WW8_BRCVer9 aBrc;
int nBrcVer = (nId == NS_sprm::sprmCBrc) ? 9 : (m_bVer67 ? 6 : 8);
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index fe7458310a6d..fcabb9bb525b 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -111,7 +111,7 @@ bool SwParagraphNumTabPage::FillItemSet( SfxItemSet* rSet )
const SfxUInt16Item* pOldOutlineLv = static_cast<const SfxUInt16Item*>(GetOldItem( *rSet, SID_ATTR_PARA_OUTLINE_LEVEL));
if (pOldOutlineLv)
{
- std::unique_ptr<SfxUInt16Item> pOutlineLv(static_cast<SfxUInt16Item*>(pOldOutlineLv->Clone()));
+ std::unique_ptr<SfxUInt16Item> pOutlineLv(pOldOutlineLv->Clone());
pOutlineLv->SetValue( aOutlineLv );
rSet->Put(std::move(pOutlineLv));
bModified = true;
@@ -126,7 +126,7 @@ bool SwParagraphNumTabPage::FillItemSet( SfxItemSet* rSet )
const SfxStringItem* pOldRule = static_cast<const SfxStringItem*>(GetOldItem( *rSet, SID_ATTR_PARA_NUMRULE));
if (pOldRule)
{
- std::unique_ptr<SfxStringItem> pRule(static_cast<SfxStringItem*>(pOldRule->Clone()));
+ std::unique_ptr<SfxStringItem> pRule(pOldRule->Clone());
pRule->SetValue(aStyle);
rSet->Put(std::move(pRule));
bModified = true;
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 840cdf7c7904..33f82dd0a25f 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -209,8 +209,8 @@ SectRepr::SectRepr( size_t nPos, SwSection& rSect )
m_FootnoteNtAtEnd = pFormat->GetFootnoteAtTextEnd();
m_EndNtAtEnd = pFormat->GetEndAtTextEnd();
m_Balance.SetValue(pFormat->GetBalancedColumns().GetValue());
- m_FrameDirItem.reset(static_cast<SvxFrameDirectionItem*>(pFormat->GetFrameDir().Clone()));
- m_LRSpaceItem.reset(static_cast<SvxLRSpaceItem*>(pFormat->GetLRSpace().Clone()));
+ m_FrameDirItem.reset(pFormat->GetFrameDir().Clone());
+ m_LRSpaceItem.reset(pFormat->GetLRSpace().Clone());
}
}
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index f83dd0232525..d99562c06266 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2728,7 +2728,7 @@ bool SwFrameURLPage::FillItemSet(SfxItemSet *rSet)
const SwFormatURL* pOldURL = GetOldItem(*rSet, RES_URL);
std::unique_ptr<SwFormatURL> pFormatURL;
if(pOldURL)
- pFormatURL.reset(static_cast<SwFormatURL*>(pOldURL->Clone()));
+ pFormatURL.reset(pOldURL->Clone());
else
pFormatURL.reset(new SwFormatURL());
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index 33a95f2cca83..4353f00588cd 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -269,7 +269,7 @@ bool SwWrapTabPage::FillItemSet(SfxItemSet *rSet)
if (!m_bDrawMode)
{
- aOp.reset(static_cast<SvxOpaqueItem*>(GetItemSet().Get(RES_OPAQUE).Clone()));
+ aOp.reset(GetItemSet().Get(RES_OPAQUE).Clone());
aOp->SetValue(true);
}
diff --git a/sw/source/uibase/chrdlg/ccoll.cxx b/sw/source/uibase/chrdlg/ccoll.cxx
index 0f2d122016c6..be2a72d1c558 100644
--- a/sw/source/uibase/chrdlg/ccoll.cxx
+++ b/sw/source/uibase/chrdlg/ccoll.cxx
@@ -140,7 +140,7 @@ SwCondCollItem::~SwCondCollItem()
{
}
-SfxPoolItem* SwCondCollItem::Clone( SfxItemPool * /*pPool*/ ) const
+SwCondCollItem* SwCondCollItem::Clone( SfxItemPool * /*pPool*/ ) const
{
return new SwCondCollItem(*this);
}
diff --git a/sw/source/uibase/config/cfgitems.cxx b/sw/source/uibase/config/cfgitems.cxx
index 3c6114c9a9a6..3c20fcce7b1e 100644
--- a/sw/source/uibase/config/cfgitems.cxx
+++ b/sw/source/uibase/config/cfgitems.cxx
@@ -55,7 +55,7 @@ SwDocDisplayItem::SwDocDisplayItem(const SwViewOption& rVOpt ) :
bManualBreak = rVOpt.IsLineBreak(true);
}
-SfxPoolItem* SwDocDisplayItem::Clone( SfxItemPool* ) const
+SwDocDisplayItem* SwDocDisplayItem::Clone( SfxItemPool* ) const
{
return new SwDocDisplayItem( *this );
}
@@ -120,7 +120,7 @@ SwElemItem::SwElemItem(const SwViewOption& rVOpt) :
m_bShowHiddenPara = rVOpt.IsShowHiddenPara();
}
-SfxPoolItem* SwElemItem::Clone( SfxItemPool* ) const
+SwElemItem* SwElemItem::Clone( SfxItemPool* ) const
{
return new SwElemItem( *this );
}
@@ -175,7 +175,7 @@ SwAddPrinterItem::SwAddPrinterItem( const SwPrintData& rPrtData ) :
SwPrintData::operator=(rPrtData);
}
-SfxPoolItem* SwAddPrinterItem::Clone( SfxItemPool* ) const
+SwAddPrinterItem* SwAddPrinterItem::Clone( SfxItemPool* ) const
{
return new SwAddPrinterItem( *this );
}
@@ -205,7 +205,7 @@ SwShadowCursorItem::SwShadowCursorItem( const SwViewOption& rVOpt )
{
}
-SfxPoolItem* SwShadowCursorItem::Clone( SfxItemPool* ) const
+SwShadowCursorItem* SwShadowCursorItem::Clone( SfxItemPool* ) const
{
return new SwShadowCursorItem( *this );
}
@@ -224,7 +224,7 @@ void SwShadowCursorItem::FillViewOptions( SwViewOption& rVOpt ) const
}
#ifdef DBG_UTIL
-SfxPoolItem* SwTestItem::Clone( SfxItemPool* ) const
+SwTestItem* SwTestItem::Clone( SfxItemPool* ) const
{
return new SwTestItem( *this );
}
diff --git a/sw/source/uibase/dialog/swwrtshitem.cxx b/sw/source/uibase/dialog/swwrtshitem.cxx
index 03f7fabe4871..ad88e205e210 100644
--- a/sw/source/uibase/dialog/swwrtshitem.cxx
+++ b/sw/source/uibase/dialog/swwrtshitem.cxx
@@ -32,7 +32,7 @@ bool SwWrtShellItem::operator==( const SfxPoolItem& rItem) const
&& pWrtSh == static_cast<const SwWrtShellItem&>(rItem).pWrtSh;
}
-SfxPoolItem* SwWrtShellItem::Clone( SfxItemPool * /*pPool*/ ) const
+SwWrtShellItem* SwWrtShellItem::Clone( SfxItemPool * /*pPool*/ ) const
{
return new SwWrtShellItem( *this );
}
diff --git a/sw/source/uibase/envelp/envimg.cxx b/sw/source/uibase/envelp/envimg.cxx
index e9bfb829dd36..85a2631935f7 100644
--- a/sw/source/uibase/envelp/envimg.cxx
+++ b/sw/source/uibase/envelp/envimg.cxx
@@ -147,7 +147,7 @@ bool SwEnvItem::operator ==(const SfxPoolItem& rItem) const
m_nShiftDown == rEnv.m_nShiftDown;
}
-SfxPoolItem* SwEnvItem::Clone(SfxItemPool*) const
+SwEnvItem* SwEnvItem::Clone(SfxItemPool*) const
{
return new SwEnvItem(*this);
}
diff --git a/sw/source/uibase/envelp/labimg.cxx b/sw/source/uibase/envelp/labimg.cxx
index c77189bbd0fd..a8829d935d70 100644
--- a/sw/source/uibase/envelp/labimg.cxx
+++ b/sw/source/uibase/envelp/labimg.cxx
@@ -179,7 +179,7 @@ bool SwLabItem::operator ==(const SfxPoolItem& rItem) const
m_sGlossaryBlockName == rLab.m_sGlossaryBlockName;
}
-SfxPoolItem* SwLabItem::Clone(SfxItemPool*) const
+SwLabItem* SwLabItem::Clone(SfxItemPool*) const
{
return new SwLabItem(*this);
}
diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx
index 3bfddca491c2..33a107d2641b 100644
--- a/sw/source/uibase/frmdlg/colex.cxx
+++ b/sw/source/uibase/frmdlg/colex.cxx
@@ -603,7 +603,7 @@ void SwPageGridExample::UpdateExample( const SfxItemSet& rSet )
pGridItem.reset();
//get the grid information
if (SfxItemState::DEFAULT <= rSet.GetItemState(RES_TEXTGRID))
- pGridItem.reset(static_cast<SwTextGridItem*>(rSet.Get(RES_TEXTGRID).Clone()));
+ pGridItem.reset(rSet.Get(RES_TEXTGRID).Clone());
SwPageExample::UpdateExample(rSet);
}
diff --git a/sw/source/uibase/inc/cfgitems.hxx b/sw/source/uibase/inc/cfgitems.hxx
index 33b11bfe17f2..40f21ff6e98d 100644
--- a/sw/source/uibase/inc/cfgitems.hxx
+++ b/sw/source/uibase/inc/cfgitems.hxx
@@ -55,7 +55,7 @@ public:
SwDocDisplayItem();
SwDocDisplayItem( const SwViewOption& rVOpt );
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwDocDisplayItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
void FillViewOptions( SwViewOption& rVOpt) const;
};
@@ -86,7 +86,7 @@ public:
SwElemItem();
SwElemItem(const SwViewOption& rVOpt);
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwElemItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
void FillViewOptions( SwViewOption& rVOpt) const;
@@ -103,7 +103,7 @@ public:
SwAddPrinterItem();
SwAddPrinterItem( const SwPrintData& rPrtData );
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwAddPrinterItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
};
@@ -117,7 +117,7 @@ public:
SwShadowCursorItem();
SwShadowCursorItem( const SwViewOption& rVOpt );
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwShadowCursorItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
void FillViewOptions( SwViewOption& rVOpt) const;
@@ -151,7 +151,7 @@ class SW_DLLPUBLIC SwTestItem : public SfxPoolItem
public:
SwTestItem() : SfxPoolItem(FN_PARAM_SWTEST) {};
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwTestItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
};
diff --git a/sw/source/uibase/inc/envimg.hxx b/sw/source/uibase/inc/envimg.hxx
index 46974d37a4dd..b63d6b0a5d15 100644
--- a/sw/source/uibase/inc/envimg.hxx
+++ b/sw/source/uibase/inc/envimg.hxx
@@ -61,7 +61,7 @@ public:
virtual bool operator ==(const SfxPoolItem& rItem) const override;
- virtual SfxPoolItem* Clone(SfxItemPool* = nullptr) const override;
+ virtual SwEnvItem* Clone(SfxItemPool* = nullptr) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
};
diff --git a/sw/source/uibase/inc/labimg.hxx b/sw/source/uibase/inc/labimg.hxx
index 100cbec2d9c1..8456f8d53710 100644
--- a/sw/source/uibase/inc/labimg.hxx
+++ b/sw/source/uibase/inc/labimg.hxx
@@ -38,7 +38,7 @@ public:
virtual bool operator ==(const SfxPoolItem& rItem) const override;
- virtual SfxPoolItem* Clone(SfxItemPool* = nullptr) const override;
+ virtual SwLabItem* Clone(SfxItemPool* = nullptr) const override;
OUString m_aLstMake; // remember last selection
OUString m_aLstType;
diff --git a/sw/source/uibase/inc/swwrtshitem.hxx b/sw/source/uibase/inc/swwrtshitem.hxx
index ef0c9ba203c5..1cffcc9193f3 100644
--- a/sw/source/uibase/inc/swwrtshitem.hxx
+++ b/sw/source/uibase/inc/swwrtshitem.hxx
@@ -31,7 +31,7 @@ public:
SwWrtShellItem( SwWrtShell* pWrtSh );
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwWrtShellItem* Clone( SfxItemPool *pPool = nullptr ) const override;
SwWrtShell* GetValue() const { return pWrtSh; }
diff --git a/sw/source/uibase/inc/uiitems.hxx b/sw/source/uibase/inc/uiitems.hxx
index 81fa94e16f76..70174273c01d 100644
--- a/sw/source/uibase/inc/uiitems.hxx
+++ b/sw/source/uibase/inc/uiitems.hxx
@@ -43,7 +43,7 @@ public:
SwPageFootnoteInfoItem & operator =(SwPageFootnoteInfoItem const &) = delete; // due to SfxPoolItem
SwPageFootnoteInfoItem & operator =(SwPageFootnoteInfoItem &&) = delete; // due to SfxPoolItem
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwPageFootnoteInfoItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
@@ -65,7 +65,7 @@ class SW_DLLPUBLIC SwPtrItem : public SfxPoolItem
public:
SwPtrItem( const sal_uInt16 nId, void* pPtr);
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwPtrItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
void* GetValue() const { return pMisc; }
@@ -80,7 +80,7 @@ public:
SwUINumRuleItem( const SwUINumRuleItem& rItem );
virtual ~SwUINumRuleItem() override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwUINumRuleItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
@@ -97,7 +97,7 @@ class SwPaMItem : public SfxPoolItem
public:
SwPaMItem( const sal_uInt16 nId, SwPaM* pPaM);
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SwPaMItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
SwPaM* GetValue() const { return m_pPaM; }
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index f3df5d011fb6..324dcdec9ea8 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -1073,7 +1073,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest const & rReq)
if (pPoolBoxItem == &rBoxItem)
bDefault = true;
- std::shared_ptr<SvxBoxItem> aBoxItem(static_cast<SvxBoxItem*>(rBoxItem.Clone()));
+ std::shared_ptr<SvxBoxItem> aBoxItem(rBoxItem.Clone());
SvxBorderLine aBorderLine;
const SfxPoolItem *pItem = nullptr;
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index 1486855b4c24..35e589e3b961 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -985,7 +985,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
// #108876# a font attribute has to be set always due to a guessed script type
if( !aNewFont.GetFamilyName().isEmpty() )
{
- std::shared_ptr<SvxFontItem> aNewFontItem(static_cast<SvxFontItem*>(aFont->Clone()));
+ std::shared_ptr<SvxFontItem> aNewFontItem(aFont->Clone());
aNewFontItem->SetFamilyName( aNewFont.GetFamilyName() );
aNewFontItem->SetFamily( aNewFont.GetFamilyType());
aNewFontItem->SetPitch( aNewFont.GetPitch());
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index 33691a4d2cba..36795a5d02ed 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -559,7 +559,7 @@ SvxSearchItem* SwSrcView::GetSearchItem()
void SwSrcView::SetSearchItem( const SvxSearchItem& rItem )
{
- pSearchItem.reset(static_cast<SvxSearchItem*>(rItem.Clone()));
+ pSearchItem.reset(rItem.Clone());
}
void SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx
index a1c95c2407ca..c20e8f3cd00f 100644
--- a/sw/source/uibase/uiview/viewsrch.cxx
+++ b/sw/source/uibase/uiview/viewsrch.cxx
@@ -160,7 +160,7 @@ void SwView::ExecSearch(SfxRequest& rReq)
case SID_SEARCH_ITEM:
{
delete s_pSrchItem;
- s_pSrchItem = static_cast<SvxSearchItem*>( pArgs->Get(SID_SEARCH_ITEM).Clone() );
+ s_pSrchItem = pArgs->Get(SID_SEARCH_ITEM).Clone();
}
break;
@@ -174,7 +174,7 @@ void SwView::ExecSearch(SfxRequest& rReq)
{
// Unregister dialog
delete s_pSrchItem;
- s_pSrchItem = static_cast<SvxSearchItem*>( pArgs->Get(SID_SEARCH_ITEM).Clone() );
+ s_pSrchItem = pArgs->Get(SID_SEARCH_ITEM).Clone();
DELETEZ( s_pSearchList );
DELETEZ( s_pReplaceList );
@@ -231,7 +231,7 @@ void SwView::ExecSearch(SfxRequest& rReq)
if ( pArgs )
{
delete s_pSrchItem;
- s_pSrchItem = static_cast<SvxSearchItem*>( pArgs->Get(SID_SEARCH_ITEM).Clone() );
+ s_pSrchItem = pArgs->Get(SID_SEARCH_ITEM).Clone();
}
}
SvxSearchCmd eCommand = s_pSrchItem->GetCommand();
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index ac46c5a1622a..2e4efe96d682 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -726,7 +726,7 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
if ( i >= rTabStops.Count() )
{
// No DefTab
- std::shared_ptr<SvxTabStopItem> aTabStops(static_cast<SvxTabStopItem*>(rTabStops.Clone()));
+ std::shared_ptr<SvxTabStopItem> aTabStops(rTabStops.Clone());
::lcl_EraseDefTabs(*aTabStops);
@@ -1538,7 +1538,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
std::shared_ptr<SvxLRSpaceItem> aLR(std::make_shared<SvxLRSpaceItem>(RES_LR_SPACE));
if ( !IsTabColFromDoc() )
{
- aLR.reset(static_cast<SvxLRSpaceItem*>(aCoreSet.Get(RES_LR_SPACE).Clone()));
+ aLR.reset(aCoreSet.Get(RES_LR_SPACE).Clone());
// #i23726#
if (m_pNumRuleNodeFromDoc)
diff --git a/sw/source/uibase/utlui/uiitems.cxx b/sw/source/uibase/utlui/uiitems.cxx
index 20f9d48be8d8..dd520f91d77e 100644
--- a/sw/source/uibase/utlui/uiitems.cxx
+++ b/sw/source/uibase/utlui/uiitems.cxx
@@ -40,11 +40,11 @@ SwPageFootnoteInfoItem::SwPageFootnoteInfoItem( SwPageFootnoteInfo const & rInfo
{
}
- SwPageFootnoteInfoItem::~SwPageFootnoteInfoItem()
+SwPageFootnoteInfoItem::~SwPageFootnoteInfoItem()
{
}
-SfxPoolItem* SwPageFootnoteInfoItem::Clone( SfxItemPool * /*pPool*/ ) const
+SwPageFootnoteInfoItem* SwPageFootnoteInfoItem::Clone( SfxItemPool * /*pPool*/ ) const
{
return new SwPageFootnoteInfoItem( *this );
}
@@ -197,7 +197,7 @@ SwPtrItem::SwPtrItem( const sal_uInt16 nId, void* pPtr ) :
// Cloning
-SfxPoolItem* SwPtrItem::Clone( SfxItemPool * /*pPool*/ ) const
+SwPtrItem* SwPtrItem::Clone( SfxItemPool * /*pPool*/ ) const
{
return new SwPtrItem( *this );
}
@@ -225,7 +225,7 @@ SwUINumRuleItem::~SwUINumRuleItem()
{
}
-SfxPoolItem* SwUINumRuleItem::Clone( SfxItemPool * /*pPool*/ ) const
+SwUINumRuleItem* SwUINumRuleItem::Clone( SfxItemPool * /*pPool*/ ) const
{
return new SwUINumRuleItem( *this );
}
@@ -262,7 +262,7 @@ SwPaMItem::SwPaMItem( const sal_uInt16 nId, SwPaM* pPaM ) :
{
}
-SfxPoolItem* SwPaMItem::Clone( SfxItemPool * /*pPool*/ ) const
+SwPaMItem* SwPaMItem::Clone( SfxItemPool * /*pPool*/ ) const
{
return new SwPaMItem( *this );
}