tdf#114441 change width,height to tools::Long in starmath

Change-Id: I69e0968643c5c30fbe7f67dfb392d176ab796fa4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174000
Reviewed-by: Hossein   <hossein@libreoffice.org>
Tested-by: Jenkins
This commit is contained in:
Deepanshu Sharma 2024-09-27 02:17:29 +05:30 committed by Hossein
parent b01d057df7
commit c7c52f6065
4 changed files with 25 additions and 25 deletions

View file

@ -369,8 +369,8 @@ public:
void SetScaleMode(SmScaleMode eMode) { meScaleMode = eMode; }
//visual stuff TODO comment
virtual void AdaptToX(OutputDevice &rDev, sal_uLong nWidth);
virtual void AdaptToY(OutputDevice &rDev, sal_uLong nHeight);
virtual void AdaptToX(OutputDevice &rDev, tools::Long nWidth);
virtual void AdaptToY(OutputDevice &rDev, tools::Long nHeight);
/**
* Gets the node type.
@ -671,8 +671,8 @@ public:
{}
//visual stuff TODO comment
virtual void AdaptToX(OutputDevice &rDev, sal_uLong nWidth) override;
virtual void AdaptToY(OutputDevice &rDev, sal_uLong nHeight) override;
virtual void AdaptToX(OutputDevice &rDev, tools::Long nWidth) override;
virtual void AdaptToY(OutputDevice &rDev, tools::Long nHeight) override;
/**
* Prepares the SmRect to render.
@ -718,8 +718,8 @@ public:
tools::Polygon &GetPolygon() { return maPoly; }
//visual stuff TODO comment
virtual void AdaptToX(OutputDevice &rDev, sal_uLong nWidth) override;
virtual void AdaptToY(OutputDevice &rDev, sal_uLong nHeight) override;
virtual void AdaptToX(OutputDevice &rDev, tools::Long nWidth) override;
virtual void AdaptToY(OutputDevice &rDev, tools::Long nHeight) override;
/**
* Prepares the SmRect to render.
@ -962,8 +962,8 @@ public:
explicit SmMathSymbolNode(const SmToken &rNodeToken);
//visual stuff TODO comment
virtual void AdaptToX(OutputDevice &rDev, sal_uLong nWidth) override;
virtual void AdaptToY(OutputDevice &rDev, sal_uLong nHeight) override;
virtual void AdaptToX(OutputDevice &rDev, tools::Long nWidth) override;
virtual void AdaptToY(OutputDevice &rDev, tools::Long nHeight) override;
/**
* Prepare preliminary settings about font and text
@ -1016,7 +1016,7 @@ public:
*/
class SmRootSymbolNode final : public SmMathSymbolNode
{
sal_uLong mnBodyWidth; // width of body (argument) of root sign
tools::Long mnBodyWidth; // width of body (argument) of root sign
public:
explicit SmRootSymbolNode(const SmToken &rNodeToken)
@ -1028,11 +1028,11 @@ public:
* Allows to know how long is the root and paint it.
* @return body width
*/
sal_uLong GetBodyWidth() const {return mnBodyWidth;};
tools::Long GetBodyWidth() const {return mnBodyWidth;};
//visual stuff TODO comment
virtual void AdaptToX(OutputDevice &rDev, sal_uLong nHeight) override;
virtual void AdaptToY(OutputDevice &rDev, sal_uLong nHeight) override;
virtual void AdaptToX(OutputDevice &rDev, tools::Long nHeight) override;
virtual void AdaptToY(OutputDevice &rDev, tools::Long nHeight) override;
/**
* Accept a visitor.

View file

@ -114,7 +114,7 @@ public:
void SetItalicSpaces(tools::Long nLeftSpace, tools::Long nRightSpace);
void SetWidth(sal_uLong nWidth) { aSize.setWidth(nWidth); }
void SetWidth(tools::Long nWidth) { aSize.setWidth(nWidth); }
void SetLeft(tools::Long nLeft);
void SetRight(tools::Long nRight);

View file

@ -240,12 +240,12 @@ void SmNode::Move(const Point& rVector)
ForEachNonNull(this, [&rVector](SmNode *pNode){pNode->Move(rVector);});
}
void SmNode::AdaptToX(OutputDevice &/*rDev*/, sal_uLong /*nWidth*/)
void SmNode::AdaptToX(OutputDevice &/*rDev*/, tools::Long /*nWidth*/)
{
}
void SmNode::AdaptToY(OutputDevice &/*rDev*/, sal_uLong /*nHeight*/)
void SmNode::AdaptToY(OutputDevice &/*rDev*/, tools::Long /*nHeight*/)
{
}
@ -1715,13 +1715,13 @@ SmPolyLineNode::SmPolyLineNode(const SmToken &rNodeToken)
}
void SmPolyLineNode::AdaptToX(OutputDevice &/*rDev*/, sal_uLong nNewWidth)
void SmPolyLineNode::AdaptToX(OutputDevice &/*rDev*/, tools::Long nNewWidth)
{
maToSize.setWidth( nNewWidth );
}
void SmPolyLineNode::AdaptToY(OutputDevice &/*rDev*/, sal_uLong nNewHeight)
void SmPolyLineNode::AdaptToY(OutputDevice &/*rDev*/, tools::Long nNewHeight)
{
GetFont().FreezeBorderWidth();
maToSize.setHeight( nNewHeight );
@ -1769,13 +1769,13 @@ void SmPolyLineNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
/**************************************************************************/
void SmRootSymbolNode::AdaptToX(OutputDevice &/*rDev*/, sal_uLong nWidth)
void SmRootSymbolNode::AdaptToX(OutputDevice &/*rDev*/, tools::Long nWidth)
{
mnBodyWidth = nWidth;
}
void SmRootSymbolNode::AdaptToY(OutputDevice &rDev, sal_uLong nHeight)
void SmRootSymbolNode::AdaptToY(OutputDevice &rDev, tools::Long nHeight)
{
// some additional length so that the horizontal
// bar will be positioned above the argument
@ -1786,13 +1786,13 @@ void SmRootSymbolNode::AdaptToY(OutputDevice &rDev, sal_uLong nHeight)
/**************************************************************************/
void SmRectangleNode::AdaptToX(OutputDevice &/*rDev*/, sal_uLong nWidth)
void SmRectangleNode::AdaptToX(OutputDevice &/*rDev*/, tools::Long nWidth)
{
maToSize.setWidth( nWidth );
}
void SmRectangleNode::AdaptToY(OutputDevice &/*rDev*/, sal_uLong nHeight)
void SmRectangleNode::AdaptToY(OutputDevice &/*rDev*/, tools::Long nHeight)
{
GetFont().FreezeBorderWidth();
maToSize.setHeight( nHeight );
@ -1813,7 +1813,7 @@ void SmRectangleNode::Arrange(OutputDevice &rDev, const SmFormat &/*rFormat*/)
aTmpDev.SetFont(GetFont());
// add some borderspace
sal_uLong nTmpBorderWidth = GetFont().GetBorderWidth();
tools::Long nTmpBorderWidth = GetFont().GetBorderWidth();
nHeight += 2 * nTmpBorderWidth;
//! use this method in order to have 'SmRect::HasAlignInfo() == true'
@ -2068,7 +2068,7 @@ SmMathSymbolNode::SmMathSymbolNode(const SmToken &rNodeToken)
SetText(GetToken().cMathChar);
}
void SmMathSymbolNode::AdaptToX(OutputDevice &rDev, sal_uLong nWidth)
void SmMathSymbolNode::AdaptToX(OutputDevice &rDev, tools::Long nWidth)
{
// Since there is no function to do this, we try to approximate it:
Size aFntSize (GetFont().GetFontSize());
@ -2091,7 +2091,7 @@ void SmMathSymbolNode::AdaptToX(OutputDevice &rDev, sal_uLong nWidth)
GetFont().SetSize(aFntSize);
}
void SmMathSymbolNode::AdaptToY(OutputDevice &rDev, sal_uLong nHeight)
void SmMathSymbolNode::AdaptToY(OutputDevice &rDev, tools::Long nHeight)
{
GetFont().FreezeBorderWidth();
Size aFntSize (GetFont().GetFontSize());

View file

@ -479,7 +479,7 @@ void SmDrawingVisitor::Visit( SmRectangleNode* pNode )
mrDev.SetLineColor( );
aTmpDev.SetFont( pNode->GetFont( ) );
sal_uLong nTmpBorderWidth = pNode->GetFont( ).GetBorderWidth( );
tools::Long nTmpBorderWidth = pNode->GetFont( ).GetBorderWidth( );
// get rectangle and remove borderspace
tools::Rectangle aTmp ( pNode->AsRectangle( ) + maPosition - pNode->GetTopLeft( ) );