summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorDeepanshu Sharma <129deepanshusharma@gmail.com>2024-09-27 02:17:29 +0530
committerHossein <hossein@libreoffice.org>2024-09-28 23:21:40 +0200
commitc7c52f60657baa65e104530247ed05a90479e99e (patch)
treefead46405ed51fa3fc0c5f087b884c90dab4def1 /starmath
parentb01d057df75096792c53ba7f7a80c3db5afb1ba5 (diff)
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
Diffstat (limited to 'starmath')
-rw-r--r--starmath/inc/node.hxx24
-rw-r--r--starmath/inc/rect.hxx2
-rw-r--r--starmath/source/node.cxx22
-rw-r--r--starmath/source/visitors.cxx2
4 files changed, 25 insertions, 25 deletions
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index f59c23ea426f..778c11c2a968 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -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.
diff --git a/starmath/inc/rect.hxx b/starmath/inc/rect.hxx
index 0b28581a00f9..5960e1b48f65 100644
--- a/starmath/inc/rect.hxx
+++ b/starmath/inc/rect.hxx
@@ -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);
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 022596b4e2d2..983fa174c7d9 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -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());
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index 3e11201ebef2..5d126fcff481 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -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( ) );