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:
css::uno::Reference<css::linguistic2::XHyphenatedWord> m_xHyphWord;
public:
/// input: requested range to hyphenate
TextFrameIndex nStart;
TextFrameIndex nEnd;
TextFrameIndex m_nStart;
TextFrameIndex m_nEnd;
/// output: found word
TextFrameIndex nWordStart;
TextFrameIndex nWordLen;
TextFrameIndex m_nWordStart;
TextFrameIndex m_nWordLen;
SwInterHyphInfoTextFrame(SwTextFrame const& rFrame,
SwTextNode const& rNode, SwInterHyphInfo const& rHyphInfo);
......
......@@ -82,7 +82,7 @@ bool SwTextFrame::Hyphenate(SwInterHyphInfoTextFrame & rHyphInf)
SwTextFormatInfo aInf( getRootFrame()->GetCurrShell()->GetOut(), this, true ); // true for interactive hyph!
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
// in the row earlier.
......@@ -97,7 +97,7 @@ bool SwTextFrame::Hyphenate(SwInterHyphInfoTextFrame & rHyphInf)
aLine.Next();
}
const TextFrameIndex nEnd = rHyphInf.nEnd;
const TextFrameIndex nEnd = rHyphInf.m_nEnd;
while( !bRet && aLine.GetStart() < nEnd )
{
bRet = aLine.Hyphenate( rHyphInf );
......@@ -168,9 +168,9 @@ bool SwTextFormatter::Hyphenate(SwInterHyphInfoTextFrame & rHyphInf)
// HyphPortion in the specified range.
SwLinePortion *pPos = m_pCurr->GetPortion();
const TextFrameIndex nPamStart = rHyphInf.nStart;
const TextFrameIndex nPamStart = rHyphInf.m_nStart;
nWrdStart = m_nStart;
const TextFrameIndex nEnd = rHyphInf.nEnd;
const TextFrameIndex nEnd = rHyphInf.m_nEnd;
while( pPos )
{
// Either we are above or we are running into a HyphPortion
......@@ -216,7 +216,7 @@ bool SwTextFormatter::Hyphenate(SwInterHyphInfoTextFrame & rHyphInf)
return false;
// nWrdStart contains the position in string that should be hyphenated
rHyphInf.nWordStart = nWrdStart;
rHyphInf.m_nWordStart = nWrdStart;
TextFrameIndex nLen(0);
const TextFrameIndex nEnd = nWrdStart;
......@@ -242,8 +242,8 @@ bool SwTextFormatter::Hyphenate(SwInterHyphInfoTextFrame & rHyphInf)
if ( xHyphWord.is() )
{
rHyphInf.SetHyphWord( xHyphWord );
rHyphInf.nWordStart = nWrdStart;
rHyphInf.nWordLen = nLen;
rHyphInf.m_nWordStart = nWrdStart;
rHyphInf.m_nWordLen = nLen;
return true;
}
......
......@@ -1623,18 +1623,18 @@ void SwTextFrame::CollectAutoCmplWrds(SwTextNode & rNode, sal_Int32 nActPos)
SwInterHyphInfoTextFrame::SwInterHyphInfoTextFrame(
SwTextFrame const& rFrame, SwTextNode const& rNode,
SwInterHyphInfo const& rHyphInfo)
: nStart(rFrame.MapModelToView(&rNode, rHyphInfo.nStart))
, nEnd(rFrame.MapModelToView(&rNode, rHyphInfo.nEnd))
, nWordStart(0)
, nWordLen(0)
: m_nStart(rFrame.MapModelToView(&rNode, rHyphInfo.nStart))
, m_nEnd(rFrame.MapModelToView(&rNode, rHyphInfo.nEnd))
, m_nWordStart(0)
, m_nWordLen(0)
{
}
void SwInterHyphInfoTextFrame::UpdateTextNodeHyphInfo(SwTextFrame const& rFrame,
SwTextNode const& rNode, SwInterHyphInfo & o_rHyphInfo)
{
std::pair<SwTextNode const*, sal_Int32> const wordStart(rFrame.MapViewToModel(nWordStart));
std::pair<SwTextNode const*, sal_Int32> const wordEnd(rFrame.MapViewToModel(nWordStart+nWordLen));
std::pair<SwTextNode const*, sal_Int32> const wordStart(rFrame.MapViewToModel(m_nWordStart));
std::pair<SwTextNode const*, sal_Int32> const wordEnd(rFrame.MapViewToModel(m_nWordStart+m_nWordLen));
if (wordStart.first != &rNode || wordEnd.first != &rNode)
{ // not sure if this can happen since nStart/nEnd are in rNode
SAL_WARN("sw.core", "UpdateTextNodeHyphInfo: outside of node");
......@@ -1671,7 +1671,7 @@ bool SwTextNode::Hyphenate( SwInterHyphInfo &rHyphInf )
}
SwInterHyphInfoTextFrame aHyphInfo(*pFrame, *this, rHyphInf);
pFrame = &(pFrame->GetFrameAtOfst( aHyphInfo.nStart ));
pFrame = &(pFrame->GetFrameAtOfst( aHyphInfo.m_nStart ));
while( pFrame )
{
......@@ -1686,8 +1686,8 @@ bool SwTextNode::Hyphenate( SwInterHyphInfo &rHyphInf )
pFrame = pFrame->GetFollow();
if( pFrame )
{
aHyphInfo.nEnd = aHyphInfo.nEnd - (pFrame->GetOfst() - aHyphInfo.nStart);
aHyphInfo.nStart = pFrame->GetOfst();
aHyphInfo.m_nEnd = aHyphInfo.m_nEnd - (pFrame->GetOfst() - aHyphInfo.m_nStart);
aHyphInfo.m_nStart = pFrame->GetOfst();
}
}
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