summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMuthu Subramanian <sumuthu@collabora.com>2013-10-18 19:02:58 +0530
committerMuthu Subramanian <sumuthu@collabora.com>2013-10-18 19:02:58 +0530
commit6fc72c01366dc48f3e9f3233d85d3eccbe5247f3 (patch)
tree06f2159148c48135a373935f71741fb404d00a9c /include
parent50cfd6763d30566e7606bea3b30259e9fe03b670 (diff)
n#820077: Import images with duotone filter.
(Modified cherry-pick from: 8b716072410bcfd252739fb953d5ac198e27a895)
Diffstat (limited to 'include')
-rw-r--r--include/oox/drawingml/fillproperties.hxx1
-rw-r--r--include/oox/drawingml/fillpropertiesgroupcontext.hxx24
-rw-r--r--include/vcl/bitmap.hxx2
3 files changed, 27 insertions, 0 deletions
diff --git a/include/oox/drawingml/fillproperties.hxx b/include/oox/drawingml/fillproperties.hxx
index fb9aa849e92e..4a54fa327546 100644
--- a/include/oox/drawingml/fillproperties.hxx
+++ b/include/oox/drawingml/fillproperties.hxx
@@ -93,6 +93,7 @@ struct BlipFillProperties
OptValue< sal_Int32 > moContrast; /// Contrast in the range [-100000,100000].
Color maColorChangeFrom; /// Start color of color transformation.
Color maColorChangeTo; /// Destination color of color transformation.
+ Color maDuotoneColors[2]; /// Duotone Colors
/** Overwrites all members that are explicitly set in rSourceProps. */
void assignUsed( const BlipFillProperties& rSourceProps );
diff --git a/include/oox/drawingml/fillpropertiesgroupcontext.hxx b/include/oox/drawingml/fillpropertiesgroupcontext.hxx
index 81d8a6e0db20..2b6ab859a6cf 100644
--- a/include/oox/drawingml/fillpropertiesgroupcontext.hxx
+++ b/include/oox/drawingml/fillpropertiesgroupcontext.hxx
@@ -81,6 +81,30 @@ private:
};
// ============================================================================
+
+/** Context handler that imports the a:duotone element containing the colors
+ of a bitmap duotone transformation. */
+class DuotoneContext : public ::oox::core::ContextHandler
+{
+public:
+ explicit DuotoneContext(
+ ::oox::core::ContextHandler& rParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs,
+ BlipFillProperties& rBlipProps );
+ virtual ~DuotoneContext();
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL
+ createFastChildContext(
+ sal_Int32 nElement,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs )
+ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+
+private:
+ BlipFillProperties& mrBlipProps;
+ int mnColorIndex;
+};
+
+
// ============================================================================
/** Context handler that imports the a:clrChange element containing the colors
diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx
index b6c00c2aa58b..d555d04e0c1c 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -119,6 +119,7 @@ enum BmpFilter
BMP_FILTER_SEPIA = 6,
BMP_FILTER_MOSAIC = 7,
BMP_FILTER_POPART = 8,
+ BMP_FILTER_DUOTONE = 9,
BMP_FILTER_UNKNOWN = 65535
};
@@ -376,6 +377,7 @@ public:
SAL_DLLPRIVATE bool ImplSeparableBlurFilter( const double aRadius = 0.7 );
SAL_DLLPRIVATE bool ImplSeparableUnsharpenFilter( const double aRadius = 0.7 );
+ SAL_DLLPRIVATE bool ImplDuotoneFilter( const sal_uLong nColorOne, sal_uLong nColorTwo );
SAL_DLLPRIVATE void ImplBlurContributions( const int aSize, const int aNumberOfContributions,
double* pBlurVector, double*& pWeights, int*& pPixels, int*& pCount );
public: