[gnumeric] Add paste special flip horizontally and vertically (for content)
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnumeric] Add paste special flip horizontally and vertically (for content)
- Date: Sat, 19 Dec 2009 07:27:17 +0000 (UTC)
commit 6570e50e6cdc5eaa9b6ef9b5785b4e972a0861db
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date: Sat Dec 19 00:26:48 2009 -0700
Add paste special flip horizontally and vertically (for content)
2009-12-19 Andreas J. Guelzow <aguelzow pyrshep ca>
* src/clipboard.h: add PASTE_FLIP_H and PASTE_FLIP_V
* src/clipboard.c (cb_paste_cell): handle PASTE_FLIP_H and
PASTE_FLIP_V
2009-12-19 Andreas J. Guelzow <aguelzow pyrshep ca>
* paste-special.glade: eanble flip h and v
* dialog-paste-special.c: handle flip h and v
ChangeLog | 6 ++++++
NEWS | 3 +++
src/clipboard.c | 6 ++++++
src/clipboard.h | 6 +++++-
src/dialogs/ChangeLog | 5 +++++
src/dialogs/dialog-paste-special.c | 4 ++++
src/dialogs/paste-special.glade | 6 +++---
7 files changed, 32 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7e8e490..2dfbbcb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-12-19 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * src/clipboard.h: add PASTE_FLIP_H and PASTE_FLIP_V
+ * src/clipboard.c (cb_paste_cell): handle PASTE_FLIP_H and
+ PASTE_FLIP_V
+
2009-12-15 Morten Welinder <terra gnome org>
* configure.in: Post-release bump.
diff --git a/NEWS b/NEWS
index dfa7fb8..a241bbc 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
Gnumeric 1.9.18
+Andreas:
+ * Add paste special flip horizontally and vertically (for content)
+
--------------------------------------------------------------------------
Gnumeric 1.9.17
diff --git a/src/clipboard.c b/src/clipboard.c
index db889ce..18a83da 100644
--- a/src/clipboard.c
+++ b/src/clipboard.c
@@ -305,6 +305,12 @@ cb_paste_cell (GnmCellCopy const *src, gconstpointer ignore,
if (dat->pt->paste_flags & PASTE_TRANSPOSE) {
target_col += src->offset.row;
target_row += src->offset.col;
+ } else if (dat->pt->paste_flags & PASTE_FLIP_H) {
+ target_col += dat->cr->cols - src->offset.col - 1;
+ target_row += src->offset.row;
+ } else if (dat->pt->paste_flags & PASTE_FLIP_V) {
+ target_col += src->offset.col;
+ target_row += dat->cr->rows - src->offset.row - 1;
} else {
target_col += src->offset.col;
target_row += src->offset.row;
diff --git a/src/clipboard.h b/src/clipboard.h
index eec9ae3..00954da 100644
--- a/src/clipboard.h
+++ b/src/clipboard.h
@@ -41,7 +41,11 @@ enum {
PASTE_EXPR_LOCAL_RELOCATE = 1 << 15,
/* Avoid flagging dependencies. */
- PASTE_NO_RECALC = 1 << 16
+ PASTE_NO_RECALC = 1 << 16,
+
+ /* Whether the paste flips or not */
+ PASTE_FLIP_H = 1 << 17,
+ PASTE_FLIP_V = 1 << 18
};
#define PASTE_ALL_TYPES (PASTE_CONTENTS | PASTE_FORMATS | PASTE_COMMENTS | PASTE_OBJECTS)
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index 07c5dce..74e19bb 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-19 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * paste-special.glade: eanble flip h and v
+ * dialog-paste-special.c: handle flip h and v
+
2009-12-17 Andreas J. Guelzow <aguelzow pyrshep ca>
* Makefile.am: add paste-special.glade
diff --git a/src/dialogs/dialog-paste-special.c b/src/dialogs/dialog-paste-special.c
index bc5aade..8c033d4 100644
--- a/src/dialogs/dialog-paste-special.c
+++ b/src/dialogs/dialog-paste-special.c
@@ -72,6 +72,8 @@ static struct {
static char const * const region_operation_group[] = {
"region-operation-none",
"region-operation-transpose",
+ "region-operation-flip-h",
+ "region-operation-flip-v",
NULL
};
static struct {
@@ -79,6 +81,8 @@ static struct {
} region_operation_props[] = {
{0},
{PASTE_TRANSPOSE},
+ {PASTE_FLIP_H},
+ {PASTE_FLIP_V},
};
typedef struct {
diff --git a/src/dialogs/paste-special.glade b/src/dialogs/paste-special.glade
index ba1d2cf..077ee30 100644
--- a/src/dialogs/paste-special.glade
+++ b/src/dialogs/paste-special.glade
@@ -161,7 +161,7 @@
<widget class="GtkRadioButton" id="region-operation-flip-h">
<property name="label" translatable="yes">Flip Hori_zontally</property>
<property name="visible">True</property>
- <property name="sensitive">False</property>
+ <property name="sensitive">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
@@ -173,10 +173,10 @@
</packing>
</child>
<child>
- <widget class="GtkRadioButton" id="region-operation-transpose2">
+ <widget class="GtkRadioButton" id="region-operation-flip-v">
<property name="label" translatable="yes">Fli_p Vertically</property>
<property name="visible">True</property>
- <property name="sensitive">False</property>
+ <property name="sensitive">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]