summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-02-24 12:25:02 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-02-24 12:27:32 +0100
commit33740b7d5abb8aca34692fbdaa787b26a60652a9 (patch)
treead2574a7850e2aa8ac18eaff89f4a85567896692 /dbaccess
parent43d7f4e3640c5e370fd1204739c2b0c7eb5f40e4 (diff)
Replace exisiting TriState, AutoState with more generic TriState
Change-Id: Ida05478aae5a379775c671e0c2f2851d820d78be
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx6
-rw-r--r--dbaccess/source/ui/control/TableGrantCtrl.cxx10
-rw-r--r--dbaccess/source/ui/dlg/adminpages.cxx2
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx6
5 files changed, 13 insertions, 13 deletions
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index c3b94448058d..01ffd81ee2b4 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -722,7 +722,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
makeAny( sal_Bool( ColumnValue::NO_NULLS != nNullable ) )
) );
if ( ColumnValue::NO_NULLS == nNullable )
- aDefault <<= (sal_Int16)STATE_NOCHECK;
+ aDefault <<= (sal_Int16)TRISTATE_FALSE;
}
break;
@@ -771,9 +771,9 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
if ( nType == DataType::BIT || nType == DataType::BOOLEAN )
{
if ( aDefault.hasValue() )
- aDefault <<= (comphelper::getString(aDefault).toInt32() == 0) ? (sal_Int16)STATE_NOCHECK : (sal_Int16)STATE_CHECK;
+ aDefault <<= (comphelper::getString(aDefault).toInt32() == 0) ? (sal_Int16)TRISTATE_FALSE : (sal_Int16)TRISTATE_TRUE;
else
- aDefault <<= ((sal_Int16)STATE_DONTKNOW);
+ aDefault <<= ((sal_Int16)TRISTATE_INDET);
}
}
diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx
index ef3d35738b64..9570d8f99b8f 100644
--- a/dbaccess/source/ui/control/TableGrantCtrl.cxx
+++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx
@@ -394,9 +394,9 @@ void OTableGrantControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect,
{
TTablePrivilegeMap::const_iterator aFind = findPrivilege(m_nDataPos);
if(aFind != m_aPrivMap.end())
- PaintTristate(rDev, rRect, isAllowed(nColumnId,aFind->second.nRights) ? STATE_CHECK : STATE_NOCHECK,isAllowed(nColumnId,aFind->second.nWithGrant));
+ PaintTristate(rDev, rRect, isAllowed(nColumnId,aFind->second.nRights) ? TRISTATE_TRUE : TRISTATE_FALSE,isAllowed(nColumnId,aFind->second.nWithGrant));
else
- PaintTristate(rDev, rRect, STATE_NOCHECK,sal_False);
+ PaintTristate(rDev, rRect, TRISTATE_FALSE,sal_False);
}
else
{
@@ -440,14 +440,14 @@ Reference< XAccessible > OTableGrantControl::CreateAccessibleCell( sal_Int32 _nR
sal_uInt16 nColumnId = GetColumnId( _nColumnPos );
if(nColumnId != COL_TABLE_NAME)
{
- TriState eState = STATE_NOCHECK;
+ TriState eState = TRISTATE_FALSE;
TTablePrivilegeMap::const_iterator aFind = findPrivilege(_nRow);
if(aFind != m_aPrivMap.end())
{
- eState = isAllowed(nColumnId,aFind->second.nRights) ? STATE_CHECK : STATE_NOCHECK;
+ eState = isAllowed(nColumnId,aFind->second.nRights) ? TRISTATE_TRUE : TRISTATE_FALSE;
}
else
- eState = STATE_NOCHECK;
+ eState = TRISTATE_FALSE;
return EditBrowseBox::CreateAccessibleCheckBoxCell( _nRow, _nColumnPos,eState );
}
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx
index 3f2f40239218..36b4b659b23f 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -202,7 +202,7 @@ namespace dbaui
if ( _pCheckBox->IsTriStateEnabled() )
{
OptionalBoolItem aValue( _nID );
- if ( _pCheckBox->GetState() != STATE_DONTKNOW )
+ if ( _pCheckBox->GetState() != TRISTATE_INDET )
aValue.SetValue( bValue );
_rSet.Put( aValue );
}
diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx
index 62780d7d536b..55399ccf6279 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.cxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.cxx
@@ -237,7 +237,7 @@ namespace dbaui
if ( !aValue )
{
- (*setting->ppControl)->SetState( STATE_DONTKNOW );
+ (*setting->ppControl)->SetState( TRISTATE_INDET );
}
else
{
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 616be7a6bd60..8f8039056f0b 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -910,7 +910,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
{
case BROW_VIS_ROW:
{
- sal_Bool bOldValue = m_pVisibleCell->GetBox().GetSavedValue() != STATE_NOCHECK;
+ sal_Bool bOldValue = m_pVisibleCell->GetBox().GetSavedValue() != TRISTATE_FALSE;
strOldCellContents = bOldValue ? g_strOne : g_strZero;
sNewValue = !bOldValue ? g_strOne : g_strZero;
}
@@ -1234,7 +1234,7 @@ void OSelectionBrowseBox::PaintCell(OutputDevice& rDev, const Rectangle& rRect,
long nRow = GetRealRow(m_nSeekRow);
if (nRow == BROW_VIS_ROW)
- PaintTristate(rDev, rRect, pEntry->IsVisible() ? STATE_CHECK : STATE_NOCHECK);
+ PaintTristate(rDev, rRect, pEntry->IsVisible() ? TRISTATE_TRUE : TRISTATE_FALSE);
else
rDev.DrawText(rRect, GetCellText(nRow, nColumnId),TEXT_DRAW_VCENTER);
@@ -2699,7 +2699,7 @@ Reference< XAccessible > OSelectionBrowseBox::CreateAccessibleCell( sal_Int32 _n
pEntry = getFields()[_nColumnPos - 1];
if ( _nRow == BROW_VIS_ROW && pEntry.is() )
- return EditBrowseBox::CreateAccessibleCheckBoxCell( _nRow, _nColumnPos,pEntry->IsVisible() ? STATE_CHECK : STATE_NOCHECK );
+ return EditBrowseBox::CreateAccessibleCheckBoxCell( _nRow, _nColumnPos,pEntry->IsVisible() ? TRISTATE_TRUE : TRISTATE_FALSE );
return EditBrowseBox::CreateAccessibleCell( _nRow, _nColumnPos );
}