[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Patch for KIllustrator and KWord (XIM)
From: Toshitaka Fujioka <toshitaka () kde ! gr ! jp>
Date: 2001-07-12 11:11:10
[Download RAW message or body]
Hello,
These patches can let XIM work in KIllustrator and KWord . XIM completely
work. ;)
I hope that this patch is adopted for every XIM user using KIllustrator and
KWord.
Please review.
Thank you.
--
Toshitaka Fujioka
http://www.kde.org The K Desktop Environment Project
fujioka@kde.org
http://www.kde.gr.jp Japan KDE User's Group
toshitaka@kde.gr.jp
-- We offer the best Desktop Environment to you. (This is my goal. ;-)) --
["koffice-killustrator-xim-20010712.diff" (text/x-diff)]
diff -ur koffice.orig/killustrator/Canvas.cc koffice/killustrator/Canvas.cc
--- koffice.orig/killustrator/Canvas.cc Thu Jul 12 01:22:19 2001
+++ koffice/killustrator/Canvas.cc Thu Jul 12 01:29:17 2001
@@ -904,4 +904,9 @@
}
}
+void Canvas::setXimPosition(int x, int y, int w, int h)
+{
+ QWidget::setMicroFocusHint(x, y, w, h);
+}
+
#include <Canvas.moc>
diff -ur koffice.orig/killustrator/Canvas.h koffice/killustrator/Canvas.h
--- koffice.orig/killustrator/Canvas.h Thu Jul 12 01:22:19 2001
+++ koffice/killustrator/Canvas.h Thu Jul 12 01:29:50 2001
@@ -94,6 +94,8 @@
void showBasePoints (bool flag = true);
void setOutlineMode (bool flag);
+ void setXimPosition(int x, int y, int w, int h);
+
protected:
QRect m_paperArea;
QRect m_visibleArea;
diff -ur koffice.orig/killustrator/GText.cc koffice/killustrator/GText.cc
--- koffice.orig/killustrator/GText.cc Thu Jul 12 01:22:21 2001
+++ koffice/killustrator/GText.cc Thu Jul 12 01:30:34 2001
@@ -183,6 +183,10 @@
p.setPen (black);
p.drawLine (qRound (x1), qRound (y1), qRound (x1), qRound (y2));
+
+ QPoint pos = p.pos();
+ global_posX = pos.x();
+ global_posY = pos.y();
}
}
diff -ur koffice.orig/killustrator/GText.h koffice/killustrator/GText.h
--- koffice.orig/killustrator/GText.h Thu Jul 12 01:22:21 2001
+++ koffice/killustrator/GText.h Thu Jul 12 01:31:06 2001
@@ -99,6 +99,8 @@
bool isEmpty () const;
+ int global_posX, global_posY;
+
public slots:
void updateMatricesForPath ();
void deletePathObject ();
diff -ur koffice.orig/killustrator/TextTool.cc koffice/killustrator/TextTool.cc
--- koffice.orig/killustrator/TextTool.cc Thu Jul 12 01:22:21 2001
+++ koffice/killustrator/TextTool.cc Thu Jul 12 01:32:02 2001
@@ -101,6 +101,9 @@
text->showCursor (true);
doc->activePage()->insertObject (text);
}
+
+ // XIM position
+ canvas->setXimPosition( text->global_posX, text->global_posY, 0, 0 );
}
else if (e->type () == QEvent::KeyPress) {
QKeyEvent *ke = (QKeyEvent *) e;
@@ -178,6 +181,9 @@
if(changed) {
text->setCursor (x, y);
}
+
+ // XIM position
+ canvas->setXimPosition( text->global_posX, text->global_posY, 0, 0 );
}
return;
}
["koffice-kword-xim-20010712.diff" (text/x-diff)]
diff -ur koffice.orig/kword/kwtextframeset.cc koffice/kword/kwtextframeset.cc
--- koffice.orig/kword/kwtextframeset.cc Thu Jul 12 01:22:40 2001
+++ koffice/kword/kwtextframeset.cc Thu Jul 12 20:00:08 2001
@@ -454,6 +454,9 @@
pix, cg, cursorVisible, cursor );
p->restore();
cursor->parag()->setChanged( wasChanged ); // Maybe we have more changes to draw!
+
+ //XIM Position
+ canvas->gui()->setXimPosition( cPoint.x()+30, cPoint.y()+20, 0, h );
}
}
m_currentDrawnCanvas = 0L;
diff -ur koffice.orig/kword/kwview.cc koffice/kword/kwview.cc
--- koffice.orig/kword/kwview.cc Thu Jul 12 01:22:40 2001
+++ koffice/kword/kwview.cc Thu Jul 12 20:00:40 2001
@@ -3402,4 +3402,9 @@
view->kWordDocument()->setUnit( KWUnit::unit( u ) );
}
+void KWGUI::setXimPosition( int x, int y, int width, int heigth )
+{
+ QWidget::setMicroFocusHint( x, y, width, heigth );
+}
+
#include "kwview.moc"
diff -ur koffice.orig/kword/kwview.h koffice/kword/kwview.h
--- koffice.orig/kword/kwview.h Thu Jul 12 01:22:40 2001
+++ koffice/kword/kwview.h Thu Jul 12 20:01:12 2001
@@ -469,6 +469,8 @@
KoTabChooser *getTabChooser() { return tabChooser; }
KWDocStruct *getDocStruct() { return docStruct; }
+ void setXimPosition( int x, int y, int width, int heigth );
+
public slots:
void reorganize();
_______________________________________________
Koffice-devel mailing list
Koffice-devel@master.kde.org
http://master.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic