diff options
author | Mathias Bauer <mba@openoffice.org> | 2011-02-08 11:49:29 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2011-02-08 11:49:29 +0100 |
commit | e945e89a1aa7c6f8d84197244911aab0ae6be9a6 (patch) | |
tree | c55f11d4238bdf2e75795b47576cbf226bb9f4b9 /cui/source/options | |
parent | b2b747f8ab65f05ff55c5277d7c88f8b4735eba7 (diff) | |
parent | 1915cec6a9c84c0d0a16e69b81b9ab136d3b0277 (diff) |
CWS gnumake3: pull in cws removetooltypes01
Diffstat (limited to 'cui/source/options')
47 files changed, 915 insertions, 915 deletions
diff --git a/cui/source/options/cfgchart.cxx b/cui/source/options/cfgchart.cxx index d15b2ca80..43909637d 100644 --- a/cui/source/options/cfgchart.cxx +++ b/cui/source/options/cfgchart.cxx @@ -171,7 +171,7 @@ bool SvxChartColorTable::operator==( const SvxChartColorTable & _rOther ) const SvxChartOptions::SvxChartOptions() : ::utl::ConfigItem( rtl::OUString::createFromAscii( "Office.Chart" )), - mbIsInitialized( FALSE ) + mbIsInitialized( sal_False ) { maPropertyNames.realloc( 1 ); maPropertyNames[ 0 ] = ::rtl::OUString::createFromAscii( "DefaultColor/Series" ); @@ -194,7 +194,7 @@ void SvxChartOptions::SetDefaultColors( const SvxChartColorTable& aCol ) SetModified(); } -BOOL SvxChartOptions::RetrieveOptions() +sal_Bool SvxChartOptions::RetrieveOptions() { // get sequence containing all properties @@ -235,9 +235,9 @@ BOOL SvxChartOptions::RetrieveOptions() maDefColors.append( XColorEntry( aCol, aName )); } - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } void SvxChartOptions::Commit() @@ -271,7 +271,7 @@ void SvxChartOptions::Notify( const com::sun::star::uno::Sequence< rtl::OUString // class SvxChartColorTableItem // -------------------- -SvxChartColorTableItem::SvxChartColorTableItem( USHORT nWhich_, const SvxChartColorTable& aTable ) : +SvxChartColorTableItem::SvxChartColorTableItem( sal_uInt16 nWhich_, const SvxChartColorTable& aTable ) : SfxPoolItem( nWhich_ ), m_aColorTable( aTable ) { diff --git a/cui/source/options/cfgchart.hxx b/cui/source/options/cfgchart.hxx index 4c320a176..8da172067 100644 --- a/cui/source/options/cfgchart.hxx +++ b/cui/source/options/cfgchart.hxx @@ -70,14 +70,14 @@ class SvxChartOptions : public ::utl::ConfigItem { private: SvxChartColorTable maDefColors; - BOOL mbIsInitialized; + sal_Bool mbIsInitialized; ::com::sun::star::uno::Sequence< ::rtl::OUString > maPropertyNames; inline ::com::sun::star::uno::Sequence< ::rtl::OUString > GetPropertyNames() const { return maPropertyNames; } - BOOL RetrieveOptions(); + sal_Bool RetrieveOptions(); public: SvxChartOptions(); @@ -97,7 +97,7 @@ class SvxChartColorTableItem : public SfxPoolItem { public: TYPEINFO(); - SvxChartColorTableItem( USHORT nWhich, const SvxChartColorTable& ); + SvxChartColorTableItem( sal_uInt16 nWhich, const SvxChartColorTable& ); SvxChartColorTableItem( const SvxChartColorTableItem& ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx index 269fd24de..cdd0e861d 100644 --- a/cui/source/options/connpooloptions.cxx +++ b/cui/source/options/connpooloptions.cxx @@ -65,7 +65,7 @@ namespace offapp virtual void Init(); void Update(const DriverPoolingSettings& _rSettings); - virtual String GetCellText( long nRow, USHORT nColId ) const; + virtual String GetCellText( long nRow, sal_uInt16 nColId ) const; // the handler will be called with a DriverPoolingSettings::const_iterator as parameter, // or NULL if no valid current row exists @@ -82,13 +82,13 @@ namespace offapp sal_Bool isModified() const; protected: - virtual void InitController( ::svt::CellControllerRef& rController, long nRow, USHORT nCol ); - virtual ::svt::CellController* GetController( long nRow, USHORT nCol ); + virtual void InitController( ::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol ); + virtual ::svt::CellController* GetController( long nRow, sal_uInt16 nCol ); - virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, USHORT nColId ) const; + virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId ) const; - virtual BOOL SeekRow( long nRow ); - virtual BOOL SaveModified(); + virtual sal_Bool SeekRow( long nRow ); + virtual sal_Bool SaveModified(); virtual sal_Bool IsTabAllowed(sal_Bool _bForward) const; @@ -97,7 +97,7 @@ namespace offapp virtual void CursorMoved(); protected: - virtual sal_uInt32 GetTotalCellWidth(long nRow, USHORT nColId); + virtual sal_uInt32 GetTotalCellWidth(long nRow, sal_uInt16 nColId); private: @@ -216,7 +216,7 @@ namespace offapp } //-------------------------------------------------------------------- - sal_uInt32 DriverListControl::GetTotalCellWidth(long nRow, USHORT nColId) + sal_uInt32 DriverListControl::GetTotalCellWidth(long nRow, sal_uInt16 nColId) { return GetDataWindow().GetTextWidth(GetCellText(nRow, nColId)); } @@ -254,7 +254,7 @@ namespace offapp } //-------------------------------------------------------------------- - String DriverListControl::GetCellText( long nRow, USHORT nColId ) const + String DriverListControl::GetCellText( long nRow, sal_uInt16 nColId ) const { String sReturn; if (nRow > m_aSettings.size()) @@ -269,25 +269,25 @@ namespace offapp } //-------------------------------------------------------------------- - void DriverListControl::InitController( ::svt::CellControllerRef& rController, long nRow, USHORT nCol ) + void DriverListControl::InitController( ::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol ) { rController->GetWindow().SetText(GetCellText(nRow, nCol)); } //-------------------------------------------------------------------- - ::svt::CellController* DriverListControl::GetController( long /*nRow*/, USHORT /*nCol*/ ) + ::svt::CellController* DriverListControl::GetController( long /*nRow*/, sal_uInt16 /*nCol*/ ) { return NULL; } //-------------------------------------------------------------------- - BOOL DriverListControl::SaveModified() + sal_Bool DriverListControl::SaveModified() { - return TRUE; + return sal_True; } //-------------------------------------------------------------------- - BOOL DriverListControl::SeekRow( long _nRow ) + sal_Bool DriverListControl::SeekRow( long _nRow ) { DriverListControl_Base::SeekRow(_nRow); @@ -300,7 +300,7 @@ namespace offapp } //-------------------------------------------------------------------- - void DriverListControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, USHORT nColId ) const + void DriverListControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId ) const { OSL_ENSURE(m_aSeekRow != m_aSettings.end(), "DriverListControl::PaintCell: invalid row!"); @@ -399,7 +399,7 @@ namespace offapp } //-------------------------------------------------------------------- - BOOL ConnectionPoolOptionsPage::FillItemSet(SfxItemSet& _rSet) + sal_Bool ConnectionPoolOptionsPage::FillItemSet(SfxItemSet& _rSet) { commitTimeoutField(); diff --git a/cui/source/options/connpooloptions.hxx b/cui/source/options/connpooloptions.hxx index 09b065337..2439afe75 100644 --- a/cui/source/options/connpooloptions.hxx +++ b/cui/source/options/connpooloptions.hxx @@ -70,7 +70,7 @@ namespace offapp protected: virtual long Notify( NotifyEvent& _rNEvt ); - virtual BOOL FillItemSet(SfxItemSet& _rSet); + virtual sal_Bool FillItemSet(SfxItemSet& _rSet); virtual void Reset(const SfxItemSet& _rSet); virtual void ActivatePage( const SfxItemSet& _rSet); diff --git a/cui/source/options/cuisrchdlg.cxx b/cui/source/options/cuisrchdlg.cxx index 2dab110b6..154bf93f2 100644 --- a/cui/source/options/cuisrchdlg.cxx +++ b/cui/source/options/cuisrchdlg.cxx @@ -64,14 +64,14 @@ SvxJSearchOptionsDialog::SvxJSearchOptionsDialog( Window *pParent, - const SfxItemSet& rOptionsSet, INT32 nInitialFlags ) : + const SfxItemSet& rOptionsSet, sal_Int32 nInitialFlags ) : SfxSingleTabDialog ( pParent, rOptionsSet, RID_SVXPAGE_JSEARCH_OPTIONS ), nInitialTlFlags( nInitialFlags ) { pPage = (SvxJSearchOptionsPage *) SvxJSearchOptionsPage::Create( this, rOptionsSet ); SetTabPage( pPage ); //! implicitly calls pPage->Reset(...)! - pPage->EnableSaveOptions( FALSE ); + pPage->EnableSaveOptions( sal_False ); } @@ -88,7 +88,7 @@ void SvxJSearchOptionsDialog::Activate() } -INT32 SvxJSearchOptionsDialog::GetTransliterationFlags() const +sal_Int32 SvxJSearchOptionsDialog::GetTransliterationFlags() const { return pPage->GetTransliterationFlags(); } diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index 987055f93..48484da99 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -129,7 +129,7 @@ DbRegistrationOptionsPage::DbRegistrationOptionsPage( Window* pParent, const Sfx pPathBox ( NULL ), m_pCurEntry ( NULL ), m_nOldCount ( 0 ), - m_bModified ( FALSE ) + m_bModified ( sal_False ) { m_aNew.SetClickHdl( LINK( this, DbRegistrationOptionsPage, NewHdl ) ); m_aEdit.SetClickHdl( LINK( this, DbRegistrationOptionsPage, EditHdl ) ); @@ -186,7 +186,7 @@ DbRegistrationOptionsPage::~DbRegistrationOptionsPage() aPathCtrl.SetFocusControl( NULL ); pHeaderBar->Hide(); - for ( USHORT i = 0; i < pPathBox->GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < pPathBox->GetEntryCount(); ++i ) delete static_cast< DatabaseRegistration* >( pPathBox->GetEntry(i)->GetUserData() ); delete pPathBox; delete pHeaderBar; @@ -202,13 +202,13 @@ SfxTabPage* DbRegistrationOptionsPage::Create( Window* pParent, // ----------------------------------------------------------------------- -BOOL DbRegistrationOptionsPage::FillItemSet( SfxItemSet& rCoreSet ) +sal_Bool DbRegistrationOptionsPage::FillItemSet( SfxItemSet& rCoreSet ) { // the settings for the single drivers sal_Bool bModified = sal_False; DatabaseRegistrations aRegistrations; - ULONG nCount = pPathBox->GetEntryCount(); - for ( ULONG i = 0; i < nCount; ++i ) + sal_uLong nCount = pPathBox->GetEntryCount(); + for ( sal_uLong i = 0; i < nCount; ++i ) { SvLBoxEntry* pEntry = pPathBox->GetEntry(i); DatabaseRegistration* pRegistration = static_cast< DatabaseRegistration* >( pEntry->GetUserData() ); @@ -256,7 +256,7 @@ void DbRegistrationOptionsPage::Reset( const SfxItemSet& rSet ) pHeaderBar->SetItemSize( ITEMID_TYPE, aUserData.GetToken(0).ToInt32() ); HeaderEndDrag_Impl( NULL ); // Sortierrichtung restaurieren - BOOL bUp = (BOOL)(USHORT)aUserData.GetToken(1).ToInt32(); + sal_Bool bUp = (sal_Bool)(sal_uInt16)aUserData.GetToken(1).ToInt32(); HeaderBarItemBits nBits = pHeaderBar->GetItemBits(ITEMID_TYPE); if ( bUp ) @@ -281,7 +281,7 @@ void DbRegistrationOptionsPage::FillUserData() String aUserData = String::CreateFromInt32( pHeaderBar->GetItemSize( ITEMID_TYPE ) ); aUserData += ';'; HeaderBarItemBits nBits = pHeaderBar->GetItemBits( ITEMID_TYPE ); - BOOL bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); + sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); aUserData += bUp ? '1' : '0'; SetUserData( aUserData ); } @@ -334,7 +334,7 @@ IMPL_LINK( DbRegistrationOptionsPage, HeaderSelect_Impl, HeaderBar*, pBar ) return 0; HeaderBarItemBits nBits = pHeaderBar->GetItemBits(ITEMID_TYPE); - BOOL bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); + sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); SvSortMode eMode = SortAscending; if ( bUp ) @@ -365,7 +365,7 @@ IMPL_LINK( DbRegistrationOptionsPage, HeaderEndDrag_Impl, HeaderBar*, pBar ) if ( !pHeaderBar->IsItemMode() ) { Size aSz; - USHORT nTabs = pHeaderBar->GetItemCount(); + sal_uInt16 nTabs = pHeaderBar->GetItemCount(); long nTmpSz = 0; long nWidth = pHeaderBar->GetItemSize(ITEMID_TYPE); long nBarWidth = pHeaderBar->GetSizePixel().Width(); @@ -375,7 +375,7 @@ IMPL_LINK( DbRegistrationOptionsPage, HeaderEndDrag_Impl, HeaderBar*, pBar ) else if ( ( nBarWidth - nWidth ) < TAB_WIDTH_MIN ) pHeaderBar->SetItemSize( ITEMID_TYPE, nBarWidth - TAB_WIDTH_MIN ); - for ( USHORT i = 1; i <= nTabs; ++i ) + for ( sal_uInt16 i = 1; i <= nTabs; ++i ) { long _nWidth = pHeaderBar->GetItemSize(i); aSz.Width() = _nWidth + nTmpSz; @@ -453,8 +453,8 @@ IMPL_LINK( DbRegistrationOptionsPage, NameValidator, String*, _pName ) { if ( _pName ) { - ULONG nCount = pPathBox->GetEntryCount(); - for ( ULONG i = 0; i < nCount; ++i ) + sal_uLong nCount = pPathBox->GetEntryCount(); + for ( sal_uLong i = 0; i < nCount; ++i ) { SvLBoxEntry* pEntry = pPathBox->GetEntry(i); if ( (!m_pCurEntry || m_pCurEntry != pEntry) && pPathBox->GetEntryText(pEntry,0) == *_pName ) diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx index c8cf56bc6..cd6dae8e8 100644 --- a/cui/source/options/fontsubs.cxx +++ b/cui/source/options/fontsubs.cxx @@ -85,7 +85,7 @@ SvxFontSubstTabPage::SvxFontSubstTabPage( Window* pParent, aTextColor = aCheckLB.GetTextColor(); - for(USHORT k = 0; k < aNewDelTBX.GetItemCount(); k++) + for(sal_uInt16 k = 0; k < aNewDelTBX.GetItemCount(); k++) aNewDelTBX.SetItemImage(aNewDelTBX.GetItemId(k), aImageList.GetImage(aNewDelTBX.GetItemId(k))); @@ -146,7 +146,7 @@ SvxFontSubstTabPage::SvxFontSubstTabPage( Window* pParent, pBar->SetItemBits(1, nBits); pBar->SetItemBits(2, nBits); - USHORT nHeight; + sal_uInt16 nHeight; for(nHeight = 6; nHeight <= 16; nHeight++) aFontHeightLB.InsertEntry(String::CreateFromInt32(nHeight)); for(nHeight = 18; nHeight <= 28; nHeight+= 2) @@ -211,7 +211,7 @@ SfxTabPage* SvxFontSubstTabPage::Create( Window* pParent, /* */ /*********************************************************************/ -BOOL SvxFontSubstTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxFontSubstTabPage::FillItemSet( SfxItemSet& ) { pConfig->ClearSubstitutions();// remove all entries @@ -242,7 +242,7 @@ BOOL SvxFontSubstTabPage::FillItemSet( SfxItemSet& ) sFontName = aFontNameLB.GetSelectEntry(); pSourceViewConfig->SetFontName(sFontName); - return FALSE; + return sal_False; } /*********************************************************************/ @@ -252,7 +252,7 @@ BOOL SvxFontSubstTabPage::FillItemSet( SfxItemSet& ) void SvxFontSubstTabPage::Reset( const SfxItemSet& ) { - aCheckLB.SetUpdateMode(FALSE); + aCheckLB.SetUpdateMode(sal_False); aCheckLB.Clear(); FontList aFntLst( Application::GetDefaultDevice() ); @@ -275,7 +275,7 @@ void SvxFontSubstTabPage::Reset( const SfxItemSet& ) } CheckEnable(); - aCheckLB.SetUpdateMode(TRUE); + aCheckLB.SetUpdateMode(sal_True); //fill font name box first aNonPropFontsOnlyCB.Check(pSourceViewConfig->IsShowProportionalFontsOnly()); @@ -302,7 +302,7 @@ IMPL_LINK(SvxFontSubstTabPage, SelectHdl, Window*, pWin) SvLBoxEntry* pEntry; // nCol ist behaemmerterweise die nCol'te Textspalte, werden nicht gezaehlt! // Daher als Spalte "0". - ULONG nPos = aCheckLB.GetEntryPos(aFont1CB.GetText(), 0); + sal_uLong nPos = aCheckLB.GetEntryPos(aFont1CB.GetText(), 0); switch (aNewDelTBX.GetCurItemId()) { @@ -323,7 +323,7 @@ IMPL_LINK(SvxFontSubstTabPage, SelectHdl, Window*, pWin) pEntry = CreateEntry(sFont1, sFont2); aCheckLB.Insert(pEntry); } - aCheckLB.SelectAll(FALSE); + aCheckLB.SelectAll(sal_False); aCheckLB.Select(pEntry); } break; @@ -358,7 +358,7 @@ IMPL_LINK(SvxFontSubstTabPage, SelectHdl, Window*, pWin) if (pWin == &aFont1CB) { - ULONG nPos = aCheckLB.GetEntryPos(aFont1CB.GetText(), 0); + sal_uLong nPos = aCheckLB.GetEntryPos(aFont1CB.GetText(), 0); if (nPos != 0xffffffff) { @@ -366,7 +366,7 @@ IMPL_LINK(SvxFontSubstTabPage, SelectHdl, Window*, pWin) if (pEntry != aCheckLB.FirstSelected()) { - aCheckLB.SelectAll(FALSE); + aCheckLB.SelectAll(sal_False); aCheckLB.Select(pEntry); } } @@ -382,12 +382,12 @@ IMPL_LINK(SvxFontSubstTabPage, SelectHdl, Window*, pWin) IMPL_LINK(SvxFontSubstTabPage, NonPropFontsHdl, CheckBox*, pBox) { String sFontName = aFontNameLB.GetSelectEntry(); - BOOL bNonPropOnly = pBox->IsChecked(); + sal_Bool bNonPropOnly = pBox->IsChecked(); aFontNameLB.Clear(); FontList aFntLst( Application::GetDefaultDevice() ); aFontNameLB.InsertEntry(sAutomatic); - USHORT nFontCount = aFntLst.GetFontNameCount(); - for(USHORT nFont = 0; nFont < nFontCount; nFont++) + sal_uInt16 nFontCount = aFntLst.GetFontNameCount(); + for(sal_uInt16 nFont = 0; nFont < nFontCount; nFont++) { const FontInfo& rInfo = aFntLst.GetFontName( nFont ); if(!bNonPropOnly || rInfo.GetPitch() == PITCH_FIXED) @@ -402,11 +402,11 @@ IMPL_LINK(SvxFontSubstTabPage, NonPropFontsHdl, CheckBox*, pBox) void SvxFontSubstTabPage::CheckEnable() { - BOOL bEnableAll = aUseTableCB.IsChecked(); + sal_Bool bEnableAll = aUseTableCB.IsChecked(); if (bEnableAll) { - BOOL bApply, bDelete; + sal_Bool bApply, bDelete; SvLBoxEntry* pEntry = aCheckLB.FirstSelected(); @@ -418,21 +418,21 @@ void SvxFontSubstTabPage::CheckEnable() aFont1CB.GetText() == aFont2CB.GetText() || aCheckLB.GetEntryPos(sEntry) != 0xffffffff || (pEntry != 0 && aCheckLB.NextSelected(pEntry) != 0)) - bApply = FALSE; + bApply = sal_False; else - bApply = TRUE;*/ + bApply = sal_True;*/ // Wegen OS/2-Optimierungsfehler (Bug #56267) etwas umstaendlicher: if (!aFont1CB.GetText().Len() || !aFont2CB.GetText().Len()) - bApply = FALSE; + bApply = sal_False; else if(aFont1CB.GetText() == aFont2CB.GetText()) - bApply = FALSE; + bApply = sal_False; else if(aCheckLB.GetEntryPos(sEntry) != 0xffffffff) - bApply = FALSE; + bApply = sal_False; else if(pEntry != 0 && aCheckLB.NextSelected(pEntry) != 0) - bApply = FALSE; + bApply = sal_False; else - bApply = TRUE; + bApply = sal_True; bDelete = pEntry != 0; @@ -457,7 +457,7 @@ void SvxFontSubstTabPage::CheckEnable() aCheckLB.DisableTable(); aCheckLB.SetTextColor(Color(COL_GRAY)); aCheckLB.Invalidate(); - aCheckLB.SelectAll(FALSE); + aCheckLB.SelectAll(sal_False); } } aNewDelTBX.Enable(bEnableAll); @@ -474,7 +474,7 @@ void SvxFontSubstTabPage::CheckEnable() void SvxFontSubstCheckListBox::SetTabs() { SvxSimpleTable::SetTabs(); - USHORT nAdjust = SV_LBOXTAB_ADJUST_RIGHT|SV_LBOXTAB_ADJUST_LEFT|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_ADJUST_NUMERIC|SV_LBOXTAB_FORCE; + sal_uInt16 nAdjust = SV_LBOXTAB_ADJUST_RIGHT|SV_LBOXTAB_ADJUST_LEFT|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_ADJUST_NUMERIC|SV_LBOXTAB_FORCE; SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject(1); pTab->nFlags &= ~nAdjust; @@ -492,8 +492,8 @@ void SvxFontSubstCheckListBox::KeyInput( const KeyEvent& rKEvt ) if(!rKEvt.GetKeyCode().GetModifier() && KEY_SPACE == rKEvt.GetKeyCode().GetCode()) { - ULONG nSelPos = GetModel()->GetAbsPos(GetCurEntry()); - USHORT nCol = GetCurrentTabPos() - 1; + sal_uLong nSelPos = GetModel()->GetAbsPos(GetCurEntry()); + sal_uInt16 nCol = GetCurrentTabPos() - 1; if ( nCol < 2 ) { CheckEntryPos( nSelPos, nCol, !IsChecked( nSelPos, nCol ) ); @@ -501,7 +501,7 @@ void SvxFontSubstCheckListBox::KeyInput( const KeyEvent& rKEvt ) } else { - USHORT nCheck = IsChecked(nSelPos, 1) ? 1 : 0; + sal_uInt16 nCheck = IsChecked(nSelPos, 1) ? 1 : 0; if(IsChecked(nSelPos, 0)) nCheck += 2; nCheck--; @@ -518,7 +518,7 @@ void SvxFontSubstCheckListBox::KeyInput( const KeyEvent& rKEvt ) /* */ /*********************************************************************/ -void SvxFontSubstCheckListBox::CheckEntryPos(ULONG nPos, USHORT nCol, BOOL bChecked) +void SvxFontSubstCheckListBox::CheckEntryPos(sal_uLong nPos, sal_uInt16 nCol, sal_Bool bChecked) { if ( nPos < GetEntryCount() ) SetCheckButtonState( @@ -532,7 +532,7 @@ void SvxFontSubstCheckListBox::CheckEntryPos(ULONG nPos, USHORT nCol, BOOL bChec /* */ /*********************************************************************/ -void SvxFontSubstCheckListBox::CheckEntry(SvLBoxEntry* pEntry, USHORT nCol, BOOL bChecked) +void SvxFontSubstCheckListBox::CheckEntry(SvLBoxEntry* pEntry, sal_uInt16 nCol, sal_Bool bChecked) { if ( pEntry ) SetCheckButtonState( @@ -546,7 +546,7 @@ void SvxFontSubstCheckListBox::CheckEntry(SvLBoxEntry* pEntry, USHORT nCol, BOOL /* */ /*********************************************************************/ -BOOL SvxFontSubstCheckListBox::IsChecked(ULONG nPos, USHORT nCol) +sal_Bool SvxFontSubstCheckListBox::IsChecked(sal_uLong nPos, sal_uInt16 nCol) { return GetCheckButtonState( GetEntry(nPos), nCol ) == SV_BUTTON_CHECKED; } @@ -555,7 +555,7 @@ BOOL SvxFontSubstCheckListBox::IsChecked(ULONG nPos, USHORT nCol) /* */ /*********************************************************************/ -BOOL SvxFontSubstCheckListBox::IsChecked(SvLBoxEntry* pEntry, USHORT nCol) +sal_Bool SvxFontSubstCheckListBox::IsChecked(SvLBoxEntry* pEntry, sal_uInt16 nCol) { return GetCheckButtonState( pEntry, nCol ) == SV_BUTTON_CHECKED; } @@ -564,7 +564,7 @@ BOOL SvxFontSubstCheckListBox::IsChecked(SvLBoxEntry* pEntry, USHORT nCol) /* */ /*********************************************************************/ -void SvxFontSubstCheckListBox::SetCheckButtonState( SvLBoxEntry* pEntry, USHORT nCol, SvButtonState eState) +void SvxFontSubstCheckListBox::SetCheckButtonState( SvLBoxEntry* pEntry, sal_uInt16 nCol, SvButtonState eState) { SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem(nCol + 1)); @@ -593,7 +593,7 @@ void SvxFontSubstCheckListBox::SetCheckButtonState( SvLBoxEntry* pEntry, USHORT /* */ /*********************************************************************/ -SvButtonState SvxFontSubstCheckListBox::GetCheckButtonState( SvLBoxEntry* pEntry, USHORT nCol ) const +SvButtonState SvxFontSubstCheckListBox::GetCheckButtonState( SvLBoxEntry* pEntry, sal_uInt16 nCol ) const { SvButtonState eState = SV_BUTTON_UNCHECKED; SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem(nCol + 1)); @@ -601,7 +601,7 @@ SvButtonState SvxFontSubstCheckListBox::GetCheckButtonState( SvLBoxEntry* pEntry if (((SvLBoxItem*)pItem)->IsA() == SV_ITEM_ID_LBOXBUTTON) { - USHORT nButtonFlags = pItem->GetButtonFlags(); + sal_uInt16 nButtonFlags = pItem->GetButtonFlags(); eState = pCheckButtonData->ConvertToButtonState( nButtonFlags ); } diff --git a/cui/source/options/fontsubs.hxx b/cui/source/options/fontsubs.hxx index 869d897ca..9fdb22a44 100644 --- a/cui/source/options/fontsubs.hxx +++ b/cui/source/options/fontsubs.hxx @@ -55,15 +55,15 @@ class SvxFontSubstCheckListBox : public SvxSimpleTable SvxFontSubstCheckListBox(Window* pParent, const ResId& rResId ) : SvxSimpleTable( pParent, rResId ){} - inline void *GetUserData(ULONG nPos) { return GetEntry(nPos)->GetUserData(); } - inline void SetUserData(ULONG nPos, void *pData ) { GetEntry(nPos)->SetUserData(pData); } - - BOOL IsChecked(ULONG nPos, USHORT nCol = 0); - BOOL IsChecked(SvLBoxEntry* pEntry, USHORT nCol = 0); - void CheckEntryPos(ULONG nPos, USHORT nCol, BOOL bChecked); - void CheckEntry(SvLBoxEntry* pEntry, USHORT nCol, BOOL bChecked); - SvButtonState GetCheckButtonState( SvLBoxEntry*, USHORT nCol ) const; - void SetCheckButtonState( SvLBoxEntry*, USHORT nCol, SvButtonState ); + inline void *GetUserData(sal_uLong nPos) { return GetEntry(nPos)->GetUserData(); } + inline void SetUserData(sal_uLong nPos, void *pData ) { GetEntry(nPos)->SetUserData(pData); } + + sal_Bool IsChecked(sal_uLong nPos, sal_uInt16 nCol = 0); + sal_Bool IsChecked(SvLBoxEntry* pEntry, sal_uInt16 nCol = 0); + void CheckEntryPos(sal_uLong nPos, sal_uInt16 nCol, sal_Bool bChecked); + void CheckEntry(SvLBoxEntry* pEntry, sal_uInt16 nCol, sal_Bool bChecked); + SvButtonState GetCheckButtonState( SvLBoxEntry*, sal_uInt16 nCol ) const; + void SetCheckButtonState( SvLBoxEntry*, sal_uInt16 nCol, SvButtonState ); }; // class SvxFontSubstTabPage ---------------------------------------------------- @@ -114,7 +114,7 @@ class SvxFontSubstTabPage : public SfxTabPage public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/cui/source/options/internationaloptions.cxx b/cui/source/options/internationaloptions.cxx index 38193432e..7eeb80580 100644 --- a/cui/source/options/internationaloptions.cxx +++ b/cui/source/options/internationaloptions.cxx @@ -48,14 +48,14 @@ namespace offapp CheckBox m_aCB_ShtVwRight2Left; CheckBox m_aCB_ShtVwCurrentDocOnly; - BOOL m_bEnable_SheetView_Opt : 1; + sal_Bool m_bEnable_SheetView_Opt : 1; inline IMPL( Window* _pParent ); - inline void EnableOption_SheetView( BOOL _bEnable = TRUE ); - void ShowOption_SheetView( BOOL _bShow = TRUE ); + inline void EnableOption_SheetView( sal_Bool _bEnable = sal_True ); + void ShowOption_SheetView( sal_Bool _bShow = sal_True ); - BOOL FillItemSet( SfxItemSet& _rSet ); + sal_Bool FillItemSet( SfxItemSet& _rSet ); void Reset( const SfxItemSet& _rSet ); }; @@ -67,12 +67,12 @@ namespace offapp ,m_aCB_ShtVwRight2Left ( _pParent, CUI_RES( CB_SHTVW_RIGHT2LEFT ) ) ,m_aCB_ShtVwCurrentDocOnly ( _pParent, CUI_RES( CB_SHTVW_CURRENTDOCONLY ) ) - ,m_bEnable_SheetView_Opt ( FALSE ) + ,m_bEnable_SheetView_Opt ( sal_False ) { ShowOption_SheetView( m_bEnable_SheetView_Opt ); } - inline void InternationalOptionsPage::IMPL::EnableOption_SheetView( BOOL _bEnable ) + inline void InternationalOptionsPage::IMPL::EnableOption_SheetView( sal_Bool _bEnable ) { if( m_bEnable_SheetView_Opt != _bEnable ) { @@ -82,14 +82,14 @@ namespace offapp } } - void InternationalOptionsPage::IMPL::ShowOption_SheetView( BOOL _bShow ) + void InternationalOptionsPage::IMPL::ShowOption_SheetView( sal_Bool _bShow ) { m_aFL_SheetView.Show( _bShow ); m_aCB_ShtVwRight2Left.Show( _bShow ); m_aCB_ShtVwCurrentDocOnly.Show( _bShow ); } - BOOL InternationalOptionsPage::IMPL::FillItemSet( SfxItemSet& _rSet ) + sal_Bool InternationalOptionsPage::IMPL::FillItemSet( SfxItemSet& _rSet ) { DBG_ASSERT( _rSet.GetPool(), "-InternationalOptionsPage::FillItemSet(): no pool gives rums!" ); @@ -103,7 +103,7 @@ namespace offapp // { // } - return TRUE; + return sal_True; } void InternationalOptionsPage::IMPL::Reset( const SfxItemSet& _rSet ) @@ -113,15 +113,15 @@ namespace offapp DBG_ASSERT( pLeft2RightItem, "+InternationalOptionsPage::Reset(): SID_ATTR_PARA_LEFT_TO_RIGHT not set!" ); - BOOL bLeft2Right = pLeft2RightItem? pLeft2RightItem->GetValue() : TRUE; + sal_Bool bLeft2Right = pLeft2RightItem? pLeft2RightItem->GetValue() : sal_True; m_aRB_TxtDirLeft2Right.Check( bLeft2Right ); // handling of SheetView stuff // if( m_bEnable_SheetView_Opt ) // { -// m_aCB_ShtVwRight2Left.Check( FALSE ); +// m_aCB_ShtVwRight2Left.Check( sal_False ); // -// m_aCB_ShtVwCurrentDocOnly.Check( FALSE ); +// m_aCB_ShtVwCurrentDocOnly.Check( sal_False ); // } } @@ -150,7 +150,7 @@ namespace offapp DELETEZ( m_pImpl ); } - BOOL InternationalOptionsPage::FillItemSet( SfxItemSet& _rSet ) + sal_Bool InternationalOptionsPage::FillItemSet( SfxItemSet& _rSet ) { return m_pImpl->FillItemSet( _rSet ); } diff --git a/cui/source/options/optHeaderTabListbox.cxx b/cui/source/options/optHeaderTabListbox.cxx index 07d3e9baa..5660719d4 100644 --- a/cui/source/options/optHeaderTabListbox.cxx +++ b/cui/source/options/optHeaderTabListbox.cxx @@ -40,15 +40,15 @@ namespace svx class OptLBoxString_Impl : public SvLBoxString { public: - OptLBoxString_Impl( SvLBoxEntry* pEntry, USHORT nFlags, const String& rTxt ) : + OptLBoxString_Impl( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rTxt ) : SvLBoxString( pEntry, nFlags, rTxt ) {} - virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, SvLBoxEntry* pEntry ); + virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry ); }; // ----------------------------------------------------------------------- -void OptLBoxString_Impl::Paint( const Point& rPos, SvLBox& rDev, USHORT, SvLBoxEntry* pEntry ) +void OptLBoxString_Impl::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16, SvLBoxEntry* pEntry ) { Font aOldFont( rDev.GetFont() ); Font aFont( aOldFont ); @@ -73,9 +73,9 @@ void OptHeaderTabListBox::InitEntry( SvLBoxEntry* pEntry, const XubString& rTxt, SvLBoxButtonKind eButtonKind ) { SvTabListBox::InitEntry( pEntry, rTxt, rImg1, rImg2, eButtonKind ); - USHORT _nTabCount = TabCount(); + sal_uInt16 _nTabCount = TabCount(); - for ( USHORT nCol = 1; nCol < _nTabCount; ++nCol ) + for ( sal_uInt16 nCol = 1; nCol < _nTabCount; ++nCol ) { // alle Spalten mit eigener Klasse initialisieren (Spalte 0 == Bitmap) SvLBoxString* pCol = (SvLBoxString*)pEntry->GetItem( nCol ); diff --git a/cui/source/options/optaccessibility.cxx b/cui/source/options/optaccessibility.cxx index 8ad8cf796..2efb796bb 100644 --- a/cui/source/options/optaccessibility.cxx +++ b/cui/source/options/optaccessibility.cxx @@ -123,7 +123,7 @@ SfxTabPage* SvxAccessibilityOptionsTabPage::Create( Window* pParent, const SfxIt return new SvxAccessibilityOptionsTabPage(pParent, rAttrSet); } -BOOL SvxAccessibilityOptionsTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxAccessibilityOptionsTabPage::FillItemSet( SfxItemSet& ) { //aConfig.Set... from controls @@ -148,7 +148,7 @@ BOOL SvxAccessibilityOptionsTabPage::FillItemSet( SfxItemSet& ) Application::MergeSystemSettings( aAllSettings ); Application::SetSettings(aAllSettings); - return FALSE; + return sal_False; } void SvxAccessibilityOptionsTabPage::Reset( const SfxItemSet& ) diff --git a/cui/source/options/optaccessibility.hxx b/cui/source/options/optaccessibility.hxx index 007fd3110..9fbda69e7 100644 --- a/cui/source/options/optaccessibility.hxx +++ b/cui/source/options/optaccessibility.hxx @@ -57,7 +57,7 @@ public: virtual ~SvxAccessibilityOptionsTabPage(); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx index 84dcecf11..5793663f7 100644 --- a/cui/source/options/optasian.cxx +++ b/cui/source/options/optasian.cxx @@ -175,7 +175,7 @@ SvxAsianLayoutPage::SvxAsianLayoutPage( Window* pParent, const SfxItemSet& rSet aStartED.SetModifyHdl(aLk); aEndED.SetModifyHdl(aLk); - aLanguageLB.SetLanguageList( LANG_LIST_FBD_CHARS, FALSE, FALSE ); + aLanguageLB.SetLanguageList( LANG_LIST_FBD_CHARS, sal_False, sal_False ); } /*-- 09.01.01 13:29:02--------------------------------------------------- @@ -194,7 +194,7 @@ SfxTabPage* SvxAsianLayoutPage::Create( Window* pParent, const SfxItemSet& rAttr /*-- 09.01.01 13:29:03--------------------------------------------------- -----------------------------------------------------------------------*/ -BOOL SvxAsianLayoutPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxAsianLayoutPage::FillItemSet( SfxItemSet& ) { if(aCharKerningRB.IsChecked() != aCharKerningRB.GetSavedValue()) { @@ -203,7 +203,7 @@ BOOL SvxAsianLayoutPage::FillItemSet( SfxItemSet& ) if(pImpl->xPrSetInfo.is() && pImpl->xPrSetInfo->hasPropertyByName(sPunct)) { Any aVal; - BOOL bVal = !aCharKerningRB.IsChecked(); + sal_Bool bVal = !aCharKerningRB.IsChecked(); aVal.setValue(&bVal, ::getBooleanCppuType()); pImpl->xPrSet->setPropertyValue(sPunct, aVal); } @@ -232,9 +232,9 @@ BOOL SvxAsianLayoutPage::FillItemSet( SfxItemSet& ) for( SvxForbiddenChars_Impl* pElem = pImpl->aChangedLanguagesTbl.First(); pElem; pElem = pImpl->aChangedLanguagesTbl.Next() ) { - ULONG nLang = pImpl->aChangedLanguagesTbl.GetKey( pElem ); + sal_uLong nLang = pImpl->aChangedLanguagesTbl.GetKey( pElem ); Locale aLocale; - SvxLanguageToLocale(aLocale, (USHORT)nLang ); + SvxLanguageToLocale(aLocale, (sal_uInt16)nLang ); if(pElem->bRemoved) pImpl->xForbidden->removeForbiddenCharacters( aLocale ); else if(pElem->pCharacters) @@ -248,7 +248,7 @@ BOOL SvxAsianLayoutPage::FillItemSet( SfxItemSet& ) } eLastUsedLanguageTypeForForbiddenCharacters = aLanguageLB.GetSelectLanguage(); - return FALSE; + return sal_False; } /*-- 09.01.01 13:29:03--------------------------------------------------- @@ -293,20 +293,20 @@ void SvxAsianLayoutPage::Reset( const SfxItemSet& ) } else { - aStartEndGB.Enable(FALSE); - aLanguageFT.Enable(FALSE); - aLanguageLB.Enable(FALSE); - aStandardCB.Enable(FALSE); - aStartFT.Enable(FALSE); - aStartED.Enable(FALSE); - aEndFT.Enable(FALSE); - aEndED.Enable(FALSE); - aHintFT.Enable(FALSE); + aStartEndGB.Enable(sal_False); + aLanguageFT.Enable(sal_False); + aLanguageLB.Enable(sal_False); + aStandardCB.Enable(sal_False); + aStartFT.Enable(sal_False); + aStartED.Enable(sal_False); + aEndFT.Enable(sal_False); + aEndED.Enable(sal_False); + aHintFT.Enable(sal_False); } if(bKernWesternText) - aCharKerningRB.Check(TRUE); + aCharKerningRB.Check(sal_True); else - aCharPunctKerningRB.Check(TRUE); + aCharPunctKerningRB.Check(sal_True); switch(nCompress) { case 0 : aNoCompressionRB.Check(); break; @@ -359,7 +359,7 @@ IMPL_LINK(SvxAsianLayoutPage, LanguageHdl, SvxLanguageBox*, EMPTYARG ) SvxForbiddenChars_Impl* pElement = pImpl->getForbiddenCharacters(eSelectLanguage); if(pElement->bRemoved || !pElement->pCharacters) { - bAvail = FALSE; + bAvail = sal_False; } else { @@ -459,9 +459,9 @@ IMPL_LINK(SvxAsianLayoutPage, ModifyHdl, Edit*, pEdit) /*-- 07.09.2007 12:05:09--------------------------------------------------- -----------------------------------------------------------------------*/ -USHORT* SvxAsianLayoutPage::GetRanges() +sal_uInt16* SvxAsianLayoutPage::GetRanges() { //no items are used - static USHORT pAsianLayoutRanges[] = { 0 }; + static sal_uInt16 pAsianLayoutRanges[] = { 0 }; return pAsianLayoutRanges; } diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx index c91efb1b0..f4c02ae1e 100644 --- a/cui/source/options/optchart.cxx +++ b/cui/source/options/optchart.cxx @@ -40,13 +40,13 @@ void ChartColorLB::FillBox( const SvxChartColorTable & rTab ) { long nCount = rTab.size(); - SetUpdateMode( FALSE ); + SetUpdateMode( sal_False ); for( long i = 0; i < nCount; i++ ) { Append( const_cast< XColorEntry * >( & rTab[ i ] )); } - SetUpdateMode( TRUE ); + SetUpdateMode( sal_True ); } @@ -80,7 +80,7 @@ SvxDefaultColorOptPage::SvxDefaultColorOptPage( Window* pParent, const SfxItemSe pColorTab = new XColorTable( SvtPathOptions().GetPalettePath() ); const SfxPoolItem* pItem = NULL; - if ( rInAttrs.GetItemState( SID_SCH_EDITOPTIONS, FALSE, &pItem ) == SFX_ITEM_SET ) + if ( rInAttrs.GetItemState( SID_SCH_EDITOPTIONS, sal_False, &pItem ) == SFX_ITEM_SET ) { pColorConfig = SAL_STATIC_CAST( SvxChartColorTableItem*, pItem->Clone() ); } @@ -123,12 +123,12 @@ SfxTabPage* __EXPORT SvxDefaultColorOptPage::Create( Window* pParent, const SfxI return new SvxDefaultColorOptPage( pParent, rAttrs ); } -BOOL __EXPORT SvxDefaultColorOptPage::FillItemSet( SfxItemSet& rOutAttrs ) +sal_Bool __EXPORT SvxDefaultColorOptPage::FillItemSet( SfxItemSet& rOutAttrs ) { if( pColorConfig ) rOutAttrs.Put( *SAL_STATIC_CAST( SfxPoolItem*, pColorConfig )); - return TRUE; + return sal_True; } void __EXPORT SvxDefaultColorOptPage::Reset( const SfxItemSet& ) @@ -147,7 +147,7 @@ void SvxDefaultColorOptPage::FillColorBox() for( long i = 0; i < nCount; i++ ) { pColorEntry = pColorTab->GetColor( i ); - aValSetColorBox.InsertItem( (USHORT) i + 1, pColorEntry->GetColor(), pColorEntry->GetName() ); + aValSetColorBox.InsertItem( (sal_uInt16) i + 1, pColorEntry->GetColor(), pColorEntry->GetName() ); } } @@ -208,7 +208,7 @@ IMPL_LINK( SvxDefaultColorOptPage, ListClickedHdl, ChartColorLB*, pColorList ) } else { - aValSetColorBox.SelectItem( (USHORT)nIndex + 1 ); // ValueSet is 1-based + aValSetColorBox.SelectItem( (sal_uInt16)nIndex + 1 ); // ValueSet is 1-based } return 0L; @@ -219,7 +219,7 @@ IMPL_LINK( SvxDefaultColorOptPage, ListClickedHdl, ChartColorLB*, pColorList ) IMPL_LINK( SvxDefaultColorOptPage, BoxClickedHdl, ValueSet*, EMPTYARG ) { - USHORT nIdx = aLbChartColors.GetSelectEntryPos(); + sal_uInt16 nIdx = aLbChartColors.GetSelectEntryPos(); if( nIdx != LISTBOX_ENTRY_NOTFOUND ) { XColorEntry aEntry( aValSetColorBox.GetItemColor( aValSetColorBox.GetSelectItemId() ), diff --git a/cui/source/options/optchart.hxx b/cui/source/options/optchart.hxx index 76709aac6..fef09fc30 100644 --- a/cui/source/options/optchart.hxx +++ b/cui/source/options/optchart.hxx @@ -81,7 +81,7 @@ public: void Construct(); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rInAttrs ); - virtual BOOL FillItemSet( SfxItemSet& rOutAttrs ); + virtual sal_Bool FillItemSet( SfxItemSet& rOutAttrs ); virtual void Reset( const SfxItemSet& rInAttrs ); }; diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index 07c61d133..173d4057e 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -866,13 +866,13 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rRe } } Color aTextColor; - BOOL bSetTextColor = FALSE; + sal_Bool bSetTextColor = sal_False; //#104195# when the window color is the same as the text color it has to be changed Color aWinCol = rStyleSettings.GetWindowColor(); Color aRCheckCol = rStyleSettings.GetRadioCheckTextColor(); if(aWinCol == aRCheckCol ) { - bSetTextColor = TRUE; + bSetTextColor = sal_True; aRCheckCol.Invert(); //if inversion didn't work (gray) then it's set to black if(aRCheckCol == aWinCol) @@ -1121,11 +1121,11 @@ ColorConfigCtrl_Impl::ColorConfigCtrl_Impl( sal_Int32 nThirdWidth = aScrollWindow.aWindows[0]->GetPosPixel().X() - nFirstWidth - nSecondWidth; const WinBits nHeadBits = HIB_VCENTER | HIB_FIXED| HIB_FIXEDPOS; - aHeaderHB.InsertItem( 1, sOn, nFirstWidth, (USHORT)nHeadBits|HIB_CENTER); - aHeaderHB.InsertItem( 2, sUIElem, nSecondWidth, (USHORT)nHeadBits|HIB_LEFT); - aHeaderHB.InsertItem( 3, sColSetting, nThirdWidth, (USHORT)nHeadBits|HIB_LEFT); + aHeaderHB.InsertItem( 1, sOn, nFirstWidth, (sal_uInt16)nHeadBits|HIB_CENTER); + aHeaderHB.InsertItem( 2, sUIElem, nSecondWidth, (sal_uInt16)nHeadBits|HIB_LEFT); + aHeaderHB.InsertItem( 3, sColSetting, nThirdWidth, (sal_uInt16)nHeadBits|HIB_LEFT); aHeaderHB.InsertItem( 4, sPreview, - aHeaderHB.GetSizePixel().Width() - nFirstWidth - nSecondWidth - nThirdWidth, (USHORT)nHeadBits|HIB_LEFT); + aHeaderHB.GetSizePixel().Width() - nFirstWidth - nSecondWidth - nThirdWidth, (sal_uInt16)nHeadBits|HIB_LEFT); aHeaderHB.Show(); aVScroll.SetRangeMin(0); @@ -1197,7 +1197,7 @@ void ColorConfigCtrl_Impl::Update() if(ANCHOR == i) continue; const ColorConfigValue& rColorEntry = pColorConfig->GetColorValue(ColorConfigEntry(i)); - if(COL_AUTO == (UINT32)rColorEntry.nColor) + if(COL_AUTO == (sal_uInt32)rColorEntry.nColor) { if(aScrollWindow.aColorBoxes[i]) aScrollWindow.aColorBoxes[i]->SelectEntryPos(0); @@ -1257,7 +1257,7 @@ void ColorConfigCtrl_Impl::Update() ---------------------------------------------------------------------------*/ sal_Bool lcl_MoveAndShow(Window* pWindow, long nOffset, long nMaxVisible, bool _bShow) { - BOOL bHide = TRUE; + sal_Bool bHide = sal_True; if(pWindow) { Point aPos = pWindow->GetPosPixel(); @@ -1271,7 +1271,7 @@ sal_Bool lcl_MoveAndShow(Window* pWindow, long nOffset, long nMaxVisible, bool _ } IMPL_LINK(ColorConfigCtrl_Impl, ScrollHdl, ScrollBar*, pScrollBar) { - aScrollWindow.SetUpdateMode(TRUE); + aScrollWindow.SetUpdateMode(sal_True); sal_Int16 i; long nOffset = aScrollWindow.aColorBoxes[1]->GetPosPixel().Y() - aScrollWindow.aColorBoxes[0]->GetPosPixel().Y(); nOffset *= (nScrollPos - pScrollBar->GetThumbPos()); @@ -1291,7 +1291,7 @@ IMPL_LINK(ColorConfigCtrl_Impl, ScrollHdl, ScrollBar*, pScrollBar) lcl_MoveAndShow(aScrollWindow.aCheckBoxes[i], nOffset, nWindowHeight, bShowCtrl); lcl_MoveAndShow(aScrollWindow.aFixedTexts[i], nOffset, nWindowHeight, bShowCtrl); lcl_MoveAndShow(aScrollWindow.aWindows[i] , nOffset, nWindowHeight, bShowCtrl); - BOOL bShow = lcl_MoveAndShow(aScrollWindow.aColorBoxes[i], nOffset, nWindowHeight, bShowCtrl); + sal_Bool bShow = lcl_MoveAndShow(aScrollWindow.aColorBoxes[i], nOffset, nWindowHeight, bShowCtrl); if(bShow) { if(nFirstVisible == -1) @@ -1345,7 +1345,7 @@ IMPL_LINK(ColorConfigCtrl_Impl, ScrollHdl, ScrollBar*, pScrollBar) Point aPos = aScrollWindow.aChapters[i]->GetPosPixel(); aPos.Y() += nOffset; aScrollWindow.aChapters[i]->SetPosPixel(aPos); aPos = aScrollWindow.aChapterWins[i]->GetPosPixel(); aPos.Y() += nOffset; aScrollWindow.aChapterWins[i]->SetPosPixel(aPos); } - aScrollWindow.SetUpdateMode(TRUE); + aScrollWindow.SetUpdateMode(sal_True); return 0; } /* -----------------------------29.04.2002 17:02------------------------------ @@ -1356,7 +1356,7 @@ long ColorConfigCtrl_Impl::PreNotify( NotifyEvent& rNEvt ) if(rNEvt.GetType() == EVENT_COMMAND) { const CommandEvent* pCEvt = rNEvt.GetCommandEvent(); - USHORT nCmd = pCEvt->GetCommand(); + sal_uInt16 nCmd = pCEvt->GetCommand(); if( COMMAND_WHEEL == nCmd ) { Command(*pCEvt); @@ -1530,7 +1530,7 @@ SvxColorOptionsTabPage::SvxColorOptionsTabPage( aSaveSchemePB( this, CUI_RES( PB_SAVESCHEME) ), aDeleteSchemePB( this, CUI_RES( PB_DELETESCHEME ) ), aCustomColorsFL( this, CUI_RES( FL_CUSTOMCOLORS ) ), - bFillItemSetCalled(FALSE), + bFillItemSetCalled(sal_False), pColorConfig(0), pExtColorConfig(0), pColorConfigCT( new ColorConfigCtrl_Impl(this, CUI_RES( CT_COLORCONFIG ) )) @@ -1575,9 +1575,9 @@ SfxTabPage* SvxColorOptionsTabPage::Create( Window* pParent, const SfxItemSet& r /* -----------------------------25.03.2002 10:47------------------------------ ---------------------------------------------------------------------------*/ -BOOL SvxColorOptionsTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxColorOptionsTabPage::FillItemSet( SfxItemSet& ) { - bFillItemSetCalled = TRUE; + bFillItemSetCalled = sal_True; if(aColorSchemeLB.GetSavedValue() != aColorSchemeLB.GetSelectEntryPos()) { pColorConfig->SetModified(); @@ -1587,7 +1587,7 @@ BOOL SvxColorOptionsTabPage::FillItemSet( SfxItemSet& ) pColorConfig->Commit(); if(pExtColorConfig->IsModified()) pExtColorConfig->Commit(); - return TRUE; + return sal_True; } /* -----------------------------25.03.2002 10:47------------------------------ diff --git a/cui/source/options/optcolor.hxx b/cui/source/options/optcolor.hxx index e9fd0b406..0f17049f6 100644 --- a/cui/source/options/optcolor.hxx +++ b/cui/source/options/optcolor.hxx @@ -52,7 +52,7 @@ class SvxColorOptionsTabPage : public SfxTabPage FixedLine aCustomColorsFL; - BOOL bFillItemSetCalled; + sal_Bool bFillItemSetCalled; svtools::EditableColorConfig* pColorConfig; svtools::EditableExtendedColorConfig* pExtColorConfig; @@ -69,7 +69,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual int DeactivatePage( SfxItemSet* pSet ); diff --git a/cui/source/options/optctl.cxx b/cui/source/options/optctl.cxx index 4542d5c27..4da245777 100644 --- a/cui/source/options/optctl.cxx +++ b/cui/source/options/optctl.cxx @@ -82,48 +82,48 @@ SfxTabPage* SvxCTLOptionsPage::Create( Window* pParent, const SfxItemSet& rAttrS return new SvxCTLOptionsPage( pParent, rAttrSet ); } // ----------------------------------------------------------------------------- -BOOL SvxCTLOptionsPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxCTLOptionsPage::FillItemSet( SfxItemSet& ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; SvtCTLOptions aCTLOptions; // Sequence checking - BOOL bChecked = m_aSequenceCheckingCB.IsChecked(); + sal_Bool bChecked = m_aSequenceCheckingCB.IsChecked(); if ( bChecked != m_aSequenceCheckingCB.GetSavedValue() ) { aCTLOptions.SetCTLSequenceChecking( bChecked ); - bModified = TRUE; + bModified = sal_True; } bChecked = m_aRestrictedCB.IsChecked(); if( bChecked != m_aRestrictedCB.GetSavedValue() ) { aCTLOptions.SetCTLSequenceCheckingRestricted( bChecked ); - bModified = TRUE; + bModified = sal_True; } bChecked = m_aTypeReplaceCB.IsChecked(); if( bChecked != m_aTypeReplaceCB.GetSavedValue()) { aCTLOptions.SetCTLSequenceCheckingTypeAndReplace(bChecked); - bModified = TRUE; + bModified = sal_True; } - BOOL bLogicalChecked = m_aMovementLogicalRB.IsChecked(); - BOOL bVisualChecked = m_aMovementVisualRB.IsChecked(); + sal_Bool bLogicalChecked = m_aMovementLogicalRB.IsChecked(); + sal_Bool bVisualChecked = m_aMovementVisualRB.IsChecked(); if ( bLogicalChecked != m_aMovementLogicalRB.GetSavedValue() || bVisualChecked != m_aMovementVisualRB.GetSavedValue() ) { SvtCTLOptions::CursorMovement eMovement = bLogicalChecked ? SvtCTLOptions::MOVEMENT_LOGICAL : SvtCTLOptions::MOVEMENT_VISUAL; aCTLOptions.SetCTLCursorMovement( eMovement ); - bModified = TRUE; + bModified = sal_True; } - USHORT nPos = m_aNumeralsLB.GetSelectEntryPos(); + sal_uInt16 nPos = m_aNumeralsLB.GetSelectEntryPos(); if ( nPos != m_aNumeralsLB.GetSavedValue() ) { aCTLOptions.SetCTLTextNumerals( (SvtCTLOptions::TextNumerals)nPos ); - bModified = TRUE; + bModified = sal_True; } return bModified; @@ -152,7 +152,7 @@ void SvxCTLOptionsPage::Reset( const SfxItemSet& ) DBG_ERRORFILE( "SvxCTLOptionsPage::Reset(): invalid movement enum" ); } - USHORT nPos = (USHORT)aCTLOptions.GetCTLTextNumerals(); + sal_uInt16 nPos = (sal_uInt16)aCTLOptions.GetCTLTextNumerals(); DBG_ASSERT( nPos < m_aNumeralsLB.GetEntryCount(), "SvxCTLOptionsPage::Reset(): invalid numerals enum" ); m_aNumeralsLB.SelectEntryPos( nPos ); diff --git a/cui/source/options/optctl.hxx b/cui/source/options/optctl.hxx index 6e97f5fdd..a68d81797 100644 --- a/cui/source/options/optctl.hxx +++ b/cui/source/options/optctl.hxx @@ -62,7 +62,7 @@ public: virtual ~SvxCTLOptionsPage(); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx index 2cc72f7af..4d6209291 100755 --- a/cui/source/options/optdict.cxx +++ b/cui/source/options/optdict.cxx @@ -118,7 +118,7 @@ SvxNewDictionaryDialog::SvxNewDictionaryDialog( Window* pParent, aOKBtn.SetClickHdl( LINK( this, SvxNewDictionaryDialog, OKHdl_Impl ) ); // Sprachen anzeigen - aLanguageLB.SetLanguageList( LANG_LIST_ALL, TRUE, TRUE ); + aLanguageLB.SetLanguageList( LANG_LIST_ALL, sal_True, sal_True ); aLanguageLB.SelectEntryPos(0); FreeResource(); @@ -298,7 +298,7 @@ SvxEditDictionaryDialog::SvxEditDictionaryDialog( } } - aLangLB.SetLanguageList( LANG_LIST_ALL, TRUE, TRUE ); + aLangLB.SetLanguageList( LANG_LIST_ALL, sal_True, sal_True ); aReplaceED.SetSpaces(sal_True); aWordED.SetSpaces(sal_True); @@ -382,13 +382,13 @@ void SvxEditDictionaryDialog::SetLanguage_Impl( util::Language nLanguage ) aLangLB.SelectLanguage( nLanguage ); } -USHORT SvxEditDictionaryDialog::GetLBInsertPos(const String &rDicWord) +sal_uInt16 SvxEditDictionaryDialog::GetLBInsertPos(const String &rDicWord) { - USHORT nPos = USHRT_MAX; + sal_uInt16 nPos = USHRT_MAX; IntlWrapper aIntlWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() ); const CollatorWrapper* pCollator = aIntlWrapper.getCollator(); - USHORT j; + sal_uInt16 j; for( j = 0; j < aWordsLB.GetEntryCount(); j++ ) { SvLBoxEntry* pEntry = aWordsLB.GetEntry(j); @@ -453,7 +453,7 @@ IMPL_LINK( SvxEditDictionaryDialog, SelectLangHdl_Impl, ListBox *, EMPTYARG ) sal_uInt16 nDicPos = aAllDictsLB.GetSelectEntryPos(); sal_uInt16 nLang = aLangLB.GetSelectLanguage(); Reference< XDictionary > xDic( aDics.getConstArray()[ nDicPos ], UNO_QUERY ); - INT16 nOldLang = SvxLocaleToLanguage( xDic->getLocale() ); + sal_Int16 nOldLang = SvxLocaleToLanguage( xDic->getLocale() ); if ( nLang != nOldLang ) { @@ -535,7 +535,7 @@ void SvxEditDictionaryDialog::ShowWords_Impl( sal_uInt16 nId ) for (sal_Int32 i = 0; i < nCount; i++) { aStr = String(pEntry[i]->getDictionaryWord()); - USHORT nPos = GetLBInsertPos( aStr ); + sal_uInt16 nPos = GetLBInsertPos( aStr ); if(pEntry[i]->isNegative()) { aStr += '\t'; @@ -689,8 +689,8 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, Edit*, pEdt) xub_StrLen nWordLen=rEntry.Len(); const String& rRepString = aReplaceED.GetText(); - BOOL bEnableNewReplace = FALSE; - BOOL bEnableDelete = FALSE; + sal_Bool bEnableNewReplace = sal_False; + sal_Bool bEnableDelete = sal_False; String aNewReplaceText = sNew; if(pEdt == &aWordED) @@ -719,7 +719,7 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, Edit*, pEdt) if (CDE_SIMILAR == eCmpRes) { aNewReplaceText = sModify; - bEnableNewReplace = TRUE; + bEnableNewReplace = sal_True; } bFound= sal_True; break; @@ -734,7 +734,7 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, Edit*, pEdt) bTmpSelEntry=sal_True; aNewReplaceText = sNew; - bEnableNewReplace = TRUE; + bEnableNewReplace = sal_True; } } @@ -744,7 +744,7 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, Edit*, pEdt) pFirstSel = 0; aNewReplaceText = sNew; - bEnableNewReplace = TRUE; + bEnableNewReplace = sal_True; } bEnableDelete = CDE_DIFFERENT != eCmpRes; } @@ -766,13 +766,13 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, Edit*, pEdt) aReplaceText = aWordsLB.GetEntryText( pFirstSel, 1 ); aNewReplaceText = sModify; - bEnableDelete = TRUE; + bEnableDelete = sal_True; } - BOOL bIsChange = + sal_Bool bIsChange = CDE_EQUAL != cmpDicEntry_Impl(aWordED.GetText(), aWordText) || CDE_EQUAL != cmpDicEntry_Impl(aReplaceED.GetText(), aReplaceText); if (aWordED.GetText().Len() && bIsChange) - bEnableNewReplace = TRUE; + bEnableNewReplace = sal_True; } aNewReplacePB.SetText( aNewReplaceText ); diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx index 530d6005f..35b858091 100644 --- a/cui/source/options/optfltr.cxx +++ b/cui/source/options/optfltr.cxx @@ -84,11 +84,11 @@ SfxTabPage* OfaMSFilterTabPage::Create( Window* pParent, return new OfaMSFilterTabPage( pParent, rAttrSet ); } -BOOL OfaMSFilterTabPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaMSFilterTabPage::FillItemSet( SfxItemSet& ) { SvtFilterOptions* pOpt = SvtFilterOptions::Get(); - BOOL bFlag; + sal_Bool bFlag; if( aWBasicCodeCB.GetSavedValue() != (bFlag = aWBasicCodeCB.IsChecked())) pOpt->SetLoadWordBasicCode( bFlag ); if( aWBasicStgCB.GetSavedValue() != (bFlag = aWBasicStgCB.IsChecked())) @@ -106,7 +106,7 @@ BOOL OfaMSFilterTabPage::FillItemSet( SfxItemSet& ) if( aPBasicStgCB.GetSavedValue() != (bFlag = aPBasicStgCB.IsChecked())) pOpt->SetLoadPPointBasicStorage( bFlag ); - return FALSE; + return sal_False; } /*-----------------02.09.96 13.47------------------- @@ -179,15 +179,15 @@ SfxTabPage* OfaMSFilterTabPage2::Create( Window* pParent, return new OfaMSFilterTabPage2( pParent, rAttrSet ); } -BOOL OfaMSFilterTabPage2::FillItemSet( SfxItemSet& ) +sal_Bool OfaMSFilterTabPage2::FillItemSet( SfxItemSet& ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; SvtFilterOptions* pOpt = SvtFilterOptions::Get(); static struct ChkCBoxEntries{ MSFltrPg2_CheckBoxEntries eType; - BOOL (SvtFilterOptions:: *FnIs)() const; - void (SvtFilterOptions:: *FnSet)( BOOL bFlag ); + sal_Bool (SvtFilterOptions:: *FnIs)() const; + void (SvtFilterOptions:: *FnSet)( sal_Bool bFlag ); } aChkArr[] = { { Math, &SvtFilterOptions::IsMathType2Math, &SvtFilterOptions::SetMathType2Math }, @@ -208,38 +208,38 @@ BOOL OfaMSFilterTabPage2::FillItemSet( SfxItemSet& ) { InvalidCBEntry, 0, 0 } }; - BOOL bCheck, bFirst = TRUE; + sal_Bool bCheck, bFirst = sal_True; for( const ChkCBoxEntries* pArr = aChkArr; InvalidCBEntry != pArr->eType; ++pArr, bFirst = !bFirst ) { - USHORT nCol = bFirst ? 1 : 2; + sal_uInt16 nCol = bFirst ? 1 : 2; SvLBoxEntry* pEntry = GetEntry4Type( pArr->eType ); if( pEntry ) { SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem( nCol )); if( pItem && ((SvLBoxItem*)pItem)->IsA() == SV_ITEM_ID_LBOXBUTTON ) { - USHORT nButtonFlags = pItem->GetButtonFlags(); + sal_uInt16 nButtonFlags = pItem->GetButtonFlags(); bCheck = SV_BUTTON_CHECKED == pCheckButtonData->ConvertToButtonState( nButtonFlags ); if( bCheck != (pOpt->*pArr->FnIs)() ) { - bModified = TRUE; + bModified = sal_True; (pOpt->*pArr->FnSet)( bCheck ); } } } } - return TRUE; + return sal_True; } void OfaMSFilterTabPage2::Reset( const SfxItemSet& ) { SvtFilterOptions* pOpt = SvtFilterOptions::Get(); - aCheckLB.SetUpdateMode(FALSE); + aCheckLB.SetUpdateMode(sal_False); aCheckLB.Clear(); SvtModuleOptions aModuleOpt; @@ -256,7 +256,7 @@ void OfaMSFilterTabPage2::Reset( const SfxItemSet& ) static struct ChkCBoxEntries{ MSFltrPg2_CheckBoxEntries eType; - BOOL (SvtFilterOptions:: *FnIs)() const; + sal_Bool (SvtFilterOptions:: *FnIs)() const; } aChkArr[] = { { Math, &SvtFilterOptions::IsMathType2Math }, { Math, &SvtFilterOptions::IsMath2MathType }, @@ -269,11 +269,11 @@ void OfaMSFilterTabPage2::Reset( const SfxItemSet& ) { InvalidCBEntry, NULL } }; - BOOL bFirst = TRUE; + sal_Bool bFirst = sal_True; for( const ChkCBoxEntries* pArr = aChkArr; InvalidCBEntry != pArr->eType; ++pArr, bFirst = !bFirst ) { - USHORT nCol = bFirst ? 1 : 2; + sal_uInt16 nCol = bFirst ? 1 : 2; SvLBoxEntry* pEntry = GetEntry4Type( static_cast< sal_IntPtr >( pArr->eType ) ); if( pEntry ) { @@ -288,7 +288,7 @@ void OfaMSFilterTabPage2::Reset( const SfxItemSet& ) } } } - aCheckLB.SetUpdateMode( TRUE ); + aCheckLB.SetUpdateMode( sal_True ); } void OfaMSFilterTabPage2::InsertEntry( const String& _rTxt, sal_IntPtr _nType ) @@ -324,7 +324,7 @@ SvLBoxEntry* OfaMSFilterTabPage2::GetEntry4Type( sal_IntPtr _nType ) const void OfaMSFilterTabPage2::MSFltrSimpleTable::SetTabs() { SvxSimpleTable::SetTabs(); - USHORT nAdjust = SV_LBOXTAB_ADJUST_RIGHT|SV_LBOXTAB_ADJUST_LEFT|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_ADJUST_NUMERIC|SV_LBOXTAB_FORCE; + sal_uInt16 nAdjust = SV_LBOXTAB_ADJUST_RIGHT|SV_LBOXTAB_ADJUST_LEFT|SV_LBOXTAB_ADJUST_CENTER|SV_LBOXTAB_ADJUST_NUMERIC|SV_LBOXTAB_FORCE; if( aTabs.Count() > 1 ) { @@ -348,7 +348,7 @@ void OfaMSFilterTabPage2::MSFltrSimpleTable::HBarClick() ---------------------------------------------------------------------------*/ void OfaMSFilterTabPage2::MSFltrSimpleTable::SetCheckButtonState( - SvLBoxEntry* pEntry, USHORT nCol, SvButtonState eState) + SvLBoxEntry* pEntry, sal_uInt16 nCol, SvButtonState eState) { SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem(nCol + 1)); @@ -376,7 +376,7 @@ void OfaMSFilterTabPage2::MSFltrSimpleTable::SetCheckButtonState( ---------------------------------------------------------------------------*/ SvButtonState OfaMSFilterTabPage2::MSFltrSimpleTable::GetCheckButtonState( - SvLBoxEntry* pEntry, USHORT nCol ) const + SvLBoxEntry* pEntry, sal_uInt16 nCol ) const { SvButtonState eState = SV_BUTTON_UNCHECKED; SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem(nCol + 1)); @@ -384,7 +384,7 @@ SvButtonState OfaMSFilterTabPage2::MSFltrSimpleTable::GetCheckButtonState( if (((SvLBoxItem*)pItem)->IsA() == SV_ITEM_ID_LBOXBUTTON) { - USHORT nButtonFlags = pItem->GetButtonFlags(); + sal_uInt16 nButtonFlags = pItem->GetButtonFlags(); eState = pCheckButtonData->ConvertToButtonState( nButtonFlags ); } @@ -393,7 +393,7 @@ SvButtonState OfaMSFilterTabPage2::MSFltrSimpleTable::GetCheckButtonState( /* -----------------------------2002/06/20 11:57------------------------------ ---------------------------------------------------------------------------*/ -void OfaMSFilterTabPage2::MSFltrSimpleTable::CheckEntryPos(ULONG nPos, USHORT nCol, BOOL bChecked) +void OfaMSFilterTabPage2::MSFltrSimpleTable::CheckEntryPos(sal_uLong nPos, sal_uInt16 nCol, sal_Bool bChecked) { if ( nPos < GetEntryCount() ) SetCheckButtonState( @@ -410,8 +410,8 @@ void OfaMSFilterTabPage2::MSFltrSimpleTable::KeyInput( const KeyEvent& rKEvt ) if(!rKEvt.GetKeyCode().GetModifier() && KEY_SPACE == rKEvt.GetKeyCode().GetCode()) { - ULONG nSelPos = GetModel()->GetAbsPos(GetCurEntry()); - USHORT nCol = GetCurrentTabPos() - 1; + sal_uLong nSelPos = GetModel()->GetAbsPos(GetCurEntry()); + sal_uInt16 nCol = GetCurrentTabPos() - 1; if ( nCol < 2 ) { SvLBoxEntry* pEntry = GetEntry( nSelPos ); @@ -421,7 +421,7 @@ void OfaMSFilterTabPage2::MSFltrSimpleTable::KeyInput( const KeyEvent& rKEvt ) } else { - USHORT nCheck = GetCheckButtonState( GetEntry(nSelPos), 1 ) == SV_BUTTON_CHECKED ? 1 : 0; + sal_uInt16 nCheck = GetCheckButtonState( GetEntry(nSelPos), 1 ) == SV_BUTTON_CHECKED ? 1 : 0; if(GetCheckButtonState( GetEntry(nSelPos), 0 )) nCheck += 2; nCheck--; diff --git a/cui/source/options/optfltr.hxx b/cui/source/options/optfltr.hxx index 801428154..02a29f4c5 100644 --- a/cui/source/options/optfltr.hxx +++ b/cui/source/options/optfltr.hxx @@ -61,7 +61,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; @@ -73,9 +73,9 @@ class OfaMSFilterTabPage2 : public SfxTabPage using SvTreeListBox::SetCheckButtonState; using SvxSimpleTable::SetTabs; - void CheckEntryPos(ULONG nPos, USHORT nCol, BOOL bChecked); - SvButtonState GetCheckButtonState( SvLBoxEntry*, USHORT nCol ) const; - void SetCheckButtonState( SvLBoxEntry*, USHORT nCol, SvButtonState ); + void CheckEntryPos(sal_uLong nPos, sal_uInt16 nCol, sal_Bool bChecked); + SvButtonState GetCheckButtonState( SvLBoxEntry*, sal_uInt16 nCol ) const; + void SetCheckButtonState( SvLBoxEntry*, sal_uInt16 nCol, SvButtonState ); protected: virtual void SetTabs(); virtual void HBarClick(); @@ -105,7 +105,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 6ab8fe5d6..f7c3b3190 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -309,7 +309,7 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) : "HighContrastWhite" }; - for ( USHORT i = 0; i < aHelpFormatLB.GetEntryCount(); i++ ) + for ( sal_uInt16 i = 0; i < aHelpFormatLB.GetEntryCount(); i++ ) { String* pData = new String( String::CreateFromAscii( aHelpFormatNames[i] ) ); aHelpFormatLB.SetEntryData( i, pData ); @@ -320,7 +320,7 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) : OfaMiscTabPage::~OfaMiscTabPage() { - for(USHORT i = 0; i < aHelpFormatLB.GetEntryCount(); i++) + for(sal_uInt16 i = 0; i < aHelpFormatLB.GetEntryCount(); i++) { delete static_cast< String* >( aHelpFormatLB.GetEntryData(i) ); } @@ -335,12 +335,12 @@ SfxTabPage* OfaMiscTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet // ----------------------------------------------------------------------- -BOOL OfaMiscTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool OfaMiscTabPage::FillItemSet( SfxItemSet& rSet ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; SvtHelpOptions aHelpOptions; - BOOL bChecked = aToolTipsCB.IsChecked(); + sal_Bool bChecked = aToolTipsCB.IsChecked(); if ( bChecked != aToolTipsCB.GetSavedValue() ) aHelpOptions.SetHelpTips( bChecked ); bChecked = ( aExtHelpCB.IsChecked() && aToolTipsCB.IsChecked() ); @@ -349,7 +349,7 @@ BOOL OfaMiscTabPage::FillItemSet( SfxItemSet& rSet ) bChecked = aHelpAgentCB.IsChecked(); if ( bChecked != aHelpAgentCB.GetSavedValue() ) aHelpOptions.SetHelpAgentAutoStartMode( bChecked ); - USHORT nHelpFormatPos = aHelpFormatLB.GetSelectEntryPos(); + sal_uInt16 nHelpFormatPos = aHelpFormatLB.GetSelectEntryPos(); if ( nHelpFormatPos != LISTBOX_ENTRY_NOTFOUND && nHelpFormatPos != aHelpFormatLB.GetSavedValue() ) { @@ -360,29 +360,29 @@ BOOL OfaMiscTabPage::FillItemSet( SfxItemSet& rSet ) { SvtMiscOptions aMiscOpt; aMiscOpt.SetUseSystemFileDialog( !aFileDlgCB.IsChecked() ); - bModified = TRUE; + bModified = sal_True; } if ( aPrintDlgCB.IsChecked() != aPrintDlgCB.GetSavedValue() ) { SvtMiscOptions aMiscOpt; aMiscOpt.SetUseSystemPrintDialog( !aPrintDlgCB.IsChecked() ); - bModified = TRUE; + bModified = sal_True; } if ( aDocStatusCB.IsChecked() != aDocStatusCB.GetSavedValue() ) { SvtPrintWarningOptions aPrintOptions; aPrintOptions.SetModifyDocumentOnPrintingAllowed( aDocStatusCB.IsChecked() ); - bModified = TRUE; + bModified = sal_True; } const SfxUInt16Item* pUInt16Item = PTR_CAST( SfxUInt16Item, GetOldItem( rSet, SID_ATTR_YEAR2000 ) ); - USHORT nNum = (USHORT)aYearValueField.GetText().ToInt32(); + sal_uInt16 nNum = (sal_uInt16)aYearValueField.GetText().ToInt32(); if ( pUInt16Item && pUInt16Item->GetValue() != nNum ) { - bModified = TRUE; + bModified = sal_True; rSet.Put( SfxUInt16Item( SID_ATTR_YEAR2000, nNum ) ); } @@ -398,7 +398,7 @@ void OfaMiscTabPage::Reset( const SfxItemSet& rSet ) aExtHelpCB.Check( aHelpOptions.IsHelpTips() && aHelpOptions.IsExtendedHelp() ); aHelpAgentCB.Check( aHelpOptions.IsHelpAgentAutoStartMode() ); String sStyleSheet = aHelpOptions.GetHelpStyleSheet(); - for ( USHORT i = 0; i < aHelpFormatLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < aHelpFormatLB.GetEntryCount(); ++i ) { if ( *static_cast< String* >( aHelpFormatLB.GetEntryData(i) ) == sStyleSheet ) { @@ -424,17 +424,17 @@ void OfaMiscTabPage::Reset( const SfxItemSet& rSet ) aDocStatusCB.SaveValue(); const SfxPoolItem* pItem = NULL; - if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_YEAR2000, FALSE, &pItem ) ) + if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_YEAR2000, sal_False, &pItem ) ) { aYearValueField.SetValue( ((SfxUInt16Item*)pItem)->GetValue() ); TwoFigureConfigHdl( &aYearValueField ); } else { - aYearValueField.Enable(FALSE); - aTwoFigureFL.Enable(FALSE); - aInterpretFT.Enable(FALSE); - aToYearFT.Enable(FALSE); + aYearValueField.Enable(sal_False); + aTwoFigureFL.Enable(sal_False); + aInterpretFT.Enable(sal_False); + aToYearFT.Enable(sal_False); } } @@ -499,24 +499,24 @@ class CanvasSettings public: CanvasSettings(); - BOOL IsHardwareAccelerationEnabled() const; - BOOL IsHardwareAccelerationAvailable() const; - void EnabledHardwareAcceleration( BOOL _bEnabled ) const; + sal_Bool IsHardwareAccelerationEnabled() const; + sal_Bool IsHardwareAccelerationAvailable() const; + void EnabledHardwareAcceleration( sal_Bool _bEnabled ) const; private: typedef std::vector< std::pair<OUString,Sequence<OUString> > > ServiceVector; Reference<XNameAccess> mxForceFlagNameAccess; ServiceVector maAvailableImplementations; - mutable BOOL mbHWAccelAvailable; - mutable BOOL mbHWAccelChecked; + mutable sal_Bool mbHWAccelAvailable; + mutable sal_Bool mbHWAccelChecked; }; // ------------------------------------------------------------------- CanvasSettings::CanvasSettings() : mxForceFlagNameAccess(), - mbHWAccelAvailable(FALSE), - mbHWAccelChecked(FALSE) + mbHWAccelAvailable(sal_False), + mbHWAccelChecked(sal_False) { try { @@ -576,7 +576,7 @@ CanvasSettings::CanvasSettings() : } // ------------------------------------------------------------------- -BOOL CanvasSettings::IsHardwareAccelerationAvailable() const +sal_Bool CanvasSettings::IsHardwareAccelerationAvailable() const { if( !mbHWAccelChecked ) { @@ -622,7 +622,7 @@ BOOL CanvasSettings::IsHardwareAccelerationAvailable() const } // ------------------------------------------------------------------- -BOOL CanvasSettings::IsHardwareAccelerationEnabled() const +sal_Bool CanvasSettings::IsHardwareAccelerationEnabled() const { bool bForceLastEntry(false); if( !mxForceFlagNameAccess.is() ) @@ -635,7 +635,7 @@ BOOL CanvasSettings::IsHardwareAccelerationEnabled() const } // ------------------------------------------------------------------- -void CanvasSettings::EnabledHardwareAcceleration( BOOL _bEnabled ) const +void CanvasSettings::EnabledHardwareAcceleration( sal_Bool _bEnabled ) const { Reference< XNameReplace > xNameReplace( mxForceFlagNameAccess, UNO_QUERY ); @@ -763,8 +763,8 @@ OfaViewTabPage::OfaViewTabPage(Window* pParent, const SfxItemSet& rSet ) : if( ! Application::ValidateSystemFont() ) { - m_aSystemFont.Check( FALSE ); - m_aSystemFont.Enable( FALSE ); + m_aSystemFont.Check( sal_False ); + m_aSystemFont.Enable( sal_False ); } const StyleSettings& aStyleSettings = Application::GetSettings().GetStyleSettings(); @@ -774,8 +774,8 @@ OfaViewTabPage::OfaViewTabPage(Window* pParent, const SfxItemSet& rSet ) : { // do not check 0th item == auto; it is not a real theme aIconStyleItemId[0] = 0; - ULONG nItem = 1; - for ( ULONG n=0; ++n < STYLE_SYMBOLS_THEMES_MAX; ) + sal_uLong nItem = 1; + for ( sal_uLong n=0; ++n < STYLE_SYMBOLS_THEMES_MAX; ) { if ( aStyleSettings.CheckSymbolStyle( n ) ) { @@ -798,7 +798,7 @@ OfaViewTabPage::OfaViewTabPage(Window* pParent, const SfxItemSet& rSet ) : aAutoStr += ::rtl::OUString::createFromAscii( " (" ); - ULONG nAutoStyle = aStyleSettings.GetAutoSymbolsStyle(); + sal_uLong nAutoStyle = aStyleSettings.GetAutoSymbolsStyle(); if ( aIconStyleItemId[nAutoStyle] ) aAutoStr += aIconStyleLB.GetEntry( aIconStyleItemId[nAutoStyle] ); @@ -854,18 +854,18 @@ SfxTabPage* OfaViewTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet --------------------------------------------------*/ -BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaViewTabPage::FillItemSet( SfxItemSet& ) { SvtFontOptions aFontOpt; SvtMenuOptions aMenuOpt; SvtStartOptions aStartOpt; - BOOL bModified = FALSE; - BOOL bMenuOptModified = FALSE; + sal_Bool bModified = sal_False; + sal_Bool bMenuOptModified = sal_False; bool bRepaintWindows(false); SvtMiscOptions aMiscOptions; - UINT16 nSizeLB_NewSelection = aIconSizeLB.GetSelectEntryPos(); + sal_uInt16 nSizeLB_NewSelection = aIconSizeLB.GetSelectEntryPos(); if( nSizeLB_InitialSelection != nSizeLB_NewSelection ) { // from now on it's modified, even if via auto setting the same size was set as now selected in the LB @@ -881,12 +881,12 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) aMiscOptions.SetSymbolsSize( eSet ); } - UINT16 nStyleLB_NewSelection = aIconStyleLB.GetSelectEntryPos(); + sal_uInt16 nStyleLB_NewSelection = aIconStyleLB.GetSelectEntryPos(); if( nStyleLB_InitialSelection != nStyleLB_NewSelection ) { // find the style name in the aIconStyleItemId table // items from the non-installed icon themes were removed - for ( ULONG n=0; n < STYLE_SYMBOLS_THEMES_MAX; n++ ) + for ( sal_uLong n=0; n < STYLE_SYMBOLS_THEMES_MAX; n++ ) { if ( aIconStyleItemId[n] == nStyleLB_NewSelection ) { @@ -896,17 +896,17 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) } } - BOOL bAppearanceChanged = FALSE; + sal_Bool bAppearanceChanged = sal_False; // Screen Scaling - UINT16 nOldScale = pAppearanceCfg->GetScaleFactor(); - UINT16 nNewScale = (UINT16)aWindowSizeMF.GetValue(); + sal_uInt16 nOldScale = pAppearanceCfg->GetScaleFactor(); + sal_uInt16 nNewScale = (sal_uInt16)aWindowSizeMF.GetValue(); if ( nNewScale != nOldScale ) { pAppearanceCfg->SetScaleFactor(nNewScale); - bAppearanceChanged = TRUE; + bAppearanceChanged = sal_True; } // Mouse Snap Mode @@ -918,7 +918,7 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) if ( eNewSnap != eOldSnap ) { pAppearanceCfg->SetSnapMode(eNewSnap ); - bAppearanceChanged = TRUE; + bAppearanceChanged = sal_True; } // Middle Mouse Button @@ -930,41 +930,41 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) if ( eNewMiddleMouse != eOldMiddleMouse ) { pAppearanceCfg->SetMiddleMouseButton( eNewMiddleMouse ); - bAppearanceChanged = TRUE; + bAppearanceChanged = sal_True; } #if defined( UNX ) if ( aFontAntiAliasing.IsChecked() != aFontAntiAliasing.GetSavedValue() ) { pAppearanceCfg->SetFontAntiAliasing( aFontAntiAliasing.IsChecked() ); - bAppearanceChanged = TRUE; + bAppearanceChanged = sal_True; } if ( aAAPointLimit.GetValue() != aAAPointLimit.GetSavedValue().ToInt32() ) { pAppearanceCfg->SetFontAntialiasingMinPixelHeight( aAAPointLimit.GetValue() ); - bAppearanceChanged = TRUE; + bAppearanceChanged = sal_True; } #endif if ( aFontShowCB.IsChecked() != aFontShowCB.GetSavedValue() ) { aFontOpt.EnableFontWYSIWYG( aFontShowCB.IsChecked() ); - bModified = TRUE; + bModified = sal_True; } if(aMenuIconsLB.GetSelectEntryPos() != aMenuIconsLB.GetSavedValue()) { aMenuOpt.SetMenuIconsState( aMenuIconsLB.GetSelectEntryPos() == 0 ? 2 : aMenuIconsLB.GetSelectEntryPos() - 1); - bModified = TRUE; - bMenuOptModified = TRUE; - bAppearanceChanged = TRUE; + bModified = sal_True; + bMenuOptModified = sal_True; + bAppearanceChanged = sal_True; } if ( aFontHistoryCB.IsChecked() != aFontHistoryCB.GetSavedValue() ) { aFontOpt.EnableFontHistory( aFontHistoryCB.IsChecked() ); - bModified = TRUE; + bModified = sal_True; } // #i95644# if disabled, do not use value, see in ::Reset() @@ -973,7 +973,7 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) if(aUseHardwareAccell.IsChecked() != aUseHardwareAccell.GetSavedValue()) { pCanvasSettings->EnabledHardwareAcceleration(aUseHardwareAccell.IsChecked()); - bModified = TRUE; + bModified = sal_True; } } @@ -983,7 +983,7 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) if(aUseAntiAliase.IsChecked() != mpDrawinglayerOpt->IsAntiAliasing()) { mpDrawinglayerOpt->SetAntiAliasing(aUseAntiAliase.IsChecked()); - bModified = TRUE; + bModified = sal_True; bRepaintWindows = true; } } @@ -997,7 +997,7 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) if(bNewSelection != (bool)mpDrawinglayerOpt->IsTransparentSelection()) { mpDrawinglayerOpt->SetTransparentSelection(maSelectionCB.IsChecked()); - bModified = TRUE; + bModified = sal_True; bRepaintWindows = true; } @@ -1006,7 +1006,7 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) if(nNewTransparence != mpDrawinglayerOpt->GetTransparentSelectionPercent()) { mpDrawinglayerOpt->SetTransparentSelectionPercent(nNewTransparence); - bModified = TRUE; + bModified = sal_True; bRepaintWindows = true; } } @@ -1016,8 +1016,8 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) m_aSystemFont.IsEnabled() ) { aAccessibilityOptions.SetIsSystemFont( m_aSystemFont.IsChecked() ); - bModified = TRUE; - bMenuOptModified = TRUE; + bModified = sal_True; + bMenuOptModified = sal_True; } if( bMenuOptModified ) @@ -1255,9 +1255,9 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe aLang = MsLangId::convertIsoStringToLanguage(seqInstalledLanguages[i]); if (aLang != LANGUAGE_DONTKNOW) { - //USHORT p = aUserInterfaceLB.InsertLanguage(aLang); + //sal_uInt16 p = aUserInterfaceLB.InsertLanguage(aLang); String aLangStr( pLanguageTable->GetString( aLang ) ); - USHORT p = aUserInterfaceLB.InsertEntry(aLangStr); + sal_uInt16 p = aUserInterfaceLB.InsertEntry(aLangStr); aUserInterfaceLB.SetEntryData(p, (void*)(i+1)); } } @@ -1273,7 +1273,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe if (m_sUserLocaleValue.getLength() > 0) { sal_Int32 d = 0; - for (USHORT i=0; i < aUserInterfaceLB.GetEntryCount(); i++) + for (sal_uInt16 i=0; i < aUserInterfaceLB.GetEntryCount(); i++) { d = (sal_Int32)(sal_IntPtr)aUserInterfaceLB.GetEntryData(i); if ( d > 0 && seqInstalledLanguages.getLength() > d-1 && seqInstalledLanguages[d-1].equals(m_sUserLocaleValue)) @@ -1290,14 +1290,14 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe OSL_ENSURE(sal_False, aMsg.getStr()); } - aWesternLanguageLB.SetLanguageList( LANG_LIST_WESTERN | LANG_LIST_ONLY_KNOWN, TRUE, FALSE, TRUE ); + aWesternLanguageLB.SetLanguageList( LANG_LIST_WESTERN | LANG_LIST_ONLY_KNOWN, sal_True, sal_False, sal_True ); aWesternLanguageLB.InsertDefaultLanguage( ::com::sun::star::i18n::ScriptType::LATIN ); - aAsianLanguageLB.SetLanguageList( LANG_LIST_CJK | LANG_LIST_ONLY_KNOWN, TRUE, FALSE, TRUE ); + aAsianLanguageLB.SetLanguageList( LANG_LIST_CJK | LANG_LIST_ONLY_KNOWN, sal_True, sal_False, sal_True ); aAsianLanguageLB.InsertDefaultLanguage( ::com::sun::star::i18n::ScriptType::ASIAN ); - aComplexLanguageLB.SetLanguageList( LANG_LIST_CTL | LANG_LIST_ONLY_KNOWN, TRUE, FALSE, TRUE ); + aComplexLanguageLB.SetLanguageList( LANG_LIST_CTL | LANG_LIST_ONLY_KNOWN, sal_True, sal_False, sal_True ); aComplexLanguageLB.InsertDefaultLanguage( ::com::sun::star::i18n::ScriptType::COMPLEX ); - aLocaleSettingLB.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, FALSE, FALSE, FALSE); + aLocaleSettingLB.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, sal_False, sal_False, sal_False); aLocaleSettingLB.InsertDefaultLanguage( ::com::sun::star::i18n::ScriptType::WEAK ); const NfCurrencyTable& rCurrTab = SvNumberFormatter::GetTheCurrencyTable(); @@ -1309,9 +1309,9 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe aCurrencyLB.InsertEntry( aDefaultCurr ); // all currencies String aTwoSpace( RTL_CONSTASCII_USTRINGPARAM( " " ) ); - USHORT nCurrCount = rCurrTab.Count(); + sal_uInt16 nCurrCount = rCurrTab.Count(); // first entry is SYSTEM, skip it - for ( USHORT j=1; j < nCurrCount; ++j ) + for ( sal_uInt16 j=1; j < nCurrCount; ++j ) { const NfCurrencyEntry* pCurr = rCurrTab[j]; String aStr_( pCurr->GetBankSymbol() ); @@ -1320,7 +1320,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe aStr_ = ApplyLreOrRleEmbedding( aStr_ ); aStr_ += aTwoSpace; aStr_ += ApplyLreOrRleEmbedding( pLanguageTable->GetString( pCurr->GetLanguage() ) ); - USHORT nPos = aCurrencyLB.InsertEntry( aStr_ ); + sal_uInt16 nPos = aCurrencyLB.InsertEntry( aStr_ ); aCurrencyLB.SetEntryData( nPos, (void*) pCurr ); } delete pLanguageTable; @@ -1403,12 +1403,12 @@ void lcl_UpdateAndDelete(SfxVoidItem* pInvalidItems[], SfxBoolItem* pBoolItems[] } } -BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) { // lock configuration broadcasters so that we can coordinate the notifications - pLangConfig->aSysLocaleOptions.BlockBroadcasts( TRUE ); - pLangConfig->aLanguageOptions.BlockBroadcasts( TRUE ); - pLangConfig->aLinguConfig.BlockBroadcasts( TRUE ); + pLangConfig->aSysLocaleOptions.BlockBroadcasts( sal_True ); + pLangConfig->aLanguageOptions.BlockBroadcasts( sal_True ); + pLangConfig->aLinguConfig.BlockBroadcasts( sal_True ); if(aCTLSupportCB.IsChecked() && (aCTLSupportCB.GetSavedValue() != aCTLSupportCB.IsChecked()) || @@ -1497,7 +1497,7 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) // this will happen after releasing the lock on the ConfigurationBroadcaster at // the end of this method pLangConfig->aSysLocaleOptions.SetLocaleConfigString( sNewLang ); - rSet.Put( SfxBoolItem( SID_OPT_LOCALE_CHANGED, TRUE ) ); + rSet.Put( SfxBoolItem( SID_OPT_LOCALE_CHANGED, sal_True ) ); } if(aDecimalSeparatorCB.GetSavedValue() != aDecimalSeparatorCB.IsChecked()) @@ -1505,7 +1505,7 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) // Configured currency, for example, USD-en-US or EUR-de-DE, or empty for locale default. OUString sOldCurr = pLangConfig->aSysLocaleOptions.GetCurrencyConfigString(); - USHORT nCurrPos = aCurrencyLB.GetSelectEntryPos(); + sal_uInt16 nCurrPos = aCurrencyLB.GetSelectEntryPos(); const NfCurrencyEntry* pCurr = (const NfCurrencyEntry*) aCurrencyLB.GetEntryData( nCurrPos ); OUString sNewCurr; @@ -1515,15 +1515,15 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) if ( sOldCurr != sNewCurr ) pLangConfig->aSysLocaleOptions.SetCurrencyConfigString( sNewCurr ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SfxObjectShell* pCurrentDocShell = SfxObjectShell::Current(); Reference< XPropertySet > xLinguProp( LinguMgr::GetLinguPropertySet(), UNO_QUERY ); - BOOL bCurrentDocCBChecked = aCurrentDocCB.IsChecked(); + sal_Bool bCurrentDocCBChecked = aCurrentDocCB.IsChecked(); if(aCurrentDocCB.IsEnabled()) bLanguageCurrentDoc_Impl = bCurrentDocCBChecked; - BOOL bCurrentDocCBChanged = bCurrentDocCBChecked != aCurrentDocCB.GetSavedValue(); + sal_Bool bCurrentDocCBChanged = bCurrentDocCBChecked != aCurrentDocCB.GetSavedValue(); - BOOL bValChanged = aWesternLanguageLB.GetSavedValue() != aWesternLanguageLB.GetSelectEntryPos(); + sal_Bool bValChanged = aWesternLanguageLB.GetSavedValue() != aWesternLanguageLB.GetSelectEntryPos(); if( (bCurrentDocCBChanged && !bCurrentDocCBChecked) || bValChanged) { LanguageType eSelectLang = aWesternLanguageLB.GetSelectLanguage(); @@ -1541,7 +1541,7 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) { rSet.Put(SvxLanguageItem(MsLangId::resolveSystemLanguageByScriptType(eSelectLang, ::com::sun::star::i18n::ScriptType::LATIN), SID_ATTR_LANGUAGE)); - bRet = TRUE; + bRet = sal_True; } } bValChanged = aAsianLanguageLB.GetSavedValue() != aAsianLanguageLB.GetSelectEntryPos(); @@ -1562,7 +1562,7 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) { rSet.Put(SvxLanguageItem(MsLangId::resolveSystemLanguageByScriptType(eSelectLang, ::com::sun::star::i18n::ScriptType::ASIAN), SID_ATTR_CHAR_CJK_LANGUAGE)); - bRet = TRUE; + bRet = sal_True; } } bValChanged = aComplexLanguageLB.GetSavedValue() != aComplexLanguageLB.GetSelectEntryPos(); @@ -1583,7 +1583,7 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) { rSet.Put(SvxLanguageItem(MsLangId::resolveSystemLanguageByScriptType(eSelectLang, ::com::sun::star::i18n::ScriptType::COMPLEX), SID_ATTR_CHAR_CTL_LANGUAGE)); - bRet = TRUE; + bRet = sal_True; } } @@ -1596,8 +1596,8 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) const sal_uInt16 STATE_COUNT = 2; SfxBoolItem* pBoolItems[STATE_COUNT]; - pBoolItems[0] = new SfxBoolItem(SID_VERTICALTEXT_STATE, FALSE); - pBoolItems[1] = new SfxBoolItem(SID_TEXT_FITTOSIZE_VERTICAL, FALSE); + pBoolItems[0] = new SfxBoolItem(SID_VERTICALTEXT_STATE, sal_False); + pBoolItems[1] = new SfxBoolItem(SID_TEXT_FITTOSIZE_VERTICAL, sal_False); SfxVoidItem* pInvalidItems[STATE_COUNT]; pInvalidItems[0] = new SfxVoidItem(SID_VERTICALTEXT_STATE); @@ -1612,7 +1612,7 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) const sal_uInt16 STATE_COUNT = 1; SfxBoolItem* pBoolItems[STATE_COUNT]; - pBoolItems[0] = new SfxBoolItem(SID_CTLFONT_STATE, FALSE); + pBoolItems[0] = new SfxBoolItem(SID_CTLFONT_STATE, sal_False); SfxVoidItem* pInvalidItems[STATE_COUNT]; pInvalidItems[0] = new SfxVoidItem(SID_CTLFONT_STATE); lcl_UpdateAndDelete(pInvalidItems, pBoolItems, STATE_COUNT); @@ -1624,11 +1624,11 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) // first release the lock on the ConfigurationBroadcaster for Locale changes // it seems that our code relies on the fact that before other changes like e.g. currency // are broadcasted locale changes have been done - pLangConfig->aSysLocaleOptions.BlockBroadcasts( FALSE ); - pLangConfig->aLanguageOptions.BlockBroadcasts( FALSE ); - pLangConfig->aLinguConfig.BlockBroadcasts( FALSE ); + pLangConfig->aSysLocaleOptions.BlockBroadcasts( sal_False ); + pLangConfig->aLanguageOptions.BlockBroadcasts( sal_False ); + pLangConfig->aLinguConfig.BlockBroadcasts( sal_False ); - return FALSE; + return sal_False; } //----------------------------------------------------------------------------- void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet ) @@ -1663,7 +1663,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet ) pCurr = SvNumberFormatter::GetCurrencyEntry( aAbbrev, eLang ); } // if pCurr==NULL the SYSTEM entry is selected - USHORT nPos = aCurrencyLB.GetEntryPos( (void*) pCurr ); + sal_uInt16 nPos = aCurrencyLB.GetEntryPos( (void*) pCurr ); aCurrencyLB.SelectEntryPos( nPos ); bReadonly = pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::E_CURRENCY); aCurrencyLB.Enable(!bReadonly); @@ -1676,7 +1676,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet ) LanguageType eCurLangCTL = LANGUAGE_NONE; SfxObjectShell* pCurrentDocShell = SfxObjectShell::Current(); //collect the configuration values first - aCurrentDocCB.Enable(FALSE); + aCurrentDocCB.Enable(sal_False); // Any aWestLang; Any aCJKLang; @@ -1705,24 +1705,24 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet ) //overwrite them by the values provided by the DocShell if(pCurrentDocShell) { - aCurrentDocCB.Enable(TRUE); + aCurrentDocCB.Enable(sal_True); aCurrentDocCB.Check(bLanguageCurrentDoc_Impl); const SfxPoolItem* pLang; - if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_LANGUAGE, FALSE, &pLang)) + if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_LANGUAGE, sal_False, &pLang)) { LanguageType eTempCurLang = ((const SvxLanguageItem*)pLang)->GetValue(); if (MsLangId::resolveSystemLanguageByScriptType(eCurLang, ::com::sun::star::i18n::ScriptType::LATIN) != eTempCurLang) eCurLang = eTempCurLang; } - if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_CHAR_CJK_LANGUAGE, FALSE, &pLang)) + if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_CHAR_CJK_LANGUAGE, sal_False, &pLang)) { LanguageType eTempCurLang = ((const SvxLanguageItem*)pLang)->GetValue(); if (MsLangId::resolveSystemLanguageByScriptType(eCurLangCJK, ::com::sun::star::i18n::ScriptType::ASIAN) != eTempCurLang) eCurLangCJK = eTempCurLang; } - if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_CHAR_CTL_LANGUAGE, FALSE, &pLang)) + if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_CHAR_CTL_LANGUAGE, sal_False, &pLang)) { LanguageType eTempCurLang = ((const SvxLanguageItem*)pLang)->GetValue(); if (MsLangId::resolveSystemLanguageByScriptType(eCurLangCTL, ::com::sun::star::i18n::ScriptType::COMPLEX) != eTempCurLang) @@ -1771,11 +1771,11 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet ) set the focus to the Western Language box --------------------------------------------------------*/ const SfxPoolItem* pLang = 0; - if ( SFX_ITEM_SET == rSet.GetItemState(SID_SET_DOCUMENT_LANGUAGE, FALSE, &pLang ) &&( (const SfxBoolItem*)pLang)->GetValue() == TRUE ) + if ( SFX_ITEM_SET == rSet.GetItemState(SID_SET_DOCUMENT_LANGUAGE, sal_False, &pLang ) &&( (const SfxBoolItem*)pLang)->GetValue() == sal_True ) { aWesternLanguageLB.GrabFocus(); - aCurrentDocCB.Enable(TRUE); - aCurrentDocCB.Check(TRUE); + aCurrentDocCB.Enable(sal_True); + aCurrentDocCB.Check(sal_True); } } /* -----------------------------20.04.01 15:09-------------------------------- @@ -1819,7 +1819,7 @@ namespace void lcl_checkLanguageCheckBox(CheckBox& _rCB,sal_Bool _bNewValue,sal_Bool _bOldValue) { if ( _bNewValue ) - _rCB.Check(TRUE); + _rCB.Check(sal_True); else _rCB.Check( _bOldValue ); // #i15082# do not call SaveValue() in running dialog... @@ -1851,7 +1851,7 @@ IMPL_LINK( OfaLanguagesTabPage, LocaleSettingHdl, SvxLanguageBox*, pBox ) SupportHdl( &aAsianSupportCB ); } - USHORT nPos; + sal_uInt16 nPos; if ( eLang == LANGUAGE_SYSTEM ) nPos = aCurrencyLB.GetEntryPos( (void*) NULL ); else diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx index 6263bc4af..53e732457 100644 --- a/cui/source/options/optgdlg.hxx +++ b/cui/source/options/optgdlg.hxx @@ -83,7 +83,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; @@ -131,13 +131,13 @@ private: CheckBox maSelectionCB; MetricField maSelectionMF; - UINT16 nSizeLB_InitialSelection; - UINT16 nStyleLB_InitialSelection; - BOOL bSfxSymbolsAuto; + sal_uInt16 nSizeLB_InitialSelection; + sal_uInt16 nStyleLB_InitialSelection; + sal_Bool bSfxSymbolsAuto; // item ID for the given icon theme // might be zero when the theme is not installed and the item is removed - ULONG aIconStyleItemId[STYLE_SYMBOLS_THEMES_MAX]; + sal_uLong aIconStyleItemId[STYLE_SYMBOLS_THEMES_MAX]; SvtTabAppearanceCfg* pAppearanceCfg; CanvasSettings* pCanvasSettings; SvtOptionsDrawinglayer* mpDrawinglayerOpt; @@ -154,7 +154,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; /* -----------------------------23.11.00 13:04-------------------------------- @@ -209,7 +209,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; #endif // #ifndef _OFA_OPTGDLG_HXX diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx index 1c5cb9bd1..fc2280ee6 100644 --- a/cui/source/options/optgenrl.cxx +++ b/cui/source/options/optgenrl.cxx @@ -52,20 +52,20 @@ struct GeneralTabPage_Impl { - BOOL mbStreetEnabled; - BOOL mbPLZEnabled; - BOOL mbCityEnabled; - BOOL mbUsCityEnabled; - BOOL mbUsZipEnabled; + sal_Bool mbStreetEnabled; + sal_Bool mbPLZEnabled; + sal_Bool mbCityEnabled; + sal_Bool mbUsCityEnabled; + sal_Bool mbUsZipEnabled; String maQueryStr; GeneralTabPage_Impl() : - mbStreetEnabled ( FALSE ), - mbPLZEnabled ( FALSE ), - mbCityEnabled ( FALSE ), - mbUsCityEnabled ( FALSE ), - mbUsZipEnabled ( FALSE ) {} + mbStreetEnabled ( sal_False ), + mbPLZEnabled ( sal_False ), + mbCityEnabled ( sal_False ), + mbUsCityEnabled ( sal_False ), + mbUsZipEnabled ( sal_False ) {} }; // ----------------------------------------------------------------------- @@ -243,7 +243,7 @@ SfxTabPage* SvxGeneralTabPage::Create( Window* pParent, const SfxItemSet& rAttrS //------------------------------------------------------------------------ -BOOL SvxGeneralTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxGeneralTabPage::FillItemSet( SfxItemSet& ) { // Eingaben trimmen (f"uhrende und nachfolgende Leerzeichen entfernen) aCompanyEdit.SetText( TRIM(aCompanyEdit.GetText()) ); @@ -264,13 +264,13 @@ BOOL SvxGeneralTabPage::FillItemSet( SfxItemSet& ) aFaxEdit.SetText( TRIM(aFaxEdit.GetText()) ); aEmailEdit.SetText( TRIM(aEmailEdit.GetText()) ); - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; bModified |= GetAddress_Impl(); SvtSaveOptions aSaveOpt; if ( aUseDataCB.IsChecked() != aSaveOpt.IsUseUserData() ) { aSaveOpt.SetUseUserData( aUseDataCB.IsChecked() ); - bModified |= TRUE; + bModified |= sal_True; } return bModified; } @@ -281,10 +281,10 @@ void SvxGeneralTabPage::Reset( const SfxItemSet& rSet ) { SetAddress_Impl(); - USHORT nWhich = GetWhich( SID_FIELD_GRABFOCUS ); + sal_uInt16 nWhich = GetWhich( SID_FIELD_GRABFOCUS ); if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET ) { - USHORT nField = ( (SfxUInt16Item&)rSet.Get( nWhich ) ).GetValue(); + sal_uInt16 nField = ( (SfxUInt16Item&)rSet.Get( nWhich ) ).GetValue(); switch ( nField ) { @@ -343,7 +343,7 @@ IMPL_LINK( SvxGeneralTabPage, ModifyHdl_Impl, Edit *, pEdit ) break; } - USHORT nPos = ( pEdit == &aFirstName ) ? 0 : 1; + sal_uInt16 nPos = ( pEdit == &aFirstName ) ? 0 : 1; String aTxt = pEdit->GetText(); sal_Unicode cChar = ( aTxt.Len() > 0 ) ? aTxt.GetChar(0) : ' '; aShortStr.SetChar( nPos, cChar ); @@ -357,7 +357,7 @@ IMPL_LINK( SvxGeneralTabPage, ModifyHdl_Impl, Edit *, pEdit ) sal_Bool SvxGeneralTabPage::GetAddress_Impl() { - BOOL bRet = + sal_Bool bRet = ( aCompanyEdit.GetSavedValue() != aCompanyEdit.GetText() || aFirstName.GetSavedValue() != aFirstName.GetText() || aFatherName.GetSavedValue() != aFatherName.GetText() || @@ -379,7 +379,7 @@ sal_Bool SvxGeneralTabPage::GetAddress_Impl() aEmailEdit.GetSavedValue() != aEmailEdit.GetText() ); LanguageType eLang = Application::GetSettings().GetUILanguage(); - BOOL bUS = ( LANGUAGE_ENGLISH_US == eLang ); + sal_Bool bUS = ( LANGUAGE_ENGLISH_US == eLang ); SvtUserOptions aUserOpt; aUserOpt.SetCompany(aCompanyEdit.GetText()); @@ -415,7 +415,7 @@ sal_Bool SvxGeneralTabPage::GetAddress_Impl() void SvxGeneralTabPage::SetAddress_Impl() { LanguageType eLang = Application::GetSettings().GetUILanguage(); - BOOL bUS = ( LANGUAGE_ENGLISH_US == eLang ); + sal_Bool bUS = ( LANGUAGE_ENGLISH_US == eLang ); SvtUserOptions aUserOpt; aCompanyEdit.SetText( aUserOpt.GetCompany() ); if ( aUserOpt.IsTokenReadonly( USER_OPT_COMPANY ) ) diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx index 507d5d75a..c4550c018 100644 --- a/cui/source/options/opthtml.cxx +++ b/cui/source/options/opthtml.cxx @@ -39,7 +39,7 @@ #include <dialmgr.hxx> // Umwandlung der Modi zu den Positionen in der Listbox -const USHORT aPosToExportArr[] = +const sal_uInt16 aPosToExportArr[] = { HTML_CFG_HTML32, HTML_CFG_MSIE_40, @@ -49,7 +49,7 @@ const USHORT aPosToExportArr[] = //#define DEPRECATED_ENTRY 0xFFFF -const USHORT aExportToPosArr[] = +const sal_uInt16 aExportToPosArr[] = { 0, //HTML 3.2 1, //MS Internet Explorer 4.0 @@ -135,23 +135,23 @@ SfxTabPage* OfaHtmlTabPage::Create( Window* pParent, --------------------------------------------------*/ -BOOL OfaHtmlTabPage::FillItemSet( SfxItemSet& ) +sal_Bool OfaHtmlTabPage::FillItemSet( SfxItemSet& ) { SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get(); if(aSize1NF.GetSavedValue() != aSize1NF.GetText()) - pHtmlOpt->SetFontSize(0, (USHORT)aSize1NF.GetValue()); + pHtmlOpt->SetFontSize(0, (sal_uInt16)aSize1NF.GetValue()); if(aSize2NF.GetSavedValue() != aSize2NF.GetText()) - pHtmlOpt->SetFontSize(1, (USHORT)aSize2NF.GetValue()); + pHtmlOpt->SetFontSize(1, (sal_uInt16)aSize2NF.GetValue()); if(aSize3NF.GetSavedValue() != aSize3NF.GetText()) - pHtmlOpt->SetFontSize(2, (USHORT)aSize3NF.GetValue()); + pHtmlOpt->SetFontSize(2, (sal_uInt16)aSize3NF.GetValue()); if(aSize4NF.GetSavedValue() != aSize4NF.GetText()) - pHtmlOpt->SetFontSize(3, (USHORT)aSize4NF.GetValue()); + pHtmlOpt->SetFontSize(3, (sal_uInt16)aSize4NF.GetValue()); if(aSize5NF.GetSavedValue() != aSize5NF.GetText()) - pHtmlOpt->SetFontSize(4, (USHORT)aSize5NF.GetValue()); + pHtmlOpt->SetFontSize(4, (sal_uInt16)aSize5NF.GetValue()); if(aSize6NF.GetSavedValue() != aSize6NF.GetText()) - pHtmlOpt->SetFontSize(5, (USHORT)aSize6NF.GetValue()); + pHtmlOpt->SetFontSize(5, (sal_uInt16)aSize6NF.GetValue()); if(aSize7NF.GetSavedValue() != aSize7NF.GetText()) - pHtmlOpt->SetFontSize(6, (USHORT)aSize7NF.GetValue()); + pHtmlOpt->SetFontSize(6, (sal_uInt16)aSize7NF.GetValue()); if(aNumbersEnglishUSCB.IsChecked() != aNumbersEnglishUSCB.GetSavedValue()) pHtmlOpt->SetNumbersEnglishUS(aNumbersEnglishUSCB.IsChecked()); @@ -180,7 +180,7 @@ BOOL OfaHtmlTabPage::FillItemSet( SfxItemSet& ) if( aCharSetLB.GetSelectTextEncoding() != pHtmlOpt->GetTextEncoding() ) pHtmlOpt->SetTextEncoding( aCharSetLB.GetSelectTextEncoding() ); - return FALSE; + return sal_False; } /*-----------------02.09.96 13.47------------------- @@ -200,10 +200,10 @@ void OfaHtmlTabPage::Reset( const SfxItemSet& ) aNumbersEnglishUSCB.Check(pHtmlOpt->IsNumbersEnglishUS()); aUnknownTagCB.Check(pHtmlOpt->IsImportUnknown()); aIgnoreFontNamesCB.Check(pHtmlOpt->IsIgnoreFontFamily()); - USHORT nExport = pHtmlOpt->GetExportMode(); - if( nExport >= ( sizeof( aExportToPosArr ) / sizeof( USHORT ) ) ) + sal_uInt16 nExport = pHtmlOpt->GetExportMode(); + if( nExport >= ( sizeof( aExportToPosArr ) / sizeof( sal_uInt16 ) ) ) nExport = 4; // default for bad config entry is NS 4.0 - USHORT nPosArr = aExportToPosArr[ nExport ]; + sal_uInt16 nPosArr = aExportToPosArr[ nExport ]; // if( nPosArr == DEPRECATED_ENTRY ) // nPosArr = aExportToPosArr[ 4 ]; // again: NS 4.0 is default aExportLB.SelectEntryPos( nPosArr ); @@ -242,15 +242,15 @@ void OfaHtmlTabPage::Reset( const SfxItemSet& ) --------------------------------------------------*/ IMPL_LINK(OfaHtmlTabPage, ExportHdl_Impl, ListBox*, pBox) { - USHORT nExport = aPosToExportArr[ pBox->GetSelectEntryPos() ]; + sal_uInt16 nExport = aPosToExportArr[ pBox->GetSelectEntryPos() ]; switch( nExport ) { case HTML_CFG_MSIE_40: case HTML_CFG_NS40 : case HTML_CFG_WRITER : - aPrintExtensionCB.Enable(TRUE); + aPrintExtensionCB.Enable(sal_True); break; - default: aPrintExtensionCB.Enable(FALSE); + default: aPrintExtensionCB.Enable(sal_False); } return 0; diff --git a/cui/source/options/opthtml.hxx b/cui/source/options/opthtml.hxx index 22ac0d38f..4deba696e 100644 --- a/cui/source/options/opthtml.hxx +++ b/cui/source/options/opthtml.hxx @@ -77,7 +77,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/cui/source/options/optimprove2.cxx b/cui/source/options/optimprove2.cxx index 9a49fa2e6..3e56fe02e 100644 --- a/cui/source/options/optimprove2.cxx +++ b/cui/source/options/optimprove2.cxx @@ -183,7 +183,7 @@ sal_Bool SvxImprovementOptionsPage::FillItemSet( SfxItemSet& /*rSet*/ ) ::comphelper::ConfigurationHelper::writeRelativeKey( xConfig, C2S("Participation"), C2S("ShowedInvitation"), uno::makeAny( true ) ); ::comphelper::ConfigurationHelper::writeRelativeKey( - xConfig, C2S("Participation"), C2S("InvitationAccepted"), uno::makeAny( m_aYesRB.IsChecked() != FALSE ) ); + xConfig, C2S("Participation"), C2S("InvitationAccepted"), uno::makeAny( m_aYesRB.IsChecked() != sal_False ) ); ::comphelper::ConfigurationHelper::flush( xConfig ); // TODO: refactor ::comphelper::UiEventsLogger::reinit(); diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 1c81914e9..002f8e830 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -141,14 +141,14 @@ void SvxNoSpaceEdit::KeyInput( const KeyEvent& rKEvent ) if ( bOnlyNumeric ) { const KeyCode& rKeyCode = rKEvent.GetKeyCode(); - USHORT nGroup = rKeyCode.GetGroup(); - USHORT nKey = rKeyCode.GetCode(); - BOOL bValid = ( KEYGROUP_NUM == nGroup || KEYGROUP_CURSOR == nGroup || + sal_uInt16 nGroup = rKeyCode.GetGroup(); + sal_uInt16 nKey = rKeyCode.GetCode(); + sal_Bool bValid = ( KEYGROUP_NUM == nGroup || KEYGROUP_CURSOR == nGroup || ( KEYGROUP_MISC == nGroup && ( nKey < KEY_ADD || nKey > KEY_EQUAL ) ) ); if ( !bValid && ( rKeyCode.IsMod1() && ( KEY_A == nKey || KEY_C == nKey || KEY_V == nKey || KEY_X == nKey || KEY_Z == nKey ) ) ) // Erase, Copy, Paste, Select All und Undo soll funktionieren - bValid = TRUE; + bValid = sal_True; if ( bValid ) Edit::KeyInput(rKEvent); @@ -192,17 +192,17 @@ SvxProxyTabPage::SvxProxyTabPage(Window* pParent, const SfxItemSet& rSet ) : aHttpProxyFT (this, CUI_RES( FT_HTTP_PROXY )), aHttpProxyED (this, CUI_RES( ED_HTTP_PROXY )), aHttpPortFT (this, CUI_RES( FT_HTTP_PORT )), - aHttpPortED (this, CUI_RES( ED_HTTP_PORT ), TRUE), + aHttpPortED (this, CUI_RES( ED_HTTP_PORT ), sal_True), aHttpsProxyFT (this, CUI_RES( FT_HTTPS_PROXY )), aHttpsProxyED (this, CUI_RES( ED_HTTPS_PROXY )), aHttpsPortFT (this, CUI_RES( FT_HTTPS_PORT )), - aHttpsPortED (this, CUI_RES( ED_HTTPS_PORT ), TRUE), + aHttpsPortED (this, CUI_RES( ED_HTTPS_PORT ), sal_True), aFtpProxyFT (this, CUI_RES( FT_FTP_PROXY )), aFtpProxyED (this, CUI_RES( ED_FTP_PROXY )), aFtpPortFT (this, CUI_RES( FT_FTP_PORT )), - aFtpPortED (this, CUI_RES( ED_FTP_PORT ), TRUE), + aFtpPortED (this, CUI_RES( ED_FTP_PORT ), sal_True), aNoProxyForFT (this, CUI_RES( FT_NOPROXYFOR )), aNoProxyForED (this, CUI_RES( ED_NOPROXYFOR )), @@ -293,7 +293,7 @@ void SvxProxyTabPage::ReadConfigData_Impl() if( xNameAccess->getByName(aProxyModePN) >>= nIntValue ) { - aProxyModeLB.SelectEntryPos( (USHORT) nIntValue ); + aProxyModeLB.SelectEntryPos( (sal_uInt16) nIntValue ); } if( xNameAccess->getByName(aHttpProxyPN) >>= aStringValue ) @@ -471,74 +471,74 @@ void SvxProxyTabPage::Reset(const SfxItemSet&) --------------------------------------------------*/ -BOOL SvxProxyTabPage::FillItemSet(SfxItemSet& ) +sal_Bool SvxProxyTabPage::FillItemSet(SfxItemSet& ) { - BOOL bModified=FALSE; + sal_Bool bModified=sal_False; try { Reference< beans::XPropertySet > xPropertySet(m_xConfigurationUpdateAccess, UNO_QUERY_THROW ); - USHORT nSelPos = aProxyModeLB.GetSelectEntryPos(); + sal_uInt16 nSelPos = aProxyModeLB.GetSelectEntryPos(); if(aProxyModeLB.GetSavedValue() != nSelPos) { if( nSelPos == 1 ) { RestoreConfigDefaults_Impl(); - return TRUE; + return sal_True; } xPropertySet->setPropertyValue(aProxyModePN, makeAny((sal_Int32) nSelPos)); - bModified = TRUE; + bModified = sal_True; } if(aHttpProxyED.GetSavedValue() != aHttpProxyED.GetText()) { xPropertySet->setPropertyValue( aHttpProxyPN, makeAny(rtl::OUString(aHttpProxyED.GetText()))); - bModified = TRUE; + bModified = sal_True; } if ( aHttpPortED.GetSavedValue() != aHttpPortED.GetText() ) { xPropertySet->setPropertyValue( aHttpPortPN, makeAny(aHttpPortED.GetText().ToInt32())); - bModified = TRUE; + bModified = sal_True; } if(aHttpsProxyED.GetSavedValue() != aHttpsProxyED.GetText()) { xPropertySet->setPropertyValue( aHttpsProxyPN, makeAny(rtl::OUString(aHttpsProxyED.GetText()))); - bModified = TRUE; + bModified = sal_True; } if ( aHttpsPortED.GetSavedValue() != aHttpsPortED.GetText() ) { xPropertySet->setPropertyValue( aHttpsPortPN, makeAny(aHttpsPortED.GetText().ToInt32())); - bModified = TRUE; + bModified = sal_True; } if(aFtpProxyED.GetSavedValue() != aFtpProxyED.GetText()) { xPropertySet->setPropertyValue( aFtpProxyPN, makeAny( rtl::OUString(aFtpProxyED.GetText()))); - bModified = TRUE; + bModified = sal_True; } if ( aFtpPortED.GetSavedValue() != aFtpPortED.GetText() ) { xPropertySet->setPropertyValue( aFtpPortPN, makeAny(aFtpPortED.GetText().ToInt32())); - bModified = TRUE; + bModified = sal_True; } if ( aNoProxyForED.GetSavedValue() != aNoProxyForED.GetText() ) { xPropertySet->setPropertyValue( aNoProxyDescPN, makeAny( rtl::OUString(aNoProxyForED.GetText()))); - bModified = TRUE; + bModified = sal_True; } Reference< util::XChangesBatch > xChangesBatch(m_xConfigurationUpdateAccess, UNO_QUERY_THROW); @@ -622,7 +622,7 @@ void SvxProxyTabPage::ArrangeControls_Impl() /*-----------------12.08.96 13.38------------------- --------------------------------------------------*/ -void SvxProxyTabPage::EnableControls_Impl(BOOL bEnable) +void SvxProxyTabPage::EnableControls_Impl(sal_Bool bEnable) { aHttpProxyFT.Enable(bEnable); aHttpProxyED.Enable(bEnable); @@ -648,7 +648,7 @@ void SvxProxyTabPage::EnableControls_Impl(BOOL bEnable) IMPL_LINK( SvxProxyTabPage, ProxyHdl_Impl, ListBox *, pBox ) { - USHORT nPos = pBox->GetSelectEntryPos(); + sal_uInt16 nPos = pBox->GetSelectEntryPos(); // Restore original system values if( nPos == 1 ) @@ -775,11 +775,11 @@ void SvxSearchTabPage::Reset( const SfxItemSet& ) // ----------------------------------------------------------------------- -BOOL SvxSearchTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxSearchTabPage::FillItemSet( SfxItemSet& ) { if(aSearchConfig.IsModified()) aSearchConfig.Commit(); - return TRUE; + return sal_True; } /*--------------------------------------------------------------------*/ @@ -803,21 +803,21 @@ int SvxSearchTabPage::DeactivatePage( SfxItemSet* _pSet ) // ----------------------------------------------------------------------- //add by BerryJia for fixing Bug102610 Time:2002-8-29 11:00 (China Standard Time GMT+08:00) -BOOL SvxSearchTabPage::ConfirmLeave( const String& rStringSelection) +sal_Bool SvxSearchTabPage::ConfirmLeave( const String& rStringSelection) { if(aChangePB.IsEnabled()) { QueryBox aQuery(this, WB_YES_NO_CANCEL|WB_DEF_YES, sModifyMsg); - USHORT nRet = aQuery.Execute(); + sal_uInt16 nRet = aQuery.Execute(); if(RET_CANCEL == nRet) { if(rStringSelection.Len()) aSearchLB.SelectEntry(sLastSelectedEntry); - return FALSE; + return sal_False; } else if(RET_YES == nRet) { - USHORT nEntryPos = aSearchLB.GetEntryPos( aSearchNameED.GetText() ); + sal_uInt16 nEntryPos = aSearchLB.GetEntryPos( aSearchNameED.GetText() ); if ( nEntryPos != LISTBOX_ENTRY_NOTFOUND ) aSearchLB.SelectEntryPos(nEntryPos); else @@ -828,19 +828,19 @@ BOOL SvxSearchTabPage::ConfirmLeave( const String& rStringSelection) } else if(RET_NO == nRet) { - aChangePB.Enable(FALSE); - aAddPB.Enable(FALSE); + aChangePB.Enable(sal_False); + aAddPB.Enable(sal_False); SearchEntryHdl_Impl(&aSearchLB); } } if(aAddPB.IsEnabled()) { QueryBox aQuery(this, WB_YES_NO_CANCEL|WB_DEF_YES, sModifyMsg); - USHORT nRet = aQuery.Execute(); + sal_uInt16 nRet = aQuery.Execute(); if(RET_CANCEL == nRet) { aSearchLB.SetNoSelection(); - return FALSE; + return sal_False; } else if(RET_YES == nRet) { @@ -851,13 +851,13 @@ BOOL SvxSearchTabPage::ConfirmLeave( const String& rStringSelection) } else if(RET_NO == nRet) { - aAddPB.Enable(FALSE); - aChangePB.Enable(FALSE); + aAddPB.Enable(sal_False); + aChangePB.Enable(sal_False); NewSearchHdl_Impl(0); } } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -916,7 +916,7 @@ IMPL_LINK( SvxSearchTabPage, NewSearchHdl_Impl, PushButton *, EMPTYARG ) aSearchNameED.SetText( String() ); aSearchLB.SetNoSelection(); aCurrentSrchData = SvxSearchEngineData(); - aAndRB.Check( TRUE ); + aAndRB.Check( sal_True ); SearchEntryHdl_Impl( &aSearchLB ); SearchPartHdl_Impl( &aAndRB ); return 0; @@ -927,8 +927,8 @@ IMPL_LINK( SvxSearchTabPage, NewSearchHdl_Impl, PushButton *, EMPTYARG ) IMPL_LINK( SvxSearchTabPage, AddSearchHdl_Impl, PushButton *, EMPTYARG ) { //The following two lines is added by BerryJia for fixing Bug102610 Time:2002-8-29 11:00 (China Standard Time GMT+08:00) - aAddPB.Enable(FALSE); - aChangePB.Enable(FALSE); + aAddPB.Enable(sal_False); + aChangePB.Enable(sal_False); aCurrentSrchData.sEngineName = aSearchNameED.GetText(); aSearchConfig.SetData(aCurrentSrchData); aSearchLB.InsertEntry( aCurrentSrchData.sEngineName ); @@ -942,9 +942,9 @@ IMPL_LINK( SvxSearchTabPage, AddSearchHdl_Impl, PushButton *, EMPTYARG ) IMPL_LINK( SvxSearchTabPage, ChangeSearchHdl_Impl, PushButton *, EMPTYARG ) { //The following two lines is added by BerryJia for fixing Bug102610 Time:2002-8-29 11:00 (China Standard Time GMT+08:00) - aChangePB.Enable(FALSE); - aAddPB.Enable(FALSE); - USHORT nPos = aSearchLB.GetSelectEntryPos(); + aChangePB.Enable(sal_False); + aAddPB.Enable(sal_False); + sal_uInt16 nPos = aSearchLB.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { String sEngine = aSearchLB.GetSelectEntry(); @@ -955,7 +955,7 @@ IMPL_LINK( SvxSearchTabPage, ChangeSearchHdl_Impl, PushButton *, EMPTYARG ) } else { - SetUpdateMode(FALSE); + SetUpdateMode(sal_False); String sEntry = aSearchNameED.GetText(); // im AddHdl wird sLastSelectedEntry umgesetzt String sTemp(sLastSelectedEntry); @@ -964,7 +964,7 @@ IMPL_LINK( SvxSearchTabPage, ChangeSearchHdl_Impl, PushButton *, EMPTYARG ) DeleteSearchHdl_Impl(0); aSearchLB.SelectEntry(sEntry); SearchEntryHdl_Impl(&aSearchLB); - SetUpdateMode(TRUE); + SetUpdateMode(sal_True); } return 0; } @@ -973,8 +973,8 @@ IMPL_LINK( SvxSearchTabPage, ChangeSearchHdl_Impl, PushButton *, EMPTYARG ) IMPL_LINK( SvxSearchTabPage, DeleteSearchHdl_Impl, PushButton *, EMPTYARG) { - aChangePB.Enable(FALSE); //add by BerryJia for fixing Bug102610 Time:2002-8-29 11:00 (China Standard Time GMT+08:00) - USHORT nPos = aSearchLB.GetSelectEntryPos(); + aChangePB.Enable(sal_False); //add by BerryJia for fixing Bug102610 Time:2002-8-29 11:00 (China Standard Time GMT+08:00) + sal_uInt16 nPos = aSearchLB.GetSelectEntryPos(); DBG_ASSERT(nPos != LISTBOX_ENTRY_NOTFOUND, "kein Eintrag selektiert!"); aSearchConfig.RemoveData(aSearchLB.GetSelectEntry()); aSearchLB.RemoveEntry(nPos); @@ -987,7 +987,7 @@ IMPL_LINK( SvxSearchTabPage, DeleteSearchHdl_Impl, PushButton *, EMPTYARG) IMPL_LINK( SvxSearchTabPage, SearchEntryHdl_Impl, ListBox*, pBox ) { - USHORT nEntryPos = pBox->GetSelectEntryPos(); + sal_uInt16 nEntryPos = pBox->GetSelectEntryPos(); if ( nEntryPos != LISTBOX_ENTRY_NOTFOUND ) { String sSelection(pBox->GetSelectEntry()); @@ -1008,18 +1008,18 @@ IMPL_LINK( SvxSearchTabPage, SearchEntryHdl_Impl, ListBox*, pBox ) aSeparatorED.SetText( bAnd ? pData->sAndSeparator : bOr ? pData->sOrSeparator : pData->sExactSeparator); aPostFixED.SetText(bAnd ? pData->sAndSuffix : bOr ? pData->sOrSuffix : pData->sExactSuffix ); sal_Int32 nCase = bAnd ? pData->nAndCaseMatch : bOr ? pData->nOrCaseMatch : pData->nExactCaseMatch; - aCaseED.SelectEntryPos( (USHORT)nCase ); + aCaseED.SelectEntryPos( (sal_uInt16)nCase ); aCurrentSrchData = *pData; } aDeletePB.Enable(); } else { - aDeletePB.Enable(FALSE); + aDeletePB.Enable(sal_False); sLastSelectedEntry.Erase(); } - aChangePB.Enable(FALSE); - aAddPB.Enable(FALSE); + aChangePB.Enable(sal_False); + aAddPB.Enable(sal_False); return 0; } @@ -1029,11 +1029,11 @@ IMPL_LINK( SvxSearchTabPage, SearchModifyHdl_Impl, SvxNoSpaceEdit*, pEdit ) { if ( pEdit == &aSearchNameED ) { - BOOL bTextLen = ( 0 != pEdit->GetText().Len() ); - BOOL bFound = FALSE; + sal_Bool bTextLen = ( 0 != pEdit->GetText().Len() ); + sal_Bool bFound = sal_False; if ( bTextLen ) { - USHORT nEntryPos = aSearchLB.GetEntryPos( pEdit->GetText() ); + sal_uInt16 nEntryPos = aSearchLB.GetEntryPos( pEdit->GetText() ); bFound = ( nEntryPos != LISTBOX_ENTRY_NOTFOUND ); if ( bFound ) aSearchLB.SelectEntryPos(nEntryPos); @@ -1085,16 +1085,16 @@ IMPL_LINK( SvxSearchTabPage, SearchPartHdl_Impl, RadioButton *, EMPTYARG ) aSeparatorED.SetText( bAnd ? aCurrentSrchData.sAndSeparator : bOr ? aCurrentSrchData.sOrSeparator : aCurrentSrchData.sExactSeparator); aPostFixED.SetText(bAnd ? aCurrentSrchData.sAndSuffix : bOr ? aCurrentSrchData.sOrSuffix : aCurrentSrchData.sExactSuffix ); sal_Int32 nCase = bAnd ? aCurrentSrchData.nAndCaseMatch : bOr ? aCurrentSrchData.nOrCaseMatch : aCurrentSrchData.nExactCaseMatch; - aCaseED.SelectEntryPos( (USHORT)nCase ); + aCaseED.SelectEntryPos( (sal_uInt16)nCase ); return 0; } //#98647#---------------------------------------------- void SvxScriptExecListBox::RequestHelp( const HelpEvent& rHEvt ) { // try to show tips just like as on toolbars - USHORT nPos=LISTBOX_ENTRY_NOTFOUND; - USHORT nTop = GetTopEntry(); - USHORT nCount = GetDisplayLineCount(); // Attention: Not GetLineCount() + sal_uInt16 nPos=LISTBOX_ENTRY_NOTFOUND; + sal_uInt16 nTop = GetTopEntry(); + sal_uInt16 nCount = GetDisplayLineCount(); // Attention: Not GetLineCount() Point aPt = ScreenToOutputPixel( rHEvt.GetMousePosPixel() ); Rectangle aItemRect; if( nCount > 0 ) // if there're some entries, find it. @@ -1198,37 +1198,37 @@ IMPL_LINK( SvxSecurityTabPage, SavePasswordHdl, void*, EMPTYARG ) xMasterPasswd->removeMasterPassword(); if ( xMasterPasswd->changeMasterPassword( Reference< task::XInteractionHandler >() ) ) { - maMasterPasswordPB.Enable( TRUE ); - maMasterPasswordCB.Check( TRUE ); - maMasterPasswordCB.Enable( TRUE ); - maMasterPasswordFI.Enable( TRUE ); - maShowConnectionsPB.Enable( TRUE ); + maMasterPasswordPB.Enable( sal_True ); + maMasterPasswordCB.Check( sal_True ); + maMasterPasswordCB.Enable( sal_True ); + maMasterPasswordFI.Enable( sal_True ); + maShowConnectionsPB.Enable( sal_True ); } else { xMasterPasswd->allowPersistentStoring( bOldValue ); - maSavePasswordsCB.Check( FALSE ); + maSavePasswordsCB.Check( sal_False ); } } else { QueryBox aQuery( this, WB_YES_NO|WB_DEF_NO, msPasswordStoringDeactivateStr ); - USHORT nRet = aQuery.Execute(); + sal_uInt16 nRet = aQuery.Execute(); if( RET_YES == nRet ) { xMasterPasswd->allowPersistentStoring( sal_False ); - maMasterPasswordCB.Check( TRUE ); - maMasterPasswordPB.Enable( FALSE ); - maMasterPasswordCB.Enable( FALSE ); - maMasterPasswordFI.Enable( FALSE ); - maShowConnectionsPB.Enable( FALSE ); + maMasterPasswordCB.Check( sal_True ); + maMasterPasswordPB.Enable( sal_False ); + maMasterPasswordCB.Enable( sal_False ); + maMasterPasswordFI.Enable( sal_False ); + maShowConnectionsPB.Enable( sal_False ); } else { - maSavePasswordsCB.Check( TRUE ); - maMasterPasswordPB.Enable( TRUE ); - maShowConnectionsPB.Enable( TRUE ); + maSavePasswordsCB.Check( sal_True ); + maMasterPasswordPB.Enable( sal_True ); + maShowConnectionsPB.Enable( sal_True ); } } } @@ -1271,28 +1271,28 @@ IMPL_LINK( SvxSecurityTabPage, MasterPasswordCBHdl, void*, EMPTYARG ) { if ( xMasterPasswd->isPersistentStoringAllowed() && xMasterPasswd->changeMasterPassword( Reference< task::XInteractionHandler >() ) ) { - maMasterPasswordPB.Enable( TRUE ); - maMasterPasswordFI.Enable( TRUE ); + maMasterPasswordPB.Enable( sal_True ); + maMasterPasswordFI.Enable( sal_True ); } else { - maMasterPasswordCB.Check( FALSE ); - maMasterPasswordPB.Enable( TRUE ); - maMasterPasswordFI.Enable( TRUE ); + maMasterPasswordCB.Check( sal_False ); + maMasterPasswordPB.Enable( sal_True ); + maMasterPasswordFI.Enable( sal_True ); } } else { if ( xMasterPasswd->isPersistentStoringAllowed() && xMasterPasswd->useDefaultMasterPassword( Reference< task::XInteractionHandler >() ) ) { - maMasterPasswordPB.Enable( FALSE ); - maMasterPasswordFI.Enable( FALSE ); + maMasterPasswordPB.Enable( sal_False ); + maMasterPasswordFI.Enable( sal_False ); } else { - maMasterPasswordCB.Check( TRUE ); - maMasterPasswordPB.Enable( TRUE ); - maShowConnectionsPB.Enable( TRUE ); + maMasterPasswordCB.Check( sal_True ); + maMasterPasswordPB.Enable( sal_True ); + maShowConnectionsPB.Enable( sal_True ); } } } @@ -1407,11 +1407,11 @@ void SvxSecurityTabPage::InitControls() } } - maMasterPasswordPB.Enable( FALSE ); - maMasterPasswordCB.Enable( FALSE ); - maMasterPasswordCB.Check( TRUE ); - maMasterPasswordFI.Enable( FALSE ); - maShowConnectionsPB.Enable( FALSE ); + maMasterPasswordPB.Enable( sal_False ); + maMasterPasswordCB.Enable( sal_False ); + maMasterPasswordCB.Check( sal_True ); + maMasterPasswordFI.Enable( sal_False ); + maShowConnectionsPB.Enable( sal_False ); // initialize the password saving checkbox try @@ -1423,24 +1423,24 @@ void SvxSecurityTabPage::InitControls() if ( xMasterPasswd->isPersistentStoringAllowed() ) { - maMasterPasswordCB.Enable( TRUE ); - maShowConnectionsPB.Enable( TRUE ); - maSavePasswordsCB.Check( TRUE ); + maMasterPasswordCB.Enable( sal_True ); + maShowConnectionsPB.Enable( sal_True ); + maSavePasswordsCB.Check( sal_True ); Reference< task::XMasterPasswordHandling2 > xMasterPasswd2( xMasterPasswd, UNO_QUERY ); if ( xMasterPasswd2.is() && xMasterPasswd2->isDefaultMasterPasswordUsed() ) - maMasterPasswordCB.Check( FALSE ); + maMasterPasswordCB.Check( sal_False ); else { - maMasterPasswordPB.Enable( TRUE ); - maMasterPasswordCB.Check( TRUE ); - maMasterPasswordFI.Enable( TRUE ); + maMasterPasswordPB.Enable( sal_True ); + maMasterPasswordCB.Check( sal_True ); + maMasterPasswordFI.Enable( sal_True ); } } } catch( Exception& ) { - maSavePasswordsCB.Enable( FALSE ); + maSavePasswordsCB.Enable( sal_False ); } @@ -1481,7 +1481,7 @@ namespace } } -BOOL SvxSecurityTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxSecurityTabPage::FillItemSet( SfxItemSet& ) { bool bModified = false; @@ -1527,10 +1527,10 @@ SfxTabPage* MozPluginTabPage::Create( Window* pParent, { return new MozPluginTabPage( pParent, rAttrSet ); } -BOOL MozPluginTabPage::FillItemSet( SfxItemSet& ) +sal_Bool MozPluginTabPage::FillItemSet( SfxItemSet& ) { - BOOL hasInstall = isInstalled(); - BOOL hasChecked = aWBasicCodeCB.IsChecked(); + sal_Bool hasInstall = isInstalled(); + sal_Bool hasChecked = aWBasicCodeCB.IsChecked(); if(hasInstall && (!hasChecked)){ //try to uninstall uninstallPlugin(); @@ -1542,7 +1542,7 @@ BOOL MozPluginTabPage::FillItemSet( SfxItemSet& ) else{ // do nothing } - return TRUE; + return sal_True; } void MozPluginTabPage::Reset( const SfxItemSet& ) { @@ -1574,7 +1574,7 @@ inline bool getDllURL(rtl::OString * path) return true; } -BOOL MozPluginTabPage::isInstalled() +sal_Bool MozPluginTabPage::isInstalled() { #ifdef UNIX // get the real file referred by .so lnk file @@ -1610,7 +1610,7 @@ BOOL MozPluginTabPage::isInstalled() #endif #ifdef WNT // get the value from registry - BOOL ret = true; + sal_Bool ret = true; ::rtl::OString tempString; char realFilePath[NPP_PATH_MAX] = {0}; if (!getDllURL(&tempString)){ @@ -1625,7 +1625,7 @@ BOOL MozPluginTabPage::isInstalled() #endif } -BOOL MozPluginTabPage::installPlugin() +sal_Bool MozPluginTabPage::installPlugin() { #ifdef UNIX // get the real file referred by .so lnk file @@ -1674,7 +1674,7 @@ BOOL MozPluginTabPage::installPlugin() #endif } -BOOL MozPluginTabPage::uninstallPlugin() +sal_Bool MozPluginTabPage::uninstallPlugin() { #ifdef UNIX // get the real file referred by .so lnk file @@ -1858,26 +1858,26 @@ SfxTabPage* SvxEMailTabPage::Create( Window* pParent, const SfxItemSet& rAttrSe /* -------------------------------------------------------------------------*/ -BOOL SvxEMailTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxEMailTabPage::FillItemSet( SfxItemSet& ) { - BOOL bMailModified = FALSE; + sal_Bool bMailModified = sal_False; if(!pImpl->aMailConfig.bROProgram && aMailerURLED.GetSavedValue() != aMailerURLED.GetText()) { pImpl->aMailConfig.sProgram = aMailerURLED.GetText(); - bMailModified = TRUE; + bMailModified = sal_True; } if ( bMailModified ) pImpl->aMailConfig.Commit(); - return FALSE; + return sal_False; } /* -------------------------------------------------------------------------*/ void SvxEMailTabPage::Reset( const SfxItemSet& ) { - aMailerURLED.Enable(TRUE ); - aMailerURLPB.Enable(TRUE ); + aMailerURLED.Enable(sal_True ); + aMailerURLPB.Enable(sal_True ); if(pImpl->aMailConfig.bROProgram) aMailerURLFI.Show(); diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx index fc199bf2e..44c34a244 100755..100644 --- a/cui/source/options/optinet2.hxx +++ b/cui/source/options/optinet2.hxx @@ -70,10 +70,10 @@ namespace uno = ::com::sun::star::uno; class SvxNoSpaceEdit : public Edit { private: - BOOL bOnlyNumeric; + sal_Bool bOnlyNumeric; public: - SvxNoSpaceEdit(Window* pParent, ResId rResId, BOOL bNum = FALSE ) : + SvxNoSpaceEdit(Window* pParent, ResId rResId, sal_Bool bNum = sal_False ) : Edit( pParent, rResId ), bOnlyNumeric( bNum ) {} virtual void KeyInput( const KeyEvent& rKEvent ); @@ -128,7 +128,7 @@ private: #ifdef _SVX_OPTINET2_CXX void ArrangeControls_Impl(); - void EnableControls_Impl(BOOL bEnable); + void EnableControls_Impl(sal_Bool bEnable); void ReadConfigData_Impl(); void ReadConfigDefaults_Impl(); void RestoreConfigDefaults_Impl(); @@ -142,7 +142,7 @@ private: public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; @@ -199,14 +199,14 @@ private: virtual void ActivatePage( const SfxItemSet& rSet ); virtual int DeactivatePage( SfxItemSet* pSet = 0 ); - BOOL ConfirmLeave( const String& rStringSelection ); //add by BerryJia for fixing Bug102610 Time:2002-8-29 11:00 (China Standard Time GMT+08:00) + sal_Bool ConfirmLeave( const String& rStringSelection ); //add by BerryJia for fixing Bug102610 Time:2002-8-29 11:00 (China Standard Time GMT+08:00) SvxSearchTabPage( Window* pParent, const SfxItemSet& rSet ); virtual ~SvxSearchTabPage(); public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; @@ -273,7 +273,7 @@ protected: public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; @@ -283,9 +283,9 @@ class MozPluginTabPage : public SfxTabPage FixedLine aMSWordGB; CheckBox aWBasicCodeCB; - BOOL isInstalled(void); - BOOL installPlugin(void); - BOOL uninstallPlugin(void); + sal_Bool isInstalled(void); + sal_Bool installPlugin(void); + sal_Bool uninstallPlugin(void); MozPluginTabPage( Window* pParent, const SfxItemSet& rSet ); virtual ~MozPluginTabPage(); @@ -295,7 +295,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; @@ -331,7 +331,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index 702ad5ac7..8d487dcf0 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -206,7 +206,7 @@ SvxJavaOptionsPage::~SvxJavaOptionsPage() IMPL_LINK( SvxJavaOptionsPage, EnableHdl_Impl, CheckBox *, EMPTYARG ) { - BOOL bEnable = m_aJavaEnableCB.IsChecked(); + sal_Bool bEnable = m_aJavaEnableCB.IsChecked(); m_aJavaFoundLabel.Enable( bEnable ); m_aJavaPathText.Enable( bEnable ); m_aAddBtn.Enable( bEnable ); @@ -508,7 +508,7 @@ void SvxJavaOptionsPage::AddJRE( JavaInfo* _pInfo ) void SvxJavaOptionsPage::HandleCheckEntry( SvLBoxEntry* _pEntry ) { - m_aJavaList.Select( _pEntry, TRUE ); + m_aJavaList.Select( _pEntry, sal_True ); SvButtonState eState = m_aJavaList.GetCheckButtonState( _pEntry ); if ( SV_BUTTON_CHECKED == eState ) @@ -606,9 +606,9 @@ SfxTabPage* SvxJavaOptionsPage::Create( Window* pParent, const SfxItemSet& rAttr // ----------------------------------------------------------------------- -BOOL SvxJavaOptionsPage::FillItemSet( SfxItemSet& /*rCoreSet*/ ) +sal_Bool SvxJavaOptionsPage::FillItemSet( SfxItemSet& /*rCoreSet*/ ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; javaFrameworkError eErr = JFW_E_NONE; if ( m_pParamDlg ) { @@ -624,7 +624,7 @@ BOOL SvxJavaOptionsPage::FillItemSet( SfxItemSet& /*rCoreSet*/ ) "SvxJavaOptionsPage::FillItemSet(): error in jfw_setVMParameters" ); pParamArrIter = pParamArr; rtl_freeMemory( pParamArr ); - bModified = TRUE; + bModified = sal_True; } if ( m_pPathDlg ) @@ -635,17 +635,17 @@ BOOL SvxJavaOptionsPage::FillItemSet( SfxItemSet& /*rCoreSet*/ ) eErr = jfw_setUserClassPath( sPath.pData ); DBG_ASSERT( JFW_E_NONE == eErr, "SvxJavaOptionsPage::FillItemSet(): error in jfw_setUserClassPath" ); - bModified = TRUE; + bModified = sal_True; } } - ULONG nCount = m_aJavaList.GetEntryCount(); - for ( ULONG i = 0; i < nCount; ++i ) + sal_uLong nCount = m_aJavaList.GetEntryCount(); + for ( sal_uLong i = 0; i < nCount; ++i ) { if ( m_aJavaList.GetCheckButtonState( m_aJavaList.GetEntry(i) ) == SV_BUTTON_CHECKED ) { JavaInfo* pInfo = NULL; - if ( i < static_cast< ULONG >( m_nInfoSize ) ) + if ( i < static_cast< sal_uLong >( m_nInfoSize ) ) pInfo = m_parJavaInfo[i]; else pInfo = m_aAddedInfos[ i - m_nInfoSize ]; @@ -670,7 +670,7 @@ BOOL SvxJavaOptionsPage::FillItemSet( SfxItemSet& /*rCoreSet*/ ) eErr = jfw_setSelectedJRE( pInfo ); DBG_ASSERT( JFW_E_NONE == eErr, "SvxJavaOptionsPage::FillItemSet(): error in jfw_setSelectedJRE" ); - bModified = TRUE; + bModified = sal_True; } } jfw_freeJavaInfo( pSelectedJava ); @@ -687,7 +687,7 @@ BOOL SvxJavaOptionsPage::FillItemSet( SfxItemSet& /*rCoreSet*/ ) eErr = jfw_setEnabled( m_aJavaEnableCB.IsChecked() ); DBG_ASSERT( JFW_E_NONE == eErr, "SvxJavaOptionsPage::FillItemSet(): error in jfw_setEnabled" ); - bModified = TRUE; + bModified = sal_True; } return bModified; @@ -772,7 +772,7 @@ IMPL_LINK( SvxJavaParameterDlg, AssignHdl_Impl, PushButton *, EMPTYARG ) String sParam = STRIM( m_aParameterEdit.GetText() ); if ( sParam.Len() > 0 ) { - USHORT nPos = m_aAssignedList.GetEntryPos( sParam ); + sal_uInt16 nPos = m_aAssignedList.GetEntryPos( sParam ); if ( LISTBOX_ENTRY_NOTFOUND == nPos ) nPos = m_aAssignedList.InsertEntry( sParam ); m_aAssignedList.SelectEntryPos( nPos ); @@ -796,7 +796,7 @@ IMPL_LINK( SvxJavaParameterDlg, SelectHdl_Impl, ListBox *, EMPTYARG ) IMPL_LINK( SvxJavaParameterDlg, DblClickHdl_Impl, ListBox *, EMPTYARG ) { - USHORT nPos = m_aAssignedList.GetSelectEntryPos(); + sal_uInt16 nPos = m_aAssignedList.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) m_aParameterEdit.SetText( m_aAssignedList.GetEntry( nPos ) ); return 0; @@ -806,11 +806,11 @@ IMPL_LINK( SvxJavaParameterDlg, DblClickHdl_Impl, ListBox *, EMPTYARG ) IMPL_LINK( SvxJavaParameterDlg, RemoveHdl_Impl, PushButton *, EMPTYARG ) { - USHORT nPos = m_aAssignedList.GetSelectEntryPos(); + sal_uInt16 nPos = m_aAssignedList.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { m_aAssignedList.RemoveEntry( nPos ); - USHORT nCount = m_aAssignedList.GetEntryCount(); + sal_uInt16 nCount = m_aAssignedList.GetEntryCount(); if ( nCount ) { if ( nPos >= nCount ) @@ -836,10 +836,10 @@ short SvxJavaParameterDlg::Execute() Sequence< ::rtl::OUString > SvxJavaParameterDlg::GetParameters() const { - USHORT nCount = m_aAssignedList.GetEntryCount(); + sal_uInt16 nCount = m_aAssignedList.GetEntryCount(); Sequence< ::rtl::OUString > aParamList( nCount ); ::rtl::OUString* pArray = aParamList.getArray(); - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) pArray[i] = ::rtl::OUString( m_aAssignedList.GetEntry(i) ); return aParamList; } @@ -849,7 +849,7 @@ Sequence< ::rtl::OUString > SvxJavaParameterDlg::GetParameters() const void SvxJavaParameterDlg::SetParameters( Sequence< ::rtl::OUString >& rParams ) { m_aAssignedList.Clear(); - ULONG i, nCount = rParams.getLength(); + sal_uLong i, nCount = rParams.getLength(); const ::rtl::OUString* pArray = rParams.getConstArray(); for ( i = 0; i < nCount; ++i ) { @@ -914,7 +914,7 @@ SvxJavaClassPathDlg::SvxJavaClassPathDlg( Window* pParent ) : SvxJavaClassPathDlg::~SvxJavaClassPathDlg() { - USHORT i, nCount = m_aPathList.GetEntryCount(); + sal_uInt16 i, nCount = m_aPathList.GetEntryCount(); for ( i = 0; i < nCount; ++i ) delete static_cast< String* >( m_aPathList.GetEntryData(i) ); } @@ -942,7 +942,7 @@ IMPL_LINK( SvxJavaClassPathDlg, AddArchiveHdl_Impl, PushButton *, EMPTYARG ) String sFile = aURL.getFSysPath( INetURLObject::FSYS_DETECT ); if ( !IsPathDuplicate( sURL ) ) { - USHORT nPos = m_aPathList.InsertEntry( sFile, SvFileInformationManager::GetImage( aURL ) ); + sal_uInt16 nPos = m_aPathList.InsertEntry( sFile, SvFileInformationManager::GetImage( aURL ) ); m_aPathList.SelectEntryPos( nPos ); } else @@ -980,7 +980,7 @@ IMPL_LINK( SvxJavaClassPathDlg, AddPathHdl_Impl, PushButton *, EMPTYARG ) String sNewFolder = aURL.getFSysPath( INetURLObject::FSYS_DETECT ); if ( !IsPathDuplicate( sFolderURL ) ) { - USHORT nPos = m_aPathList.InsertEntry( sNewFolder, SvFileInformationManager::GetImage( aURL ) ); + sal_uInt16 nPos = m_aPathList.InsertEntry( sNewFolder, SvFileInformationManager::GetImage( aURL ) ); m_aPathList.SelectEntryPos( nPos ); } else @@ -998,11 +998,11 @@ IMPL_LINK( SvxJavaClassPathDlg, AddPathHdl_Impl, PushButton *, EMPTYARG ) IMPL_LINK( SvxJavaClassPathDlg, RemoveHdl_Impl, PushButton *, EMPTYARG ) { - USHORT nPos = m_aPathList.GetSelectEntryPos(); + sal_uInt16 nPos = m_aPathList.GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { m_aPathList.RemoveEntry( nPos ); - USHORT nCount = m_aPathList.GetEntryCount(); + sal_uInt16 nCount = m_aPathList.GetEntryCount(); if ( nCount ) { if ( nPos >= nCount ) @@ -1029,8 +1029,8 @@ bool SvxJavaClassPathDlg::IsPathDuplicate( const String& _rPath ) { bool bRet = false; INetURLObject aFileObj( _rPath ); - USHORT nCount = m_aPathList.GetEntryCount(); - for ( USHORT i = 0; i < nCount; ++i ) + sal_uInt16 nCount = m_aPathList.GetEntryCount(); + for ( sal_uInt16 i = 0; i < nCount; ++i ) { INetURLObject aOtherObj( m_aPathList.GetEntry(i), INetURLObject::FSYS_DETECT ); if ( aOtherObj == aFileObj ) @@ -1048,8 +1048,8 @@ bool SvxJavaClassPathDlg::IsPathDuplicate( const String& _rPath ) String SvxJavaClassPathDlg::GetClassPath() const { String sPath; - USHORT nCount = m_aPathList.GetEntryCount(); - for ( USHORT i = 0; i < nCount; ++i ) + sal_uInt16 nCount = m_aPathList.GetEntryCount(); + for ( sal_uInt16 i = 0; i < nCount; ++i ) { if ( sPath.Len() > 0 ) sPath += CLASSPATH_DELIMITER; diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx index d74b21b41..d6faf1ee2 100644 --- a/cui/source/options/optjava.hxx +++ b/cui/source/options/optjava.hxx @@ -104,7 +104,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void FillUserData(); }; diff --git a/cui/source/options/optjsearch.cxx b/cui/source/options/optjsearch.cxx index 7a3c35098..af7d12ad9 100644 --- a/cui/source/options/optjsearch.cxx +++ b/cui/source/options/optjsearch.cxx @@ -66,7 +66,7 @@ SvxJSearchOptionsPage::SvxJSearchOptionsPage( Window* pParent, const SfxItemSet& aIgnoreMiddleDot ( this, CUI_RES( CB_IGNORE_MIDDLE_DOT ) ) { FreeResource(); - bSaveOptions = TRUE; + bSaveOptions = sal_True; nTransliterationFlags = 0x00000000; } @@ -82,9 +82,9 @@ SfxTabPage* SvxJSearchOptionsPage::Create( Window* pParent, const SfxItemSet& r } -void SvxJSearchOptionsPage::SetTransliterationFlags( INT32 nSettings ) +void SvxJSearchOptionsPage::SetTransliterationFlags( sal_Int32 nSettings ) { - BOOL bVal = 0 != (nSettings & TransliterationModules_IGNORE_CASE); + sal_Bool bVal = 0 != (nSettings & TransliterationModules_IGNORE_CASE); aMatchCase .Check( bVal ); //! treat as equal uppercase/lowercase bVal = 0 != (nSettings & TransliterationModules_IGNORE_WIDTH); aMatchFullHalfWidth .Check( bVal ); @@ -127,9 +127,9 @@ void SvxJSearchOptionsPage::SetTransliterationFlags( INT32 nSettings ) } -INT32 SvxJSearchOptionsPage::GetTransliterationFlags_Impl() +sal_Int32 SvxJSearchOptionsPage::GetTransliterationFlags_Impl() { - INT32 nTmp = 0; + sal_Int32 nTmp = 0; if (aMatchCase.IsChecked()) //! treat as equal uppercase/lowercase nTmp |= TransliterationModules_IGNORE_CASE; if (aMatchFullHalfWidth.IsChecked()) @@ -225,153 +225,153 @@ void SvxJSearchOptionsPage::Reset( const SfxItemSet& ) } -BOOL SvxJSearchOptionsPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxJSearchOptionsPage::FillItemSet( SfxItemSet& ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; - INT32 nOldVal = nTransliterationFlags; + sal_Int32 nOldVal = nTransliterationFlags; nTransliterationFlags = GetTransliterationFlags_Impl(); bModified = nOldVal != nTransliterationFlags; if (!IsSaveOptions()) return bModified; - bModified = FALSE; + bModified = sal_False; SvtSearchOptions aOpt; - BOOL bNewVal, bChanged; + sal_Bool bNewVal, bChanged; bNewVal = aMatchCase.IsChecked(); //! treat as equal uppercase/lowercase bChanged = bNewVal != aMatchCase.GetSavedValue(); if (bChanged) { aOpt.SetMatchCase(!bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchFullHalfWidth.IsChecked(); bChanged = bNewVal != aMatchFullHalfWidth.GetSavedValue(); if (bChanged) { aOpt.SetMatchFullHalfWidthForms( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchHiraganaKatakana.IsChecked(); bChanged = bNewVal != aMatchHiraganaKatakana.GetSavedValue(); if (bChanged) { aOpt.SetMatchHiraganaKatakana( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchContractions.IsChecked(); bChanged = bNewVal != aMatchContractions.GetSavedValue(); if (bChanged) { aOpt.SetMatchContractions( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchMinusDashChoon.IsChecked(); bChanged = bNewVal != aMatchMinusDashChoon.GetSavedValue(); if (bChanged) { aOpt.SetMatchMinusDashChoon( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchRepeatCharMarks.IsChecked(); bChanged = bNewVal != aMatchRepeatCharMarks.GetSavedValue(); if (bChanged) { aOpt.SetMatchRepeatCharMarks( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchVariantFormKanji.IsChecked(); bChanged = bNewVal != aMatchVariantFormKanji.GetSavedValue(); if (bChanged) { aOpt.SetMatchVariantFormKanji( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchOldKanaForms.IsChecked(); bChanged = bNewVal != aMatchOldKanaForms.GetSavedValue(); if (bChanged) { aOpt.SetMatchOldKanaForms( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchDiziDuzu.IsChecked(); bChanged = bNewVal != aMatchDiziDuzu.GetSavedValue(); if (bChanged) { aOpt.SetMatchDiziDuzu( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchBavaHafa.IsChecked(); bChanged = bNewVal != aMatchBavaHafa.GetSavedValue(); if (bChanged) { aOpt.SetMatchBavaHafa( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchTsithichiDhizi.IsChecked(); bChanged = bNewVal != aMatchTsithichiDhizi.GetSavedValue(); if (bChanged) { aOpt.SetMatchTsithichiDhizi( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchHyuiyuByuvyu.IsChecked(); bChanged = bNewVal != aMatchHyuiyuByuvyu.GetSavedValue(); if (bChanged) { aOpt.SetMatchHyuiyuByuvyu( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchSesheZeje.IsChecked(); bChanged = bNewVal != aMatchSesheZeje.GetSavedValue(); if (bChanged) { aOpt.SetMatchSesheZeje( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchIaiya.IsChecked(); bChanged = bNewVal != aMatchIaiya.GetSavedValue(); if (bChanged) { aOpt.SetMatchIaiya( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchKiku.IsChecked(); bChanged = bNewVal != aMatchKiku.GetSavedValue(); if (bChanged) { aOpt.SetMatchKiku( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aIgnorePunctuation.IsChecked(); bChanged = bNewVal != aIgnorePunctuation.GetSavedValue(); if (bChanged) { aOpt.SetIgnorePunctuation( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aIgnoreWhitespace.IsChecked(); bChanged = bNewVal != aIgnoreWhitespace.GetSavedValue(); if (bChanged) { aOpt.SetIgnoreWhitespace( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aMatchProlongedSoundMark.IsChecked(); bChanged = bNewVal != aMatchProlongedSoundMark.GetSavedValue(); if (bChanged) { aOpt.SetIgnoreProlongedSoundMark( bNewVal ); - bModified = TRUE; + bModified = sal_True; } bNewVal = aIgnoreMiddleDot.IsChecked(); bChanged = bNewVal != aIgnoreMiddleDot.GetSavedValue(); if (bChanged) { aOpt.SetIgnoreMiddleDot( bNewVal ); - bModified = TRUE; + bModified = sal_True; } return bModified; diff --git a/cui/source/options/optjsearch.hxx b/cui/source/options/optjsearch.hxx index 47deff1cb..fc27c17ea 100644 --- a/cui/source/options/optjsearch.hxx +++ b/cui/source/options/optjsearch.hxx @@ -64,10 +64,10 @@ private: CheckBox aIgnoreWhitespace; CheckBox aIgnoreMiddleDot; - INT32 nTransliterationFlags; - BOOL bSaveOptions; + sal_Int32 nTransliterationFlags; + sal_Bool bSaveOptions; - INT32 GetTransliterationFlags_Impl(); + sal_Int32 GetTransliterationFlags_Impl(); protected: SvxJSearchOptionsPage( Window* pParent, const SfxItemSet& rSet ); @@ -78,13 +78,13 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); - BOOL IsSaveOptions() const { return bSaveOptions; } - void EnableSaveOptions( BOOL bVal ) { bSaveOptions = bVal; } + sal_Bool IsSaveOptions() const { return bSaveOptions; } + void EnableSaveOptions( sal_Bool bVal ) { bSaveOptions = bVal; } - INT32 GetTransliterationFlags() const { return nTransliterationFlags; } - void SetTransliterationFlags( INT32 nSettings ); + sal_Int32 GetTransliterationFlags() const { return nTransliterationFlags; } + void SetTransliterationFlags( sal_Int32 nSettings ); }; ////////////////////////////////////////////////////////////////////// diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index c37e6c9fa..329d64bbc 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -104,13 +104,13 @@ static const sal_Char cThes[] = SN_THESAURUS; // static ---------------------------------------------------------------- -static Sequence< INT16 > lcl_LocaleSeqToLangSeq( const Sequence< Locale > &rSeq ) +static Sequence< sal_Int16 > lcl_LocaleSeqToLangSeq( const Sequence< Locale > &rSeq ) { - INT32 nLen = rSeq.getLength(); - Sequence< INT16 > aRes( nLen ); - INT16 *pRes = aRes.getArray(); + sal_Int32 nLen = rSeq.getLength(); + Sequence< sal_Int16 > aRes( nLen ); + sal_Int16 *pRes = aRes.getArray(); const Locale *pSeq = rSeq.getConstArray(); - for (INT32 i = 0; i < nLen; ++i) + for (sal_Int32 i = 0; i < nLen; ++i) { pRes[i] = SvxLocaleToLanguage( pSeq[i] ); } @@ -118,25 +118,25 @@ static Sequence< INT16 > lcl_LocaleSeqToLangSeq( const Sequence< Locale > &rSeq } -static BOOL lcl_SeqHasLang( const Sequence< INT16 > &rSeq, INT16 nLang ) +static sal_Bool lcl_SeqHasLang( const Sequence< sal_Int16 > &rSeq, sal_Int16 nLang ) { - INT32 nLen = rSeq.getLength(); - const INT16 *pLang = rSeq.getConstArray(); - INT32 nPos = -1; - for (INT32 i = 0; i < nLen && nPos < 0; ++i) + sal_Int32 nLen = rSeq.getLength(); + const sal_Int16 *pLang = rSeq.getConstArray(); + sal_Int32 nPos = -1; + for (sal_Int32 i = 0; i < nLen && nPos < 0; ++i) { if (nLang == pLang[i]) nPos = i; } - return nPos < 0 ? FALSE : TRUE; + return nPos < 0 ? sal_False : sal_True; } -static INT32 lcl_SeqGetEntryPos( +static sal_Int32 lcl_SeqGetEntryPos( const Sequence< OUString > &rSeq, const OUString &rEntry ) { - INT32 i; - INT32 nLen = rSeq.getLength(); + sal_Int32 i; + sal_Int32 nLen = rSeq.getLength(); const OUString *pItem = rSeq.getConstArray(); for (i = 0; i < nLen; ++i) { @@ -211,21 +211,21 @@ sal_Bool KillFile_Impl( const String& rURL ) // c: 1 -> checked 0 -> unchecked // n: index -#define TYPE_SPELL (BYTE)1 -#define TYPE_GRAMMAR (BYTE)2 -#define TYPE_HYPH (BYTE)3 -#define TYPE_THES (BYTE)4 +#define TYPE_SPELL (sal_uInt8)1 +#define TYPE_GRAMMAR (sal_uInt8)2 +#define TYPE_HYPH (sal_uInt8)3 +#define TYPE_THES (sal_uInt8)4 class ModuleUserData_Impl { - BOOL bParent; - BOOL bIsChecked; - BYTE nType; - BYTE nIndex; + sal_Bool bParent; + sal_Bool bIsChecked; + sal_uInt8 nType; + sal_uInt8 nIndex; String sImplName; public: - ModuleUserData_Impl( String sImpName, BOOL bIsParent, BOOL bChecked, BYTE nSetType, BYTE nSetIndex ) : + ModuleUserData_Impl( String sImpName, sal_Bool bIsParent, sal_Bool bChecked, sal_uInt8 nSetType, sal_uInt8 nSetIndex ) : bParent(bIsParent), bIsChecked(bChecked), nType(nSetType), @@ -233,11 +233,11 @@ public: sImplName(sImpName) { } - BOOL IsParent() const {return bParent;} - BYTE GetType() const {return nType;} - BOOL IsChecked() const {return bIsChecked;} - BYTE GetIndex() const {return nIndex;} - void SetIndex(BYTE nSet) {nIndex = nSet;} + sal_Bool IsParent() const {return bParent;} + sal_uInt8 GetType() const {return nType;} + sal_Bool IsChecked() const {return bIsChecked;} + sal_uInt8 GetIndex() const {return nIndex;} + void SetIndex(sal_uInt8 nSet) {nIndex = nSet;} const String& GetImplName() const {return sImplName;} }; @@ -249,45 +249,45 @@ public: // class DicUserData { - ULONG nVal; + sal_uLong nVal; public: - DicUserData( ULONG nUserData ) : nVal( nUserData ) {} - DicUserData( USHORT nEID, - BOOL bChecked, BOOL bEditable, BOOL bDeletable ); + DicUserData( sal_uLong nUserData ) : nVal( nUserData ) {} + DicUserData( sal_uInt16 nEID, + sal_Bool bChecked, sal_Bool bEditable, sal_Bool bDeletable ); - ULONG GetUserData() const { return nVal; } - USHORT GetEntryId() const { return (USHORT)(nVal >> 16); } - BOOL IsChecked() const { return (BOOL)(nVal >> 8) & 0x01; } - BOOL IsEditable() const { return (BOOL)(nVal >> 9) & 0x01; } - BOOL IsDeletable() const { return (BOOL)(nVal >> 10) & 0x01; } + sal_uLong GetUserData() const { return nVal; } + sal_uInt16 GetEntryId() const { return (sal_uInt16)(nVal >> 16); } + sal_Bool IsChecked() const { return (sal_Bool)(nVal >> 8) & 0x01; } + sal_Bool IsEditable() const { return (sal_Bool)(nVal >> 9) & 0x01; } + sal_Bool IsDeletable() const { return (sal_Bool)(nVal >> 10) & 0x01; } - void SetChecked( BOOL bVal ); + void SetChecked( sal_Bool bVal ); }; DicUserData::DicUserData( - USHORT nEID, - BOOL bChecked, BOOL bEditable, BOOL bDeletable ) + sal_uInt16 nEID, + sal_Bool bChecked, sal_Bool bEditable, sal_Bool bDeletable ) { DBG_ASSERT( nEID < 65000, "Entry Id out of range" ); - nVal = ((ULONG)(0xFFFF & nEID) << 16) | - ((ULONG)(bChecked ? 1 : 0) << 8) | - ((ULONG)(bEditable ? 1 : 0) << 9) | - ((ULONG)(bDeletable ? 1 : 0) << 10); + nVal = ((sal_uLong)(0xFFFF & nEID) << 16) | + ((sal_uLong)(bChecked ? 1 : 0) << 8) | + ((sal_uLong)(bEditable ? 1 : 0) << 9) | + ((sal_uLong)(bDeletable ? 1 : 0) << 10); } -void DicUserData::SetChecked( BOOL bVal ) +void DicUserData::SetChecked( sal_Bool bVal ) { nVal &= ~(1UL << 8); - nVal |= (ULONG)(bVal ? 1 : 0) << 8; + nVal |= (sal_uLong)(bVal ? 1 : 0) << 8; } // class BrwString_Impl ------------------------------------------------- -void lcl_SetCheckButton( SvLBoxEntry* pEntry, BOOL bCheck ) +void lcl_SetCheckButton( SvLBoxEntry* pEntry, sal_Bool bCheck ) { SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXBUTTON)); @@ -307,14 +307,14 @@ class BrwStringDic_Impl : public SvLBoxString { public: - BrwStringDic_Impl( SvLBoxEntry* pEntry, USHORT nFlags, + BrwStringDic_Impl( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rStr ) : SvLBoxString( pEntry, nFlags, rStr ) {} - virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, + virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry); }; -void BrwStringDic_Impl::Paint( const Point& rPos, SvLBox& rDev, USHORT, +void BrwStringDic_Impl::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16, SvLBoxEntry* pEntry ) { ModuleUserData_Impl* pData = (ModuleUserData_Impl*)pEntry->GetUserData(); @@ -412,52 +412,52 @@ static inline String lcl_GetPropertyName( EID_OPTIONS eEntryId ) class OptionsUserData { - ULONG nVal; + sal_uLong nVal; void SetModified(); public: - OptionsUserData( ULONG nUserData ) : nVal( nUserData ) {} - OptionsUserData( USHORT nEID, - BOOL bHasNV, USHORT nNumVal, - BOOL bCheckable, BOOL bChecked ); - - ULONG GetUserData() const { return nVal; } - USHORT GetEntryId() const { return (USHORT)(nVal >> 16); } - BOOL HasNumericValue() const { return (BOOL)(nVal >> 10) & 0x01; } - USHORT GetNumericValue() const { return (USHORT)(nVal & 0xFF); } - BOOL IsChecked() const { return (BOOL)(nVal >> 8) & 0x01; } - BOOL IsCheckable() const { return (BOOL)(nVal >> 9) & 0x01; } - BOOL IsModified() const { return (BOOL)(nVal >> 11) & 0x01; } - - void SetChecked( BOOL bVal ); - void SetNumericValue( BYTE nNumVal ); + OptionsUserData( sal_uLong nUserData ) : nVal( nUserData ) {} + OptionsUserData( sal_uInt16 nEID, + sal_Bool bHasNV, sal_uInt16 nNumVal, + sal_Bool bCheckable, sal_Bool bChecked ); + + sal_uLong GetUserData() const { return nVal; } + sal_uInt16 GetEntryId() const { return (sal_uInt16)(nVal >> 16); } + sal_Bool HasNumericValue() const { return (sal_Bool)(nVal >> 10) & 0x01; } + sal_uInt16 GetNumericValue() const { return (sal_uInt16)(nVal & 0xFF); } + sal_Bool IsChecked() const { return (sal_Bool)(nVal >> 8) & 0x01; } + sal_Bool IsCheckable() const { return (sal_Bool)(nVal >> 9) & 0x01; } + sal_Bool IsModified() const { return (sal_Bool)(nVal >> 11) & 0x01; } + + void SetChecked( sal_Bool bVal ); + void SetNumericValue( sal_uInt8 nNumVal ); }; -OptionsUserData::OptionsUserData( USHORT nEID, - BOOL bHasNV, USHORT nNumVal, - BOOL bCheckable, BOOL bChecked ) +OptionsUserData::OptionsUserData( sal_uInt16 nEID, + sal_Bool bHasNV, sal_uInt16 nNumVal, + sal_Bool bCheckable, sal_Bool bChecked ) { DBG_ASSERT( nEID < 65000, "Entry Id out of range" ); DBG_ASSERT( nNumVal < 256, "value out of range" ); - nVal = ((ULONG)(0xFFFF & nEID) << 16) | - ((ULONG)(bHasNV ? 1 : 0) << 10) | - ((ULONG)(bCheckable ? 1 : 0) << 9) | - ((ULONG)(bChecked ? 1 : 0) << 8) | - ((ULONG)(0xFF & nNumVal)); + nVal = ((sal_uLong)(0xFFFF & nEID) << 16) | + ((sal_uLong)(bHasNV ? 1 : 0) << 10) | + ((sal_uLong)(bCheckable ? 1 : 0) << 9) | + ((sal_uLong)(bChecked ? 1 : 0) << 8) | + ((sal_uLong)(0xFF & nNumVal)); } -void OptionsUserData::SetChecked( BOOL bVal ) +void OptionsUserData::SetChecked( sal_Bool bVal ) { if (IsCheckable() && (IsChecked() != bVal)) { nVal &= ~(1UL << 8); - nVal |= (ULONG)(bVal ? 1 : 0) << 8; + nVal |= (sal_uLong)(bVal ? 1 : 0) << 8; SetModified(); } } -void OptionsUserData::SetNumericValue( BYTE nNumVal ) +void OptionsUserData::SetNumericValue( sal_uInt8 nNumVal ) { // DBG_ASSERT( nNumVal < 256, "value out of range" ); if (HasNumericValue() && (GetNumericValue() != nNumVal)) @@ -470,7 +470,7 @@ void OptionsUserData::SetNumericValue( BYTE nNumVal ) void OptionsUserData::SetModified() { - nVal |= (ULONG)1 << 11; + nVal |= (sal_uLong)1 << 11; } // class BrwString_Impl ------------------------------------------------- @@ -479,14 +479,14 @@ class BrwString_Impl : public SvLBoxString { public: - BrwString_Impl( SvLBoxEntry* pEntry, USHORT nFlags, + BrwString_Impl( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rStr ) : SvLBoxString( pEntry, nFlags, rStr ) {} - virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, + virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry); }; -void BrwString_Impl::Paint( const Point& rPos, SvLBox& rDev, USHORT, +void BrwString_Impl::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16, SvLBoxEntry* pEntry ) { Point aPos(rPos); @@ -500,10 +500,10 @@ void BrwString_Impl::Paint( const Point& rPos, SvLBox& rDev, USHORT, Font aFont( aOldFont ); aFont.SetWeight( WEIGHT_BOLD ); -// BOOL bFett = TRUE; -// USHORT nPos = 0; +// sal_Bool bFett = sal_True; +// sal_uInt16 nPos = 0; //??? das untere byte aus dem user data in string wandeln - OptionsUserData aData( (ULONG) pEntry->GetUserData() ); + OptionsUserData aData( (sal_uLong) pEntry->GetUserData() ); if(aData.HasNumericValue()) { String sTxt( ' ' ); @@ -532,13 +532,13 @@ struct ServiceInfo_Impl uno::Reference< XHyphenator > xHyph; uno::Reference< XThesaurus > xThes; uno::Reference< XProofreader > xGrammar; - BOOL bConfigured; + sal_Bool bConfigured; ServiceInfo_Impl() : bConfigured(sal_False) {} }; typedef std::vector< ServiceInfo_Impl > ServiceInfoArr; -typedef std::map< INT16 /*LanguageType*/, Sequence< OUString > > LangImplNameTable; +typedef std::map< sal_Int16 /*LanguageType*/, Sequence< OUString > > LangImplNameTable; // SvxLinguData_Impl ---------------------------------------------------- @@ -547,7 +547,7 @@ class SvxLinguData_Impl { //contains services and implementation names sorted by implementation names ServiceInfoArr aDisplayServiceArr; - ULONG nDisplayServices; + sal_uLong nDisplayServices; Sequence< Locale > aAllServiceLocales; LangImplNameTable aCfgSpellTable; @@ -559,7 +559,7 @@ class SvxLinguData_Impl sal_Bool AddRemove( Sequence< OUString > &rConfigured, - const OUString &rImplName, BOOL bAdd ); + const OUString &rImplName, sal_Bool bAdd ); public: SvxLinguData_Impl(); @@ -571,7 +571,7 @@ public: uno::Reference<XLinguServiceManager> & GetManager() { return xLinguSrvcMgr; } void SetChecked( const Sequence< OUString > &rConfiguredServices ); - void Reconfigure( const OUString &rDisplayName, BOOL bEnable ); + void Reconfigure( const OUString &rDisplayName, sal_Bool bEnable ); const Sequence<Locale> & GetAllSupportedLocales() { return aAllServiceLocales; } @@ -587,8 +587,8 @@ public: const ServiceInfoArr & GetDisplayServiceArray() const { return aDisplayServiceArr; } ServiceInfoArr & GetDisplayServiceArray() { return aDisplayServiceArr; } - const ULONG & GetDisplayServiceCount() const { return nDisplayServices; } - void SetDisplayServiceCount( ULONG nVal ) { nDisplayServices = nVal; } + const sal_uLong & GetDisplayServiceCount() const { return nDisplayServices; } + void SetDisplayServiceCount( sal_uLong nVal ) { nDisplayServices = nVal; } // returns the list of service implementation names for the specified // language and service (TYPE_SPELL, TYPE_HYPH, TYPE_THES) sorted in @@ -597,18 +597,18 @@ public: // I.e. the ones available but not configured in arbitrary order). // They available ones may contain names that do not(!) support that // language. - Sequence< OUString > GetSortedImplNames( INT16 nLang, BYTE nType ); + Sequence< OUString > GetSortedImplNames( sal_Int16 nLang, sal_uInt8 nType ); ServiceInfo_Impl * GetInfoByImplName( const OUString &rSvcImplName ); }; -INT32 lcl_SeqGetIndex( const Sequence< OUString > &rSeq, const OUString &rTxt ) +sal_Int32 lcl_SeqGetIndex( const Sequence< OUString > &rSeq, const OUString &rTxt ) { - INT32 nRes = -1; - INT32 nLen = rSeq.getLength(); + sal_Int32 nRes = -1; + sal_Int32 nLen = rSeq.getLength(); const OUString *pString = rSeq.getConstArray(); - for (INT32 i = 0; i < nLen && nRes == -1; ++i) + for (sal_Int32 i = 0; i < nLen && nRes == -1; ++i) { if (pString[i] == rTxt) nRes = i; @@ -617,7 +617,7 @@ INT32 lcl_SeqGetIndex( const Sequence< OUString > &rSeq, const OUString &rTxt ) } -Sequence< OUString > SvxLinguData_Impl::GetSortedImplNames( INT16 nLang, BYTE nType ) +Sequence< OUString > SvxLinguData_Impl::GetSortedImplNames( sal_Int16 nLang, sal_uInt8 nType ) { LangImplNameTable *pTable = 0; switch (nType) @@ -630,13 +630,13 @@ Sequence< OUString > SvxLinguData_Impl::GetSortedImplNames( INT16 nLang, BYTE nT Sequence< OUString > aRes; if (pTable->count( nLang )) aRes = (*pTable)[ nLang ]; // add configured services - INT32 nIdx = aRes.getLength(); - DBG_ASSERT( (INT32) nDisplayServices >= nIdx, "size mismatch" ); + sal_Int32 nIdx = aRes.getLength(); + DBG_ASSERT( (sal_Int32) nDisplayServices >= nIdx, "size mismatch" ); aRes.realloc( nDisplayServices ); OUString *pRes = aRes.getArray(); // add not configured services - for (INT32 i = 0; i < (INT32) nDisplayServices; ++i) + for (sal_Int32 i = 0; i < (sal_Int32) nDisplayServices; ++i) { const ServiceInfo_Impl &rInfo = aDisplayServiceArr[ i ]; OUString aImplName; @@ -666,7 +666,7 @@ Sequence< OUString > SvxLinguData_Impl::GetSortedImplNames( INT16 nLang, BYTE nT ServiceInfo_Impl * SvxLinguData_Impl::GetInfoByImplName( const OUString &rSvcImplName ) { ServiceInfo_Impl* pInfo = 0; - for (ULONG i = 0; i < nDisplayServices && !pInfo; ++i) + for (sal_uLong i = 0; i < nDisplayServices && !pInfo; ++i) { ServiceInfo_Impl &rTmp = aDisplayServiceArr[ i ]; if (rTmp.sSpellImplName == rSvcImplName || @@ -715,13 +715,13 @@ void lcl_MergeDisplayArray( SvxLinguData_Impl &rData, const ServiceInfo_Impl &rToAdd ) { - ULONG nCnt = 0; + sal_uLong nCnt = 0; ServiceInfoArr &rSvcInfoArr = rData.GetDisplayServiceArray(); - ULONG nEntries = rData.GetDisplayServiceCount(); + sal_uLong nEntries = rData.GetDisplayServiceCount(); ServiceInfo_Impl* pEntry; - for (ULONG i = 0; i < nEntries; ++i) + for (sal_uLong i = 0; i < nEntries; ++i) { pEntry = &rSvcInfoArr[i]; if (pEntry && pEntry->sDisplayName == rToAdd.sDisplayName) @@ -886,7 +886,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() : const Locale* pAllLocales = aAllServiceLocales.getConstArray(); for(sal_Int32 nLocale = 0; nLocale < aAllServiceLocales.getLength(); nLocale++) { - INT16 nLang = SvxLocaleToLanguage( pAllLocales[nLocale] ); + sal_Int16 nLang = SvxLocaleToLanguage( pAllLocales[nLocale] ); aCfgSvcs = xLinguSrvcMgr->getConfiguredServices(C2U(cSpell), pAllLocales[nLocale]); SetChecked( aCfgSvcs ); @@ -956,7 +956,7 @@ void SvxLinguData_Impl::SetChecked(const Sequence<OUString>& rConfiguredServices for(sal_Int32 n = 0; n < rConfiguredServices.getLength(); n++) { ServiceInfo_Impl* pEntry; - for (ULONG i = 0; i < nDisplayServices; ++i) + for (sal_uLong i = 0; i < nDisplayServices; ++i) { pEntry = &aDisplayServiceArr[i]; if (pEntry && !pEntry->bConfigured) @@ -981,12 +981,12 @@ void SvxLinguData_Impl::SetChecked(const Sequence<OUString>& rConfiguredServices sal_Bool SvxLinguData_Impl::AddRemove( Sequence< OUString > &rConfigured, - const OUString &rImplName, BOOL bAdd ) + const OUString &rImplName, sal_Bool bAdd ) { sal_Bool bRet = sal_False; // modified? - INT32 nEntries = rConfigured.getLength(); - INT32 nPos = lcl_SeqGetEntryPos(rConfigured, rImplName); + sal_Int32 nEntries = rConfigured.getLength(); + sal_Int32 nPos = lcl_SeqGetEntryPos(rConfigured, rImplName); if (bAdd && nPos < 0) // add new entry { rConfigured.realloc( ++nEntries ); @@ -998,7 +998,7 @@ sal_Bool SvxLinguData_Impl::AddRemove( else if (!bAdd && nPos >= 0) // remove existing entry { OUString *pConfigured = rConfigured.getArray(); - for (INT32 i = nPos; i < nEntries - 1; ++i) + for (sal_Int32 i = nPos; i < nEntries - 1; ++i) pConfigured[i] = pConfigured[i + 1]; rConfigured.realloc(--nEntries); bRet = sal_True; @@ -1008,13 +1008,13 @@ sal_Bool SvxLinguData_Impl::AddRemove( } -void SvxLinguData_Impl::Reconfigure( const OUString &rDisplayName, BOOL bEnable ) +void SvxLinguData_Impl::Reconfigure( const OUString &rDisplayName, sal_Bool bEnable ) { DBG_ASSERT( rDisplayName.getLength(), "empty DisplayName" ); ServiceInfo_Impl *pInfo = 0; ServiceInfo_Impl *pTmp = 0; - for (ULONG i = 0; i < nDisplayServices; ++i) + for (sal_uLong i = 0; i < nDisplayServices; ++i) { pTmp = &aDisplayServiceArr[i]; if (pTmp && pTmp->sDisplayName == rDisplayName) @@ -1030,8 +1030,8 @@ void SvxLinguData_Impl::Reconfigure( const OUString &rDisplayName, BOOL bEnable Sequence< Locale > aLocales; const Locale *pLocale = 0; - INT32 nLocales = 0; - INT32 i; + sal_Int32 nLocales = 0; + sal_Int32 i; // update configured spellchecker entries if (pInfo->xSpell.is()) @@ -1041,7 +1041,7 @@ void SvxLinguData_Impl::Reconfigure( const OUString &rDisplayName, BOOL bEnable nLocales = aLocales.getLength(); for (i = 0; i < nLocales; ++i) { - INT16 nLang = SvxLocaleToLanguage( pLocale[i] ); + sal_Int16 nLang = SvxLocaleToLanguage( pLocale[i] ); if (!aCfgSpellTable.count( nLang ) && bEnable) aCfgSpellTable[ nLang ] = Sequence< OUString >(); if (aCfgSpellTable.count( nLang )) @@ -1057,7 +1057,7 @@ void SvxLinguData_Impl::Reconfigure( const OUString &rDisplayName, BOOL bEnable nLocales = aLocales.getLength(); for (i = 0; i < nLocales; ++i) { - INT16 nLang = SvxLocaleToLanguage( pLocale[i] ); + sal_Int16 nLang = SvxLocaleToLanguage( pLocale[i] ); if (!aCfgGrammarTable.count( nLang ) && bEnable) aCfgGrammarTable[ nLang ] = Sequence< OUString >(); if (aCfgGrammarTable.count( nLang )) @@ -1073,7 +1073,7 @@ void SvxLinguData_Impl::Reconfigure( const OUString &rDisplayName, BOOL bEnable nLocales = aLocales.getLength(); for (i = 0; i < nLocales; ++i) { - INT16 nLang = SvxLocaleToLanguage( pLocale[i] ); + sal_Int16 nLang = SvxLocaleToLanguage( pLocale[i] ); if (!aCfgHyphTable.count( nLang ) && bEnable) aCfgHyphTable[ nLang ] = Sequence< OUString >(); if (aCfgHyphTable.count( nLang )) @@ -1089,7 +1089,7 @@ void SvxLinguData_Impl::Reconfigure( const OUString &rDisplayName, BOOL bEnable nLocales = aLocales.getLength(); for (i = 0; i < nLocales; ++i) { - INT16 nLang = SvxLocaleToLanguage( pLocale[i] ); + sal_Int16 nLang = SvxLocaleToLanguage( pLocale[i] ); if (!aCfgThesTable.count( nLang ) && bEnable) aCfgThesTable[ nLang ] = Sequence< OUString >(); if (aCfgThesTable.count( nLang )) @@ -1250,7 +1250,7 @@ SfxTabPage* SvxLinguTabPage::Create( Window* pParent, //------------------------------------------------------------------------ -Any lcl_Bool2Any(BOOL bVal) +Any lcl_Bool2Any(sal_Bool bVal) { Any aRet(&bVal, ::getBooleanCppuType()); return aRet; @@ -1280,7 +1280,7 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet ) const LangImplNameTable *pTable = &pLinguData->GetSpellTable(); for (aIt = pTable->begin(); aIt != pTable->end(); ++aIt) { - INT16 nLang = aIt->first; + sal_Int16 nLang = aIt->first; const Sequence< OUString > aImplNames( aIt->second ); #if OSL_DEBUG_LEVEL > 1 const OUString *pTmpStr; @@ -1296,7 +1296,7 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet ) pTable = &pLinguData->GetGrammarTable(); for (aIt = pTable->begin(); aIt != pTable->end(); ++aIt) { - INT16 nLang = aIt->first; + sal_Int16 nLang = aIt->first; const Sequence< OUString > aImplNames( aIt->second ); #if OSL_DEBUG_LEVEL > 1 const OUString *pTmpStr; @@ -1312,7 +1312,7 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet ) pTable = &pLinguData->GetHyphTable(); for (aIt = pTable->begin(); aIt != pTable->end(); ++aIt) { - INT16 nLang = aIt->first; + sal_Int16 nLang = aIt->first; const Sequence< OUString > aImplNames( aIt->second ); #if OSL_DEBUG_LEVEL > 1 const OUString *pTmpStr; @@ -1328,7 +1328,7 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet ) pTable = &pLinguData->GetThesTable(); for (aIt = pTable->begin(); aIt != pTable->end(); ++aIt) { - INT16 nLang = aIt->first; + sal_Int16 nLang = aIt->first; const Sequence< OUString > aImplNames( aIt->second ); #if OSL_DEBUG_LEVEL > 1 const OUString *pTmpStr; @@ -1346,11 +1346,11 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet ) // activate dictionaries according to checkbox state // Sequence< OUString > aActiveDics; - INT32 nActiveDics = 0; - ULONG nEntries = aLinguDicsCLB.GetEntryCount(); - for (ULONG i = 0; i < nEntries; ++i) + sal_Int32 nActiveDics = 0; + sal_uLong nEntries = aLinguDicsCLB.GetEntryCount(); + for (sal_uLong i = 0; i < nEntries; ++i) { - INT32 nDics = aDics.getLength(); + sal_Int32 nDics = aDics.getLength(); // const uno::Reference< XDictionary > *pDic = aDics.getConstArray(); aActiveDics.realloc( nDics ); @@ -1359,15 +1359,15 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet ) SvLBoxEntry *pEntry = aLinguDicsCLB.GetEntry( i ); if (pEntry) { - DicUserData aData( (ULONG)pEntry->GetUserData() ); + DicUserData aData( (sal_uLong)pEntry->GetUserData() ); if (aData.GetEntryId() < nDics) { - BOOL bChecked = aLinguDicsCLB.IsChecked( (USHORT) i ); + sal_Bool bChecked = aLinguDicsCLB.IsChecked( (sal_uInt16) i ); uno::Reference< XDictionary > xDic( aDics.getConstArray()[ i ] ); if (xDic.is()) { if (SvxGetIgnoreAllList() == xDic) - bChecked = TRUE; + bChecked = sal_True; xDic->setActive( bChecked ); if (bChecked) @@ -1388,22 +1388,22 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet ) nEntries = aLinguOptionsCLB.GetEntryCount(); - for (USHORT j = 0; j < nEntries; ++j) + for (sal_uInt16 j = 0; j < nEntries; ++j) { SvLBoxEntry *pEntry = aLinguOptionsCLB.GetEntry( j ); - OptionsUserData aData( (ULONG)pEntry->GetUserData() ); + OptionsUserData aData( (sal_uLong)pEntry->GetUserData() ); String aPropName( lcl_GetPropertyName( (EID_OPTIONS) aData.GetEntryId() ) ); Any aAny; if (aData.IsCheckable()) { - BOOL bChecked = aLinguOptionsCLB.IsChecked( j ); + sal_Bool bChecked = aLinguOptionsCLB.IsChecked( j ); aAny <<= bChecked; } else if (aData.HasNumericValue()) { - INT16 nVal = aData.GetNumericValue(); + sal_Int16 nVal = aData.GetNumericValue(); aAny <<= nVal; } @@ -1412,26 +1412,26 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet ) aLngCfg.SetProperty( aPropName, aAny ); } - SvLBoxEntry *pPreBreakEntry = aLinguOptionsCLB.GetEntry( (USHORT) EID_NUM_PRE_BREAK ); - SvLBoxEntry *pPostBreakEntry = aLinguOptionsCLB.GetEntry( (USHORT) EID_NUM_POST_BREAK ); + SvLBoxEntry *pPreBreakEntry = aLinguOptionsCLB.GetEntry( (sal_uInt16) EID_NUM_PRE_BREAK ); + SvLBoxEntry *pPostBreakEntry = aLinguOptionsCLB.GetEntry( (sal_uInt16) EID_NUM_POST_BREAK ); DBG_ASSERT( pPreBreakEntry, "NULL Pointer" ); DBG_ASSERT( pPostBreakEntry, "NULL Pointer" ); if (pPreBreakEntry && pPostBreakEntry) { - OptionsUserData aPreBreakData( (ULONG)pPreBreakEntry->GetUserData() ); - OptionsUserData aPostBreakData( (ULONG)pPostBreakEntry->GetUserData() ); + OptionsUserData aPreBreakData( (sal_uLong)pPreBreakEntry->GetUserData() ); + OptionsUserData aPostBreakData( (sal_uLong)pPostBreakEntry->GetUserData() ); if ( aPreBreakData.IsModified() || aPostBreakData.IsModified() ) { SfxHyphenRegionItem aHyp( GetWhich( SID_ATTR_HYPHENREGION ) ); - aHyp.GetMinLead() = (UINT8) aPreBreakData.GetNumericValue(); - aHyp.GetMinTrail() = (UINT8) aPostBreakData.GetNumericValue(); + aHyp.GetMinLead() = (sal_uInt8) aPreBreakData.GetNumericValue(); + aHyp.GetMinTrail() = (sal_uInt8) aPostBreakData.GetNumericValue(); rCoreSet.Put( aHyp ); } } // automatic spell checking - BOOL bNewAutoCheck = aLinguOptionsCLB.IsChecked( (USHORT) EID_SPELL_AUTO ); + sal_Bool bNewAutoCheck = aLinguOptionsCLB.IsChecked( (sal_uInt16) EID_SPELL_AUTO ); const SfxPoolItem* pOld = GetOldItem( rCoreSet, SID_AUTOSPELL_CHECK ); if ( !pOld || ( (SfxBoolItem*)pOld )->GetValue() != bNewAutoCheck ) { @@ -1445,19 +1445,19 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet ) // ---------------------------------------------------------------------- -ULONG SvxLinguTabPage::GetDicUserData( const uno::Reference< XDictionary > &rxDic, USHORT nIdx ) +sal_uLong SvxLinguTabPage::GetDicUserData( const uno::Reference< XDictionary > &rxDic, sal_uInt16 nIdx ) { - ULONG nRes = 0; + sal_uLong nRes = 0; DBG_ASSERT( rxDic.is(), "dictionary not supplied" ); if (rxDic.is()) { uno::Reference< frame::XStorable > xStor( rxDic, UNO_QUERY ); -// ULONG nUserData = 0; - BOOL bChecked = rxDic->isActive(); - BOOL bEditable = !xStor.is() || !xStor->isReadonly(); - BOOL bDeletable = bEditable; -// BOOL bNegativ = rxDic->getDictionaryType() == DictionaryType_NEGATIVE; +// sal_uLong nUserData = 0; + sal_Bool bChecked = rxDic->isActive(); + sal_Bool bEditable = !xStor.is() || !xStor->isReadonly(); + sal_Bool bDeletable = bEditable; +// sal_Bool bNegativ = rxDic->getDictionaryType() == DictionaryType_NEGATIVE; nRes = DicUserData( nIdx, bChecked, bEditable, bDeletable ).GetUserData(); @@ -1468,14 +1468,14 @@ ULONG SvxLinguTabPage::GetDicUserData( const uno::Reference< XDictionary > &rxDi void SvxLinguTabPage::AddDicBoxEntry( const uno::Reference< XDictionary > &rxDic, - USHORT nIdx ) + sal_uInt16 nIdx ) { - aLinguDicsCLB.SetUpdateMode(FALSE); + aLinguDicsCLB.SetUpdateMode(sal_False); String aTxt( ::GetDicInfoStr( rxDic->getName(), SvxLocaleToLanguage( rxDic->getLocale() ), DictionaryType_NEGATIVE == rxDic->getDictionaryType() ) ); - aLinguDicsCLB.InsertEntry( aTxt, (USHORT)LISTBOX_APPEND ); // append at end + aLinguDicsCLB.InsertEntry( aTxt, (sal_uInt16)LISTBOX_APPEND ); // append at end SvLBoxEntry* pEntry = aLinguDicsCLB.GetEntry( aLinguDicsCLB.GetEntryCount() - 1 ); DBG_ASSERT( pEntry, "failed to add entry" ); if (pEntry) @@ -1485,26 +1485,26 @@ void SvxLinguTabPage::AddDicBoxEntry( lcl_SetCheckButton( pEntry, aData.IsChecked() ); } - aLinguDicsCLB.SetUpdateMode(TRUE); + aLinguDicsCLB.SetUpdateMode(sal_True); } // ---------------------------------------------------------------------- void SvxLinguTabPage::UpdateDicBox_Impl() { - aLinguDicsCLB.SetUpdateMode(FALSE); + aLinguDicsCLB.SetUpdateMode(sal_False); aLinguDicsCLB.Clear(); - INT32 nDics = aDics.getLength(); + sal_Int32 nDics = aDics.getLength(); const uno::Reference< XDictionary > *pDic = aDics.getConstArray(); - for (INT32 i = 0; i < nDics; ++i) + for (sal_Int32 i = 0; i < nDics; ++i) { const uno::Reference< XDictionary > &rDic = pDic[i]; if (rDic.is()) - AddDicBoxEntry( rDic, (USHORT)i ); + AddDicBoxEntry( rDic, (sal_uInt16)i ); } - aLinguDicsCLB.SetUpdateMode(TRUE); + aLinguDicsCLB.SetUpdateMode(sal_True); } // ---------------------------------------------------------------------- @@ -1514,14 +1514,14 @@ void SvxLinguTabPage::UpdateModulesBox_Impl() if (pLinguData) { const ServiceInfoArr &rAllDispSrvcArr = pLinguData->GetDisplayServiceArray(); - const ULONG nDispSrvcCount = pLinguData->GetDisplayServiceCount(); + const sal_uLong nDispSrvcCount = pLinguData->GetDisplayServiceCount(); aLinguModulesCLB.Clear(); - for (USHORT i = 0; i < nDispSrvcCount; ++i) + for (sal_uInt16 i = 0; i < nDispSrvcCount; ++i) { const ServiceInfo_Impl &rInfo = rAllDispSrvcArr[i]; - aLinguModulesCLB.InsertEntry( rInfo.sDisplayName, (USHORT)LISTBOX_APPEND ); + aLinguModulesCLB.InsertEntry( rInfo.sDisplayName, (sal_uInt16)LISTBOX_APPEND ); SvLBoxEntry* pEntry = aLinguModulesCLB.GetEntry(i); pEntry->SetUserData( (void *) &rInfo ); aLinguModulesCLB.CheckEntryPos( i, rInfo.bConfigured ); @@ -1549,22 +1549,22 @@ void SvxLinguTabPage::Reset( const SfxItemSet& rSet ) SvtLinguConfig aLngCfg; - aLinguOptionsCLB.SetUpdateMode(FALSE); + aLinguOptionsCLB.SetUpdateMode(sal_False); aLinguOptionsCLB.Clear(); SvLBoxTreeList *pModel = aLinguOptionsCLB.GetModel(); SvLBoxEntry* pEntry = NULL; - INT16 nVal = 0; - BOOL bVal = FALSE; - ULONG nUserData = 0; + sal_Int16 nVal = 0; + sal_Bool bVal = sal_False; + sal_uLong nUserData = 0; pEntry = CreateEntry( sSpellAuto, CBCOL_FIRST ); aLngCfg.GetProperty( C2U(UPN_IS_SPELL_AUTO) ) >>= bVal; const SfxPoolItem* pItem = GetItem( rSet, SID_AUTOSPELL_CHECK ); if (pItem) bVal = ((SfxBoolItem *) pItem)->GetValue(); - nUserData = OptionsUserData( EID_SPELL_AUTO, FALSE, 0, TRUE, bVal).GetUserData(); + nUserData = OptionsUserData( EID_SPELL_AUTO, sal_False, 0, sal_True, bVal).GetUserData(); pEntry->SetUserData( (void *)nUserData ); pModel->Insert( pEntry ); lcl_SetCheckButton( pEntry, bVal ); @@ -1574,81 +1574,81 @@ void SvxLinguTabPage::Reset( const SfxItemSet& rSet ) // const SfxPoolItem* pItem = GetItem( rSet, SID_AUTOSPELL_CHECK ); // if (pItem) // bVal = ((SfxBoolItem *) pItem)->GetValue(); - nUserData = OptionsUserData( EID_GRAMMAR_AUTO, FALSE, 0, TRUE, bVal).GetUserData(); + nUserData = OptionsUserData( EID_GRAMMAR_AUTO, sal_False, 0, sal_True, bVal).GetUserData(); pEntry->SetUserData( (void *)nUserData ); pModel->Insert( pEntry ); lcl_SetCheckButton( pEntry, bVal ); pEntry = CreateEntry( sCapitalWords, CBCOL_FIRST ); aLngCfg.GetProperty( C2U(UPN_IS_SPELL_UPPER_CASE) ) >>= bVal; - nUserData = OptionsUserData( EID_CAPITAL_WORDS, FALSE, 0, TRUE, bVal).GetUserData(); + nUserData = OptionsUserData( EID_CAPITAL_WORDS, sal_False, 0, sal_True, bVal).GetUserData(); pEntry->SetUserData( (void *)nUserData ); pModel->Insert( pEntry ); lcl_SetCheckButton( pEntry, bVal ); pEntry = CreateEntry( sWordsWithDigits, CBCOL_FIRST ); aLngCfg.GetProperty( C2U(UPN_IS_SPELL_WITH_DIGITS) ) >>= bVal; - nUserData = OptionsUserData( EID_WORDS_WITH_DIGITS, FALSE, 0, TRUE, bVal).GetUserData(); + nUserData = OptionsUserData( EID_WORDS_WITH_DIGITS, sal_False, 0, sal_True, bVal).GetUserData(); pEntry->SetUserData( (void *)nUserData ); pModel->Insert( pEntry ); lcl_SetCheckButton( pEntry, bVal ); pEntry = CreateEntry( sCapitalization, CBCOL_FIRST ); aLngCfg.GetProperty( C2U(UPN_IS_SPELL_CAPITALIZATION) ) >>= bVal; - nUserData = OptionsUserData( EID_CAPITALIZATION, FALSE, 0, TRUE, bVal).GetUserData(); + nUserData = OptionsUserData( EID_CAPITALIZATION, sal_False, 0, sal_True, bVal).GetUserData(); pEntry->SetUserData( (void *)nUserData ); pModel->Insert( pEntry ); lcl_SetCheckButton( pEntry, bVal ); pEntry = CreateEntry( sSpellSpecial, CBCOL_FIRST ); aLngCfg.GetProperty( C2U(UPN_IS_SPELL_SPECIAL) ) >>= bVal; - nUserData = OptionsUserData( EID_SPELL_SPECIAL, FALSE, 0, TRUE, bVal).GetUserData(); + nUserData = OptionsUserData( EID_SPELL_SPECIAL, sal_False, 0, sal_True, bVal).GetUserData(); pEntry->SetUserData( (void *)nUserData ); pModel->Insert( pEntry ); lcl_SetCheckButton( pEntry, bVal ); pEntry = CreateEntry( sNumMinWordlen, CBCOL_SECOND ); aLngCfg.GetProperty( C2U(UPN_HYPH_MIN_WORD_LENGTH) ) >>= nVal; - nUserData = OptionsUserData( EID_NUM_MIN_WORDLEN, TRUE, (USHORT)nVal, FALSE, FALSE).GetUserData(); + nUserData = OptionsUserData( EID_NUM_MIN_WORDLEN, sal_True, (sal_uInt16)nVal, sal_False, sal_False).GetUserData(); pEntry->SetUserData( (void *)nUserData ); pModel->Insert( pEntry ); const SfxHyphenRegionItem *pHyp = NULL; - USHORT nWhich = GetWhich( SID_ATTR_HYPHENREGION ); - if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET ) + sal_uInt16 nWhich = GetWhich( SID_ATTR_HYPHENREGION ); + if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET ) pHyp = &( (const SfxHyphenRegionItem &) rSet.Get( nWhich ) ); pEntry = CreateEntry( sNumPreBreak, CBCOL_SECOND ); aLngCfg.GetProperty( C2U(UPN_HYPH_MIN_LEADING) ) >>= nVal; if (pHyp) - nVal = (INT16) pHyp->GetMinLead(); - nUserData = OptionsUserData( EID_NUM_PRE_BREAK, TRUE, (USHORT)nVal, FALSE, FALSE).GetUserData(); + nVal = (sal_Int16) pHyp->GetMinLead(); + nUserData = OptionsUserData( EID_NUM_PRE_BREAK, sal_True, (sal_uInt16)nVal, sal_False, sal_False).GetUserData(); pEntry->SetUserData( (void *)nUserData ); pModel->Insert( pEntry ); pEntry = CreateEntry( sNumPostBreak, CBCOL_SECOND ); aLngCfg.GetProperty( C2U(UPN_HYPH_MIN_TRAILING) ) >>= nVal; if (pHyp) - nVal = (INT16) pHyp->GetMinTrail(); - nUserData = OptionsUserData( EID_NUM_POST_BREAK, TRUE, (USHORT)nVal, FALSE, FALSE).GetUserData(); + nVal = (sal_Int16) pHyp->GetMinTrail(); + nUserData = OptionsUserData( EID_NUM_POST_BREAK, sal_True, (sal_uInt16)nVal, sal_False, sal_False).GetUserData(); pEntry->SetUserData( (void *)nUserData ); pModel->Insert( pEntry ); pEntry = CreateEntry( sHyphAuto, CBCOL_FIRST ); aLngCfg.GetProperty( C2U(UPN_IS_HYPH_AUTO) ) >>= bVal; - nUserData = OptionsUserData( EID_HYPH_AUTO, FALSE, 0, TRUE, bVal).GetUserData(); + nUserData = OptionsUserData( EID_HYPH_AUTO, sal_False, 0, sal_True, bVal).GetUserData(); pEntry->SetUserData( (void *)nUserData ); pModel->Insert( pEntry ); lcl_SetCheckButton( pEntry, bVal ); pEntry = CreateEntry( sHyphSpecial, CBCOL_FIRST ); aLngCfg.GetProperty( C2U(UPN_IS_HYPH_SPECIAL) ) >>= bVal; - nUserData = OptionsUserData( EID_HYPH_SPECIAL, FALSE, 0, TRUE, bVal).GetUserData(); + nUserData = OptionsUserData( EID_HYPH_SPECIAL, sal_False, 0, sal_True, bVal).GetUserData(); pEntry->SetUserData( (void *)nUserData ); pModel->Insert( pEntry ); lcl_SetCheckButton( pEntry, bVal ); - aLinguOptionsCLB.SetUpdateMode(TRUE); + aLinguOptionsCLB.SetUpdateMode(sal_True); } // ----------------------------------------------------------------------- @@ -1694,7 +1694,7 @@ IMPL_LINK( SvxLinguTabPage, BoxCheckButtonHdl_Impl, SvTreeListBox *, pBox ) if (pBox == &aLinguModulesCLB) { DBG_ASSERT( pLinguData, "NULL pointer, LinguData missing" ); - USHORT nPos = aLinguModulesCLB.GetSelectEntryPos(); + sal_uInt16 nPos = aLinguModulesCLB.GetSelectEntryPos(); if (nPos != LISTBOX_ENTRY_NOTFOUND && pLinguData) { pLinguData->Reconfigure( aLinguModulesCLB.GetText( nPos ), @@ -1703,7 +1703,7 @@ IMPL_LINK( SvxLinguTabPage, BoxCheckButtonHdl_Impl, SvTreeListBox *, pBox ) } else if (pBox == &aLinguDicsCLB) { - USHORT nPos = aLinguDicsCLB.GetSelectEntryPos(); + sal_uInt16 nPos = aLinguDicsCLB.GetSelectEntryPos(); if (nPos != LISTBOX_ENTRY_NOTFOUND) { const uno::Reference< XDictionary > &rDic = aDics.getConstArray()[ nPos ]; @@ -1711,7 +1711,7 @@ IMPL_LINK( SvxLinguTabPage, BoxCheckButtonHdl_Impl, SvTreeListBox *, pBox ) { SvLBoxEntry* pEntry = aLinguDicsCLB.GetEntry( nPos ); if (pEntry) - lcl_SetCheckButton( pEntry, TRUE ); + lcl_SetCheckButton( pEntry, sal_True ); } } } @@ -1733,14 +1733,14 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn ) *pLinguData = aOldLinguData; // evaluate new status of 'bConfigured' flag - ULONG nLen = pLinguData->GetDisplayServiceCount(); - for (ULONG i = 0; i < nLen; ++i) - pLinguData->GetDisplayServiceArray()[i].bConfigured = FALSE; + sal_uLong nLen = pLinguData->GetDisplayServiceCount(); + for (sal_uLong i = 0; i < nLen; ++i) + pLinguData->GetDisplayServiceArray()[i].bConfigured = sal_False; const Locale* pAllLocales = pLinguData->GetAllSupportedLocales().getConstArray(); - INT32 nLocales = pLinguData->GetAllSupportedLocales().getLength(); - for (INT32 k = 0; k < nLocales; ++k) + sal_Int32 nLocales = pLinguData->GetAllSupportedLocales().getLength(); + for (sal_Int32 k = 0; k < nLocales; ++k) { - INT16 nLang = SvxLocaleToLanguage( pAllLocales[k] ); + sal_Int16 nLang = SvxLocaleToLanguage( pAllLocales[k] ); if (pLinguData->GetSpellTable().count( nLang )) pLinguData->SetChecked( pLinguData->GetSpellTable()[ nLang ] ); if (pLinguData->GetGrammarTable().count( nLang )) @@ -1768,12 +1768,12 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn ) if ( xNewDic.is() ) { // add new dics to the end - INT32 nLen = aDics.getLength(); + sal_Int32 nLen = aDics.getLength(); aDics.realloc( nLen + 1 ); aDics.getArray()[ nLen ] = xNewDic; - AddDicBoxEntry( xNewDic, (USHORT) nLen ); + AddDicBoxEntry( xNewDic, (sal_uInt16) nLen ); } delete aDlg; //add by CHINA001 } @@ -1783,9 +1783,9 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn ) SvLBoxEntry *pEntry = aLinguDicsCLB.GetCurEntry(); if (pEntry) { - DicUserData aData( (ULONG) pEntry->GetUserData() ); - USHORT nDicPos = aData.GetEntryId(); - INT32 nDics = aDics.getLength(); + DicUserData aData( (sal_uLong) pEntry->GetUserData() ); + sal_uInt16 nDicPos = aData.GetEntryId(); + sal_Int32 nDics = aDics.getLength(); if (nDicPos < nDics) { uno::Reference< XDictionary > xDic; @@ -1814,9 +1814,9 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn ) SvLBoxEntry *pEntry = aLinguDicsCLB.GetCurEntry(); if (pEntry) { - DicUserData aData( (ULONG) pEntry->GetUserData() ); - USHORT nDicPos = aData.GetEntryId(); - INT32 nDics = aDics.getLength(); + DicUserData aData( (sal_uLong) pEntry->GetUserData() ); + sal_uInt16 nDicPos = aData.GetEntryId(); + sal_Int32 nDics = aDics.getLength(); if (nDicPos < nDics) { uno::Reference< XDictionary > xDic; @@ -1846,17 +1846,17 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn ) aDics.getArray()[ nDicPos ] = 0; // remove entry from checklistbox - ULONG nCnt = aLinguDicsCLB.GetEntryCount(); - for (ULONG i = 0; i < nCnt; ++i) + sal_uLong nCnt = aLinguDicsCLB.GetEntryCount(); + for (sal_uLong i = 0; i < nCnt; ++i) { SvLBoxEntry *pDicEntry = aLinguDicsCLB.GetEntry( i ); DBG_ASSERT( pDicEntry, "missing entry" ); if (pDicEntry) { - DicUserData aDicData( (ULONG) pDicEntry->GetUserData() ); + DicUserData aDicData( (sal_uLong) pDicEntry->GetUserData() ); if (aDicData.GetEntryId() == nDicPos ) { - aLinguDicsCLB.RemoveEntry( (USHORT) i ); + aLinguDicsCLB.RemoveEntry( (sal_uInt16) i ); break; } } @@ -1875,7 +1875,7 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn ) if (pEntry) { long nVal = -1; - OptionsUserData aData( (ULONG)pEntry->GetUserData() ); + OptionsUserData aData( (sal_uLong)pEntry->GetUserData() ); if(aData.HasNumericValue()) { int nRID = -1; @@ -1895,7 +1895,7 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn ) nVal = static_cast<long>(aDlg.GetNumericFld().GetValue()); if (-1 != nVal && aData.GetNumericValue() != nVal) { - aData.SetNumericValue( (BYTE)nVal ); //! sets IsModified ! + aData.SetNumericValue( (sal_uInt8)nVal ); //! sets IsModified ! pEntry->SetUserData( (void *) aData.GetUserData() ); aLinguOptionsCLB.Invalidate(); } @@ -1923,7 +1923,7 @@ IMPL_LINK( SvxLinguTabPage, SelectHdl_Impl, SvxCheckListBox *, pBox ) SvLBoxEntry *pEntry = pBox->GetCurEntry(); if (pEntry) { - DicUserData aData( (ULONG) pEntry->GetUserData() ); + DicUserData aData( (sal_uLong) pEntry->GetUserData() ); // always allow to edit (i.e. at least view the content of the dictionary) aLinguDicsEditPB.Enable( true/*aData.IsEditable()*/ ); @@ -1935,7 +1935,7 @@ IMPL_LINK( SvxLinguTabPage, SelectHdl_Impl, SvxCheckListBox *, pBox ) SvLBoxEntry *pEntry = pBox->GetCurEntry(); if (pEntry) { - OptionsUserData aData( (ULONG) pEntry->GetUserData() ); + OptionsUserData aData( (sal_uLong) pEntry->GetUserData() ); aLinguOptionsEditPB.Enable( aData.HasNumericValue() ); } } @@ -1949,7 +1949,7 @@ IMPL_LINK( SvxLinguTabPage, SelectHdl_Impl, SvxCheckListBox *, pBox ) // ----------------------------------------------------------------------- -SvLBoxEntry* SvxLinguTabPage::CreateEntry( String& rTxt, USHORT nCol ) +SvLBoxEntry* SvxLinguTabPage::CreateEntry( String& rTxt, sal_uInt16 nCol ) { SvLBoxEntry* pEntry = new SvLBoxEntry; @@ -2030,7 +2030,7 @@ SvxEditModulesDlg::SvxEditModulesDlg(Window* pParent, SvxLinguData_Impl& rData) ModalDialog( pParent, CUI_RES(RID_SVXDLG_EDIT_MODULES ) ), aModulesFL ( this, CUI_RES( FL_EDIT_MODULES_OPTIONS ) ), aLanguageFT ( this, CUI_RES( FT_EDIT_MODULES_LANGUAGE ) ), - aLanguageLB ( this, CUI_RES( LB_EDIT_MODULES_LANGUAGE ), FALSE ), + aLanguageLB ( this, CUI_RES( LB_EDIT_MODULES_LANGUAGE ), sal_False ), aModulesCLB ( this, CUI_RES( CLB_EDIT_MODULES_MODULES ) ), aPrioUpPB ( this, CUI_RES( PB_EDIT_MODULES_PRIO_UP ) ), aPrioDownPB ( this, CUI_RES( PB_EDIT_MODULES_PRIO_DOWN ) ), @@ -2061,8 +2061,8 @@ SvxEditModulesDlg::SvxEditModulesDlg(Window* pParent, SvxLinguData_Impl& rData) aPrioDownPB.SetClickHdl( LINK( this, SvxEditModulesDlg, UpDownHdl_Impl )); aBackPB .SetClickHdl( LINK( this, SvxEditModulesDlg, BackHdl_Impl )); // in case of not installed language modules - aPrioUpPB .Enable( FALSE ); - aPrioDownPB.Enable( FALSE ); + aPrioUpPB .Enable( sal_False ); + aPrioDownPB.Enable( sal_False ); if ( SvtExtendedSecurityOptions().GetOpenHyperlinkMode() != SvtExtendedSecurityOptions::OPEN_NEVER ) @@ -2083,7 +2083,7 @@ SvxEditModulesDlg::SvxEditModulesDlg(Window* pParent, SvxLinguData_Impl& rData) // //fill language box // - Sequence< INT16 > aAvailLang; + Sequence< sal_Int16 > aAvailLang; uno::Reference< XAvailableLocales > xAvail( rLinguData.GetManager(), UNO_QUERY ); if (xAvail.is()) { @@ -2095,7 +2095,7 @@ SvxEditModulesDlg::SvxEditModulesDlg(Window* pParent, SvxLinguData_Impl& rData) aLanguageLB.Clear(); for(long i = 0; i < rLoc.getLength(); i++) { - INT16 nLang = SvxLocaleToLanguage( pLocales[i] ); + sal_Int16 nLang = SvxLocaleToLanguage( pLocales[i] ); aLanguageLB.InsertLanguage( nLang, lcl_SeqHasLang( aAvailLang, nLang ) ); } LanguageType eSysLang = MsLangId::getSystemLanguage(); @@ -2114,7 +2114,7 @@ SvxEditModulesDlg::~SvxEditModulesDlg() } -SvLBoxEntry* SvxEditModulesDlg::CreateEntry( String& rTxt, USHORT nCol ) +SvLBoxEntry* SvxEditModulesDlg::CreateEntry( String& rTxt, sal_uInt16 nCol ) { SvLBoxEntry* pEntry = new SvLBoxEntry; if( !pCheckButtonData ) @@ -2149,7 +2149,7 @@ IMPL_LINK( SvxEditModulesDlg, SelectHdl_Impl, SvxCheckListBox *, pBox ) ModuleUserData_Impl* pData = (ModuleUserData_Impl*)pEntry->GetUserData(); if(!pData->IsParent() && pData->GetType() != TYPE_HYPH) { - USHORT nCurPos = pBox->GetSelectEntryPos(); + sal_uInt16 nCurPos = pBox->GetSelectEntryPos(); if(nCurPos < pBox->GetEntryCount() - 1) { bDisableDown = ((ModuleUserData_Impl*)pBox-> @@ -2197,7 +2197,7 @@ IMPL_LINK( SvxEditModulesDlg, BoxCheckButtonHdl_Impl, SvTreeListBox *, pBox ) pData->GetType() == TYPE_HYPH && pEntry != pCurEntry) { - lcl_SetCheckButton( pEntry, FALSE ); + lcl_SetCheckButton( pEntry, sal_False ); pBox->InvalidateEntry( pEntry ); } pEntry = pBox->Next( pEntry ); @@ -2210,7 +2210,7 @@ IMPL_LINK( SvxEditModulesDlg, BoxCheckButtonHdl_Impl, SvTreeListBox *, pBox ) /* -----------------------------27.11.00 14:00-------------------------------- ---------------------------------------------------------------------------*/ -OUString lcl_GetServiceName(BYTE nType) +OUString lcl_GetServiceName(sal_uInt8 nType) { switch(nType) { @@ -2237,12 +2237,12 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) // save old probably changed settings // before switching to new language entries - INT16 nLang = SvxLocaleToLanguage( aLastLocale ); + sal_Int16 nLang = SvxLocaleToLanguage( aLastLocale ); sal_Int32 nStart = 0, nLocalIndex = 0; Sequence< OUString > aChange; - sal_Bool bChanged = FALSE; - for(USHORT i = 0; i < aModulesCLB.GetEntryCount(); i++) + sal_Bool bChanged = sal_False; + for(sal_uInt16 i = 0; i < aModulesCLB.GetEntryCount(); i++) { SvLBoxEntry *pEntry = aModulesCLB.GetEntry(i); ModuleUserData_Impl* pData = (ModuleUserData_Impl*)pEntry->GetUserData(); @@ -2251,7 +2251,7 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) if(bChanged) { LangImplNameTable *pTable = 0; - BYTE nType = pData->GetType(); + sal_uInt8 nType = pData->GetType(); switch (nType - 1) { case TYPE_SPELL : pTable = &rLinguData.GetSpellTable(); break; @@ -2267,7 +2267,7 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) } nLocalIndex = nStart = 0; aChange.realloc(aModulesCLB.GetEntryCount()); - bChanged = FALSE; + bChanged = sal_False; } else { @@ -2287,7 +2287,7 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) } } - for(ULONG i = 0; i < aModulesCLB.GetEntryCount(); i++) + for(sal_uLong i = 0; i < aModulesCLB.GetEntryCount(); i++) delete (ModuleUserData_Impl*)aModulesCLB.GetEntry(i)->GetUserData(); // @@ -2298,7 +2298,7 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) { // sal_Int32 nEntryPos = 1; - ULONG n; + sal_uLong n; ServiceInfo_Impl* pInfo; // @@ -2306,18 +2306,18 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) // SvLBoxEntry* pEntry = CreateEntry( sSpell, CBCOL_SECOND ); ModuleUserData_Impl* pUserData = new ModuleUserData_Impl( - String(), TRUE, FALSE, TYPE_SPELL, 0 ); + String(), sal_True, sal_False, TYPE_SPELL, 0 ); pEntry->SetUserData( (void *)pUserData ); pModel->Insert( pEntry ); // Sequence< OUString > aNames( rLinguData.GetSortedImplNames( eCurLanguage, TYPE_SPELL ) ); const OUString *pName = aNames.getConstArray(); - ULONG nNames = (ULONG) aNames.getLength(); + sal_uLong nNames = (sal_uLong) aNames.getLength(); sal_Int32 nLocalIndex = 0; // index relative to parent for (n = 0; n < nNames; ++n) { OUString aImplName; - BOOL bIsSuppLang = FALSE; + sal_Bool bIsSuppLang = sal_False; pInfo = rLinguData.GetInfoByImplName( pName[n] ); if (pInfo) @@ -2339,8 +2339,8 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) } const bool bCheck = bHasLang && lcl_SeqGetEntryPos( rTable[ eCurLanguage ], aImplName ) >= 0; lcl_SetCheckButton( pNewEntry, bCheck ); - pUserData = new ModuleUserData_Impl( aImplName, FALSE, - bCheck, TYPE_SPELL, (BYTE)nLocalIndex++ ); + pUserData = new ModuleUserData_Impl( aImplName, sal_False, + bCheck, TYPE_SPELL, (sal_uInt8)nLocalIndex++ ); pNewEntry->SetUserData( (void *)pUserData ); pModel->Insert( pNewEntry ); } @@ -2350,18 +2350,18 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) // grammar checker entries // pEntry = CreateEntry( sGrammar, CBCOL_SECOND ); - pUserData = new ModuleUserData_Impl( String(), TRUE, FALSE, TYPE_GRAMMAR, 0 ); + pUserData = new ModuleUserData_Impl( String(), sal_True, sal_False, TYPE_GRAMMAR, 0 ); pEntry->SetUserData( (void *)pUserData ); pModel->Insert( pEntry ); // aNames = rLinguData.GetSortedImplNames( eCurLanguage, TYPE_GRAMMAR ); pName = aNames.getConstArray(); - nNames = (ULONG) aNames.getLength(); + nNames = (sal_uLong) aNames.getLength(); nLocalIndex = 0; for (n = 0; n < nNames; ++n) { OUString aImplName; - BOOL bIsSuppLang = FALSE; + sal_Bool bIsSuppLang = sal_False; pInfo = rLinguData.GetInfoByImplName( pName[n] ); if (pInfo) @@ -2383,8 +2383,8 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) } const bool bCheck = bHasLang && lcl_SeqGetEntryPos( rTable[ eCurLanguage ], aImplName ) >= 0; lcl_SetCheckButton( pNewEntry, bCheck ); - pUserData = new ModuleUserData_Impl( aImplName, FALSE, - bCheck, TYPE_GRAMMAR, (BYTE)nLocalIndex++ ); + pUserData = new ModuleUserData_Impl( aImplName, sal_False, + bCheck, TYPE_GRAMMAR, (sal_uInt8)nLocalIndex++ ); pNewEntry->SetUserData( (void *)pUserData ); pModel->Insert( pNewEntry ); } @@ -2394,18 +2394,18 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) // hyphenator entries // pEntry = CreateEntry( sHyph, CBCOL_SECOND ); - pUserData = new ModuleUserData_Impl( String(), TRUE, FALSE, TYPE_HYPH, 0 ); + pUserData = new ModuleUserData_Impl( String(), sal_True, sal_False, TYPE_HYPH, 0 ); pEntry->SetUserData( (void *)pUserData ); pModel->Insert( pEntry ); // aNames = rLinguData.GetSortedImplNames( eCurLanguage, TYPE_HYPH ); pName = aNames.getConstArray(); - nNames = (ULONG) aNames.getLength(); + nNames = (sal_uLong) aNames.getLength(); nLocalIndex = 0; for (n = 0; n < nNames; ++n) { OUString aImplName; - BOOL bIsSuppLang = FALSE; + sal_Bool bIsSuppLang = sal_False; pInfo = rLinguData.GetInfoByImplName( pName[n] ); if (pInfo) @@ -2427,8 +2427,8 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) } const bool bCheck = bHasLang && lcl_SeqGetEntryPos( rTable[ eCurLanguage ], aImplName ) >= 0; lcl_SetCheckButton( pNewEntry, bCheck ); - pUserData = new ModuleUserData_Impl( aImplName, FALSE, - bCheck, TYPE_HYPH, (BYTE)nLocalIndex++ ); + pUserData = new ModuleUserData_Impl( aImplName, sal_False, + bCheck, TYPE_HYPH, (sal_uInt8)nLocalIndex++ ); pNewEntry->SetUserData( (void *)pUserData ); pModel->Insert( pNewEntry ); } @@ -2438,18 +2438,18 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) // thesaurus entries // pEntry = CreateEntry( sThes, CBCOL_SECOND ); - pUserData = new ModuleUserData_Impl( String(), TRUE, FALSE, TYPE_THES, 0 ); + pUserData = new ModuleUserData_Impl( String(), sal_True, sal_False, TYPE_THES, 0 ); pEntry->SetUserData( (void *)pUserData ); pModel->Insert( pEntry ); // aNames = rLinguData.GetSortedImplNames( eCurLanguage, TYPE_THES ); pName = aNames.getConstArray(); - nNames = (ULONG) aNames.getLength(); + nNames = (sal_uLong) aNames.getLength(); nLocalIndex = 0; for (n = 0; n < nNames; ++n) { OUString aImplName; - BOOL bIsSuppLang = FALSE; + sal_Bool bIsSuppLang = sal_False; pInfo = rLinguData.GetInfoByImplName( pName[n] ); if (pInfo) @@ -2471,8 +2471,8 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) } const bool bCheck = bHasLang && lcl_SeqGetEntryPos( rTable[ eCurLanguage ], aImplName ) >= 0; lcl_SetCheckButton( pNewEntry, bCheck ); - pUserData = new ModuleUserData_Impl( aImplName, FALSE, - bCheck, TYPE_THES, (BYTE)nLocalIndex++ ); + pUserData = new ModuleUserData_Impl( aImplName, sal_False, + bCheck, TYPE_THES, (sal_uInt8)nLocalIndex++ ); pNewEntry->SetUserData( (void *)pUserData ); pModel->Insert( pNewEntry ); } @@ -2488,28 +2488,28 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox ) IMPL_LINK( SvxEditModulesDlg, UpDownHdl_Impl, PushButton *, pBtn ) { sal_Bool bUp = &aPrioUpPB == pBtn; - USHORT nCurPos = aModulesCLB.GetSelectEntryPos(); + sal_uInt16 nCurPos = aModulesCLB.GetSelectEntryPos(); SvLBoxEntry* pEntry; if (nCurPos != LISTBOX_ENTRY_NOTFOUND && 0 != (pEntry = aModulesCLB.GetEntry(nCurPos))) { - aModulesCLB.SetUpdateMode(FALSE); + aModulesCLB.SetUpdateMode(sal_False); SvLBoxTreeList *pModel = aModulesCLB.GetModel(); ModuleUserData_Impl* pData = (ModuleUserData_Impl*)pEntry->GetUserData(); String aStr(aModulesCLB.GetEntryText(pEntry)); SvLBoxEntry* pToInsert = CreateEntry( aStr, CBCOL_FIRST ); pToInsert->SetUserData( (void *)pData); - BOOL bIsChecked = aModulesCLB.IsChecked(nCurPos); + sal_Bool bIsChecked = aModulesCLB.IsChecked(nCurPos); pModel->Remove(pEntry); - USHORT nDestPos = bUp ? nCurPos - 1 : nCurPos + 1; + sal_uInt16 nDestPos = bUp ? nCurPos - 1 : nCurPos + 1; pModel->Insert(pToInsert, nDestPos); aModulesCLB.CheckEntryPos(nDestPos, bIsChecked ); aModulesCLB.SelectEntryPos(nDestPos ); SelectHdl_Impl(&aModulesCLB); - aModulesCLB.SetUpdateMode(TRUE); + aModulesCLB.SetUpdateMode(sal_True); } return 0; } diff --git a/cui/source/options/optmemory.cxx b/cui/source/options/optmemory.cxx index d2e1da4de..cf3c88416 100644 --- a/cui/source/options/optmemory.cxx +++ b/cui/source/options/optmemory.cxx @@ -179,15 +179,15 @@ SfxTabPage* OfaMemoryOptionsPage::Create( Window* pParent, const SfxItemSet& rAt // ----------------------------------------------------------------------- -BOOL OfaMemoryOptionsPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool OfaMemoryOptionsPage::FillItemSet( SfxItemSet& rSet ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; SvtCacheOptions aCacheOptions; // Undo-Schritte if ( aUndoEdit.GetText() != aUndoEdit.GetSavedValue() ) - SvtUndoOptions().SetUndoCount((UINT16)aUndoEdit.GetValue()); + SvtUndoOptions().SetUndoCount((sal_uInt16)aUndoEdit.GetValue()); // GraphicCache aCacheOptions.SetGraphicManagerTotalCacheSize( GetNfGraphicCacheVal() ); @@ -201,7 +201,7 @@ BOOL OfaMemoryOptionsPage::FillItemSet( SfxItemSet& rSet ) GraphicManager& rGrfMgr = aDummyObject.GetGraphicManager(); rGrfMgr.SetMaxCacheSize( aCacheOptions.GetGraphicManagerTotalCacheSize() ); - rGrfMgr.SetMaxObjCacheSize( aCacheOptions.GetGraphicManagerObjectCacheSize(), TRUE ); + rGrfMgr.SetMaxObjCacheSize( aCacheOptions.GetGraphicManagerObjectCacheSize(), sal_True ); rGrfMgr.SetCacheTimeout( aCacheOptions.GetGraphicManagerObjectReleaseTime() ); // OLECache @@ -211,7 +211,7 @@ BOOL OfaMemoryOptionsPage::FillItemSet( SfxItemSet& rSet ) if( aQuickLaunchCB.IsChecked() != aQuickLaunchCB.GetSavedValue()) { rSet.Put(SfxBoolItem(SID_ATTR_QUICKLAUNCHER, aQuickLaunchCB.IsChecked())); - bModified = TRUE; + bModified = sal_True; } return bModified; @@ -234,7 +234,7 @@ void OfaMemoryOptionsPage::Reset( const SfxItemSet& rSet ) SetNfGraphicObjectCacheVal( Min( static_cast<sal_Int32>(GetNfGraphicCacheVal()), aCacheOptions.GetGraphicManagerObjectCacheSize() ) ); sal_Int32 nTime = aCacheOptions.GetGraphicManagerObjectReleaseTime(); - Time aTime( (USHORT)( nTime / 3600 ), (USHORT)( ( nTime % 3600 ) / 60 ), (USHORT)( ( nTime % 3600 ) % 60 ) ); + Time aTime( (sal_uInt16)( nTime / 3600 ), (sal_uInt16)( ( nTime % 3600 ) / 60 ), (sal_uInt16)( ( nTime % 3600 ) % 60 ) ); aTfGraphicObjectTime.SetTime( aTime ); GraphicCacheConfigHdl( &aNfGraphicCache ); @@ -242,7 +242,7 @@ void OfaMemoryOptionsPage::Reset( const SfxItemSet& rSet ) // OLECache aNfOLECache.SetValue( Max( aCacheOptions.GetWriterOLE_Objects(), aCacheOptions.GetDrawingEngineOLE_Objects() ) ); - SfxItemState eState = rSet.GetItemState( SID_ATTR_QUICKLAUNCHER, FALSE, &pItem ); + SfxItemState eState = rSet.GetItemState( SID_ATTR_QUICKLAUNCHER, sal_False, &pItem ); if ( SFX_ITEM_SET == eState ) aQuickLaunchCB.Check( ( (SfxBoolItem*)pItem )->GetValue() ); else if ( SFX_ITEM_DISABLED == eState ) diff --git a/cui/source/options/optmemory.hxx b/cui/source/options/optmemory.hxx index 9d48eaf83..c7edc9dd8 100644 --- a/cui/source/options/optmemory.hxx +++ b/cui/source/options/optmemory.hxx @@ -81,7 +81,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index 34bb1c380..067fa9e55 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -106,18 +106,18 @@ struct OptPath_Impl struct PathUserData_Impl { - USHORT nRealId; + sal_uInt16 nRealId; SfxItemState eState; String sUserPath; String sWritablePath; - PathUserData_Impl( USHORT nId ) : + PathUserData_Impl( sal_uInt16 nId ) : nRealId( nId ), eState( SFX_ITEM_UNKNOWN ) {} }; struct Handle2CfgNameMapping_Impl { - USHORT m_nHandle; + sal_uInt16 m_nHandle; const char* m_pCfgName; }; @@ -138,10 +138,10 @@ static Handle2CfgNameMapping_Impl __READONLY_DATA Hdl2CfgMap_Impl[] = { USHRT_MAX, NULL } }; -static String getCfgName_Impl( USHORT _nHandle ) +static String getCfgName_Impl( sal_uInt16 _nHandle ) { String sCfgName; - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; while ( Hdl2CfgMap_Impl[ nIndex ].m_nHandle != USHRT_MAX ) { if ( Hdl2CfgMap_Impl[ nIndex ].m_nHandle == _nHandle ) @@ -161,9 +161,9 @@ static String getCfgName_Impl( USHORT _nHandle ) String Convert_Impl( const String& rValue ) { char cDelim = MULTIPATH_DELIMITER; - USHORT nCount = rValue.GetTokenCount( cDelim ); + sal_uInt16 nCount = rValue.GetTokenCount( cDelim ); String aReturn; - for ( USHORT i=0; i<nCount ; ++i ) + for ( sal_uInt16 i=0; i<nCount ; ++i ) { String aValue = rValue.GetToken( i, cDelim ); INetURLObject aObj( aValue ); @@ -191,7 +191,7 @@ long SvxControlFocusHelper::Notify( NotifyEvent& rNEvt ) // functions ------------------------------------------------------------- -BOOL IsMultiPath_Impl( const USHORT nIndex ) +sal_Bool IsMultiPath_Impl( const sal_uInt16 nIndex ) { #if OSL_DEBUG_LEVEL > 1 return ( SvtPathOptions::PATH_AUTOCORRECT == nIndex || @@ -279,7 +279,7 @@ SvxPathTabPage::~SvxPathTabPage() aPathCtrl.SetFocusControl( NULL ); pHeaderBar->Hide(); - for ( USHORT i = 0; i < pPathBox->GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < pPathBox->GetEntryCount(); ++i ) delete (PathUserData_Impl*)pPathBox->GetEntry(i)->GetUserData(); delete pPathBox; delete pHeaderBar; @@ -296,17 +296,17 @@ SfxTabPage* SvxPathTabPage::Create( Window* pParent, // ----------------------------------------------------------------------- -BOOL SvxPathTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxPathTabPage::FillItemSet( SfxItemSet& ) { SvtPathOptions aPathOpt; - for ( USHORT i = 0; i < pPathBox->GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < pPathBox->GetEntryCount(); ++i ) { PathUserData_Impl* pPathImpl = (PathUserData_Impl*)pPathBox->GetEntry(i)->GetUserData(); - USHORT nRealId = pPathImpl->nRealId; + sal_uInt16 nRealId = pPathImpl->nRealId; if ( pPathImpl->eState == SFX_ITEM_SET ) SetPathList( nRealId, pPathImpl->sUserPath, pPathImpl->sWritablePath ); } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -316,7 +316,7 @@ void SvxPathTabPage::Reset( const SfxItemSet& ) pPathBox->Clear(); SvtPathOptions aPathOpt; //! deprecated - for( USHORT i = 0; i <= (USHORT)SvtPathOptions::PATH_WORK; ++i ) + for( sal_uInt16 i = 0; i <= (sal_uInt16)SvtPathOptions::PATH_WORK; ++i ) { // only writer uses autotext if ( i == SvtPathOptions::PATH_AUTOTEXT @@ -370,7 +370,7 @@ void SvxPathTabPage::Reset( const SfxItemSet& ) pHeaderBar->SetItemSize( ITEMID_TYPE, aUserData.GetToken(0).ToInt32() ); HeaderEndDrag_Impl( NULL ); // Sortierrichtung restaurieren - BOOL bUp = (BOOL)(USHORT)aUserData.GetToken(1).ToInt32(); + sal_Bool bUp = (sal_Bool)(sal_uInt16)aUserData.GetToken(1).ToInt32(); HeaderBarItemBits nBits = pHeaderBar->GetItemBits(ITEMID_TYPE); if ( bUp ) @@ -396,7 +396,7 @@ void SvxPathTabPage::FillUserData() String aUserData = String::CreateFromInt32( pHeaderBar->GetItemSize( ITEMID_TYPE ) ); aUserData += ';'; HeaderBarItemBits nBits = pHeaderBar->GetItemBits( ITEMID_TYPE ); - BOOL bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); + sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); aUserData += bUp ? '1' : '0'; SetUserData( aUserData ); } @@ -410,14 +410,14 @@ IMPL_LINK( SvxPathTabPage, PathSelect_Impl, svx::OptHeaderTabListBox *, EMPTYARG */ { - USHORT nSelCount = 0; + sal_uInt16 nSelCount = 0; SvLBoxEntry* pEntry = pPathBox->FirstSelected(); //the entry image indicates whether the path is write protected Image aEntryImage; if(pEntry) aEntryImage = pPathBox->GetCollapsedEntryBmp( pEntry ); - BOOL bEnable = !aEntryImage; + sal_Bool bEnable = !aEntryImage; while ( pEntry && ( nSelCount < 2 ) ) { nSelCount++; @@ -445,14 +445,14 @@ IMPL_LINK( SvxPathTabPage, StandardHdl_Impl, PushButton *, EMPTYARG ) sal_Bool bReadOnly = sal_False; GetPathList( pPathImpl->nRealId, sInternal, sUser, sWritable, bReadOnly ); - USHORT i; - USHORT nOldCount = aOldPath.GetTokenCount( MULTIPATH_DELIMITER ); - USHORT nIntCount = sInternal.GetTokenCount( MULTIPATH_DELIMITER ); + sal_uInt16 i; + sal_uInt16 nOldCount = aOldPath.GetTokenCount( MULTIPATH_DELIMITER ); + sal_uInt16 nIntCount = sInternal.GetTokenCount( MULTIPATH_DELIMITER ); for ( i = 0; i < nOldCount; ++i ) { bool bFound = false; String sOnePath = aOldPath.GetToken( i, MULTIPATH_DELIMITER ); - for ( USHORT j = 0; !bFound && j < nIntCount; ++j ) + for ( sal_uInt16 j = 0; !bFound && j < nIntCount; ++j ) { if ( sInternal.GetToken( i, MULTIPATH_DELIMITER ) == sOnePath ) bFound = true; @@ -502,7 +502,7 @@ void SvxPathTabPage::ChangeCurrentEntry( const String& _rFolder ) GetPathList( pPathImpl->nRealId, sInternal, sUser, sWritable, bReadOnly ); sUser = pPathImpl->sUserPath; sWritable = pPathImpl->sWritablePath; - USHORT nPos = pPathImpl->nRealId; + sal_uInt16 nPos = pPathImpl->nRealId; // old path is an URL? INetURLObject aObj( sWritable ); @@ -525,7 +525,7 @@ void SvxPathTabPage::ChangeCurrentEntry( const String& _rFolder ) if ( bChanged ) { pPathBox->SetEntryText( Convert_Impl( sNewPathStr ), pEntry, 1 ); - nPos = (USHORT)pPathBox->GetModel()->GetAbsPos( pEntry ); + nPos = (sal_uInt16)pPathBox->GetModel()->GetAbsPos( pEntry ); pPathImpl = (PathUserData_Impl*)pPathBox->GetEntry(nPos)->GetUserData(); pPathImpl->eState = SFX_ITEM_SET; pPathImpl->sWritablePath = sNewPathStr; @@ -557,7 +557,7 @@ void SvxPathTabPage::ChangeCurrentEntry( const String& _rFolder ) IMPL_LINK( SvxPathTabPage, PathHdl_Impl, PushButton *, EMPTYARG ) { SvLBoxEntry* pEntry = pPathBox->GetCurEntry(); - USHORT nPos = ( pEntry != NULL ) ? ( (PathUserData_Impl*)pEntry->GetUserData() )->nRealId : 0; + sal_uInt16 nPos = ( pEntry != NULL ) ? ( (PathUserData_Impl*)pEntry->GetUserData() )->nRealId : 0; String sInternal, sUser, sWritable; if ( pEntry ) { @@ -599,10 +599,10 @@ IMPL_LINK( SvxPathTabPage, PathHdl_Impl, PushButton *, EMPTYARG ) String sFullPath; String sNewPath = pMultiDlg->GetPath(); char cDelim = MULTIPATH_DELIMITER; - USHORT nCount = sNewPath.GetTokenCount( cDelim ); + sal_uInt16 nCount = sNewPath.GetTokenCount( cDelim ); if ( nCount > 0 ) { - USHORT i = 0; + sal_uInt16 i = 0; for ( ; i < nCount - 1; ++i ) { if ( sUser.Len() > 0 ) @@ -669,7 +669,7 @@ IMPL_LINK( SvxPathTabPage, HeaderSelect_Impl, HeaderBar*, pBar ) return 0; HeaderBarItemBits nBits = pHeaderBar->GetItemBits(ITEMID_TYPE); - BOOL bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); + sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); SvSortMode eMode = SortAscending; if ( bUp ) @@ -700,7 +700,7 @@ IMPL_LINK( SvxPathTabPage, HeaderEndDrag_Impl, HeaderBar*, pBar ) if ( !pHeaderBar->IsItemMode() ) { Size aSz; - USHORT nTabs = pHeaderBar->GetItemCount(); + sal_uInt16 nTabs = pHeaderBar->GetItemCount(); long nTmpSz = 0; long nWidth = pHeaderBar->GetItemSize(ITEMID_TYPE); long nBarWidth = pHeaderBar->GetSizePixel().Width(); @@ -710,7 +710,7 @@ IMPL_LINK( SvxPathTabPage, HeaderEndDrag_Impl, HeaderBar*, pBar ) else if ( ( nBarWidth - nWidth ) < TAB_WIDTH_MIN ) pHeaderBar->SetItemSize( ITEMID_TYPE, nBarWidth - TAB_WIDTH_MIN ); - for ( USHORT i = 1; i <= nTabs; ++i ) + for ( sal_uInt16 i = 1; i <= nTabs; ++i ) { long _nWidth = pHeaderBar->GetItemSize(i); aSz.Width() = _nWidth + nTmpSz; @@ -738,7 +738,7 @@ IMPL_LINK( SvxPathTabPage, DialogClosedHdl, DialogClosedEvent*, pEvt ) // ----------------------------------------------------------------------- void SvxPathTabPage::GetPathList( - USHORT _nPathHandle, String& _rInternalPath, + sal_uInt16 _nPathHandle, String& _rInternalPath, String& _rUserPath, String& _rWritablePath, sal_Bool& _rReadOnly ) { String sCfgName = getCfgName_Impl( _nPathHandle ); @@ -814,7 +814,7 @@ void SvxPathTabPage::GetPathList( // ----------------------------------------------------------------------- void SvxPathTabPage::SetPathList( - USHORT _nPathHandle, const String& _rUserPath, const String& _rWritablePath ) + sal_uInt16 _nPathHandle, const String& _rUserPath, const String& _rWritablePath ) { String sCfgName = getCfgName_Impl( _nPathHandle ); @@ -833,10 +833,10 @@ void SvxPathTabPage::SetPathList( { // save user paths char cDelim = MULTIPATH_DELIMITER; - USHORT nCount = _rUserPath.GetTokenCount( cDelim ); + sal_uInt16 nCount = _rUserPath.GetTokenCount( cDelim ); Sequence< ::rtl::OUString > aPathSeq( nCount ); ::rtl::OUString* pArray = aPathSeq.getArray(); - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) pArray[i] = ::rtl::OUString( _rUserPath.GetToken( i, cDelim ) ); String sProp( sCfgName ); sProp += POSTFIX_USER; diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx index 8c52d9a40..ab8a1ea34 100644 --- a/cui/source/options/optsave.cxx +++ b/cui/source/options/optsave.cxx @@ -75,8 +75,8 @@ using rtl::OUString; #define C2S(cChar) String( RTL_CONSTASCII_STRINGPARAM(cChar) ) #define CFG_PAGE_AND_GROUP C2S("General"), C2S("LoadSave") // !! you have to update these index, if you changed the list of the child windows !! -#define WININDEX_AUTOSAVE ((USHORT)6) -#define WININDEX_SAVEURL_RELFSYS ((USHORT)9) +#define WININDEX_AUTOSAVE ((sal_uInt16)6) +#define WININDEX_SAVEURL_RELFSYS ((sal_uInt16)9) // ---------------------------------------------------------------------- #ifdef FILTER_WARNING_ENABLED @@ -294,7 +294,7 @@ SfxTabPage* SfxSaveTabPage::Create( Window* pParent, } // ----------------------------------------------------------------------- -bool SfxSaveTabPage::AcceptFilter( USHORT nPos ) +bool SfxSaveTabPage::AcceptFilter( sal_uInt16 nPos ) { const OUString* pFilters = pImpl->aFilterArr[nPos].getConstArray(); sal_Bool bAlien = sal_False, bODF = sal_False; @@ -318,7 +318,7 @@ void SfxSaveTabPage::DetectHiddenControls() { long nDelta = 0; // the index of the first child window which perhaps have to move upwards - USHORT nWinIndex = WININDEX_SAVEURL_RELFSYS; + sal_uInt16 nWinIndex = WININDEX_SAVEURL_RELFSYS; SvtOptionsDialogOptions aOptionsDlgOpt; if ( aOptionsDlgOpt.IsOptionHidden( C2S("Backup"), CFG_PAGE_AND_GROUP ) ) @@ -345,7 +345,7 @@ void SfxSaveTabPage::DetectHiddenControls() if ( nDelta > 0 ) { - USHORT i, nChildCount = GetChildCount(); + sal_uInt16 i, nChildCount = GetChildCount(); for ( i = nWinIndex; i < nChildCount; ++i ) { Window* pWin = GetChild(i); @@ -356,9 +356,9 @@ void SfxSaveTabPage::DetectHiddenControls() } } // ----------------------------------------------------------------------- -BOOL SfxSaveTabPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SfxSaveTabPage::FillItemSet( SfxItemSet& rSet ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; SvtSaveOptions aSaveOpt; if(aLoadUserSettingsCB.IsChecked() != aLoadUserSettingsCB.GetSavedValue()) { @@ -378,54 +378,54 @@ BOOL SfxSaveTabPage::FillItemSet( SfxItemSet& rSet ) { rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_DOCINFO ), aDocInfoCB.IsChecked() ) ); - bModified |= TRUE; + bModified |= sal_True; } if ( aBackupCB.IsEnabled() && aBackupCB.IsChecked() != aBackupCB.GetSavedValue() ) { rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_BACKUP ), aBackupCB.IsChecked() ) ); - bModified |= TRUE; + bModified |= sal_True; } if ( aSizeOptimizationCB.IsChecked() != aSizeOptimizationCB.GetSavedValue() ) { rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_PRETTYPRINTING ), !aSizeOptimizationCB.IsChecked() ) ); - bModified |= TRUE; + bModified |= sal_True; } if ( aAutoSaveCB.IsChecked() != aAutoSaveCB.GetSavedValue() ) { rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_AUTOSAVE ), aAutoSaveCB.IsChecked() ) ); - bModified |= TRUE; + bModified |= sal_True; } if ( aWarnAlienFormatCB.IsChecked() != aWarnAlienFormatCB.GetSavedValue() ) { rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_WARNALIENFORMAT ), aWarnAlienFormatCB.IsChecked() ) ); - bModified |= TRUE; + bModified |= sal_True; } if ( aAutoSaveEdit.GetText() != aAutoSaveEdit.GetSavedValue() ) { rSet.Put( SfxUInt16Item( GetWhich( SID_ATTR_AUTOSAVEMINUTE ), - (UINT16)aAutoSaveEdit.GetValue() ) ); - bModified |= TRUE; + (sal_uInt16)aAutoSaveEdit.GetValue() ) ); + bModified |= sal_True; } // relativ speichern if ( aRelativeFsysCB.IsChecked() != aRelativeFsysCB.GetSavedValue() ) { rSet.Put( SfxBoolItem( GetWhich( SID_SAVEREL_FSYS ), aRelativeFsysCB.IsChecked() ) ); - bModified |= TRUE; + bModified |= sal_True; } if ( aRelativeInetCB.IsChecked() != aRelativeInetCB.GetSavedValue() ) { rSet.Put( SfxBoolItem( GetWhich( SID_SAVEREL_INET ), aRelativeInetCB.IsChecked() ) ); - bModified |= TRUE; + bModified |= sal_True; } SvtModuleOptions aModuleOpt; @@ -523,7 +523,7 @@ void SfxSaveTabPage::Reset( const SfxItemSet& ) Reference< XContainerQuery > xQuery(pImpl->xFact, UNO_QUERY); if(xQuery.is()) { - for(USHORT n = 0; n < aDocTypeLB.GetEntryCount(); n++) + for(sal_uInt16 n = 0; n < aDocTypeLB.GetEntryCount(); n++) { long nData = (long) aDocTypeLB.GetEntryData(n); OUString sCommand; @@ -591,7 +591,7 @@ void SfxSaveTabPage::Reset( const SfxItemSet& ) // aDocInfoCB.Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_DOCINFSAVE)); aBackupCB.Check(aSaveOpt.IsBackup()); - BOOL bBackupRO = aSaveOpt.IsReadOnly(SvtSaveOptions::E_BACKUP); + sal_Bool bBackupRO = aSaveOpt.IsReadOnly(SvtSaveOptions::E_BACKUP); aBackupCB.Enable(!bBackupRO); aBackupFI.Show(bBackupRO); @@ -690,7 +690,7 @@ OUString lcl_ExtracUIName(const Sequence<PropertyValue> rProperties) ---------------------------------------------------------------------------*/ IMPL_LINK( SfxSaveTabPage, FilterHdl_Impl, ListBox *, pBox ) { - USHORT nCurPos = aDocTypeLB.GetSelectEntryPos(); + sal_uInt16 nCurPos = aDocTypeLB.GetSelectEntryPos(); long nData = -1; if(nCurPos < APP_COUNT) @@ -718,7 +718,7 @@ IMPL_LINK( SfxSaveTabPage, FilterHdl_Impl, ListBox *, pBox ) OUString sSelect; for(int i = 0; i < pImpl->aUIFilterArr[nData].getLength(); i++) { - USHORT nEntryPos = aSaveAsLB.InsertEntry(pUIFilters[i]); + sal_uInt16 nEntryPos = aSaveAsLB.InsertEntry(pUIFilters[i]); if ( pImpl->aODFArr[nData][i] ) aSaveAsLB.SetEntryData( nEntryPos, (void*)pImpl ); if(pFilters[i] == pImpl->aDefaultArr[nData]) @@ -757,7 +757,7 @@ IMPL_LINK( SfxSaveTabPage, ODFVersionHdl_Impl, ListBox *, EMPTYARG ) if ( bShown ) { bool bHasODFFormat = false; - USHORT i = 0, nCount = aSaveAsLB.GetEntryCount(); + sal_uInt16 i = 0, nCount = aSaveAsLB.GetEntryCount(); for ( ; i < nCount; ++ i ) { if ( aSaveAsLB.GetEntryData(i) != NULL ) diff --git a/cui/source/options/optsave.hxx b/cui/source/options/optsave.hxx index aa7309401..de90c8636 100644 --- a/cui/source/options/optsave.hxx +++ b/cui/source/options/optsave.hxx @@ -87,7 +87,7 @@ private: DECL_LINK( FilterHdl_Impl, ListBox * ); DECL_LINK( ODFVersionHdl_Impl, ListBox * ); - bool AcceptFilter( USHORT nPos ); + bool AcceptFilter( sal_uInt16 nPos ); void DetectHiddenControls(); #endif @@ -97,7 +97,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx index 309c77946..488dbfc44 100644 --- a/cui/source/options/optupdt.cxx +++ b/cui/source/options/optupdt.cxx @@ -187,48 +187,48 @@ SvxOnlineUpdateTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet ) // ----------------------------------------------------------------------- -BOOL SvxOnlineUpdateTabPage::FillItemSet( SfxItemSet& ) +sal_Bool SvxOnlineUpdateTabPage::FillItemSet( SfxItemSet& ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; sal_Bool bValue; sal_Int64 nValue; if( m_aAutoCheckCheckBox.GetSavedValue() != m_aAutoCheckCheckBox.IsChecked() ) { - bValue = (TRUE == m_aAutoCheckCheckBox.IsChecked()); + bValue = (sal_True == m_aAutoCheckCheckBox.IsChecked()); m_xUpdateAccess->replaceByName( UNISTRING("AutoCheckEnabled"), uno::makeAny( bValue ) ); - bModified = TRUE; + bModified = sal_True; } nValue = 0; - if( TRUE == m_aEveryDayButton.IsChecked() ) + if( sal_True == m_aEveryDayButton.IsChecked() ) { - if( FALSE == m_aEveryDayButton.GetSavedValue() ) + if( sal_False == m_aEveryDayButton.GetSavedValue() ) nValue = 86400; } - else if( TRUE == m_aEveryWeekButton.IsChecked() ) + else if( sal_True == m_aEveryWeekButton.IsChecked() ) { - if( FALSE == m_aEveryWeekButton.GetSavedValue() ) + if( sal_False == m_aEveryWeekButton.GetSavedValue() ) nValue = 604800; } - else if( TRUE == m_aEveryMonthButton.IsChecked() ) + else if( sal_True == m_aEveryMonthButton.IsChecked() ) { - if( FALSE == m_aEveryMonthButton.GetSavedValue() ) + if( sal_False == m_aEveryMonthButton.GetSavedValue() ) nValue = 2592000; } if( nValue > 0 ) { m_xUpdateAccess->replaceByName( UNISTRING("CheckInterval"), uno::makeAny( nValue ) ); - bModified = TRUE; + bModified = sal_True; } if( m_aAutoDownloadCheckBox.GetSavedValue() != m_aAutoDownloadCheckBox.IsChecked() ) { - bValue = (TRUE == m_aAutoDownloadCheckBox.IsChecked()); + bValue = (sal_True == m_aAutoDownloadCheckBox.IsChecked()); m_xUpdateAccess->replaceByName( UNISTRING("AutoDownloadEnabled"), uno::makeAny( bValue ) ); - bModified = TRUE; + bModified = sal_True; } rtl::OUString sValue, aURL; @@ -238,7 +238,7 @@ BOOL SvxOnlineUpdateTabPage::FillItemSet( SfxItemSet& ) ( ! aURL.equals( sValue ) ) ) { m_xUpdateAccess->replaceByName( UNISTRING("DownloadDestination"), uno::makeAny( aURL ) ); - bModified = TRUE; + bModified = sal_True; } uno::Reference< util::XChangesBatch > xChangesBatch(m_xUpdateAccess, uno::UNO_QUERY); @@ -277,9 +277,9 @@ void SvxOnlineUpdateTabPage::Reset( const SfxItemSet& ) m_xUpdateAccess->getByName( UNISTRING("AutoDownloadEnabled") ) >>= bValue; m_aAutoDownloadCheckBox.Check(bValue); - m_aDestPathLabel.Enable(TRUE); - m_aDestPath.Enable(TRUE); - m_aChangePathButton.Enable(TRUE); + m_aDestPathLabel.Enable(sal_True); + m_aDestPath.Enable(sal_True); + m_aChangePathButton.Enable(sal_True); rtl::OUString sValue, aPath; m_xUpdateAccess->getByName( UNISTRING("DownloadDestination") ) >>= sValue; @@ -300,7 +300,7 @@ void SvxOnlineUpdateTabPage::FillUserData() IMPL_LINK( SvxOnlineUpdateTabPage, AutoCheckHdl_Impl, CheckBox *, pBox ) { - BOOL bEnabled = pBox->IsChecked(); + sal_Bool bEnabled = pBox->IsChecked(); m_aEveryDayButton.Enable(bEnabled); m_aEveryWeekButton.Enable(bEnabled); diff --git a/cui/source/options/optupdt.hxx b/cui/source/options/optupdt.hxx index 8a1414748..a4fb9bf7a 100644 --- a/cui/source/options/optupdt.hxx +++ b/cui/source/options/optupdt.hxx @@ -71,7 +71,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void FillUserData(); }; diff --git a/cui/source/options/radiobtnbox.cxx b/cui/source/options/radiobtnbox.cxx index 0dc9d6a1a..4586ef2f0 100644 --- a/cui/source/options/radiobtnbox.cxx +++ b/cui/source/options/radiobtnbox.cxx @@ -53,7 +53,7 @@ void SvxRadioButtonListBox::SetTabs() { SvxSimpleTable::SetTabs(); /* - USHORT nAdjust = SV_LBOXTAB_ADJUST_RIGHT | SV_LBOXTAB_ADJUST_LEFT | + sal_uInt16 nAdjust = SV_LBOXTAB_ADJUST_RIGHT | SV_LBOXTAB_ADJUST_LEFT | SV_LBOXTAB_ADJUST_CENTER | SV_LBOXTAB_ADJUST_NUMERIC | SV_LBOXTAB_FORCE; if ( aTabs.Count() > 0 ) { @@ -88,7 +88,7 @@ void SvxRadioButtonListBox::KeyInput( const KeyEvent& rKEvt ) void SvxRadioButtonListBox::HandleEntryChecked( SvLBoxEntry* _pEntry ) { - Select( _pEntry, TRUE ); + Select( _pEntry, sal_True ); SvButtonState eState = GetCheckButtonState( _pEntry ); if ( SV_BUTTON_CHECKED == eState ) diff --git a/cui/source/options/securityoptions.hxx b/cui/source/options/securityoptions.hxx index 764be40ab..5a233525e 100644 --- a/cui/source/options/securityoptions.hxx +++ b/cui/source/options/securityoptions.hxx @@ -74,13 +74,13 @@ namespace svx SecurityOptionsDialog( Window* pParent, SvtSecurityOptions* pOptions ); ~SecurityOptionsDialog(); - inline bool IsSaveOrSendDocsChecked() const { return m_aSaveOrSendDocsCB.IsChecked() != FALSE; } - inline bool IsSignDocsChecked() const { return m_aSignDocsCB.IsChecked() != FALSE; } - inline bool IsPrintDocsChecked() const { return m_aPrintDocsCB.IsChecked() != FALSE; } - inline bool IsCreatePdfChecked() const { return m_aCreatePdfCB.IsChecked() != FALSE; } - inline bool IsRemovePersInfoChecked() const { return m_aRemovePersInfoCB.IsChecked() != FALSE; } - inline bool IsRecommPasswdChecked() const { return m_aRecommPasswdCB.IsChecked() != FALSE; } - inline bool IsCtrlHyperlinkChecked() const { return m_aCtrlHyperlinkCB.IsChecked() != FALSE; } + inline bool IsSaveOrSendDocsChecked() const { return m_aSaveOrSendDocsCB.IsChecked() != sal_False; } + inline bool IsSignDocsChecked() const { return m_aSignDocsCB.IsChecked() != sal_False; } + inline bool IsPrintDocsChecked() const { return m_aPrintDocsCB.IsChecked() != sal_False; } + inline bool IsCreatePdfChecked() const { return m_aCreatePdfCB.IsChecked() != sal_False; } + inline bool IsRemovePersInfoChecked() const { return m_aRemovePersInfoCB.IsChecked() != sal_False; } + inline bool IsRecommPasswdChecked() const { return m_aRecommPasswdCB.IsChecked() != sal_False; } + inline bool IsCtrlHyperlinkChecked() const { return m_aCtrlHyperlinkCB.IsChecked() != sal_False; } }; //........................................................................ diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index b5d0cb3f0..d3a4b6f18 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -184,7 +184,7 @@ struct ModuleToGroupNameMap_Impl { const char* m_pModule; String m_sGroupName; - USHORT m_nNodeId; + sal_uInt16 m_nNodeId; }; static OfaPageResource* pPageRes = NULL; @@ -209,7 +209,7 @@ static ModuleToGroupNameMap_Impl ModuleMap[] = static void setGroupName( const rtl::OUString& rModule, const String& rGroupName ) { - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; while ( ModuleMap[ nIndex ].m_pModule ) { rtl::OUString sTemp = @@ -226,7 +226,7 @@ static void setGroupName( const rtl::OUString& rModule, const String& rGroupName static String getGroupName( const rtl::OUString& rModule, bool bForced ) { String sGroupName; - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; while ( ModuleMap[ nIndex ].m_pModule ) { rtl::OUString sTemp = @@ -264,14 +264,14 @@ static String getGroupName( const rtl::OUString& rModule, bool bForced ) static void deleteGroupNames() { - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; while ( ModuleMap[ nIndex ].m_pModule ) ModuleMap[ nIndex++ ].m_sGroupName = String::EmptyString(); } -static USHORT getGroupNodeId( const rtl::OUString& rModule ) +static sal_uInt16 getGroupNodeId( const rtl::OUString& rModule ) { - USHORT nNodeId = 0xFFFF, nIndex = 0; + sal_uInt16 nNodeId = 0xFFFF, nIndex = 0; while ( ModuleMap[ nIndex ].m_pModule ) { rtl::OUString sTemp = @@ -385,7 +385,7 @@ struct OptionsMapping_Impl { const char* m_pGroupName; const char* m_pPageName; - USHORT m_nPageId; + sal_uInt16 m_nPageId; }; static OptionsMapping_Impl __READONLY_DATA OptionsMap_Impl[] = @@ -473,11 +473,11 @@ static OptionsMapping_Impl __READONLY_DATA OptionsMap_Impl[] = { NULL, NULL, 0 } }; -static sal_Bool lcl_getStringFromID( USHORT _nPageId, String& _rGroupName, String& _rPageName ) +static sal_Bool lcl_getStringFromID( sal_uInt16 _nPageId, String& _rGroupName, String& _rPageName ) { sal_Bool bRet = sal_False; - USHORT nIdx = 0; + sal_uInt16 nIdx = 0; while ( OptionsMap_Impl[nIdx].m_pGroupName != NULL ) { if ( _nPageId == OptionsMap_Impl[nIdx].m_nPageId ) @@ -494,7 +494,7 @@ static sal_Bool lcl_getStringFromID( USHORT _nPageId, String& _rGroupName, Strin return bRet; } -static sal_Bool lcl_isOptionHidden( USHORT _nPageId, const SvtOptionsDialogOptions& _rOptOptions ) +static sal_Bool lcl_isOptionHidden( sal_uInt16 _nPageId, const SvtOptionsDialogOptions& _rOptOptions ) { sal_Bool bIsHidden = sal_False; String sGroupName, sPageName; @@ -878,7 +878,7 @@ void OfaTreeOptionsDialog::InitTreeAndHandler() WB_CLIPCHILDREN | WB_HSCROLL | WB_FORCE_MAKEVISIBLE | WB_QUICK_SEARCH ); aTreeLB.SetSpaceBetweenEntries( 0 ); aTreeLB.SetSelectionMode( SINGLE_SELECTION ); - aTreeLB.SetSublistOpenWithLeftRight( TRUE ); + aTreeLB.SetSublistOpenWithLeftRight( sal_True ); aTreeLB.SetExpandedHdl( LINK( this, OfaTreeOptionsDialog, ExpandedHdl_Impl ) ); aTreeLB.SetSelectHdl( LINK( this, OfaTreeOptionsDialog, ShowPageHdl_Impl ) ); aBackPB.SetClickHdl( LINK( this, OfaTreeOptionsDialog, BackHdl_Impl ) ); @@ -1443,7 +1443,7 @@ OfaPageResource::OfaPageResource() : FreeResource(); } -BOOL EnableSSO( void ) +sal_Bool EnableSSO( void ) { // SSO must be enabled if the configuration manager bootstrap settings // are configured as follows ... @@ -1472,7 +1472,7 @@ BOOL EnableSSO( void ) theBootstrap.getFrom( rtl::OUString::createFromAscii( "CFG_BackendService" ), theBackendServiceTypeValue ); - BOOL bSSOEnabled = + sal_Bool bSSOEnabled = ( theOfflineValue == theDefaultOfflineValue && ( theServerTypeValue.getLength() == 0 || theServerTypeValue == rtl::OUString::createFromAscii( "uno" ) ) && @@ -1481,7 +1481,7 @@ BOOL EnableSSO( void ) "com.sun.star.comp.configuration.backend.LdapSingleBackend" ) ); if ( bSSOEnabled && GetSSOCreator() == 0 ) { - bSSOEnabled = FALSE; + bSSOEnabled = sal_False; } return bSSOEnabled; } @@ -1538,10 +1538,10 @@ SfxItemSet* OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId ) if( SFX_ITEM_AVAILABLE <= pDispatch->QueryState( SID_ATTR_YEAR2000, pItem ) ) pRet->Put( SfxUInt16Item( SID_ATTR_YEAR2000, ((const SfxUInt16Item*)pItem)->GetValue() ) ); else - pRet->Put( SfxUInt16Item( SID_ATTR_YEAR2000, (USHORT)aMisc.GetYear2000() ) ); + pRet->Put( SfxUInt16Item( SID_ATTR_YEAR2000, (sal_uInt16)aMisc.GetYear2000() ) ); } else - pRet->Put( SfxUInt16Item( SID_ATTR_YEAR2000, (USHORT)aMisc.GetYear2000() ) ); + pRet->Put( SfxUInt16Item( SID_ATTR_YEAR2000, (sal_uInt16)aMisc.GetYear2000() ) ); // Sonstiges - Tabulator @@ -1673,7 +1673,7 @@ void OfaTreeOptionsDialog::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet // ------------------------------------------------------------------------- // Year2000 auswerten // ------------------------------------------------------------------------- - USHORT nY2K = USHRT_MAX; + sal_uInt16 nY2K = USHRT_MAX; if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_YEAR2000, sal_False, &pItem ) ) nY2K = ((const SfxUInt16Item*)pItem)->GetValue(); if( USHRT_MAX != nY2K ) @@ -1860,7 +1860,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) sal_uInt16 i, nPageId; // %PRODUCTNAME options - BOOL isSSOEnabled = EnableSSO(); + sal_Bool isSSOEnabled = EnableSSO(); if ( !lcl_isOptionHidden( SID_GENERAL_OPTIONS, aOptionsDlgOpt ) ) { ResStringArray& rGeneralArray = aDlgResource.GetGeneralArray(); @@ -2045,7 +2045,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) SfxModule* pScMod = ( *( SfxModule** ) GetAppData( SHL_CALC ) ); setGroupName( C2U("Calc"), rCalcArray.GetString(0) ); nGroup = AddGroup( rCalcArray.GetString( 0 ), pScMod, pScMod, SID_SC_EDITOPTIONS ); - const USHORT nCount = static_cast< const USHORT >( rCalcArray.Count() ); + const sal_uInt16 nCount = static_cast< const sal_uInt16 >( rCalcArray.Count() ); for ( i = 1; i < nCount; ++i ) { nPageId = (sal_uInt16)rCalcArray.GetValue(i); @@ -2073,7 +2073,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) setGroupName( C2U("Impress"), rImpressArray.GetString(0) ); nGroup = AddGroup( rImpressArray.GetString( 0 ), pSdMod, pSdMod, SID_SD_EDITOPTIONS ); const sal_Bool bCTL = aLanguageOptions.IsCTLFontEnabled(); - const USHORT nCount = static_cast< const USHORT >( rImpressArray.Count() ); + const sal_uInt16 nCount = static_cast< const sal_uInt16 >( rImpressArray.Count() ); for ( i = 1; i < nCount; ++i ) { nPageId = (sal_uInt16)rImpressArray.GetValue(i); @@ -2097,7 +2097,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) setGroupName( C2U("Draw"), rDrawArray.GetString(0) ); nGroup = AddGroup( rDrawArray.GetString( 0 ), pSdMod, pSdMod, SID_SD_GRAPHIC_OPTIONS ); const sal_Bool bCTL = aLanguageOptions.IsCTLFontEnabled(); - const USHORT nCount = static_cast< const USHORT >( rDrawArray.Count() ); + const sal_uInt16 nCount = static_cast< const sal_uInt16 >( rDrawArray.Count() ); for ( i = 1; i < nCount; ++i ) { nPageId = (sal_uInt16)rDrawArray.GetValue(i); @@ -2232,7 +2232,7 @@ void OfaTreeOptionsDialog::ResizeTreeLB( void ) const long nMax = aHiddenGB.GetSizePixel().Width() * 42 / 100; // don't ask where 42 comes from... but it looks / feels ok ;-) long nDelta = 50; // min. - USHORT nDepth = 0; + sal_uInt16 nDepth = 0; const long nIndent0 = PixelToLogic( Size( 28, 0 ) ).Width(); const long nIndent1 = PixelToLogic( Size( 52, 0 ) ).Width(); @@ -2577,10 +2577,10 @@ void OfaTreeOptionsDialog::LoadNodes( } } -USHORT lcl_getGroupId( const rtl::OUString& rGroupName, const SvTreeListBox& rTreeLB ) +sal_uInt16 lcl_getGroupId( const rtl::OUString& rGroupName, const SvTreeListBox& rTreeLB ) { String sGroupName( rGroupName ); - USHORT nRet = 0; + sal_uInt16 nRet = 0; SvLBoxEntry* pEntry = rTreeLB.First(); while( pEntry ) { @@ -2600,10 +2600,10 @@ USHORT lcl_getGroupId( const rtl::OUString& rGroupName, const SvTreeListBox& rTr void lcl_insertLeaf( OfaTreeOptionsDialog* pDlg, OptionsNode* pNode, OptionsLeaf* pLeaf, const SvTreeListBox& rTreeLB ) { - USHORT nGrpId = lcl_getGroupId( pNode->m_sLabel, rTreeLB ); + sal_uInt16 nGrpId = lcl_getGroupId( pNode->m_sLabel, rTreeLB ); if ( USHRT_MAX == nGrpId ) { - USHORT nNodeGrpId = getGroupNodeId( pNode->m_sId ); + sal_uInt16 nNodeGrpId = getGroupNodeId( pNode->m_sId ); nGrpId = pDlg->AddGroup( pNode->m_sLabel, NULL, NULL, nNodeGrpId ); if ( pNode->m_sPageURL.getLength() > 0 ) { diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx index f45be5210..f1f9afeed 100644 --- a/cui/source/options/webconninfo.cxx +++ b/cui/source/options/webconninfo.cxx @@ -55,7 +55,7 @@ PasswordTable::PasswordTable( Window* pParent, const ResId& rResId ) : SetStyle( GetStyle() | WB_NOINITIALSELECTION ); } -void PasswordTable::InsertHeaderItem( USHORT nColumn, const String& rText, HeaderBarItemBits nBits ) +void PasswordTable::InsertHeaderItem( sal_uInt16 nColumn, const String& rText, HeaderBarItemBits nBits ) { GetTheHeaderBar()->InsertItem( nColumn, rText, 0, nBits ); } @@ -67,11 +67,11 @@ void PasswordTable::ResetTabs() void PasswordTable::Resort( bool bForced ) { - USHORT nColumn = GetSelectedCol(); + sal_uInt16 nColumn = GetSelectedCol(); if ( 0 == nColumn || bForced ) // only the first column is sorted { HeaderBarItemBits nBits = GetTheHeaderBar()->GetItemBits(1); - BOOL bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); + sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); SvSortMode eMode = SortAscending; if ( bUp ) @@ -161,8 +161,8 @@ WebConnectionInfoDialog::WebConnectionInfoDialog( Window* pParent ) : m_aChangeBtn.SetClickHdl( LINK( this, WebConnectionInfoDialog, ChangePasswordHdl ) ); m_aPasswordsLB.SetSelectHdl( LINK( this, WebConnectionInfoDialog, EntrySelectedHdl ) ); - m_aRemoveBtn.Enable( FALSE ); - m_aChangeBtn.Enable( FALSE ); + m_aRemoveBtn.Enable( sal_False ); + m_aChangeBtn.Enable( sal_False ); HeaderBarClickedHdl( NULL ); } @@ -350,12 +350,12 @@ IMPL_LINK( WebConnectionInfoDialog, EntrySelectedHdl, void*, EMPTYARG ) SvLBoxEntry* pEntry = m_aPasswordsLB.GetCurEntry(); if ( !pEntry ) { - m_aRemoveBtn.Enable( FALSE ); - m_aChangeBtn.Enable( FALSE ); + m_aRemoveBtn.Enable( sal_False ); + m_aChangeBtn.Enable( sal_False ); } else { - m_aRemoveBtn.Enable( TRUE ); + m_aRemoveBtn.Enable( sal_True ); // url container entries (-> use system credentials) have // no password diff --git a/cui/source/options/webconninfo.hxx b/cui/source/options/webconninfo.hxx index 54d146b37..75eb6ecd5 100644 --- a/cui/source/options/webconninfo.hxx +++ b/cui/source/options/webconninfo.hxx @@ -43,7 +43,7 @@ namespace svx public: PasswordTable( Window* pParent, const ResId& rResId ); - void InsertHeaderItem( USHORT nColumn, const String& rText, HeaderBarItemBits nBits ); + void InsertHeaderItem( sal_uInt16 nColumn, const String& rText, HeaderBarItemBits nBits ); void ResetTabs(); void Resort( bool bForced ); }; |