summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/inc/swrenamexnameddlg.hxx4
-rw-r--r--sw/source/uibase/shells/frmsh.cxx6
-rw-r--r--sw/source/uibase/shells/tabsh.cxx4
-rw-r--r--sw/source/uibase/shells/textsh.cxx2
-rw-r--r--sw/source/uibase/uiview/formatclipboard.cxx9
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx2
6 files changed, 13 insertions, 14 deletions
diff --git a/sw/source/uibase/inc/swrenamexnameddlg.hxx b/sw/source/uibase/inc/swrenamexnameddlg.hxx
index 381f9e7a35b2..b4540857e563 100644
--- a/sw/source/uibase/inc/swrenamexnameddlg.hxx
+++ b/sw/source/uibase/inc/swrenamexnameddlg.hxx
@@ -33,8 +33,8 @@ class SwRenameXNamedDlg : public weld::GenericDialogController
TextFilter m_aTextFilter;
- std::shared_ptr<weld::Entry> m_xNewNameED;
- std::shared_ptr<weld::Button> m_xOk;
+ std::unique_ptr<weld::Entry> m_xNewNameED;
+ std::unique_ptr<weld::Button> m_xOk;
DECL_LINK(TextFilterHdl, OUString&, bool);
DECL_LINK(OkHdl, weld::Button&, void);
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index 61ab59bfc00e..186a6d337801 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -1101,7 +1101,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest const & rReq)
if (pPoolBoxItem == &rBoxItem)
bDefault = true;
- std::shared_ptr<SvxBoxItem> aBoxItem(rBoxItem.Clone());
+ std::unique_ptr<SvxBoxItem> aBoxItem(rBoxItem.Clone());
SvxBorderLine aBorderLine;
const SfxPoolItem *pItem = nullptr;
@@ -1114,7 +1114,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest const & rReq)
{
if (pArgs->GetItemState(RES_BOX, true, &pItem) == SfxItemState::SET)
{
- std::shared_ptr<SvxBoxItem> aNewBox(static_cast<SvxBoxItem*>(pItem->Clone()));
+ std::unique_ptr<SvxBoxItem> aNewBox(static_cast<SvxBoxItem*>(pItem->Clone()));
const SvxBorderLine* pBorderLine;
if ((pBorderLine = aBoxItem->GetTop()) != nullptr)
@@ -1142,7 +1142,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest const & rReq)
aNewBox->SetAllDistances(rBoxItem.GetSmallestDistance());
}
- aBoxItem = aNewBox;
+ aBoxItem = std::move(aNewBox);
if( aBoxItem->GetTop() != nullptr )
aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::TOP);
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 50ec6815ea0b..0348f461f0e0 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -305,13 +305,13 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
rSh.SetBoxBackground( *static_cast<const SvxBrushItem*>(pItem) );
if(pRowItem)
{
- std::shared_ptr<SvxBrushItem> aBrush(static_cast<SvxBrushItem*>(pRowItem->Clone()));
+ std::unique_ptr<SvxBrushItem> aBrush(static_cast<SvxBrushItem*>(pRowItem->Clone()));
aBrush->SetWhich(RES_BACKGROUND);
rSh.SetRowBackground(*aBrush);
}
if(pTableItem)
{
- std::shared_ptr<SvxBrushItem> aBrush(static_cast<SvxBrushItem*>(pTableItem->Clone()));
+ std::unique_ptr<SvxBrushItem> aBrush(static_cast<SvxBrushItem*>(pTableItem->Clone()));
aBrush->SetWhich(RES_BACKGROUND);
rSh.SetTabBackground( *aBrush );
}
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index ef1341d078bc..2b1735456e94 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -961,7 +961,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(aFont->Clone());
+ std::unique_ptr<SvxFontItem> aNewFontItem(aFont->Clone());
aNewFontItem->SetFamilyName( aNewFont.GetFamilyName() );
aNewFontItem->SetFamily( aNewFont.GetFamilyType());
aNewFontItem->SetPitch( aNewFont.GetPitch());
diff --git a/sw/source/uibase/uiview/formatclipboard.cxx b/sw/source/uibase/uiview/formatclipboard.cxx
index d60fe21f3fb7..e9268bffa23f 100644
--- a/sw/source/uibase/uiview/formatclipboard.cxx
+++ b/sw/source/uibase/uiview/formatclipboard.cxx
@@ -158,13 +158,13 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
rSh.SetBoxBackground( *static_cast<const SvxBrushItem*>(pItem) );
if(pRowItem)
{
- std::shared_ptr<SvxBrushItem> aBrush(static_cast<SvxBrushItem*>(pRowItem->Clone()));
+ std::unique_ptr<SvxBrushItem> aBrush(static_cast<SvxBrushItem*>(pRowItem->Clone()));
aBrush->SetWhich(RES_BACKGROUND);
rSh.SetRowBackground(*aBrush);
}
if(pTableItem)
{
- std::shared_ptr<SvxBrushItem> aBrush(static_cast<SvxBrushItem*>(pTableItem->Clone()));
+ std::unique_ptr<SvxBrushItem> aBrush(static_cast<SvxBrushItem*>(pTableItem->Clone()));
aBrush->SetWhich(RES_BACKGROUND);
rSh.SetTabBackground(*aBrush);
}
@@ -416,8 +416,7 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP
rWrtShell.EndAction();
}
-typedef std::shared_ptr< SfxPoolItem > SfxPoolItemSharedPtr;
-typedef std::vector< SfxPoolItemSharedPtr > ItemVector;
+typedef std::vector< std::unique_ptr< SfxPoolItem > > ItemVector;
// collect all PoolItems from the applied styles
static void lcl_AppendSetItems( ItemVector& rItemVector, const SfxItemSet& rStyleAttrSet )
{
@@ -429,7 +428,7 @@ static void lcl_AppendSetItems( ItemVector& rItemVector, const SfxItemSet& rStyl
const SfxPoolItem* pItem;
if( SfxItemState::SET == rStyleAttrSet.GetItemState( nWhich, false, &pItem ) )
{
- rItemVector.push_back( SfxPoolItemSharedPtr( pItem->Clone() ) );
+ rItemVector.emplace_back( pItem->Clone() );
}
}
pRanges += 2;
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index 6b7dee96379b..7be532cd29b4 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -763,7 +763,7 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
if ( i >= rTabStops.Count() )
{
// No DefTab
- std::shared_ptr<SvxTabStopItem> aTabStops(rTabStops.Clone());
+ std::unique_ptr<SvxTabStopItem> aTabStops(rTabStops.Clone());
::lcl_EraseDefTabs(*aTabStops);