summaryrefslogtreecommitdiff
path: root/xmloff/source
diff options
context:
space:
mode:
authorChristian Lippka <cl@openoffice.org>2000-11-08 11:19:53 +0000
committerChristian Lippka <cl@openoffice.org>2000-11-08 11:19:53 +0000
commit846ebe1a7e3bd122298f294f095fa3aacaa42b81 (patch)
treee73c3b0ea411f39e640415806482d24f27be3c03 /xmloff/source
parentf9c3a34c4f9bfcc0e7ad1481d5ff73e6fac01d8b (diff)
added page background fillings
Diffstat (limited to 'xmloff/source')
-rw-r--r--xmloff/source/draw/sdpropls.cxx23
-rw-r--r--xmloff/source/draw/ximpbody.cxx53
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 );
+ }
}
}
}