summaryrefslogtreecommitdiff
path: root/sw/source/ui/misc/pgfnote.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/misc/pgfnote.cxx')
-rw-r--r--sw/source/ui/misc/pgfnote.cxx58
1 files changed, 29 insertions, 29 deletions
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index 7bd2febab8..f68ba4d9d4 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -62,7 +62,7 @@
/*-----------------------------------------------------#---------------
Beschreibung: vordefinierte Linien in Point
--------------------------------------------------------------------*/
-static const USHORT nLines[] = {
+static const sal_uInt16 nLines[] = {
0,
50,
100,
@@ -71,9 +71,9 @@ static const USHORT nLines[] = {
500
};
-static const USHORT nLineCount = SAL_N_ELEMENTS(nLines);
+static const sal_uInt16 nLineCount = SAL_N_ELEMENTS(nLines);
-static USHORT aPageRg[] = {
+static sal_uInt16 aPageRg[] = {
FN_PARAM_FTN_INFO, FN_PARAM_FTN_INFO,
0
};
@@ -82,13 +82,13 @@ static USHORT aPageRg[] = {
Beschreibung: liefert zurueck, ob die Linienbreite nWidth bereits
in der Listbox enthalten ist.
------------------------------------------------------------------------*/
-BOOL lcl_HasLineWidth(USHORT nWidth)
+sal_Bool lcl_HasLineWidth(sal_uInt16 nWidth)
{
- for(USHORT i = 0; i < nLineCount; ++i) {
+ for(sal_uInt16 i = 0; i < nLineCount; ++i) {
if(nLines[i] == nWidth)
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*------------------------------------------------------------------------
@@ -98,7 +98,7 @@ BOOL lcl_HasLineWidth(USHORT nWidth)
------------------------------------------------------------------------*/
IMPL_LINK_INLINE_START( SwFootNotePage, HeightPage, Button *, EMPTYARG )
{
- aMaxHeightEdit.Enable(FALSE);
+ aMaxHeightEdit.Enable(sal_False);
return 0;
}
IMPL_LINK_INLINE_END( SwFootNotePage, HeightPage, Button *, EMPTYARG )
@@ -141,14 +141,14 @@ IMPL_LINK( SwFootNotePage, HeightModify, MetricField *, EMPTYARG )
SwFootNotePage::SwFootNotePage(Window *pParent, const SfxItemSet &rSet) :
SfxTabPage(pParent, SW_RES(TP_FOOTNOTE_PAGE), rSet),
-
+ aPosHeader(this, SW_RES(FL_FOOTNOTE_SIZE)),
aMaxHeightPageBtn(this, SW_RES(RB_MAXHEIGHT_PAGE)),
aMaxHeightBtn(this, SW_RES(RB_MAXHEIGHT)),
aMaxHeightEdit(this, SW_RES(ED_MAXHEIGHT)),
aDistLbl(this, SW_RES(FT_DIST)),
aDistEdit(this, SW_RES(ED_DIST)),
- aPosHeader(this, SW_RES(FL_FOOTNOTE_SIZE)),
-
+
+ aLineHeader(this, SW_RES(FL_LINE)),
aLinePosLbl(this, SW_RES(FT_LINEPOS)),
aLinePosBox(this, SW_RES(DLB_LINEPOS)),
aLineTypeLbl(this, SW_RES(FT_LINETYPE)),
@@ -156,19 +156,19 @@ SwFootNotePage::SwFootNotePage(Window *pParent, const SfxItemSet &rSet) :
aLineWidthLbl(this, SW_RES(FT_LINEWIDTH)),
aLineWidthEdit(this, SW_RES(ED_LINEWIDTH)),
aLineDistLbl(this, SW_RES(FT_LINEDIST)),
- aLineDistEdit(this, SW_RES(ED_LINEDIST)),
- aLineHeader(this, SW_RES(FL_LINE))
-{
+ aLineDistEdit(this, SW_RES(ED_LINEDIST))
+ {
FreeResource();
SetExchangeSupport();
- FieldUnit aMetric = ::GetDfltMetric(FALSE);
+ FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric( aMaxHeightEdit, aMetric );
SetMetric( aDistEdit, aMetric );
SetMetric( aLineDistEdit, aMetric );
MeasurementSystem eSys = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum();
long nHeightValue = MEASURE_METRIC != eSys ? 1440 : 1134;
aMaxHeightEdit.SetValue(aMaxHeightEdit.Normalize(nHeightValue),FUNIT_TWIP);;
+ aMaxHeightEdit.SetAccessibleRelationLabeledBy(&aMaxHeightBtn);
}
SwFootNotePage::~SwFootNotePage()
@@ -203,12 +203,12 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet)
if(lHeight)
{
aMaxHeightEdit.SetValue(aMaxHeightEdit.Normalize(lHeight),FUNIT_TWIP);
- aMaxHeightBtn.Check(TRUE);
+ aMaxHeightBtn.Check(sal_True);
}
else
{
- aMaxHeightPageBtn.Check(TRUE);
- aMaxHeightEdit.Enable(FALSE);
+ aMaxHeightPageBtn.Check(sal_True);
+ aMaxHeightEdit.Enable(sal_False);
}
aMaxHeightPageBtn.SetClickHdl(LINK(this,SwFootNotePage,HeightPage));
aMaxHeightBtn.SetClickHdl(LINK(this,SwFootNotePage,HeightMetric));
@@ -218,16 +218,16 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet)
aLineDistEdit.SetLoseFocusHdl( aLk );
// Trennlinie
- for(USHORT i = 0; i < nLineCount; ++i)
+ for(sal_uInt16 i = 0; i < nLineCount; ++i)
aLineTypeBox.InsertEntry(nLines[i]);
- const USHORT nWidth = (USHORT)pFtnInfo->GetLineWidth() * TWIP_TO_LBOX;
+ const sal_uInt16 nWidth = (sal_uInt16)pFtnInfo->GetLineWidth() * TWIP_TO_LBOX;
if ( !lcl_HasLineWidth(nWidth) )
aLineTypeBox.InsertEntry(nWidth);
aLineTypeBox.SelectEntry(nWidth);
// Position
- aLinePosBox.SelectEntryPos( static_cast< USHORT >(pFtnInfo->GetAdj()) );
+ aLinePosBox.SelectEntryPos( static_cast< sal_uInt16 >(pFtnInfo->GetAdj()) );
// Breite
Fraction aTmp( 100, 1 );
@@ -245,7 +245,7 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet)
/*--------------------------------------------------------------------
Beschreibung: Attribute in den Set stopfen bei OK
--------------------------------------------------------------------*/
-BOOL SwFootNotePage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwFootNotePage::FillItemSet(SfxItemSet &rSet)
{
SwPageFtnInfoItem aItem((const SwPageFtnInfoItem&)GetItemSet().Get(FN_PARAM_FTN_INFO));
@@ -266,7 +266,7 @@ BOOL SwFootNotePage::FillItemSet(SfxItemSet &rSet)
aLineDistEdit.Denormalize(aLineDistEdit.GetValue(FUNIT_TWIP))));
// Trennlinie
- const USHORT nPos = aLineTypeBox.GetSelectEntryPos();
+ const sal_uInt16 nPos = aLineTypeBox.GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND != nPos )
rFtnInfo.SetLineWidth(nLines[nPos] / TWIP_TO_LBOX);
@@ -281,7 +281,7 @@ BOOL SwFootNotePage::FillItemSet(SfxItemSet &rSet)
aItem != *pOldItem )
rSet.Put(aItem);
- return TRUE;
+ return sal_True;
}
void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
@@ -290,7 +290,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
lMaxHeight = rSize.GetSize().Height();
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_HEADERSET), FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_HEADERSET), sal_False, &pItem ) )
{
const SfxItemSet& rHeaderSet = ((SvxSetItem*)pItem)->GetItemSet();
const SfxBoolItem& rHeaderOn =
@@ -305,7 +305,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
}
if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_FOOTERSET),
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
const SfxItemSet& rFooterSet = ((SvxSetItem*)pItem)->GetItemSet();
const SfxBoolItem& rFooterOn =
@@ -319,7 +319,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
}
}
- if ( rSet.GetItemState( RES_UL_SPACE , FALSE ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( RES_UL_SPACE , sal_False ) == SFX_ITEM_SET )
{
const SvxULSpaceItem &rUL = (const SvxULSpaceItem&)rSet.Get( RES_UL_SPACE );
lMaxHeight -= rUL.GetUpper() + rUL.GetLower();
@@ -337,10 +337,10 @@ int SwFootNotePage::DeactivatePage( SfxItemSet* _pSet)
if(_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
-USHORT* SwFootNotePage::GetRanges()
+sal_uInt16* SwFootNotePage::GetRanges()
{
return aPageRg;
}