summaryrefslogtreecommitdiff
path: root/sc/source/ui/attrdlg
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-22 15:15:17 +0200
committerEike Rathke <erack@redhat.com>2014-09-04 09:05:34 -0500
commit8e4dc1d760d85e09bbc3f3bbb5b8be2947db1b63 (patch)
treedbb60d3d9c8f931ed98e6ac864695d1d9046cee5 /sc/source/ui/attrdlg
parenta62a046df3302e5763b7a568ac25032bb1501d44 (diff)
create type-safe bitfield for sc insert/delete flags
The most important part of the change is in sc/inc/global.hxx It creates a type-safe struct that prevents the accidental interaction between regular integer types and the flags struct. It also provides utility methods that make combining and testing the flags type-safe. Change-Id: Ibc5b20058b1655df913490682b679afd1297b36d Reviewed-on: https://gerrit.libreoffice.org/11071 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/source/ui/attrdlg')
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.cxx8
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx8
2 files changed, 8 insertions, 8 deletions
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index 807863c851c3..85667ea63435 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -242,7 +242,7 @@ void AbstractScDeleteContentsDlg_Impl::DisableObjects()
pDlg->DisableObjects();
}
-sal_uInt16 AbstractScDeleteContentsDlg_Impl::GetDelContentsCmdBits() const
+InsertDeleteFlags AbstractScDeleteContentsDlg_Impl::GetDelContentsCmdBits() const
{
return pDlg->GetDelContentsCmdBits();
}
@@ -297,7 +297,7 @@ InsCellCmd AbstractScInsertCellDlg_Impl::GetInsCellCmd() const
return pDlg->GetInsCellCmd();
}
-sal_uInt16 AbstractScInsertContentsDlg_Impl::GetInsContentsCmdBits() const
+InsertDeleteFlags AbstractScInsertContentsDlg_Impl::GetInsContentsCmdBits() const
{
return pDlg->GetInsContentsCmdBits();
}
@@ -701,7 +701,7 @@ AbstractScDataFormDlg* ScAbstractDialogFactory_Impl::CreateScDataFormDlg(Window*
}
AbstractScDeleteContentsDlg* ScAbstractDialogFactory_Impl::CreateScDeleteContentsDlg(Window* pParent,
- sal_uInt16 nCheckDefaults)
+ InsertDeleteFlags nCheckDefaults)
{
ScDeleteContentsDlg* pDlg = new ScDeleteContentsDlg(pParent, nCheckDefaults);
return new AbstractScDeleteContentsDlg_Impl( pDlg );
@@ -749,7 +749,7 @@ AbstractScInsertCellDlg * ScAbstractDialogFactory_Impl::CreateScInsertCellDlg( W
}
AbstractScInsertContentsDlg * ScAbstractDialogFactory_Impl::CreateScInsertContentsDlg( Window* pParent,
- sal_uInt16 nCheckDefaults,
+ InsertDeleteFlags nCheckDefaults,
const OUString* pStrTitle )
{
ScInsertContentsDlg * pDlg = new ScInsertContentsDlg(pParent, nCheckDefaults, pStrTitle);
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 70c90006f78f..a0c8be1fed69 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -177,7 +177,7 @@ class AbstractScDeleteContentsDlg_Impl : public AbstractScDeleteContentsDlg
{
DECL_ABSTDLG_BASE( AbstractScDeleteContentsDlg_Impl,ScDeleteContentsDlg)
virtual void DisableObjects() SAL_OVERRIDE;
- virtual sal_uInt16 GetDelContentsCmdBits() const SAL_OVERRIDE;
+ virtual InsertDeleteFlags GetDelContentsCmdBits() const SAL_OVERRIDE;
};
class AbstractScFillSeriesDlg_Impl:public AbstractScFillSeriesDlg
@@ -208,7 +208,7 @@ class AbstractScInsertCellDlg_Impl : public AbstractScInsertCellDlg
class AbstractScInsertContentsDlg_Impl : public AbstractScInsertContentsDlg
{
DECL_ABSTDLG_BASE(AbstractScInsertContentsDlg_Impl, ScInsertContentsDlg)
- virtual sal_uInt16 GetInsContentsCmdBits() const SAL_OVERRIDE;
+ virtual InsertDeleteFlags GetInsContentsCmdBits() const SAL_OVERRIDE;
virtual sal_uInt16 GetFormulaCmdBits() const SAL_OVERRIDE;
virtual bool IsSkipEmptyCells() const SAL_OVERRIDE;
virtual bool IsLink() const SAL_OVERRIDE;
@@ -428,7 +428,7 @@ public:
ScTabViewShell* pTabViewShell) SAL_OVERRIDE;
virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(Window* pParent,
- sal_uInt16 nCheckDefaults = 0) SAL_OVERRIDE;
+ InsertDeleteFlags nCheckDefaults = IDF_NONE) SAL_OVERRIDE;
virtual AbstractScFillSeriesDlg * CreateScFillSeriesDlg( Window* pParent,
ScDocument& rDocument,
@@ -448,7 +448,7 @@ public:
bool bDisallowCellMove = false ) SAL_OVERRIDE;
virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( Window* pParent,
- sal_uInt16 nCheckDefaults = 0,
+ InsertDeleteFlags nCheckDefaults = IDF_NONE,
const OUString* pStrTitle = NULL ) SAL_OVERRIDE;
virtual AbstractScInsertTableDlg * CreateScInsertTableDlg(Window* pParent, ScViewData& rViewData,