Issue 52830 - save failed after pasting multiselection of embedded object and drawing object into Calc
Summary: save failed after pasting multiselection of embedded object and drawing objec...
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: 680m122
Hardware: All All
: P2 Trivial (vote)
Target Milestone: ---
Assignee: wolframgarten
QA Contact: issues@sc
URL:
Keywords: needmoreinfo, oooqa
: 54558 (view as issue list)
Depends on:
Blocks: 54558
  Show dependency tree
 
Reported: 2005-08-03 14:22 UTC by Oliver-Rainer Wittmann
Modified: 2013-08-07 15:13 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Oliver-Rainer Wittmann 2005-08-03 14:22:46 UTC
- create new Draw document
- insert a chart object and a circle
- select both objects and copy them into the clipboard
- create new Calc document
- paste clipboard into the Calc document
- save of Calc document fails with message:
  Error saving the document ...:
  Writer Error
  The file could not be written

Please have a look as discussed.
Please inform SAB, if the defect has to be fixed in the Calc core.

Note: The same defect for Writer is issue i50824, which is already fixed in the
Writer core in cws swqbf35.
Comment 1 Rainer Bielefeld 2005-08-04 11:26:26 UTC
I can confirm that problem with 2.0 (1.9.m122) German version WIN XP:
[680m122(Build8941)]

@od: did you really test with all platforms and OS? :-/
Pls. specify!

Hint that might be useful: after first vainly attempt to save the file, I tried
a second time to save it with the same name as I had for the first attempt. I
got the message "file name does already exist", but the file does not esixt.
Comment 2 Oliver-Rainer Wittmann 2005-08-04 11:39:05 UTC
OD->rainerbielefeld:
Thank you for controlling my work ;-)

No, I didn't test all platforms and all OS.
But I've tested SRC680m122 on Windows XP and on Solaris. Thus, I had to set
fields <platform> and <OS> to value <All>
Comment 3 Rainer Bielefeld 2005-08-04 12:09:08 UTC
All right!

I have to correct my comments from rainerbielefeld Thu Aug 4 03:26:26: There
_is_ a 0 byte file on harddisk with the name I wanted to have for the saved calc
document; that file disappeared when I closed the calc document without saving.

I also saw that bug in with 
2.0 (1.9.m113) German version WIN XP: [680m113(Build8930)] 
and  
2.0 (1.9.m104) German version WIN 98: [680m104(Build8913)].

So, I will no longer prevent you all from bug fixing with my comments, 

Rainer
Comment 4 clippka 2005-08-04 13:14:11 UTC
Fixed,

there where at least two issues.

in sd, SdTransferable::GetData() was called and the call to
pSdViewIntern->GetAllMarkedModel() failed since the document of the
pSdViewIntern was different then the pSourceDocument of the SdTransferable. If
fixed this by getting the document from the pSdViewIntern for calling
CreatingDataObj to ensure this is the model where pSdViewIntern later calls
AllocModel()

in calc, ScViewFunc::PasteDataFormat() created a temporary FmFormModel for
importing the drawing layer objects from the clipboard xml. It uses
GetViewData()->GetDocShell() as the docshell for this model.
This caused the temporary FmFormModel to have the same persist as the drawing
layer model of the target calc application. When the temporary model was
deleted, the containing SdrOle2Object disposed its EmbeddedObj but didn't remove
it from the docshell. So after the paste finished there still was this disposed
EmbeddedObj in the target calc applications persist. That caused Sfx to not
export the document.

@cl->nn: I fixed this by creating a temporary ScDocShell for the temporary
model, please verify my changes in viewfun5.cxx
Comment 5 clippka 2005-08-04 13:16:13 UTC
@cl->rainerbielefeld, all comments are mostly welcome
Comment 6 mikhail.voytenko 2005-08-10 12:28:14 UTC
I have just commited a code for this issue into svx that removes the embedded
objects from container when a model is destroyed. As result the objects that are
copied to a temporary model with wrong persistance and then to an another target
model should not influence the storing process of either source or target
document any more.

This removing is not necessary when the model has correct persistance, but if an
object is set to a model with wrong persistance ( as in case of this issue )
this workaround allows user to store the document. There are also two new
assertions in the "SdrOle2Obj::SetModel()" method that shoud allow to detect
whether the target model has a suspicious persistance.
Comment 7 clippka 2005-08-16 16:01:54 UTC
verified in cws, back to qa

re-open issue and reassign to wg@openoffice.org
Comment 8 clippka 2005-08-16 16:02:09 UTC
reassign to wg@openoffice.org
Comment 9 clippka 2005-08-16 16:02:14 UTC
reset resolution to FIXED
Comment 10 wolframgarten 2005-08-18 09:46:40 UTC
Verified in CWS.
Comment 11 christian.guenther 2005-09-08 11:55:11 UTC
Verified in cws c03v2
Comment 12 wolframgarten 2005-09-19 13:17:52 UTC
*** Issue 54558 has been marked as a duplicate of this issue. ***
Comment 13 wolframgarten 2005-11-15 09:16:03 UTC
Tested in m139. Closed.