Kaydet (Commit) fc63faa8 authored tarafından Daniel Vogelheim's avatar Daniel Vogelheim

#99657# fixed assertion when loading/saving background images

üst 53e2ecf6
......@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTextPropertySetContext.cxx,v $
*
* $Revision: 1.7 $
* $Revision: 1.8 $
*
* last change: $Author: dvo $ $Date: 2002-08-29 17:47:22 $
* last change: $Author: dvo $ $Date: 2002-09-09 17:12:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -152,24 +152,33 @@ SvXMLImportContext *XMLTextPropertySetContext::CreateChildContext(
break;
case CTF_BACKGROUND_URL:
{
DBG_ASSERT( rProp.mnIndex >= 2 &&
CTF_BACKGROUND_TRANSPARENCY ==
xMapper->getPropertySetMapper()
->GetEntryContextId( rProp.mnIndex-3 ) &&
CTF_BACKGROUND_POS == xMapper->getPropertySetMapper()
->GetEntryContextId( rProp.mnIndex-2 ) &&
CTF_BACKGROUND_FILTER == xMapper->getPropertySetMapper()
->GetEntryContextId( rProp.mnIndex-1 ),
"invalid property map!");
// #99657# Transparency might be there as well... but doesn't have
// to. Thus, this is checked with an if, rather than with an assertion.
sal_Int32 nTranspIndex = -1;
if( (rProp.mnIndex >= 3) &&
( CTF_BACKGROUND_TRANSPARENCY ==
xMapper->getPropertySetMapper()->GetEntryContextId(
rProp.mnIndex-3 ) ) )
nTranspIndex = rProp.mnIndex-3;
pContext =
new XMLBackgroundImageContext( GetImport(), nPrefix,
rLocalName, xAttrList,
rProp,
rProp.mnIndex-2,
rProp.mnIndex-1,
rProp.mnIndex-3,
nTranspIndex,
rProperties );
break;
}
break;
#ifndef SVX_LIGHT
case CTF_SECTION_FOOTNOTE_END:
pContext = new XMLSectionFootnoteConfigImport(
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: txtexppr.cxx,v $
*
* $Revision: 1.19 $
* $Revision: 1.20 $
*
* last change: $Author: dvo $ $Date: 2002-08-29 17:47:22 $
* last change: $Author: dvo $ $Date: 2002-09-09 17:12:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -141,11 +141,10 @@ void XMLTextExportPropertySetMapper::handleElementItem(
if( pProperties && nIdx >= 3 )
{
const XMLPropertyState& rTrans = (*pProperties)[nIdx-3];
DBG_ASSERT( CTF_BACKGROUND_TRANSPARENCY == getPropertySetMapper()
->GetEntryContextId( rTrans.mnIndex ),
"invalid property map: pos expected" );
// #99657# transparency may be there, but doesn't have to be.
// If it's there, it must be in the right position.
if( CTF_BACKGROUND_TRANSPARENCY == getPropertySetMapper()
->GetEntryContextId( rTrans.mnIndex ) )
->GetEntryContextId( rTrans.mnIndex ) )
pTrans = &rTrans.maValue;
const XMLPropertyState& rPos = (*pProperties)[nIdx-2];
......
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