summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2016-12-01 18:55:58 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2016-12-02 02:34:44 +0000
commit7d1be94484fa99bbfbaa0261cc243778a70b298e (patch)
tree9efb9f7de174a10196dd976170ea6c6c28b0c7bf /starmath
parentff8a29d01afef082741871c7ac40f635a5e2bfad (diff)
starmath: Prefix members of SmTextNode
Change-Id: Ic2509e7ee4040fec8173861f319bce61804837cf Reviewed-on: https://gerrit.libreoffice.org/31468 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/inc/node.hxx24
-rw-r--r--starmath/source/node.cxx36
2 files changed, 30 insertions, 30 deletions
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index 52532c96288e..e3067b7d9203 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -376,16 +376,16 @@ public:
*/
class SmTextNode : public SmVisibleNode
{
- OUString aText;
- sal_uInt16 nFontDesc;
+ OUString maText;
+ sal_uInt16 mnFontDesc;
/** Index within text where the selection starts
* @remarks Only valid if SmNode::IsSelected() is true
*/
- sal_Int32 nSelectionStart;
+ sal_Int32 mnSelectionStart;
/** Index within text where the selection ends
* @remarks Only valid if SmNode::IsSelected() is true
*/
- sal_Int32 nSelectionEnd;
+ sal_Int32 mnSelectionEnd;
protected:
SmTextNode(SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 nFontDescP );
@@ -393,12 +393,12 @@ protected:
public:
SmTextNode(const SmToken &rNodeToken, sal_uInt16 nFontDescP );
- sal_uInt16 GetFontDesc() const { return nFontDesc; }
- void SetText(const OUString &rText) { aText = rText; }
- const OUString & GetText() const { return aText; }
+ sal_uInt16 GetFontDesc() const { return mnFontDesc; }
+ void SetText(const OUString &rText) { maText = rText; }
+ const OUString & GetText() const { return maText; }
/** Change the text of this node, including the underlying token */
void ChangeText(const OUString &rText) {
- aText = rText;
+ maText = rText;
SmToken token = GetToken();
token.aText = rText;
SetToken(token); //TODO: Merge this with AdjustFontDesc for better performance
@@ -409,15 +409,15 @@ public:
/** Index within GetText() where the selection starts
* @remarks Only valid of SmNode::IsSelected() is true
*/
- sal_Int32 GetSelectionStart() const {return nSelectionStart;}
+ sal_Int32 GetSelectionStart() const {return mnSelectionStart;}
/** Index within GetText() where the selection end
* @remarks Only valid of SmNode::IsSelected() is true
*/
- sal_Int32 GetSelectionEnd() const {return nSelectionEnd;}
+ sal_Int32 GetSelectionEnd() const {return mnSelectionEnd;}
/** Set the index within GetText() where the selection starts */
- void SetSelectionStart(sal_Int32 index) {nSelectionStart = index;}
+ void SetSelectionStart(sal_Int32 index) {mnSelectionStart = index;}
/** Set the index within GetText() where the selection end */
- void SetSelectionEnd(sal_Int32 index) {nSelectionEnd = index;}
+ void SetSelectionEnd(sal_Int32 index) {mnSelectionEnd = index;}
virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell) override;
virtual void Arrange(OutputDevice &rDev, const SmFormat &rFormat) override;
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 4ca990f634c2..023f5237edd7 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -2037,17 +2037,17 @@ void SmRectangleNode::Arrange(OutputDevice &rDev, const SmFormat &/*rFormat*/)
SmTextNode::SmTextNode( SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 nFontDescP )
: SmVisibleNode(eNodeType, rNodeToken)
- , nFontDesc(nFontDescP)
- , nSelectionStart(0)
- , nSelectionEnd(0)
+ , mnFontDesc(nFontDescP)
+ , mnSelectionStart(0)
+ , mnSelectionEnd(0)
{
}
SmTextNode::SmTextNode( const SmToken &rNodeToken, sal_uInt16 nFontDescP )
: SmVisibleNode(NTEXT, rNodeToken)
- , nFontDesc(nFontDescP)
- , nSelectionStart(0)
- , nSelectionEnd(0)
+ , mnFontDesc(nFontDescP)
+ , mnSelectionStart(0)
+ , mnSelectionEnd(0)
{
}
@@ -2061,7 +2061,7 @@ void SmTextNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)
if (TTEXT == GetToken().eType)
SetRectHorAlign( RectHorAlign::Left );
- aText = GetToken().aText;
+ maText = GetToken().aText;
GetFont() = rFormat.GetFont(GetFontDesc());
if (IsItalic( GetFont() ))
@@ -2088,7 +2088,7 @@ void SmTextNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
SmTmpDevice aTmpDev (rDev, true);
aTmpDev.SetFont(GetFont());
- SmRect::operator = (SmRect(aTmpDev, &rFormat, aText, GetFont().GetBorderWidth()));
+ SmRect::operator = (SmRect(aTmpDev, &rFormat, maText, GetFont().GetBorderWidth()));
}
void SmTextNode::CreateTextFromNode(OUString &rText)
@@ -2140,31 +2140,31 @@ void SmTextNode::CreateTextFromNode(OUString &rText)
void SmTextNode::GetAccessibleText( OUStringBuffer &rText ) const
{
- rText.append(aText);
+ rText.append(maText);
}
void SmTextNode::AdjustFontDesc()
{
if (GetToken().eType == TTEXT)
- nFontDesc = FNT_TEXT;
+ mnFontDesc = FNT_TEXT;
else if(GetToken().eType == TFUNC)
- nFontDesc = FNT_FUNCTION;
+ mnFontDesc = FNT_FUNCTION;
else {
SmTokenType nTok;
- const SmTokenTableEntry *pEntry = SmParser::GetTokenTableEntry( aText );
+ const SmTokenTableEntry *pEntry = SmParser::GetTokenTableEntry( maText );
if (pEntry && pEntry->nGroup == TG::Function) {
nTok = pEntry->eType;
- nFontDesc = FNT_FUNCTION;
+ mnFontDesc = FNT_FUNCTION;
} else {
- sal_Unicode firstChar = aText[0];
+ sal_Unicode firstChar = maText[0];
if( ('0' <= firstChar && firstChar <= '9') || firstChar == '.' || firstChar == ',') {
- nFontDesc = FNT_NUMBER;
+ mnFontDesc = FNT_NUMBER;
nTok = TNUMBER;
- } else if (aText.getLength() > 1) {
- nFontDesc = FNT_VARIABLE;
+ } else if (maText.getLength() > 1) {
+ mnFontDesc = FNT_VARIABLE;
nTok = TIDENT;
} else {
- nFontDesc = FNT_VARIABLE;
+ mnFontDesc = FNT_VARIABLE;
nTok = TCHARACTER;
}
}