diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2011-04-12 21:06:27 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2011-04-12 21:52:44 +0900 |
commit | 408f9e77dff76e20d9cf3b67f2c763fbad9687d2 (patch) | |
tree | 8674fed80c3c88090b67d4f4269e3eb7ff47316b | |
parent | 78b4ef13488278e5f5ec50311a6741d8176d2687 (diff) |
fixed typos in comments
-rw-r--r-- | starmath/inc/caret.hxx | 6 | ||||
-rw-r--r-- | starmath/inc/cursor.hxx | 6 | ||||
-rw-r--r-- | starmath/inc/node.hxx | 2 | ||||
-rw-r--r-- | starmath/inc/visitors.hxx | 2 | ||||
-rw-r--r-- | starmath/source/cursor.cxx | 6 | ||||
-rw-r--r-- | starmath/source/visitors.cxx | 42 |
6 files changed, 32 insertions, 32 deletions
diff --git a/starmath/inc/caret.hxx b/starmath/inc/caret.hxx index c0bda175746b..cec8bd722482 100644 --- a/starmath/inc/caret.hxx +++ b/starmath/inc/caret.hxx @@ -40,7 +40,7 @@ struct SmCaretPos{ SmNode* pSelectedNode; /** Index within the selected node * - * 0: Position infront of a node + * 0: Position in front of a node * 1: Position after a node or after first char in SmTextNode * n: Position after n char in SmTextNode * @@ -290,13 +290,13 @@ private: * * A caret position in OpenOffice Math is representated by an instance of SmCaretPos. * That is a caret position is a node and an index related to this node. For most nodes the - * index 0, means caret is infront of this node, the index 1 means caret is after this node. + * index 0, means caret is in front of this node, the index 1 means caret is after this node. * For SmTextNode the index is the caret position after the specified number of characters, * imagine an SmTextNode with the number 1337. The index 3 in such SmTextNode would mean a * caret placed right before 7, e.g. "133|7". * * For SmExpressionNode, SmBinHorNode and SmUnHorNode the only legal index is 0, which means - * infront of the node. Actually the index 0 may only because for the first caret position + * in front of the node. Actually the index 0 may only because for the first caret position * in a visual line. From the example above, consider the following subtree that constitutes * a visual line: * diff --git a/starmath/inc/cursor.hxx b/starmath/inc/cursor.hxx index 0de8931673d9..6b6e7168a59c 100644 --- a/starmath/inc/cursor.hxx +++ b/starmath/inc/cursor.hxx @@ -171,7 +171,7 @@ public: /** Create sub-/super script * * If there's a selection, it will be move into the appropriate sub-/super scription - * of the node infront of it. If there's no node infront of position (or the selection), + * of the node in front of it. If there's no node in front of position (or the selection), * a sub-/super scription of a new SmPlaceNode will be made. * * If there's is an existing subscription of the node, the caret will be moved into it, @@ -333,7 +333,7 @@ private: /** Find an iterator pointing to the node in pLineList following aCaretPos * - * If aCaretPos::pSelectedNode cannot be found it is assumed that it's infront of pLineList, + * If aCaretPos::pSelectedNode cannot be found it is assumed that it's in front of pLineList, * thus not an element in pLineList. In this case this method returns an iterator to the * first element in pLineList. * @@ -353,7 +353,7 @@ private: * removed. * * @returns A caret position equivalent to one selecting the node before aIter, the method returns - * an invalid SmCaretPos to indicate placement infront of the line. + * an invalid SmCaretPos to indicate placement in front of the line. */ static SmCaretPos PatchLineList(SmNodeList* pLineList, SmNodeList::iterator aIter); diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index 83e54451764e..202cf2e4b538 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -585,7 +585,7 @@ public: /** Root symbol node * - * Root symbol node used by SmRootNode to create the root symbol, infront of + * Root symbol node used by SmRootNode to create the root symbol, in front of * the line with the line above. I don't think this node should be used for * anything else. */ diff --git a/starmath/inc/visitors.hxx b/starmath/inc/visitors.hxx index 56fb0e30e032..f4855dc93cbf 100644 --- a/starmath/inc/visitors.hxx +++ b/starmath/inc/visitors.hxx @@ -316,7 +316,7 @@ private: * pRightMost : SmCaretPosGraphEntry* * * Prior to a Visit call: - * pRightMost: A pointer to right most position infront of the current line entry. + * pRightMost: A pointer to right most position in front of the current line entry. * * After a Visit call: * pRightMost: A pointer to the right most position in the called line entry, if no there's diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx index 9c164355d851..3375f18abab2 100644 --- a/starmath/source/cursor.cxx +++ b/starmath/source/cursor.cxx @@ -376,7 +376,7 @@ SmNodeList::iterator SmCursor::FindPositionInLineList(SmNodeList* pLineList, SmC } } - //If we didn't find pSelectedNode, it must be because the caret is infront of the line + //If we didn't find pSelectedNode, it must be because the caret is in front of the line return pLineList->begin(); } @@ -416,7 +416,7 @@ SmCaretPos SmCursor::PatchLineList(SmNodeList* pLineList, SmNodeList::iterator a --aIter; aIter = pLineList->erase(aIter); delete prev; - //Return caret pos infront of aIter + //Return caret pos in front of aIter if(aIter != pLineList->begin()) --aIter; //Thus find node before aIter if(aIter == pLineList->begin()) @@ -434,7 +434,7 @@ SmCaretPos SmCursor::PatchLineList(SmNodeList* pLineList, SmNodeList::iterator a } //If we didn't do anything return - if(!prev) //return an invalid to indicate we're infront of line + if(!prev) //return an invalid to indicate we're in front of line return SmCaretPos(); if(prev->GetType() == NTEXT) return SmCaretPos(prev, ((SmTextNode*)prev)->GetText().Len()); diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx index 78e5adcbeddf..8a8341faaa9f 100644 --- a/starmath/source/visitors.cxx +++ b/starmath/source/visitors.cxx @@ -679,7 +679,7 @@ void SmDrawingVisitor::Visit( SmRootSymbolNode* pNode ) Rectangle aBar( aBarPos, Size( nBarWidth, nBarHeight ) ); //! avoid GROWING AND SHRINKING of drawn rectangle when constantly //! increasing zoomfactor. - // This is done by shifting it's output-position to a point that + // This is done by shifting its output-position to a point that // corresponds exactly to a pixel on the output device. Point aDrawPos( rDev.PixelToLogic( rDev.LogicToPixel( aBar.TopLeft( ) ) ) ); aBar.SetPos( aDrawPos ); @@ -732,7 +732,7 @@ void SmDrawingVisitor::Visit( SmRectangleNode* pNode ) //! avoid GROWING AND SHRINKING of drawn rectangle when constantly //! increasing zoomfactor. - // This is done by shifting it's output-position to a point that + // This is done by shifting its output-position to a point that // corresponds exactly to a pixel on the output device. Point aPos ( rDev.PixelToLogic( rDev.LogicToPixel( aTmp.TopLeft( ) ) ) ); aTmp.SetPos( aPos ); @@ -790,12 +790,12 @@ SmSetSelectionVisitor::SmSetSelectionVisitor( SmCaretPos startPos, SmCaretPos en //Assume that pTree is a SmTableNode OSL_ENSURE(pTree->GetType() == NTABLE, "pTree should be a SmTableNode!"); - //Visit root node, this is special as this node cannot be selected, but it's children can! + //Visit root node, this is special as this node cannot be selected, but its children can! if(pTree->GetType() == NTABLE){ - //Change state if StartPos is infront of this node + //Change state if StartPos is in front of this node if( StartPos.pSelectedNode == pTree && StartPos.Index == 0 ) IsSelecting = !IsSelecting; - //Change state if EndPos is infront of this node + //Change state if EndPos is in front of this node if( EndPos.pSelectedNode == pTree && EndPos.Index == 0 ) IsSelecting = !IsSelecting; OSL_ENSURE(!IsSelecting, "Caret positions needed to set IsSelecting about, shouldn't be possible!"); @@ -832,10 +832,10 @@ void SmSetSelectionVisitor::SetSelectedOnAll( SmNode* pSubTree, bool IsSelected } void SmSetSelectionVisitor::DefaultVisit( SmNode* pNode ) { - //Change state if StartPos is infront of this node + //Change state if StartPos is in front of this node if( StartPos.pSelectedNode == pNode && StartPos.Index == 0 ) IsSelecting = !IsSelecting; - //Change state if EndPos is infront of this node + //Change state if EndPos is in front of this node if( EndPos.pSelectedNode == pNode && EndPos.Index == 0 ) IsSelecting = !IsSelecting; @@ -857,7 +857,7 @@ void SmSetSelectionVisitor::DefaultVisit( SmNode* pNode ) { //If state changed if( ChangedState ) { - //Select this node and all of it's children + //Select this node and all of its children //(Make exception for SmBracebodyNode) if( pNode->GetType() != NBRACEBODY || !pNode->GetParent() || @@ -887,10 +887,10 @@ void SmSetSelectionVisitor::DefaultVisit( SmNode* pNode ) { } void SmSetSelectionVisitor::VisitCompositionNode( SmNode* pNode ) { - //Change state if StartPos is infront of this node + //Change state if StartPos is in front of this node if( StartPos.pSelectedNode == pNode && StartPos.Index == 0 ) IsSelecting = !IsSelecting; - //Change state if EndPos is infront of this node + //Change state if EndPos is in front of this node if( EndPos.pSelectedNode == pNode && EndPos.Index == 0 ) IsSelecting = !IsSelecting; @@ -995,8 +995,8 @@ SmCaretPosGraphBuildingVisitor::SmCaretPosGraphBuildingVisitor( SmNode* pRootNod while( it.Next( ) ){ //There's a special invariant between this method and the Visit( SmLineNode* ) //Usually pRightMost may not be NULL, to avoid this pRightMost should here be - //set to a new SmCaretPos infront of it.Current( ), however, if it.Current( ) is - //an instance of SmLineNode we let SmLineNode create this position infront of + //set to a new SmCaretPos in front of it.Current( ), however, if it.Current( ) is + //an instance of SmLineNode we let SmLineNode create this position in front of //the visual line. //The argument for doing this is that we now don't have to worry about SmLineNode //being a visual line composition node. Thus, no need for yet another special case @@ -1162,7 +1162,7 @@ void SmCaretPosGraphBuildingVisitor::Visit( SmSubSupNode* pNode ) /** Build caret position for SmOperNode * - * If first child is an SmSubSupNode we will ignore it's + * If first child is an SmSubSupNode we will ignore its * body, as this body is a SmMathSymbol, for SUM, INT or similar * that shouldn't be subject to modification. * If first child is not a SmSubSupNode, ignore it completely @@ -1225,7 +1225,7 @@ void SmCaretPosGraphBuildingVisitor::Visit( SmOperNode* pNode ) SmNode* pChild; SmCaretPosGraphEntry *childLeft; if( pSubSup && ( pChild = pSubSup->GetSubSup( LSUP ) ) ) { - //Create position infront of pChild + //Create position in front of pChild childLeft = pGraph->Add( SmCaretPos( pChild, 0 ), left ); //Visit pChild pRightMost = childLeft; @@ -1234,7 +1234,7 @@ void SmCaretPosGraphBuildingVisitor::Visit( SmOperNode* pNode ) pRightMost->SetRight( bodyLeft ); } if( pSubSup && ( pChild = pSubSup->GetSubSup( LSUB ) ) ) { - //Create position infront of pChild + //Create position in front of pChild childLeft = pGraph->Add( SmCaretPos( pChild, 0 ), left ); //Visit pChild pRightMost = childLeft; @@ -1243,7 +1243,7 @@ void SmCaretPosGraphBuildingVisitor::Visit( SmOperNode* pNode ) pRightMost->SetRight( bodyLeft ); } if( pSubSup && ( pChild = pSubSup->GetSubSup( CSUP ) ) ) {//TO - //Create position infront of pChild + //Create position in front of pChild childLeft = pGraph->Add( SmCaretPos( pChild, 0 ), left ); //Visit pChild pRightMost = childLeft; @@ -1252,7 +1252,7 @@ void SmCaretPosGraphBuildingVisitor::Visit( SmOperNode* pNode ) pRightMost->SetRight( bodyLeft ); } if( pSubSup && ( pChild = pSubSup->GetSubSup( CSUB ) ) ) { //FROM - //Create position infront of pChild + //Create position in front of pChild childLeft = pGraph->Add( SmCaretPos( pChild, 0 ), left ); //Visit pChild pRightMost = childLeft; @@ -1261,7 +1261,7 @@ void SmCaretPosGraphBuildingVisitor::Visit( SmOperNode* pNode ) pRightMost->SetRight( bodyLeft ); } if( pSubSup && ( pChild = pSubSup->GetSubSup( RSUP ) ) ) { - //Create position infront of pChild + //Create position in front of pChild childLeft = pGraph->Add( SmCaretPos( pChild, 0 ), left ); //Visit pChild pRightMost = childLeft; @@ -1270,7 +1270,7 @@ void SmCaretPosGraphBuildingVisitor::Visit( SmOperNode* pNode ) pRightMost->SetRight( bodyLeft ); } if( pSubSup && ( pChild = pSubSup->GetSubSup( RSUB ) ) ) { - //Create position infront of pChild + //Create position in front of pChild childLeft = pGraph->Add( SmCaretPos( pChild, 0 ), left ); //Visit pChild pRightMost = childLeft; @@ -1370,7 +1370,7 @@ void SmCaretPosGraphBuildingVisitor::Visit( SmBinVerNode* pNode ) //Set left left = pRightMost; - OSL_ENSURE( pRightMost, "There must be a position infront of this" ); + OSL_ENSURE( pRightMost, "There must be a position in front of this" ); //Create right right = pGraph->Add( SmCaretPos( pNode, 1 ) ); @@ -1617,7 +1617,7 @@ void SmCaretPosGraphBuildingVisitor::Visit( SmRootNode* pNode ) *bodyRight; //Get left and save it - OSL_ENSURE( pRightMost, "There must be a position infront of this" ); + OSL_ENSURE( pRightMost, "There must be a position in front of this" ); left = pRightMost; //Create body left |