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

List:       kde-commits
Subject:    KOFFICE_1_3_BRANCH: koffice/lib/kotext
From:       David Faure <faure () kde ! org>
Date:       2004-06-26 13:40:30
Message-ID: 20040626134030.03D31995B () office ! kde ! org
[Download RAW message or body]

CVS commit by faure: 

Provide a way to insert a paragraph via DCOP; insertText is pretty useless otherwise.


  M +5 -0      KoTextViewIface.cc   1.43.2.1
  M +1 -0      KoTextViewIface.h   1.34.2.1
  M +5 -0      kotextview.cc   1.117.2.1
  M +1 -0      kotextview.h   1.67.2.1


--- koffice/lib/kotext/KoTextViewIface.cc  #1.43:1.43.2.1
@@ -44,4 +44,9 @@ void KoTextViewIface::insertText( const 
 }
 
+void KoTextViewIface::newParagraph()
+{
+    m_textView->newParagraph();
+}
+
 
 void KoTextViewIface::setBold(bool b)

--- koffice/lib/kotext/KoTextViewIface.h  #1.34:1.34.2.1
@@ -39,4 +39,5 @@ k_dcop:
     void insertNonbreakingSpace();
     void insertText( const QString &text );
+    void newParagraph();
     void setBold(bool b);
     void setItalic(bool on);

--- koffice/lib/kotext/kotextview.cc  #1.117:1.117.2.1
@@ -375,4 +375,9 @@ void KoTextView::insertText( const QStri
 }
 
+void KoTextView::newParagraph()
+{
+    textObject()->insert( m_cursor, m_currentFormat, "\n", true, true, i18n("Insert Text") );
+}
+
 void KoTextView::handleKeyReleaseEvent( QKeyEvent * e )
 {

--- koffice/lib/kotext/kotextview.h  #1.67:1.67.2.1
@@ -167,4 +167,5 @@ public slots:
     /** This is a slot so that it's accessible from DCOP */
     void insertText( const QString &text );
+    void newParagraph();
 
     QString refLink()const {return m_refLink;}


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

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