paragui-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-cvs] CVS: paragui/src/widgets pgrichedit.cpp,1.3,1.3.6.1


From: Alexander Pipelka <address@hidden>
Subject: [paragui-cvs] CVS: paragui/src/widgets pgrichedit.cpp,1.3,1.3.6.1
Date: Tue, 28 May 2002 08:37:35 -0400

Update of /cvsroot/paragui/paragui/src/widgets
In directory subversions:/tmp/cvs-serv26318/src/widgets

Modified Files:
      Tag: devel-1-0
        pgrichedit.cpp 
Log Message:
added LoadText to PG_RichEdit



Index: pgrichedit.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgrichedit.cpp,v
retrieving revision 1.3
retrieving revision 1.3.6.1
diff -C2 -r1.3 -r1.3.6.1
*** pgrichedit.cpp      15 Apr 2002 13:35:36 -0000      1.3
--- pgrichedit.cpp      28 May 2002 12:37:31 -0000      1.3.6.1
***************
*** 181,185 ****
                        increment = 0;
                *word = my_text.substr(searchFrom, result - searchFrom + 
increment);
! 
                if ((Uint32)my_text[result] == 
my_Marks[MARK_NONBREAKABLE_SPACE]) {
                        std::string newword;
--- 181,185 ----
                        increment = 0;
                *word = my_text.substr(searchFrom, result - searchFrom + 
increment);
!               
                if ((Uint32)my_text[result] == 
my_Marks[MARK_NONBREAKABLE_SPACE]) {
                        std::string newword;
***************
*** 550,553 ****
--- 550,567 ----
            }  
  }    */
+       return true;
+ }
+ 
+ bool PG_RichEdit::LoadText(const char* textfile) {
+       PG_DataContainer* text = PG_FileArchive::ReadFile(textfile);
+       
+       if(text == NULL) {
+               return false;
+       }
+       
+       text->data()[text->size()] = 0;
+       SetText(text->data());
+       
+       delete text;
        return true;
  }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]