Kaydet (Commit) ecdca6ee authored tarafından Miklos Vajna's avatar Miklos Vajna

sw: prefix members of SwInterHyphInfoTextFrame

Change-Id: Idc99dfd6e5ee7bc999088f4657d77613d0029b97
Reviewed-on: https://gerrit.libreoffice.org/56489
Tested-by: Jenkins
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 22ccb4cb
...@@ -56,11 +56,11 @@ private: ...@@ -56,11 +56,11 @@ private:
css::uno::Reference<css::linguistic2::XHyphenatedWord> m_xHyphWord; css::uno::Reference<css::linguistic2::XHyphenatedWord> m_xHyphWord;
public: public:
/// input: requested range to hyphenate /// input: requested range to hyphenate
TextFrameIndex nStart; TextFrameIndex m_nStart;
TextFrameIndex nEnd; TextFrameIndex m_nEnd;
/// output: found word /// output: found word
TextFrameIndex nWordStart; TextFrameIndex m_nWordStart;
TextFrameIndex nWordLen; TextFrameIndex m_nWordLen;
SwInterHyphInfoTextFrame(SwTextFrame const& rFrame, SwInterHyphInfoTextFrame(SwTextFrame const& rFrame,
SwTextNode const& rNode, SwInterHyphInfo const& rHyphInfo); SwTextNode const& rNode, SwInterHyphInfo const& rHyphInfo);
......
...@@ -82,7 +82,7 @@ bool SwTextFrame::Hyphenate(SwInterHyphInfoTextFrame & rHyphInf) ...@@ -82,7 +82,7 @@ bool SwTextFrame::Hyphenate(SwInterHyphInfoTextFrame & rHyphInf)
SwTextFormatInfo aInf( getRootFrame()->GetCurrShell()->GetOut(), this, true ); // true for interactive hyph! SwTextFormatInfo aInf( getRootFrame()->GetCurrShell()->GetOut(), this, true ); // true for interactive hyph!
SwTextFormatter aLine( this, &aInf ); SwTextFormatter aLine( this, &aInf );
aLine.CharToLine( rHyphInf.nStart ); aLine.CharToLine( rHyphInf.m_nStart );
// If we're within the first word of a row, it could've been hyphenated // If we're within the first word of a row, it could've been hyphenated
// in the row earlier. // in the row earlier.
...@@ -97,7 +97,7 @@ bool SwTextFrame::Hyphenate(SwInterHyphInfoTextFrame & rHyphInf) ...@@ -97,7 +97,7 @@ bool SwTextFrame::Hyphenate(SwInterHyphInfoTextFrame & rHyphInf)
aLine.Next(); aLine.Next();
} }
const TextFrameIndex nEnd = rHyphInf.nEnd; const TextFrameIndex nEnd = rHyphInf.m_nEnd;
while( !bRet && aLine.GetStart() < nEnd ) while( !bRet && aLine.GetStart() < nEnd )
{ {
bRet = aLine.Hyphenate( rHyphInf ); bRet = aLine.Hyphenate( rHyphInf );
...@@ -168,9 +168,9 @@ bool SwTextFormatter::Hyphenate(SwInterHyphInfoTextFrame & rHyphInf) ...@@ -168,9 +168,9 @@ bool SwTextFormatter::Hyphenate(SwInterHyphInfoTextFrame & rHyphInf)
// HyphPortion in the specified range. // HyphPortion in the specified range.
SwLinePortion *pPos = m_pCurr->GetPortion(); SwLinePortion *pPos = m_pCurr->GetPortion();
const TextFrameIndex nPamStart = rHyphInf.nStart; const TextFrameIndex nPamStart = rHyphInf.m_nStart;
nWrdStart = m_nStart; nWrdStart = m_nStart;
const TextFrameIndex nEnd = rHyphInf.nEnd; const TextFrameIndex nEnd = rHyphInf.m_nEnd;
while( pPos ) while( pPos )
{ {
// Either we are above or we are running into a HyphPortion // Either we are above or we are running into a HyphPortion
...@@ -216,7 +216,7 @@ bool SwTextFormatter::Hyphenate(SwInterHyphInfoTextFrame & rHyphInf) ...@@ -216,7 +216,7 @@ bool SwTextFormatter::Hyphenate(SwInterHyphInfoTextFrame & rHyphInf)
return false; return false;
// nWrdStart contains the position in string that should be hyphenated // nWrdStart contains the position in string that should be hyphenated
rHyphInf.nWordStart = nWrdStart; rHyphInf.m_nWordStart = nWrdStart;
TextFrameIndex nLen(0); TextFrameIndex nLen(0);
const TextFrameIndex nEnd = nWrdStart; const TextFrameIndex nEnd = nWrdStart;
...@@ -242,8 +242,8 @@ bool SwTextFormatter::Hyphenate(SwInterHyphInfoTextFrame & rHyphInf) ...@@ -242,8 +242,8 @@ bool SwTextFormatter::Hyphenate(SwInterHyphInfoTextFrame & rHyphInf)
if ( xHyphWord.is() ) if ( xHyphWord.is() )
{ {
rHyphInf.SetHyphWord( xHyphWord ); rHyphInf.SetHyphWord( xHyphWord );
rHyphInf.nWordStart = nWrdStart; rHyphInf.m_nWordStart = nWrdStart;
rHyphInf.nWordLen = nLen; rHyphInf.m_nWordLen = nLen;
return true; return true;
} }
......
...@@ -1623,18 +1623,18 @@ void SwTextFrame::CollectAutoCmplWrds(SwTextNode & rNode, sal_Int32 nActPos) ...@@ -1623,18 +1623,18 @@ void SwTextFrame::CollectAutoCmplWrds(SwTextNode & rNode, sal_Int32 nActPos)
SwInterHyphInfoTextFrame::SwInterHyphInfoTextFrame( SwInterHyphInfoTextFrame::SwInterHyphInfoTextFrame(
SwTextFrame const& rFrame, SwTextNode const& rNode, SwTextFrame const& rFrame, SwTextNode const& rNode,
SwInterHyphInfo const& rHyphInfo) SwInterHyphInfo const& rHyphInfo)
: nStart(rFrame.MapModelToView(&rNode, rHyphInfo.nStart)) : m_nStart(rFrame.MapModelToView(&rNode, rHyphInfo.nStart))
, nEnd(rFrame.MapModelToView(&rNode, rHyphInfo.nEnd)) , m_nEnd(rFrame.MapModelToView(&rNode, rHyphInfo.nEnd))
, nWordStart(0) , m_nWordStart(0)
, nWordLen(0) , m_nWordLen(0)
{ {
} }
void SwInterHyphInfoTextFrame::UpdateTextNodeHyphInfo(SwTextFrame const& rFrame, void SwInterHyphInfoTextFrame::UpdateTextNodeHyphInfo(SwTextFrame const& rFrame,
SwTextNode const& rNode, SwInterHyphInfo & o_rHyphInfo) SwTextNode const& rNode, SwInterHyphInfo & o_rHyphInfo)
{ {
std::pair<SwTextNode const*, sal_Int32> const wordStart(rFrame.MapViewToModel(nWordStart)); std::pair<SwTextNode const*, sal_Int32> const wordStart(rFrame.MapViewToModel(m_nWordStart));
std::pair<SwTextNode const*, sal_Int32> const wordEnd(rFrame.MapViewToModel(nWordStart+nWordLen)); std::pair<SwTextNode const*, sal_Int32> const wordEnd(rFrame.MapViewToModel(m_nWordStart+m_nWordLen));
if (wordStart.first != &rNode || wordEnd.first != &rNode) if (wordStart.first != &rNode || wordEnd.first != &rNode)
{ // not sure if this can happen since nStart/nEnd are in rNode { // not sure if this can happen since nStart/nEnd are in rNode
SAL_WARN("sw.core", "UpdateTextNodeHyphInfo: outside of node"); SAL_WARN("sw.core", "UpdateTextNodeHyphInfo: outside of node");
...@@ -1671,7 +1671,7 @@ bool SwTextNode::Hyphenate( SwInterHyphInfo &rHyphInf ) ...@@ -1671,7 +1671,7 @@ bool SwTextNode::Hyphenate( SwInterHyphInfo &rHyphInf )
} }
SwInterHyphInfoTextFrame aHyphInfo(*pFrame, *this, rHyphInf); SwInterHyphInfoTextFrame aHyphInfo(*pFrame, *this, rHyphInf);
pFrame = &(pFrame->GetFrameAtOfst( aHyphInfo.nStart )); pFrame = &(pFrame->GetFrameAtOfst( aHyphInfo.m_nStart ));
while( pFrame ) while( pFrame )
{ {
...@@ -1686,8 +1686,8 @@ bool SwTextNode::Hyphenate( SwInterHyphInfo &rHyphInf ) ...@@ -1686,8 +1686,8 @@ bool SwTextNode::Hyphenate( SwInterHyphInfo &rHyphInf )
pFrame = pFrame->GetFollow(); pFrame = pFrame->GetFollow();
if( pFrame ) if( pFrame )
{ {
aHyphInfo.nEnd = aHyphInfo.nEnd - (pFrame->GetOfst() - aHyphInfo.nStart); aHyphInfo.m_nEnd = aHyphInfo.m_nEnd - (pFrame->GetOfst() - aHyphInfo.m_nStart);
aHyphInfo.nStart = pFrame->GetOfst(); aHyphInfo.m_nStart = pFrame->GetOfst();
} }
} }
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment