Kaydet (Commit) ea280cef authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Added code to handle paste functions and skip empties.

üst 463b1b56
......@@ -1792,6 +1792,21 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
}
}
std::auto_ptr<ScDocument> pMixDoc;
if (bSkipEmpty || nFunction)
{
if (nFlags & IDF_CONTENTS)
{
pMixDoc.reset(new ScDocument(SCDOCMODE_UNDO));
pMixDoc->InitUndoSelected(pDoc, aMark, false, false);
for (size_t i = 0, n = aRanges.size(); i < n; ++i)
{
pDoc->CopyToDocument(
*aRanges[i], IDF_CONTENTS, false, pMixDoc.get(), &aMark, true);
}
}
}
if (nFlags & IDF_OBJECTS)
pDocSh->MakeDrawLayer();
if (pDoc->IsUndoEnabled())
......@@ -1807,6 +1822,12 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
false, false, true, bSkipEmpty, NULL);
}
if (pMixDoc.get())
{
for (size_t i = 0, n = aRanges.size(); i < n; ++i)
pDoc->MixDocument(*aRanges[i], nFunction, bSkipEmpty, pMixDoc.get());
}
AdjustBlockHeight(); // update row heights before pasting objects
// Then paste the objects.
......
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