summaryrefslogtreecommitdiff
path: root/sw/source/ui/envelp/labfmt.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/envelp/labfmt.cxx')
-rw-r--r--sw/source/ui/envelp/labfmt.cxx52
1 files changed, 26 insertions, 26 deletions
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index fb3ae4dae6..a670927baf 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -54,7 +54,7 @@ using namespace ::com::sun::star::beans;
using ::rtl::OUString;
-#define ROUND(x) ((USHORT) ((x) + .5))
+#define ROUND(x) ((sal_uInt16) ((x) + .5))
SwLabPreview::SwLabPreview( const SwLabFmtPage* pParent, const ResId& rResID ) :
@@ -78,7 +78,7 @@ SwLabPreview::SwLabPreview( const SwLabFmtPage* pParent, const ResId& rResID ) :
SetBackground(Wallpaper(rWinColor));
Font aFont = GetFont();
- aFont.SetTransparent(TRUE);
+ aFont.SetTransparent(sal_True);
aFont.SetWeight (WEIGHT_NORMAL);
SetFont(aFont);
@@ -125,7 +125,7 @@ void SwLabPreview::Paint(const Rectangle &)
SetLineColor(rWinColor);
SetFillColor(aGrayColor);
Font aPaintFont(GetFont());
- aPaintFont.SetTransparent(FALSE);
+ aPaintFont.SetTransparent(sal_False);
SetFont(aPaintFont);
// size of region to be displayed
@@ -173,8 +173,8 @@ void SwLabPreview::Paint(const Rectangle &)
// Labels
SetClipRegion (Rectangle(Point(lX0, lY0), Size(lOutlineW, lOutlineH)));
SetFillColor(rWinColor);
- for (USHORT nRow = 0; nRow < Min((USHORT) 2, (USHORT) aItem.nRows); nRow++)
- for (USHORT nCol = 0; nCol < Min((USHORT) 2, (USHORT) aItem.nCols); nCol++)
+ for (sal_uInt16 nRow = 0; nRow < Min((sal_uInt16) 2, (sal_uInt16) aItem.nRows); nRow++)
+ for (sal_uInt16 nCol = 0; nCol < Min((sal_uInt16) 2, (sal_uInt16) aItem.nCols); nCol++)
DrawRect(Rectangle(
Point(ROUND(lX0 + f * (aItem.lLeft + nCol * aItem.lHDist)),
ROUND(lY0 + f * (aItem.lUpper + nRow * aItem.lVDist))),
@@ -186,15 +186,15 @@ void SwLabPreview::Paint(const Rectangle &)
if (aItem.lLeft)
{
long lX = (lX0 + lX1) / 2;
- DrawArrow(Point(lX0, lY0 - 5), Point(lX1, lY0 - 5), FALSE);
- DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), TRUE);
+ DrawArrow(Point(lX0, lY0 - 5), Point(lX1, lY0 - 5), sal_False);
+ DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), sal_True);
DrawText(Point(lX1 - lLeftWidth, lY0 - 10 - lXHeight), aLeftStr);
}
// annotation: upper border
if (aItem.lUpper)
{
- DrawArrow(Point(lX0 - 5, lY0), Point(lX0 - 5, lY1), FALSE);
+ DrawArrow(Point(lX0 - 5, lY0), Point(lX0 - 5, lY1), sal_False);
DrawText(Point(lX0 - 10 - lUpperWidth, ROUND(lY0 + f * aItem.lUpper / 2 - lXHeight / 2)), aUpperStr);
}
@@ -214,36 +214,36 @@ void SwLabPreview::Paint(const Rectangle &)
if (aItem.nCols > 1)
{
long lX = (lX1 + lX3) / 2;
- DrawArrow(Point(lX1, lY0 - 5), Point(lX3, lY0 - 5), FALSE);
- DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), TRUE);
+ DrawArrow(Point(lX1, lY0 - 5), Point(lX3, lY0 - 5), sal_False);
+ DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), sal_True);
DrawText(Point(lX - lHDistWidth / 2, lY0 - 10 - lXHeight), aHDistStr);
}
// annotation: vertical gap
if (aItem.nRows > 1)
{
- DrawArrow(Point(lX0 - 5, lY1), Point(lX0 - 5, lY3), FALSE);
+ DrawArrow(Point(lX0 - 5, lY1), Point(lX0 - 5, lY3), sal_False);
DrawText(Point(lX0 - 10 - lVDistWidth, ROUND(lY1 + f * aItem.lVDist / 2 - lXHeight / 2)), aVDistStr);
}
// annotation: columns
{
long lY = lY0 + lOutlineH + 4;
- DrawArrow(Point(lX0, lY), Point(lX0 + lOutlineW - 1, lY), TRUE);
+ DrawArrow(Point(lX0, lY), Point(lX0 + lOutlineW - 1, lY), sal_True);
DrawText(Point((lX0 + lX0 + lOutlineW - 1) / 2 - lColsWidth / 2, lY + 5), aColsStr);
}
// annotation: lines
{
long lX = lX0 + lOutlineW + 4;
- DrawArrow(Point(lX, lY0), Point(lX, lY0 + lOutlineH - 1), TRUE);
+ DrawArrow(Point(lX, lY0), Point(lX, lY0 + lOutlineH - 1), sal_True);
DrawText(Point(lX + 5, (lY0 + lY0 + lOutlineH - 1 - lXHeight / 2) / 2), aRowsStr);
}
}
// Arror or interval character --------------------------------------------
-void SwLabPreview::DrawArrow(const Point &rP1, const Point &rP2, BOOL bArrow)
+void SwLabPreview::DrawArrow(const Point &rP1, const Point &rP2, sal_Bool bArrow)
{
DrawLine(rP1, rP2);
@@ -324,14 +324,14 @@ SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) :
aRowsText (this, SW_RES(TXT_ROWS )),
aRowsField (this, SW_RES(FLD_ROWS )),
aSavePB (this, SW_RES(PB_SAVE )),
- bModified(FALSE),
+ bModified(sal_False),
aItem ((const SwLabItem&) rSet.Get(FN_LABEL))
{
FreeResource();
SetExchangeSupport();
// Metrics
- FieldUnit aMetric = ::GetDfltMetric(FALSE);
+ FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric(aHDistField , aMetric);
SetMetric(aVDistField , aMetric);
SetMetric(aWidthField , aMetric);
@@ -373,7 +373,7 @@ SwLabFmtPage::~SwLabFmtPage()
// Modify-handler of MetricFields. start preview timer
IMPL_LINK_INLINE_START( SwLabFmtPage, ModifyHdl, Edit *, EMPTYARG )
{
- bModified = TRUE;
+ bModified = sal_True;
aPreviewTimer.Start();
return 0;
}
@@ -477,7 +477,7 @@ int SwLabFmtPage::DeactivatePage(SfxItemSet* _pSet)
if (_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
void SwLabFmtPage::FillItem(SwLabItem& rItem)
@@ -493,17 +493,17 @@ void SwLabFmtPage::FillItem(SwLabItem& rItem)
rItem.lHeight = rRec.lHeight = static_cast< long >(GETFLDVAL(aHeightField));
rItem.lLeft = rRec.lLeft = static_cast< long >(GETFLDVAL(aLeftField ));
rItem.lUpper = rRec.lUpper = static_cast< long >(GETFLDVAL(aUpperField ));
- rItem.nCols = rRec.nCols = (USHORT) aColsField.GetValue();
- rItem.nRows = rRec.nRows = (USHORT) aRowsField.GetValue();
+ rItem.nCols = rRec.nCols = (sal_uInt16) aColsField.GetValue();
+ rItem.nRows = rRec.nRows = (sal_uInt16) aRowsField.GetValue();
}
}
-BOOL SwLabFmtPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SwLabFmtPage::FillItemSet(SfxItemSet& rSet)
{
FillItem(aItem);
rSet.Put(aItem);
- return TRUE;
+ return sal_True;
}
void SwLabFmtPage::Reset(const SfxItemSet& )
@@ -544,18 +544,18 @@ IMPL_LINK( SwLabFmtPage, SaveHdl, PushButton *, EMPTYARG )
aRec.lHeight = static_cast< long >(GETFLDVAL(aHeightField));
aRec.lLeft = static_cast< long >(GETFLDVAL(aLeftField ));
aRec.lUpper = static_cast< long >(GETFLDVAL(aUpperField ));
- aRec.nCols = (USHORT) aColsField.GetValue();
- aRec.nRows = (USHORT) aRowsField.GetValue();
+ aRec.nCols = (sal_uInt16) aColsField.GetValue();
+ aRec.nRows = (sal_uInt16) aRowsField.GetValue();
aRec.bCont = aItem.bCont;
SwSaveLabelDlg* pSaveDlg = new SwSaveLabelDlg(this, aRec);
pSaveDlg->SetLabel(aItem.aLstMake, aItem.aLstType);
pSaveDlg->Execute();
if(pSaveDlg->GetLabel(aItem))
{
- bModified = FALSE;
+ bModified = sal_False;
const Sequence<OUString>& rMan = GetParent()->GetLabelsConfig().GetManufacturers();
SvStringsDtor& rMakes = GetParent()->Makes();
- if(rMakes.Count() < (USHORT)rMan.getLength())
+ if(rMakes.Count() < (sal_uInt16)rMan.getLength())
{
rMakes.DeleteAndDestroy(0, rMakes.Count());
const OUString* pMan = rMan.getConstArray();