[Libreoffice-commits] core.git: Branch 'feature/vclptr' - 2 commits - cui/source dbaccess/source
Michael Meeks
michael.meeks at collabora.com
Fri Apr 24 07:23:20 PDT 2015
cui/source/dialogs/insrc.cxx | 21 ++++++-----------
cui/source/dialogs/newtabledlg.cxx | 15 ++++--------
cui/source/dialogs/splitcelldlg.cxx | 34 ++++++++++++++--------------
cui/source/factory/dlgfact.cxx | 6 ++--
cui/source/inc/insrc.hxx | 6 ++--
cui/source/inc/newtabledlg.hxx | 8 +++---
cui/source/inc/splitcelldlg.hxx | 6 +---
dbaccess/source/ui/dlg/advancedsettings.cxx | 2 -
8 files changed, 44 insertions(+), 54 deletions(-)
New commits:
commit 3592db637db2998692545bffc0b9c74b69acae40
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Fri Apr 24 15:27:49 2015 +0100
Fix unhelpful MI from a VclPtr type and Abstract factory type.
Change-Id: Ibd8a8e22ffe2cd01225e97588d65eae1cc0bffb8
diff --git a/cui/source/dialogs/insrc.cxx b/cui/source/dialogs/insrc.cxx
index 2451ad9..f628d99 100644
--- a/cui/source/dialogs/insrc.cxx
+++ b/cui/source/dialogs/insrc.cxx
@@ -33,34 +33,29 @@ sal_uInt16 SvxInsRowColDlg::getInsertCount() const
}
SvxInsRowColDlg::SvxInsRowColDlg(vcl::Window* pParent, bool bCol, const OString& sHelpId )
- : ModalDialog(pParent, "InsertRowColumnDialog", "cui/ui/insertrowcolumn.ui")
+ : m_pDialog(VclPtr<ModalDialog>::Create(pParent, "InsertRowColumnDialog", "cui/ui/insertrowcolumn.ui"))
, aRow(CUI_RESSTR(RID_SVXSTR_ROW))
, aCol(CUI_RESSTR(RID_SVXSTR_COL))
, bColumn(bCol)
{
- get(m_pCountEdit, "insert_number");
- get(m_pBeforeBtn, "insert_before");
- get(m_pAfterBtn, "insert_after");
- SetText( bColumn ? aCol : aRow );
- SetHelpId( sHelpId );
+ m_pDialog->get(m_pCountEdit, "insert_number");
+ m_pDialog->get(m_pBeforeBtn, "insert_before");
+ m_pDialog->get(m_pAfterBtn, "insert_after");
+ m_pDialog->SetText( bColumn ? aCol : aRow );
+ m_pDialog->SetHelpId( sHelpId );
}
SvxInsRowColDlg::~SvxInsRowColDlg()
{
- disposeOnce();
-}
-
-void SvxInsRowColDlg::dispose()
-{
m_pCountEdit.clear();
m_pBeforeBtn.clear();
m_pAfterBtn.clear();
- ModalDialog::dispose();
+ m_pDialog.disposeAndClear();
}
short SvxInsRowColDlg::Execute(void)
{
- return ModalDialog::Execute();
+ return m_pDialog->Execute();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/dialogs/newtabledlg.cxx b/cui/source/dialogs/newtabledlg.cxx
index d659368..04b2fd3 100644
--- a/cui/source/dialogs/newtabledlg.cxx
+++ b/cui/source/dialogs/newtabledlg.cxx
@@ -22,27 +22,22 @@
#include "newtabledlg.hxx"
SvxNewTableDialog::SvxNewTableDialog( vcl::Window* pParent )
-: ModalDialog( pParent, "NewTableDialog", "cui/ui/newtabledialog.ui" )
+ : m_pDialog( VclPtr<ModalDialog>::Create( pParent, "NewTableDialog", "cui/ui/newtabledialog.ui" ) )
{
- get(mpNumRows, "rows");
- get(mpNumColumns, "columns");
+ m_pDialog->get(mpNumRows, "rows");
+ m_pDialog->get(mpNumColumns, "columns");
}
SvxNewTableDialog::~SvxNewTableDialog()
{
- disposeOnce();
-}
-
-void SvxNewTableDialog::dispose()
-{
mpNumColumns.clear();
mpNumRows.clear();
- ModalDialog::dispose();
+ m_pDialog.disposeAndClear();
}
short SvxNewTableDialog::Execute(void)
{
- return ModalDialog::Execute();
+ return m_pDialog->Execute();
}
sal_Int32 SvxNewTableDialog::getRows() const
diff --git a/cui/source/dialogs/splitcelldlg.cxx b/cui/source/dialogs/splitcelldlg.cxx
index c412265..69bfd0e 100644
--- a/cui/source/dialogs/splitcelldlg.cxx
+++ b/cui/source/dialogs/splitcelldlg.cxx
@@ -24,16 +24,27 @@
#include "splitcelldlg.hxx"
#include "cuires.hrc"
+namespace {
+ class NoApplyDialog : public SvxStandardDialog
+ {
+ public:
+ NoApplyDialog(vcl::Window *pParent, const OUString &rId, const OUString &rXML) :
+ SvxStandardDialog(pParent, rId, rXML) { }
+ protected:
+ virtual void Apply() SAL_OVERRIDE {}
+ };
+}
+
SvxSplitTableDlg::SvxSplitTableDlg( vcl::Window *pParent, bool bIsTableVertical,
long nMaxVertical, long nMaxHorizontal )
- : SvxStandardDialog(pParent, "SplitCellsDialog", "cui/ui/splitcellsdialog.ui")
+ : m_pDialog(VclPtr<NoApplyDialog>::Create(pParent, "SplitCellsDialog", "cui/ui/splitcellsdialog.ui"))
, mnMaxVertical(nMaxVertical)
, mnMaxHorizontal(nMaxHorizontal)
{
- get(m_pCountEdit, "countnf");
- get(m_pHorzBox, "hori");
- get(m_pVertBox, "vert");
- get(m_pPropCB, "prop");
+ m_pDialog->get(m_pCountEdit, "countnf");
+ m_pDialog->get(m_pHorzBox, "hori");
+ m_pDialog->get(m_pVertBox, "vert");
+ m_pDialog->get(m_pPropCB, "prop");
m_pHorzBox->SetClickHdl( LINK( this, SvxSplitTableDlg, ClickHdl ));
m_pPropCB->SetClickHdl( LINK( this, SvxSplitTableDlg, ClickHdl ));
m_pVertBox->SetClickHdl( LINK( this, SvxSplitTableDlg, ClickHdl ));
@@ -55,16 +66,11 @@ SvxSplitTableDlg::SvxSplitTableDlg( vcl::Window *pParent, bool bIsTableVertical,
SvxSplitTableDlg::~SvxSplitTableDlg()
{
- disposeOnce();
-}
-
-void SvxSplitTableDlg::dispose()
-{
m_pCountEdit.clear();
m_pHorzBox.clear();
m_pVertBox.clear();
m_pPropCB.clear();
- SvxStandardDialog::dispose();
+ m_pDialog.disposeAndClear();
}
IMPL_LINK( SvxSplitTableDlg, ClickHdl, Button *, pButton )
@@ -93,11 +99,7 @@ long SvxSplitTableDlg::GetCount() const
short SvxSplitTableDlg::Execute()
{
- return SvxStandardDialog::Execute();
-}
-
-void SvxSplitTableDlg::Apply()
-{
+ return m_pDialog->Execute();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 4267b01..6158d9a 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1816,12 +1816,12 @@ SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSvxFormatCellsDialog( vc
SvxAbstractSplittTableDialog* AbstractDialogFactory_Impl::CreateSvxSplittTableDialog( vcl::Window* pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal )
{
- return VclPtr<SvxSplitTableDlg>::Create( pParent, bIsTableVertical, nMaxVertical, nMaxHorizontal );
+ return new SvxSplitTableDlg( pParent, bIsTableVertical, nMaxVertical, nMaxHorizontal );
}
SvxAbstractNewTableDialog* AbstractDialogFactory_Impl::CreateSvxNewTableDialog( vcl::Window* pParent )
{
- return VclPtr<SvxNewTableDialog>::Create( pParent );
+ return new SvxNewTableDialog( pParent );
}
VclAbstractDialog* AbstractDialogFactory_Impl::CreateOptionsDialog(
@@ -1832,7 +1832,7 @@ VclAbstractDialog* AbstractDialogFactory_Impl::CreateOptionsDialog(
SvxAbstractInsRowColDlg* AbstractDialogFactory_Impl::CreateSvxInsRowColDlg( vcl::Window* pParent, bool bCol, const OString& sHelpId )
{
- return VclPtr<SvxInsRowColDlg>::Create( pParent, bCol, sHelpId );
+ return new SvxInsRowColDlg( pParent, bCol, sHelpId );
}
AbstractPasswordToOpenModifyDialog * AbstractDialogFactory_Impl::CreatePasswordToOpenModifyDialog(
diff --git a/cui/source/inc/insrc.hxx b/cui/source/inc/insrc.hxx
index f24467d..4985062 100644
--- a/cui/source/inc/insrc.hxx
+++ b/cui/source/inc/insrc.hxx
@@ -29,8 +29,9 @@
#include <vcl/group.hxx>
#include <vcl/button.hxx>
-class SvxInsRowColDlg : public SvxAbstractInsRowColDlg, public ModalDialog
+class SvxInsRowColDlg : public SvxAbstractInsRowColDlg
{
+ VclPtr<ModalDialog> m_pDialog;
VclPtr<NumericField> m_pCountEdit;
VclPtr<RadioButton> m_pBeforeBtn;
@@ -39,12 +40,11 @@ class SvxInsRowColDlg : public SvxAbstractInsRowColDlg, public ModalDialog
OUString aRow;
OUString aCol;
- bool bColumn;
+ bool bColumn;
public:
SvxInsRowColDlg( vcl::Window* pParent, bool bCol, const OString& sHelpId );
virtual ~SvxInsRowColDlg();
- virtual void dispose() SAL_OVERRIDE;
virtual short Execute(void) SAL_OVERRIDE;
diff --git a/cui/source/inc/newtabledlg.hxx b/cui/source/inc/newtabledlg.hxx
index f6be298..5df04b5 100644
--- a/cui/source/inc/newtabledlg.hxx
+++ b/cui/source/inc/newtabledlg.hxx
@@ -26,16 +26,16 @@
#include <svx/stddlg.hxx>
#include <svx/svxdlg.hxx>
-class SvxNewTableDialog : public SvxAbstractNewTableDialog, public ModalDialog
+class SvxNewTableDialog : public SvxAbstractNewTableDialog
{
private:
- VclPtr<NumericField> mpNumColumns;
- VclPtr<NumericField> mpNumRows;
+ VclPtr<ModalDialog> m_pDialog;
+ VclPtr<NumericField> mpNumColumns;
+ VclPtr<NumericField> mpNumRows;
public:
SvxNewTableDialog( vcl::Window* pWindow );
virtual ~SvxNewTableDialog();
- virtual void dispose() SAL_OVERRIDE;
virtual short Execute(void) SAL_OVERRIDE;
diff --git a/cui/source/inc/splitcelldlg.hxx b/cui/source/inc/splitcelldlg.hxx
index e9142e2..9d727d1 100644
--- a/cui/source/inc/splitcelldlg.hxx
+++ b/cui/source/inc/splitcelldlg.hxx
@@ -26,8 +26,9 @@
#include <svx/stddlg.hxx>
#include <svx/svxdlg.hxx>
-class SvxSplitTableDlg : public SvxAbstractSplittTableDialog, public SvxStandardDialog
+class SvxSplitTableDlg : public SvxAbstractSplittTableDialog
{
+ VclPtr<SvxStandardDialog> m_pDialog;
VclPtr<NumericField> m_pCountEdit;
VclPtr<RadioButton> m_pHorzBox;
VclPtr<RadioButton> m_pVertBox;
@@ -35,13 +36,10 @@ class SvxSplitTableDlg : public SvxAbstractSplittTableDialog, public SvxStandard
long mnMaxVertical;
long mnMaxHorizontal;
-protected:
- virtual void Apply() SAL_OVERRIDE;
public:
SvxSplitTableDlg(vcl::Window *pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal );
virtual ~SvxSplitTableDlg();
- virtual void dispose() SAL_OVERRIDE;
DECL_LINK( ClickHdl, Button * );
commit fc71bf231ee06fba9878a1ef27c997bc5e128f25
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Fri Apr 24 09:45:17 2015 +0100
Build fix.
Change-Id: Iceedf898d91a9496aa988727beeac1696d398944
diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx
index b020b5d..2fe3186 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.cxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.cxx
@@ -124,7 +124,7 @@ namespace dbaui
if ( m_bHasMaxRowScan )
{
get(m_pMaxRowScanLabel, "rowsft");
-- get(m_pMaxRowScan, "rows");
+ get(m_pMaxRowScan, "rows");
m_pMaxRowScan->SetModifyHdl(getControlModifiedLink());
m_pMaxRowScan->SetUseThousandSep(false);
m_pMaxRowScanLabel->Show();
More information about the Libreoffice-commits
mailing list