summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-01-18 15:38:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-01-21 07:34:09 +0100
commit3b16e997f69efe2e3f6cdf64fe8fb2727b6ebaa7 (patch)
treea0d65d6b892ea39d0da8992cbab6bda579e19cdf /sw/source/uibase
parent2af5d6006948890229d9e55feb56e0e849bf857d (diff)
cleanup SwAuthEntry manual ref-counting
And remove the "handle" nonsense and just pass plain honest pointers to a real type around Change-Id: Ic49443f5f8b20890d8335088331fff81585e8981 Reviewed-on: https://gerrit.libreoffice.org/66615 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/fldui/fldmgr.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx
index b25e57b13f39..e54397e9c3f5 100644
--- a/sw/source/uibase/fldui/fldmgr.cxx
+++ b/sw/source/uibase/fldui/fldmgr.cxx
@@ -1653,17 +1653,17 @@ void SwFieldMgr::UpdateCurField(sal_uInt32 nFormat,
//#i99069# changes to a bibliography field should change the field type
SwAuthorityField* pAuthorityField = static_cast<SwAuthorityField*>(pTmpField.get());
SwAuthorityFieldType* pAuthorityType = static_cast<SwAuthorityFieldType*>(pType);
- SwAuthEntry aTempEntry;
+ rtl::Reference<SwAuthEntry> xTempEntry(new SwAuthEntry);
for( sal_uInt16 i = 0; i < AUTH_FIELD_END; ++i )
- aTempEntry.SetAuthorField( static_cast<ToxAuthorityField>(i),
+ xTempEntry->SetAuthorField( static_cast<ToxAuthorityField>(i),
rPar1.getToken( i, TOX_STYLE_DELIMITER ));
- if( pAuthorityType->ChangeEntryContent( &aTempEntry ) )
+ if( pAuthorityType->ChangeEntryContent( xTempEntry.get() ) )
{
pType->UpdateFields();
pSh->SetModified();
}
- if( aTempEntry.GetAuthorField( AUTH_FIELD_IDENTIFIER ) ==
+ if( xTempEntry->GetAuthorField( AUTH_FIELD_IDENTIFIER ) ==
pAuthorityField->GetFieldText( AUTH_FIELD_IDENTIFIER ) )
bSetPar1 = false; //otherwise it's a new or changed entry, the field needs to be updated
bSetPar2 = false;