47870: Don't copy if selection is collapsed. r=law

git-svn-id: svn://10.0.0.236/trunk@77379 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
akkana%netscape.com
2000-08-28 22:28:56 +00:00
parent 6eb3399d07
commit bc616db59e
2 changed files with 14 additions and 4 deletions

View File

@@ -369,7 +369,6 @@ StackArena::Push()
StackMark* oldMarks = mMarks;
PRUint32 oldLength = mMarkLength;
mMarkLength += MARK_INCREMENT;
void* marks = 0;
mMarks = new StackMark[mMarkLength];
nsCRT::memcpy(mMarks, oldMarks, sizeof(StackMark)*oldLength);
@@ -1899,7 +1898,7 @@ PresShell::ResizeReflow(nscoord aWidth, nscoord aHeight)
if (GetVerifyReflowEnable() && (VERIFY_REFLOW_DURING_RESIZE_REFLOW & gVerifyReflowFlags))
{
mInVerifyReflow = PR_TRUE;
PRBool ok = VerifyIncrementalReflow();
/*PRBool ok = */VerifyIncrementalReflow();
mInVerifyReflow = PR_FALSE;
}
#endif
@@ -2905,6 +2904,12 @@ PresShell::DoCopy()
if (NS_FAILED(rv) || !sel)
return rv?rv:NS_ERROR_FAILURE;
// Now we have the selection. Make sure it's nonzero:
PRBool isCollapsed;
sel->GetIsCollapsed(&isCollapsed);
if (isCollapsed)
return NS_OK;
doc->CreateXIF(buffer,sel);
// Get the Clipboard