[Uml-devel] [Bug 145918] Python code generator does not wrap lines properly

Oliver Kellogg okellogg at users.sourceforge.net
Fri May 25 05:43:35 UTC 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=145918         
okellogg users sourceforge net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From okellogg users sourceforge net  2007-05-25 07:43 -------
SVN commit 668117 by okellogg:

Use CodeGenerator::formatDoc() for formatting the string returned by UMLObject::getDoc()
BUG:145918


 M  +1 -0      ChangeLog  
 M  +8 -8      umbrello/codegenerators/pythonwriter.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #668116:668117
 @ -3,6 +3,7  @
 * Bugs/wishes from http://bugs.kde.org:
 * Unstable saves and loads, class names become dirty (145709)
 * Crash on deleting class in list view (145762)
+* Python code generator does not wrap lines properly (145918)
 
 Version 1.5.7
 
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenerators/pythonwriter.cpp #668116:668117
 @ -134,12 +134,12  @
 
     h<<(superclasses.count() > 0 ? ")":"")<<":"<<m_endl<<m_endl;
 
-    if(forceDoc() || !c->getDoc().isEmpty()) {
-        h<<m_indentation<<"\"\"\""<<m_endl;
-        h<<m_indentation<<c->getDoc()<<m_endl;
-        h<<m_indentation<<":version:"<<m_endl;
-        h<<m_indentation<<":author:"<<m_endl;
-        h<<m_indentation<<"\"\"\""<<m_endl<<m_endl;
+    if (forceDoc() || !c->getDoc().isEmpty()) {
+        h << m_indentation << "\"\"\"" << m_endl;
+        h << formatDoc(c->getDoc(), m_indentation + ' ') << m_endl;
+        h << m_indentation << ":version:" << m_endl;
+        h << m_indentation << ":author:" << m_endl;
+        h << m_indentation << "\"\"\"" << m_endl << m_endl;
         m_bNeedPass = false;
     }
 
 @ -247,8 +247,8  @
 
         if( writeDoc )  //write method documentation
         {
-            h<<m_indentation<<m_indentation<<"\"\"\""<<m_endl;
-            h<<m_indentation<<m_indentation<<op->getDoc()<<m_endl<<m_endl;
+            h << m_indentation << m_indentation << "\"\"\"" << m_endl;
+            h << formatDoc(op->getDoc(), m_indentation + m_indentation + ' ') << m_endl;
 
             for (at = atl.first(); at; at = atl.next())  //write parameter documentation
             {




More information about the umbrello-devel mailing list