diff options
author | Oliver Bolte <obo@openoffice.org> | 2005-07-08 09:58:33 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2005-07-08 09:58:33 +0000 |
commit | 662443eec99d58d291a211ee37a98c76712c24c6 (patch) | |
tree | 8827472b8b88c1657ec8de960812c1dab6f8bac4 /xmloff | |
parent | 08b5b7977379e32235b5691f8858648e6adf5a64 (diff) |
INTEGRATION: CWS swqbf34 (1.14.62); FILE MERGED
2005/06/30 09:04:59 fme 1.14.62.2: RESYNC: (1.14-1.15); FILE MERGED
2005/06/29 08:50:28 od 1.14.62.1: #i50322# - no conversion of background graphic transparency value for
document styles, because by defect former OpenOffice.org
versions write always 100% and interpret it as 0%.
Thus, attribute has only be renamed to opacity for document styles.
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/transform/TransformerBase.cxx | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx index 1c7aa079f731..b2e48fd8959c 100644 --- a/xmloff/source/transform/TransformerBase.cxx +++ b/xmloff/source/transform/TransformerBase.cxx @@ -2,9 +2,9 @@ * * $RCSfile: TransformerBase.cxx,v $ * - * $Revision: 1.15 $ + * $Revision: 1.16 $ * - * last change: $Author: kz $ $Date: 2005-06-28 15:25:46 $ + * last change: $Author: obo $ $Date: 2005-07-08 10:58:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -107,9 +107,11 @@ #ifndef _XMLOFF_ELEMTRANSFORMERACTION_HXX #include "ElemTransformerAction.hxx" #endif -#ifndef _XMLOFF_ATTRTRANSFORMERACTION_HXX -#include "AttrTransformerAction.hxx" +// --> OD 2005-06-29 #i50322# +#ifndef _XMLOFF_PROPERTYACTIONSOOO_HXX +#include "PropertyActionsOOo.hxx" #endif +// <-- #ifndef _XMLOFF_TRANSFORMERTOKENMAP_HXX #include "TransformerTokenMap.hxx" #endif @@ -934,6 +936,33 @@ XMLMutableAttributeList *XMLTransformerBase::ProcessAttrList( pMutableAttrList->SetValueByIndex( i, aBuffer.makeStringAndClear() ); } break; + // --> OD 2005-06-10 #i50322# - special handling for the + // transparency of writer background graphics. + case XML_ATACTION_WRITER_BACK_GRAPHIC_TRANSPARENCY: + { + // determine, if it's the transparency of a document style + XMLTransformerContext* pFirstContext = (*m_pContexts)[0].get(); + OUString aFirstContextLocalName; + sal_uInt16 nFirstContextPrefix = + GetNamespaceMap().GetKeyByAttrName( pFirstContext->GetQName(), + &aFirstContextLocalName ); + bool bIsDocumentStyle( + ::xmloff::token::IsXMLToken( aFirstContextLocalName, + XML_DOCUMENT_STYLES ) ); + // no conversion of transparency value for document + // styles, because former OpenOffice.org version writes + // writes always a transparency value of 100% and doesn't + // read the value. Thus, it's intepreted as 0% + if ( !bIsDocumentStyle ) + { + OUString aAttrValue( rAttrValue ); + NegPercent(aAttrValue); + pMutableAttrList->SetValueByIndex( i, aAttrValue ); + } + bRename = sal_True; + } + break; + // <-- default: OSL_ENSURE( !this, "unknown action" ); break; |