summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/relationdesign
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-04-28 11:41:31 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-28 15:08:48 +0100
commite8b97a52c96df9c8e8055407b1e40ed7cb9cfc67 (patch)
treeb322529f4a54a6427862cb20cb4cf87fb6a5d065 /dbaccess/source/ui/relationdesign
parent2b0be6c0e9d23f1b8535ba7033732ae2e3bfb5c9 (diff)
parent0cde74f788a054fa2b65107a030dd463b8d11c7a (diff)
Merge remote-tracking branch 'origin/feature/vclptr'
Resolve several thousand lines of conflicts. Conflicts: accessibility/source/extended/accessiblelistbox.cxx accessibility/source/standard/vclxaccessiblecombobox.cxx accessibility/source/standard/vclxaccessibledropdowncombobox.cxx accessibility/source/standard/vclxaccessibledropdownlistbox.cxx accessibility/source/standard/vclxaccessiblelistbox.cxx accessibility/source/standard/vclxaccessibletextfield.cxx basctl/source/basicide/basidesh.cxx cui/source/inc/chardlg.hxx cui/source/tabpages/tpbitmap.cxx dbaccess/source/ui/dlg/UserAdmin.cxx dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx extensions/source/propctrlr/propertyeditor.hxx extensions/source/scanner/sanedlg.cxx filter/source/pdf/impdialog.cxx include/sfx2/mgetempl.hxx include/sfx2/sidebar/SidebarToolBox.hxx include/sfx2/viewsh.hxx include/svtools/brwbox.hxx include/svtools/filectrl.hxx include/svtools/scrwin.hxx include/svx/dlgctrl.hxx include/svx/sidebar/Popup.hxx include/svx/sidebar/PopupContainer.hxx include/svx/sidebar/PopupControl.hxx include/svx/sidebar/SidebarDialControl.hxx include/svx/sidebar/ValueSetWithTextControl.hxx sc/source/ui/condformat/condformatdlgentry.cxx sc/source/ui/navipi/navipi.cxx sc/source/ui/sidebar/CellBorderStyleControl.hxx sd/source/ui/animations/CustomAnimationDialog.cxx sd/source/ui/inc/DrawViewShell.hxx sd/source/ui/inc/Ruler.hxx sd/source/ui/inc/SlideSorter.hxx sd/source/ui/inc/ViewTabBar.hxx sd/source/ui/inc/Window.hxx sd/source/ui/inc/morphdlg.hxx sd/source/ui/inc/sdpreslt.hxx sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx sd/source/ui/sidebar/LayoutMenu.hxx sd/source/ui/sidebar/MasterPagesSelector.hxx sd/source/ui/sidebar/NavigatorWrapper.hxx sd/source/ui/sidebar/PanelBase.hxx sd/source/ui/sidebar/RecentMasterPagesSelector.cxx sd/source/ui/sidebar/RecentMasterPagesSelector.hxx sd/source/ui/slideshow/showwindow.hxx sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx sd/source/ui/view/ViewShellBase.cxx sd/source/ui/view/drviewsa.cxx sfx2/source/appl/fileobj.hxx sfx2/source/appl/opengrf.cxx sfx2/source/control/thumbnailviewacc.hxx sfx2/source/dialog/securitypage.cxx sfx2/source/dialog/templdlg.cxx sfx2/source/doc/docinsert.cxx sfx2/source/doc/guisaveas.cxx sfx2/source/inc/alienwarn.hxx sfx2/source/sidebar/Deck.cxx sfx2/source/sidebar/Deck.hxx sfx2/source/sidebar/DeckTitleBar.cxx sfx2/source/sidebar/DeckTitleBar.hxx sfx2/source/sidebar/MenuButton.cxx sfx2/source/sidebar/MenuButton.hxx sfx2/source/sidebar/Panel.cxx sfx2/source/sidebar/Panel.hxx sfx2/source/sidebar/PanelTitleBar.hxx sfx2/source/sidebar/SidebarDockingWindow.hxx sfx2/source/sidebar/SidebarToolBox.cxx sfx2/source/sidebar/TabBar.hxx sfx2/source/sidebar/TabItem.cxx sfx2/source/sidebar/TabItem.hxx sfx2/source/sidebar/TitleBar.hxx sfx2/source/toolbox/imgmgr.cxx starmath/inc/edit.hxx starmath/inc/smmod.hxx starmath/qa/cppunit/test_starmath.cxx starmath/source/edit.cxx starmath/source/smmod.cxx svtools/source/brwbox/brwbox1.cxx svtools/source/brwbox/datwin.hxx svtools/source/contnr/fileview.cxx svtools/source/contnr/simptabl.cxx svtools/source/control/filectrl.cxx svtools/source/control/valueimp.hxx svx/inc/GalleryControl.hxx svx/source/dialog/dlgctrl.cxx svx/source/dialog/swframeexample.cxx svx/source/fmcomp/fmgridif.cxx svx/source/gallery2/GalleryControl.cxx svx/source/sidebar/EmptyPanel.hxx svx/source/sidebar/area/AreaPropertyPanel.hxx svx/source/sidebar/area/AreaTransparencyGradientControl.hxx svx/source/sidebar/graphic/GraphicPropertyPanel.hxx svx/source/sidebar/insert/InsertPropertyPanel.cxx svx/source/sidebar/insert/InsertPropertyPanel.hxx svx/source/sidebar/line/LinePropertyPanel.hxx svx/source/sidebar/line/LineWidthControl.cxx svx/source/sidebar/line/LineWidthControl.hxx svx/source/sidebar/line/LineWidthValueSet.hxx svx/source/sidebar/paragraph/ParaPropertyPanel.hxx svx/source/sidebar/possize/SidebarDialControl.cxx svx/source/sidebar/text/TextCharacterSpacingPopup.hxx svx/source/sidebar/text/TextPropertyPanel.hxx svx/source/sidebar/tools/PopupContainer.cxx svx/source/sidebar/tools/PopupControl.cxx svx/source/sidebar/tools/ValueSetWithTextControl.cxx svx/source/svdraw/svdfmtf.hxx svx/source/svdraw/svdibrow.cxx svx/source/tbxctrls/colrctrl.cxx svx/source/tbxctrls/tbcontrl.cxx sw/source/ui/dbui/mmaddressblockpage.cxx sw/source/ui/dialog/uiregionsw.cxx sw/source/ui/index/cnttab.cxx sw/source/uibase/inc/drpcps.hxx sw/source/uibase/sidebar/PageColumnControl.hxx sw/source/uibase/sidebar/PageMarginControl.hxx sw/source/uibase/sidebar/PageOrientationControl.hxx sw/source/uibase/sidebar/PagePropertyPanel.hxx sw/source/uibase/sidebar/PageSizeControl.hxx sw/source/uibase/uiview/view2.cxx sw/source/uibase/utlui/navipi.cxx vcl/inc/svdata.hxx vcl/source/control/combobox.cxx vcl/source/control/lstbox.cxx vcl/source/window/dockwin.cxx vcl/source/window/winproc.cxx Change-Id: I056cf3026ff17d65cca0b6e6588bda4a88fa8d95
Diffstat (limited to 'dbaccess/source/ui/relationdesign')
-rw-r--r--dbaccess/source/ui/relationdesign/RTableConnection.cxx4
-rw-r--r--dbaccess/source/ui/relationdesign/RTableConnection.hxx1
-rw-r--r--dbaccess/source/ui/relationdesign/RelationController.cxx12
-rw-r--r--dbaccess/source/ui/relationdesign/RelationDesignView.cxx6
-rw-r--r--dbaccess/source/ui/relationdesign/RelationTableView.cxx61
5 files changed, 41 insertions, 43 deletions
diff --git a/dbaccess/source/ui/relationdesign/RTableConnection.cxx b/dbaccess/source/ui/relationdesign/RTableConnection.cxx
index 03a9b56c8826..1f18d83af39a 100644
--- a/dbaccess/source/ui/relationdesign/RTableConnection.cxx
+++ b/dbaccess/source/ui/relationdesign/RTableConnection.cxx
@@ -38,10 +38,6 @@ ORelationTableConnection::ORelationTableConnection( const ORelationTableConnecti
// no own members, thus the base class functionality is enough
}
-ORelationTableConnection::~ORelationTableConnection()
-{
-}
-
ORelationTableConnection& ORelationTableConnection::operator=( const ORelationTableConnection& rConn )
{
// this doesn't change anything, since the base class tests this, too and I don't have my own members to copy
diff --git a/dbaccess/source/ui/relationdesign/RTableConnection.hxx b/dbaccess/source/ui/relationdesign/RTableConnection.hxx
index 24339b521a23..3ebea9b873f3 100644
--- a/dbaccess/source/ui/relationdesign/RTableConnection.hxx
+++ b/dbaccess/source/ui/relationdesign/RTableConnection.hxx
@@ -31,7 +31,6 @@ namespace dbaui
ORelationTableConnection( ORelationTableView* pContainer, const TTableConnectionData::value_type& pTabConnData );
ORelationTableConnection( const ORelationTableConnection& rConn );
// wichtiger Kommentar zum CopyConstructor siehe OTableConnection(const OTableConnection&)
- virtual ~ORelationTableConnection();
ORelationTableConnection& operator=( const ORelationTableConnection& rConn );
diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx
index 2bc001a585bf..430d0a35aef0 100644
--- a/dbaccess/source/ui/relationdesign/RelationController.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationController.cxx
@@ -205,8 +205,8 @@ void ORelationController::impl_initialize()
{
OUString sTitle(ModuleRes(STR_RELATIONDESIGN));
sTitle = sTitle.copy(3);
- OSQLMessageBox aDlg(NULL,sTitle,ModuleRes(STR_RELATIONDESIGN_NOT_AVAILABLE));
- aDlg.Execute();
+ ScopedVclPtrInstance< OSQLMessageBox > aDlg(nullptr,sTitle,ModuleRes(STR_RELATIONDESIGN_NOT_AVAILABLE));
+ aDlg->Execute();
}
disconnect();
throw SQLException();
@@ -245,7 +245,7 @@ OUString ORelationController::getPrivateTitle( ) const
bool ORelationController::Construct(vcl::Window* pParent)
{
- setView( * new ORelationDesignView( pParent, *this, getORB() ) );
+ setView( VclPtr<ORelationDesignView>::Create( pParent, *this, getORB() ) );
OJoinController::Construct(pParent);
return true;
}
@@ -255,9 +255,9 @@ short ORelationController::saveModified()
short nSaved = RET_YES;
if(haveDataSource() && isModified())
{
- MessageDialog aQry(getView(), "DesignSaveModifiedDialog",
- "dbaccess/ui/designsavemodifieddialog.ui");
- nSaved = aQry.Execute();
+ ScopedVclPtrInstance<MessageDialog> aQry(getView(), "DesignSaveModifiedDialog",
+ "dbaccess/ui/designsavemodifieddialog.ui");
+ nSaved = aQry->Execute();
if(nSaved == RET_YES)
Execute(ID_BROWSER_SAVEDOC,Sequence<PropertyValue>());
}
diff --git a/dbaccess/source/ui/relationdesign/RelationDesignView.cxx b/dbaccess/source/ui/relationdesign/RelationDesignView.cxx
index a27f4a5b2eb6..72e75deb07b9 100644
--- a/dbaccess/source/ui/relationdesign/RelationDesignView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationDesignView.cxx
@@ -50,13 +50,9 @@ ORelationDesignView::ORelationDesignView(vcl::Window* _pParent, ORelationControl
{
}
-ORelationDesignView::~ORelationDesignView()
-{
-}
-
void ORelationDesignView::Construct()
{
- m_pTableView = new ORelationTableView(m_pScrollWindow,this);
+ m_pTableView = VclPtr<ORelationTableView>::Create(m_pScrollWindow,this);
OJoinDesignView::Construct();
}
diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
index 38ee81fb1715..06f5839c8483 100644
--- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
@@ -73,8 +73,15 @@ ORelationTableView::ORelationTableView( vcl::Window* pParent, ORelationDesignVie
ORelationTableView::~ORelationTableView()
{
+ disposeOnce();
+}
+
+void ORelationTableView::dispose()
+{
if ( m_pContainerListener.is() )
m_pContainerListener->dispose();
+ m_pExistingConnection.clear();
+ OJoinTableView::dispose();
}
void ORelationTableView::ReSync()
@@ -99,14 +106,14 @@ void ORelationTableView::ReSync()
for(;aIter != rTabWinDataList.rend();++aIter)
{
TTableWindowData::value_type pData = *aIter;
- OTableWindow* pTabWin = createWindow(pData);
+ VclPtr<OTableWindow> pTabWin = createWindow(pData);
if (!pTabWin->Init())
{
// initialisation failed, which means this TabWin is not available, therefore,
// it should be cleaned up, including its data in the document
pTabWin->clearListBox();
- delete pTabWin;
+ pTabWin.disposeAndClear();
arrInvalidTables.push_back(pData->GetTableName());
rTabWinDataList.erase( ::std::remove(rTabWinDataList.begin(), rTabWinDataList.end(), *aIter), rTabWinDataList.end());
@@ -144,7 +151,7 @@ void ORelationTableView::ReSync()
}
}
- addConnection( new ORelationTableConnection(this, *aConIter), false ); // don't add the data again
+ addConnection( VclPtr<ORelationTableConnection>::Create(this, *aConIter), false );
}
if ( !GetTabWinMap().empty() )
@@ -164,8 +171,8 @@ void ORelationTableView::AddConnection(const OJoinExchangeData& jxdSource, const
OTableWindow* pSourceWin = jxdSource.pListBox->GetTabWin();
OTableWindow* pDestWin = jxdDest.pListBox->GetTabWin();
- ::std::vector<OTableConnection*>::const_iterator aIter = getTableConnections().begin();
- ::std::vector<OTableConnection*>::const_iterator aEnd = getTableConnections().end();
+ auto aIter = getTableConnections().begin();
+ auto aEnd = getTableConnections().end();
for(;aIter != aEnd;++aIter)
{
OTableConnection* pFirst = *aIter;
@@ -200,7 +207,7 @@ void ORelationTableView::AddConnection(const OJoinExchangeData& jxdSource, const
if( pTabConnData->Update() )
{
// enter UI-object into ConnList
- addConnection( new ORelationTableConnection( this, pTabConnData ) );
+ addConnection( VclPtr<ORelationTableConnection>::Create( this, pTabConnData ) );
}
}
catch(const SQLException&)
@@ -216,8 +223,8 @@ void ORelationTableView::AddConnection(const OJoinExchangeData& jxdSource, const
void ORelationTableView::ConnDoubleClicked( OTableConnection* pConnection )
{
- ORelationDialog aRelDlg( this, pConnection->GetData() );
- switch (aRelDlg.Execute())
+ ScopedVclPtrInstance< ORelationDialog > aRelDlg( this, pConnection->GetData() );
+ switch (aRelDlg->Execute())
{
case RET_OK:
// successfully updated
@@ -244,14 +251,14 @@ void ORelationTableView::AddNewRelation()
{
TTableConnectionData::value_type pNewConnData( new ORelationTableConnectionData() );
- ORelationDialog aRelDlg(this, pNewConnData, true);
+ ScopedVclPtrInstance< ORelationDialog > aRelDlg(this, pNewConnData, true);
- bool bSuccess = (aRelDlg.Execute() == RET_OK);
+ bool bSuccess = (aRelDlg->Execute() == RET_OK);
if (bSuccess)
{
// already updated by the dialog
// announce it to the document
- addConnection( new ORelationTableConnection(this, pNewConnData) );
+ addConnection( VclPtr<ORelationTableConnection>::Create(this, pNewConnData) );
}
}
@@ -293,7 +300,7 @@ void ORelationTableView::AddTabWin(const OUString& _rComposedName, const OUStrin
pNewTabWinData->ShowAll(false);
// link new window into the window list
- OTableWindow* pNewTabWin = createWindow( pNewTabWinData );
+ VclPtr<OTableWindow> pNewTabWin = createWindow( pNewTabWinData );
if(pNewTabWin->Init())
{
m_pView->getController().getTableWindowData().push_back( pNewTabWinData);
@@ -313,14 +320,14 @@ void ORelationTableView::AddTabWin(const OUString& _rComposedName, const OUStrin
else
{
pNewTabWin->clearListBox();
- delete pNewTabWin;
+ pNewTabWin.disposeAndClear();
}
}
void ORelationTableView::RemoveTabWin( OTableWindow* pTabWin )
{
- OSQLWarningBox aDlg( this, ModuleRes( STR_QUERY_REL_DELETE_WINDOW ), WB_YES_NO | WB_DEF_YES );
- if ( m_bInRemove || aDlg.Execute() == RET_YES )
+ ScopedVclPtrInstance< OSQLWarningBox > aDlg( this, ModuleRes( STR_QUERY_REL_DELETE_WINDOW ), WB_YES_NO | WB_DEF_YES );
+ if ( m_bInRemove || aDlg->Execute() == RET_YES )
{
m_pView->getController().ClearUndoManager();
OJoinTableView::RemoveTabWin( pTabWin );
@@ -337,13 +344,13 @@ void ORelationTableView::lookForUiActivities()
{
OUString sTitle(ModuleRes(STR_RELATIONDESIGN));
sTitle = sTitle.copy(3);
- OSQLMessageBox aDlg(this,ModuleRes(STR_QUERY_REL_EDIT_RELATION),OUString(),0);
- aDlg.SetText(sTitle);
- aDlg.RemoveButton(aDlg.GetButtonId(0));
- aDlg.AddButton( ModuleRes(STR_QUERY_REL_EDIT), RET_OK, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON);
- aDlg.AddButton( ModuleRes(STR_QUERY_REL_CREATE), RET_YES, 0);
- aDlg.AddButton( StandardButtonType::Cancel,RET_CANCEL,0);
- sal_uInt16 nRet = aDlg.Execute();
+ ScopedVclPtrInstance< OSQLMessageBox > aDlg(this,ModuleRes(STR_QUERY_REL_EDIT_RELATION),OUString(),0);
+ aDlg->SetText(sTitle);
+ aDlg->RemoveButton(aDlg->GetButtonId(0));
+ aDlg->AddButton( ModuleRes(STR_QUERY_REL_EDIT), RET_OK, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON);
+ aDlg->AddButton( ModuleRes(STR_QUERY_REL_CREATE), RET_YES, 0);
+ aDlg->AddButton( StandardButtonType::Cancel,RET_CANCEL,0);
+ sal_uInt16 nRet = aDlg->Execute();
if( nRet == RET_CANCEL)
{
m_pCurrentlyTabConnData.reset();
@@ -357,19 +364,19 @@ void ORelationTableView::lookForUiActivities()
}
if(m_pCurrentlyTabConnData)
{
- ORelationDialog aRelDlg( this, m_pCurrentlyTabConnData );
- if (aRelDlg.Execute() == RET_OK)
+ ScopedVclPtrInstance< ORelationDialog > aRelDlg( this, m_pCurrentlyTabConnData );
+ if (aRelDlg->Execute() == RET_OK)
{
// already updated by the dialog
- addConnection( new ORelationTableConnection( this, m_pCurrentlyTabConnData ) );
+ addConnection( VclPtr<ORelationTableConnection>::Create( this, m_pCurrentlyTabConnData ) );
}
m_pCurrentlyTabConnData.reset();
}
}
-OTableWindow* ORelationTableView::createWindow(const TTableWindowData::value_type& _pData)
+VclPtr<OTableWindow> ORelationTableView::createWindow(const TTableWindowData::value_type& _pData)
{
- return new ORelationTableWindow(this,_pData);
+ return VclPtr<ORelationTableWindow>::Create(this,_pData);
}
bool ORelationTableView::allowQueries() const