summaryrefslogtreecommitdiff
path: root/svx/source/dialog/swframeexample.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/dialog/swframeexample.cxx')
-rw-r--r--svx/source/dialog/swframeexample.cxx48
1 files changed, 24 insertions, 24 deletions
diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx
index 8ba911fb90c0..b030a27c952a 100644
--- a/svx/source/dialog/swframeexample.cxx
+++ b/svx/source/dialog/swframeexample.cxx
@@ -57,7 +57,7 @@ SvxSwFrameExample::SvxSwFrameExample( Window *pParent, const ResId& rResID ) :
nVRel (RelOrientation::PRINT_AREA),
nWrap (WrapTextMode_NONE),
nAnchor (TextContentAnchorType_AT_PAGE),
- bTrans (FALSE),
+ bTrans (sal_False),
aRelPos (Point(0,0))
{
InitColors_Impl();
@@ -73,7 +73,7 @@ void SvxSwFrameExample::InitColors_Impl( void )
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
m_aBgCol = Color( rSettings.GetWindowColor() ); // old: COL_WHITE
- BOOL bHC = rSettings.GetHighContrastMode();
+ sal_Bool bHC = rSettings.GetHighContrastMode();
m_aFrameColor = Color( COL_LIGHTGREEN );
m_aAlignColor = Color( COL_LIGHTRED );
@@ -104,19 +104,19 @@ void SvxSwFrameExample::InitAllRects_Impl()
// aPage.SetSize(Size(aSz.Width() - 3, aSz.Height() - 3));
aPage.SetSize( GetOutputSizePixel() );
- ULONG nOutWPix = aPage.GetWidth();
- ULONG nOutHPix = aPage.GetHeight();
+ sal_uIntPtr nOutWPix = aPage.GetWidth();
+ sal_uIntPtr nOutHPix = aPage.GetHeight();
// PrintArea
- ULONG nLBorder;
- ULONG nRBorder;
- ULONG nTBorder;
- ULONG nBBorder;
+ sal_uIntPtr nLBorder;
+ sal_uIntPtr nRBorder;
+ sal_uIntPtr nTBorder;
+ sal_uIntPtr nBBorder;
- ULONG nLTxtBorder;
- ULONG nRTxtBorder;
- ULONG nTTxtBorder;
- ULONG nBTxtBorder;
+ sal_uIntPtr nLTxtBorder;
+ sal_uIntPtr nRTxtBorder;
+ sal_uIntPtr nTTxtBorder;
+ sal_uIntPtr nBTxtBorder;
if (nAnchor != TextContentAnchorType_AS_CHARACTER)
{
@@ -153,7 +153,7 @@ void SvxSwFrameExample::InitAllRects_Impl()
aTextLine.Move(0, nTTxtBorder);
// Rechteck um Absatz incl. Raender
- USHORT nLines = (USHORT)((aPagePrtArea.GetHeight() / 2 - nTTxtBorder - nBTxtBorder)
+ sal_uInt16 nLines = (sal_uInt16)((aPagePrtArea.GetHeight() / 2 - nTTxtBorder - nBTxtBorder)
/ (aTextLine.GetHeight() + 2));
aPara = aPagePrtArea;
aPara.SetSize(Size(aPara.GetWidth(),
@@ -201,8 +201,8 @@ void SvxSwFrameExample::InitAllRects_Impl()
// Groesse des zu positionierenden Rahmens
if (nAnchor != TextContentAnchorType_AS_CHARACTER)
{
- ULONG nLFBorder = nAnchor == TextContentAnchorType_AT_PAGE ? nLBorder : nLTxtBorder;
- ULONG nRFBorder = nAnchor == TextContentAnchorType_AT_PAGE ? nRBorder : nRTxtBorder;
+ sal_uIntPtr nLFBorder = nAnchor == TextContentAnchorType_AT_PAGE ? nLBorder : nLTxtBorder;
+ sal_uIntPtr nRFBorder = nAnchor == TextContentAnchorType_AT_PAGE ? nRBorder : nRTxtBorder;
switch (nHRel)
{
@@ -225,7 +225,7 @@ void SvxSwFrameExample::InitAllRects_Impl()
}
else
{
- ULONG nFreeWidth = aPagePrtArea.GetWidth() - GetTextWidth(C2S(DEMOTEXT));
+ sal_uIntPtr nFreeWidth = aPagePrtArea.GetWidth() - GetTextWidth(C2S(DEMOTEXT));
aFrmSize = Size(nFreeWidth / 2, (aTextLine.GetHeight() + 2) * 3);
aDrawObj.SetSize(Size(Max(5L, (long)nFreeWidth / 3L), Max(5L, aFrmSize.Height() * 3L)));
@@ -459,9 +459,9 @@ Rectangle SvxSwFrameExample::DrawInnerFrame_Impl(const Rectangle &rRect, const C
// Testabsatz zeichnen
Rectangle aTxt(aTextLine);
sal_Int32 nStep = aTxt.GetHeight() + 2;
- USHORT nLines = (USHORT)(aParaPrtArea.GetHeight() / (aTextLine.GetHeight() + 2));
+ sal_uInt16 nLines = (sal_uInt16)(aParaPrtArea.GetHeight() / (aTextLine.GetHeight() + 2));
- for (USHORT i = 0; i < nLines; i++)
+ for (sal_uInt16 i = 0; i < nLines; i++)
{
if (i == nLines - 1)
aTxt.SetSize(Size(aTxt.GetWidth() / 2, aTxt.GetHeight()));
@@ -619,7 +619,7 @@ void SvxSwFrameExample::Paint(const Rectangle&)
const long nTxtLineHeight = aTextLine.GetHeight();
Rectangle aTxt(aTextLine);
sal_Int32 nStep;
- USHORT nLines;
+ sal_uInt16 nLines;
if (nAnchor == TextContentAnchorType_AT_FRAME)
{
@@ -629,13 +629,13 @@ void SvxSwFrameExample::Paint(const Rectangle&)
aTxt.Bottom() = aTxt.Top() + aTextLine.GetHeight() - 1;
nStep = aTxt.GetHeight() + 2;
- nLines = (USHORT)(((aFrameAtFrame.GetHeight() - 2 * FLYINFLY_BORDER) * 2 / 3)
+ nLines = (sal_uInt16)(((aFrameAtFrame.GetHeight() - 2 * FLYINFLY_BORDER) * 2 / 3)
/ (aTxt.GetHeight() + 2));
}
else
{
nStep = aTxt.GetHeight() + 2;
- nLines = (USHORT)(aParaPrtArea.GetHeight() / (aTextLine.GetHeight() + 2));
+ nLines = (sal_uInt16)(aParaPrtArea.GetHeight() / (aTextLine.GetHeight() + 2));
}
if (nAnchor != TextContentAnchorType_AS_CHARACTER)
@@ -650,7 +650,7 @@ void SvxSwFrameExample::Paint(const Rectangle&)
( nHRel == RelOrientation::CHAR || nVRel == RelOrientation::CHAR ||
nVRel == RelOrientation::TEXT_LINE );
- for (USHORT i = 0; i < nLines; ++i)
+ for (sal_uInt16 i = 0; i < nLines; ++i)
{
if (i == (nLines - 1))
aTxt.SetSize(Size(aTxt.GetWidth() / 2, aTxt.GetHeight()));
@@ -685,7 +685,7 @@ void SvxSwFrameExample::Paint(const Rectangle&)
if (nAnchor != TextContentAnchorType_AT_FRAME && aTxt.Bottom() > aParaPrtArea.Bottom())
{
// Text wurde durch Rahmen verdraengt, daher Para-Hoehe anpassen
- ULONG nDiff = aTxt.Bottom() - aParaPrtArea.Bottom();
+ sal_uIntPtr nDiff = aTxt.Bottom() - aParaPrtArea.Bottom();
aParaPrtArea.Bottom() += nDiff;
aPara.Bottom() += nDiff;
@@ -707,7 +707,7 @@ void SvxSwFrameExample::Paint(const Rectangle&)
DrawRect_Impl(aRect, m_aTransColor, m_aAlignColor);
// Frame anzeigen
- BOOL bDontFill = (nAnchor == TextContentAnchorType_AT_CHARACTER && aFrmRect.IsOver(aAutoCharFrame)) ? TRUE : bTrans;
+ sal_Bool bDontFill = (nAnchor == TextContentAnchorType_AT_CHARACTER && aFrmRect.IsOver(aAutoCharFrame)) ? sal_True : bTrans;
DrawRect_Impl( aFrmRect, bDontFill? m_aTransColor : m_aBgCol, m_aFrameColor );
}