[Libreoffice-commits] core.git: 2 commits - cui/source hwpfilter/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Aug 21 10:11:35 UTC 2018
cui/source/factory/dlgfact.cxx | 50 ++++++++++++++--------------
cui/source/factory/dlgfact.hxx | 72 ++++++++++++++++++++---------------------
hwpfilter/source/hiodev.cxx | 2 -
hwpfilter/source/hiodev.h | 2 -
hwpfilter/source/hwpfile.cxx | 8 ++--
hwpfilter/source/hwpfile.h | 4 +-
hwpfilter/source/hwpreader.cxx | 4 +-
7 files changed, 71 insertions(+), 71 deletions(-)
New commits:
commit c4558e4b7b3defe7a128e16781eaececc416195a
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Aug 20 13:49:28 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Aug 21 12:11:18 2018 +0200
loplugin:useuniqueptr in HStreamIODev
Change-Id: I81ab91bce2a83603b25922593c1fd764b5c0b003
Reviewed-on: https://gerrit.libreoffice.org/59358
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/hwpfilter/source/hiodev.cxx b/hwpfilter/source/hiodev.cxx
index fcdc98b24109..7fd808906c69 100644
--- a/hwpfilter/source/hiodev.cxx
+++ b/hwpfilter/source/hiodev.cxx
@@ -89,7 +89,7 @@ size_t HIODev::read4b(void *ptr, size_t nmemb)
// hfileiodev class
-HStreamIODev::HStreamIODev(HStream * stream):_stream(stream)
+HStreamIODev::HStreamIODev(std::unique_ptr<HStream> stream):_stream(std::move(stream))
{
init();
}
diff --git a/hwpfilter/source/hiodev.h b/hwpfilter/source/hiodev.h
index 5f12454da99e..b6f2c7aa2be7 100644
--- a/hwpfilter/source/hiodev.h
+++ b/hwpfilter/source/hiodev.h
@@ -78,7 +78,7 @@ class HStreamIODev final: public HIODev
std::unique_ptr<HStream> _stream;
gz_stream *_gzfp;
public:
- explicit HStreamIODev(HStream* stream);
+ explicit HStreamIODev(std::unique_ptr<HStream> stream);
virtual ~HStreamIODev() override;
/**
* Check whether the stream is available
diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx
index d3bd660e77fd..a61b3e08921b 100644
--- a/hwpfilter/source/hwpfile.cxx
+++ b/hwpfilter/source/hwpfile.cxx
@@ -65,9 +65,9 @@ HWPFile::~HWPFile()
hiodev.reset();
}
-int HWPFile::ReadHwpFile(HStream * stream)
+int HWPFile::ReadHwpFile(std::unique_ptr<HStream> stream)
{
- if (Open(stream) != HWP_NoError)
+ if (Open(std::move(stream)) != HWP_NoError)
return State();
InfoRead();
FontRead();
@@ -92,9 +92,9 @@ int detect_hwp_version(const char *str)
// HIODev wrapper
-int HWPFile::Open(HStream * stream)
+int HWPFile::Open(std::unique_ptr<HStream> stream)
{
- HStreamIODev *hstreamio = new HStreamIODev(stream);
+ HStreamIODev *hstreamio = new HStreamIODev(std::move(stream));
if (!hstreamio->open())
{
diff --git a/hwpfilter/source/hwpfile.h b/hwpfilter/source/hwpfile.h
index 4f68543f5b13..36655105a9f5 100644
--- a/hwpfilter/source/hwpfile.h
+++ b/hwpfilter/source/hwpfile.h
@@ -111,7 +111,7 @@ class DLLEXPORT HWPFile
* @returns 0 if success, otherwise error code
* @see State()
*/
- int Open( HStream * );
+ int Open( std::unique_ptr<HStream> );
/**
* Say current state
@@ -170,7 +170,7 @@ class DLLEXPORT HWPFile
/**
* Reads all information of hwp file from stream
*/
- int ReadHwpFile( HStream *);
+ int ReadHwpFile( std::unique_ptr<HStream> );
/**
* Reads document information of hwp file from HIODev
*/
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index b3e8ba9f7d8b..947d00affb4f 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -132,7 +132,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportHWP(SvStream &rStream)
}
HWPFile hwpfile;
- if (hwpfile.ReadHwpFile(stream.release()))
+ if (hwpfile.ReadHwpFile(std::move(stream)))
return false;
}
catch (...)
@@ -164,7 +164,7 @@ sal_Bool HwpReader::filter(const Sequence< PropertyValue >& rDescriptor)
if( nTotal == 0 ) return false;
- if (hwpfile.ReadHwpFile(stream.release()))
+ if (hwpfile.ReadHwpFile(std::move(stream)))
return false;
if (m_rxDocumentHandler.is())
commit 079abbaefa0ce600958e8e6a2b15c58deec14990
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Aug 20 13:49:09 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Aug 21 12:11:10 2018 +0200
loplugin:useuniqueptr in cui
Change-Id: I7afe964a65950c25e3255eba72970fa9da0a0df9
Reviewed-on: https://gerrit.libreoffice.org/59357
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index ff973f402668..8874dedd834e 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -995,7 +995,7 @@ VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateTextTabDialog(wel
const SfxItemSet* pAttrSet,
SdrView* pView)
{
- return VclPtr<CuiAbstractTabController_Impl>::Create(new SvxTextTabDialog(pParent, pAttrSet, pView));
+ return VclPtr<CuiAbstractTabController_Impl>::Create(o3tl::make_unique<SvxTextTabDialog>(pParent, pAttrSet, pView));
}
// TabDialog that use functionality of the drawing layer and add AnchorTypes -- for SvxCaptionTabDialog
@@ -1045,7 +1045,7 @@ VclPtr<AbstractFmShowColsDialog> AbstractDialogFactory_Impl::CreateFmShowColsDia
VclPtr<AbstractSvxZoomDialog> AbstractDialogFactory_Impl::CreateSvxZoomDialog(weld::Window* pParent, const SfxItemSet& rCoreSet)
{
- return VclPtr<AbstractSvxZoomDialog_Impl>::Create(new SvxZoomDialog(pParent, rCoreSet));
+ return VclPtr<AbstractSvxZoomDialog_Impl>::Create(o3tl::make_unique<SvxZoomDialog>(pParent, rCoreSet));
}
VclPtr<AbstractSpellDialog> AbstractDialogFactory_Impl::CreateSvxSpellDialog(
@@ -1098,13 +1098,13 @@ VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxScriptOrgDialog(
VclPtr<AbstractTitleDialog> AbstractDialogFactory_Impl::CreateTitleDialog(weld::Window* pParent,
const OUString& rOldText)
{
- return VclPtr<AbstractTitleDialog_Impl>::Create(new TitleDialog(pParent, rOldText));
+ return VclPtr<AbstractTitleDialog_Impl>::Create(o3tl::make_unique<TitleDialog>(pParent, rOldText));
}
VclPtr<AbstractGalleryIdDialog> AbstractDialogFactory_Impl::CreateGalleryIdDialog(weld::Window* pParent,
GalleryTheme* pThm)
{
- return VclPtr<AbstractGalleryIdDialog_Impl>::Create(new GalleryIdDialog(pParent, pThm));
+ return VclPtr<AbstractGalleryIdDialog_Impl>::Create(o3tl::make_unique<GalleryIdDialog>(pParent, pThm));
}
VclPtr<VclAbstractDialog2> AbstractDialogFactory_Impl::CreateGalleryThemePropertiesDialog(vcl::Window* pParent,
@@ -1146,7 +1146,7 @@ VclPtr<AbstractSvxSearchSimilarityDialog> AbstractDialogFactory_Impl::CreateSvxS
sal_uInt16 nShorter,
sal_uInt16 nLonger)
{
- return VclPtr<AbstractSvxSearchSimilarityDialog_Impl>::Create(new SvxSearchSimilarityDialog(pParent, bRelax, nOther, nShorter, nLonger));
+ return VclPtr<AbstractSvxSearchSimilarityDialog_Impl>::Create(o3tl::make_unique<SvxSearchSimilarityDialog>(pParent, bRelax, nOther, nShorter, nLonger));
}
VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxBorderBackgroundDlg(
@@ -1176,11 +1176,11 @@ VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSchTransformTabDi
const SdrView* pSdrView,
bool bSizeTabPage)
{
- SvxTransformTabDialog* pDlg = new SvxTransformTabDialog(pParent, pAttr, pSdrView,
+ auto pDlg = o3tl::make_unique<SvxTransformTabDialog>(pParent, pAttr, pSdrView,
bSizeTabPage ? SvxAnchorIds::NoProtect : SvxAnchorIds::NoProtect|SvxAnchorIds::NoResize);
pDlg->RemoveTabPage( "RID_SVXPAGE_ANGLE" );
pDlg->RemoveTabPage( "RID_SVXPAGE_SLANT" );
- return VclPtr<CuiAbstractTabController_Impl>::Create(pDlg);
+ return VclPtr<CuiAbstractTabController_Impl>::Create(std::move(pDlg));
}
VclPtr<AbstractSvxJSearchOptionsDialog> AbstractDialogFactory_Impl::CreateSvxJSearchOptionsDialog( vcl::Window* pParent,
@@ -1193,12 +1193,12 @@ VclPtr<AbstractSvxJSearchOptionsDialog> AbstractDialogFactory_Impl::CreateSvxJSe
VclPtr<AbstractFmInputRecordNoDialog> AbstractDialogFactory_Impl::CreateFmInputRecordNoDialog(weld::Window* pParent)
{
- return VclPtr<AbstractFmInputRecordNoDialog_Impl>::Create(new FmInputRecordNoDialog(pParent));
+ return VclPtr<AbstractFmInputRecordNoDialog_Impl>::Create(o3tl::make_unique<FmInputRecordNoDialog>(pParent));
}
VclPtr<AbstractSvxNewDictionaryDialog> AbstractDialogFactory_Impl::CreateSvxNewDictionaryDialog(weld::Window* pParent)
{
- return VclPtr<AbstractSvxNewDictionaryDialog_Impl>::Create(new SvxNewDictionaryDialog(pParent));
+ return VclPtr<AbstractSvxNewDictionaryDialog_Impl>::Create(o3tl::make_unique<SvxNewDictionaryDialog>(pParent));
}
VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxEditDictionaryDialog( vcl::Window* pParent,
@@ -1211,17 +1211,17 @@ VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxEditDictionaryDia
VclPtr<AbstractSvxNameDialog> AbstractDialogFactory_Impl::CreateSvxNameDialog(weld::Window* pParent,
const OUString& rName, const OUString& rDesc)
{
- return VclPtr<AbstractSvxNameDialog_Impl>::Create(new SvxNameDialog(pParent, rName, rDesc));
+ return VclPtr<AbstractSvxNameDialog_Impl>::Create(o3tl::make_unique<SvxNameDialog>(pParent, rName, rDesc));
}
VclPtr<AbstractSvxObjectNameDialog> AbstractDialogFactory_Impl::CreateSvxObjectNameDialog(weld::Window* pParent, const OUString& rName)
{
- return VclPtr<AbstractSvxObjectNameDialog_Impl>::Create(new SvxObjectNameDialog(pParent, rName));
+ return VclPtr<AbstractSvxObjectNameDialog_Impl>::Create(o3tl::make_unique<SvxObjectNameDialog>(pParent, rName));
}
VclPtr<AbstractSvxObjectTitleDescDialog> AbstractDialogFactory_Impl::CreateSvxObjectTitleDescDialog(weld::Window* pParent, const OUString& rTitle, const OUString& rDescription)
{
- return VclPtr<AbstractSvxObjectTitleDescDialog_Impl>::Create(new SvxObjectTitleDescDialog(pParent, rTitle, rDescription));
+ return VclPtr<AbstractSvxObjectTitleDescDialog_Impl>::Create(o3tl::make_unique<SvxObjectTitleDescDialog>(pParent, rTitle, rDescription));
}
VclPtr<AbstractSvxMultiPathDialog> AbstractDialogFactory_Impl::CreateSvxMultiPathDialog(vcl::Window* pParent)
@@ -1232,7 +1232,7 @@ VclPtr<AbstractSvxMultiPathDialog> AbstractDialogFactory_Impl::CreateSvxMultiPat
VclPtr<AbstractSvxMultiPathDialog> AbstractDialogFactory_Impl::CreateSvxPathSelectDialog(weld::Window* pParent)
{
- return VclPtr<AbstractSvxPathSelectDialog_Impl>::Create(new SvxPathSelectDialog(pParent));
+ return VclPtr<AbstractSvxPathSelectDialog_Impl>::Create(o3tl::make_unique<SvxPathSelectDialog>(pParent));
}
VclPtr<AbstractSvxHpLinkDlg> AbstractDialogFactory_Impl::CreateSvxHpLinkDlg (vcl::Window* pParent,
@@ -1315,7 +1315,7 @@ VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxLineTabDialog(
VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateCharMapDialog(weld::Window* pParent, const SfxItemSet& rAttr, bool bInsert)
{
- return VclPtr<AbstractSvxCharacterMapDialog_Impl>::Create(new SvxCharacterMap(pParent, &rAttr, bInsert));
+ return VclPtr<AbstractSvxCharacterMapDialog_Impl>::Create(o3tl::make_unique<SvxCharacterMap>(pParent, &rAttr, bInsert));
}
VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateEventConfigDialog( vcl::Window* pParent,
@@ -1359,7 +1359,7 @@ VclPtr<AbstractSvxPostItDialog> AbstractDialogFactory_Impl::CreateSvxPostItDialo
const SfxItemSet& rCoreSet,
bool bPrevNext )
{
- return VclPtr<AbstractSvxPostItDialog_Impl>::Create(new SvxPostItDialog(pParent, rCoreSet, bPrevNext));
+ return VclPtr<AbstractSvxPostItDialog_Impl>::Create(o3tl::make_unique<SvxPostItDialog>(pParent, rCoreSet, bPrevNext));
}
class SvxMacroAssignDialog : public VclAbstractDialog
@@ -1548,16 +1548,16 @@ GetTabPageRanges AbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nI
VclPtr<SfxAbstractInsertObjectDialog> AbstractDialogFactory_Impl::CreateInsertObjectDialog(weld::Window* pParent, const OUString& rCommand,
const Reference <css::embed::XStorage>& xStor, const SvObjectServerList* pList)
{
- InsertObjectDialog_Impl* pDlg=nullptr;
+ std::unique_ptr<InsertObjectDialog_Impl> pDlg;
if ( rCommand == ".uno:InsertObject" )
- pDlg = new SvInsertOleDlg(pParent, xStor, pList);
+ pDlg.reset(new SvInsertOleDlg(pParent, xStor, pList));
else if ( rCommand == ".uno:InsertObjectFloatingFrame" )
- pDlg = new SfxInsertFloatingFrameDialog(pParent, xStor);
+ pDlg.reset(new SfxInsertFloatingFrameDialog(pParent, xStor));
if ( pDlg )
{
pDlg->SetHelpId( OUStringToOString( rCommand, RTL_TEXTENCODING_UTF8 ) );
- return VclPtr<AbstractInsertObjectDialog_Impl>::Create( pDlg );
+ return VclPtr<AbstractInsertObjectDialog_Impl>::Create( std::move(pDlg) );
}
return nullptr;
}
@@ -1567,16 +1567,16 @@ VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateEditObjectDialog(wel
{
if ( rCommand == ".uno:InsertObjectFloatingFrame" )
{
- SfxInsertFloatingFrameDialog* pDlg = new SfxInsertFloatingFrameDialog(pParent, xObj);
+ auto pDlg = o3tl::make_unique<SfxInsertFloatingFrameDialog>(pParent, xObj);
pDlg->SetHelpId( OUStringToOString( rCommand, RTL_TEXTENCODING_UTF8 ) );
- return VclPtr<AbstractInsertObjectDialog_Impl>::Create( pDlg );
+ return VclPtr<AbstractInsertObjectDialog_Impl>::Create( std::move(pDlg) );
}
return nullptr;
}
VclPtr<SfxAbstractPasteDialog> AbstractDialogFactory_Impl::CreatePasteDialog(weld::Window* pParent)
{
- return VclPtr<AbstractPasteDialog_Impl>::Create(new SvPasteObjectDialog(pParent));
+ return VclPtr<AbstractPasteDialog_Impl>::Create(o3tl::make_unique<SvPasteObjectDialog>(pParent));
}
VclPtr<SfxAbstractLinksDialog> AbstractDialogFactory_Impl::CreateLinksDialog( vcl::Window* pParent, sfx2::LinkManager* pMgr, bool bHTML, sfx2::SvBaseLink* p)
@@ -1616,7 +1616,7 @@ VclPtr<SvxAbstractInsRowColDlg> AbstractDialogFactory_Impl::CreateSvxInsRowColDl
VclPtr<AbstractPasswordToOpenModifyDialog> AbstractDialogFactory_Impl::CreatePasswordToOpenModifyDialog(
weld::Window * pParent, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify)
{
- return VclPtr<AbstractPasswordToOpenModifyDialog_Impl>::Create(new PasswordToOpenModifyDialog(pParent, nMaxPasswdLen, bIsPasswordToModify));
+ return VclPtr<AbstractPasswordToOpenModifyDialog_Impl>::Create(o3tl::make_unique<PasswordToOpenModifyDialog>(pParent, nMaxPasswdLen, bIsPasswordToModify));
}
VclPtr<AbstractScreenshotAnnotationDlg> AbstractDialogFactory_Impl::CreateScreenshotAnnotationDlg(
@@ -1631,7 +1631,7 @@ VclPtr<AbstractSignatureLineDialog> AbstractDialogFactory_Impl::CreateSignatureL
weld::Window* pParent, const Reference<XModel> xModel, bool bEditExisting)
{
return VclPtr<AbstractSignatureLineDialog_Impl>::Create(
- new SignatureLineDialog(pParent, xModel, bEditExisting));
+ o3tl::make_unique<SignatureLineDialog>(pParent, xModel, bEditExisting));
}
VclPtr<AbstractSignSignatureLineDialog>
@@ -1639,7 +1639,7 @@ AbstractDialogFactory_Impl::CreateSignSignatureLineDialog(weld::Window* pParent,
const Reference<XModel> xModel)
{
return VclPtr<AbstractSignSignatureLineDialog_Impl>::Create(
- new SignSignatureLineDialog(pParent, xModel));
+ o3tl::make_unique<SignSignatureLineDialog>(pParent, xModel));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index abb202ffa198..73b8bb9521d9 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -129,8 +129,8 @@ class CuiAbstractTabController_Impl : public SfxAbstractTabDialog
protected:
std::unique_ptr<SfxTabDialogController> m_xDlg;
public:
- explicit CuiAbstractTabController_Impl(SfxTabDialogController* p)
- : m_xDlg(p)
+ explicit CuiAbstractTabController_Impl(std::unique_ptr<SfxTabDialogController> p)
+ : m_xDlg(std::move(p))
{
}
virtual short Execute() override;
@@ -207,8 +207,8 @@ class AbstractSvxZoomDialog_Impl : public AbstractSvxZoomDialog
protected:
std::unique_ptr<SvxZoomDialog> m_xDlg;
public:
- explicit AbstractSvxZoomDialog_Impl(SvxZoomDialog* p)
- : m_xDlg(p)
+ explicit AbstractSvxZoomDialog_Impl(std::unique_ptr<SvxZoomDialog> p)
+ : m_xDlg(std::move(p))
{
}
virtual short Execute() override;
@@ -233,8 +233,8 @@ class AbstractTitleDialog_Impl : public AbstractTitleDialog
protected:
std::unique_ptr<TitleDialog> m_xDlg;
public:
- explicit AbstractTitleDialog_Impl(TitleDialog* p)
- : m_xDlg(p)
+ explicit AbstractTitleDialog_Impl(std::unique_ptr<TitleDialog> p)
+ : m_xDlg(std::move(p))
{
}
virtual short Execute() override;
@@ -259,8 +259,8 @@ class AbstractGalleryIdDialog_Impl : public AbstractGalleryIdDialog
protected:
std::unique_ptr<GalleryIdDialog> m_xDlg;
public:
- explicit AbstractGalleryIdDialog_Impl(GalleryIdDialog* p)
- : m_xDlg(p)
+ explicit AbstractGalleryIdDialog_Impl(std::unique_ptr<GalleryIdDialog> p)
+ : m_xDlg(std::move(p))
{
}
virtual short Execute() override;
@@ -284,8 +284,8 @@ class AbstractSvxSearchSimilarityDialog_Impl :public AbstractSvxSearchSimilarity
protected:
std::unique_ptr<SvxSearchSimilarityDialog> m_xDlg;
public:
- explicit AbstractSvxSearchSimilarityDialog_Impl(SvxSearchSimilarityDialog* p)
- : m_xDlg(p)
+ explicit AbstractSvxSearchSimilarityDialog_Impl(std::unique_ptr<SvxSearchSimilarityDialog> p)
+ : m_xDlg(std::move(p))
{
}
virtual short Execute() override;
@@ -338,8 +338,8 @@ class AbstractFmInputRecordNoDialog_Impl :public AbstractFmInputRecordNoDialog
protected:
std::unique_ptr<FmInputRecordNoDialog> m_xDlg;
public:
- explicit AbstractFmInputRecordNoDialog_Impl(FmInputRecordNoDialog* p)
- : m_xDlg(p)
+ explicit AbstractFmInputRecordNoDialog_Impl(std::unique_ptr<FmInputRecordNoDialog> p)
+ : m_xDlg(std::move(p))
{
}
virtual short Execute() override;
@@ -353,8 +353,8 @@ class AbstractSvxNewDictionaryDialog_Impl :public AbstractSvxNewDictionaryDialog
protected:
std::unique_ptr<SvxNewDictionaryDialog> m_xDlg;
public:
- explicit AbstractSvxNewDictionaryDialog_Impl(SvxNewDictionaryDialog* p)
- : m_xDlg(p)
+ explicit AbstractSvxNewDictionaryDialog_Impl(std::unique_ptr<SvxNewDictionaryDialog> p)
+ : m_xDlg(std::move(p))
{
}
virtual short Execute() override;
@@ -367,8 +367,8 @@ class AbstractSvxNameDialog_Impl :public AbstractSvxNameDialog
protected:
std::unique_ptr<SvxNameDialog> m_xDlg;
public:
- explicit AbstractSvxNameDialog_Impl(SvxNameDialog* p)
- : m_xDlg(p)
+ explicit AbstractSvxNameDialog_Impl(std::unique_ptr<SvxNameDialog> p)
+ : m_xDlg(std::move(p))
{
}
virtual short Execute() override;
@@ -391,8 +391,8 @@ class AbstractSvxObjectNameDialog_Impl : public AbstractSvxObjectNameDialog
protected:
std::unique_ptr<SvxObjectNameDialog> m_xDlg;
public:
- explicit AbstractSvxObjectNameDialog_Impl(SvxObjectNameDialog* p)
- : m_xDlg(p)
+ explicit AbstractSvxObjectNameDialog_Impl(std::unique_ptr<SvxObjectNameDialog> p)
+ : m_xDlg(std::move(p))
{
}
virtual short Execute() override;
@@ -409,8 +409,8 @@ class AbstractSvxObjectTitleDescDialog_Impl :public AbstractSvxObjectTitleDescDi
protected:
std::unique_ptr<SvxObjectTitleDescDialog> m_xDlg;
public:
- explicit AbstractSvxObjectTitleDescDialog_Impl(SvxObjectTitleDescDialog* p)
- : m_xDlg(p)
+ explicit AbstractSvxObjectTitleDescDialog_Impl(std::unique_ptr<SvxObjectTitleDescDialog> p)
+ : m_xDlg(std::move(p))
{
}
virtual short Execute() override;
@@ -433,8 +433,8 @@ class AbstractSvxPathSelectDialog_Impl : public AbstractSvxMultiPathDialog
protected:
std::unique_ptr<SvxPathSelectDialog> m_xDlg;
public:
- explicit AbstractSvxPathSelectDialog_Impl(SvxPathSelectDialog* p)
- : m_xDlg(p)
+ explicit AbstractSvxPathSelectDialog_Impl(std::unique_ptr<SvxPathSelectDialog> p)
+ : m_xDlg(std::move(p))
{
}
virtual short Execute() override;
@@ -484,8 +484,8 @@ class AbstractInsertObjectDialog_Impl : public SfxAbstractInsertObjectDialog
protected:
std::unique_ptr<InsertObjectDialog_Impl> m_xDlg;
public:
- explicit AbstractInsertObjectDialog_Impl(InsertObjectDialog_Impl* p)
- : m_xDlg(p)
+ explicit AbstractInsertObjectDialog_Impl(std::unique_ptr<InsertObjectDialog_Impl> p)
+ : m_xDlg(std::move(p))
{
}
virtual short Execute() override;
@@ -499,8 +499,8 @@ class AbstractPasteDialog_Impl : public SfxAbstractPasteDialog
protected:
std::unique_ptr<SvPasteObjectDialog> m_xDlg;
public:
- explicit AbstractPasteDialog_Impl(SvPasteObjectDialog* p)
- : m_xDlg(p)
+ explicit AbstractPasteDialog_Impl(std::unique_ptr<SvPasteObjectDialog> p)
+ : m_xDlg(std::move(p))
{
}
virtual short Execute() override;
@@ -522,8 +522,8 @@ class AbstractSvxPostItDialog_Impl :public AbstractSvxPostItDialog
private:
std::unique_ptr<SvxPostItDialog> m_xDlg;
public:
- AbstractSvxPostItDialog_Impl(SvxPostItDialog* pDlg)
- : m_xDlg(pDlg)
+ AbstractSvxPostItDialog_Impl(std::unique_ptr<SvxPostItDialog> pDlg)
+ : m_xDlg(std::move(pDlg))
{
}
virtual short Execute() override;
@@ -551,8 +551,8 @@ class AbstractPasswordToOpenModifyDialog_Impl : public AbstractPasswordToOpenMod
protected:
std::unique_ptr<PasswordToOpenModifyDialog> m_xDlg;
public:
- explicit AbstractPasswordToOpenModifyDialog_Impl(PasswordToOpenModifyDialog* p)
- : m_xDlg(p)
+ explicit AbstractPasswordToOpenModifyDialog_Impl(std::unique_ptr<PasswordToOpenModifyDialog> p)
+ : m_xDlg(std::move(p))
{
}
virtual short Execute() override;
@@ -567,8 +567,8 @@ class AbstractSvxCharacterMapDialog_Impl : public SfxAbstractDialog
protected:
std::unique_ptr<SvxCharacterMap> m_xDlg;
public:
- explicit AbstractSvxCharacterMapDialog_Impl(SvxCharacterMap* p)
- : m_xDlg(p)
+ explicit AbstractSvxCharacterMapDialog_Impl(std::unique_ptr<SvxCharacterMap> p)
+ : m_xDlg(std::move(p))
{
}
virtual short Execute() override;
@@ -589,8 +589,8 @@ protected:
std::unique_ptr<SignatureLineDialog> m_xDlg;
public:
- explicit AbstractSignatureLineDialog_Impl(SignatureLineDialog* p)
- : m_xDlg(p)
+ explicit AbstractSignatureLineDialog_Impl(std::unique_ptr<SignatureLineDialog> p)
+ : m_xDlg(std::move(p))
{
}
virtual short Execute() override;
@@ -603,8 +603,8 @@ protected:
std::unique_ptr<SignSignatureLineDialog> m_xDlg;
public:
- explicit AbstractSignSignatureLineDialog_Impl(SignSignatureLineDialog* p)
- : m_xDlg(p)
+ explicit AbstractSignSignatureLineDialog_Impl(std::unique_ptr<SignSignatureLineDialog> p)
+ : m_xDlg(std::move(p))
{
}
virtual short Execute() override;
More information about the Libreoffice-commits
mailing list