Issue 67064 - OO crashes when a document with header is loaded and printer is set in basic/c++ in 2.0.3
Summary: OO crashes when a document with header is loaded and printer is set in basic/...
Status: CLOSED DUPLICATE of issue 64991
Alias: None
Product: Writer
Classification: Application
Component: programming (show other issues)
Version: OOo 2.0.3
Hardware: All All
: P2 Trivial (vote)
Target Milestone: ---
Assignee: michael.ruess
QA Contact: issues@sw
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-06 09:26 UTC by martho
Modified: 2013-08-07 14:43 UTC (History)
1 user (show)

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


Attachments
A simple, new generated writers-document with header that crashes when executing the code. (7.94 KB, application/vnd.oasis.opendocument.text)
2006-07-06 09:27 UTC, martho
no flags Details
A simple, new generated writers-document without header. With that the code works fine. (7.84 KB, application/vnd.oasis.opendocument.text)
2006-07-06 09:28 UTC, martho
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description martho 2006-07-06 09:26:39 UTC
Hello!

I do the following code, once on a document WITH Header and once WITHOUT header.
The code does:
- load a document
- gets a printer
- sets the printer again without changing it
- saving the document

When doing this with a document without header, it works.
When doing this with a document with header, OO crashes!
It does not crash when NOT setting the printer.
It does not crash when NOT saving the document.
The document crashes as well when transfering the code to c++. 
This all worked perfectly in 2.0.2.

oDesktop = createUnoService( "com.sun.star.frame.Desktop" )
Dim mArgs(0) As New com.sun.star.beans.PropertyValue
oDoc = oDesktop.loadComponentFromURL("file:///e:/temp/test_with_header.odt",
"_blank", 0, mArgs())
pvPrinter = oDoc.getPrinter()
oDoc.setPrinter(pvPrinter)

Dim mArgs2(1) As New com.sun.star.beans.PropertyValue
mArgs2(0).Name = "Overwrite"
mArgs2(0).Value = true
oDoc.storeAsURL("file:///e:/temp/test.odt", mArgs2)
Comment 1 martho 2006-07-06 09:27:38 UTC
Created attachment 37537 [details]
A simple, new generated writers-document with header that crashes when executing the code.
Comment 2 martho 2006-07-06 09:28:20 UTC
Created attachment 37538 [details]
A simple, new generated writers-document without header. With that the code works fine.
Comment 3 Oliver Specht 2006-07-06 10:05:22 UTC
Prio changed to P2

Stack: 

sw680mi.dll!SwXHeadFootText::createEnumeration()  Line 1792
xo680mi.dll!XMLTextParagraphExport::exportText(const
com::sun::star::uno::Reference<com::sun::star::text::XText> & rText={...},
unsigned char bAutoStyles='', unsigned char bIsProgress='', unsigned char
bExportParagraph='')  Line 1354
xo680mi.dll!XMLTextMasterPageExport::exportHeaderFooterContent(const
com::sun::star::uno::Reference<com::sun::star::text::XText> & rText={...},
unsigned char bAutoStyles='À', unsigned char bExportParagraph='')  Line 105
xo680mi.dll!XMLTextMasterPageExport::exportMasterPageContent(const
com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> &
rPropSet={...}, unsigned char bAutoStyles='')  Line 138
xo680mi.dll!XMLPageExport::exportStyle(const
com::sun::star::uno::Reference<com::sun::star::style::XStyle> & rStyle={...},
unsigned char bAutoStyles='Ø')  Line 167	
xo680mi.dll!XMLPageExport::exportStyles(unsigned char bUsed=0x00, unsigned
char bAutoStyles='')  Line 269	
sw680mi.dll!SwXMLExport::_ExportAutoStyles()  Line 281
Comment 4 Oliver Specht 2006-07-06 10:19:26 UTC
->AMA: The format of the header doesn't have a valid SwFmtCntnt. 
Didn't we have something similar already?
Comment 5 andreas.martens 2006-08-14 10:31:41 UTC
This bug has been fixed with issue 64991
The problem occurs because of unwanted manipulation of page styles which has
been eliminated in CWS mba204crashfixes, integrated into src680m180.

*** This issue has been marked as a duplicate of 64991 ***
Comment 6 andreas.martens 2006-08-14 10:34:15 UTC
Please double-check my assumption.
Comment 7 michael.ruess 2006-08-14 14:58:59 UTC
Confirm, this does not crash anymore with OO 2.0.4-DEV build 680m181. #closing
duplicate.