summaryrefslogtreecommitdiff
path: root/sw/source/uibase/dochdl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-03-06 15:04:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-03-07 06:58:36 +0000
commit2f4ccccc6b2256450b49ba9c8871fb5fc967b199 (patch)
tree9a4e3e96a13d67fb1354d53a21cdce57f1e0dde3 /sw/source/uibase/dochdl
parent01a8b743f69b6718ccf5bbbda23734fa38020e19 (diff)
no need to allocate these separately
they are all one or two words in size Change-Id: I9a0f971d72c998c26e567c6abc2f9fe2a734207e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148338 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/dochdl')
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 29e2a770b469..eb7d61ba44c5 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -506,7 +506,7 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
OUString sDesc;
if( m_pWrtShell->GetURLFromButton( sURL, sDesc ) )
{
- m_pBookmark.reset(new INetBookmark( sURL, sDesc ));
+ m_oBookmark.emplace( sURL, sDesc );
m_eBufferType = TransferBufferType::InetField;
}
}
@@ -534,9 +534,9 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
!m_pWrtShell->GetView().GetDocShell()->IsReadOnly();
if( m_pWrtShell->GetContentAtPos( aPos, aContentAtPos, bSelect ) )
{
- m_pBookmark.reset(new INetBookmark(
+ m_oBookmark.emplace(
static_cast<const SwFormatINetFormat*>(aContentAtPos.aFnd.pAttr)->GetValue(),
- aContentAtPos.sStr ));
+ aContentAtPos.sStr );
m_eBufferType = TransferBufferType::InetField;
if( bSelect )
m_pWrtShell->SelectTextAttr( RES_TXTATR_INETFMT );
@@ -661,8 +661,8 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
case SotClipboardFormatId::FILECONTENT:
case SotClipboardFormatId::UNIFORMRESOURCELOCATOR:
case SotClipboardFormatId::SIMPLE_FILE:
- if( (TransferBufferType::InetField & m_eBufferType) && m_pBookmark )
- bOK = SetINetBookmark( *m_pBookmark, rFlavor );
+ if( (TransferBufferType::InetField & m_eBufferType) && m_oBookmark )
+ bOK = SetINetBookmark( *m_oBookmark, rFlavor );
break;
case SotClipboardFormatId::EMBED_SOURCE:
@@ -3904,8 +3904,8 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
if( rSh.GetFormatFromObj( rDragPt ) )
{
INetBookmark aTmp;
- if( (TransferBufferType::InetField & m_eBufferType) && m_pBookmark )
- aTmp = *m_pBookmark;
+ if( (TransferBufferType::InetField & m_eBufferType) && m_oBookmark )
+ aTmp = *m_oBookmark;
// select target graphic
if( rSh.SelectObj( rDragPt ) )