summaryrefslogtreecommitdiff
path: root/starmath/source
diff options
context:
space:
mode:
Diffstat (limited to 'starmath/source')
-rw-r--r--starmath/source/accessibility.cxx2
-rw-r--r--starmath/source/cursor.cxx6
-rw-r--r--starmath/source/dialog.cxx4
-rw-r--r--starmath/source/edit.cxx6
-rw-r--r--starmath/source/mathmlimport.cxx6
-rw-r--r--starmath/source/node.cxx104
-rw-r--r--starmath/source/parse.cxx4
-rw-r--r--starmath/source/rect.cxx40
-rw-r--r--starmath/source/scrwin.cxx6
-rw-r--r--starmath/source/unomodel.cxx8
-rw-r--r--starmath/source/utility.cxx6
-rw-r--r--starmath/source/view.cxx18
-rw-r--r--starmath/source/visitors.cxx48
13 files changed, 129 insertions, 129 deletions
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index 014bc79e7ac5..2bf71cecf8f2 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -552,7 +552,7 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getIndexAtPoint( const awt::Point& aPoin
OUString aTxt = aBuf.makeStringAndClear();
OSL_ENSURE( !aTxt.isEmpty(), "no accessible text available" );
- long nNodeX = pNode->GetLeft();
+ tools::Long nNodeX = pNode->GetLeft();
std::unique_ptr<long[]> pXAry(new long[ aTxt.getLength() ]);
pWin->SetFont( pNode->GetFont() );
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index c476bd41228e..90bdf2207327 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -39,7 +39,7 @@ void SmCursor::Move(OutputDevice* pDev, SmMovementDirection direction, bool bMov
SmCaretLine from_line = SmCaretPos2LineVisitor(pDev, mpPosition->CaretPos).GetResult(),
best_line, //Best approximated line found so far
curr_line; //Current line
- long dbp_sq = 0; //Distance squared to best line
+ tools::Long dbp_sq = 0; //Distance squared to best line
for(const auto &pEntry : *mpGraph)
{
//Reject it if it's the current position
@@ -54,7 +54,7 @@ void SmCursor::Move(OutputDevice* pDev, SmMovementDirection direction, bool bMov
//Compare if it to what we have, if we have anything yet
if(NewPos){
//Compute distance to current line squared, multiplied with a horizontal factor
- long dp_sq = curr_line.SquaredDistanceX(from_line) * HORIZONTICAL_DISTANCE_FACTOR +
+ tools::Long dp_sq = curr_line.SquaredDistanceX(from_line) * HORIZONTICAL_DISTANCE_FACTOR +
curr_line.SquaredDistanceY(from_line);
//Discard current line if best line is closer
if(dbp_sq <= dp_sq) continue;
@@ -82,7 +82,7 @@ void SmCursor::Move(OutputDevice* pDev, SmMovementDirection direction, bool bMov
void SmCursor::MoveTo(OutputDevice* pDev, const Point& pos, bool bMoveAnchor)
{
SmCaretPosGraphEntry* NewPos = nullptr;
- long dp_sq = 0, //Distance to current line squared
+ tools::Long dp_sq = 0, //Distance to current line squared
dbp_sq = 1; //Distance to best line squared
for(const auto &pEntry : *mpGraph)
{
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 5c206546541a..cf9616ad9980 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -398,7 +398,7 @@ void SmFontSizeDialog::ReadFrom(const SmFormat &rFormat)
void SmFontSizeDialog::WriteTo(SmFormat &rFormat) const
{
- rFormat.SetBaseSize( Size(0, SmPtsTo100th_mm( static_cast< long >(m_xBaseSize->get_value(FieldUnit::NONE)))) );
+ rFormat.SetBaseSize( Size(0, SmPtsTo100th_mm( static_cast< tools::Long >(m_xBaseSize->get_value(FieldUnit::NONE)))) );
rFormat.SetRelSize(SIZ_TEXT, sal::static_int_cast<sal_uInt16>(m_xTextSize->get_value(FieldUnit::NONE)));
rFormat.SetRelSize(SIZ_INDEX, sal::static_int_cast<sal_uInt16>(m_xIndexSize->get_value(FieldUnit::NONE)));
@@ -1026,7 +1026,7 @@ bool SmShowSymbolSet::MouseButtonDown(const MouseEvent& rMEvt)
if (rMEvt.IsLeft() && tools::Rectangle(Point(0, 0), aOutputSize).IsInside(rMEvt.GetPosPixel()))
{
- long nPos = (aPoint.Y() / nLen) * nColumns + (aPoint.X() / nLen) +
+ tools::Long nPos = (aPoint.Y() / nLen) * nColumns + (aPoint.X() / nLen) +
m_xScrolledWindow->vadjustment_get_value() * nColumns;
SelectSymbol( sal::static_int_cast< sal_uInt16 >(nPos) );
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index 755bb3b5c667..59cef03975bf 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -278,7 +278,7 @@ void SmEditWindow::Resize()
pEditView->ShowCursor();
OSL_ENSURE( pEditView->GetEditEngine(), "EditEngine missing" );
- const long nMaxVisAreaStart = pEditView->GetEditEngine()->GetTextHeight() -
+ const tools::Long nMaxVisAreaStart = pEditView->GetEditEngine()->GetTextHeight() -
pEditView->GetOutputArea().GetHeight();
if (pEditView->GetVisArea().Top() > nMaxVisAreaStart)
{
@@ -556,7 +556,7 @@ tools::Rectangle SmEditWindow::AdjustScrollBars()
if (pVScrollBar && pHScrollBar && pScrollBox)
{
- const long nTmp = GetSettings().GetStyleSettings().GetScrollBarSize();
+ const tools::Long nTmp = GetSettings().GetStyleSettings().GetScrollBarSize();
Point aPt( aRect.TopRight() ); aPt.AdjustX( -(nTmp -1) );
pVScrollBar->SetPosSizePixel( aPt, Size(nTmp, aOut.Height() - nTmp));
@@ -579,7 +579,7 @@ void SmEditWindow::SetScrollBarRanges()
EditEngine *pEditEngine = GetEditEngine();
if (pVScrollBar && pHScrollBar && pEditEngine && pEditView)
{
- long nTmp = pEditEngine->GetTextHeight();
+ tools::Long nTmp = pEditEngine->GetTextHeight();
pVScrollBar->SetRange(Range(0, nTmp));
pVScrollBar->SetThumbPos(pEditView->GetVisArea().Top());
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index be223003bfb7..2f8dfb4aeab2 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -1471,12 +1471,12 @@ bool lcl_CountBlanks(const MathMLAttributeLengthValue &rLV,
return false;
const Fraction aTwo(2, 1);
auto aWide = rLV.aNumber / aTwo;
- auto nWide = static_cast<sal_Int32>(static_cast<long>(aWide));
+ auto nWide = static_cast<sal_Int32>(static_cast<tools::Long>(aWide));
if (nWide < 0)
return false;
const Fraction aPointFive(1, 2);
auto aNarrow = (rLV.aNumber - Fraction(nWide, 1) * aTwo) / aPointFive;
- auto nNarrow = static_cast<sal_Int32>(static_cast<long>(aNarrow));
+ auto nNarrow = static_cast<sal_Int32>(static_cast<tools::Long>(aNarrow));
if (nNarrow < 0)
return false;
*pWide = nWide;
@@ -2638,7 +2638,7 @@ void SmXMLImport::SetViewSettings(const Sequence<PropertyValue>& aViewProps)
tools::Rectangle aRect( pDocShell->GetVisArea() );
- long nTmp = 0;
+ tools::Long nTmp = 0;
for (const PropertyValue& rValue : aViewProps)
{
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index e894ad84b6d8..1604655c08c1 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -153,7 +153,7 @@ void SmNode::SetFontSize(const Fraction &rSize, FontSizeType nType)
{
Fraction aVal (SmPtsTo100th_mm(rSize.GetNumerator()),
rSize.GetDenominator());
- long nHeight = static_cast<long>(aVal);
+ tools::Long nHeight = static_cast<tools::Long>(aVal);
aFntSize = GetFont().GetFontSize();
aFntSize.setWidth( 0 );
@@ -172,12 +172,12 @@ void SmNode::SetFontSize(const Fraction &rSize, FontSizeType nType)
break;
case FontSizeType::MULTIPLY:
- aFntSize.setHeight( static_cast<long>(Fraction(aFntSize.Height()) * rSize) );
+ aFntSize.setHeight( static_cast<tools::Long>(Fraction(aFntSize.Height()) * rSize) );
break;
case FontSizeType::DIVIDE:
if (rSize != Fraction(0))
- aFntSize.setHeight( static_cast<long>(Fraction(aFntSize.Height()) / rSize) );
+ aFntSize.setHeight( static_cast<tools::Long>(Fraction(aFntSize.Height()) / rSize) );
break;
default:
break;
@@ -294,7 +294,7 @@ const SmNode * SmNode::FindTokenAt(sal_uInt16 nRow, sal_uInt16 nCol) const
const SmNode * SmNode::FindRectClosestTo(const Point &rPoint) const
{
- long nDist = LONG_MAX;
+ tools::Long nDist = LONG_MAX;
const SmNode *pResult = nullptr;
if (IsVisible())
@@ -312,7 +312,7 @@ const SmNode * SmNode::FindRectClosestTo(const Point &rPoint) const
const SmNode *pFound = pNode->FindRectClosestTo(rPoint);
if (pFound)
{
- long nTmp = pFound->OrientedDist(rPoint);
+ tools::Long nTmp = pFound->OrientedDist(rPoint);
if (nTmp < nDist)
{
nDist = nTmp;
@@ -479,14 +479,14 @@ void SmTableNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
size_t nSize = GetNumSubNodes();
// make distance depend on font size
- long nDist = +(rFormat.GetDistance(DIS_VERTICAL)
+ tools::Long nDist = +(rFormat.GetDistance(DIS_VERTICAL)
* GetFont().GetFontSize().Height()) / 100;
if (nSize < 1)
return;
// arrange subnodes and get maximum width of them
- long nMaxWidth = 0,
+ tools::Long nMaxWidth = 0,
nTmp;
for (size_t i = 0; i < nSize; ++i)
{
@@ -536,7 +536,7 @@ const SmNode * SmTableNode::GetLeftMost() const
}
-long SmTableNode::GetFormulaBaseline() const
+tools::Long SmTableNode::GetFormulaBaseline() const
{
return mnFormulaBaseline;
}
@@ -590,7 +590,7 @@ void SmLineNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
}
// make distance depend on font size
- long nDist = (rFormat.GetDistance(DIS_HORIZONTAL) * GetFont().GetFontSize().Height()) / 100;
+ tools::Long nDist = (rFormat.GetDistance(DIS_HORIZONTAL) * GetFont().GetFontSize().Height()) / 100;
if (!IsUseExtraSpaces())
nDist = 0;
@@ -648,7 +648,7 @@ void SmUnHorNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
pOper->Arrange(rDev, rFormat);
pBody->Arrange(rDev, rFormat);
- long nDist = (pOper->GetRect().GetWidth() * rFormat.GetDistance(DIS_HORIZONTAL)) / 100;
+ tools::Long nDist = (pOper->GetRect().GetWidth() * rFormat.GetDistance(DIS_HORIZONTAL)) / 100;
SmRect::operator = (*pNode0);
@@ -664,7 +664,7 @@ void SmUnHorNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
namespace {
void lcl_GetHeightVerOffset(const SmRect &rRect,
- long &rHeight, long &rVerOffset)
+ tools::Long &rHeight, tools::Long &rVerOffset)
// calculate height and vertical offset of root sign suitable for 'rRect'
{
rVerOffset = (rRect.GetBottom() - rRect.GetAlignB()) / 2;
@@ -690,7 +690,7 @@ Point lcl_GetExtraPos(const SmRect &rRootSymbol,
// if there's enough space move a bit less to the right
// examples: "nroot i a", "nroot j a"
// (it looks better if we don't use italic-spaces here)
- long nX = rRootSymbol.GetLeft() + (rSymSize.Width() * 30) / 100;
+ tools::Long nX = rRootSymbol.GetLeft() + (rSymSize.Width() * 30) / 100;
if (aPos.X() > nX)
aPos.setX( nX );
@@ -713,7 +713,7 @@ void SmRootNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
pBody->Arrange(rDev, rFormat);
- long nHeight,
+ tools::Long nHeight,
nVerOffset;
lcl_GetHeightVerOffset(*pBody, nHeight, nVerOffset);
nHeight += rFormat.GetDistance(DIS_ROOT)
@@ -765,7 +765,7 @@ void SmBinHorNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
const SmRect &rOpRect = pOper->GetRect();
- long nDist = (rOpRect.GetWidth() *
+ tools::Long nDist = (rOpRect.GetWidth() *
rFormat.GetDistance(DIS_HORIZONTAL)) / 100;
SmRect::operator = (*pLeft);
@@ -808,7 +808,7 @@ void SmBinVerNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
pNum ->Arrange(rDev, rFormat);
pDenom->Arrange(rDev, rFormat);
- long nFontHeight = GetFont().GetFontSize().Height(),
+ tools::Long nFontHeight = GetFont().GetFontSize().Height(),
nExtLen = nFontHeight * rFormat.GetDistance(DIS_FRACTION) / 100,
nThick = nFontHeight * rFormat.GetDistance(DIS_STROKEWIDTH) / 100,
nWidth = std::max(pNum->GetItalicWidth(), pDenom->GetItalicWidth()),
@@ -909,8 +909,8 @@ sal_uInt16 GetLineIntersectionPoint(Point &rResult,
double fLambda = ( (rPoint1.Y() - rPoint2.Y()) * rHeading2.X()
- (rPoint1.X() - rPoint2.X()) * rHeading2.Y())
/ fDet;
- rResult = Point(rPoint1.X() + static_cast<long>(fLambda * rHeading1.X()),
- rPoint1.Y() + static_cast<long>(fLambda * rHeading1.Y()));
+ rResult = Point(rPoint1.X() + static_cast<tools::Long>(fLambda * rHeading1.X()),
+ rPoint1.Y() + static_cast<tools::Long>(fLambda * rHeading1.Y()));
}
return nRes;
@@ -927,16 +927,16 @@ void SmBinDiagonalNode::GetOperPosSize(Point &rPos, Size &rSize,
{
static const double fPi = 3.1415926535897932384626433;
double fAngleRad = fAngleDeg / 180.0 * fPi;
- long nRectLeft = GetItalicLeft(),
+ tools::Long nRectLeft = GetItalicLeft(),
nRectRight = GetItalicRight(),
nRectTop = GetTop(),
nRectBottom = GetBottom();
Point aRightHdg (100, 0),
aDownHdg (0, 100),
- aDiagHdg ( static_cast<long>(100.0 * cos(fAngleRad)),
- static_cast<long>(-100.0 * sin(fAngleRad)) );
+ aDiagHdg ( static_cast<tools::Long>(100.0 * cos(fAngleRad)),
+ static_cast<tools::Long>(-100.0 * sin(fAngleRad)) );
- long nLeft, nRight, nTop, nBottom; // margins of the rectangle for the diagonal
+ tools::Long nLeft, nRight, nTop, nBottom; // margins of the rectangle for the diagonal
Point aPoint;
if (IsAscending())
{
@@ -1059,7 +1059,7 @@ void SmBinDiagonalNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
// determine implicitly the values (incl. the margin) of the diagonal line
pOper->Arrange(aTmpDev, rFormat);
- long nDelta = pOper->GetWidth() * 8 / 10;
+ tools::Long nDelta = pOper->GetWidth() * 8 / 10;
// determine TopLeft position from the right argument
Point aPos;
@@ -1072,7 +1072,7 @@ void SmBinDiagonalNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
pRight->MoveTo(aPos);
// determine new baseline
- long nTmpBaseline = IsAscending() ? (pLeft->GetBottom() + pRight->GetTop()) / 2
+ tools::Long nTmpBaseline = IsAscending() ? (pLeft->GetBottom() + pRight->GetTop()) / 2
: (pLeft->GetTop() + pRight->GetBottom()) / 2;
Point aLogCenter ((pLeft->GetItalicRight() + pRight->GetItalicLeft()) / 2,
nTmpBaseline);
@@ -1108,7 +1108,7 @@ void SmSubSupNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
SmNode *pBody = GetBody();
assert(pBody);
- long nOrigHeight = pBody->GetFont().GetFontSize().Height();
+ tools::Long nOrigHeight = pBody->GetFont().GetFontSize().Height();
pBody->Arrange(rDev, rFormat);
@@ -1116,10 +1116,10 @@ void SmSubSupNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
SmRect::operator = (rBodyRect);
// line that separates sub- and supscript rectangles
- long nDelimLine = SmFromTo(GetAlignB(), GetAlignT(), 0.4);
+ tools::Long nDelimLine = SmFromTo(GetAlignB(), GetAlignT(), 0.4);
Point aPos;
- long nDelta, nDist;
+ tools::Long nDelta, nDist;
// iterate over all possible sub-/supscripts
SmRect aTmpRect (rBodyRect);
@@ -1229,7 +1229,7 @@ void SmBraceNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
(GetScaleMode() == SmScaleMode::Height || bIsScaleNormal),
bIsABS = GetToken().eType == TABS;
- long nFaceHeight = GetFont().GetFontSize().Height();
+ tools::Long nFaceHeight = GetFont().GetFontSize().Height();
// determine oversize in %
sal_uInt16 nPerc = 0;
@@ -1241,7 +1241,7 @@ void SmBraceNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
}
// determine the height for the braces
- long nBraceHeight;
+ tools::Long nBraceHeight;
if (bScale)
{
nBraceHeight = pBody->GetType() == SmNodeType::Bracebody ?
@@ -1254,7 +1254,7 @@ void SmBraceNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
// distance to the argument
nPerc = bIsABS ? 0 : rFormat.GetDistance(DIS_BRACKETSPACE);
- long nDist = nFaceHeight * nPerc / 100;
+ tools::Long nDist = nFaceHeight * nPerc / 100;
// if wanted, scale the braces to the wanted size
if (bScale)
@@ -1330,7 +1330,7 @@ void SmBracebodyNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
// scale separators to required height and arrange them
bool bScale = GetScaleMode() == SmScaleMode::Height || rFormat.IsScaleNormalBrackets();
- long nHeight = bScale ? aRefRect.GetHeight() : GetFont().GetFontSize().Height();
+ tools::Long nHeight = bScale ? aRefRect.GetHeight() : GetFont().GetFontSize().Height();
sal_uInt16 nIndex = GetScaleMode() == SmScaleMode::Height ?
DIS_BRACKETSIZE : DIS_NORMALBRACKETSIZE;
sal_uInt16 nPerc = rFormat.GetDistance(nIndex);
@@ -1344,7 +1344,7 @@ void SmBracebodyNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
}
// horizontal distance between argument and brackets or separators
- long nDist = GetFont().GetFontSize().Height()
+ tools::Long nDist = GetFont().GetFontSize().Height()
* rFormat.GetDistance(DIS_BRACKETSPACE) / 100;
SmNode *pLeft = GetSubNode(0);
@@ -1389,7 +1389,7 @@ void SmVerticalBraceNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
// braces are a bit taller than usually
pBrace ->SetSize( Fraction(3, 2) );
- long nItalicWidth = pBody->GetItalicWidth();
+ tools::Long nItalicWidth = pBody->GetItalicWidth();
if (nItalicWidth > 0)
pBrace->AdaptToX(aTmpDev, nItalicWidth);
@@ -1398,8 +1398,8 @@ void SmVerticalBraceNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
// determine the relative position and the distances between each other
RectPos eRectPos;
- long nFontHeight = pBody->GetFont().GetFontSize().Height();
- long nDistBody = nFontHeight * rFormat.GetDistance(DIS_ORNAMENTSIZE),
+ tools::Long nFontHeight = pBody->GetFont().GetFontSize().Height();
+ tools::Long nDistBody = nFontHeight * rFormat.GetDistance(DIS_ORNAMENTSIZE),
nDistScript = nFontHeight;
if (GetToken().eType == TOVERBRACE)
{
@@ -1444,11 +1444,11 @@ SmNode * SmOperNode::GetSymbol()
}
-long SmOperNode::CalcSymbolHeight(const SmNode &rSymbol,
+tools::Long SmOperNode::CalcSymbolHeight(const SmNode &rSymbol,
const SmFormat &rFormat) const
// returns the font height to be used for operator-symbol
{
- long nHeight = GetFont().GetFontSize().Height();
+ tools::Long nHeight = GetFont().GetFontSize().Height();
SmTokenType eTmpType = GetToken().eType;
if (eTmpType == TLIM || eTmpType == TLIMINF || eTmpType == TLIMSUP)
@@ -1488,8 +1488,8 @@ void SmOperNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
bool bDynamicallySized = false;
if (pSymbol->GetToken().eType == TINTD)
{
- long nBodyHeight = pBody->GetHeight();
- long nFontHeight = pSymbol->GetFont().GetFontSize().Height();
+ tools::Long nBodyHeight = pBody->GetHeight();
+ tools::Long nFontHeight = pSymbol->GetFont().GetFontSize().Height();
if (nFontHeight < nBodyHeight)
{
pSymbol->SetSize(Fraction(nBodyHeight, nFontHeight));
@@ -1498,7 +1498,7 @@ void SmOperNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
}
pOper->Arrange(rDev, rFormat);
- long nOrigHeight = GetFont().GetFontSize().Height(),
+ tools::Long nOrigHeight = GetFont().GetFontSize().Height(),
nDist = nOrigHeight
* rFormat.GetDistance(DIS_OPERATORSPACE) / 100;
@@ -1557,7 +1557,7 @@ void SmAttributNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
// get relative position of attribute
RectVerAlign eVerAlign;
- long nDist = 0;
+ tools::Long nDist = 0;
switch (GetToken().eType)
{ case TUNDERLINE :
eVerAlign = RectVerAlign::AttributeLo;
@@ -1697,7 +1697,7 @@ void SmPolyLineNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
SmTmpDevice aTmpDev (rDev, true);
aTmpDev.SetFont(GetFont());
- long nBorderwidth = GetFont().GetBorderWidth();
+ tools::Long nBorderwidth = GetFont().GetBorderWidth();
// create polygon using both endpoints
assert(maPoly.GetSize() == 2);
@@ -1720,7 +1720,7 @@ void SmPolyLineNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
maPoly.SetPoint(aPointA, 0);
maPoly.SetPoint(aPointB, 1);
- long nThick = GetFont().GetFontSize().Height()
+ tools::Long nThick = GetFont().GetFontSize().Height()
* rFormat.GetDistance(DIS_STROKEWIDTH) / 100;
mnWidth = nThick + 2 * nBorderwidth;
@@ -1762,8 +1762,8 @@ void SmRectangleNode::AdaptToY(OutputDevice &/*rDev*/, sal_uLong nHeight)
void SmRectangleNode::Arrange(OutputDevice &rDev, const SmFormat &/*rFormat*/)
{
- long nFontHeight = GetFont().GetFontSize().Height();
- long nWidth = maToSize.Width(),
+ tools::Long nFontHeight = GetFont().GetFontSize().Height();
+ tools::Long nWidth = maToSize.Width(),
nHeight = maToSize.Height();
if (nHeight == 0)
nHeight = nFontHeight / 30;
@@ -1937,16 +1937,16 @@ void SmMatrixNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
}
// norm distance from which the following two are calculated
- const long nNormDist = 3 * GetFont().GetFontSize().Height();
+ const tools::Long nNormDist = 3 * GetFont().GetFontSize().Height();
// define horizontal and vertical minimal distances that separate
// the elements
- long nHorDist = nNormDist * rFormat.GetDistance(DIS_MATRIXCOL) / 100,
+ tools::Long nHorDist = nNormDist * rFormat.GetDistance(DIS_MATRIXCOL) / 100,
nVerDist = nNormDist * rFormat.GetDistance(DIS_MATRIXROW) / 100;
// build array that holds the leftmost position for each column
std::vector<long> aColLeft(mnNumCols);
- long nX = 0;
+ tools::Long nX = 0;
for (size_t j = 0; j < mnNumCols; ++j)
{
aColLeft[j] = nX;
@@ -2043,8 +2043,8 @@ void SmMathSymbolNode::AdaptToX(OutputDevice &rDev, sal_uLong nWidth)
aTmpDev.SetFont(GetFont());
// get denominator of error factor for width
- long nTmpBorderWidth = GetFont().GetBorderWidth();
- long nDenom = SmRect(aTmpDev, nullptr, GetText(), nTmpBorderWidth).GetItalicWidth();
+ tools::Long nTmpBorderWidth = GetFont().GetBorderWidth();
+ tools::Long nDenom = SmRect(aTmpDev, nullptr, GetText(), nTmpBorderWidth).GetItalicWidth();
// scale fontwidth with this error factor
aFntSize.setWidth( aFntSize.Width() * nWidth );
@@ -2078,8 +2078,8 @@ void SmMathSymbolNode::AdaptToY(OutputDevice &rDev, sal_uLong nHeight)
aTmpDev.SetFont(GetFont());
// get denominator of error factor for height
- long nTmpBorderWidth = GetFont().GetBorderWidth();
- long nDenom = 0;
+ tools::Long nTmpBorderWidth = GetFont().GetBorderWidth();
+ tools::Long nDenom = 0;
if (!GetText().isEmpty())
nDenom = SmRect(aTmpDev, nullptr, GetText(), nTmpBorderWidth).GetHeight();
@@ -2327,7 +2327,7 @@ void SmBlankNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
// make distance depend on the font height
// (so that it increases when scaling (e.g. size *2 {a ~ b})
- long nDist = GetFont().GetFontSize().Height() / 10,
+ tools::Long nDist = GetFont().GetFontSize().Height() / 10,
nSpace = mnNum * nDist;
// get a SmRect with Baseline and all the bells and whistles
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index e931c494b649..a5872f9e9118 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -2010,8 +2010,8 @@ std::unique_ptr<SmStructureNode> SmParser::DoFontSize()
//!! or ftmp = 1.11111111111111111... (11/9) on every platform.)
if (aValue.GetDenominator() > 1000)
{
- long nNum = aValue.GetNumerator();
- long nDenom = aValue.GetDenominator();
+ tools::Long nNum = aValue.GetNumerator();
+ tools::Long nDenom = aValue.GetDenominator();
while (nDenom > 1000)
{
nNum /= 10;
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index d49daf7474e4..1c9ecb71ccdc 100644
--- a/starmath/source/rect.cxx
+++ b/starmath/source/rect.cxx
@@ -68,14 +68,14 @@ bool SmGetGlyphBoundRect(const vcl::RenderContext &rDev,
Size aFntSize = aFnt.GetFontSize();
// Workaround to avoid HUGE font sizes and resulting problems
- long nScaleFactor = 1;
+ tools::Long nScaleFactor = 1;
while( aFntSize.Height() > 2000 * nScaleFactor )
nScaleFactor *= 2;
aFnt.SetFontSize( Size( aFntSize.Width() / nScaleFactor, aFntSize.Height() / nScaleFactor ) );
pGlyphDev->SetFont(aFnt);
- long nTextWidth = rDev.GetTextWidth(rText);
+ tools::Long nTextWidth = rDev.GetTextWidth(rText);
tools::Rectangle aResult (Point(), Size(nTextWidth, rDev.GetTextHeight())),
aTmp;
@@ -89,7 +89,7 @@ bool SmGetGlyphBoundRect(const vcl::RenderContext &rDev,
aTmp.Right() * nScaleFactor, aTmp.Bottom() * nScaleFactor);
if (&rDev != pGlyphDev) /* only when rDev is a printer... */
{
- long nGDTextWidth = pGlyphDev->GetTextWidth(rText);
+ tools::Long nGDTextWidth = pGlyphDev->GetTextWidth(rText);
if (nGDTextWidth != 0 &&
nTextWidth != nGDTextWidth)
{
@@ -101,7 +101,7 @@ bool SmGetGlyphBoundRect(const vcl::RenderContext &rDev,
// move rectangle to match possibly different baselines
// (because of different devices)
- long nDelta = aDevFM.GetAscent() - pGlyphDev->GetFontMetric().GetAscent() * nScaleFactor;
+ tools::Long nDelta = aDevFM.GetAscent() - pGlyphDev->GetFontMetric().GetAscent() * nScaleFactor;
aResult.Move(0, nDelta);
pGlyphDev->Pop();
@@ -186,7 +186,7 @@ SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat,
const FontMetric aFM (rDev.GetFontMetric());
bool bIsMath = aFM.GetFamilyName().equalsIgnoreAsciiCase( FONTNAME_MATH );
bool bAllowSmaller = bIsMath && !SmIsMathAlpha(rText);
- const long nFontHeight = rDev.GetFont().GetFontSize().Height();
+ const tools::Long nFontHeight = rDev.GetFont().GetFontSize().Height();
nBorderWidth = nBorder;
bHasAlignInfo = true;
@@ -210,7 +210,7 @@ SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat,
pWindow->SetMapMode(rDev.GetMapMode());
pWindow->SetFont(rDev.GetFontMetric());
- long nDelta = pWindow->GetFontMetric().GetInternalLeading();
+ tools::Long nDelta = pWindow->GetFontMetric().GetInternalLeading();
if (nDelta == 0)
{ // this value approx. fits a Leading of 80 at a
// Fontheight of 422 (12pt)
@@ -234,7 +234,7 @@ SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat,
if (nItalicRightSpace < 0 && !bAllowSmaller)
nItalicRightSpace = 0;
- long nDist = 0;
+ tools::Long nDist = 0;
if (pFormat)
nDist = (rDev.GetFont().GetFontSize().Height()
* pFormat->GetDistance(DIS_ORNAMENTSIZE)) / 100;
@@ -264,7 +264,7 @@ SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat,
}
-SmRect::SmRect(long nWidth, long nHeight)
+SmRect::SmRect(tools::Long nWidth, tools::Long nHeight)
// this constructor should never be used for anything textlike because
// it will not provide useful values for baseline, AlignT and AlignB!
// It's purpose is to get a 'SmRect' for the horizontal line in fractions
@@ -284,7 +284,7 @@ SmRect::SmRect(long nWidth, long nHeight)
}
-void SmRect::SetLeft(long nLeft)
+void SmRect::SetLeft(tools::Long nLeft)
{
if (nLeft <= GetRight())
{ aSize.setWidth( GetRight() - nLeft + 1 );
@@ -293,21 +293,21 @@ void SmRect::SetLeft(long nLeft)
}
-void SmRect::SetRight(long nRight)
+void SmRect::SetRight(tools::Long nRight)
{
if (nRight >= GetLeft())
aSize.setWidth( nRight - GetLeft() + 1 );
}
-void SmRect::SetBottom(long nBottom)
+void SmRect::SetBottom(tools::Long nBottom)
{
if (nBottom >= GetTop())
aSize.setHeight( nBottom - GetTop() + 1 );
}
-void SmRect::SetTop(long nTop)
+void SmRect::SetTop(tools::Long nTop)
{
if (nTop <= GetBottom())
{ aSize.setHeight( GetBottom() - nTop + 1 );
@@ -321,7 +321,7 @@ void SmRect::Move(const Point &rPosition)
{
aTopLeft += rPosition;
- long nDelta = rPosition.Y();
+ tools::Long nDelta = rPosition.Y();
nBaseline += nDelta;
nAlignT += nDelta;
nAlignM += nDelta;
@@ -428,14 +428,14 @@ void SmRect::Union(const SmRect &rRect)
if (rRect.IsEmpty())
return;
- long nL = rRect.GetLeft(),
+ tools::Long nL = rRect.GetLeft(),
nR = rRect.GetRight(),
nT = rRect.GetTop(),
nB = rRect.GetBottom(),
nGT = rRect.nGlyphTop,
nGB = rRect.nGlyphBottom;
if (!IsEmpty())
- { long nTmp;
+ { tools::Long nTmp;
if ((nTmp = GetLeft()) < nL)
nL = nTmp;
@@ -469,7 +469,7 @@ SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode)
{
// get some values used for (italic) spaces adaptation
// ! (need to be done before changing current SmRect) !
- long nL = std::min(GetItalicLeft(), rRect.GetItalicLeft()),
+ tools::Long nL = std::min(GetItalicLeft(), rRect.GetItalicLeft()),
nR = std::max(GetItalicRight(), rRect.GetItalicRight());
Union(rRect);
@@ -511,7 +511,7 @@ SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode)
void SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode,
- long nNewAlignM)
+ tools::Long nNewAlignM)
// as 'ExtendBy' but sets AlignM value to 'nNewAlignM'.
// (this version will be used in 'SmBinVerNode' to provide means to
// align eg "{a over b} over c" correctly where AlignM should not
@@ -531,7 +531,7 @@ SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode,
// (this is used in 'SmSupSubNode' where the sub-/supscripts shouldn't
// be allowed to modify these values.)
{
- long nOldAlignT = GetAlignT(),
+ tools::Long nOldAlignT = GetAlignT(),
nOldAlignM = GetAlignM(),
nOldAlignB = GetAlignB(),
nOldBaseline = nBaseline; //! depends not on 'HasBaseline'
@@ -551,7 +551,7 @@ SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode,
}
-long SmRect::OrientedDist(const Point &rPoint) const
+tools::Long SmRect::OrientedDist(const Point &rPoint) const
// return oriented distance of rPoint to the current rectangle,
// especially the return value is <= 0 iff the point is inside the
// rectangle.
@@ -588,7 +588,7 @@ long SmRect::OrientedDist(const Point &rPoint) const
// build distance vector
Point aDist (aRef - rPoint);
- long nAbsX = labs(aDist.X()),
+ tools::Long nAbsX = labs(aDist.X()),
nAbsY = labs(aDist.Y());
return bIsInside ? - std::min(nAbsX, nAbsY) : std::max (nAbsX, nAbsY);
diff --git a/starmath/source/scrwin.cxx b/starmath/source/scrwin.cxx
index 110338a05207..596ed799424e 100644
--- a/starmath/source/scrwin.cxx
+++ b/starmath/source/scrwin.cxx
@@ -96,7 +96,7 @@ Size ScrollableWindow::GetOutputSizePixel() const
{
Size aSz( Window::GetOutputSizePixel() );
- long nTmp = GetSettings().GetStyleSettings().GetScrollBarSize();
+ tools::Long nTmp = GetSettings().GetStyleSettings().GetScrollBarSize();
if ( aHScroll->IsVisible() )
aSz.AdjustHeight( -nTmp );
if ( aVScroll->IsVisible() )
@@ -134,7 +134,7 @@ void ScrollableWindow::Resize()
Size aOutPixSz = Window::GetOutputSizePixel();
// determine the size of the output-area and if we need scrollbars
- const long nScrSize = GetSettings().GetStyleSettings().GetScrollBarSize();
+ const tools::Long nScrSize = GetSettings().GetStyleSettings().GetScrollBarSize();
bool bVVisible = false; // by default no vertical-ScrollBar
bool bHVisible = false; // by default no horizontal-ScrollBar
bool bChanged; // determines if a visiblility was changed
@@ -270,7 +270,7 @@ void ScrollableWindow::SetTotalSize( const Size& rNewSize )
}
-void ScrollableWindow::Scroll( long nDeltaX, long nDeltaY, ScrollFlags )
+void ScrollableWindow::Scroll( tools::Long nDeltaX, tools::Long nDeltaY, ScrollFlags )
{
// get the delta in pixel
Size aDeltaPix( LogicToPixel( Size(nDeltaX, nDeltaY) ) );
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index bb46211914e3..623fad785844 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -1023,10 +1023,10 @@ void SAL_CALL SmModel::render(
{
aPrtPaperSize = lcl_GuessPaperSize();
// factors from Windows DIN A4
- aOutputSize = Size( static_cast<long>(aPrtPaperSize.Width() * 0.941),
- static_cast<long>(aPrtPaperSize.Height() * 0.961));
- aPrtPageOffset = Point( static_cast<long>(aPrtPaperSize.Width() * 0.0250),
- static_cast<long>(aPrtPaperSize.Height() * 0.0214));
+ aOutputSize = Size( static_cast<tools::Long>(aPrtPaperSize.Width() * 0.941),
+ static_cast<tools::Long>(aPrtPaperSize.Height() * 0.961));
+ aPrtPageOffset = Point( static_cast<tools::Long>(aPrtPaperSize.Width() * 0.0250),
+ static_cast<tools::Long>(aPrtPaperSize.Height() * 0.0214));
}
tools::Rectangle OutputRect( Point(), aOutputSize );
diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx
index 62e0b0294afd..7012004bea94 100644
--- a/starmath/source/utility.cxx
+++ b/starmath/source/utility.cxx
@@ -208,7 +208,7 @@ void SmFace::SetSize(const Size& rSize)
}
-long SmFace::GetBorderWidth() const
+tools::Long SmFace::GetBorderWidth() const
{
if (nBorderWidth < 0)
return GetDefaultBorderWidth();
@@ -230,8 +230,8 @@ SmFace & operator *= (SmFace &rFace, const Fraction &rFrac)
// It's main use is to make scaling fonts look easier.
{ const Size &rFaceSize = rFace.GetFontSize();
- rFace.SetSize(Size(long(rFaceSize.Width() * rFrac),
- long(rFaceSize.Height() * rFrac)));
+ rFace.SetSize(Size(tools::Long(rFaceSize.Width() * rFrac),
+ tools::Long(rFaceSize.Height() * rFrac)));
return rFace;
}
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 43132079dd16..82bd312062c6 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -601,7 +601,7 @@ void SmGraphicWindow::ZoomToFitInWindow()
if (!aSize.IsEmpty())
{
- long nVal = std::min ((85 * aWindowSize.Width()) / aSize.Width(),
+ tools::Long nVal = std::min ((85 * aWindowSize.Width()) / aSize.Width(),
(85 * aWindowSize.Height()) / aSize.Height());
SetZoom ( sal::static_int_cast< sal_uInt16 >(nVal) );
}
@@ -913,7 +913,7 @@ void SmViewShell::QueryObjAreaPixel( tools::Rectangle& rRect ) const
void SmViewShell::SetZoomFactor( const Fraction &rX, const Fraction &rY )
{
const Fraction &rFrac = std::min(rX, rY);
- GetGraphicWindow().SetZoom(sal::static_int_cast<sal_uInt16>(long(rFrac * Fraction( 100, 1 ))));
+ GetGraphicWindow().SetZoom(sal::static_int_cast<sal_uInt16>(tools::Long(rFrac * Fraction( 100, 1 ))));
//To avoid rounding errors base class regulates crooked values too
//if necessary
@@ -923,7 +923,7 @@ void SmViewShell::SetZoomFactor( const Fraction &rX, const Fraction &rY )
Size SmViewShell::GetTextLineSize(OutputDevice const & rDevice, const OUString& rLine)
{
Size aSize(rDevice.GetTextWidth(rLine), rDevice.GetTextHeight());
- const long nTabPos = rLine.isEmpty() ? 0 : rDevice.approximate_digit_width() * 8;
+ const tools::Long nTabPos = rLine.isEmpty() ? 0 : rDevice.approximate_digit_width() * 8;
if (nTabPos)
{
@@ -943,7 +943,7 @@ Size SmViewShell::GetTextLineSize(OutputDevice const & rDevice, const OUString&
return aSize;
}
-Size SmViewShell::GetTextSize(OutputDevice const & rDevice, const OUString& rText, long MaxWidth)
+Size SmViewShell::GetTextSize(OutputDevice const & rDevice, const OUString& rText, tools::Long MaxWidth)
{
Size aSize;
Size aTextSize;
@@ -1005,7 +1005,7 @@ Size SmViewShell::GetTextSize(OutputDevice const & rDevice, const OUString& rTex
void SmViewShell::DrawTextLine(OutputDevice& rDevice, const Point& rPosition, const OUString& rLine)
{
Point aPoint(rPosition);
- const long nTabPos = rLine.isEmpty() ? 0 : rDevice.approximate_digit_width() * 8;
+ const tools::Long nTabPos = rLine.isEmpty() ? 0 : rDevice.approximate_digit_width() * 8;
if (nTabPos)
{
@@ -1197,8 +1197,8 @@ void SmViewShell::Impl_Print(OutputDevice &rOutDev, const SmPrintUIOptions &rPri
Size OutputSize (rOutDev.LogicToPixel(Size(aOutRect.GetWidth(),
aOutRect.GetHeight()), MapMode(MapUnit::Map100thMM)));
Size GraphicSize (rOutDev.LogicToPixel(aSize, MapMode(MapUnit::Map100thMM)));
- sal_uInt16 nZ = sal::static_int_cast<sal_uInt16>(std::min(long(Fraction(OutputSize.Width() * 100, GraphicSize.Width())),
- long(Fraction(OutputSize.Height() * 100, GraphicSize.Height()))));
+ sal_uInt16 nZ = sal::static_int_cast<sal_uInt16>(std::min(tools::Long(Fraction(OutputSize.Width() * 100, GraphicSize.Width())),
+ tools::Long(Fraction(OutputSize.Height() * 100, GraphicSize.Height()))));
nZ -= 10;
Fraction aFraction (std::max(MINZOOM, std::min(MAXZOOM, nZ)), 100);
@@ -2020,8 +2020,8 @@ void SmViewShell::ZoomByItemSet(const SfxItemSet *pSet)
Size OutputSize(pPrinter->LogicToPixel(Size(OutputRect.GetWidth(),
OutputRect.GetHeight()), aMap));
Size GraphicSize(pPrinter->LogicToPixel(GetDoc()->GetSize(), aMap));
- sal_uInt16 nZ = sal::static_int_cast<sal_uInt16>(std::min(long(Fraction(OutputSize.Width() * 100, GraphicSize.Width())),
- long(Fraction(OutputSize.Height() * 100, GraphicSize.Height()))));
+ sal_uInt16 nZ = sal::static_int_cast<sal_uInt16>(std::min(tools::Long(Fraction(OutputSize.Width() * 100, GraphicSize.Width())),
+ tools::Long(Fraction(OutputSize.Height() * 100, GraphicSize.Height()))));
mpGraphic->SetZoom (nZ);
break;
}
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index b1a1798247c1..3704abc18c32 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -179,7 +179,7 @@ SmCaretDrawingVisitor::SmCaretDrawingVisitor( OutputDevice& rDevice,
void SmCaretDrawingVisitor::Visit( SmTextNode* pNode )
{
- long i = maPos.nIndex;
+ tools::Long i = maPos.nIndex;
mrDev.SetFont( pNode->GetFont( ) );
@@ -187,11 +187,11 @@ void SmCaretDrawingVisitor::Visit( SmTextNode* pNode )
SmNode* pLine = SmCursor::FindTopMostNodeInLine( pNode );
//Find coordinates
- long left = pNode->GetLeft( ) + mrDev.GetTextWidth( pNode->GetText( ), 0, i ) + maOffset.X( );
- long top = pLine->GetTop( ) + maOffset.Y( );
- long height = pLine->GetHeight( );
- long left_line = pLine->GetLeft( ) + maOffset.X( );
- long right_line = pLine->GetRight( ) + maOffset.X( );
+ tools::Long left = pNode->GetLeft( ) + mrDev.GetTextWidth( pNode->GetText( ), 0, i ) + maOffset.X( );
+ tools::Long top = pLine->GetTop( ) + maOffset.Y( );
+ tools::Long height = pLine->GetHeight( );
+ tools::Long left_line = pLine->GetLeft( ) + maOffset.X( );
+ tools::Long right_line = pLine->GetRight( ) + maOffset.X( );
//Set color
mrDev.SetLineColor( COL_BLACK );
@@ -215,11 +215,11 @@ void SmCaretDrawingVisitor::DefaultVisit( SmNode* pNode )
SmNode* pLine = SmCursor::FindTopMostNodeInLine( pNode );
//Find coordinates
- long left = pNode->GetLeft( ) + maOffset.X( ) + ( maPos.nIndex == 1 ? pNode->GetWidth( ) : 0 );
- long top = pLine->GetTop( ) + maOffset.Y( );
- long height = pLine->GetHeight( );
- long left_line = pLine->GetLeft( ) + maOffset.X( );
- long right_line = pLine->GetRight( ) + maOffset.X( );
+ tools::Long left = pNode->GetLeft( ) + maOffset.X( ) + ( maPos.nIndex == 1 ? pNode->GetWidth( ) : 0 );
+ tools::Long top = pLine->GetTop( ) + maOffset.Y( );
+ tools::Long height = pLine->GetHeight( );
+ tools::Long left_line = pLine->GetLeft( ) + maOffset.X( );
+ tools::Long right_line = pLine->GetRight( ) + maOffset.X( );
//Set color
mrDev.SetLineColor( COL_BLACK );
@@ -244,14 +244,14 @@ void SmCaretPos2LineVisitor::Visit( SmTextNode* pNode )
//Save device state
mpDev->Push( PushFlags::FONT | PushFlags::TEXTCOLOR );
- long i = maPos.nIndex;
+ tools::Long i = maPos.nIndex;
mpDev->SetFont( pNode->GetFont( ) );
//Find coordinates
- long left = pNode->GetLeft( ) + mpDev->GetTextWidth( pNode->GetText( ), 0, i );
- long top = pNode->GetTop( );
- long height = pNode->GetHeight( );
+ tools::Long left = pNode->GetLeft( ) + mpDev->GetTextWidth( pNode->GetText( ), 0, i );
+ tools::Long top = pNode->GetTop( );
+ tools::Long height = pNode->GetHeight( );
maLine = SmCaretLine( left, top, height );
@@ -408,8 +408,8 @@ void SmDrawingVisitor::Visit( SmRootSymbolNode* pNode )
// _unscaled_ font height to be used, we use that to calculate the
// bar height. Thus it is independent of the arguments height.
// ( see display of sqrt QQQ versus sqrt stack{Q#Q#Q#Q} )
- long nBarHeight = pNode->GetWidth( ) * 7 / 100;
- long nBarWidth = pNode->GetBodyWidth( ) + pNode->GetBorderWidth( );
+ tools::Long nBarHeight = pNode->GetWidth( ) * 7 / 100;
+ tools::Long nBarWidth = pNode->GetBodyWidth( ) + pNode->GetBorderWidth( );
Point aBarOffset( pNode->GetWidth( ), +pNode->GetBorderWidth( ) );
Point aBarPos( maPosition + aBarOffset );
@@ -429,7 +429,7 @@ void SmDrawingVisitor::Visit( SmPolyLineNode* pNode )
if ( pNode->IsPhantom( ) )
return;
- long nBorderwidth = pNode->GetFont( ).GetBorderWidth( );
+ tools::Long nBorderwidth = pNode->GetFont( ).GetBorderWidth( );
LineInfo aInfo;
aInfo.SetWidth( pNode->GetWidth( ) - 2 * nBorderwidth );
@@ -666,14 +666,14 @@ void SmSetSelectionVisitor::VisitCompositionNode( SmStructureNode* pNode )
}
void SmSetSelectionVisitor::Visit( SmTextNode* pNode ) {
- long i1 = -1,
+ tools::Long i1 = -1,
i2 = -1;
if( maStartPos.pSelectedNode == pNode )
i1 = maStartPos.nIndex;
if( maEndPos.pSelectedNode == pNode )
i2 = maEndPos.nIndex;
- long start, end;
+ tools::Long start, end;
pNode->SetSelected(true);
if( i1 != -1 && i2 != -1 ) {
start = std::min(i1, i2);
@@ -1901,10 +1901,10 @@ void SmSelectionDrawingVisitor::Visit( SmTextNode* pNode )
mrDev.SetFont( pNode->GetFont( ) );
Point Position = pNode->GetTopLeft( );
- long left = Position.getX( ) + mrDev.GetTextWidth( pNode->GetText( ), 0, pNode->GetSelectionStart( ) );
- long right = Position.getX( ) + mrDev.GetTextWidth( pNode->GetText( ), 0, pNode->GetSelectionEnd( ) );
- long top = Position.getY( );
- long bottom = top + pNode->GetHeight( );
+ tools::Long left = Position.getX( ) + mrDev.GetTextWidth( pNode->GetText( ), 0, pNode->GetSelectionStart( ) );
+ tools::Long right = Position.getX( ) + mrDev.GetTextWidth( pNode->GetText( ), 0, pNode->GetSelectionEnd( ) );
+ tools::Long top = Position.getY( );
+ tools::Long bottom = top + pNode->GetHeight( );
tools::Rectangle rect( left, top, right, bottom );
ExtendSelectionArea( rect );