summaryrefslogtreecommitdiff
path: root/noncore/apps/tinykate/libkate/document/katedocument.h
Unidiff
Diffstat (limited to 'noncore/apps/tinykate/libkate/document/katedocument.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tinykate/libkate/document/katedocument.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/noncore/apps/tinykate/libkate/document/katedocument.h b/noncore/apps/tinykate/libkate/document/katedocument.h
index 9d8ec6a..969be87 100644
--- a/noncore/apps/tinykate/libkate/document/katedocument.h
+++ b/noncore/apps/tinykate/libkate/document/katedocument.h
@@ -3,13 +3,13 @@
3 ------------------- 3 -------------------
4 begin : Mon Jan 15 2001 4 begin : Mon Jan 15 2001
5 copyright : (C) 2001 by Christoph "Crossfire" Cullmann 5 copyright : (C) 2001 by Christoph "Crossfire" Cullmann
6 (C) 2002 by Joseph Wenninger 6 (C) 2002 by Joseph Wenninger
7 email : crossfire@babylon2k.de 7 email : crossfire@babylon2k.de
8 jowenn@kde.org 8 jowenn@kde.org
9 9
10***************************************************************************/ 10***************************************************************************/
11 11
12/*************************************************************************** 12/***************************************************************************
13 * * 13 * *
14 * This program is free software; you can redistribute it and/or modify * 14 * This program is free software; you can redistribute it and/or modify *
15 * it under the terms of the GNU General Public License as published by * 15 * it under the terms of the GNU General Public License as published by *
@@ -73,13 +73,13 @@ public:
73 } 73 }
74 int width(QChar c) { 74 int width(QChar c) {
75 uchar cell=c.cell(); 75 uchar cell=c.cell();
76 uchar row=c.row(); 76 uchar row=c.row();
77 short *wa=warray[row]; 77 short *wa=warray[row];
78 if (!wa) { 78 if (!wa) {
79 // qDebug("create row: %d",row); 79 // odebug << "create row: " << row << oendl;
80 wa=warray[row]=new short[256]; 80 wa=warray[row]=new short[256];
81 for (int i=0; i<256; i++) wa[i]=-1; 81 for (int i=0; i<256; i++) wa[i]=-1;
82 } 82 }
83 if (wa[cell]<0) wa[cell]=(short) QFontMetrics::width(c); 83 if (wa[cell]<0) wa[cell]=(short) QFontMetrics::width(c);
84 return (int)wa[cell]; 84 return (int)wa[cell];
85 } 85 }
@@ -176,13 +176,13 @@ class KateDocument: public Kate::Document
176 virtual QString textLine( int line ) const; 176 virtual QString textLine( int line ) const;
177 177
178 virtual void insertLine( const QString &s, int line = -1 ); 178 virtual void insertLine( const QString &s, int line = -1 );
179 179
180 void insert_Line(const QString& s,int line=-1, bool update=true); 180 void insert_Line(const QString& s,int line=-1, bool update=true);
181 void remove_Line(int line,bool update=true); 181 void remove_Line(int line,bool update=true);
182 void replaceLine(const QString& s,int line=-1); 182 void replaceLine(const QString& s,int line=-1);
183 virtual void insertAt( const QString &s, int line, int col, bool mark = FALSE ); 183 virtual void insertAt( const QString &s, int line, int col, bool mark = FALSE );
184 virtual void removeLine( int line ); 184 virtual void removeLine( int line );
185 virtual int length() const; 185 virtual int length() const;
186 186
187 virtual void setSelection( int row_from, int col_from, int row_to, int col_t ); 187 virtual void setSelection( int row_from, int col_from, int row_to, int col_t );
188 virtual bool hasSelection() const; 188 virtual bool hasSelection() const;
@@ -531,21 +531,21 @@ class KateDocument: public Kate::Document
531 531
532 class KateDocPrivate 532 class KateDocPrivate
533 { 533 {
534 public: 534 public:
535 bool hlSetByUser; 535 bool hlSetByUser;
536 }; 536 };
537 537
538 538
539// BCI: Add a real d-pointer in the next BIC release 539// BCI: Add a real d-pointer in the next BIC release
540static QPtrDict<KateDocPrivate>* d_ptr; 540static QPtrDict<KateDocPrivate>* d_ptr;
541static void cleanup_d_ptr() 541static void cleanup_d_ptr()
542 { 542 {
543 delete d_ptr; 543 delete d_ptr;
544 } 544 }
545 545
546KateDocPrivate* d( const KateDocument* foo ) 546KateDocPrivate* d( const KateDocument* foo )
547 { 547 {
548 if ( !d_ptr ) { 548 if ( !d_ptr ) {
549 d_ptr = new QPtrDict<KateDocPrivate>; 549 d_ptr = new QPtrDict<KateDocPrivate>;
550 //qAddPostRoutine( cleanup_d_ptr ); 550 //qAddPostRoutine( cleanup_d_ptr );
551 } 551 }
@@ -553,13 +553,13 @@ KateDocPrivate* d( const KateDocument* foo )
553 if ( ! ret ) { 553 if ( ! ret ) {
554 ret = new KateDocPrivate; 554 ret = new KateDocPrivate;
555 d_ptr->replace( (void*) foo, ret ); 555 d_ptr->replace( (void*) foo, ret );
556 } 556 }
557 return ret; 557 return ret;
558 } 558 }
559 559
560void delete_d( const KateDocument* foo ) 560void delete_d( const KateDocument* foo )
561 { 561 {
562 if ( d_ptr ) 562 if ( d_ptr )
563 d_ptr->remove( (void*) foo ); 563 d_ptr->remove( (void*) foo );
564 } 564 }
565 565