summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter')
-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
10 files changed, 22 insertions, 23 deletions
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);