summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/misc
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/misc')
-rw-r--r--dbaccess/source/ui/misc/WCPage.cxx4
-rw-r--r--dbaccess/source/ui/misc/WColumnSelect.cxx13
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx32
-rw-r--r--dbaccess/source/ui/misc/WNameMatch.cxx2
-rw-r--r--dbaccess/source/ui/misc/WTypeSelect.cxx45
5 files changed, 37 insertions, 59 deletions
diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx
index ae07cb947fb8..fe3b15b869a6 100644
--- a/dbaccess/source/ui/misc/WCPage.cxx
+++ b/dbaccess/source/ui/misc/WCPage.cxx
@@ -91,7 +91,7 @@ OCopyTable::OCopyTable(OCopyTableWizard* pWizard, TabPageParent pParent)
m_xEdKeyName->set_max_length(nMaxLen ? nMaxLen : EDIT_NOLIMIT);
}
- SetText(DBA_RES(STR_COPYTABLE_TITLE_COPY));
+ SetPageTitle(DBA_RES(STR_COPYTABLE_TITLE_COPY));
}
OCopyTable::~OCopyTable()
@@ -216,7 +216,7 @@ bool OCopyTable::LeavePage()
return true;
}
-void OCopyTable::ActivatePage()
+void OCopyTable::Activate()
{
m_pParent->GetOKButton().set_sensitive(true);
m_nOldOperation = m_pParent->getOperation();
diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx
index 89fd3a86bc41..5939edaacbed 100644
--- a/dbaccess/source/ui/misc/WColumnSelect.cxx
+++ b/dbaccess/source/ui/misc/WColumnSelect.cxx
@@ -44,10 +44,7 @@ namespace CopyTableOperation = ::com::sun::star::sdb::application::CopyTableOper
OUString OWizColumnSelect::GetTitle() const { return DBA_RES(STR_WIZ_COLUMN_SELECT_TITEL); }
OWizardPage::OWizardPage(OCopyTableWizard* pWizard, TabPageParent pParent, const OUString& rUIXMLDescription, const OString& rID)
- : TabPage(pParent.pPage ? Application::GetDefDialogParent() : pParent.pParent.get()) //just drag this along hidden in this scenario
- , m_xBuilder(pParent.pPage ? Application::CreateBuilder(pParent.pPage, rUIXMLDescription)
- : Application::CreateInterimBuilder(this, rUIXMLDescription))
- , m_xContainer(m_xBuilder->weld_container(rID))
+ : ::vcl::OWizardPage(pParent, rUIXMLDescription, rID)
, m_pParent(pWizard)
, m_bFirstTime(true)
{
@@ -81,17 +78,11 @@ OWizColumnSelect::OWizColumnSelect(OCopyTableWizard* pWizard, TabPageParent pPar
OWizColumnSelect::~OWizColumnSelect()
{
- disposeOnce();
-}
-
-void OWizColumnSelect::dispose()
-{
while (m_xNewColumnNames->n_children())
{
delete reinterpret_cast<OFieldDescription*>(m_xNewColumnNames->get_id(0).toInt64());
m_xNewColumnNames->remove(0);
}
- OWizardPage::dispose();
}
void OWizColumnSelect::Reset()
@@ -116,7 +107,7 @@ void OWizColumnSelect::Reset()
m_bFirstTime = false;
}
-void OWizColumnSelect::ActivatePage( )
+void OWizColumnSelect::Activate( )
{
// if there are no dest columns reset the left side with the original columns
if(m_pParent->getDestColumns().empty())
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index fe217d367b8c..e4c26e74e0a8 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -566,16 +566,16 @@ OCopyTableWizard::OCopyTableWizard(weld::Window* pParent, const OUString& _rDefa
m_sName = ::dbtools::composeTableName(m_xDestConnection->getMetaData(),sCatalog,sSchema,sTable,false,::dbtools::EComposeRule::InTableDefinitions);
}
- VclPtrInstance<OCopyTable> pPage1(this, CreatePageContainer());
- pPage1->disallowUseHeaderLine();
+ std::unique_ptr<OCopyTable> xPage1(new OCopyTable(this, CreatePageContainer()));
+ xPage1->disallowUseHeaderLine();
if ( !bAllowViews )
- pPage1->disallowViews();
- pPage1->setCreateStyleAction();
- AddWizardPage(pPage1);
+ xPage1->disallowViews();
+ xPage1->setCreateStyleAction();
+ AddWizardPage(std::move(xPage1));
- AddWizardPage( VclPtr<OWizNameMatching>::Create(this, CreatePageContainer() ) );
- AddWizardPage( VclPtr<OWizColumnSelect>::Create(this, CreatePageContainer() ) );
- AddWizardPage( VclPtr<OWizNormalExtend>::Create(this, CreatePageContainer() ) );
+ AddWizardPage( std::make_unique<OWizNameMatching>(this, CreatePageContainer() ) );
+ AddWizardPage( std::make_unique<OWizColumnSelect>(this, CreatePageContainer() ) );
+ AddWizardPage( std::make_unique<OWizNormalExtend>(this, CreatePageContainer() ) );
ActivatePage();
m_xAssistant->set_current_page(0);
@@ -620,13 +620,13 @@ OCopyTableWizard::OCopyTableWizard( weld::Window* pParent, const OUString& _rDef
m_xInteractionHandler = InteractionHandler::createWithParent(m_xContext, nullptr);
- VclPtrInstance<OCopyTable> pPage1( this, CreatePageContainer() );
- pPage1->disallowViews();
- pPage1->setCreateStyleAction();
- AddWizardPage( pPage1 );
+ std::unique_ptr<OCopyTable> xPage1(new OCopyTable(this, CreatePageContainer()));
+ xPage1->disallowViews();
+ xPage1->setCreateStyleAction();
+ AddWizardPage(std::move(xPage1));
- AddWizardPage( VclPtr<OWizNameMatching>::Create( this, CreatePageContainer() ) );
- AddWizardPage( VclPtr<OWizColumnSelect>::Create( this, CreatePageContainer() ) );
+ AddWizardPage( std::make_unique<OWizNameMatching>( this, CreatePageContainer() ) );
+ AddWizardPage( std::make_unique<OWizColumnSelect>( this, CreatePageContainer() ) );
AddWizardPage( (*_pTypeSelectionPageFactory)( this, CreatePageContainer(), _rTypeSelectionPageArg ) );
ActivatePage();
@@ -951,9 +951,9 @@ bool OCopyTableWizard::DeactivatePage()
return pPage && pPage->LeavePage();
}
-void OCopyTableWizard::AddWizardPage(OWizardPage* pPage)
+void OCopyTableWizard::AddWizardPage(std::unique_ptr<OWizardPage> xPage)
{
- AddPage(pPage);
+ AddPage(std::move(xPage));
++m_nPageCount;
}
diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx
index 258394be15c0..47539c27ae6b 100644
--- a/dbaccess/source/ui/misc/WNameMatch.cxx
+++ b/dbaccess/source/ui/misc/WNameMatch.cxx
@@ -78,7 +78,7 @@ void OWizNameMatching::Reset()
m_bFirstTime = false;
}
-void OWizNameMatching::ActivatePage( )
+void OWizNameMatching::Activate( )
{
// set source table name
OUString aName = m_sSourceText + m_pParent->m_sSourceName;
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx
index 06fcf50d0a46..a9bf1af33e40 100644
--- a/dbaccess/source/ui/misc/WTypeSelect.cxx
+++ b/dbaccess/source/ui/misc/WTypeSelect.cxx
@@ -46,19 +46,12 @@ using namespace ::com::sun::star::sdbc;
// OWizTypeSelectControl
OWizTypeSelectControl::OWizTypeSelectControl(TabPageParent pParent, OWizTypeSelect* pParentTabPage)
: OFieldDescControl(pParent, nullptr)
- , m_xParentTabPage(pParentTabPage)
+ , m_pParentTabPage(pParentTabPage)
{
}
OWizTypeSelectControl::~OWizTypeSelectControl()
{
- disposeOnce();
-}
-
-void OWizTypeSelectControl::dispose()
-{
- m_xParentTabPage.clear();
- OFieldDescControl::dispose();
}
void OWizTypeSelectControl::ActivateAggregate( EControlType eType )
@@ -93,7 +86,7 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId )
{
OSL_ENSURE(nRow == -1,"nRow must be -1!");
- weld::TreeView* pListBox = m_xParentTabPage->m_xColumnNames->GetWidget();
+ weld::TreeView* pListBox = m_pParentTabPage->m_xColumnNames->GetWidget();
OFieldDescription* pCurFieldDescr = getCurrentFieldDescData();
@@ -114,7 +107,7 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId )
{
case FIELD_PROPERTY_COLUMNNAME:
{
- OCopyTableWizard* pWiz = m_xParentTabPage->m_pParent;
+ OCopyTableWizard* pWiz = m_pParentTabPage->m_pParent;
// first we have to check if this name already exists
bool bDoubleName = false;
bool bCase = true;
@@ -143,13 +136,13 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId )
pWiz->showError(strMessage);
pCurFieldDescr->SetName(sName);
DisplayData(pCurFieldDescr);
- m_xParentTabPage->setDuplicateName(true);
+ m_pParentTabPage->setDuplicateName(true);
return;
}
OUString sOldName = pCurFieldDescr->GetName();
pCurFieldDescr->SetName(sNewName);
- m_xParentTabPage->setDuplicateName(false);
+ m_pParentTabPage->setDuplicateName(false);
// now we change the name
@@ -176,42 +169,42 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId )
css::lang::Locale OWizTypeSelectControl::GetLocale() const
{
- return m_xParentTabPage->m_pParent->GetLocale();
+ return m_pParentTabPage->m_pParent->GetLocale();
}
Reference< XNumberFormatter > OWizTypeSelectControl::GetFormatter() const
{
- return m_xParentTabPage->m_pParent->GetFormatter();
+ return m_pParentTabPage->m_pParent->GetFormatter();
}
TOTypeInfoSP OWizTypeSelectControl::getTypeInfo(sal_Int32 _nPos)
{
- return m_xParentTabPage->m_pParent->getDestTypeInfo(_nPos);
+ return m_pParentTabPage->m_pParent->getDestTypeInfo(_nPos);
}
const OTypeInfoMap* OWizTypeSelectControl::getTypeInfo() const
{
- return &m_xParentTabPage->m_pParent->getDestTypeInfo();
+ return &m_pParentTabPage->m_pParent->getDestTypeInfo();
}
css::uno::Reference< css::sdbc::XDatabaseMetaData> OWizTypeSelectControl::getMetaData()
{
- return m_xParentTabPage->m_pParent->m_xDestConnection->getMetaData();
+ return m_pParentTabPage->m_pParent->m_xDestConnection->getMetaData();
}
css::uno::Reference< css::sdbc::XConnection> OWizTypeSelectControl::getConnection()
{
- return m_xParentTabPage->m_pParent->m_xDestConnection;
+ return m_pParentTabPage->m_pParent->m_xDestConnection;
}
bool OWizTypeSelectControl::isAutoIncrementValueEnabled() const
{
- return m_xParentTabPage->m_bAutoIncrementEnabled;
+ return m_pParentTabPage->m_bAutoIncrementEnabled;
}
OUString OWizTypeSelectControl::getAutoIncrementValue() const
{
- return m_xParentTabPage->m_sAutoIncrementValue;
+ return m_pParentTabPage->m_sAutoIncrementValue;
}
OWizTypeSelect::OWizTypeSelect(OCopyTableWizard* pWizard, TabPageParent pParent, SvStream* pStream)
@@ -254,13 +247,7 @@ OWizTypeSelect::OWizTypeSelect(OCopyTableWizard* pWizard, TabPageParent pParent,
OWizTypeSelect::~OWizTypeSelect()
{
- disposeOnce();
-}
-
-void OWizTypeSelect::dispose()
-{
m_xTypeControl.disposeAndClear();
- OWizardPage::dispose();
}
OUString OWizTypeSelect::GetTitle() const
@@ -296,7 +283,7 @@ void OWizTypeSelect::Reset()
m_bFirstTime = false;
}
-void OWizTypeSelect::ActivatePage( )
+void OWizTypeSelect::Activate( )
{
bool bOldFirstTime = m_bFirstTime;
Reset();
@@ -342,13 +329,13 @@ IMPL_LINK_NOARG(OWizTypeSelect, ButtonClickHdl, weld::Button&, void)
m_pParserStream->Seek(nTell);
}
- ActivatePage();
+ Activate();
}
OWizTypeSelectList::OWizTypeSelectList(std::unique_ptr<weld::TreeView> xControl)
: m_xControl(std::move(xControl))
, m_bPKey(false)
- , m_xParentTabPage(nullptr)
+ , m_pParentTabPage(nullptr)
{
m_xControl->connect_popup_menu(LINK(this, OWizTypeSelectList, CommandHdl));
}