[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/plugins/pictureshape
From:       Carlos Licea <carlos_licea () hotmail ! com>
Date:       2010-05-05 4:43:00
Message-ID: 20100505044300.C161EAC8B0 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1122939 by clicea:

Add stub of the loading of the color transformations from odf.

 M  +28 -0     PictureShape.cpp  
 M  +1 -0      PictureShape.h  


--- trunk/koffice/plugins/pictureshape/PictureShape.cpp #1122938:1122939
@@ -234,6 +234,34 @@
     return m_imageCollection;
 }
 
+bool PictureShape::loadOdfColorTransformations(const KoXmlElement& element, \
KoShapeLoadingContext& context) +{
+//     KoStyleStack &styleStack = context.odfLoadingContext().styleStack();
+//     styleStack.save();
+//     context.odfLoadingContext().fillStyleStack(element, KoXmlNS::draw, \
"style-name", "graphic"); +//     styleStack.setTypeProperties("graphic");
+// 
+//     //FIXME: are there other applicable properties?
+//     if( styleStack.hasProperty(KoXmlNS::draw, "color-mode") ) {
+//         QString colorMode = styleStack.property(KoXmlNS::draw, "color-mode");
+//         KoFilterEffect* colorModeEffect = 0;
+//         if( colorMode == "greyscale" ) {
+//             ColorMatrixEffect* colorMatrixEfect = new ColorMatrixEffect();
+//             colorMatrixEfect->setSaturate(0);
+//             colorModeEffect = colorMatrixEfect;
+//         }
+//         else if( colorMode == "mono" )
+//             ;
+//         else if( colorMode == "watermark" )
+//             ;
+//         if( colorModeEffect );
+//             filterEffectStack()->appendFilterEffect(colorModeEffect);
+//     }
+//
+//     styleStack.restore();
+    return true;
+}
+
 PictureShape::PictureMode PictureShape::mode() const
 {
     return m_mode;
--- trunk/koffice/plugins/pictureshape/PictureShape.h #1122938:1122939
@@ -65,6 +65,7 @@
     virtual bool loadOdfFrameElement(const KoXmlElement &element, \
KoShapeLoadingContext &context);  
 private:
+    bool loadOdfColorTransformations(const KoXmlElement& element, \
KoShapeLoadingContext& context);  
     KoImageCollection *m_imageCollection;
     RenderQueue *m_renderQueue;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic