diff options
author | Gabor Kelemen <kelemen.gabor2@nisz.hu> | 2019-01-17 18:35:37 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-21 07:36:04 +0100 |
commit | 979aed6b38f4963ea37c39de090d4487a12ba2ba (patch) | |
tree | a5cf6cfe464f00f8654140a514e0f418210b6f69 /dbaccess/source | |
parent | 3b16e997f69efe2e3f6cdf64fe8fb2727b6ebaa7 (diff) |
o3tl::make_unique -> std::make_unique in dbaccess...framework
Since it is now possible to use C++14, it's time to replace
the temporary solution with the standard one
Change-Id: Iad5a422bc5a7da43d905edc91d1c46793332ec5e
Reviewed-on: https://gerrit.libreoffice.org/66545
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess/source')
-rw-r--r-- | dbaccess/source/ui/control/dbtreelistbox.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/control/tabletree.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/WNameMatch.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/JoinTableView.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/QueryTableView.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TEditControl.cxx | 17 | ||||
-rw-r--r-- | dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/uno/UserSettingsDlg.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/uno/composerdialogs.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/ui/uno/textconnectionsettings_uno.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/uno/unosqlmessage.cxx | 5 |
11 files changed, 23 insertions, 33 deletions
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index 0f4c404c1c3b..43b6ecb1fa0e 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -43,7 +43,7 @@ #include <vcl/event.hxx> #include <memory> -#include <o3tl/make_unique.hxx> + namespace dbaui { @@ -142,7 +142,7 @@ void DBTreeListBox::InitEntry(SvTreeListEntry* _pEntry, const OUString& aStr, co { SvTreeListBox::InitEntry( _pEntry, aStr, _rCollEntryBmp,_rExpEntryBmp, eButtonKind); SvLBoxItem* pTextItem(_pEntry->GetFirstItem(SvLBoxItemType::String)); - _pEntry->ReplaceItem(o3tl::make_unique<OBoldListboxString>(aStr), _pEntry->GetPos(pTextItem)); + _pEntry->ReplaceItem(std::make_unique<OBoldListboxString>(aStr), _pEntry->GetPos(pTextItem)); } void DBTreeListBox::implStopSelectionTimer() diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx index bf68b08b3c53..9e8b7de36fb5 100644 --- a/dbaccess/source/ui/control/tabletree.cxx +++ b/dbaccess/source/ui/control/tabletree.cxx @@ -43,7 +43,6 @@ #include <rtl/ustrbuf.hxx> #include <connectivity/dbmetadata.hxx> #include <vcl/treelistentry.hxx> -#include <o3tl/make_unique.hxx> #include <algorithm> @@ -389,7 +388,7 @@ void OTableTreeListBox::InitEntry(SvTreeListEntry* _pEntry, const OUString& _rSt size_t nTextPos = _pEntry->GetPos(pTextItem); OSL_ENSURE(SvTreeListEntry::ITEM_NOT_FOUND != nTextPos, "OTableTreeListBox::InitEntry: no text item pos!"); - _pEntry->ReplaceItem(o3tl::make_unique<OBoldListboxString>(_rString), nTextPos); + _pEntry->ReplaceItem(std::make_unique<OBoldListboxString>(_rString), nTextPos); } SvTreeListEntry* OTableTreeListBox::implAddEntry( diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx index 782e62d1b4e0..237ba44929d6 100644 --- a/dbaccess/source/ui/misc/WNameMatch.cxx +++ b/dbaccess/source/ui/misc/WNameMatch.cxx @@ -29,7 +29,6 @@ #include <vcl/builderfactory.hxx> #include <vcl/treelistentry.hxx> #include <com/sun/star/sdbc/DataType.hpp> -#include <o3tl/make_unique.hxx> using namespace ::dbaui; @@ -382,7 +381,7 @@ VCL_BUILDER_FACTORY(OColumnTreeBox) void OColumnTreeBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr, const Image& rImg1, const Image& rImg2, SvLBoxButtonKind eButtonKind) { DBTreeListBox::InitEntry(pEntry, rStr, rImg1, rImg2, eButtonKind); - pEntry->ReplaceItem(o3tl::make_unique<OColumnString>(rStr,false), pEntry->ItemCount() - 1); + pEntry->ReplaceItem(std::make_unique<OColumnString>(rStr,false), pEntry->ItemCount() - 1); } bool OColumnTreeBox::Select( SvTreeListEntry* pEntry, bool bSelect ) diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 9a9320a69fad..942ddafa40bf 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -44,7 +44,6 @@ #include <UITools.hxx> #include <cppuhelper/exc_hlp.hxx> #include <tools/diagnose_ex.h> -#include <o3tl/make_unique.hxx> #include <algorithm> #include <functional> @@ -1077,7 +1076,7 @@ void OJoinTableView::TabWinMoved(OTableWindow* ptWhich, const Point& ptOldPositi Point ptThumbPos(GetHScrollBar().GetThumbPos(), GetVScrollBar().GetThumbPos()); ptWhich->GetData()->SetPosition(ptWhich->GetPosPixel() + ptThumbPos); - invalidateAndModify(o3tl::make_unique<OJoinMoveTabWinUndoAct>(this, ptOldPosition, ptWhich)); + invalidateAndModify(std::make_unique<OJoinMoveTabWinUndoAct>(this, ptOldPosition, ptWhich)); } void OJoinTableView::TabWinSized(OTableWindow* ptWhich, const Point& ptOldPosition, const Size& szOldSize) @@ -1085,7 +1084,7 @@ void OJoinTableView::TabWinSized(OTableWindow* ptWhich, const Point& ptOldPositi ptWhich->GetData()->SetSize(ptWhich->GetSizePixel()); ptWhich->GetData()->SetPosition(ptWhich->GetPosPixel()); - invalidateAndModify(o3tl::make_unique<OJoinSizeTabWinUndoAct>(this, ptOldPosition, szOldSize, ptWhich)); + invalidateAndModify(std::make_unique<OJoinSizeTabWinUndoAct>(this, ptOldPosition, szOldSize, ptWhich)); } bool OJoinTableView::IsAddAllowed() diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index d5c4a63c70bf..9f5c8a1520b9 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -49,7 +49,6 @@ #include <strings.hrc> #include <strings.hxx> #include <vcl/treelistentry.hxx> -#include <o3tl/make_unique.hxx> using namespace dbaui; using namespace ::com::sun::star::uno; @@ -111,7 +110,7 @@ namespace // add an undo action if ( _bAddUndo ) addUndoAction( _pView, - o3tl::make_unique<OQueryAddTabConnUndoAction>(_pView), + std::make_unique<OQueryAddTabConnUndoAction>(_pView), static_cast< OQueryTableConnection*>(_pConnection)); // redraw _pConnection->RecalcLines(); @@ -630,7 +629,7 @@ bool OQueryTableView::RemoveConnection(VclPtr<OTableConnection>& rConnection, bo // add undo action addUndoAction(this, - o3tl::make_unique<OQueryDelTabConnUndoAction>(this), + std::make_unique<OQueryDelTabConnUndoAction>(this), xConnection.get(), true); diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 7fd6bc3341cd..be0fd79a8962 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -41,7 +41,6 @@ #include <SqlNameEdit.hxx> #include <TableRowExchange.hxx> #include <sot/storage.hxx> -#include <o3tl/make_unique.hxx> #include <UITools.hxx> #include "TableFieldControl.hxx" #include <dsntypes.hxx> @@ -509,7 +508,7 @@ void OTableEditorCtrl::SaveData(long nRow, sal_uInt16 nColId) // If FieldDescr exists, the field is deleted and the old content restored if (pActFieldDescr) { - GetUndoManager().AddUndoAction(o3tl::make_unique<OTableEditorTypeSelUndoAct>(this, nRow, FIELD_TYPE, pActFieldDescr->getTypeInfo())); + GetUndoManager().AddUndoAction(std::make_unique<OTableEditorTypeSelUndoAct>(this, nRow, FIELD_TYPE, pActFieldDescr->getTypeInfo())); SwitchType(TOTypeInfoSP()); pActFieldDescr = pActRow->GetActFieldDescr(); } @@ -660,14 +659,14 @@ void OTableEditorCtrl::CellModified( long nRow, sal_uInt16 nColId ) nInvalidateTypeEvent = Application::PostUserEvent( LINK(this, OTableEditorCtrl, InvalidateFieldType), nullptr, true ); pActFieldDescr = pActRow->GetActFieldDescr(); pDescrWin->DisplayData( pActFieldDescr ); - GetUndoManager().AddUndoAction( o3tl::make_unique<OTableEditorTypeSelUndoAct>(this, nRow, nColId+1, TOTypeInfoSP()) ); + GetUndoManager().AddUndoAction( std::make_unique<OTableEditorTypeSelUndoAct>(this, nRow, nColId+1, TOTypeInfoSP()) ); } if( nColId != FIELD_TYPE ) - GetUndoManager().AddUndoAction( o3tl::make_unique<OTableDesignCellUndoAct>(this, nRow, nColId) ); + GetUndoManager().AddUndoAction( std::make_unique<OTableDesignCellUndoAct>(this, nRow, nColId) ); else { - GetUndoManager().AddUndoAction(o3tl::make_unique<OTableEditorTypeSelUndoAct>(this, GetCurRow(), nColId, GetFieldDescr(GetCurRow())->getTypeInfo())); + GetUndoManager().AddUndoAction(std::make_unique<OTableEditorTypeSelUndoAct>(this, GetCurRow(), nColId, GetFieldDescr(GetCurRow())->getTypeInfo())); resetType(); } @@ -801,7 +800,7 @@ void OTableEditorCtrl::InsertRows( long nRow ) RowInserted( nRow,vInsertedUndoRedoRows.size() ); // Create the Undo-Action - GetUndoManager().AddUndoAction( o3tl::make_unique<OTableEditorInsUndoAct>(this, nRow,vInsertedUndoRedoRows) ); + GetUndoManager().AddUndoAction( std::make_unique<OTableEditorInsUndoAct>(this, nRow,vInsertedUndoRedoRows) ); GetView()->getController().setModified( true ); InvalidateFeatures(); } @@ -810,7 +809,7 @@ void OTableEditorCtrl::DeleteRows() { OSL_ENSURE(GetView()->getController().isDropAllowed(),"Call of DeleteRows not valid here. Please check isDropAllowed!"); // Create the Undo-Action - GetUndoManager().AddUndoAction( o3tl::make_unique<OTableEditorDelUndoAct>(this) ); + GetUndoManager().AddUndoAction( std::make_unique<OTableEditorDelUndoAct>(this) ); // Delete all marked rows long nIndex = FirstSelectedRow(); @@ -847,7 +846,7 @@ void OTableEditorCtrl::InsertNewRows( long nRow ) long nInsertRows = GetSelectRowCount(); if( !nInsertRows ) nInsertRows = 1; - GetUndoManager().AddUndoAction( o3tl::make_unique<OTableEditorInsNewUndoAct>(this, nRow, nInsertRows) ); + GetUndoManager().AddUndoAction( std::make_unique<OTableEditorInsNewUndoAct>(this, nRow, nInsertRows) ); // Insert the number of selected rows for( long i=nRow; i<(nRow+nInsertRows); i++ ) m_pRowList->insert( m_pRowList->begin()+i ,std::make_shared<OTableRow>()); @@ -1527,7 +1526,7 @@ void OTableEditorCtrl::SetPrimaryKey( bool bSet ) } } - GetUndoManager().AddUndoAction( o3tl::make_unique<OPrimKeyUndoAct>(this, aDeletedPrimKeys, aInsertedPrimKeys) ); + GetUndoManager().AddUndoAction( std::make_unique<OPrimKeyUndoAct>(this, aDeletedPrimKeys, aInsertedPrimKeys) ); // Invalidate the handle-columns InvalidateHandleColumn(); diff --git a/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx b/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx index 3a498049c7a7..2a63428abd9c 100644 --- a/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx +++ b/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx @@ -26,7 +26,6 @@ #include <comphelper/processfactory.hxx> #include <comphelper/proparrhlp.hxx> #include <toolkit/helper/vclunohelper.hxx> -#include <o3tl/make_unique.hxx> namespace dbaui { @@ -126,7 +125,7 @@ namespace dbaui svt::OGenericUnoDialog::Dialog OAdvancedSettingsDialog::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) { - return svt::OGenericUnoDialog::Dialog(o3tl::make_unique<AdvancedSettingsDialog>(Application::GetFrameWeld(rParent), m_pDatasourceItems.get(), + return svt::OGenericUnoDialog::Dialog(std::make_unique<AdvancedSettingsDialog>(Application::GetFrameWeld(rParent), m_pDatasourceItems.get(), m_aContext, m_aInitialSelection)); } diff --git a/dbaccess/source/ui/uno/UserSettingsDlg.cxx b/dbaccess/source/ui/uno/UserSettingsDlg.cxx index 760805897ab4..7cd0d3054699 100644 --- a/dbaccess/source/ui/uno/UserSettingsDlg.cxx +++ b/dbaccess/source/ui/uno/UserSettingsDlg.cxx @@ -23,7 +23,6 @@ #include <UserAdminDlg.hxx> #include <comphelper/processfactory.hxx> #include <toolkit/helper/vclunohelper.hxx> -#include <o3tl/make_unique.hxx> using namespace dbaui; @@ -95,7 +94,7 @@ Reference<XPropertySetInfo> SAL_CALL OUserSettingsDialog::getPropertySetInfo() svt::OGenericUnoDialog::Dialog OUserSettingsDialog::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) { - return svt::OGenericUnoDialog::Dialog(o3tl::make_unique<OUserAdminDlg>(Application::GetFrameWeld(rParent), m_pDatasourceItems.get(), m_aContext, m_aInitialSelection, m_xActiveConnection)); + return svt::OGenericUnoDialog::Dialog(std::make_unique<OUserAdminDlg>(Application::GetFrameWeld(rParent), m_pDatasourceItems.get(), m_aContext, m_aInitialSelection, m_xActiveConnection)); } } // namespace dbaui diff --git a/dbaccess/source/ui/uno/composerdialogs.cxx b/dbaccess/source/ui/uno/composerdialogs.cxx index 56593aefe9a6..20e7361c9125 100644 --- a/dbaccess/source/ui/uno/composerdialogs.cxx +++ b/dbaccess/source/ui/uno/composerdialogs.cxx @@ -31,7 +31,6 @@ #include <tools/diagnose_ex.h> #include <osl/diagnose.h> #include <vcl/svapp.hxx> -#include <o3tl/make_unique.hxx> extern "C" void createRegistryInfo_ComposerDialogs() { @@ -146,7 +145,7 @@ namespace dbaui std::unique_ptr<weld::GenericDialogController> RowsetFilterDialog::createComposerDialog(weld::Window* _pParent, const Reference< XConnection >& _rxConnection, const Reference< XNameAccess >& _rxColumns ) { - return o3tl::make_unique<DlgFilterCrit>(_pParent, m_aContext, _rxConnection, m_xComposer, _rxColumns); + return std::make_unique<DlgFilterCrit>(_pParent, m_aContext, _rxConnection, m_xComposer, _rxColumns); } void SAL_CALL RowsetFilterDialog::initialize( const Sequence< Any >& aArguments ) @@ -194,7 +193,7 @@ namespace dbaui std::unique_ptr<weld::GenericDialogController> RowsetOrderDialog::createComposerDialog(weld::Window* pParent, const Reference< XConnection >& rxConnection, const Reference< XNameAccess >& rxColumns) { - return o3tl::make_unique<DlgOrderCrit>(pParent, rxConnection, m_xComposer, rxColumns); + return std::make_unique<DlgOrderCrit>(pParent, rxConnection, m_xComposer, rxColumns); } void SAL_CALL RowsetOrderDialog::initialize( const Sequence< Any >& aArguments ) diff --git a/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx b/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx index 4c7cc453cf7b..37b26c47f387 100644 --- a/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx +++ b/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx @@ -35,7 +35,6 @@ #include <toolkit/helper/vclunohelper.hxx> #include <vcl/svapp.hxx> #include <cppuhelper/implbase.hxx> -#include <o3tl/make_unique.hxx> namespace dbaui { @@ -207,7 +206,7 @@ namespace dbaui svt::OGenericUnoDialog::Dialog OTextConnectionSettingsDialog::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent) { - return svt::OGenericUnoDialog::Dialog(o3tl::make_unique<TextConnectionSettingsDialog>(Application::GetFrameWeld(rParent), *m_pDatasourceItems)); + return svt::OGenericUnoDialog::Dialog(std::make_unique<TextConnectionSettingsDialog>(Application::GetFrameWeld(rParent), *m_pDatasourceItems)); } void SAL_CALL OTextConnectionSettingsDialog::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _rValue ) diff --git a/dbaccess/source/ui/uno/unosqlmessage.cxx b/dbaccess/source/ui/uno/unosqlmessage.cxx index c0ca52114eb2..fb9675385738 100644 --- a/dbaccess/source/ui/uno/unosqlmessage.cxx +++ b/dbaccess/source/ui/uno/unosqlmessage.cxx @@ -28,7 +28,6 @@ #include <cppuhelper/typeprovider.hxx> #include <connectivity/dbexception.hxx> #include <vcl/svapp.hxx> -#include <o3tl/make_unique.hxx> using namespace dbaui; using namespace dbtools; @@ -149,10 +148,10 @@ svt::OGenericUnoDialog::Dialog OSQLMessageDialog::createDialog(const css::uno::R { weld::Window* pParent = Application::GetFrameWeld(rParent); if ( m_aException.hasValue() ) - return svt::OGenericUnoDialog::Dialog(o3tl::make_unique<OSQLMessageBox>(pParent, SQLExceptionInfo(m_aException), MessBoxStyle::Ok | MessBoxStyle::DefaultOk, m_sHelpURL)); + return svt::OGenericUnoDialog::Dialog(std::make_unique<OSQLMessageBox>(pParent, SQLExceptionInfo(m_aException), MessBoxStyle::Ok | MessBoxStyle::DefaultOk, m_sHelpURL)); OSL_FAIL("OSQLMessageDialog::createDialog : You should use the SQLException property to specify the error to display!"); - return svt::OGenericUnoDialog::Dialog(o3tl::make_unique<OSQLMessageBox>(pParent, SQLException())); + return svt::OGenericUnoDialog::Dialog(std::make_unique<OSQLMessageBox>(pParent, SQLException())); } } // namespace dbaui |