Kaydet (Commit) 967b6230 authored tarafından Caolán McNamara's avatar Caolán McNamara

unusual negative start point on split node undo

Change-Id: I787371e95d9787616ca713c808098b80e40acab0
üst c96802f0
......@@ -74,9 +74,18 @@ String * SwUndoInsert::GetTxtFromDoc() const
if( pCNd->IsTxtNode() )
{
pResult = new String(
static_cast<SwTxtNode*>(pCNd)->GetTxt().copy(nCntnt-nLen, nLen));
OUString sTxt = static_cast<SwTxtNode*>(pCNd)->GetTxt();
sal_Int32 nStart = nCntnt-nLen;
sal_Int32 nLength = nLen;
if (nStart < 0)
{
nLength += nStart;
nStart = 0;
}
pResult = new String(sTxt.copy(nStart, nLength));
}
return pResult;
......
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