diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-05 16:36:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-17 14:17:51 +0100 |
commit | be4e037b0944fdaec20b6afb05f668b93c1a4a8f (patch) | |
tree | 4176fb0803b4dc38bb615efa9253a31d8a68df81 /svx | |
parent | 4c0dec9988e77aaeec152deb9c2fd32173a32814 (diff) |
loplugin:useuniqueptr in DbGridRow
Change-Id: Ia3d7e2821213fb6e6ab5e13f707b5e07b26127a8
Reviewed-on: https://gerrit.libreoffice.org/49871
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/fmcomp/fmgridcl.cxx | 1 | ||||
-rw-r--r-- | svx/source/fmcomp/gridctrl.cxx | 9 |
2 files changed, 5 insertions, 5 deletions
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index ba9bef83935d..3ee95dad4b0d 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -33,6 +33,7 @@ #include <svx/svxdlg.hxx> #include <svx/svxids.hrc> #include <bitmaps.hlst> +#include <sdbdatacolumn.hxx> #include <com/sun/star/form/XConfirmDeleteListener.hpp> #include <com/sun/star/form/XFormComponent.hpp> diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 7d75fa5a1a0d..07d08e0249a2 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -835,6 +835,9 @@ void DbGridControl::NavigationBar::StateChanged(StateChangedType nType) } } +DbGridRow::DbGridRow():m_eStatus(GridRowStatus::Clean), m_bIsNew(true) +{} + DbGridRow::DbGridRow(CursorWrapper* pCur, bool bPaintCursor) :m_bIsNew(false) { @@ -846,8 +849,7 @@ DbGridRow::DbGridRow(CursorWrapper* pCur, bool bPaintCursor) { Reference< XPropertySet > xColSet( xColumns->getByIndex(i), css::uno::UNO_QUERY); - DataColumn* pColumn = new DataColumn(xColSet); - m_aVariants.push_back( pColumn ); + m_aVariants.emplace_back( new DataColumn(xColSet) ); } if (pCur->rowDeleted()) @@ -884,9 +886,6 @@ DbGridRow::DbGridRow(CursorWrapper* pCur, bool bPaintCursor) DbGridRow::~DbGridRow() { - for (DataColumn* p : m_aVariants) - delete p; - m_aVariants.clear(); } void DbGridRow::SetState(CursorWrapper* pCur, bool bPaintCursor) |