diff options
-rw-r--r-- | xmloff/source/draw/sdpropls.cxx | 23 | ||||
-rw-r--r-- | xmloff/source/draw/ximpbody.cxx | 53 |
2 files changed, 64 insertions, 12 deletions
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx index 37aadd830b0f..23363f4122e7 100644 --- a/xmloff/source/draw/sdpropls.cxx +++ b/xmloff/source/draw/sdpropls.cxx @@ -2,9 +2,9 @@ * * $RCSfile: sdpropls.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: pw $ $Date: 2000-10-26 14:31:15 $ + * last change: $Author: cl $ $Date: 2000-11-08 12:17:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -164,12 +164,12 @@ const XMLPropertyMapEntry aXMLSDProperties[] = // graphic attributes { "GraphicColorMode", XML_NAMESPACE_DRAW, sXML_color_mode, XML_SD_TYPE_COLORMODE, 0 }, - { "AdjustLuminance", XML_NAMESPACE_DRAW, sXML_luminance, XML_TYPE_PERCENT, 0 }, // signed? - { "AdjustContrast", XML_NAMESPACE_DRAW, sXML_contrast, XML_TYPE_PERCENT, 0 }, // signed? + { "AdjustLuminance", XML_NAMESPACE_DRAW, sXML_luminance, XML_TYPE_PERCENT16, 0 }, // signed? + { "AdjustContrast", XML_NAMESPACE_DRAW, sXML_contrast, XML_TYPE_PERCENT16, 0 }, // signed? { "Gamma", XML_NAMESPACE_DRAW, sXML_gamma, XML_TYPE_DOUBLE, 0 }, // signed? - { "AdjustRed", XML_NAMESPACE_DRAW, sXML_red, XML_TYPE_PERCENT, 0 }, // signed? - { "AdjustGreen", XML_NAMESPACE_DRAW, sXML_green, XML_TYPE_PERCENT, 0 }, // signed? - { "AdjustBlue", XML_NAMESPACE_DRAW, sXML_blue, XML_TYPE_PERCENT, 0 }, // signed? + { "AdjustRed", XML_NAMESPACE_DRAW, sXML_red, XML_TYPE_PERCENT16, 0 }, // signed? + { "AdjustGreen", XML_NAMESPACE_DRAW, sXML_green, XML_TYPE_PERCENT16, 0 }, // signed? + { "AdjustBlue", XML_NAMESPACE_DRAW, sXML_blue, XML_TYPE_PERCENT16, 0 }, // signed? // animation text attributes @@ -232,6 +232,15 @@ const XMLPropertyMapEntry aXMLSDPresPageProps[] = // still missing: // { "", XML_NAMESPACE_PRESENTATION, "visibility", XML_SD_TYPE_PRESPAGE_VISIBILITY, 0 }, // { "", XML_NAMESPACE_PRESENTATION, "sound", XML_SD_TYPE_PRESPAGE_SOUND, 0 }, + + { "FillStyle", XML_NAMESPACE_DRAW, sXML_fill, XML_SD_TYPE_FILLSTYLE, 0 }, + { "FillColor", XML_NAMESPACE_DRAW, sXML_fill_color, XML_TYPE_COLOR, 0 }, + { "FillGradientName", XML_NAMESPACE_DRAW, sXML_fill_gradient_name, XML_TYPE_STRING, 0 }, + { "FillGradientStepCount", XML_NAMESPACE_DRAW, sXML_gradient_step_count, XML_TYPE_NUMBER, 0 }, + { "FillHatchName", XML_NAMESPACE_DRAW, sXML_fill_hatch_name, XML_TYPE_STRING, 0 }, + { "FillBitmapName", XML_NAMESPACE_DRAW, sXML_fill_image_name, XML_TYPE_STRING, 0 }, + { "FillTransparenceName", XML_NAMESPACE_DRAW, sXML_transparency_name, XML_TYPE_STRING, 0 }, + { 0L } }; diff --git a/xmloff/source/draw/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx index 2e0381779ad5..012fb85d2a9a 100644 --- a/xmloff/source/draw/ximpbody.cxx +++ b/xmloff/source/draw/ximpbody.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ximpbody.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:07:03 $ + * last change: $Author: cl $ $Date: 2000-11-08 12:19:53 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -105,6 +105,10 @@ #include "families.hxx" #endif +#ifndef _XMLOFF_PROPERTYSETMERGER_HXX_ +#include "PropertySetMerger.hxx" +#endif + using namespace ::rtl; using namespace ::com::sun::star; @@ -179,10 +183,49 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport, if(pStyle && pStyle->ISA(XMLPropStyleContext)) { XMLPropStyleContext* pPropStyle = (XMLPropStyleContext*)pStyle; - uno::Reference <beans::XPropertySet> xPropSet(rShapes, uno::UNO_QUERY); - if(xPropSet.is()) + + + uno::Reference <beans::XPropertySet> xPropSet1(rShapes, uno::UNO_QUERY); + if(xPropSet1.is()) { - pPropStyle->FillPropertySet(xPropSet); + // since the background items are in a different propertyset + // which itself is a property of the pages property set + // we now merge these two propertysets if possible to simulate + // a single propertyset with all draw page properties + const OUString aBackground(RTL_CONSTASCII_USTRINGPARAM("Background")); + uno::Reference< beans::XPropertySet > xPropSet2; + uno::Reference< beans::XPropertySetInfo > xInfo( xPropSet1->getPropertySetInfo() ); + if( xInfo.is() && xInfo->hasPropertyByName( aBackground ) ) + { + uno::Reference< lang::XMultiServiceFactory > xServiceFact(GetSdImport().GetModel(), uno::UNO_QUERY); + if(xServiceFact.is()) + { + uno::Reference< beans::XPropertySet > xTempSet( + xServiceFact->createInstance( + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.Background"))), + uno::UNO_QUERY); + + xPropSet2 = xTempSet; + } + } + + uno::Reference< beans::XPropertySet > xPropSet; + if( xPropSet2.is() ) + xPropSet = PropertySetMerger_CreateInstance( xPropSet1, xPropSet2 ); + else + xPropSet = xPropSet1; + + if(xPropSet.is()) + { + pPropStyle->FillPropertySet(xPropSet); + } + + if( xPropSet2.is() ) + { + uno::Any aAny; + aAny <<= xPropSet2; + xPropSet1->setPropertyValue( aBackground, aAny ); + } } } } |