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 c39daed1729e..a4ed05353058 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;
// #define ------------------------------------------------------------------
-#define ROUND(x) ((USHORT) ((x) + .5))
+#define ROUND(x) ((sal_uInt16) ((x) + .5))
// --------------------------------------------------------------------------
SwLabPreview::SwLabPreview( const SwLabFmtPage* pParent, const ResId& rResID ) :
@@ -79,7 +79,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);
@@ -127,7 +127,7 @@ void SwLabPreview::Paint(const Rectangle &)
SetLineColor(rWinColor);
SetFillColor(aGrayColor);
Font aPaintFont(GetFont());
- aPaintFont.SetTransparent(FALSE);
+ aPaintFont.SetTransparent(sal_False);
SetFont(aPaintFont);
// Groesse des darzustellenden Bereichs
@@ -175,8 +175,8 @@ void SwLabPreview::Paint(const Rectangle &)
// Etiketten
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))),
@@ -188,15 +188,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);
}
// Beschriftung: Rand oben
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);
}
@@ -216,29 +216,29 @@ 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);
}
// Beschriftung: Vertikaler Abstand
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);
}
// Beschriftung: Spalten
{
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);
}
// Beschriftung: Zeilen
{
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);
}
}
@@ -247,7 +247,7 @@ void SwLabPreview::Paint(const Rectangle &)
-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);
@@ -334,14 +334,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();
// Metriken
- FieldUnit aMetric = ::GetDfltMetric(FALSE);
+ FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric(aHDistField , aMetric);
SetMetric(aVDistField , aMetric);
SetMetric(aWidthField , aMetric);
@@ -390,7 +390,7 @@ SwLabFmtPage::~SwLabFmtPage()
IMPL_LINK_INLINE_START( SwLabFmtPage, ModifyHdl, Edit *, EMPTYARG )
{
- bModified = TRUE;
+ bModified = sal_True;
aPreviewTimer.Start();
return 0;
}
@@ -515,7 +515,7 @@ int SwLabFmtPage::DeactivatePage(SfxItemSet* _pSet)
if (_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
// --------------------------------------------------------------------------
@@ -535,8 +535,8 @@ 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();
}
}
@@ -544,12 +544,12 @@ void SwLabFmtPage::FillItem(SwLabItem& rItem)
-BOOL SwLabFmtPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SwLabFmtPage::FillItemSet(SfxItemSet& rSet)
{
FillItem(aItem);
rSet.Put(aItem);
- return TRUE;
+ return sal_True;
}
// --------------------------------------------------------------------------
@@ -594,18 +594,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();