diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-24 12:25:02 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-02-24 12:27:32 +0100 |
commit | 33740b7d5abb8aca34692fbdaa787b26a60652a9 (patch) | |
tree | ad2574a7850e2aa8ac18eaff89f4a85567896692 /sfx2 | |
parent | offapi: document the 4 new properties which are no longer read-only (diff) | |
download | core-33740b7d5abb8aca34692fbdaa787b26a60652a9.tar.gz core-33740b7d5abb8aca34692fbdaa787b26a60652a9.zip |
Replace exisiting TriState, AutoState with more generic TriState
Change-Id: Ida05478aae5a379775c671e0c2f2851d820d78be
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/dialog/itemconnect.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/toolbox/tbxitem.cxx | 8 |
5 files changed, 14 insertions, 14 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 3288f4d82f11..c34db4a516ef 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -955,7 +955,7 @@ sal_Bool SfxDocumentPage::FillItemSet( SfxItemSet& rSet ) if ( pExpSet && SFX_ITEM_SET == pExpSet->GetItemState( SID_DOCINFO, true, &pItem ) ) { SfxDocumentInfoItem* m_pInfoItem = (SfxDocumentInfoItem*)pItem; - sal_Bool bUseData = ( STATE_CHECK == m_pUseUserDataCB->GetState() ); + sal_Bool bUseData = ( TRISTATE_TRUE == m_pUseUserDataCB->GetState() ); m_pInfoItem->SetUseUserData( bUseData ); rSet.Put( SfxDocumentInfoItem( *m_pInfoItem ) ); bRet = sal_True; @@ -974,8 +974,8 @@ sal_Bool SfxDocumentPage::FillItemSet( SfxItemSet& rSet ) newItem.resetUserData( bUseAuthor ? SvtUserOptions().GetFullName() : OUString() ); - m_pInfoItem->SetUseUserData( STATE_CHECK == m_pUseUserDataCB->GetState() ); - newItem.SetUseUserData( STATE_CHECK == m_pUseUserDataCB->GetState() ); + m_pInfoItem->SetUseUserData( TRISTATE_TRUE == m_pUseUserDataCB->GetState() ); + newItem.SetUseUserData( TRISTATE_TRUE == m_pUseUserDataCB->GetState() ); newItem.SetDeleteUserData( sal_True ); rSet.Put( newItem ); @@ -1117,7 +1117,7 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet ) TriState eState = (TriState)m_bUseUserData; - if ( STATE_DONTKNOW == eState ) + if ( TRISTATE_INDET == eState ) m_pUseUserDataCB->EnableTriState( true ); m_pUseUserDataCB->SetState( eState ); diff --git a/sfx2/source/dialog/itemconnect.cxx b/sfx2/source/dialog/itemconnect.cxx index aae7b16c2771..65ff99133b28 100644 --- a/sfx2/source/dialog/itemconnect.cxx +++ b/sfx2/source/dialog/itemconnect.cxx @@ -35,7 +35,7 @@ namespace { TriState lclConvertToTriState( bool bKnown, bool bIsKnownFlag, bool bIsUnknownFlag ) { - return (bKnown && bIsKnownFlag) ? STATE_CHECK : ((!bKnown && bIsUnknownFlag) ? STATE_NOCHECK : STATE_DONTKNOW); + return (bKnown && bIsKnownFlag) ? TRISTATE_TRUE : ((!bKnown && bIsUnknownFlag) ? TRISTATE_FALSE : TRISTATE_INDET); } } // namespace @@ -114,13 +114,13 @@ CheckBoxWrapper::CheckBoxWrapper( CheckBox& rCheckBox ) : bool CheckBoxWrapper::IsControlDontKnow() const { - return GetControl().GetState() == STATE_DONTKNOW; + return GetControl().GetState() == TRISTATE_INDET; } void CheckBoxWrapper::SetControlDontKnow( bool bSet ) { GetControl().EnableTriState( bSet ); - GetControl().SetState( bSet ? STATE_DONTKNOW : STATE_NOCHECK ); + GetControl().SetState( bSet ? TRISTATE_INDET : TRISTATE_FALSE ); } sal_Bool CheckBoxWrapper::GetControlValue() const diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index c5feb4f0e755..54d09f7bcbf8 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -2682,9 +2682,9 @@ sal_Bool SfxTemplateDialog_Impl::IsCheckedItem(sal_uInt16 nMesId) switch(nMesId) { case SID_STYLE_WATERCAN : - return m_aActionTbR.GetItemState(SID_STYLE_WATERCAN)==STATE_CHECK; + return m_aActionTbR.GetItemState(SID_STYLE_WATERCAN)==TRISTATE_TRUE; default: - return m_aActionTbL.GetItemState(nMesId)==STATE_CHECK; + return m_aActionTbL.GetItemState(nMesId)==TRISTATE_TRUE; } } diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index d7899eea2bd8..a853a33bd12a 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -1055,7 +1055,7 @@ void SfxTemplateManagerDlg::OnTemplateSearch () bool bVisible = mpSearchEdit->IsVisible(); mpActionBar->SetItemState(mpActionBar->GetItemId(ACTIONBAR_SEARCH), - bVisible? STATE_NOCHECK: STATE_CHECK); + bVisible? TRISTATE_FALSE: TRISTATE_TRUE); // fdo#74782 We are switching views. No matter to which state, // deselect and hide our current SearchView items. diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index efaeed328b08..b13603ec1764 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -929,7 +929,7 @@ void SfxToolBoxControl::StateChanged sal_uInt16 nItemBits = pImpl->pBox->GetItemBits( GetId() ); nItemBits &= ~TIB_CHECKABLE; - ::TriState eTri = STATE_NOCHECK; + ::TriState eTri = TRISTATE_FALSE; switch ( eState ) { case SFX_ITEM_AVAILABLE: @@ -938,7 +938,7 @@ void SfxToolBoxControl::StateChanged { // BoolItem for checking if ( ((const SfxBoolItem*)pState)->GetValue() ) - eTri = STATE_CHECK; + eTri = TRISTATE_TRUE; nItemBits |= TIB_CHECKABLE; } else if ( pState->ISA(SfxEnumItemInterface) && @@ -946,7 +946,7 @@ void SfxToolBoxControl::StateChanged { // EnumItem is handled as Bool if ( ((const SfxEnumItemInterface *)pState)->GetBoolValue() ) - eTri = STATE_CHECK; + eTri = TRISTATE_TRUE; nItemBits |= TIB_CHECKABLE; } else if ( pImpl->bShowString && pState->ISA(SfxStringItem) ) @@ -956,7 +956,7 @@ void SfxToolBoxControl::StateChanged case SFX_ITEM_DONTCARE: { - eTri = STATE_DONTKNOW; + eTri = TRISTATE_INDET; nItemBits |= TIB_CHECKABLE; } } |