diff options
Diffstat (limited to 'sw/source/ui/envelp/envfmt.cxx')
-rw-r--r-- | sw/source/ui/envelp/envfmt.cxx | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx index cfb5ad8f4afd..328b7391ef46 100644 --- a/sw/source/ui/envelp/envfmt.cxx +++ b/sw/source/ui/envelp/envfmt.cxx @@ -131,7 +131,7 @@ SwEnvFmtPage::SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet) : SetExchangeSupport(); // Metriken - FieldUnit aMetric = ::GetDfltMetric(FALSE); + FieldUnit aMetric = ::GetDfltMetric(sal_False); SetMetric(aAddrLeftField, aMetric); SetMetric(aAddrTopField, aMetric); SetMetric(aSendLeftField, aMetric); @@ -176,29 +176,29 @@ SwEnvFmtPage::SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet) : aSizeFormatBox .SetSelectHdl(LINK(this, SwEnvFmtPage, FormatHdl)); // aSizeFormatBox - for (USHORT i = PAPER_A3; i <= PAPER_KAI32BIG; i++) + for (sal_uInt16 i = PAPER_A3; i <= PAPER_KAI32BIG; i++) { if (i != PAPER_USER) { String aPaperName = SvxPaperInfo::GetName((Paper) i), aEntryName; - USHORT nPos = 0; - BOOL bFound = FALSE; + sal_uInt16 nPos = 0; + sal_Bool bFound = sal_False; while (nPos < aSizeFormatBox.GetEntryCount() && !bFound) { aEntryName = aSizeFormatBox.GetEntry(i); if (aEntryName < aPaperName) nPos++; else - bFound = TRUE; + bFound = sal_True; } aSizeFormatBox.InsertEntry(aPaperName, nPos); - aIDs.Insert((USHORT) i, nPos); + aIDs.Insert((sal_uInt16) i, nPos); } } aSizeFormatBox.InsertEntry(SvxPaperInfo::GetName(PAPER_USER)); - aIDs.Insert((USHORT) PAPER_USER, aIDs.Count()); + aIDs.Insert((sal_uInt16) PAPER_USER, aIDs.Count()); } @@ -226,13 +226,13 @@ IMPL_LINK_INLINE_START( SwEnvFmtPage, ModifyHdl, Edit *, pEdit ) if (pEdit == &aSizeWidthField || pEdit == &aSizeHeightField) { Paper ePaper = SvxPaperInfo::GetSvxPaper( - Size(lHeight, lWidth), MAP_TWIP, TRUE); - for (USHORT i = 0; i < aIDs.Count(); i++) - if (aIDs[i] == (USHORT)ePaper) + Size(lHeight, lWidth), MAP_TWIP, sal_True); + for (sal_uInt16 i = 0; i < aIDs.Count(); i++) + if (aIDs[i] == (sal_uInt16)ePaper) aSizeFormatBox.SelectEntryPos(i); // Benutzergroesse merken - if (aIDs[aSizeFormatBox.GetSelectEntryPos()] == (USHORT)PAPER_USER) + if (aIDs[aSizeFormatBox.GetSelectEntryPos()] == (sal_uInt16)PAPER_USER) { lUserW = lWidth ; lUserH = lHeight; @@ -259,9 +259,9 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton ) ASSERT(pSh, "Shell fehlt"); // Collection-Ptr ermitteln - BOOL bSender = pButton != &aAddrEditButton; + sal_Bool bSender = pButton != &aAddrEditButton; - SwTxtFmtColl* pColl = pSh->GetTxtCollFromPool( static_cast< USHORT >( + SwTxtFmtColl* pColl = pSh->GetTxtCollFromPool( static_cast< sal_uInt16 >( bSender ? RES_POOLCOLL_SENDADRESS : RES_POOLCOLL_JAKETADRESS)); ASSERT(pColl, "Text-Collection fehlt"); @@ -279,7 +279,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton ) const SfxPoolItem *pTmpBrush; if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_CHRATR_BACKGROUND, - TRUE, &pTmpBrush ) ) + sal_True, &pTmpBrush ) ) { SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) ); aTmpBrush.SetWhich( RES_BACKGROUND ); @@ -297,7 +297,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton ) { SfxItemSet aOutputSet( *pDlg->GetOutputItemSet() ); if( SFX_ITEM_SET == aOutputSet.GetItemState( RES_BACKGROUND, - FALSE, &pTmpBrush ) ) + sal_False, &pTmpBrush ) ) { SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) ); aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND ); @@ -322,7 +322,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton ) const SvxTabStopItem& rDefTabs = (const SvxTabStopItem&) pSh->GetView().GetCurShell()->GetPool().GetDefaultItem(RES_PARATR_TABSTOP); - USHORT nDefDist = ::GetTabDist( rDefTabs ); + sal_uInt16 nDefDist = ::GetTabDist( rDefTabs ); SfxUInt16Item aDefDistItem( SID_ATTR_TABSTOP_DEFAULTS, nDefDist ); aTmpSet.Put( aDefDistItem ); @@ -346,9 +346,9 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton ) // Defaults evtl umsetzen const SfxPoolItem* pItem = 0; SfxItemSet* pOutputSet = (SfxItemSet*)pDlg->GetOutputItemSet(); - USHORT nNewDist; + sal_uInt16 nNewDist; if( SFX_ITEM_SET == pOutputSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, - FALSE, &pItem ) && + sal_False, &pItem ) && nDefDist != (nNewDist = ((SfxUInt16Item*)pItem)->GetValue()) ) { SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP ); @@ -373,16 +373,16 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton ) Beschreibung: Ein temporaeres Itemset, das bei Abbruch verworfen wird ------------------------------------------------------------------------*/ -SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender) +SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, sal_Bool bSender) { SfxItemSet *&pAddrSet = bSender ? GetParent()->pSenderSet : GetParent()->pAddresseeSet; if (!pAddrSet) { // Range ermitteln (Ranges beider Itemsets mergen) - const USHORT *pRanges = pColl->GetAttrSet().GetRanges(); + const sal_uInt16 *pRanges = pColl->GetAttrSet().GetRanges(); - static USHORT __READONLY_DATA aRanges[] = + static sal_uInt16 __READONLY_DATA aRanges[] = { RES_PARATR_BEGIN, RES_PARATR_ADJUST, RES_PARATR_TABSTOP, RES_PARATR_END-1, @@ -396,12 +396,12 @@ SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender) }; // BruteForce-Merge, weil MergeRange in SvTools buggy ist: - USHORT i = 0; + sal_uInt16 i = 0; SvLongsSort aMergedRanges( 0, 10 ); while (pRanges[i]) { - for (USHORT nPos = pRanges[i]; nPos <= pRanges[i+1]; nPos++) + for (sal_uInt16 nPos = pRanges[i]; nPos <= pRanges[i+1]; nPos++) aMergedRanges.Insert(nPos); i += 2; } @@ -410,7 +410,7 @@ SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender) while (aRanges[i]) { - for (USHORT nPos = aRanges[i]; nPos <= aRanges[i+1]; nPos++) + for (sal_uInt16 nPos = aRanges[i]; nPos <= aRanges[i+1]; nPos++) aMergedRanges.Insert(nPos); i += 2; } @@ -438,9 +438,9 @@ SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender) } // Neue Ranges erzeugen - USHORT *pNewRanges = new USHORT[aCompactedRanges.Count() + 1]; + sal_uInt16 *pNewRanges = new sal_uInt16[aCompactedRanges.Count() + 1]; for (i = 0; i < aCompactedRanges.Count(); i++) - pNewRanges[i] = (USHORT)aCompactedRanges[i]; + pNewRanges[i] = (sal_uInt16)aCompactedRanges[i]; pNewRanges[i] = 0; @@ -466,8 +466,8 @@ IMPL_LINK( SwEnvFmtPage, FormatHdl, ListBox *, EMPTYARG ) long lAddrFromLeft; long lAddrFromTop; - USHORT nPaper = aIDs[aSizeFormatBox.GetSelectEntryPos()]; - if (nPaper != (USHORT)PAPER_USER) + sal_uInt16 nPaper = aIDs[aSizeFormatBox.GetSelectEntryPos()]; + if (nPaper != (sal_uInt16)PAPER_USER) { Size aSz = SvxPaperInfo::GetPaperSize((Paper)nPaper); lWidth = Max(aSz.Width(), aSz.Height()); @@ -577,8 +577,8 @@ void SwEnvFmtPage::FillItem(SwEnvItem& rItem) rItem.lSendFromLeft = static_cast< sal_Int32 >(GetFldVal(aSendLeftField)); rItem.lSendFromTop = static_cast< sal_Int32 >(GetFldVal(aSendTopField )); - USHORT nPaper = aIDs[aSizeFormatBox.GetSelectEntryPos()]; - if (nPaper == (USHORT)PAPER_USER) + sal_uInt16 nPaper = aIDs[aSizeFormatBox.GetSelectEntryPos()]; + if (nPaper == (sal_uInt16)PAPER_USER) { long lWVal = static_cast< long >(GetFldVal(aSizeWidthField )); long lHVal = static_cast< long >(GetFldVal(aSizeHeightField)); @@ -597,11 +597,11 @@ void SwEnvFmtPage::FillItem(SwEnvItem& rItem) // -------------------------------------------------------------------------- -BOOL __EXPORT SwEnvFmtPage::FillItemSet(SfxItemSet& rSet) +sal_Bool __EXPORT SwEnvFmtPage::FillItemSet(SfxItemSet& rSet) { FillItem(GetParent()->aEnvItem); rSet.Put(GetParent()->aEnvItem); - return TRUE; + return sal_True; } // -------------------------------------------------------------------------- @@ -613,9 +613,9 @@ void __EXPORT SwEnvFmtPage::Reset(const SfxItemSet& rSet) Paper ePaper = SvxPaperInfo::GetSvxPaper( Size( Min(rItem.lWidth, rItem.lHeight), - Max(rItem.lWidth, rItem.lHeight)), MAP_TWIP, TRUE); - for (USHORT i = 0; i < (USHORT) aIDs.Count(); i++) - if (aIDs[i] == (USHORT)ePaper) + Max(rItem.lWidth, rItem.lHeight)), MAP_TWIP, sal_True); + for (sal_uInt16 i = 0; i < (sal_uInt16) aIDs.Count(); i++) + if (aIDs[i] == (sal_uInt16)ePaper) aSizeFormatBox.SelectEntryPos(i); // Die MetricFields |