From d582621cacf10f4047a27a28e6e9aabaf91eb497 Mon Sep 17 00:00:00 2001 From: Debao Zhang Date: Wed, 15 Jan 2014 16:15:06 +0800 Subject: [PATCH] Deprecate the old insertImage member of QXlsx::Document We don't support offset / scale of image any more --- src/xlsx/xlsxdocument.cpp | 8 ++++++++ src/xlsx/xlsxdocument.h | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/xlsx/xlsxdocument.cpp b/src/xlsx/xlsxdocument.cpp index 69ab79e..3127801 100644 --- a/src/xlsx/xlsxdocument.cpp +++ b/src/xlsx/xlsxdocument.cpp @@ -388,6 +388,14 @@ QVariant Document::read(int row, int col) const return currentWorksheet()->read(row, col); } +/*! + * \brief Insert an \a image to current active worksheet at the position \a row, \a column + */ +bool Document::insertImage(int row, int column, const QImage &image) +{ + return currentWorksheet()->insertImage(row, column, image); +} + /*! * \brief Insert an \a image to current active worksheet to the position \a row, \a column with the given * \a xOffset, \a yOffset, \a xScale and \a yScale. diff --git a/src/xlsx/xlsxdocument.h b/src/xlsx/xlsxdocument.h index 9b95de9..f512616 100644 --- a/src/xlsx/xlsxdocument.h +++ b/src/xlsx/xlsxdocument.h @@ -58,7 +58,8 @@ public: int write(int row, int col, const QVariant &value, const Format &format=Format()); QVariant read(const QString &cell) const; QVariant read(int row, int col) const; - int insertImage(int row, int column, const QImage &image, double xOffset=0, double yOffset=0, double xScale=1, double yScale=1); + bool insertImage(int row, int col, const QImage &image); + Q_DECL_DEPRECATED int insertImage(int row, int column, const QImage &image, double xOffset, double yOffset, double xScale=1, double yScale=1); int mergeCells(const CellRange &range, const Format &format=Format()); int mergeCells(const QString &range, const Format &format=Format()); int unmergeCells(const CellRange &range);