rev 4418 - trunk/packages/kdesdk/debian/patches

Christopher Martin chrsmrtn at costa.debian.org
Sat Aug 26 21:19:55 UTC 2006


Author: chrsmrtn
Date: 2006-08-26 21:19:42 +0000 (Sat, 26 Aug 2006)
New Revision: 4418

Added:
   trunk/packages/kdesdk/debian/patches/01_kdesdk_branch_r577421.diff
Log:
kdesdk branch pull.


Added: trunk/packages/kdesdk/debian/patches/01_kdesdk_branch_r577421.diff
===================================================================
--- trunk/packages/kdesdk/debian/patches/01_kdesdk_branch_r577421.diff	2006-08-26 21:18:24 UTC (rev 4417)
+++ trunk/packages/kdesdk/debian/patches/01_kdesdk_branch_r577421.diff	2006-08-26 21:19:42 UTC (rev 4418)
@@ -0,0 +1,12438 @@
+#DPATCHLEVEL=0
+--- kbabel/kbabel/kbabelview.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/kbabel/kbabelview.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -37,8 +37,8 @@
+ #include "catalogfileplugin.h"
+ #include "toolaction.h"
+ #include "kbabelsettings.h"
++#include "kbprojectsettings.h"
+ 
+-
+ #include <qlayout.h>
+ 
+ #include <qlabel.h>
+--- kbabel/kbabel/kbabel.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/kbabel/kbabel.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -36,6 +36,7 @@
+ #include "kbabel.h"
+ 
+ #include "kbabelsettings.h"
++#include "kbprojectsettings.h"
+ #include "kbabelpref.h"
+ #include "projectpref.h"
+ #include "kbabelsplash.h"
+--- kbabel/kbabel/kbabelview2.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/kbabel/kbabelview2.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -59,6 +59,7 @@
+ #include "hidingmsgedit.h"
+ #include "roughtransdlg.h"
+ #include "kbabelsettings.h"
++#include "kbprojectsettings.h"
+ 
+ #include "resources.h"
+ 
+--- kbabel/kbabel/kbabel.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/kbabel/kbabel.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -31,6 +31,7 @@
+ GenericName[es]=Herramienta de traducción
+ GenericName[et]=Tõlkimise rakendus
+ GenericName[eu]=Itzulpen tresna
++GenericName[fa]=ابزار ترجمه
+ GenericName[fi]=Käännöstyökalu
+ GenericName[fo]=Umsetingaramboð
+ GenericName[fr]=Outil de traduction
+--- kbabel/kbabel/Makefile.am	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/kbabel/Makefile.am	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -84,3 +84,9 @@
+ 
+  # this is where the kdelnk file will go
+ xdg_apps_DATA = kbabel.desktop
++
++kbabel.lo: ../common/kbprojectsettings.h ../common/version.h
++kbabelview.lo: ../common/kbprojectsettings.h ../common/version.h
++kbabelview2.lo: ../common/kbprojectsettings.h
++main.o: ../common/version.h
++
+--- kbabel/kbabeldict/kbabeldict.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/kbabeldict/kbabeldict.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -11,6 +11,7 @@
+ Name[es]=Diccionario de KBabel
+ Name[et]=Sõnaraamat
+ Name[eu]=KBabel hiztegia
++Name[fa]=واژه‌نامه KBabel
+ Name[fi]=KBabel-sanakirja
+ Name[fr]=Dictionnaire de KBabel
+ Name[ga]=KBabel - Foclóir
+@@ -23,6 +24,7 @@
+ Name[nb]=KBabel-ordbok
+ Name[nds]=KBabel-Wöörbook
+ Name[nl]=KBabel woordenboek
++Name[nn]=KBabel-ordbok
+ Name[pa]=ਕੇਬਬੇਲ ਸ਼ਬਦ-ਕੋਸ਼
+ Name[pl]=SÅ‚ownik programu KBabel
+ Name[pt]=Dicionário do KBabel
+@@ -48,6 +50,7 @@
+ GenericName[es]=Diccionario de la herramienta de traducción
+ GenericName[et]=KBabel'i sõnaraamat
+ GenericName[eu]=Itzulpen tresnen hiztegia
++GenericName[fa]=واژه‌نامه ابزار ترجمه
+ GenericName[fi]=Käännöstyökalun sanakirja
+ GenericName[fr]=Dictionnaire d'un outil de traduction
+ GenericName[ga]=Uirlis Aistriúcháin - Foclóir
+@@ -57,9 +60,10 @@
+ GenericName[it]=Dizionario di uno strumento di traduzione
+ GenericName[ja]=翻訳ツール辞書
+ GenericName[lt]=Vertimo įrankio žodynas
+-GenericName[nb]=Oversettingsverktøy ordbok
++GenericName[nb]=Ordbok for oversettingsverktøy
+ GenericName[nds]=Översettenwarktüüch-Wöörbook
+ GenericName[nl]=Vertaalhulpmiddel woordenboek
++GenericName[nn]=Ordbok for omsetjingsverktøy
+ GenericName[pa]=ਅਨੁਵਾਦ ਸੰਦ ਲਈ ਸ਼ਬਦ-ਕੋਸ਼
+ GenericName[pl]=Słownik do narzędzia tłumaczy
+ GenericName[pt]=Dicionário da Ferramenta de Tradução
+--- kbabel/kbabeldict/kbabeldict_module.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/kbabeldict/kbabeldict_module.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -14,6 +14,7 @@
+ Comment[es]=Módulo de diccionario para KBabelDict
+ Comment[et]=KBabelDicti sõnaraamatumoodul
+ Comment[eu]=Hiztegi modulua KBabelDict-entzat
++Comment[fa]=پیمانه واژه‌نامه برای KBabelDict
+ Comment[fi]=KBabelDict-ohjelman sanakirjamoduuli
+ Comment[fr]=Module de dictionnaire pour KBabelDict
+ Comment[ga]=Modúl foclóra le haghaidh KBabelDict
+@@ -24,9 +25,10 @@
+ Comment[ja]=KBabelDict 辞書モジュール
+ Comment[lt]=KBabelDict žodyno modulis
+ Comment[ms]=Modul kamus untuk KBabelDict
+-Comment[nb]=Ordbokmodul for KBabelDict
++Comment[nb]=Ordboksmodul for KBabelDict
+ Comment[nds]=Wöörbookmoduul för KBabelDict
+ Comment[nl]=Woordenboekmodule voor KBabelDict
++Comment[nn]=Ordboksmodul for KBabelDict
+ Comment[pa]=ਕੇਬਬੇਲ-ਸ਼ਬਦਕੋਸ਼ ਲਈ ਸ਼ਬਦ-ਕੋਸ਼ ਮੈਡੀਊਲ
+ Comment[pl]=Moduł słownika dla KBabelDict
+ Comment[pt]=Módulo de dicionário para o KBabelDict
+--- kbabel/kbabeldict/modules/pocompendium/pocompendium.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/kbabeldict/modules/pocompendium/pocompendium.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -12,6 +12,7 @@
+ Name[es]=Módulo de compendio de PO para KBabelDict
+ Name[et]=KBabelDicti PO kompendiumi moodul
+ Name[eu]=PO laburpen modulua KBabelDict-entzat
++Name[fa]=پیمانه مختصر PO برای KBabelDict
+ Name[fi]=KBabelDict-ohjelman PO-kokoelmatiedostomoduuli
+ Name[fr]=Module de fichier de référence PO pour KBabelDict
+ Name[hi]=के-बेबल-डिक्श के लिए पीओ कम्पेंडियम मॉड्यूल
+@@ -21,9 +22,10 @@
+ Name[ja]=KBabelDict PO 要約モジュール
+ Name[lt]=KBabelDict PO tekstyno modulis
+ Name[ms]=Modul Kompendium PO untuk KBabelDict
+-Name[nb]=PO-kompendium-modul for KBabelDict
++Name[nb]=PO-kompendiummodul for KBabelDict
+ Name[nds]=PO-Kompendiummoduul för KBabelDict
+ Name[nl]=PO-samenvattingmodule voor KBabelDict
++Name[nn]=PO-kompendiemodul for KBabelDict
+ Name[pa]=ਕੇਬਬੇਲ-ਸ਼ਬਦਕੋਸ਼ ਲਈ PO ਸੰਖੇਪ ਮੈਡੀਊਲ
+ Name[pl]=Moduł Kompendium PO dla KBabelDict
+ Name[pt]=Módulo de Compêndio de PO para o KBabelDict
+--- kbabel/kbabeldict/modules/dbsearchengine/dbsearchengine.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/kbabeldict/modules/dbsearchengine/dbsearchengine.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -13,6 +13,7 @@
+ Name[es]=Base de datos de traducciones para KBabelDict
+ Name[et]=KBabelDicti tõlgete andmebaas
+ Name[eu]=Itzulpen datu-basea KBabelDict-entzat
++Name[fa]=دادگان ترجمه برای KBabelDict
+ Name[fi]=KBabelDict-ohjelman käännöstietokanta
+ Name[fr]=Base de données des traductions pour KBabelDict
+ Name[ga]=Cuimhne Aistriúcháin le haghaidh KBabelDict
+@@ -26,6 +27,7 @@
+ Name[nb]=Oversettelsesdatabase for KBabelDict
+ Name[nds]=Översettendatenbank för KBabelDict
+ Name[nl]=Vertalingendatabase voor KBabelDict
++Name[nn]=Omsetjingsdatabase for KBabelDict
+ Name[pa]=ਕੇਬਬੇਲ-ਸ਼ਬਦ-ਕੋਸ਼ ਲਈ ਅਨੁਵਾਦ ਡਾਟਾਬੇਸ
+ Name[pl]=Baza tłumaczeń dla KBabelDict
+ Name[pt]=Base de Dados de Traduções do KBabelDict
+--- kbabel/kbabeldict/modules/dbsearchengine2/dbsearchengine2.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/kbabeldict/modules/dbsearchengine2/dbsearchengine2.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -13,6 +13,7 @@
+ Name[es]=Base de datos de traducciones v2 para KBabelDict
+ Name[et]=KBabelDicti tõlgete andmebaas (versioon 2)
+ Name[eu]=v2 itzulpen datu-basea KBabelDict-entzat
++Name[fa]=دادگان ترجمه نسخه ۲ برای KBabelDict
+ Name[fi]=KBabelDict-ohjelman käännöstietokanta v2
+ Name[fr]=Base de données des traductions v2 pour KBabelDict
+ Name[ga]=Cuimhne Aistriúcháin (v2) le haghaidh KBabelDict
+@@ -23,9 +24,10 @@
+ Name[ja]=KBabelDict トランザクションデータベース v2
+ Name[lt]=KBabelDict vertimų duomenų bazės 2 versija
+ Name[ms]=Pangkalan Data Penterjemahan v2 KBabelDict
+-Name[nb]=Oversettelsesdatabase v2 for KBabelDict
++Name[nb]=Oversettelsesdatabase versjon 2 for KBabelDict
+ Name[nds]=Översettendatenbank V2 för KBabelDict
+ Name[nl]=Vertalingendatabase versie2 voor KBabelDict
++Name[nn]=Omsetjingsdatabase versjon 2 for KBabelDict
+ Name[pa]=ਕੇਬਬੇਲ-ਸ਼ਬਦ-ਕੋਸ਼ ਲਈ ਅਨੁਵਾਦ ਡਾਟਾਬੇਸ ਵਰਜਨ2
+ Name[pl]=Baza tłumaczeń v2 dla KBabelDict
+ Name[pt]=Base de Dados de Traduções v2 do KBabelDict
+--- kbabel/kbabeldict/modules/poauxiliary/poauxiliary.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/kbabeldict/modules/poauxiliary/poauxiliary.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -12,18 +12,20 @@
+ Name[es]=Módulo PO auxiliar para KBabelDict
+ Name[et]=KBabelDicti PO liitlasfaili moodul
+ Name[eu]=PO modulu laguntzailea KBabelDict-entzat
++Name[fa]=پیمانه کمکی PO برای KBabelDict
+ Name[fi]=KBabelDict-ohjelman PO-apumoduuli
+ Name[fr]=Module de PO auxiliaire pour KBabelDict
+ Name[hi]=के-बेबल-डिक्श के लिए ऑक्जिलरी पीओ मॉड्यूल
+ Name[hu]=Kiegészítő PO modul a KBabelDicthez
+ Name[is]=Viðbótar PO eining fyrir KBabel orðabókina
+ Name[it]=Modulo ausiliario PO per KBabelDict
+-Name[ja]=KBabelDict 高機能 PO モジュール
++Name[ja]=KBabelDict 補助 PO モジュール
+ Name[lt]=KBabelDict papildomo PO žodyno modulis
+ Name[ms]=Modul Auksillari PO untuk KBabelDict
+-Name[nb]=PO-hjelpeordliste-modul for KBabelDict
++Name[nb]=Hjelpeordlistemodul for KBabelDict
+ Name[nds]=PO-Hülpdateimoduul för KBabelDict
+ Name[nl]=Alternatieve PO-module voor KBabelDict
++Name[nn]=Jamføringsmodul for KBabelDict
+ Name[pa]=ਕੇਬਬੇਲ-ਸ਼ਬਦਕੋਸ਼ ਲਈ ਸਹਾਇਕ PO ਸਹਾਇਕ
+ Name[pl]=Moduł pomocniczego pliku PO dla KBabelDict
+ Name[pt]=Módulo de PO Auxiliar para o KBabelDict
+--- kbabel/kbabeldict/modules/tmx/tmxcompendium.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/kbabeldict/modules/tmx/tmxcompendium.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -12,6 +12,7 @@
+ Name[es]=Módulo de compendio TMX para KBabelDict
+ Name[et]=KBabelDicti TMX kompendiumi moodul
+ Name[eu]=TMX laburpen modulua KBabelDict-entzat
++Name[fa]=پیمانه مختصر TMX برای KBabelDict
+ Name[fi]=KBabelDict-ohjelman TMX-kokoelmatiedostomoduuli
+ Name[fr]=Module de fichier de référence des TMX pour KBabelDict
+ Name[hi]=के-बेबल-डिक्श के लिए टीएमएक्स कम्पेंडियम मॉड्यूल
+@@ -24,6 +25,7 @@
+ Name[nb]=TMX-kompendium-modul for KBabelDict
+ Name[nds]=TMX-Kompendiummoduul för KBabelDict
+ Name[nl]=TMX-samenvattingmodule voor KBabelDict
++Name[nn]=TMX-kompendiemodul for KBabelDict
+ Name[pa]=ਕੇਬਬੇਲ-ਸ਼ਬਦਕੋਸ਼ ਲਈ TMX ਅਨੁਵਾਦ ਮੈਡੀਊਲ
+ Name[pl]=Moduł Kompendium TMX dla KBabelDict
+ Name[pt]=Módulo de Compêndio de TMX para o KBabelDict
+--- kbabel/kbabeldict/Makefile.am	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/kbabeldict/Makefile.am	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -60,3 +60,7 @@
+ 
+ kde_servicetypes_DATA = kbabeldict_module.desktop
+ EXTRA_DIST = $(kde_servicetypes_DATA)
++
++kbabeldictbox.lo: ../common/version.h
++main.o: ../common/version.h
++
+--- kbabel/commonui/projectprefwidgets.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/commonui/projectprefwidgets.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -39,6 +39,7 @@
+ #include "kbabeldictbox.h"
+ #include "toolaction.h"
+ #include "cmdedit.h"
++#include "kbprojectsettings.h"
+ 
+ #include <kcombobox.h>
+ #include <kdatatool.h>
+--- kbabel/commonui/kbabel_validator.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/commonui/kbabel_validator.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -14,18 +14,20 @@
+ Comment[es]=Herramienta de datos KDE para KBabel
+ Comment[et]=KBabeli KDE andmete tööriist
+ Comment[eu]=KBabel-erako KDE aatu tresna 
++Comment[fa]=ابزار داده برای KBabel
+ Comment[fi]=KBabelin KDE Data Tool
+ Comment[fr]=Outil de données KDE pour KBabel
+ Comment[hi]=के-बेबल के लिए केडीई डाटा औज़ार
+ Comment[hu]=Adatkezelő a KBabelhez
+ Comment[is]=KDE gagnatól fyrir KBabel
+ Comment[it]=Strumento KDE per la gestione dati con KBabel
+-Comment[ja]=KBabel 向け KDE データツール
++Comment[ja]=KBabel のための KDE データツール
+ Comment[lt]=KDE duomenų įrankis, skirtas KBabel
+ Comment[ms]=Alatan Data KDE untuk KBabel
+ Comment[nb]=KDE dataverktøy for KBabel
+ Comment[nds]=KDE-Datenwarktüüch för KBabel
+ Comment[nl]=KDE Dataprogramma voor KBabel
++Comment[nn]=KDE-dataverktøy for KBabel
+ Comment[pa]=KBabel ਲਈ ਕੇਡੀਈ ਡਾਟਾ ਸੰਦ
+ Comment[pl]=Narzędzie danych KDE dla KBabel
+ Comment[pt]=Ferramenta de Dados do KDE para o KBabel
+--- kbabel/commonui/projectpref.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/commonui/projectpref.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -35,6 +35,7 @@
+ #include "projectpref.h"
+ #include "projectprefwidgets.h"
+ #include "diffpreferences.h"
++#include "kbprojectsettings.h"
+ 
+ #include <qlayout.h>
+ #include <qwhatsthis.h>
+--- kbabel/commonui/context.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/commonui/context.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -32,6 +32,7 @@
+ **************************************************************************** */
+ #include "context.h"
+ #include "klisteditor.h"
++#include "kbprojectsettings.h"
+ 
+ #include <qcombobox.h>
+ #include <qfileinfo.h>
+--- kbabel/commonui/Makefile.am	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/commonui/Makefile.am	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -35,3 +35,6 @@
+ kde_servicetypes_DATA = kbabel_validator.desktop kbabel_tool.desktop
+ EXTRA_DIST = $(kde_servicetypes_DATA)
+ 
++context.lo: ../common/kbprojectsettings.h
++projectpref.lo: ../common/kbprojectsettings.h
++projectprefwidgets.lo: ../common/kbprojectsettings.h
+--- kbabel/common/diff.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/common/diff.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -42,7 +42,7 @@
+     it1=s1.begin();
+     it2=s2.begin();
+     printLCS(index);
+-};
++}
+ 
+ void LCSprinter::printLCS(uint index)
+ {
+@@ -462,4 +462,4 @@
+ 
+     return resultstr;
+ }
+-*/
+\ No newline at end of file
++*/
+--- kbabel/common/catalog.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/common/catalog.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -82,7 +82,7 @@
+ */
+ struct DocPosition
+ {
+-	DocPosition( ) : offset(0), item(0), form(0) { }
++	DocPosition( ) : offset(0), part(UndefPart), item(0), form(0) { }
+ 	uint offset;
+ 	
+ 	Part part;
+--- kbabel/common/catalogsettings.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/common/catalogsettings.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -39,8 +39,6 @@
+ #include <qdatetime.h>
+ #include <kdemacros.h>
+ 
+-#include "kbprojectsettings.h"
+-
+ class QTextCodec;
+ class QStringList;
+ 
+--- kbabel/common/catalog.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/common/catalog.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -61,6 +61,7 @@
+ #include "findoptions.h"
+ #include "catalogview.h"
+ #include "editcmd.h"
++#include "kbprojectsettings.h"
+ 
+ #include "resources.h"
+ #include "version.h"
+--- kbabel/common/kbabelfilter.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/common/kbabelfilter.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -13,6 +13,7 @@
+ Comment[es]=Filtro de KBabel
+ Comment[et]=KBabeli filter
+ Comment[eu]=KBabel iragazkia
++Comment[fa]=پالایه KBabel
+ Comment[fi]=KBabel-suodatin
+ Comment[fr]=Filtre pour KBabel
+ Comment[ga]=Scagaire KBabel
+@@ -27,6 +28,7 @@
+ Comment[nb]=KBabel-filter
+ Comment[nds]=KBabel-Filter
+ Comment[nl]=KBabel-filter
++Comment[nn]=KBabel-filter
+ Comment[pa]=KBabel ਫਿਲਟਰ
+ Comment[pl]=Filtr KBabel
+ Comment[pt]=Filtro do KBabel
+--- kbabel/common/kbmailer.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/common/kbmailer.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -45,6 +45,7 @@
+ #include <kmessagebox.h>
+ #include <ktar.h>
+ #include <kurl.h>
++#include <kdebug.h>
+ #include <ktempdir.h>
+ #include <kinputdialog.h>
+ 
+--- kbabel/common/catalogsettings.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/common/catalogsettings.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -32,6 +32,7 @@
+   your version.
+ **************************************************************************** */
+ #include "catalogsettings.h"
++#include "kbprojectsettings.h"
+ #include <kconfig.h>
+ #include <kdebug.h>
+ #include <kemailsettings.h>
+--- kbabel/datatools/not-translated/kbabel_nottranslatedtool.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/datatools/not-translated/kbabel_nottranslatedtool.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -8,18 +8,20 @@
+ Name[da]=Tjek for oversatte strenge der indeholder engelsk for KBabel
+ Name[de]=Überprüfung übersetzter Texte, die Englisch enthalten, für KBabel
+ Name[el]=Έλεγχος για μεταφρασμένα κείμενα που περιέχουν αγγλικά για το KBabel
+-Name[es]=Comprobación para cadenas traducidas del inglés para KBabel
++Name[es]=Comprobar cadenas traducidas con contenido en inglés para KBabel
+ Name[et]=KBabeli inglise keelt sisaldavate tõlgitud teadete kontrollija
+ Name[eu]=Bilatu ingeles hitzak itzulitako kateen artean KBabel-entzat
++Name[fa]=بررسی برای رشته‌های ترجمه‌شده محتوی انگلیسی برای KBabel
+ Name[fi]=Englantia sisältävien merkkijonojen tarkistus KBabelissa
+ Name[fr]=Vérifie si les chaînes traduites contiennent de l'anglais pour KBabel
+ Name[hu]=KBabel-eszköz angol nyelvű részek kereséséhez (a lefordított üzenetekben)
+ Name[is]=Leita að þýddum strengjum sem innihalda ensku fyrir KBabel
+ Name[it]=Controllo di stringhe tradotte contenenti inglese per KBabel
+-Name[ja]=KBabel 翻訳文字列内英語検証
++Name[ja]=KBabel 翻訳文字列内の英語を検索
+ Name[nb]=Sjekk for oversatte strenger som inneholder engelsk i KBabel
+-Name[nds]=Engelsch bargen Översetten
++Name[nds]=Prööv op översett Texten mit Engelsch dor binnen för KBabel
+ Name[nl]=Controle op vertaalde tekst met Engelse termen voor KBabel
++Name[nn]=Sjekk for omsette strengar som inneheld engelsk i Kbabel
+ Name[pl]=Sprawdzenie czy przetłumaczony komunikat zawiera angielskie słowa w KBabel
+ Name[pt]=Verificação de Mensagens Traduzidas que Contenham Inglês para o KBabel
+ Name[pt_BR]=Verifica por Strings Traduzidos Contendo Inglês para o KBabel
+@@ -50,6 +52,7 @@
+ Comment[es]=Traducciones con contenido en inglés
+ Comment[et]=Inglise keelt sisaldavad tõlked
+ Comment[eu]=Inglesa duten itzulpenak
++Comment[fa]=ترجمه‌های محتوی انگلیسی
+ Comment[fi]=Käännös sisältää englantia
+ Comment[fr]=Traductions contenant de l'anglais
+ Comment[he]=תרגומים המכילים אנגלית
+@@ -57,11 +60,12 @@
+ Comment[hu]=Angol nyelvű részeket tartalmazó fordítások
+ Comment[is]=Þýðingar sem innihalda ensku
+ Comment[it]=Traduzioni contenenti inglese
+-Comment[ja]=翻訳文字列内の英語
++Comment[ja]=翻訳文字列内の英語を検索
+ Comment[lt]=Vertimai, kuriuose yra anglų kalbos žodžių
+ Comment[nb]=Oversettelser som inneholder engelsk
+-Comment[nds]=Prööv op översett Texten mit Engelsch dor binnen för KBabel
++Comment[nds]=Op Engelsch binnen Översetten pröven
+ Comment[nl]=Vertalingen die Engels bevatten controleren
++Comment[nn]=Omsetjingar som inneheld engelsk
+ Comment[pa]=ਅੰਗਰੇਜ਼ੀ ਰੱਖਣ ਵਾਲੀ ਅਨੁਵਾਦ
+ Comment[pl]=Sprawdzenie czy przetłumaczony komunikat zawiera angielskie słowa
+ Comment[pt]=Traduções Que Contêm Inglês
+--- kbabel/datatools/xml/kbabel_xmltool.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/datatools/xml/kbabel_xmltool.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -11,6 +11,7 @@
+ Name[es]=Validación XML para KBabel
+ Name[et]=KBabeli XML-i kontrollija
+ Name[eu]=XML balidazioa KBabel-entzat
++Name[fa]=اعتبارسنجی XML برای KBabel
+ Name[fi]=XML-validointi KBabelissa
+ Name[fr]=Validation XML pour KBabel
+ Name[ga]=Bailíochtú XML le haghaidh KBabel
+@@ -24,6 +25,7 @@
+ Name[nb]=XML-sjekk i KBabel
+ Name[nds]=XML-Prööv för KBabel
+ Name[nl]=XML-validatie voor KBabel
++Name[nn]=XML-sjekk i KBabel
+ Name[pa]=ਕੇਬਬੇਲ ਲਈ XML ਪਰਮਾਣਕ
+ Name[pl]=Sprawdzenie XML w KBabel
+ Name[pt]=Validação de XML para o KBabel
+@@ -53,9 +55,10 @@
+ Comment[da]=Tjek mærker
+ Comment[de]=Prüfung der Tags in Übersetzungen
+ Comment[el]=Έλεγχος ετικετών
+-Comment[es]=Comprobación de etiquetas
++Comment[es]=Comprobar etiquetas
+ Comment[et]=Siltide kontroll
+ Comment[eu]=Egiaztatu etiketak
++Comment[fa]=بررسی برچسبها
+ Comment[fi]=Tarkista merkintäkoodit
+ Comment[fr]=Vérifier les balises
+ Comment[ga]=Seiceáil Clibeanna
+@@ -67,9 +70,10 @@
+ Comment[ja]=タグを検証
+ Comment[lt]=Tikrinti gaires
+ Comment[ms]=Periksa Tag
+-Comment[nb]=Sjekk merker
++Comment[nb]=Sjekk tagger
+ Comment[nds]=XML-Betekers pröven
+ Comment[nl]=Tags controleren
++Comment[nn]=Sjekk taggar
+ Comment[pa]=ਟੈਗ ਜਾਂਚ
+ Comment[pl]=Sprawdzenie znaczników XML
+ Comment[pt]=Verificação das Marcas
+--- kbabel/datatools/length/kbabel_lengthtool.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/datatools/length/kbabel_lengthtool.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -8,9 +8,10 @@
+ Name[da]=Oversat beskedlængde godkender for KBabel
+ Name[de]=Überprüfung der übersetzten Nachrichtenlänge für KBabel
+ Name[el]=Ελεγκτής εγκυρότητας μήκους μεταφρασμένων μηνυμάτων για το KBabel
+-Name[es]=Un validador de longitud de mensajes traducidos para KBabel
++Name[es]=Validador de longitud de mensajes traducidos para KBabel
+ Name[et]=KBabeli tõlgitud teadete pikkuse kontrollija
+ Name[eu]=Itzulitako mezu luzera balidatzailea KBabel-entzat
++Name[fa]=اعتبارسنج طول پیام ترجمه‌شده برای KBabel
+ Name[fi]=Käännetyn viestin pituuden tarkistus KBabelissa
+ Name[fr]=Un validateur de longueur de message pour KBabel
+ Name[hu]=Üzenethossz-ellenőrző a KBabelhez
+@@ -18,9 +19,10 @@
+ Name[it]=Validatore di KBabel per la lunghezza dei messaggi tradotti
+ Name[ja]=KBabel 翻訳メッセージの長さを検証
+ Name[lt]=KBabel išverstų pranešimų ilgio patikros įrankis
+-Name[nb]=En sjekk for lengden av oversatte strenger i KBabel
++Name[nb]=Sjekk av lengden på oversatte strenger i KBabel
+ Name[nds]=Textlängde-Prööv för KBabel
+ Name[nl]=Vertaalde-tekstlengte-validatie voor KBabel
++Name[nn]=Sjekk av lengda på omsette strengar i KBabel
+ Name[pl]=Sprawdzenie długości przetłumaczonego komunikatu w KBabel
+ Name[pt]=Validador do Tamanho da Mensagem Traduzida para o KBabel
+ Name[pt_BR]=Um Validador de Tamanho de Mensagem Traduzida para o KBabel
+@@ -49,9 +51,10 @@
+ Comment[de]=Prüfung der übersetzten Nachrichtenlänge
+ Comment[el]=Έλεγχος μήκους μεταφρασμένων μηνυμάτων
+ Comment[eo]=Kontrolu longecon de tradukita mesaĝo
+-Comment[es]=Comprobación de longitud del mensaje traducido
++Comment[es]=Comprobar longitud de los mensajes traducidos
+ Comment[et]=Tõlgitud teate pikkuse kontroll
+ Comment[eu]=Egiaztatu itzulitako mezuen luzera
++Comment[fa]=بررسی طول پیام ترجمه‌شده
+ Comment[fi]=Tarkista käännetyn viestin pituus
+ Comment[fr]=Vérifie la longueur des messages traduits
+ Comment[hi]=अनूदित संदेश लंबाई जाँचें
+@@ -60,9 +63,10 @@
+ Comment[it]=Controlla la lunghezza dei messaggi tradotti
+ Comment[ja]=翻訳メッセージの長さを検証
+ Comment[lt]=Tikrinti išverstų pranešimų ilgį
+-Comment[nb]=Sjekk for lengden av oversatte strenger
+-Comment[nds]=Längde vun den översett Text pröven
++Comment[nb]=Sjekk lengden på oversatte strenger
++Comment[nds]=Översett Textlängde pröven
+ Comment[nl]=Lengte van vertaalde tekst controleren
++Comment[nn]=Sjekk lengda på omsette strengar
+ Comment[pl]=Sprawdzenie długości przetłumaczonego komunikatu
+ Comment[pt]=Verificação do Tamanho da Mensagem Traduzida
+ Comment[pt_BR]=Verifica o Comprimento da Mensagem Traduzida
+--- kbabel/datatools/setfuzzy/kbabel_setfuzzytool.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/datatools/setfuzzy/kbabel_setfuzzytool.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -11,17 +11,19 @@
+ Name[es]=Herramienta de modificación de entradas dudosas para KBabel
+ Name[et]=KBabeli kahtlaste teadete lülitamise tööriist
+ Name[eu]=Zalantzazko sarreren aldaketa tresna KBabel-entzat
++Name[fa]=ابزار ضامن زدن مبهم برای KBabel
+ Name[fi]=KBabel-työkalu sumean tilan vaihtamiseksi
+ Name[fr]=Outil d'inversion de fuzzy pour KBabel
+ Name[hu]=Ellenőrzési eszköz a KBabelhez
+ Name[is]=Víxla loðnu tól fyrir KBabel
+ Name[it]=Strumento di KBabel per commutare le voci fuzzy
+-Name[ja]=KBabel fuzzy 切替ツール
++Name[ja]=KBabel fuzzy 切り替えツール
+ Name[lt]=KBabel įrankis, visus pranešimus pažymintis „neaiškiais“
+ Name[ms]=Alat Togol Kabur untuk KBabel
+ Name[nb]=Slå av/på uklar-statusen i KBabel
+ Name[nds]=Twiefelhaftig-Status ümschalten för KBabel
+ Name[nl]=Fuzzystatusomschakeling voor KBabel
++Name[nn]=Slå av/på uklar-statusen i KBabel
+ Name[pa]=ਕੇਬਬੇਲ ਲਈ ਤਬਦੀਲੀ ਅਸਪਸ਼ਟ ਸੰਦ
+ Name[pl]=Narzędzie do przełączania statusu wątpliwego komunikatu w KBabel
+ Name[pt]=Classificação Global Aproximada para o KBabel
+@@ -52,18 +54,20 @@
+ Comment[es]=Cambiar todo a dudoso
+ Comment[et]=Kõigi teadete määramine kahtlaseks
+ Comment[eu]=Ezarri denak zalantzazko bezala
++Comment[fa]=تنظیم همه مبهمها
+ Comment[fi]=Aseta kaikki sumeiksi
+ Comment[fr]=Mettre tout en fuzzy
+ Comment[hi]=सभी फजी नियत करें
+ Comment[hu]=Az összes üzenet ellenőrzendővé alakítása
+ Comment[is]=Setja öll loðin
+ Comment[it]=Imposta tutte le voci come fuzzy
+-Comment[ja]=すべての fuzzy を設定
++Comment[ja]=すべてに fuzzy を設定
+ Comment[lt]=Žymėti visus neaiškiais
+ Comment[ms]=Tetapkan Semua Kabur
+-Comment[nb]=Angi alle strengene som uklare
++Comment[nb]=Sett alle strengene som uklare
+ Comment[nds]=All op "twiefelhaftig" setten
+ Comment[nl]=Alles fuzzy markeren
++Comment[nn]=Set alle strengane som uklare
+ Comment[pa]= ਸਭ ਅਸਪਸ਼ਟ ਕਰੋ
+ Comment[pl]=Ustawia wszystkie komunikaty jako wÄ…tpliwe
+ Comment[pt]=Coloca todas as mensagens como aproximadas
+--- kbabel/datatools/context/kbabel_contexttool.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/datatools/context/kbabel_contexttool.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -11,18 +11,20 @@
+ Name[es]=Validación de información de contexto traducida para KBabel
+ Name[et]=KBabeli tõlgitud kontekstiinfo kontrollija
+ Name[eu]=Itzulitako kontestuen informazioaren balidazioa KBabel-entzat
++Name[fa]=اعتبارسنجی اطلاعات متن ترجمه‌شده برای KBabel
+ Name[fi]=Käännetyn kontekstitiedon tarkistus KBabelissa
+ Name[fr]=Validation des informations de contexte de traduction pour KBabel
+ Name[hi]=के-बेबल के लिए अनूदित कॉन्टेक्स्ट जानकारी वेलिडेशन
+ Name[hu]=Ellenőrző a fordítási kontextushoz a KBabelben
+ Name[is]=Staðfesting þýddra samhengisupplýsinga fyrir KBabel
+ Name[it]=Validazione delle informazioni di contesto tradotte per KBabel
+-Name[ja]=KBabel 訳文情報検証
++Name[ja]=KBabel 翻訳されたコンテキスト情報を検索
+ Name[lt]=KBabel išverstos kontekstinės informacijos patikros įrankis
+ Name[ms]=Pengesahan Info Konteks Telah Diterjemah untuk KBabel
+-Name[nb]=Sjekk av oversatt kontekstinformasjon for KBabel
++Name[nb]=Sjekk av oversatt sammenhengsinformasjon i KBabel
+ Name[nds]=Prööv op översett Infokontext för KBabel
+ Name[nl]=Vertaalde contextinformatie-validatie voor KBabel
++Name[nn]=Sjekk av omsett samanhengsinformasjon i KBabel
+ Name[pl]=Sprawdzanie kontekstu tłumaczonej informacji dla KBabel
+ Name[pt]=Validação da Informação de Contexto do KBabel
+ Name[pt_BR]=Validação de Informações de Contexto Traduzidas para o KBabel
+@@ -50,21 +52,23 @@
+ Comment[da]=Kig efter oversat sammenhængsinfo
+ Comment[de]=Suche nach übersetzter Kontextinformation
+ Comment[el]=Έλεγχος για μεταφρασμένες σχετικές πληροφορίες
+-Comment[es]=Aspecto para la información de contexto traducida
++Comment[es]=Buscar información de contexto traducida
+ Comment[et]=Tõlgitud kontekstiinfo otsimine
+ Comment[eu]=Bilatu itzulitako kontestuaren informazioa
++Comment[fa]=جستجوی اطلاعات متن ترجمه‌شده
+ Comment[fi]=Etsi käännettyä kontekstitietoa
+ Comment[fr]=Analyse les informations de contexte de traduction
+ Comment[hi]=अनूदित कॉन्टेक्स्ट जानकारी के लिए देखें
+ Comment[hu]=A kontextusfordítások kiszűrése
+ Comment[is]=Leita að þýddum samhengisupplýsingum
+ Comment[it]=Cerca informazioni di contesto tradotte
+-Comment[ja]=訳されたコンテキスト情報を検索
++Comment[ja]=翻訳されたコンテキスト情報を検索
+ Comment[lt]=Ieškoti išverstos kontekstinės informacijos
+ Comment[ms]=Cari Info Konteks Telah Diterjemah
+ Comment[nb]=Se etter oversatt kontekstinformasjon
+-Comment[nds]=Kiekt na översett Kontextinformatschonen
++Comment[nds]=Op översett Kontextinformatschonen pröven
+ Comment[nl]=Vertaalde contextinformatie zoeken
++Comment[nn]=Sjå etter omsett samanhengsinformasjon
+ Comment[pl]=Sprawdzenie kontekstu tłumaczonej informacji
+ Comment[pt]=Verificar a existência de traduções da informação de contexto
+ Comment[pt_BR]=Procura por Informações de Contexto Traduzidas
+--- kbabel/datatools/arguments/kbabel_argstool.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/datatools/arguments/kbabel_argstool.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -8,9 +8,10 @@
+ Name[da]=Argument-validering for KBabel
+ Name[de]=Argument-Überprüfung für KBabel
+ Name[el]=Έλεγχος εγκυρότητας ορισμάτων για το KBabel
+-Name[es]=Validación de argumento para KBabel
++Name[es]=Validació de argumentos para KBabel
+ Name[et]=KBabeli argumentide kontrollija
+ Name[eu]=Argumentu balidazioa KBabel-entzat
++Name[fa]=اعتبارسنجی نشانوند برای KBabel
+ Name[fi]=Argumenttien tarkistus KBabelissa
+ Name[fr]=Validation d'un argument pour KBabel
+ Name[ga]=Bailíochtú Argóintí le haghaidh KBabel
+@@ -21,9 +22,10 @@
+ Name[ja]=KBabel 引数検証
+ Name[lt]=Kbabel argumentų patikros įrankis
+ Name[ms]=Pengesahan Argumen untuk KBabel
+-Name[nb]=Sjekk argumentene for KBabel
++Name[nb]=Argumentsjekk for KBabel
+ Name[nds]=Argumentenprööv för KBabel
+ Name[nl]=Argumentenvalidatie voor KBabel
++Name[nn]=Argumentsjekk for KBabel
+ Name[pl]=Sprawdzenie argumentów w KBabel
+ Name[pt]=Validação de Argumentos para o KBabel
+ Name[pt_BR]=Validação de Argumentos para o KBabel
+@@ -51,9 +53,10 @@
+ Comment[de]=Argumente prüfen
+ Comment[el]=Έλεγχος ορισμάτων
+ Comment[eo]=Kontrolu argumentojn
+-Comment[es]=Comprobación de argumentos
++Comment[es]=Comprobar argumentos
+ Comment[et]=Argumentide kontroll
+ Comment[eu]=Egiaztatu argumentuak
++Comment[fa]=بررسی نشانوندها
+ Comment[fi]=Tarkista argumentit
+ Comment[fr]=Vérification des arguments
+ Comment[ga]=Seiceáil Argóintí
+@@ -62,12 +65,13 @@
+ Comment[hu]=Az argumentumok ellenőrzése
+ Comment[is]=Athuga viðföng
+ Comment[it]=Controlla argomenti
+-Comment[ja]=引数検証
++Comment[ja]=引数を検証
+ Comment[lt]=Patikrinti argumentus
+ Comment[ms]=Periksa Argumen
+ Comment[nb]=Sjekk argumenter
+ Comment[nds]=Argumenten pröven
+ Comment[nl]=Argumenten controleren
++Comment[nn]=Sjekk argument
+ Comment[pl]=Sprawdzenie argumentów
+ Comment[pt]=Verificação dos argumentos
+ Comment[pt_BR]=Verifica Argumentos
+--- kbabel/datatools/pluralforms/kbabel_pluralformstool.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/datatools/pluralforms/kbabel_pluralformstool.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -8,9 +8,10 @@
+ Name[da]=Validering af flertalsformer for KBabel
+ Name[de]=Pluralform-Überprüfung für KBabel
+ Name[el]=Έλεγχος εγκυρότητας φορμών πληθυντικού για το KBabel
+-Name[es]=Validación de forma plural para KBabel
++Name[es]=Validación de formas plurales para KBabel
+ Name[et]=KBabeli mitmusevormide kontrollija
+ Name[eu]=Plural forma balidazioa KBabel-entzat
++Name[fa]=اعتبارسنجی شکل جمع برای KBabel
+ Name[fi]=Monikkomuotojen tarkistus KBabelissa
+ Name[fr]=Validation des formes plurielles pour KBabel
+ Name[hi]=के-बेबल के लिए बहुवचन फार्म वेलिडेशन
+@@ -20,9 +21,10 @@
+ Name[ja]=KBabel 複数形検証
+ Name[lt]=KBabel daugiskaitos formų patikros įrankis
+ Name[ms]=Pengesahan Bentuk Jama' untuk KBabel
+-Name[nb]=Sjekk for flertallsformer for KBabel
++Name[nb]=Sjekk flertallsformer i KBabel
+ Name[nds]=Pluralformprööv för KBabel
+ Name[nl]=Meervoudsvormenvalidatie voor KBabel
++Name[nn]=Sjekk fleirtalsformer i KBabel
+ Name[pl]=Sprawdzenie form liczby mnogiej w KBabel
+ Name[pt]=Validação de Formas Plurais para o KBabel
+ Name[pt_BR]=Validação de Formas Plurais para o KBabel
+@@ -50,9 +52,10 @@
+ Comment[da]=Tjek flertalsformer
+ Comment[de]=Überprüfung von Plural-Formen
+ Comment[el]=Έλεγχος φορμών πληθυντικού
+-Comment[es]=Comprobación formas plurales
++Comment[es]=Comprobar formas plurales
+ Comment[et]=Mitmuse vormide kontroll
+ Comment[eu]=Egiaztatu plural formak
++Comment[fa]=بررسی شکلهای جمع
+ Comment[fi]=Tarkista monikkomuodot
+ Comment[fr]=Vérifie les formes plurielles
+ Comment[he]=בודק מצבי רבים
+@@ -63,9 +66,10 @@
+ Comment[ja]=複数形を検証
+ Comment[lt]=Tikrinti daugiskaitos formas
+ Comment[ms]=Periksa Bentuk Jama'
+-Comment[nb]=Sjekk for flertallsformer
++Comment[nb]=Sjekk flertallsformer
+ Comment[nds]=Pluralformen pröven
+ Comment[nl]=Meervoudsvormen controleren
++Comment[nn]=Sjekk fleirtalsformer
+ Comment[pa]=ਬਹੁ-ਵਚਨ ਫਾਰਮ ਜਾਂਚ
+ Comment[pl]=Sprawdzenie form liczby mnogiej
+ Comment[pt]=Verificação de Formas Plurais
+--- kbabel/datatools/accelerators/kbabel_accelstool.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/datatools/accelerators/kbabel_accelstool.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -8,9 +8,10 @@
+ Name[da]=Accelerator-validering for KBabel
+ Name[de]=Kurzbefehl-Überprüfung für KBabel
+ Name[el]=Έλεγχος εγκυρότητας πλήκτρων επιτάχυνσης για το KBabel
+-Name[es]=Validación de acceso rápido para KBabel
++Name[es]=Validación de accesos rápidos para KBabel
+ Name[et]=KBabeli kiirklahvide kontrollija
+ Name[eu]=Bizkortzaile balidazioa KBabel-entzat
++Name[fa]=اعتبارسنجی شتاب‌ده برای KBabel
+ Name[fi]=Pikavalintojen tarkistus KBabelissa
+ Name[fr]=Validation des accélérateurs clavier pour KBabel
+ Name[ga]=Bailíochtú na nAicearraí le haghaidh KBabel
+@@ -18,12 +19,13 @@
+ Name[hu]=Gyorsbillentyű-ellenőrző a KBabelhez
+ Name[is]=Flýtilyklastaðfestir fyrir KBabel
+ Name[it]=Validazione dei tasti acceleratori per KBabel
+-Name[ja]=KBabel 向けアクセラレータバリデーション
++Name[ja]=KBabel アクセラレータ検証
+ Name[lt]= KBabel prieigos klavišų žymių patikros įrankis
+ Name[ms]=Pengesahan Kekunci Pintas untuk KBabel
+-Name[nb]=Sjekk hurtigtastene for KBabel
++Name[nb]=Sjekk av snarveistaster i KBabel
+ Name[nds]=Tastkombinatschoonprööv för KBabel
+ Name[nl]=Sneltoetsvalidatie voor KBabel
++Name[nn]=Sjekk av snarvegstastar i KBabel
+ Name[pa]=ਕਬਬੇਲ ਲਈ ਪਰਵੇਸ਼ਕ ਪਰਮਾਣਕ
+ Name[pl]=Sprawdzanie klawiszy skrótu w KBabel
+ Name[pt]=Validação de Aceleradores para o KBabel
+@@ -52,9 +54,10 @@
+ Comment[da]=Tjek acceleratorer
+ Comment[de]=Kurzbefehle prüfen
+ Comment[el]=Έλεγχος πλήκτρων επιτάχυνσης
+-Comment[es]=Comprobación de teclas rápidas
++Comment[es]=Comprobar teclas rápidas
+ Comment[et]=Kiirklahvide kontroll
+ Comment[eu]=Egiaztatu bizkortzaileak
++Comment[fa]=بررسی شتاب‌دهها
+ Comment[fi]=Tarkista pikavalinnat
+ Comment[fr]=Vérification des accélérateurs clavier
+ Comment[ga]=Seiceáil Aicearraí
+@@ -63,12 +66,13 @@
+ Comment[hu]=A gyorsbillentyűk ellenőrzése
+ Comment[is]=Athuga flýtilykla
+ Comment[it]=Controlla tasti acceleratori
+-Comment[ja]=アクセラレータ検証
++Comment[ja]=アクセラレータを検証
+ Comment[lt]=Patikrinti prieigos klavišų žymes
+ Comment[ms]=Periksa Kekunci Pintas
+-Comment[nb]=Sjekk hurtigtastene
++Comment[nb]=Sjekk snarveistastene
+ Comment[nds]=Tastkombinatschonen pröven
+ Comment[nl]=Sneltoetsen controleren
++Comment[nn]=Sjekk snarvegstastar
+ Comment[pa]=ਪਰਵੇਸ਼ਕ ਜਾਂਚ
+ Comment[pl]=Sprawdzenie klawiszy skrótu
+ Comment[pt]=Verificação de Aceleradores
+--- kbabel/datatools/equations/kbabel_equationstool.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/datatools/equations/kbabel_equationstool.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -11,6 +11,7 @@
+ Name[es]=Validación de ecuaciones para KBabel
+ Name[et]=KBabeli võrduste kontrollija
+ Name[eu]=Ekuazioen balidazioa KBabel-entzat
++Name[fa]=اعتبارسنجی معادله برای KBabel
+ Name[fi]=Yhtälöiden tarkistus KBabelissa
+ Name[fr]=Validateur de similitudes pour KBabel
+ Name[ga]=Bailíochtú Cothromóidí le haghaidh KBabel
+@@ -18,12 +19,13 @@
+ Name[hu]=Egyenletellenőrző a KBabelhez
+ Name[is]=Jöfnustaðfesting fyrir KBabel
+ Name[it]=Validazione delle equazioni per KBabel
+-Name[ja]=KBabel 恒等性検証
++Name[ja]=KBabel 等式検証
+ Name[lt]=KBabel lygybių patikros įrankis
+ Name[ms]=Pengesahan Persamaan untuk KBabel
+-Name[nb]=Likhetssjekk for KBabel
+-Name[nds]=Towiesenprööv för KBabel
++Name[nb]=Likningssjekk for KBabel
++Name[nds]=Gliekenprööv för KBabel
+ Name[nl]=Vergelijkingenvalidatie voor KBabel
++Name[nn]=Likningssjekk for KBabel
+ Name[pl]=Sprawdzenie równań w KBabel
+ Name[pt]=Validação de Equações para o KBabel
+ Name[pt_BR]=Validação de Equação para o KBabel
+@@ -50,9 +52,10 @@
+ Comment[da]=Tjek ligninger
+ Comment[de]=Formeln prüfen
+ Comment[el]=Έλεγχος εξισώσεων
+-Comment[es]=Comprobación de ecuaciones
++Comment[es]=Comprobar ecuaciones
+ Comment[et]=Võrduste kontroll
+ Comment[eu]=Egiaztatu ekuazioak
++Comment[fa]=بررسی معادله‌ها
+ Comment[fi]=Tarkista yhtälöt
+ Comment[fr]=Vérifier les identités
+ Comment[ga]=Seiceáil Cothromóidí
+@@ -61,12 +64,13 @@
+ Comment[hu]=Az egyenletek ellenőrzése
+ Comment[is]=Athuga jöfnur
+ Comment[it]=Controlla equazioni
+-Comment[ja]= 恒等性を検証
++Comment[ja]= 等式を検証
+ Comment[lt]=Tikrinti lygybes
+ Comment[ms]=Periksa Persamaan
+-Comment[nb]=Likhetssjekk
+-Comment[nds]=Towiesen pröven
++Comment[nb]=Sjekk likninger
++Comment[nds]=Glieken pröven
+ Comment[nl]=Vergelijkingen controleren
++Comment[nn]=Sjekk likningar
+ Comment[pa]=ਸਮੀਕਰਨ ਜਾਂਚ
+ Comment[pl]=Sprawdzenie równań
+ Comment[pt]=Verifica as equações
+--- kbabel/datatools/punctuation/kbabel_punctuationtool.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/datatools/punctuation/kbabel_punctuationtool.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -11,6 +11,7 @@
+ Name[es]=Validación de puntuación para KBabel
+ Name[et]=KBabeli kirjavahemärkide kontrollija
+ Name[eu]=Puntuazio balidazioa KBabel-entzat
++Name[fa]=اعتبارسنجی نقطه‌گذاری برای KBabel
+ Name[fi]=Välimerkkien tarkistus KBabelissa
+ Name[fr]=Validation de ponctuation pour KBabel
+ Name[ga]=Bailíochtú na Poncaíochta le haghaidh KBabel
+@@ -20,9 +21,10 @@
+ Name[it]=Validazione della punteggiatura per KBabel
+ Name[ja]=KBabel 句読点検証
+ Name[lt]=KBabel skyrybos patikros įrankis
+-Name[nb]=Sjekk for tegnsetting for KBabel
++Name[nb]=Sjekk tegnsetting i KBabel
+ Name[nds]=Interpunktschoonprööv för KBabel
+ Name[nl]=Punctuatievalidatie voor KBabel
++Name[nn]=Sjekk teiknsetjing i KBabel
+ Name[pl]=Sprawdzenie interpunkcji w KBabel
+ Name[pt]=Validação de Pontuação para o KBabel
+ Name[pt_BR]=Validação de Pontuação para o KBabel
+@@ -50,9 +52,10 @@
+ Comment[da]=Tjek tegnsætning
+ Comment[de]=Prüfung der Interpunktion in Übersetzungen
+ Comment[el]=Έλεγχος στίξης
+-Comment[es]=Comprobación de puntuación
++Comment[es]=Comprobar puntuación
+ Comment[et]=Kirjavahemärkide kontroll
+ Comment[eu]=Egiaztatu puntuazioa
++Comment[fa]=بررسی نقطه سنجی
+ Comment[fi]=Tarkista välimerkit
+ Comment[fr]=Vérifie la ponctuation
+ Comment[ga]=Seiceáil Poncaíocht
+@@ -61,11 +64,12 @@
+ Comment[hu]=Az írásjelek ellenőrzése
+ Comment[is]=Athuga greinamerki
+ Comment[it]=Controlla punteggiatura
+-Comment[ja]=句読点の検証
++Comment[ja]=句読点を検証
+ Comment[lt]=Tikrinti skyrybÄ…
+ Comment[nb]=Sjekk tegnsetting
+ Comment[nds]=Interpunktschoon pröven
+ Comment[nl]=Punctuatie controleren
++Comment[nn]=Sjekk teiknsetjing
+ Comment[pl]=Sprawdzenie interpunkcji
+ Comment[pt]=Verifica a pontuação
+ Comment[pt_BR]=Verifica Pontuação
+--- kbabel/datatools/regexp/kbabel_regexptool.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/datatools/regexp/kbabel_regexptool.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -10,6 +10,7 @@
+ Name[es]=Gramática catalana
+ Name[et]=Katalaani grammatika
+ Name[eu]=Katalanaren gramatika
++Name[fa]=دستورزبان کاتالان
+ Name[fi]=Katalaanin kielioppi
+ Name[fr]=Grammaire du catalan
+ Name[ga]=Gramadach na Catalóinise
+@@ -19,9 +20,10 @@
+ Name[it]=Grammatica catalana
+ Name[ja]=カタロニア文節
+ Name[lt]=Katalonų gramatika
+-Name[nb]=Catalan grammatikk
++Name[nb]=Katalansk grammatikk
+ Name[nds]=Katalaansch Grammatik
+ Name[nl]=Catalaanse grammatica
++Name[nn]=Katalansk grammatikk
+ Name[pa]=ਕਾਟਾਲਾਨ ਗਰਾਮਰ
+ Name[pl]=Gramatyka katalońska
+ Name[pt]=Gramática Catalã
+@@ -49,6 +51,7 @@
+ Comment[es]=Comprobar mensajes traducidos mediante un juego de expresiones regulares
+ Comment[et]=Tõlgitud teate kontroll regulaaravaldistega
+ Comment[eu]=Egiaztatu itzulitako mezuak espresio erregular sorta batekin
++Comment[fa]=بررسی پیامهای ترجمه‌شده توسط یک مجموعه از عبارتهای منظم
+ Comment[fi]=Tarkista käännetyt viestit säännöllisten lausekkeiden avulla
+ Comment[fr]=Vérifie les messages traduits avec un jeu d'expressions rationnelles
+ Comment[hu]=A lefordított üzenetek ellenőrzése reguláris kifejezésekkel
+@@ -56,9 +59,10 @@
+ Comment[it]=Controlla i messaggi tradotti con un insieme di espressioni regolari
+ Comment[ja]=正規表現を用いて翻訳メッセージを検証
+ Comment[lt]=Tikrinti išverstus pranešimus panaudojant įprastųjų išraiškų rinkinį
+-Comment[nb]=Sjekk oversatte strenger med et sett regulære uttryk
+-Comment[nds]=Översett Narichten mit en Sett regulere Utdrück pröven
++Comment[nb]=Sjekk oversatte strenger med et sett regulære uttrykk
++Comment[nds]=Översett Mellen mit en Sett vun regulere Utdrück pröven
+ Comment[nl]=Vertaalde tekst controleren met behulp van reguliere expressies
++Comment[nn]=Sjekk omsette strengar med eit sett regulære uttrykk
+ Comment[pl]=Sprawdzenie przetłumaczonych komunikatów za pomocą zestawu wyrażeń regularnych
+ Comment[pt]=Verificação das Mensagens Traduzidas com um Conjunto de Expressões Regulares
+ Comment[pt_BR]=Verificação das Mensagens Traduzidas com um Conjunto de Expressões Regulares
+--- kbabel/datatools/whitespace/kbabel_whitespacetool.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/datatools/whitespace/kbabel_whitespacetool.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -11,16 +11,18 @@
+ Name[es]=Validador de cadenas traducidas como espacios en blanco.para KBabel
+ Name[et]=KBabeli tühimärgiks tõlgitud teadete kontrollija
+ Name[eu]=Zurigune bezala itzulitako kateen balidatzailea KBabel-entzat
++Name[fa]=رشته ترجمه‌شده به عنوان اعتبارسنج فاصله سفید برای  KBabel
+ Name[fi]=Tyhjeinä käännettyjen merkkijonojen tarkistaja KBabelissa
+ Name[fr]=Validateur de chaînes traduites comme des espaces pour KBabel
+ Name[hu]=Csak üres karaktereket tartalmazó fordítások kiszűrése a KBabelben
+ Name[is]=Staðfestir fyrir KBabel fyrir strengi þýdda sem bil
+ Name[it]=Validatore delle stringhe tradotte con spazi bianchi per KBabel
+-Name[ja]=KBabel 空白文字列検証
++Name[ja]=KBabel 空白として翻訳された文字列を検索
+ Name[lt]=KBabel eilučių, išverstų tuščiais tarpais, patikros įrankis
+-Name[nb]=Sjekk for tomme strenger i KBabel
++Name[nb]=Se etter tomme strenger i KBabel
+ Name[nds]=Leertekenöversetten-Prööv för KBabel
+ Name[nl]=Tekst-vertaald-als-witruimte-validatie voor KBabel
++Name[nn]=Sjå etter tomme strengar i KBabel
+ Name[pl]=Sprawdzenie czy napis jest przetłumaczony jako białe znaki w KBabel
+ Name[pt]=Validação de Texto Traduzido como Espaço para o KBabel
+ Name[pt_BR]=Validador de String Traduzidos com Espaços em Branco para o KBabel
+@@ -51,6 +53,7 @@
+ Comment[es]=Traducciones de espacios en blanco
+ Comment[et]=Tühimärkidest koosnevad tõlked
+ Comment[eu]=Zurigune itzulpenak
++Comment[fa]=ترجمه های فاصله سفید
+ Comment[fi]=Tyhjeiden käännökset
+ Comment[fr]=Traductions en espaces
+ Comment[he]=תרגומים של תווים נקיים
+@@ -58,12 +61,13 @@
+ Comment[hu]=Az üres fordítások kiszűrése
+ Comment[is]=Þýðingar bila
+ Comment[it]=Traduzioni con spazi bianchi
+-Comment[ja]=空白変換
++Comment[ja]=空白翻訳文字列を検索
+ Comment[lt]=Tuščių eilučių patikra
+ Comment[ms]=Terjemahan Ruang Kosong
+ Comment[nb]=Tomme strenger
+-Comment[nds]=Leertekenöversetten
++Comment[nds]=Leertekenöversetten pröven
+ Comment[nl]=Lege vertalingen
++Comment[nn]=Tomme strengar
+ Comment[pl]=Tłumaczenia w postaci białych znaków
+ Comment[pt]=Traduções de Espaços em Branco
+ Comment[pt_BR]=Traduções com espaços em branco
+--- kbabel/catalogmanager/catalogmanager.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/catalogmanager/catalogmanager.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -12,6 +12,7 @@
+ Name[es]=Administrador de catálogos de KBabel
+ Name[et]=Kataloogihaldur
+ Name[eu]=KBabel katalogo kudeatzailea
++Name[fa]= مدیر فهرست KBabel
+ Name[fi]=KBabel - käännöspakettien hallinta
+ Name[fr]=Gestionnaire de catalogues de KBabel
+ Name[ga]=KBabel - Bainisteoir na gCatalóg
+@@ -24,6 +25,7 @@
+ Name[nb]=KBabel-katalogbehandler
+ Name[nds]=KBabel-Kataloogpleger
+ Name[nl]=KBabel catalogusbeheer
++Name[nn]=KBabel Kataloghandsamar
+ Name[pa]=KBabel ਸੂਚੀ ਪ੍ਰਬੰਧਕ
+ Name[pl]=KBabel - Menedżer tłumaczeń
+ Name[pt]=Gestor de Catálogos do KBabel
+@@ -49,6 +51,7 @@
+ GenericName[es]=Administrador de catálogos de la herramienta de traducción
+ GenericName[et]=KBabel'i kataloogihaldur
+ GenericName[eu]=Itzulpen tresnen katalogo kudeatzailea
++GenericName[fa]=مدیر فهرست ابزار ترجمه
+ GenericName[fi]=Käännöstyökalun käännöspakettien hallinta
+ GenericName[fr]=Gestionnaire de catalogues de traduction
+ GenericName[ga]=Uirlis Aistriúcháin - Bainisteoir na gCatalóg
+@@ -56,11 +59,12 @@
+ GenericName[hu]=Fordítássegítő
+ GenericName[is]=Þýðingarforrit - Þýðingarstjóri
+ GenericName[it]=Gestore dei cataloghi di uno strumento di traduzione
+-GenericName[ja]=翻訳ツール
++GenericName[ja]=翻訳ツール カタログマネージャ
+ GenericName[lt]=Vertimo įrankio katalogo tvarkytuvė
+-GenericName[nb]=Oversettingsverktøy
++GenericName[nb]=Verktøy for håndtering av oversettelseskataloger
+ GenericName[nds]=Översettenwarktüüch-Kataloogpleger
+ GenericName[nl]=Vertaalhulpmiddel catalogusbeheer
++GenericName[nn]=Verktøy for handtering av omsetjingskatalogar
+ GenericName[pa]=ਅਨੁਵਾਦ ਸੰਦ ਲਈ ਸੂਚੀ ਪ੍ਰਬੰਧਕ
+ GenericName[pl]=Menedżer tłumaczeń
+ GenericName[pt]=Gestor de Catálogos de Ferramenta de Tradução
+--- kbabel/catalogmanager/Makefile.am	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/catalogmanager/Makefile.am	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -58,3 +58,7 @@
+ 
+ # this is where the kdelnk file will go
+ xdg_apps_DATA = catalogmanager.desktop
++
++catalogmanager.lo: ../common/version.h
++main.o: ../common/version.h
++
+--- kbabel/filters/gettext/kbabel_gettext_import.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/filters/gettext/kbabel_gettext_import.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -13,6 +13,7 @@
+ Name[es]=Filtro de importación KBabel GNU Gettext
+ Name[et]=KBabeli GNU Gettexti impordifilter
+ Name[eu]=KBabel GNU gettext inportazio iragazkia
++Name[fa]=پالایه واردات KBabel GNU Gettext
+ Name[fi]=KBabel GNU Gettext -tuontisuodatin
+ Name[fr]=Filtre d'importation GNU Gettext pour KBabel
+ Name[ga]=Scagaire Iompórtála Gettext GNU le haghaidh KBabel
+@@ -23,9 +24,10 @@
+ Name[ja]=KBabel GNU Gettext インポートフィルタ
+ Name[lt]=KBabel GNU Gettext importavimo filtras
+ Name[ms]=Penapis Import KBabel GNU Gettext
+-Name[nb]=KBabel GNU Gettext importfilter
++Name[nb]=GNU Gettext-importfilter for KBabel
+ Name[nds]=KBabel-Importfilter för GNU Gettext
+ Name[nl]=KBabel GNU Gettext Importfilter
++Name[nn]=GNU Gettext-importfilter for KBabel
+ Name[pa]=KBabel GNU Gettext ਅਯਾਤ ਫਿਲਟਰ
+ Name[pl]=Filtr KBabel do importu z formatu GNU Gettext
+ Name[pt]=Filtro de Importação de Gettext da GNU para o KBabel
+--- kbabel/filters/gettext/gettextexport.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/filters/gettext/gettextexport.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -38,6 +38,7 @@
+ #include "catalog.h"
+ #include "catalogitem.h"
+ #include "catalogsettings.h"
++#include "kbprojectsettings.h"
+ 
+ #include <qfile.h>
+ #include <qtextcodec.h>
+--- kbabel/filters/gettext/Makefile.am	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/filters/gettext/Makefile.am	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -16,3 +16,5 @@
+ 
+ service_DATA = kbabel_gettext_import.desktop kbabel_gettext_export.desktop
+ servicedir = $(kde_servicesdir)
++
++gettextexport.lo: ../../common/kbprojectsettings.h
+--- kbabel/filters/gettext/kbabel_gettext_export.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/filters/gettext/kbabel_gettext_export.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -13,6 +13,7 @@
+ Name[es]=Filtro de exportación KBabel GNU Gettext
+ Name[et]=KBabeli GNU Gettexti ekspordifilter
+ Name[eu]=KBabel GNU gettext esportazio iragazkia
++Name[fa]=پالایه صادرات KBabel GNU Gettext
+ Name[fi]=KBabel GNU Gettext -vientisuodatin
+ Name[fr]=filtre d'exportation GNU Gettext pour KBabel
+ Name[ga]=Scagaire Easpórtála Gettext GNU le haghaidh KBabel
+@@ -23,9 +24,10 @@
+ Name[ja]=KBabel GNU Gettext エクスポートフィルタ
+ Name[lt]=KBabel GNU Gettext eksportavimo filtras
+ Name[ms]=Penapis Eksport KBabel GNU Gettext 
+-Name[nb]=KBabel GNU Gettext eksportfilter
++Name[nb]=GNU Gettext-eksportfilter for KBabel
+ Name[nds]=KBabel-Exportfilter för GNU Gettext
+ Name[nl]=KBabel GNU Gettext Exportfilter
++Name[nn]=GNU Gettext-eksportfilter for KBabel
+ Name[pa]=KBabel GNU Gettext ਨਿਰਯਾਤ ਫਿਲਟਰ
+ Name[pl]=Filtr KBabel do eksportu do formatu GNU Gettext
+ Name[pt]=Filtro de Exportação do Gettext da GNU para o KBabel
+--- kbabel/filters/xliff/kbabel_xliff_export.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/filters/xliff/kbabel_xliff_export.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -11,6 +11,7 @@
+ Name[es]=Filtro de exportación XLIFF de KBabel
+ Name[et]=KBabeli XLIFF ekspordifilter
+ Name[eu]=KBabel XLIFF esportazio iragazkia
++Name[fa]=پالایه صادرات XLIFF KBabel 
+ Name[fi]=KBabel XLIFF -vientisuodatin
+ Name[fr]=Filtre d'exportation XLIFF pour KBabel
+ Name[ga]=Scagaire Easpórtála XLIFF le haghaidh KBabel
+@@ -19,9 +20,10 @@
+ Name[it]=Filtro di esportazione XLIFF per KBabel
+ Name[ja]=KBabel XLIFF エクスポートフィルタ
+ Name[lt]=KBabel XLIFF eksportavimo filtras
+-Name[nb]=KBabel XLIFF eksportfilter
++Name[nb]=XLIFF-eksportfilter for KBabel
+ Name[nds]=KBabel-Exportfilter för XLIFF
+ Name[nl]=KBabel XLIFF-exportfilter
++Name[nn]=XLIFF-eksportfilter for KBabel
+ Name[pa]=ਕੇਬਬੇਲ XLIFF ਨਿਰਯਾਤ ਫਿਲਟਰ
+ Name[pl]=Filtr KBabel do eksportu do formatu XLIFF
+ Name[pt]=Filtro de Exportação XLIFF para o KBabel
+--- kbabel/filters/xliff/kbabel_xliff_import.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/filters/xliff/kbabel_xliff_import.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -11,6 +11,7 @@
+ Name[es]=Filtro de importación de XLIFF de KBabel
+ Name[et]=KBabeli XLIFF impordifilter
+ Name[eu]=KBabel XLIFF inportazio iragazkia
++Name[fa]=پالایه واردات XLIFF KBabel
+ Name[fi]=KBabel XLIFF -tuontisuodatin
+ Name[fr]=Filtre d'importation XLIFF pour KBabel
+ Name[ga]=Scagaire Iompórtála XLIFF le haghaidh KBabel
+@@ -19,9 +20,10 @@
+ Name[it]=Filtro di importazione di XLIFF per KBabel
+ Name[ja]=KBabel XLIFF インポートフィルタ
+ Name[lt]=KBabel XLIFF importavimo filtras
+-Name[nb]=KBabel XLIFF importfilter
++Name[nb]=XLIFF-importfilter for KBabel
+ Name[nds]=KBabel-Importfilter för XLIFF
+ Name[nl]=KBabel XLIFF-importfilter
++Name[nn]=XLIFF-importfilter for KBabel
+ Name[pa]=ਕੇਬਬੇਲ XLIFF ਅਯਾਤ ਫਿਲਟਰ
+ Name[pl]=Filtr KBabel do importu z formatu XLIFF
+ Name[pt]=Filtro de Importação XLIFF para o KBabel
+--- kbabel/filters/linguist/kbabel_linguist_import.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/filters/linguist/kbabel_linguist_import.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -13,6 +13,7 @@
+ Name[es]=Filtro de importación de lengua KBabel
+ Name[et]=KBabeli Linguisti impordifilter
+ Name[eu]=KBabel Linguist esportazio iragazkia
++Name[fa]=پالایه واردات زبان شناس KBabel
+ Name[fi]=KBabel Linguist -tuontisuodatin
+ Name[fr]=Filtre d'importation Linguist pour KBabel
+ Name[ga]=Scagaire Iompórtála Linguist le haghaidh KBabel
+@@ -23,9 +24,10 @@
+ Name[ja]=KBabel Linguist インポートフィルタ
+ Name[lt]=KBabel Linguist importavimo filtras
+ Name[ms]=Penapis Import KBabel Linguist
+-Name[nb]=KBabel Linguist importfilter
++Name[nb]=Linguist-importfilter for KBabel
+ Name[nds]=KBabel-Importfilter för Linguist
+ Name[nl]=KBabel Linguïst importfilter
++Name[nn]=Linguist-importfilter for KBabel
+ Name[pa]=ਕੇਬਬੇਲ ਬੋਲੀ ਅਯਾਤ ਫਿਲਟਰ
+ Name[pl]=Filtr KBabel do importu z formatu Linguist
+ Name[pt]=Filtro de Importação de Linguist para o KBabel
+--- kbabel/filters/linguist/kbabel_linguist_export.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/filters/linguist/kbabel_linguist_export.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -23,9 +23,10 @@
+ Name[ja]=KBabel Linguist エクスポートフィルタ
+ Name[lt]=KBabel Linguist eksportavimo filtras
+ Name[ms]=Penapis Eksport KBabel Linguist
+-Name[nb]=KBabel Linguist eksportfilter
++Name[nb]=Linguist-eksportfilter for KBabel
+ Name[nds]=KBabel-Exportfilter för Linguist
+ Name[nl]=KBabel Linguïst Exportfilter
++Name[nn]=Linguist-eksportfilter for KBabel
+ Name[pa]=ਕੇਬਬੇਲ ਬੋਲੀ ਨਿਰਯਾਤ ਫਿਲਟਰ
+ Name[pl]=Filtr KBabel do eksportu do formatu Linguist
+ Name[pt]=Filtro de Exportação para Linguist para o KBabel
+--- kbabel/addons/preview/pothumbnail.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/addons/preview/pothumbnail.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -19,6 +19,7 @@
+ Name[es]=Catálogos de mensajes
+ Name[et]=Tõlkefailide kataloogid
+ Name[eu]=Katalogo mezuak
++Name[fa]=فهرستهای پیام
+ Name[fi]=Käännöspaketit
+ Name[fr]=Catalogues de messages
+ Name[ga]=Catalóg teachtaireachtaí
+--- kbabel/addons/kfile-plugins/kfile_po.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbabel/addons/kfile-plugins/kfile_po.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -17,6 +17,7 @@
+ Name[es]=Información de catálogo
+ Name[et]=Kataloogi info
+ Name[eu]=Katalogo informatizioa
++Name[fa]=اطلاعات فهرست
+ Name[fi]=Käännöspaketin tiedot
+ Name[fr]=Informations du catalogue
+ Name[ga]=Eolas Catalóga
+--- umbrello/umbrello/uml.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/uml.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -42,6 +42,7 @@
+ class UMLViewImageExporterAll;
+ class RefactoringAssistant;
+ class KPlayerPopupSliderAction;
++class XhtmlGenerator;
+ 
+ // KDE forward declarations
+ class KActionMenu;
+@@ -488,7 +489,23 @@
+      */
+     void slotFileQuit();
+     
++     /**
++      * Exports the current model to docbook in a subdir of the 
++      * current model directory named from the model name.
++      * @todo Let the user chose the destination directory and 
++      * name, using network transparency.
++      */
++    void slotFileExportDocbook();
++    
+     /**
++     * Exports the current model to XHTML in a subdir of the 
++     * current model directory named from the model name.
++     * @todo Let the user chose the destination directory and 
++     * name, using network transparency.
++     */
++    void slotFileExportXhtml();
++    
++    /**
+      * Put the marked text/object into the clipboard and remove
+      * it from the document.
+      */
+@@ -789,6 +806,12 @@
+ 
+     KConfig *getConfig() { return m_config; }
+ 
++    /**
++     * This slot deletes the current XHTML documentation generator as soon as
++     * this one signals that it has finished.
++     */
++    void slotXhtmlDocGenerationFinished();
++
+ private:
+     static UMLApp* s_instance;
+ 
+@@ -900,6 +923,8 @@
+     KAction* fileClose;
+     KAction* filePrint;
+     KAction* fileQuit;
++    KAction* fileExportDocbook;
++    KAction* fileExportXhtml;
+ 
+     KAction* editCut;
+     KAction* editCopy;
+@@ -995,6 +1020,12 @@
+      */
+     UMLViewImageExporterAll* m_imageExporterAll;
+ 
++    /**
++     * The running XHTML documentation generator. null when no generation is
++     * running
++     */
++    XhtmlGenerator* m_xhtmlGenerator;
++
+ signals:
+ 
+     /**
+--- umbrello/umbrello/umlcanvasobject.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/umlcanvasobject.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -5,6 +5,8 @@
+  *   the Free Software Foundation; either version 2 of the License, or     *
+  *   (at your option) any later version.                                   *
+  *                                                                         *
++ *   copyright (C) 2003-2006                                               *
++ *   Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>                 *
+  ***************************************************************************/
+ #include "uml.h"
+ #include "umldoc.h"
+@@ -62,8 +64,13 @@
+     if(!hasAssociation(assoc))
+     {
+         m_List.append( assoc );
+-        emit modified();
+-        emit sigAssociationAdded(assoc);
++
++        // Don't emit signals during load from XMI
++        UMLDoc *umldoc = UMLApp::app()->getDocument();
++        if (! umldoc->loading()) {
++            emit modified();
++            emit sigAssociationAdded(assoc);
++        }
+         return true;
+     }
+     return false;
+@@ -77,7 +84,8 @@
+ 
+ int UMLCanvasObject::removeAssociation(UMLAssociation * assoc) {
+     if(!hasAssociation(assoc) || !m_List.remove(assoc)) {
+-        kdWarning() << "can't find assoc given in list" << endl;
++        kdWarning() << "UMLCanvasObject::removeAssociation: "
++            << "can't find assoc given in list" << endl;
+         return -1;
+     }
+     emit modified();
+@@ -86,22 +94,35 @@
+ }
+ 
+ void UMLCanvasObject::removeAllAssociations() {
+-    UMLDoc *umldoc = UMLApp::app()->getDocument();
+     UMLObject *o;
+     for (UMLObjectListIt oit(m_List); (o = oit.current()) != NULL; ++oit) {
+         if (o->getBaseType() != Uml::ot_Association)
+             continue;
+         UMLAssociation *assoc = static_cast<UMLAssociation*>(o);
+-        umldoc->slotRemoveUMLObject(assoc);
++        //umldoc->slotRemoveUMLObject(assoc);
+         UMLObject* objA = assoc->getObject(Uml::A);
+         UMLObject* objB = assoc->getObject(Uml::B);
+         UMLCanvasObject *roleAObj = dynamic_cast<UMLCanvasObject*>(objA);
+         if (roleAObj)
+             roleAObj->removeAssociation(assoc);
++        else if (objA)
++            kdDebug() << "UMLCanvasObject::removeAllAssociations(" << m_Name
++                << "): objA " << objA->getName() << " is not a UMLCanvasObject"
++                << endl;
++        else
++            kdDebug() << "UMLCanvasObject::removeAllAssociations(" << m_Name
++                << "): objA is NULL" << endl;
+         UMLCanvasObject *roleBObj = dynamic_cast<UMLCanvasObject*>(objB);
+         if (roleBObj)
+             roleBObj->removeAssociation(assoc);
+-        //delete assoc;  cannot do this! AssociationWidgets may exist!
++        else if (objB)
++            kdDebug() << "UMLCanvasObject::removeAllAssociations(" << m_Name
++                << "): objB " << objB->getName() << " is not a UMLCanvasObject"
++                << endl;
++        else
++            kdDebug() << "UMLCanvasObject::removeAllAssociations(" << m_Name
++                << "): objB is NULL" << endl;
++        //delete assoc;  should not do this here, we are only a CLIENT of the assoc
+     }
+ }
+ 
+@@ -263,4 +284,16 @@
+ UMLAssociationList UMLCanvasObject::getRelationships() {
+     return getSpecificAssocs(Uml::at_Relationship);
+ }
++
++bool UMLCanvasObject::resolveRef() {
++    bool overallSuccess = UMLObject::resolveRef();
++    for (UMLObjectListIt ait(m_List); ait.current(); ++ait) {
++        UMLObject *obj = ait.current();
++        if (! obj->resolveRef())
++            overallSuccess = false;
++    }
++    return overallSuccess;
++}
++
+ #include "umlcanvasobject.moc"
++
+--- umbrello/umbrello/uniqueid.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 0)
++++ umbrello/umbrello/uniqueid.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -0,0 +1,34 @@
++
++#include "uniqueid.h"
++
++# define EXTERNALIZE_ID(id)  QString::number(id).ascii()
++
++namespace UniqueID {
++
++/**
++ * Each model object gets assigned a unique ID.
++ * NOTE: Currently this is an int although Uml::IDType is a string.
++ *       See also UMLView::m_nLocalID.
++ */
++int m_uniqueID = 0;
++
++Uml::IDType gen() {
++    ++m_uniqueID;
++    return EXTERNALIZE_ID(m_uniqueID);
++}
++
++void init() {
++    m_uniqueID = 0;
++}
++
++Uml::IDType get() {
++    return EXTERNALIZE_ID(m_uniqueID);
++}
++
++void set(Uml::IDType id) {
++    QString uniqueid = ID2STR(id);
++    m_uniqueID = uniqueid.toInt();
++}
++
++}  // end namespace UniqueID
++
+--- umbrello/umbrello/classifier.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/classifier.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -28,6 +28,7 @@
+ #include "umllistview.h"
+ #include "object_factory.h"
+ #include "model_utils.h"
++#include "uniqueid.h"
+ #include "clipboard/idchangelog.h"
+ #include "dialogs/umloperationdialog.h"
+ #include "dialogs/umlattributedialog.h"
+@@ -53,16 +54,16 @@
+ void UMLClassifier::setInterface(bool b /* = true */) {
+     // @todo get rid of direct dependencies to UMLListView
+     //  (e.g. move utility methods to Model_Utils and/or use signals)
+-    UMLListView::Icon_Type newIcon;
++    Uml::Icon_Type newIcon;
+     if (b) {
+         m_BaseType = ot_Interface;
+         UMLObject::setStereotype("interface");
+         UMLObject::m_bAbstract = true;
+-        newIcon = UMLListView::it_Interface;
++        newIcon = Uml::it_Interface;
+     } else {
+         m_BaseType = ot_Class;
+         UMLObject::setStereotype(QString::null);
+-        newIcon = UMLListView::it_Class;
++        newIcon = Uml::it_Class;
+     }
+     UMLListView *listView = UMLApp::app()->getListView();
+     listView->changeIconOf(this, newIcon);
+@@ -476,9 +477,8 @@
+     return false; //shutup compiler warning
+ }
+ 
+-UMLObject* UMLClassifier::createAttribute(const QString &name /*=null*/) {
+-    UMLDoc *umldoc = UMLApp::app()->getDocument();
+-    Uml::IDType id = umldoc->getUniqueID();
++UMLAttribute* UMLClassifier::createAttribute(const QString &name /*=null*/) {
++    Uml::IDType id = UniqueID::gen();
+     QString currentName;
+     if (name.isNull())  {
+         currentName = uniqChildName(Uml::ot_Attribute);
+@@ -514,6 +514,7 @@
+ 
+     addAttribute(newAttribute);
+ 
++    UMLDoc *umldoc = UMLApp::app()->getDocument();
+     umldoc->signalUMLObjectCreated(newAttribute);
+     return newAttribute;
+ }
+@@ -524,7 +525,6 @@
+         if (obj->getBaseType() == Uml::ot_Attribute && obj->getName() == name)
+             return static_cast<UMLAttribute*>(obj);
+     }
+-    UMLApp *app = UMLApp::app();
+     Uml::Visibility scope = Settings::getOptionState().classState.defaultAttributeScope;
+     UMLAttribute *a = new UMLAttribute(this, name, id, scope);
+     m_List.append(a);
+--- umbrello/umbrello/umbrello.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/umbrello.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -20,6 +20,7 @@
+ GenericName[es]=Modelador de UML
+ GenericName[et]=UML-i modelleerimise rakendus
+ GenericName[eu]=UML modelatzailea
++GenericName[fa]=مدل‌ساز UML
+ GenericName[fi]=UML-mallintaja
+ GenericName[fr]=Modeleur UML
+ GenericName[ga]=Múnlóir UML
+@@ -30,6 +31,7 @@
+ GenericName[nb]=UML-modelleringsprogram
+ GenericName[nds]=UML-Modellmaker
+ GenericName[nl]=UML-modeller
++GenericName[nn]=UML-modelleringsprogram
+ GenericName[pl]=Program do modelowania UML
+ GenericName[pt]=Modelador de UML
+ GenericName[pt_BR]=Modelador UML
+--- umbrello/umbrello/model_utils.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/model_utils.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -23,6 +23,7 @@
+ #include "umlobject.h"
+ #include "umlpackagelist.h"
+ #include "package.h"
++#include "folder.h"
+ #include "classifier.h"
+ #include "enum.h"
+ #include "entity.h"
+@@ -63,9 +64,10 @@
+         UMLObject *o;
+         Uml::Object_Type t = obj->getBaseType();
+         switch (t) {
++        case Uml::ot_Folder:
+         case Uml::ot_Package:
+         case Uml::ot_Component:
+-            o = ((UMLPackage*)obj)->findObjectById(id);
++            o = static_cast<UMLPackage*>(obj)->findObjectById(id);
+             if (o)
+                 return o;
+             break;
+@@ -73,7 +75,7 @@
+         case Uml::ot_Class:
+         case Uml::ot_Enum:
+         case Uml::ot_Entity:
+-            o = ((UMLClassifier*)obj)->findChildObjectById(id);
++            o = static_cast<UMLClassifier*>(obj)->findChildObjectById(id);
+             if (o == NULL &&
+                     (t == Uml::ot_Interface || t == Uml::ot_Class))
+                 o = ((UMLPackage*)obj)->findObjectById(id);
+@@ -82,7 +84,7 @@
+             break;
+         case Uml::ot_Association:
+             {
+-                UMLAssociation *assoc = (UMLAssociation*)obj;
++                UMLAssociation *assoc = static_cast<UMLAssociation*>(obj);
+                 UMLRole *rA = assoc->getUMLRole(Uml::A);
+                 if (rA->getID() == id)
+                     return rA;
+@@ -160,8 +162,8 @@
+             }
+             if (seenPkgs.findRef(pkg) != -1) {
+                 kdError() << "findUMLObject(" << name << "): "
+-                << "breaking out of cycle involving "
+-                << pkg->getName() << endl;
++                    << "breaking out of cycle involving "
++                    << pkg->getName() << endl;
+                 break;
+             }
+             seenPkgs.append(pkg);
+@@ -178,9 +180,9 @@
+                 if (nameWithoutFirstPrefix.isEmpty()) {
+                     if (type != Uml::ot_UMLObject && type != foundType) {
+                         kdDebug() << "findUMLObject: type mismatch for "
+-                        << name << " (seeking type: "
+-                        << type << ", found type: "
+-                        << foundType << ")" << endl;
++                            << name << " (seeking type: "
++                            << type << ", found type: "
++                            << foundType << ")" << endl;
+                         continue;
+                     }
+                     return obj;
+@@ -190,7 +192,7 @@
+                     foundType != Uml::ot_Interface &&
+                     foundType != Uml::ot_Component) {
+                     kdDebug() << "findUMLObject: found \"" << name
+-                    << "\" is not a package (?)" << endl;
++                        << "\" is not a package (?)" << endl;
+                     continue;
+                 }
+                 UMLPackage *pkg = static_cast<UMLPackage*>(obj);
+@@ -212,19 +214,20 @@
+         if (nameWithoutFirstPrefix.isEmpty()) {
+             if (type != Uml::ot_UMLObject && type != foundType) {
+                 kdDebug() << "findUMLObject: type mismatch for "
+-                << name << " (seeking type: "
+-                << type << ", found type: "
+-                << foundType << ")" << endl;
++                    << name << " (seeking type: "
++                    << type << ", found type: "
++                    << foundType << ")" << endl;
+                 continue;
+             }
+             return obj;
+         }
+         if (foundType != Uml::ot_Package &&
++            foundType != Uml::ot_Folder &&
+             foundType != Uml::ot_Class &&
+             foundType != Uml::ot_Interface &&
+             foundType != Uml::ot_Component) {
+             kdDebug() << "findUMLObject: found \"" << name
+-            << "\" is not a package (?)" << endl;
++                << "\" is not a package (?)" << endl;
+             continue;
+         }
+         UMLPackage *pkg = static_cast<UMLPackage*>(obj);
+@@ -234,8 +237,7 @@
+     return NULL;
+ }
+ 
+-QString uniqObjectName(Uml::Object_Type type, QString prefix,
+-                       UMLPackage *parentPkg /* = NULL */) {
++QString uniqObjectName(Uml::Object_Type type, UMLPackage *parentPkg, QString prefix) {
+     QString currentName = prefix;
+     if (currentName.isEmpty()) {
+         if(type == Uml::ot_Class)
+@@ -260,6 +262,8 @@
+             currentName = i18n("new_enum");
+         else if(type == Uml::ot_Entity)
+             currentName = i18n("new_entity");
++        else if(type == Uml::ot_Folder)
++            currentName = i18n("new_folder");
+         else if(type == Uml::ot_Association)
+             currentName = i18n("new_association");
+         else {
+@@ -323,6 +327,59 @@
+     }
+ }
+ 
++Uml::Model_Type guessContainer(UMLObject *o) {
++    Uml::Object_Type ot = o->getBaseType();
++    if (ot == Uml::ot_Package && o->getStereotype() == "subsystem")
++        return Uml::mt_Component;
++    Uml::Model_Type mt = Uml::mt_Logical;
++    switch (ot) {
++        case Uml::ot_Actor:
++        case Uml::ot_UseCase:
++            mt = Uml::mt_UseCase;
++            break;
++        case Uml::ot_Component:
++        case Uml::ot_Artifact:  // trouble: artifact can also appear at Deployment
++            mt = Uml::mt_Component;
++            break;
++        case Uml::ot_Node:
++            mt = Uml::mt_Deployment;
++            break;
++        case Uml::ot_Entity:
++            mt = Uml::mt_EntityRelationship;
++            break;
++        case Uml::ot_Association:
++            {
++                UMLAssociation *assoc = static_cast<UMLAssociation*>(o);
++                for (int r = Uml::A; r <= Uml::B; r++) {
++                    UMLObject *roleObj = assoc->getObject((Uml::Role_Type)r);
++                    if (roleObj == NULL) {
++                        // Ouch! we have been called while types are not yet resolved
++                        break;
++                    }
++                    UMLPackage *pkg = roleObj->getUMLPackage();
++                    if (pkg) {
++                        while (pkg->getUMLPackage()) {  // wind back to root
++                            pkg = pkg->getUMLPackage();
++                        }
++                        UMLDoc *umldoc = UMLApp::app()->getDocument();
++                        for (int i = 0; i < Uml::N_MODELTYPES; i++) {
++                            Uml::Model_Type m = (Uml::Model_Type)i;
++                            if (pkg == umldoc->getRootFolder(m))
++                                return m;
++                        }
++                    }
++                    mt = guessContainer(roleObj);
++                    if (mt != Uml::mt_Logical)
++                        break;
++                }
++            }
++            break;
++        default:
++            break;
++    }
++    return mt;
++}
++
+ int stringToDirection(QString input, Uml::Parameter_Direction & result) {
+     QRegExp dirx("^(in|out|inout)");
+     int pos = dirx.search(input);
+@@ -547,5 +604,82 @@
+     return Uml::pl_Reserved;
+ }
+ 
++Uml::Model_Type convert_DT_MT(Uml::Diagram_Type dt) {
++    Uml::Model_Type mt;
++    switch (dt) {
++        case Uml::dt_UseCase:
++            mt = Uml::mt_UseCase;
++            break;
++        case Uml::dt_Collaboration:
++        case Uml::dt_Class:
++        case Uml::dt_Sequence:
++        case Uml::dt_State:
++        case Uml::dt_Activity:
++            mt = Uml::mt_Logical;
++            break;
++        case Uml::dt_Component:
++            mt = Uml::mt_Component;
++            break;
++        case Uml::dt_Deployment:
++            mt = Uml::mt_Deployment;
++            break;
++        case Uml::dt_EntityRelationship:
++            mt = Uml::mt_EntityRelationship;
++            break;
++        default:
++            mt = Uml::N_MODELTYPES;
++            break;
++    }
++    return mt;
++}
++
++Uml::ListView_Type convert_MT_LVT(Uml::Model_Type mt) {
++    Uml::ListView_Type lvt = Uml::lvt_Unknown;
++    switch (mt) {
++        case Uml::mt_Logical:
++            lvt = Uml::lvt_Logical_View;
++            break;
++        case Uml::mt_UseCase:
++            lvt = Uml::lvt_UseCase_View;
++            break;
++        case Uml::mt_Component:
++            lvt = Uml::lvt_Component_View;
++            break;
++        case Uml::mt_Deployment:
++            lvt = Uml::lvt_Deployment_View;
++            break;
++        case Uml::mt_EntityRelationship:
++            lvt = Uml::lvt_EntityRelationship_Model;
++            break;
++        default:
++            break;
++    }
++    return lvt;
++}
++
++Uml::Model_Type convert_LVT_MT(Uml::ListView_Type lvt) {
++    Uml::Model_Type mt = Uml::N_MODELTYPES;
++    switch (lvt) {
++        case Uml::lvt_Logical_View:
++            mt = Uml::mt_Logical;
++            break;
++        case Uml::lvt_UseCase_View:
++            mt = Uml::mt_UseCase;
++            break;
++        case Uml::lvt_Component_View:
++            mt = Uml::mt_Component;
++            break;
++        case Uml::lvt_Deployment_View:
++            mt = Uml::mt_Deployment;
++            break;
++        case Uml::lvt_EntityRelationship_Model:
++            mt = Uml::mt_EntityRelationship;
++            break;
++        default:
++            break;
++    }
++    return mt;
++}
++
+ }  // namespace Model_Utils
+ 
+--- umbrello/umbrello/object_factory.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/object_factory.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -25,6 +25,7 @@
+ #include "umlobject.h"
+ #include "umlpackagelist.h"
+ #include "package.h"
++#include "folder.h"
+ #include "classifier.h"
+ #include "attribute.h"
+ #include "operation.h"
+@@ -59,8 +60,12 @@
+ }
+ 
+ UMLObject* createNewUMLObject(Uml::Object_Type type, const QString &name,
+-                              UMLPackage *parentPkg = NULL,
+-                              bool prepend = false) {
++                              UMLPackage *parentPkg) {
++    if (parentPkg == NULL) {
++        kdError() << "Object_Factory::createNewUMLObject(" << name
++            << "): parentPkg is NULL" << endl;
++        return NULL;
++    }
+     UMLObject *o = NULL;
+     switch (type) {
+         case Uml::ot_Actor:
+@@ -99,13 +104,16 @@
+         case Uml::ot_Entity:
+             o = new UMLEntity(name, g_predefinedId);
+             break;
++        case Uml::ot_Folder:
++            o = new UMLFolder(name, g_predefinedId);
++            break;
+         default:
+             kdWarning() << "createNewUMLObject error unknown type: " << type << endl;
+             return NULL;
+     }
+     o->setUMLPackage(parentPkg);
+     UMLDoc *doc = UMLApp::app()->getDocument();
+-    doc->addUMLObject(o, prepend);
++    parentPkg->addObject(o);
+     doc->signalUMLObjectCreated(o);
+     kapp->processEvents();
+     return o;
+@@ -113,21 +121,44 @@
+ 
+ UMLObject* createUMLObject(Uml::Object_Type type, const QString &n,
+                            UMLPackage *parentPkg /* = NULL */,
+-                           bool prepend /* = false */,
+                            bool solicitNewName /* = true */) {
+     UMLDoc *doc = UMLApp::app()->getDocument();
++    if (parentPkg == NULL) {
++        Uml::Model_Type mt = Uml::mt_Logical;
++        switch (type) {
++            case Uml::ot_Actor:
++            case Uml::ot_UseCase:
++                mt = Uml::mt_UseCase;
++                break;
++            case Uml::ot_Component:
++                mt = Uml::mt_Component;
++                break;
++            case Uml::ot_Artifact:
++            case Uml::ot_Node:
++                mt = Uml::mt_Deployment;
++                break;
++            case Uml::ot_Entity:
++                mt = Uml::mt_EntityRelationship;
++                break;
++            default:
++                break;
++        }
++        kdDebug() << "Object_Factory::createUMLObject(" << n << "): "
++            << "parentPkg is not set, assuming Model_Type " << mt << endl;
++        parentPkg = doc->getRootFolder(mt);
++    }
+     if (!n.isEmpty()) {
+         UMLObject *o = doc->findUMLObject(n, type, parentPkg);
+         if (o) {
+             if (!solicitNewName)
+                 return o;
+         } else {
+-            o = createNewUMLObject(type, n, parentPkg, prepend);
++            o = createNewUMLObject(type, n, parentPkg);
+             return o;
+         }
+     }
+     bool ok = false;
+-    QString name = Model_Utils::uniqObjectName(type, n, parentPkg);
++    QString name = Model_Utils::uniqObjectName(type, parentPkg, n);
+     bool bValidNameEntered = false;
+     do {
+         name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), name, &ok, (QWidget*)UMLApp::app());
+@@ -152,7 +183,7 @@
+         }
+         bValidNameEntered = true;
+     } while (bValidNameEntered == false);
+-    UMLObject *o = createNewUMLObject(type, name, parentPkg, prepend);
++    UMLObject *o = createNewUMLObject(type, name, parentPkg);
+     return o;
+ }
+ 
+@@ -201,7 +232,7 @@
+     return static_cast<UMLClassifierListItem*>(returnObject);
+ }
+ 
+-UMLObject* makeObjectFromXMI(const QString &xmiTag) {
++UMLObject* makeObjectFromXMI(QString xmiTag, QString stereoID /* = QString::null */) {
+     UMLObject* pObject = 0;
+     if (Uml::tagEq(xmiTag, "UseCase")) {
+         pObject = new UMLUseCase();
+@@ -210,7 +241,14 @@
+     } else if (Uml::tagEq(xmiTag, "Class")) {
+         pObject = new UMLClassifier();
+     } else if (Uml::tagEq(xmiTag, "Package")) {
+-        pObject = new UMLPackage();
++        if (!stereoID.isEmpty()) {
++            UMLDoc *doc = UMLApp::app()->getDocument();
++            UMLObject *stereo = doc->findStereotypeById(STR2ID(stereoID));
++            if (stereo->getName() == "folder")
++                pObject = new UMLFolder();
++        }
++        if (pObject == NULL)
++            pObject = new UMLPackage();
+     } else if (Uml::tagEq(xmiTag, "Component")) {
+         pObject = new UMLComponent();
+     } else if (Uml::tagEq(xmiTag, "Node")) {
+--- umbrello/umbrello/listpopupmenu.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/listpopupmenu.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -29,6 +29,7 @@
+ #include "uml.h"
+ #include "model_utils.h"
+ #include "widget_utils.h"
++#include "folder.h"
+ #include "umlview.h"
+ #include "statewidget.h"
+ #include "activitywidget.h"
+@@ -638,7 +639,14 @@
+     }
+     UMLListView *listView = UMLApp::app()->getListView();
+     UMLListViewItem *current = static_cast<UMLListViewItem*>(listView->currentItem());
+-    QString submodelFile = current->getFolderFile();
++    UMLFolder *f = dynamic_cast<UMLFolder*>(current->getUMLObject());
++    if (f == NULL) {
++        kdError() << "ListPopupMenu::insertSubmodelAction: "
++            << "current->getUMLObject (" << current->getUMLObject()
++            << ") is not a Folder" << endl;
++        return;
++    }
++    QString submodelFile = f->getFolderFile();
+     if (submodelFile.isEmpty())
+         insertStdItem(mt_Externalize_Folder);
+     else
+--- umbrello/umbrello/umlwidget.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/umlwidget.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -22,6 +22,7 @@
+ #include "umlwidgetcontroller.h"
+ #include "umlobject.h"
+ #include "classifier.h"
++#include "uniqueid.h"
+ #include "uml.h"
+ #include "umldoc.h"
+ #include "umlview.h"
+@@ -68,7 +69,7 @@
+     }
+     init();
+     if (id == Uml::id_None)
+-        m_nId = m_pDoc->getUniqueID();
++        m_nId = UniqueID::gen();
+     else
+         m_nId = id;
+ }
+--- umbrello/umbrello/umllistviewitem.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/umllistviewitem.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -1,8 +1,3 @@
+-/*
+- *  copyright (C) 2002-2004
+- *  Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>
+- */
+-
+ /***************************************************************************
+  *                                                                         *
+  *   This program is free software; you can redistribute it and/or modify  *
+@@ -10,18 +5,23 @@
+  *   the Free Software Foundation; either version 2 of the License, or     *
+  *   (at your option) any later version.                                   *
+  *                                                                         *
++ *   copyright (C) 2002-2006                                               *
++ *   Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>                 *
++ *                                                                         *
+  ***************************************************************************/
+ 
+ #ifndef UMLLISTVIEWITEM_H
+ #define UMLLISTVIEWITEM_H
+ 
+ #include <qlistview.h>
++#include <qmap.h>
+ #include <qdom.h>
+ #include "umlnamespace.h"
+ 
+ // forward declarations
+ class UMLListView;
+ class UMLObject;
++class UMLClassifierListItem;
+ 
+ /**
+  * Items used by the class @ref UMLListView.  This is needed as the type
+@@ -165,23 +165,26 @@
+     }
+ 
+     /**
+-     * Set the folder file name for a separate submodel.
+-     * Only applies to folders.
++     * Set the pixmap corresponding to the given Icon_Type.
+      */
+-    void setFolderFile(QString fileName);
++    void setIcon(Uml::Icon_Type iconType);
+ 
+     /**
+-     * Get the folder file name for a separate submodel.
+-     * Only applies to folders.
++     * Overrides default method to make public.
+      */
+-    QString getFolderFile();
++    void cancelRename( int col );
+ 
+     /**
+-     * Overrides default method to make public.
++     * Adds the child listview item representing the given UMLClassifierListItem.
+      */
+-    void cancelRename( int col );
++    void addClassifierListItem(UMLClassifierListItem *child, UMLListViewItem *childItem);
+ 
+     /**
++     * Deletes the child listview item representing the given UMLClassifierListItem.
++     */
++    void deleteChildItem(UMLClassifierListItem *child);
++
++    /**
+      * Overrides the default sorting to sort by item type.
+      */
+     virtual int compare(QListViewItem *other, int col, bool ascending) const;
+@@ -206,9 +209,17 @@
+      * in the tree rooted at the current UMLListViewItem.
+      * Return a pointer to the item or NULL if not found.
+      */
+-    UMLListViewItem* findUMLObject(UMLObject *o);
++    UMLListViewItem* findUMLObject(const UMLObject *o);
+ 
+     /**
++     * Find the UMLListViewItem that represents the given UMLClassifierListItem
++     * in the children of the current UMLListViewItem.  (Only makes sense if
++     * the current UMLListViewItem represents a UMLClassifier.)
++     * Return a pointer to the item or NULL if not found.
++     */
++    UMLListViewItem* findChildObject(UMLClassifierListItem *cli);
++
++    /**
+      * Find the UMLListViewItem of the given ID in the tree rooted at
+      * the current UMLListViewItem.
+      * Return a pointer to the item or NULL if not found.
+@@ -256,12 +267,20 @@
+      */
+     bool m_bCreating;
+ 
++    /**
++     * Auxiliary map of child UMLLisViewItems keyed by UMLClassifierListItem.
++     * Used by findChildObject() for efficiency instead of looping using
++     * firstChild()/nextSibling() because the latter incur enforceItemVisible()
++     * and thus expensive sorting.
++     */
++    typedef QMap<UMLClassifierListItem*, UMLListViewItem*> ChildObjectMap;
++
+     Uml::ListView_Type m_Type;
+     Uml::IDType m_nId;
+     int m_nChildren;
+     UMLObject * m_pObject;
+     QString m_Label;
+-    QString m_FolderFile;
++    ChildObjectMap m_comap;
+ };
+ 
+ #endif
+--- umbrello/umbrello/messagewidget.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/messagewidget.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -24,6 +24,7 @@
+ #include "umlview.h"
+ #include "umldoc.h"
+ #include "uml.h"
++#include "uniqueid.h"
+ #include "listpopupmenu.h"
+ 
+ MessageWidget::MessageWidget(UMLView * view, ObjectWidget* a, ObjectWidget* b,
+@@ -777,7 +778,7 @@
+         }
+     } else {
+         // no textid stored -> get unique new one
+-        textId = UMLApp::app()->getDocument()->getUniqueID();
++        textId = UniqueID::gen();
+     }
+ 
+     Uml::Text_Role tr = Uml::tr_Seq_Message;
+--- umbrello/umbrello/Makefile.am	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/Makefile.am	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -45,6 +45,7 @@
+ enumwidget.cpp \
+ floatingtextwidget.cpp \
+ floatingtextwidgetcontroller.cpp \
++folder.cpp \
+ forkjoinwidget.cpp \
+ kplayerslideraction.cpp \
+ hierarchicalcodeblock.cpp \
+@@ -106,6 +107,7 @@
+ umlviewimageexportermodel.cpp \
+ umlwidget.cpp \
+ umlwidgetcontroller.cpp \
++uniqueid.cpp \
+ usecase.cpp \
+ usecasewidget.cpp \
+ widgetbase.cpp \
+@@ -113,11 +115,11 @@
+ worktoolbar.cpp
+ 
+ #umbrello_LDADD   = ./refactoring/librefactoring.la ./codeimport/libcodeimport.la ./codeimport/kdevcppparser/libkdevcppparser.la ./clipboard/libclipboard.la ./dialogs/libdialogs.la ./codegenerators/libcodegenerator.la $(AUTOLAYOUT_LIBS) $(LIB_KDEPRINT) $(LIB_KIO)
+-umbrello_LDADD = ./refactoring/librefactoring.la ./codeimport/libcodeimport.la ./codeimport/kdevcppparser/libkdevcppparser.la ./clipboard/libclipboard.la ./dialogs/libdialogs.la ./codegenerators/libcodegenerator.la $(LIB_KDEPRINT) $(LIB_KIO)
++umbrello_LDADD = ./refactoring/librefactoring.la ./codeimport/libcodeimport.la ./codeimport/kdevcppparser/libkdevcppparser.la ./clipboard/libclipboard.la ./dialogs/libdialogs.la ./codegenerators/libcodegenerator.la ./docgenerators/libdocgenerators.la $(LIB_KDEPRINT) $(LIB_KIO)
+ 
+ ## See section "dnl Not GPL compatible" in ../configure.in.in
+ # SUBDIRS = $(AUTOLAYOUT_DIR) codeimport dialogs clipboard pics codegenerators headings refactoring
+-SUBDIRS = codeimport dialogs clipboard pics codegenerators headings refactoring
++SUBDIRS = codeimport dialogs docgenerators clipboard pics codegenerators headings refactoring
+ 
+ KDE_ICON=AUTO
+ 
+--- umbrello/umbrello/umlobject.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/umlobject.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -182,7 +182,7 @@
+      *                          "«" and "»".
+      * @return  Returns the classes stereotype name.
+      */
+-    QString getStereotype(bool includeAdornments = false);
++    QString getStereotype(bool includeAdornments = false) const;
+ 
+     /**
+      * Return the package(s) in which this UMLObject is contained
+@@ -190,6 +190,8 @@
+      *
+      * @param separator Separator string for joining together the
+      *                  individual package prefixes (optional.)
++     *                  If no separator is given then the separator
++     *                  of the currently selected language is used.
+      * @return  The UMLObject's enclosing package(s) as a text.
+      */
+     QString getPackage(QString separator = QString::null);
+@@ -343,12 +345,6 @@
+     void setSecondaryFallback(QString id);
+ 
+     /**
+-     * Returns true if this object resides in an externalized folder.
+-     * CHECK: It is probably cleaner to move this to the UMLListViewItem.
+-     */
+-    bool isSavedInSeparateFile();
+-
+-    /**
+      * Auxiliary to saveToXMI.
+      * Create a QDomElement with the given tag, and save the XMI attributes
+      * that are common to all child classes to the newly created element.
+--- umbrello/umbrello/umllistviewitem.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/umllistviewitem.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -21,6 +21,7 @@
+ #include <kdebug.h>
+ 
+ // app includes
++#include "folder.h"
+ #include "classifier.h"
+ #include "template.h"
+ #include "attribute.h"
+@@ -31,6 +32,7 @@
+ #include "umlobjectlist.h"
+ #include "umlview.h"
+ #include "model_utils.h"
++#include "uniqueid.h"
+ #include "uml.h"
+ 
+ UMLListView* UMLListViewItem::s_pListView = 0;
+@@ -43,7 +45,7 @@
+     m_pObject = o;
+     if (o)
+         m_nId = o->getID();
+-    setPixmap( 0, s_pListView -> getPixmap( UMLListView::it_Home ) );
++    setIcon(Uml::it_Home);
+     setText( name );
+     setRenameEnabled( 0, false );
+ }
+@@ -69,16 +71,13 @@
+         m_nId = Uml::id_None;
+         updateFolder();
+     } else {
++        UMLClassifierListItem *umlchild = dynamic_cast<UMLClassifierListItem*>(o);
++        if (umlchild)
++            parent->addClassifierListItem(umlchild, this);
+         updateObject();
+         m_nId = o->getID();
+     }
+-    if( t == Uml::lvt_Logical_View || t == Uml::lvt_UseCase_View ||
+-            t == Uml::lvt_Component_View || t == Uml::lvt_Deployment_View ||
+-            t == Uml::lvt_Datatype_Folder)  {
+-        setRenameEnabled( 0, false );
+-    } else {
+-        setRenameEnabled( 0, true );
+-    }
++    setRenameEnabled( 0, !UMLListView::typeIsRootView(t) );
+     setText( name );
+ }
+ 
+@@ -89,31 +88,31 @@
+     m_nId = id;
+     switch (m_Type) {
+     case Uml::lvt_Collaboration_Diagram:
+-        setPixmap(0, s_pListView->getPixmap( UMLListView::it_Diagram_Collaboration ) );
++        setIcon(Uml::it_Diagram_Collaboration);
+         break;
+     case Uml::lvt_Class_Diagram:
+-        setPixmap(0, s_pListView->getPixmap( UMLListView::it_Diagram_Class ) );
++        setIcon(Uml::it_Diagram_Class);
+         break;
+     case Uml::lvt_State_Diagram:
+-        setPixmap(0, s_pListView->getPixmap( UMLListView::it_Diagram_State ) );
++        setIcon(Uml::it_Diagram_State);
+         break;
+     case Uml::lvt_Activity_Diagram:
+-        setPixmap(0, s_pListView->getPixmap( UMLListView::it_Diagram_Activity ) );
++        setIcon(Uml::it_Diagram_Activity);
+         break;
+     case Uml::lvt_Sequence_Diagram:
+-        setPixmap(0, s_pListView->getPixmap( UMLListView::it_Diagram_Sequence ) );
++        setIcon(Uml::it_Diagram_Sequence);
+         break;
+     case Uml::lvt_Component_Diagram:
+-        setPixmap(0, s_pListView->getPixmap( UMLListView::it_Diagram_Component ) );
++        setIcon(Uml::it_Diagram_Component);
+         break;
+     case Uml::lvt_Deployment_Diagram:
+-        setPixmap(0, s_pListView->getPixmap( UMLListView::it_Diagram_Deployment ) );
++        setIcon(Uml::it_Diagram_Deployment);
+         break;
+     case Uml::lvt_UseCase_Diagram:
+-        setPixmap(0, s_pListView->getPixmap( UMLListView::it_Diagram_Usecase ) );
++        setIcon(Uml::it_Diagram_Usecase);
+         break;
+     default:
+-        setPixmap(0, s_pListView->getPixmap( UMLListView::it_Diagram ) );
++        setIcon(Uml::it_Diagram);
+     }
+     /*
+         Constructor also used by folder so just make sure we don't need to
+@@ -143,6 +142,21 @@
+     return m_Type;
+ }
+ 
++void UMLListViewItem::addClassifierListItem(UMLClassifierListItem *child, UMLListViewItem *childItem) {
++    m_comap[child] = childItem;
++}
++
++void UMLListViewItem::deleteChildItem(UMLClassifierListItem *child) {
++    UMLListViewItem *childItem = findChildObject(child);
++    if (childItem == NULL) {
++        kdError() << "UMLListViewItem::deleteChildItem(" << child->getName()
++                  << "): child listview item not found" << endl;
++        return;
++    }
++    m_comap.remove(child);
++    delete childItem;
++}
++
+ Uml::IDType UMLListViewItem::getID() const {
+     if (m_pObject)
+         return m_pObject->getID();
+@@ -154,25 +168,16 @@
+         Uml::IDType oid = m_pObject->getID();
+         if (id != Uml::id_None && oid != id)
+             kdDebug() << "UMLListViewItem::setID: new id " << ID2STR(id)
+-            << " does not agree with object id " << ID2STR(oid)
+-            << endl;
++                << " does not agree with object id " << ID2STR(oid) << endl;
+     }
+     m_nId = id;
+ }
+ 
+-void UMLListViewItem::setFolderFile(QString fileName) {
+-    m_FolderFile = fileName;
+-}
+-
+-QString UMLListViewItem::getFolderFile() {
+-    return m_FolderFile;
+-}
+-
+ bool UMLListViewItem::isOwnParent(Uml::IDType listViewItemID) {
+     QListViewItem *lvi = (QListViewItem*)s_pListView->findItem(listViewItemID);
+     if (lvi == NULL) {
+         kdError() << "UMLListViewItem::isOwnParent: ListView->findItem("
+-        << ID2STR(listViewItemID) << ") returns NULL" << endl;
++            << ID2STR(listViewItemID) << ") returns NULL" << endl;
+         return true;
+     }
+     for (QListViewItem *self = (QListViewItem*)this; self; self = self->parent()) {
+@@ -195,126 +200,58 @@
+     }
+     setText(modelObjText);
+ 
+-    UMLListView::Icon_Type icon = UMLListView::it_Home;
++    Uml::Icon_Type icon = Uml::it_Home;
+     switch (ot) {
+-    case Uml::ot_Actor:
+-        icon = UMLListView::it_Actor;
+-        break;
+-
+-    case Uml::ot_UseCase:
+-        icon = UMLListView::it_UseCase;
+-        break;
+-
+-    case Uml::ot_Class:
+-        icon = UMLListView::it_Class;
+-        break;
+-
+-    case Uml::ot_Template:
+-        icon = UMLListView::it_Template;
+-        break;
+-
+     case Uml::ot_Package:
+         if (m_pObject->getStereotype() == "subsystem")
+-            icon =  UMLListView::it_Subsystem;
++            icon = Uml::it_Subsystem;
+         else
+-            icon =  UMLListView::it_Package;
++            icon = Uml::it_Package;
+         break;
+-
+-    case Uml::ot_Component:
+-        icon =  UMLListView::it_Component;
++/*
++    case Uml::ot_Folder:
++        {
++            Uml::ListView_Type lvt = UMLListView::convert_OT_LVT(m_pObject);
++            icon = UMLListView::convert_LVT_IT(lvt);
++        }
+         break;
+-
+-    case Uml::ot_Node:
+-        icon =  UMLListView::it_Node;
+-        break;
+-
+-    case Uml::ot_Artifact:
+-        icon =  UMLListView::it_Artifact;
+-        break;
+-
+-    case Uml::ot_Interface:
+-        icon =  UMLListView::it_Interface;
+-        break;
+-
+-    case Uml::ot_Datatype:
+-        icon =  UMLListView::it_Datatype;
+-        break;
+-
+-    case Uml::ot_Enum:
+-        icon =  UMLListView::it_Enum;
+-        break;
+-
+-    case Uml::ot_Entity:
+-        icon =  UMLListView::it_Entity;
+-        break;
+-
++ */
+     case Uml::ot_Operation:
+         if (scope == Uml::Visibility::Public)
+-            icon =  UMLListView::it_Public_Method;
++            icon = Uml::it_Public_Method;
+         else if (scope == Uml::Visibility::Private)
+-            icon =  UMLListView::it_Private_Method;
++            icon = Uml::it_Private_Method;
+         else if (scope == Uml::Visibility::Implementation)
+-            icon =  UMLListView::it_Private_Method;
++            icon = Uml::it_Private_Method;
+         else
+-            icon =  UMLListView::it_Protected_Method;
++            icon = Uml::it_Protected_Method;
+         break;
+ 
+     case Uml::ot_Attribute:
+     case Uml::ot_EntityAttribute:
+         if (scope == Uml::Visibility::Public)
+-            icon =  UMLListView::it_Public_Attribute;
++            icon = Uml::it_Public_Attribute;
+         else if (scope == Uml::Visibility::Private)
+-            icon =  UMLListView::it_Private_Attribute;
++            icon = Uml::it_Private_Attribute;
+         else if (scope == Uml::Visibility::Implementation)
+-            icon =  UMLListView::it_Private_Attribute;
++            icon = Uml::it_Private_Attribute;
+         else
+-            icon =  UMLListView::it_Protected_Attribute;
++            icon = Uml::it_Protected_Attribute;
+         break;
+     default:
++        icon = UMLListView::convert_LVT_IT(m_Type);
+         break;
+     }//end switch
+     if (icon)
+-        setPixmap(0, s_pListView->getPixmap(icon) );
++        setIcon(icon);
+ }
+ 
+ void UMLListViewItem::updateFolder() {
+-    UMLListView::Icon_Type icon = UMLListView::it_Home;
+-    switch( m_Type ) {
+-    case Uml::lvt_UseCase_View:
+-    case Uml::lvt_UseCase_Folder:
+-        icon = UMLListView::it_Folder_Grey;
+-        break;
+-
+-    case Uml::lvt_Logical_View:
+-    case Uml::lvt_Logical_Folder:
+-        icon = UMLListView::it_Folder_Green;
+-        break;
+-
+-    case Uml::lvt_Datatype_Folder:
+-        icon = UMLListView::it_Folder_Orange;
+-        break;
+-
+-    case Uml::lvt_Component_View:
+-    case Uml::lvt_Component_Folder:
+-        icon = UMLListView::it_Folder_Red;
+-        break;
+-
+-    case Uml::lvt_Deployment_View:
+-    case Uml::lvt_Deployment_Folder:
+-        icon = UMLListView::it_Folder_Violet;
+-        break;
+-
+-    case Uml::lvt_EntityRelationship_Model:
+-    case Uml::lvt_EntityRelationship_Folder:
+-        icon = UMLListView::it_Folder_Cyan;
+-        break;
+-
+-    default:
+-        break;
+-    }
++    Uml::Icon_Type icon = UMLListView::convert_LVT_IT(m_Type);
+     if (icon) {
+-        icon = (UMLListView::Icon_Type)((int)icon + (int)isOpen());
+-        setPixmap(0, s_pListView->getPixmap(icon) );
++        if (UMLListView::typeIsFolder(m_Type))
++            icon = (Uml::Icon_Type)((int)icon + (int)isOpen());
++        setIcon(icon);
+     }
+ }
+ 
+@@ -332,6 +269,10 @@
+     return m_Label;
+ }
+ 
++void UMLListViewItem::setIcon(Uml::Icon_Type iconType) {
++    setPixmap(0, s_pListView->getPixmap(iconType));
++}
++
+ void UMLListViewItem::okRename( int col ) {
+     QListViewItem::okRename( col );
+     UMLDoc* doc = s_pListView->getDocument();
+@@ -360,6 +301,11 @@
+     case Uml::lvt_Actor:
+     case Uml::lvt_Class:
+     case Uml::lvt_Package:
++    case Uml::lvt_UseCase_Folder:
++    case Uml::lvt_Logical_Folder:
++    case Uml::lvt_Component_Folder:
++    case Uml::lvt_Deployment_Folder:
++    case Uml::lvt_EntityRelationship_Folder:
+     case Uml::lvt_Interface:
+     case Uml::lvt_Datatype:
+     case Uml::lvt_Enum:
+@@ -405,7 +351,7 @@
+                         a = parmList->at(i);
+                     } else {
+                         a = new UMLAttribute(op);
+-                        a->setID( doc->getUniqueID() );
++                        a->setID( UniqueID::gen() );
+                     }
+                     a->setName(nm_tp.m_name);
+                     a->setType(nm_tp.m_type);
+@@ -510,12 +456,6 @@
+             doc->signalDiagramRenamed(view);
+             break;
+         }
+-    case Uml::lvt_UseCase_Folder:
+-    case Uml::lvt_Logical_Folder:
+-    case Uml::lvt_Component_Folder:
+-    case Uml::lvt_Deployment_Folder:
+-        m_Label = newText;
+-        break;
+     default:
+         KMessageBox::error( kapp->mainWidget() ,
+                             i18n("Renaming an item of listview type %1 is not yet implemented.").arg(m_Type),
+@@ -593,7 +533,7 @@
+     if (ourParent != otherParent) {
+         retval = (subItem ? 0 : alphaOrder);
+ #ifdef DEBUG_LVITEM_INSERTION_ORDER
+-        kdDebug() << dbgPfx << retval << " because (ourParent != otherParentL)" << endl;
++        kdDebug() << dbgPfx << retval << " because (ourParent != otherParent)" << endl;
+ #endif
+         return retval;
+     }
+@@ -646,7 +586,7 @@
+     return newItem;
+ }
+ 
+-UMLListViewItem* UMLListViewItem::findUMLObject(UMLObject *o) {
++UMLListViewItem* UMLListViewItem::findUMLObject(const UMLObject *o) {
+     if (m_pObject == o)
+         return this;
+     UMLListViewItem *childItem = static_cast<UMLListViewItem*>(firstChild());
+@@ -659,6 +599,14 @@
+     return NULL;
+ }
+ 
++UMLListViewItem* UMLListViewItem::findChildObject(UMLClassifierListItem *cli) {
++    ChildObjectMap::iterator it = m_comap.find(cli);
++    if (it != m_comap.end()) {
++        return *it;
++    }
++    return NULL;
++}
++
+ UMLListViewItem * UMLListViewItem::findItem(Uml::IDType id) {
+     if (getID() == id)
+         return this;
+@@ -683,52 +631,31 @@
+         itemElement.setAttribute( "id", idStr );
+     itemElement.setAttribute( "type", m_Type );
+     UMLDoc *umldoc = s_pListView->getDocument();
+-    bool saveExternalFolder = false;
++    UMLFolder *extFolder = NULL;
+     QFile folderFile;
+     QDomDocument folderDoc;
+     if (m_pObject == NULL) {
+         // The predefined listview items such as "Logical View" etc. do
+         // not have a model counterpart thus their label is saved here.
+         itemElement.setAttribute( "label", m_Label );
+-        if (UMLListView::typeIsFolder(m_Type) && !m_FolderFile.isEmpty()) {
+-            itemElement.setAttribute( "external_file", m_FolderFile );
+-            if (saveSubmodelFiles) {
+-                folderFile.setName(umldoc->URL().directory(false) + m_FolderFile);
+-                if( !folderFile.open( IO_WriteOnly ) ) {
+-                    KMessageBox::error(0,
+-                                       i18n("There was a problem saving file: %1").arg(m_FolderFile),
+-                                       i18n("Save Error"));
+-                    // TODO:
+-                    // Resetting the m_FolderFile here is too late -
+-                    // the folderfile contents are already lost.
+-                    // The test for folder file writability needs to
+-                    // be done before the main model is saved so that
+-                    // if a folder file turns out not to be creatable,
+-                    // the folder can be internalized in time.
+-                    // ("Internalization": As a fallback to ensure that
+-                    // nothing is lost, the folder contents are saved
+-                    // in the main model file.)
+-                    m_FolderFile = QString::null;
+-                    m_Label.remove( QRegExp("\\s+\\(.*$") );
+-                    QListViewItem::setText(0, m_Label);
+-                } else {
+-                    saveExternalFolder = true;
+-                }
+-            }
+-        }
+     } else if (m_pObject->getID() == Uml::id_None) {
+         if (m_Label.isEmpty()) {
+             kdDebug() << "UMLListViewItem::saveToXMI(): Skipping empty item"
+-            << endl;
++                << endl;
+             return;
+         }
+         kdDebug() << "UMLListViewItem::saveToXMI(): saving local label "
+-        << m_Label << " because umlobject ID is not set" << endl;
++            << m_Label << " because umlobject ID is not set" << endl;
+         itemElement.setAttribute( "label", m_Label );
++    } else if (m_pObject->getBaseType() == Uml::ot_Folder) {
++        extFolder = static_cast<UMLFolder*>(m_pObject);
++        if (extFolder->getFolderFile().isEmpty())
++            extFolder = NULL;
+     }
+-    itemElement.setAttribute( "open", isOpen() );
++    if (extFolder == NULL)
++        itemElement.setAttribute("open", isOpen());
+     QDomElement folderRoot;
+-    if (saveExternalFolder) {
++    if (extFolder) {
+         QDomProcessingInstruction xmlHeading =
+             folderDoc.createProcessingInstruction("xml",
+                                                   "version=\"1.0\" encoding=\"UTF-8\"");
+@@ -742,7 +669,7 @@
+     UMLViewList viewList;
+     while (childItem) {
+         childItem->saveToXMI(qDoc, itemElement, saveSubmodelFiles);
+-        if (saveExternalFolder) {
++        if (extFolder) {
+             const Uml::ListView_Type lvType = childItem->getType();
+             UMLObject *umlobj = childItem->getUMLObject();
+             if (umlobj) {
+@@ -758,19 +685,19 @@
+                     viewList.append(v);
+                 } else {
+                     kdError() << "saveExternalFolder: UMLDoc::findView("
+-                    << ID2STR(viewID) << ") returns NULL"
+-                    << endl;
++                        << ID2STR(viewID) << ") returns NULL"
++                        << endl;
+                 }
+             } else {
+                 kdError() << "saveExternalFolder: saving of lvtype "
+-                << childItem->getType() << " is Not Yet Implemented"
+-                << endl;
++                    << childItem->getType() << " is Not Yet Implemented"
++                    << endl;
+             }
+         }
+         childItem = dynamic_cast<UMLListViewItem *> ( childItem->nextSibling() );
+     }
+     qElement.appendChild( itemElement );
+-    if (saveExternalFolder) {
++    if (extFolder) {
+         for (UMLView *v = viewList.first(); v; v = viewList.next()) {
+             v->saveToXMI(folderDoc, folderRoot);
+         }
+@@ -790,7 +717,7 @@
+         setText( label );
+     else if (id == "-1") {
+         kdError() << "UMLListViewItem::loadFromXMI: Item of type "
+-        << type << " has neither ID nor label" << endl;
++            << type << " has neither ID nor label" << endl;
+         return false;
+     }
+ 
+--- umbrello/umbrello/component.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/component.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -22,11 +22,6 @@
+  * This class inherits from @ref UMLPackage which contains most
+  * of the information.
+  *
+- * The @ref UMLDoc class creates instances of this type.
+- * All Components will need a unique id.  This will be given by the
+- * @ref UMLDoc class.  If you don't leave it up to the @ref UMLDoc
+- * class then call the method @ref UMLDoc::getUniqueID to get a unique id.
+- *
+  * @short Non-graphical information for a Component.
+  * @author Jonathan Riddell
+  * @see UMLCanvasObject
+--- umbrello/umbrello/umlnamespace.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/umlnamespace.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -1,8 +1,3 @@
+-/*
+- *  copyright (C) 2002-2004
+- *  Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>
+- */
+-
+ /***************************************************************************
+  *                                                                         *
+  *   This program is free software; you can redistribute it and/or modify  *
+@@ -10,6 +5,8 @@
+  *   the Free Software Foundation; either version 2 of the License, or     *
+  *   (at your option) any later version.                                   *
+  *                                                                         *
++ *   copyright (C) 2002-2006                                               *
++ *   Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>                 *
+  ***************************************************************************/
+ 
+ #ifndef UMLNAMESPACE_H
+@@ -24,6 +21,17 @@
+  * Bugs and comments to uml-devel at lists.sf.net or http://bugs.kde.org
+  */
+ namespace Uml {
++
++enum Model_Type
++{
++    mt_Logical,
++    mt_UseCase,
++    mt_Component,
++    mt_Deployment,
++    mt_EntityRelationship,
++    N_MODELTYPES   // must remain last
++};
++
+ enum Object_Type
+ {
+     ot_UMLObject  = 100,
+@@ -45,7 +53,8 @@
+     ot_Stereotype,
+     ot_Role,
+     ot_Entity,
+-    ot_EntityAttribute
++    ot_EntityAttribute,
++    ot_Folder
+ };
+ 
+ class Visibility {
+@@ -208,6 +217,53 @@
+     lvt_Unknown = -1
+ };
+ 
++enum Icon_Type
++{
++    it_Home = 0,
++    it_Folder_Cyan,
++    it_Folder_Cyan_Open,
++    it_Folder_Green,
++    it_Folder_Green_Open,
++    it_Folder_Grey,
++    it_Folder_Grey_Open,
++    it_Folder_Red,
++    it_Folder_Red_Open,
++    it_Folder_Violet,
++    it_Folder_Violet_Open,
++    it_Folder_Orange,
++    it_Folder_Orange_Open,
++    it_Diagram, //change to have different one for each type of diagram
++    it_Class,
++    it_Template,
++    it_Package,
++    it_Subsystem,
++    it_Component,
++    it_Node,
++    it_Artifact,
++    it_Interface,
++    it_Datatype,
++    it_Enum,
++    it_Entity,
++    it_Actor,
++    it_UseCase,
++    it_Public_Method,
++    it_Private_Method,
++    it_Protected_Method,
++    it_Public_Attribute,
++    it_Private_Attribute,
++    it_Protected_Attribute,
++    it_Diagram_Activity,
++    it_Diagram_Class,
++    it_Diagram_Collaboration,
++    it_Diagram_Component,
++    it_Diagram_Deployment,
++    it_Diagram_EntityRelationship,
++    it_Diagram_Sequence,
++    it_Diagram_State,
++    it_Diagram_Usecase,
++    N_ICONTYPES    // must remain last
++};
++
+ enum Changeability_Type
+ {
+     chg_Changeable = 900,
+@@ -287,6 +343,6 @@
+  */
+ bool tagEq (QString tag, QString pattern);
+ 
+-}
++}  // end namespace Uml
+ 
+ #endif
+--- umbrello/umbrello/entity.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/entity.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -22,11 +22,6 @@
+  * This class inherits from @ref UMLClassifier which contains most of the
+  * information.
+  *
+- * The @ref UMLDoc class creates instances of this type.  All Entitys
+- * will need a unique id.  This will be given by the @ref UMLDoc class.
+- * If you don't leave it up to the @ref UMLDoc class then call the method
+- * @ref UMLDoc::getUniqueID to get a unique id.
+- *
+  * @short Non-graphical Information for an Entity.
+  * @author Jonathan Riddell
+  * Bugs and comments to uml-devel at lists.sf.net or http://bugs.kde.org
+@@ -71,7 +66,7 @@
+      * @param name  An optional name, used by when creating through UMLListView
+      * @return  The UMLEntityAttribute created
+      */
+-    UMLObject* createAttribute(const QString &name = QString::null);
++    UMLAttribute* createAttribute(const QString &name = QString::null);
+ 
+     /**
+          * Adds an entityAttribute to the entity.
+--- umbrello/umbrello/uml.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/uml.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -78,6 +78,9 @@
+ 
+ #include "cmdlineexportallviewsevent.h"
+ 
++#include "docgenerators/docbookgenerator.h"
++#include "docgenerators/xhtmlgenerator.h"
++
+ UMLApp::UMLApp(QWidget* , const char* name):KDockMainWindow(0, name) {
+     s_instance = this;
+     m_pDocWindow = 0;
+@@ -91,11 +94,13 @@
+     m_codegen = 0;
+     m_policyext = 0;
+     m_commoncodegenpolicy = 0;
++    m_xhtmlGenerator = 0;
+     m_activeLanguage = Uml::pl_Reserved;
+     ///////////////////////////////////////////////////////////////////
+     // call inits to invoke all other construction parts
+     readOptionState();
+     m_doc = new UMLDoc();
++    m_doc->init();
+     initActions(); //now calls initStatusBar() because it is affected by setupGUI()
+     initView();
+     initClip();
+@@ -179,7 +184,13 @@
+     viewStatusBar = KStdAction::showStatusbar(this, SLOT(slotViewStatusBar()), actionCollection());
+ #endif
+     selectAll = KStdAction::selectAll(this,  SLOT( slotSelectAll() ), actionCollection());
+-
++    fileExportDocbook = new KAction(i18n("&Export model to DocBook"), 0, 
++                                    this, SLOT( slotFileExportDocbook() ), 
++                                    actionCollection(), "file_export_docbook");
++    fileExportXhtml = new KAction(i18n("&Export model to XHTML"), 0, 
++                                    this, SLOT( slotFileExportXhtml() ),
++                                    actionCollection(), "file_export_xhtml");
++    
+     classWizard = new KAction(i18n("&New Class Wizard..."),0,this,SLOT(slotClassWizard()),
+                               actionCollection(),"class_wizard");
+     new KAction(i18n("&Add Default Datatypes for Active Language"), 0, this,
+@@ -203,6 +214,8 @@
+     fileClose->setToolTip(i18n("Closes the document"));
+     filePrint ->setToolTip(i18n("Prints out the document"));
+     fileQuit->setToolTip(i18n("Quits the application"));
++    fileExportDocbook->setToolTip(i18n("Exports the model to the docbook format"));
++    fileExportXhtml->setToolTip(i18n("Exports the model to the XHTML format"));
+     editCut->setToolTip(i18n("Cuts the selected section and puts it to the clipboard"));
+     editCopy->setToolTip(i18n("Copies the selected section to the clipboard"));
+     editPaste->setToolTip(i18n("Pastes the contents of the clipboard"));
+@@ -458,6 +471,8 @@
+ 
+     m_listDock = createDockWidget( "Model", 0L, 0L, i18n("&Tree View") );
+     m_listView = new UMLListView(m_listDock ,"LISTVIEW");
++    m_listView->setDocument(m_doc);
++    m_listView->init();
+     m_listDock->setWidget(m_listView);
+     m_listDock->setDockSite(KDockWidget::DockCorner);
+     m_listDock->manualDock(m_mainDock, KDockWidget::DockLeft, 20);
+@@ -468,7 +483,6 @@
+     m_documentationDock->setDockSite(KDockWidget::DockCorner);
+     m_documentationDock->manualDock(m_listDock, KDockWidget::DockBottom, 80);
+ 
+-    m_listView->setDocument(m_doc);
+     m_doc->setupSignals();//make sure gets signal from list view
+ 
+     readDockConfig(); //reposition all the DockWindows to their saved positions
+@@ -807,6 +821,22 @@
+     slotStatusMsg(i18n("Ready."));
+ }
+ 
++void UMLApp::slotFileExportDocbook()
++{
++  DocbookGenerator().generateDocbookForProject();
++}
++    
++void UMLApp::slotFileExportXhtml()
++{
++  if (m_xhtmlGenerator != 0)
++  {
++    return;
++  }
++  m_xhtmlGenerator = new XhtmlGenerator();
++  m_xhtmlGenerator->generateXhtmlForProject();
++  connect(m_xhtmlGenerator,SIGNAL(finished()),this,SLOT(slotXhtmlDocGenerationFinished()));
++}
++    
+ void UMLApp::slotEditUndo() {
+     m_doc->loadUndoData();
+     slotStatusMsg(i18n("Ready."));
+@@ -1656,6 +1686,12 @@
+ #endif
+ }
+ 
++void UMLApp::slotXhtmlDocGenerationFinished()
++{
++  delete m_xhtmlGenerator;
++  m_xhtmlGenerator = 0;
++}
++
+ KTabWidget* UMLApp::tabWidget() {
+     return m_tabWidget;
+ }
+--- umbrello/umbrello/umlcanvasobject.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/umlcanvasobject.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -195,6 +195,11 @@
+         return m_List;
+     }
+ 
++    /**
++     * Reimplementation of UMLObject method.
++     */
++    virtual bool resolveRef();
++
+     // The abstract method UMLObject::saveToXMI() is implemented
+     // in the classes inheriting from UMLCanvasObject.
+ 
+--- umbrello/umbrello/umlobject.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/umlobject.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -9,10 +9,14 @@
+  *  Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>                  *
+  ***************************************************************************/
+ 
++// own header
++#include "umlobject.h"
++// qt/kde includes
+ #include <qregexp.h>
+ #include <kdebug.h>
+ #include <kapplication.h>
+-#include "umlobject.h"
++// app includes
++#include "uniqueid.h"
+ #include "uml.h"
+ #include "umldoc.h"
+ #include "umllistview.h"
+@@ -29,17 +33,17 @@
+         : QObject(const_cast<UMLObject*>(parent), "UMLObject" ) {
+     init();
+     if (id == Uml::id_None)
+-        m_nId = UMLApp::app()->getDocument()->getUniqueID();
++        m_nId = UniqueID::gen();
+     else
+         m_nId = id;
+     m_Name = name;
+ }
+ 
+ UMLObject::UMLObject(const QString &name, Uml::IDType id)
+-        :  QObject(UMLApp::app()->getDocument(), "UMLObject") {
++        :  QObject(UMLApp::app()->getDocument()) {
+     init();
+     if (id == Uml::id_None)
+-        m_nId = UMLApp::app()->getDocument()->getUniqueID();
++        m_nId = UniqueID::gen();
+     else
+         m_nId = id;
+     m_Name = name;
+@@ -82,35 +86,6 @@
+     return modified;
+ }
+ 
+-bool UMLObject::isSavedInSeparateFile() {
+-    if (Settings::getOptionState().generalState.tabdiagrams) {
+-        // Umbrello currently does not support external folders
+-        // when tabbed diagrams are enabled.
+-        return false;
+-    }
+-    const QString msgPrefix("UMLObject::isSavedInSeparateFile(" + m_Name + "): ");
+-    UMLListView *listView = UMLApp::app()->getListView();
+-    UMLListViewItem *lvItem = listView->findUMLObject(this);
+-    if (lvItem == NULL) {
+-        kdError() << msgPrefix
+-        << "listView->findUMLObject(this) returns false"
+-        << endl;
+-        return false;
+-    }
+-    UMLListViewItem *parentItem = dynamic_cast<UMLListViewItem*>( lvItem->parent() );
+-    if (parentItem == NULL) {
+-        kdError() << msgPrefix
+-        << "parent item in listview is not a UMLListViewItem (?)"
+-        << endl;
+-        return false;
+-    }
+-    const Uml::ListView_Type lvt = parentItem->getType();
+-    if (! UMLListView::typeIsFolder(lvt))
+-        return false;
+-    QString folderFile = parentItem->getFolderFile();
+-    return !folderFile.isEmpty();
+-}
+-
+ bool UMLObject::acceptAssociationType(Uml::Association_Type)
+ {// A UMLObject accepts nothing. This should be reimplemented by the subclasses
+     return false;
+@@ -198,8 +173,6 @@
+ 
+ void UMLObject::copyInto(UMLObject *rhs) const
+ {
+-    UMLDoc *umldoc = UMLApp::app()->getDocument();
+-
+     // Data members with copy constructor
+     rhs->m_Doc = m_Doc;
+     rhs->m_pStereotype = m_pStereotype;
+@@ -210,10 +183,10 @@
+     rhs->m_pUMLPackage = m_pUMLPackage;
+ 
+     // We don't want the same name existing twice.
+-    rhs->m_Name = Model_Utils::uniqObjectName(m_BaseType, m_Name, m_pUMLPackage);
++    rhs->m_Name = Model_Utils::uniqObjectName(m_BaseType, m_pUMLPackage, m_Name);
+ 
+     // Create a new ID.
+-    rhs->m_nId = umldoc->getUniqueID();
++    rhs->m_nId = UniqueID::gen();
+ 
+     // Hope that the parent from QObject is okay.
+     if (rhs->parent() != parent())
+@@ -296,6 +269,7 @@
+         }
+     }
+     m_pStereotype = stereo;
++    // TODO: don't emit modified() if predefined folder
+     emit modified();
+ }
+ 
+@@ -337,7 +311,7 @@
+     return m_pStereotype;
+ }
+ 
+-QString UMLObject::getStereotype(bool includeAdornments /* = false */) {
++QString UMLObject::getStereotype(bool includeAdornments /* = false */) const {
+     if (m_pStereotype == NULL)
+         return "";
+     QString name = m_pStereotype->getName();
+@@ -352,13 +326,11 @@
+     UMLPackageList pkgList;
+     QStringList pkgNames;
+     UMLPackage* pkg = m_pUMLPackage;
+-    while (1) {
++    do {
+         pkgList.prepend(pkg);
+         pkgNames.prepend(pkg->getName());
+-        if ((pkg = pkg->getUMLPackage()) == NULL ||
+-            pkgList.containsRef(pkg))
+-            break;
+-    }
++        pkg = pkg->getUMLPackage();
++    } while (pkg != NULL && !pkgList.containsRef(pkg));
+     if (separator.isEmpty())
+         separator = UMLApp::app()->activeLanguageScopeSeparator();
+     return pkgNames.join(separator);
+@@ -567,7 +539,7 @@
+         if (m_BaseType == Uml::ot_Role) {
+             // Before version 1.4, Umbrello did not save the xmi.id
+             // of UMLRole objects.
+-            m_nId = umldoc->getUniqueID();
++            m_nId = UniqueID::gen();
+         } else {
+             kdError() << "UMLObject::loadFromXMI(" << m_Name
+             << "): nonexistent or illegal xmi.id" << endl;
+@@ -750,7 +722,7 @@
+             UMLListViewItem *parentItem = (UMLListViewItem*)listView->currentItem();
+             if (parentItem) {
+                 Uml::ListView_Type lvt = parentItem->getType();
+-                if (lvt == Uml::lvt_Package ||
++                if (UMLListView::typeIsContainer(lvt) ||
+                         lvt == Uml::lvt_Class ||
+                         lvt == Uml::lvt_Interface) {
+                     UMLObject *o = parentItem->getUMLObject();
+@@ -758,12 +730,6 @@
+                 }
+             }
+         }
+-
+-        if (m_pUMLPackage)
+-            m_pUMLPackage->addObject(this);
+-        else
+-            umldoc->addUMLObject(this);
+-        //kapp->processEvents();
+     }
+     return load(element);
+ }
+--- umbrello/umbrello/model_utils.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/model_utils.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -74,15 +74,14 @@
+  * if the default name is taken e.g. new_actor, new_actor_1
+  * etc.
+  * @param type              The object type.
++ * @param parentPkg The package in which to compare the name.
+  * @param prefix    The prefix to use (optional.)
+  *                  If no prefix is given then a type related
+  *                  prefix will be chosen internally.
+- * @param parentPkg The package in which to compare the name (optional.)
+- *                  If not given then comparisons are done in the global scope.
+  */
+ QString uniqObjectName(Uml::Object_Type type,
+-                       QString prefix = QString::null,
+-                       UMLPackage *parentPkg = 0);
++                       UMLPackage *parentPkg,
++                       QString prefix = QString::null);
+ 
+ /**
+  * Return true if the given tag is a one of the common XMI
+@@ -105,6 +104,31 @@
+ bool isClassifierListitem(Uml::Object_Type ot);
+ 
+ /**
++ * Return the Model_Type which corresponds to the given Diagram_Type.
++ */
++Uml::Model_Type convert_DT_MT(Uml::Diagram_Type dt);
++
++/**
++ * Return the ListView_Type which corresponds to the given Model_Type.
++ */
++Uml::ListView_Type convert_MT_LVT(Uml::Model_Type mt);
++
++/**
++ * Return the Model_Type which corresponds to the given ListView_Type.
++ * Returns Uml::N_MODELTYPES if the list view type given does not map
++ * to a Model_Type.
++ */
++Uml::Model_Type convert_LVT_MT(Uml::ListView_Type lvt);
++
++/**
++ * Try to guess the correct container folder type of an UMLObject.
++ * Object types that can't be guessed are mapped to Uml::mt_Logical.
++ * NOTE: This function exists mainly for handling pre-1.5.5 files
++ *       and should not be used for new code.
++ */
++Uml::Model_Type guessContainer(UMLObject *o);
++
++/**
+  * Parse a direction string into the Uml::Parameter_Direction.
+  *
+  * @param input  The string to parse: "in", "out", or "inout"
+--- umbrello/umbrello/umldoc.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/umldoc.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -57,6 +57,7 @@
+ class ObjectWidget;
+ class UMLWidget;
+ class UMLPackage;
++class UMLFolder;
+ 
+ /**
+   * UMLDoc provides a document object for a document-view model.
+@@ -88,6 +89,12 @@
+     ~UMLDoc();
+ 
+     /**
++     * Initialize the UMLDoc.
++     * To be called after the constructor, before anything else.
++     */
++    void init();
++
++    /**
+      * Adds a view to the document which represents the document
+      * contents. Usually this is your main view.
+      *
+@@ -404,13 +411,6 @@
+     Uml::IDType getModelID() const;
+ 
+     /**
+-     * Used to give a unique ID to any sort of object.
+-     *
+-     * @return  A new unique ID.
+-     */
+-    Uml::IDType getUniqueID();
+-
+-    /**
+      * This method is called for saving the given model as a XMI file.
+      * It is virtual and calls the corresponding saveToXMI() functions
+      * of the derived classes.
+@@ -512,6 +512,15 @@
+     }
+ 
+     /**
++     * Returns the datatype folder.
++     *
++     * @return  Pointer to the predefined folder for datatypes.
++     */
++    UMLFolder * getDatatypeFolder() {
++        return m_datatypeRoot;
++    }
++
++    /**
+      * Returns a list of the concepts in this UMLDoc.
+      *
+      * @param includeNested             Whether to include the concepts from
+@@ -592,11 +601,9 @@
+      * any ids or signal.  Use AddUMLObjectPaste if pasting.
+      *
+      * @param object   The object to add.
+-     * @param prepend  True if wish to prepend the object to the object list
+-     *                 (default: append)
+      * @return  True if the object was actually added.
+      */
+-    bool addUMLObject(UMLObject * object, bool prepend = false);
++    bool addUMLObject(UMLObject * object);
+ 
+     /**
+      * Adds an already created UMLView to the document, it gets
+@@ -611,6 +618,11 @@
+     bool addUMLView(UMLView * pView );
+ 
+     /**
++     * Return the predefined root folder of the given type.
++     */
++    UMLFolder *getRootFolder(Uml::Model_Type mt);
++
++    /**
+      * Read property of IDChangeLog* m_pChangeLog.
+      *
+      * @return  Pointer to the IDChangeLog object.
+@@ -796,7 +808,16 @@
+      */
+     void initSaveTimer();
+ 
+-    UMLObjectList m_objectList;
++    /**
++     * Array of predefined root folders.
++     */
++    UMLFolder *m_root[Uml::N_MODELTYPES];
++    /**
++     * Predefined root folder for datatypes, contained in
++     * m_root[Uml::mt_Logical]
++     */
++    UMLFolder *m_datatypeRoot;
++    //UMLObjectList m_objectList;
+ 
+     /**
+      * The UMLDoc is the sole owner of all stereotypes.
+@@ -807,15 +828,6 @@
+      */
+     UMLStereotypeList m_stereoList;
+ 
+-    /**
+-     * In principle, each model object gets assigned a unique ID.
+-     * NOTE: Currently this is an int although Uml::IDType is a string
+-     *       (unless ID_USE_INT is defined.) Perhaps it should be changed
+-     *       to Uml::IDType but then we need a unique string generator.
+-     *       See also UMLView::m_nLocalID.
+-     */
+-    int m_uniqueID;
+-
+     QString m_Name; ///< name of this model as stored in the <UML:Model> tag
+     Uml::IDType m_modelID; ///< xmi.id of this model in the <UML:Model>
+     int m_count;   ///< auxiliary counter for the progress bar
+--- umbrello/umbrello/umbrelloui.rc	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/umbrelloui.rc	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -1,6 +1,12 @@
+ <!DOCTYPE kpartgui>
+ <kpartgui name="umbrello" version="11">
+ <MenuBar>
++  <Menu name="file"><text>&amp;File</text>
++      <Menu name="file_export"><text>&amp;Export</text>
++          <Action name="file_export_docbook"/>
++          <Action name="file_export_xhtml"/>
++      </Menu>
++  </Menu>
+   <Menu name="edit"><text>&amp;Edit</text>
+     <Action name="delete_selected"/>
+   </Menu>
+--- umbrello/umbrello/entity.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/entity.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -5,7 +5,7 @@
+  *   the Free Software Foundation; either version 2 of the License, or     *
+  *   (at your option) any later version.                                   *
+  *                                                                         *
+- *  copyright (C) 2003-2005                                                *
++ *  copyright (C) 2003-2006                                                *
+  *  Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>                  *
+  ***************************************************************************/
+ 
+@@ -19,6 +19,7 @@
+ #include "entityattribute.h"
+ #include "umldoc.h"
+ #include "uml.h"
++#include "uniqueid.h"
+ #include "clipboard/idchangelog.h"
+ #include "dialogs/umlentityattributedialog.h"
+ 
+@@ -51,9 +52,8 @@
+     m_BaseType = Uml::ot_Entity;
+ }
+ 
+-UMLObject* UMLEntity::createAttribute(const QString &name /*=null*/) {
+-    UMLDoc *umldoc = UMLApp::app()->getDocument();
+-    Uml::IDType id = umldoc->getUniqueID();
++UMLAttribute* UMLEntity::createAttribute(const QString &name /*=null*/) {
++    Uml::IDType id = UniqueID::gen();
+     QString currentName;
+     if (name.isNull())  {
+         currentName = uniqChildName(Uml::ot_EntityAttribute);
+@@ -89,6 +89,7 @@
+ 
+     addEntityAttribute(newAttribute);
+ 
++    UMLDoc *umldoc = UMLApp::app()->getDocument();
+     umldoc->signalUMLObjectCreated(newAttribute);
+     return newAttribute;
+ }
+--- umbrello/umbrello/umldoc.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/umldoc.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -42,9 +42,11 @@
+ #endif
+ 
+ // app includes
++#include "uniqueid.h"
+ #include "associationwidget.h"
+ #include "association.h"
+ #include "package.h"
++#include "folder.h"
+ #include "codegenerator.h"
+ #include "datatype.h"
+ #include "enum.h"
+@@ -72,9 +74,6 @@
+ #include "listpopupmenu.h"
+ #include "version.h"
+ 
+-# define EXTERNALIZE_ID(id)  QString::number(id).ascii()
+-# define INTERNALIZE_ID(id)  ID2STR(id).toInt()
+-
+ #define XMI_FILE_VERSION UMBRELLO_VERSION
+ // For the moment, the XMI_FILE_VERSION changes with each UMBRELLO_VERSION.
+ // But someday that may stabilize ;)
+@@ -87,13 +86,7 @@
+     m_Name = i18n("UML Model");
+     m_modelID = "m1";
+     m_currentView = 0;
+-    m_uniqueID = 0;
+     m_count = 0;
+-    m_objectList.clear();
+-    m_objectList.setAutoDelete(false); // DON'T autodelete
+-    m_stereoList.setAutoDelete(false);
+-    m_ViewList.setAutoDelete(true);
+-
+     m_pChangeLog = 0;
+     m_Doc = "";
+     m_modified = false;
+@@ -102,6 +95,26 @@
+     m_pAutoSaveTimer = 0;
+     m_nViewID = Uml::id_None;
+     m_pTabPopupMenu = 0;
++}
++
++void UMLDoc::init() {
++    // Initialize predefined folders.
++    const QString predefinedName[Uml::N_MODELTYPES] = {
++        i18n("Logical View"),
++        i18n("Use Case View"),
++        i18n("Component View"),
++        i18n("Deployment View"),
++        i18n("Entity Relationship Model")
++    };
++    for (int i = 0; i < Uml::N_MODELTYPES; i++) {
++        m_root[i] = new UMLFolder(predefinedName[i]);
++        m_root[i]->markPredefined();
++    }
++    m_datatypeRoot = new UMLFolder(i18n("Datatypes"));
++    m_datatypeRoot->markPredefined();
++    m_root[Uml::mt_Logical]->addObject(m_datatypeRoot);
++
++    // Connect signals.
+     UMLApp * pApp = UMLApp::app();
+     connect(this, SIGNAL(sigDiagramCreated(Uml::IDType)), pApp, SLOT(slotUpdateViews()));
+     connect(this, SIGNAL(sigDiagramRemoved(Uml::IDType)), pApp, SLOT(slotUpdateViews()));
+@@ -118,6 +131,9 @@
+     UMLApp * pApp = UMLApp::app();
+     if ( pApp->getListView() )
+         connect(this, SIGNAL(sigObjectRemoved(UMLObject *)), view, SLOT(slotObjectRemoved(UMLObject *)));
++    Uml::Model_Type mt = Model_Utils::convert_DT_MT(view->getType());
++ ///////////// TODO folders
++
+     m_ViewList.append(view);
+ 
+     if ( ! m_bLoading ) {
+@@ -264,66 +280,24 @@
+         //      addToUndoStack().
+         removeAllViews();
+         m_bLoading = m_bLoading_old;
+-        if (m_objectList.count() > 0) {
+-            /* Remove associations at their participating concepts first.
+-             * @fixme this SHOULD be done but it crashes as follows:
+-==30179== Invalid read of size 4
+-==30179==    at 0x813EFCA: ClassifierCodeDocument::getParentClassifier() (classifiercodedocument.cpp:241)
+-==30179==    by 0x8196B0F: OwnedHierarchicalCodeBlock::syncToParent() (ownedhierarchicalcodeblock.cpp:103)
+-==30179==    by 0x8196C2D: OwnedHierarchicalCodeBlock::qt_invoke(int, QUObject*) (ownedhierarchicalcodeblock.moc:84)
+-==30179==    by 0x82AEE31: JavaClassDeclarationBlock::qt_invoke(int, QUObject*) (javaclassdeclarationblock.moc:77)
+-==30179==    by 0x1C70AB45: QObject::activate_signal(QConnectionList*, QUObject*) (in /usr/lib/qt3/lib/libqt-mt.so.3.3.4)
+-==30179==    by 0x1C70A9E6: QObject::activate_signal(int) (in /usr/lib/qt3/lib/libqt-mt.so.3.3.4)
+-==30179==    by 0x81D9C64: UMLObject::modified() (umlobject.moc:86)
+-==30179==    by 0x81B2C9C: UMLCanvasObject::removeAssociation(UMLAssociation*) (umlcanvasobject.cpp:83)
+-==30179==    by 0x81B8E18: UMLDoc::removeAssocFromConcepts(UMLAssociation*) (umldoc.cpp:947)
+-==30179==    by 0x81B541B: UMLDoc::closeDocument() (umldoc.cpp:279)
+-
+-==30179==  Address 0x1D48CF4C is 156 bytes inside a block of size 192 free'd
+-==30179==    at 0x1B902BF5: operator delete(void*) (vg_replace_malloc.c:155)
+-==30179==    by 0x82A5F39: JavaClassifierCodeDocument::~JavaClassifierCodeDocument() (javaclassifiercodedocument.cpp:44)
+-==30179==    by 0x814F66B: CodeGenerator::~CodeGenerator() (codegenerator.cpp:72)
+-==30179==    by 0x82A0F67: JavaCodeGenerator::~JavaCodeGenerator() (javacodegenerator.cpp:45)
+-==30179==    by 0x81B80EE: UMLDoc::removeCodeGenerator(CodeGenerator*) (umldoc.cpp:737)
+-==30179==    by 0x81B532E: UMLDoc::closeDocument() (umldoc.cpp:255)
+-
+-==30179== Invalid read of size 4
+-==30179==    at 0x82AE56B: JavaClassDeclarationBlock::updateContent() (javaclassdeclarationblock.cpp:67)
+-==30179==    by 0x8196B0F: OwnedHierarchicalCodeBlock::syncToParent() (ownedhierarchicalcodeblock.cpp:103)
+-==30179==    by 0x8196C2D: OwnedHierarchicalCodeBlock::qt_invoke(int, QUObject*) (ownedhierarchicalcodeblock.moc:84)
+-==30179==    by 0x82AEE31: JavaClassDeclarationBlock::qt_invoke(int, QUObject*) (javaclassdeclarationblock.moc:77)
+-==30179==    by 0x1C70AB45: QObject::activate_signal(QConnectionList*, QUObject*) (in /usr/lib/qt3/lib/libqt-mt.so.3.3.4)
+-==30179==    by 0x1C70A9E6: QObject::activate_signal(int) (in /usr/lib/qt3/lib/libqt-mt.so.3.3.4)
+-==30179==    by 0x81D9C64: UMLObject::modified() (umlobject.moc:86)
+-==30179==    by 0x81B2C9C: UMLCanvasObject::removeAssociation(UMLAssociation*) (umlcanvasobject.cpp:83)
+-==30179==    by 0x81B8E18: UMLDoc::removeAssocFromConcepts(UMLAssociation*) (umldoc.cpp:947)
+-==30179==    by 0x81B541B: UMLDoc::closeDocument() (umldoc.cpp:279)
+-
+-==30179==  Address 0x1D48CEB0 is 0 bytes inside a block of size 192 free'd
+-==30179==    at 0x1B902BF5: operator delete(void*) (vg_replace_malloc.c:155)
+-==30179==    by 0x82A5F39: JavaClassifierCodeDocument::~JavaClassifierCodeDocument() (javaclassifiercodedocument.cpp:44)
+-==30179==    by 0x814F66B: CodeGenerator::~CodeGenerator() (codegenerator.cpp:72)
+-==30179==    by 0x82A0F67: JavaCodeGenerator::~JavaCodeGenerator() (javacodegenerator.cpp:45)
+-==30179==    by 0x81B80EE: UMLDoc::removeCodeGenerator(CodeGenerator*) (umldoc.cpp:737)
+-==30179==    by 0x81B532E: UMLDoc::closeDocument() (umldoc.cpp:255)
+-            for (UMLObject * obj = m_objectList.first(); obj != 0; obj = m_objectList.next()) {
+-                if (obj->getBaseType() == Uml::ot_Association) {
+-                    UMLAssociation *assoc = static_cast<UMLAssociation*>(obj);
+-                    removeAssocFromConcepts(assoc);
+-                }
+-            }
+-             */
+-
+-            // clear our object list. We do this explicitly since setAutoDelete is false for the objectList now.
+-            for(UMLObject * obj = m_objectList.first(); obj != 0; obj = m_objectList.next())
+-                delete obj;
+-            m_objectList.clear();
+-        }
++        // Remove all objects from the predefined folders.
++        // @fixme With advanced code generation enabled, this crashes.
++        UMLObject *obj;
++        for (int i = 0; i < Uml::N_MODELTYPES; i++)
++            m_root[i]->removeAllObjects();
++        // Restore the datatype folder, it has been deleted above.
++        m_datatypeRoot = new UMLFolder(i18n("Datatypes"));
++        m_datatypeRoot->markPredefined();
++        m_root[Uml::mt_Logical]->addObject(m_datatypeRoot);
++        listView->theDatatypeFolder()->setUMLObject(m_datatypeRoot);
++        /* Remove any stereotypes.
+         if (m_stereoList.count() > 0) {
+-            for (UMLStereotype *s = m_stereoList.first(); s; s = m_stereoList.next())
++            UMLStereotype *s;
++            for (UMLStereotypeListIt sit(m_stereoList); (s = sit.current()) != 0; ++sit)
+                 delete s;
+             m_stereoList.clear();
+         }
++         */
+     }
+     m_bTypesAreResolved = false;
+ }
+@@ -763,9 +737,16 @@
+ }
+ 
+ UMLObject* UMLDoc::findObjectById(Uml::IDType id) {
+-    UMLObject *o = Model_Utils::findObjectInList(id, m_objectList);
+-    if (o == NULL)
+-        o = findStereotypeById(id);
++    UMLObject *o = NULL;
++    for (int i = 0; i < Uml::N_MODELTYPES; i++) {
++        if (id == m_root[i]->getID())
++            return m_root[i];
++        UMLObjectList list = m_root[i]->containedObjects(true); //include associations
++        o = Model_Utils::findObjectInList(id, list);
++        if (o)
++            return o;
++    }
++    o = findStereotypeById(id);
+     return o;
+ }
+ 
+@@ -780,7 +761,16 @@
+ UMLObject* UMLDoc::findUMLObject(const QString &name,
+                                  Object_Type type /* = ot_UMLObject */,
+                                  UMLObject *currentObj /* = NULL */) {
+-    return Model_Utils::findUMLObject(m_objectList, name, type, currentObj);
++    for (int i = 0; i < Uml::N_MODELTYPES; i++) {
++        UMLObjectList list = m_root[i]->containedObjects();
++        UMLObject *o = Model_Utils::findUMLObject(list, name, type, currentObj);
++        if (o)
++            return o;
++        if ((type == ot_UMLObject || type == ot_Folder) &&
++             name == m_root[i]->getName())
++            return m_root[i];
++    }
++    return NULL;
+ }
+ 
+ UMLClassifier* UMLDoc::findUMLClassifier(const QString &name) {
+@@ -794,12 +784,12 @@
+   *   any ids or signal.  Used by the list view.  Use
+   *   AddUMLObjectPaste if pasting.
+   */
+-bool UMLDoc::addUMLObject(UMLObject* object, bool prepend) {
++bool UMLDoc::addUMLObject(UMLObject* object) {
+     Object_Type ot = object->getBaseType();
+     if (ot == ot_Attribute || ot == ot_Operation || ot == ot_EnumLiteral
+             || ot == ot_EntityAttribute || ot == ot_Template || ot == ot_Stereotype) {
+         kdDebug() << "UMLDoc::addUMLObject(" << object->getName()
+-        << "): not adding type " << ot << endl;
++            << "): not adding type " << ot << endl;
+         return false;
+     }
+     UMLPackage *pkg = object->getUMLPackage();
+@@ -808,6 +798,7 @@
+                   << "): adding at containing package instead" << endl;
+         return pkg->addObject(object);
+     }
++    /*
+     //stop it being added twice
+     if (m_objectList.find(object) != -1)  {
+         kdDebug() << "UMLDoc::addUMLObject: not adding " << object->getName()
+@@ -818,7 +809,11 @@
+         m_objectList.prepend(object);
+     else
+         m_objectList.append(object);
+-    return true;
++     */
++    kdError() << "UMLDoc::addUMLObject(" << object->getName()
++       << "): no parent package set !" << endl;
++    kdBacktrace(25);
++    return false;
+ }
+ 
+ void UMLDoc::addStereotype(const UMLStereotype *s) {
+@@ -837,7 +832,14 @@
+ 
+ // simple removal of an object
+ void UMLDoc::slotRemoveUMLObject(UMLObject* object)  {
+-    m_objectList.remove(object);
++    //m_objectList.remove(object);
++    UMLPackage *pkg = object->getUMLPackage();
++    if (pkg == NULL) {
++        kdError() << "UMLDoc::slotRemoveUMLObject(" << object->getName()
++            << "): parent package is not set !" << endl;
++        return;
++    }
++    pkg->removeObject(object);
+ }
+ 
+ bool UMLDoc::isUnique(const QString &name)
+@@ -853,24 +855,26 @@
+     {
+         // its possible that the current item *is* a package, then just
+         // do check now
+-        if(currentItem->getType() == lvt_Package)
++        if (UMLListView::typeIsContainer(currentItem->getType()))
+             return isUnique (name, (UMLPackage*) currentItem->getUMLObject());
+         parentItem = (UMLListViewItem*)currentItem->parent();
+     }
+ 
+     // item is in a package so do check only in that
+-    if (parentItem != NULL && parentItem->getType() == lvt_Package) {
+-        UMLPackage *parentPkg = (UMLPackage*)parentItem->getUMLObject();
++    if (parentItem != NULL && UMLListView::typeIsContainer(parentItem->getType())) {
++        UMLPackage *parentPkg = static_cast<UMLPackage*>(parentItem->getUMLObject());
+         return isUnique(name, parentPkg);
+     }
+ 
+-    // Not currently in a package:
+-    // Check against all objects that _don't_ have a parent package.
++    kdError() << "UMLDoc::isUnique(" << name << "): Not currently in a package"
++        << endl;
++    /* Check against all objects that _don't_ have a parent package.
+     for (UMLObjectListIt oit(m_objectList); oit.current(); ++oit) {
+         UMLObject *obj = oit.current();
+         if (obj->getUMLPackage() == NULL && obj->getName() == name)
+             return false;
+     }
++     */
+     return true;
+ }
+ 
+@@ -880,13 +884,16 @@
+     if (package)
+         return (package->findObject(name) == NULL);
+ 
+-    // Not currently in a package:
+-    // Check against all objects that _don't_ have a parent package.
++    // Not currently in a package: ERROR
++    kdError() << "UMLDoc::isUnique(2)(" << name << "): Not currently in a package"
++        << endl;
++    /* Check against all objects that _don't_ have a parent package.
+     for (UMLObjectListIt oit(m_objectList); oit.current(); ++oit) {
+         UMLObject *obj = oit.current();
+         if (obj->getUMLPackage() == NULL && obj->getName() == name)
+             return false;
+     }
++     */
+     return true;
+ }
+ 
+@@ -915,8 +922,15 @@
+     removeAssocFromConcepts(assoc);
+ 
+     // Remove the UMLAssociation from m_objectList.
+-    UMLObject *object = (UMLObject *) assoc;
+-    m_objectList.remove(object);
++    UMLPackage *pkg = assoc->getUMLPackage();
++    if (pkg == NULL) {
++        kdError() << "UMLDoc::removeAssociation(" << assoc->getName()
++            << "): parent package is not set !" << endl;
++        return;
++    }
++    pkg->removeAssociation(assoc);
++    /* UMLObject *object = (UMLObject *) assoc;
++    m_objectList.remove(object);  */
+ 
+     // so we will save our document
+     setModified(true, false);
+@@ -979,7 +993,7 @@
+         if (a == Assoc)
+         {
+             kdDebug() << "UMLDoc::addAssociation: duplicate addition attempted"
+-            << endl;
++                << endl;
+             return;
+         }
+     }
+@@ -994,7 +1008,14 @@
+         addAssocToConcepts(Assoc);
+ 
+     // Add the UMLAssociation in this UMLDoc.
+-    m_objectList.append( (UMLObject*) Assoc);
++    UMLPackage *pkg = Assoc->getUMLPackage();
++    if (pkg == NULL) {
++        kdError() << "UMLDoc::addAssociation(" << Assoc->getName()
++            << "): parent package is not set !" << endl;
++        return;
++    }
++    pkg->addAssociation(Assoc);
++    //m_objectList.append( (UMLObject*) Assoc);
+ 
+     // I don't believe this appropriate, UMLAssociations ARENT UMLWidgets -b.t.
+     // emit sigObjectCreated(o);
+@@ -1074,12 +1095,12 @@
+             temp -> setOptionState( Settings::getOptionState() );
+             temp->setName( name );
+             temp->setType( type );
+-            temp->setID( getUniqueID() );
++            temp->setID( UniqueID::gen() );
+             addView(temp);
+-            emit sigDiagramCreated( EXTERNALIZE_ID(m_uniqueID) );
++            emit sigDiagramCreated( UniqueID::get() );
+             setModified(true, false);
+             UMLApp::app()->enablePrint(true);
+-            changeCurrentView( EXTERNALIZE_ID(m_uniqueID) );
++            changeCurrentView( UniqueID::get() );
+             break;
+         } else {
+             KMessageBox::error(0, i18n("A diagram is already using that name."), i18n("Not a Unique Name"));
+@@ -1205,7 +1226,7 @@
+         UMLClassifier* parent = dynamic_cast<UMLClassifier*>(umlobject->parent());
+         if (parent == NULL) {
+             kdError() << "UMLDoc::removeUMLObject: parent of umlobject is NULL"
+-            << endl;
++                << endl;
+             return;
+         }
+         emit sigObjectRemoved(umlobject);
+@@ -1221,7 +1242,7 @@
+             UMLClassifier* pClass = dynamic_cast<UMLClassifier*>(parent);
+             if (pClass == NULL)  {
+                 kdError() << "UMLDoc::removeUMLObject: parent of umlobject has "
+-                << "unexpected type " << parent->getBaseType() << endl;
++                    << "unexpected type " << parent->getBaseType() << endl;
+                 return;
+             }
+             if (type == ot_Attribute) {
+@@ -1230,7 +1251,7 @@
+                 pClass->removeTemplate(static_cast<UMLTemplate*>(umlobject));
+             } else {
+                 kdError() << "UMLDoc::removeUMLObject: umlobject has "
+-                << "unexpected type " << type << endl;
++                    << "unexpected type " << type << endl;
+             }
+         }
+     } else {
+@@ -1270,7 +1291,9 @@
+         if (pkg) {
+             pkg->removeObject(umlobject);
+         } else {
+-            m_objectList.remove(umlobject);
++            //m_objectList.remove(umlobject);
++            kdError() << "UMLDoc::removeUMLObject(" << umlobject->getName()
++                << "): parent package is not set !" << endl;
+         }
+         emit sigObjectRemoved(umlobject);
+     }
+@@ -1385,59 +1408,53 @@
+     for (UMLStereotype *s = m_stereoList.first(); s; s = m_stereoList.next() ) {
+         s->saveToXMI(doc, ownedNS);
+     }
+-
+-    for (UMLObjectListIt oit(m_objectList); oit.current(); ++oit) {
+-        UMLObject *o = oit.current();
+-        if (o->getBaseType() != ot_Datatype ||
+-                (saveSubmodelFiles && o->isSavedInSeparateFile()))
++    for (int i = 0; i < Uml::N_MODELTYPES; i++) {
++        m_root[i]->saveToXMI(doc, ownedNS);
++    }
++    /*
++    UMLObject *o;
++    for (UMLObjectListIt oit(m_datatypeRoot->containedObjects());
++            (o = oit.current()) != NULL; ++oit) {
++        if (o->getBaseType() != ot_Datatype) {
++            kdError() << "UMLDoc::saveToXMI(datatypes): " << o->getName()
++                << " is not a datatype!" << endl;
+             continue;
++        }
+         o->saveToXMI(doc, ownedNS);
+     }
+-
+-#ifdef XMI_FLAT_PACKAGES
+-    // Save packages first so that when loading they are known first.
+-    // This simplifies the establishing of cross reference links from
+-    // contained objects to their containing package.
+-    for (UMLObject *p = m_objectList.first(); p; p = m_objectList.next() ) {
+-        if (p->getBaseType() != ot_Package)
+-            continue;
+-        p->saveToXMI(doc, ownedNS);
+-    }
+-#endif
+-
+     // Save everything except operations, attributes, and associations.
+     // Operations and attributes are owned by classifiers and will show up
+     // as their child nodes.
+     // Associations are saved in an extra step (see below.)
+     for (UMLObjectListIt oit(m_objectList); oit.current(); ++oit) {
+         UMLObject *o = oit.current();
+-        if (saveSubmodelFiles && o->isSavedInSeparateFile())
++        const Object_Type t = o->getBaseType();
++        // Objects contained in a package are already saved by UMLPackage::saveToXMI().
++        // @todo Eliminate adding of objects with non-NULL parent package in m_objectList
++        if (o->getUMLPackage()) {
++            kdDebug() << "UMLDoc::saveToXMI(" << o->getName()
++                << "): UMLPackage is set - this object should not be in m_objectList!"
++                << endl;
+             continue;
+-        Object_Type t = o->getBaseType();
+-#if defined (XMI_FLAT_PACKAGES)
+-        if (t == ot_Package)
+-            continue;
+-#else
+-        // Objects contained in a package are already saved by
+-        // UMLPackage::saveToXMI().
+-        if (o->getUMLPackage())
+-            continue;
+-#endif
++        }
++        if (saveSubmodelFiles && t == ot_Package) {
++            UMLPackage *pkg = static_cast<UMLPackage*>(o);
++            if (pkg->isSavedInSeparateFile())
++                continue;
++        }
+         if (t == ot_Association || t == ot_Datatype)
+             continue;
+         if (t == ot_Stereotype || t == ot_Template) {
+             kdDebug() << "UMLDoc::saveToXMI(" << o->getName()
+-            << "): FIXME: type " << t
+-            << " is not supposed to be in m_objectList"
+-            << endl;
++                << "): FIXME: type " << t
++                << " is not supposed to be in m_objectList" << endl;
+             continue;
+         }
+         if (t == ot_EnumLiteral || t == ot_EntityAttribute ||
+                 t == ot_Attribute || t == ot_Operation) {
+             kdError() << "UMLDoc::saveToXMI(" << o->getName()
+-            << "): internal error: type " << t
+-            << " is not supposed to be in m_objectList"
+-            << endl;
++                << "): internal error: type " << t
++                << " is not supposed to be in m_objectList" << endl;
+             continue;
+         }
+         o->saveToXMI(doc, ownedNS);
+@@ -1450,6 +1467,7 @@
+     UMLAssociationList alist = getAssociations();
+     for (UMLAssociation * a = alist.first(); a; a = alist.next())
+         a->saveToXMI(doc, ownedNS);
++     */
+ 
+     objectsElement.appendChild( ownedNS );
+ 
+@@ -1467,7 +1485,7 @@
+         viewID = m_currentView -> getID();
+     docElement.setAttribute( "viewid", ID2STR(viewID) );
+     docElement.setAttribute( "documentation", m_Doc );
+-    docElement.setAttribute( "uniqueid", m_uniqueID );
++    docElement.setAttribute( "uniqueid", ID2STR(UniqueID::get()) );
+     extensions.appendChild( docElement );
+ 
+     // Save each view/diagram.
+@@ -1590,7 +1608,7 @@
+     int line;
+     if( !doc.setContent( data, false, &error, &line ) ) {
+         kdError() << "UMLDoc::loadFolderFile: Can't set content:"
+-        << error << " line:" << line << endl;
++            << error << " line:" << line << endl;
+         return false;
+     }
+     QDomNode rootNode = doc.firstChild();
+@@ -1605,7 +1623,7 @@
+     QString type = element.tagName();
+     if (type != "external_file") {
+         kdError() << "UMLDoc::loadFolderFile: Root node has unknown type "
+-        << type << endl;
++            << type << endl;
+         return false;
+     }
+     for (QDomNode node = rootNode.firstChild(); !node.isNull(); node = node.nextSibling()) {
+@@ -1617,18 +1635,19 @@
+             bool success = pView->loadFromXMI(element);
+             if (!success) {
+                 kdWarning() << "UMLDoc::loadFolderFile(" << filename
+-                << "): failed load on viewdata loadfromXMI" << endl;
++                    << "): failed load on viewdata loadfromXMI" << endl;
+                 delete pView;
+                 return false;
+             }
+             pView->hide();
+             addView(pView);
+         } else {
+-            UMLObject *pObject = Object_Factory::makeObjectFromXMI(type);
++            QString stID = element.attribute("stereotype", "");
++            UMLObject *pObject = Object_Factory::makeObjectFromXMI(type, stID);
+             if (pObject) {
+                 if (! pObject->loadFromXMI(element)) {
+                     kdError() << "UMLDoc::loadFolderFile(" << filename
+-                    << "): Error loading type " << type << endl;
++                        << "): Error loading type " << type << endl;
+                     delete pObject;
+                 } else {
+                     if (addUMLObject(pObject))
+@@ -1636,7 +1655,7 @@
+                 }
+             } else {
+                 kdError() << "UMLDoc::loadFolderFile(" << filename
+-                << "): Ignoring unknown type " << type << endl;
++                    << "): Ignoring unknown type " << type << endl;
+             }
+         }
+     }
+@@ -1716,7 +1735,7 @@
+         if (outerTag != "XMI.content" ) {
+             if (!recognized)
+                 kdDebug() << "UMLDoc::loadFromXMI: skipping <"
+-                << outerTag << ">" << endl;
++                    << outerTag << ">" << endl;
+             continue;
+         }
+         bool seen_UMLObjects = false;
+@@ -1754,7 +1773,7 @@
+                 // by the Unisys.JCR.1 Rose-to-XMI tool.
+                 if (! seen_UMLObjects) {
+                     kdDebug() << "skipping TaggedValue because not seen_UMLObjects"
+-                    << endl;
++                        << endl;
+                     continue;
+                 }
+                 tag = element.attribute("tag", "");
+@@ -1764,13 +1783,13 @@
+                 QString modelElement = element.attribute("modelElement", "");
+                 if (modelElement.isEmpty()) {
+                     kdDebug() << "skipping TaggedValue(documentation) because "
+-                    << "modelElement.isEmpty()" << endl;
++                        << "modelElement.isEmpty()" << endl;
+                     continue;
+                 }
+                 UMLObject *o = findObjectById(STR2ID(modelElement));
+                 if (o == NULL) {
+                     kdDebug() << "TaggedValue(documentation): cannot find object"
+-                    << " for modelElement " << modelElement << endl;
++                        << " for modelElement " << modelElement << endl;
+                     continue;
+                 }
+                 QString value = element.attribute("value", "");
+@@ -1832,11 +1851,11 @@
+         return;
+     m_bTypesAreResolved = true;
+     writeToStatusBar( i18n("Resolving object references...") );
+-    for (UMLObjectListIt oit(m_objectList); oit.current(); ++oit) {
+-        UMLObject *obj = oit.current();
++    for (int i = 0; i < Uml::N_MODELTYPES; i++) {
++       UMLFolder *obj = m_root[i];
+ #ifdef VERBOSE_DEBUGGING
+         kdDebug() << "UMLDoc: invoking resolveRef() for " << obj->getName()
+-        << " (id=" << ID2STR(obj->getID()) << ")" << endl;
++            << " (id=" << ID2STR(obj->getID()) << ")" << endl;
+ #endif
+         obj->resolveRef();
+     }
+@@ -1889,6 +1908,20 @@
+             continue;
+         QDomElement tempElement = node.toElement();
+         QString type = tempElement.tagName();
++        if (tagEq(type, "Model")) {
++            bool foundUmbrelloRootFolder = false;
++            QString name = tempElement.attribute("name");
++            for (int i = 0; i < Uml::N_MODELTYPES; i++) {
++                if (name == m_root[i]->getName()) {
++                    m_root[i]->loadFromXMI(tempElement);
++                    foundUmbrelloRootFolder = true;
++                    break;
++                }
++            }
++            if (foundUmbrelloRootFolder)
++                continue;
++        }
++        // From here on, it's support for stereotypes, pre 1.5.5 versions, and foreign files
+         if (tagEq(type, "Namespace.ownedElement") ||
+                 tagEq(type, "Namespace.contents") ||
+                 tagEq(type, "Model") || tagEq(type, "ModelElement.stereotype")) {
+@@ -1910,14 +1943,15 @@
+             QString idref = tempElement.attribute("xmi.idref", "");
+             if (! idref.isEmpty()) {
+                 kdDebug() << "resolution of xmi.idref " << idref
+-                << " is not yet implemented" << endl;
++                    << " is not yet implemented" << endl;
+             } else {
+                 kdError() << "Cannot load " << type
+-                << " because xmi.id is missing" << endl;
++                    << " because xmi.id is missing" << endl;
+             }
+             continue;
+         }
+-        UMLObject *pObject = Object_Factory::makeObjectFromXMI(type);
++        QString stID = tempElement.attribute("stereotype", "");
++        UMLObject *pObject = Object_Factory::makeObjectFromXMI(type, stID);
+         if( !pObject ) {
+             kdWarning() << "Unknown type of umlobject to create: " << type << endl;
+             // We want a best effort, therefore this is handled as a
+@@ -1929,30 +1963,35 @@
+             bNativityIsDetermined = determineNativity(xmiId);
+         }
+         bool status = pObject -> loadFromXMI( tempElement );
+-        if (tagEq(type, "Association") ||
+-                tagEq(type, "AssociationClass") ||
+-                tagEq(type, "Generalization") ||
+-                tagEq(type, "Realization") ||
+-                tagEq(type, "Abstraction") ||
+-                tagEq(type, "Dependency")) {
+-            if ( !status ) {
+-                // Some interim umbrello versions saved empty UML:Associations,
+-                // thus we tolerate problems loading them.
+-                // May happen when dealing with the pre-1.2 file format.
+-                // In this case all association info is given in the
+-                // UML:AssocWidget section.  --okellogg
+-                // removeAssociation((UMLAssociation*)pObject);
+-                delete pObject;
+-            } else {
+-                addAssociation((UMLAssociation*) pObject);
+-            }
+-        } else if ( !status ) {
++        if ( !status ) {
+             delete pObject;
+             return false;
+-        } else if (pObject->getBaseType() == ot_Stereotype) {
++        }
++        Uml::Object_Type ot = pObject->getBaseType();
++        if (ot == ot_Stereotype) {
+             UMLStereotype *s = static_cast<UMLStereotype*>(pObject);
+             addStereotype(s);
++            continue;
+         }
++        UMLPackage *pkg = pObject->getUMLPackage();
++        if (pkg == NULL) {
++            if (ot == Uml::ot_Datatype) {
++                pkg = m_datatypeRoot;
++            } else {
++                Uml::Model_Type guess = Model_Utils::guessContainer(pObject);
++                pkg = m_root[guess];
++                /* Associations:
++                      "Association"
++                      "AssociationClass"
++                      "Generalization"
++                      "Realization"
++                      "Abstraction"
++                      "Dependency"
++                 */
++            }
++            pObject->setUMLPackage(pkg);
++        }
++        pkg->addObject(pObject);
+ 
+         /* FIXME see comment at loadUMLObjectsFromXMI
+         emit sigSetStatusbarProgress( ++m_count );
+@@ -1975,7 +2014,7 @@
+         QString uniqueid = element.attribute( "uniqueid", "0" );
+ 
+         m_nViewID = STR2ID(viewID);
+-        m_uniqueID = uniqueid.toInt();
++        UniqueID::set(STR2ID(uniqueid));
+         UMLApp::app()->getDocWindow() -> newDocumentation();
+ 
+     } else if (tag == "diagrams" || tag == "UISModelElement") {
+@@ -2076,72 +2115,35 @@
+ 
+ UMLClassifierList UMLDoc::getConcepts(bool includeNested /* =true */) {
+     UMLClassifierList conceptList;
+-    for (UMLObjectListIt oit(m_objectList); oit.current(); ++oit) {
+-        UMLObject *obj = oit.current();
+-        Uml::Object_Type ot = obj->getBaseType();
+-        if(ot == ot_Class || ot == ot_Interface || ot == ot_Datatype ||
+-                ot == ot_Enum || ot == ot_Entity) {
+-            conceptList.append((UMLClassifier *)obj);
+-        } else if (includeNested && ot == ot_Package) {
+-            UMLPackage *pkg = static_cast<UMLPackage *>(obj);
+-            pkg->appendClassifiers(conceptList);
+-        }
+-    }
++    m_root[mt_Logical]->appendClassifiers(conceptList, includeNested);
+     return conceptList;
+ }
+ 
+ UMLClassifierList UMLDoc::getClasses(bool includeNested /* =true */) {
+     UMLClassifierList conceptList;
+-    for (UMLObjectListIt oit(m_objectList); oit.current(); ++oit) {
+-        UMLObject *obj = oit.current();
+-        Uml::Object_Type ot = obj->getBaseType();
+-        if (ot == ot_Class)  {
+-            conceptList.append((UMLClassifier*)obj);
+-        } else if (includeNested && ot == ot_Package) {
+-            UMLPackage *pkg = static_cast<UMLPackage *>(obj);
+-            pkg->appendClasses(conceptList);
+-        }
+-    }
++    m_root[mt_Logical]->appendClasses(conceptList, includeNested);
+     return conceptList;
+ }
+ 
+ UMLClassifierList UMLDoc::getClassesAndInterfaces(bool includeNested /* =true */) {
+     UMLClassifierList conceptList;
+-    for (UMLObjectListIt oit(m_objectList); oit.current(); ++oit) {
+-        UMLObject *obj = oit.current();
+-        Uml::Object_Type ot = obj->getBaseType();
+-        if(ot == ot_Class || ot == ot_Interface || ot == ot_Enum)  {
+-            conceptList.append((UMLClassifier *)obj);
+-        } else if (includeNested && ot == ot_Package) {
+-            UMLPackage *pkg = static_cast<UMLPackage *>(obj);
+-            pkg->appendClassesAndInterfaces(conceptList);
+-        }
+-    }
++    m_root[mt_Logical]->appendClassesAndInterfaces(conceptList, includeNested);
+     return conceptList;
+ }
+ 
+ UMLClassifierList UMLDoc::getInterfaces(bool includeNested /* =true */) {
+     UMLClassifierList interfaceList;
+-    for (UMLObjectListIt oit(m_objectList); oit.current(); ++oit) {
+-        UMLObject *obj = oit.current();
+-        Uml::Object_Type ot = obj->getBaseType();
+-        if (ot == ot_Interface) {
+-            UMLClassifier *c = static_cast<UMLClassifier*>(obj);
+-            interfaceList.append(c);
+-        } else if (includeNested && ot == ot_Package) {
+-            UMLPackage *pkg = static_cast<UMLPackage *>(obj);
+-            pkg->appendInterfaces(interfaceList);
+-        }
+-    }
++    m_root[mt_Logical]->appendInterfaces(interfaceList, includeNested);
+     return interfaceList;
+ }
+ 
+-QPtrList<UMLDatatype> UMLDoc::getDatatypes() {
+-    QPtrList<UMLDatatype> datatypeList;
+-    for (UMLObjectListIt oit(m_objectList); oit.current(); ++oit) {
+-        UMLObject *obj = oit.current();
+-        if(obj->getBaseType() == ot_Datatype) {
+-            datatypeList.append((UMLDatatype*)obj);
++UMLDatatypeList UMLDoc::getDatatypes() {
++    UMLDatatypeList datatypeList;
++    UMLObject *obj;
++    for (UMLObjectListIt oit(m_datatypeRoot->containedObjects());
++            (obj = oit.current()) != NULL; ++oit) {
++        if (obj->getBaseType() == ot_Datatype) {
++            datatypeList.append(static_cast<UMLDatatype*>(obj));
+         }
+     }
+     return datatypeList;
+@@ -2149,10 +2151,11 @@
+ 
+ UMLAssociationList UMLDoc::getAssociations() {
+     UMLAssociationList associationList;
+-    for (UMLObjectListIt oit(m_objectList); oit.current(); ++oit) {
+-        UMLObject *obj = oit.current();
+-        if(obj -> getBaseType() == ot_Association)
+-            associationList.append((UMLAssociation *)obj);
++    for (int i = 0; i < Uml::N_MODELTYPES; i++) {
++        UMLAssociation *a;
++        for (UMLAssociationListIt ait(m_root[i]->getAssociations());
++                (a = ait.current()) != NULL; ++ait)
++            associationList.append(a);
+     }
+     return associationList;
+ }
+@@ -2225,6 +2228,14 @@
+     return true;
+ }
+ 
++UMLFolder *UMLDoc::getRootFolder(Uml::Model_Type mt) {
++    if (mt < Uml::mt_Logical || mt >= Uml::N_MODELTYPES) {
++        kdError() << "UMLDoc::getRootFolder: illegal input value " << mt << endl;
++        return NULL;
++    }
++    return m_root[mt];
++}
++
+ /** Read property of IDChangeLog* m_pChangeLog. */
+ IDChangeLog* UMLDoc::getChangeLog() {
+     return m_pChangeLog;
+@@ -2250,15 +2261,10 @@
+     }
+ }
+ 
+-Uml::IDType UMLDoc::getUniqueID() {
+-    ++m_uniqueID;
+-    return EXTERNALIZE_ID(m_uniqueID);
+-}
+-
+ /** Assigns a New ID to an Object, and also logs the assignment to its internal
+ ChangeLog */
+ Uml::IDType UMLDoc::assignNewID(Uml::IDType OldID) {
+-    Uml::IDType result = getUniqueID();
++    Uml::IDType result = UniqueID::gen();
+     if (m_pChangeLog) {
+         m_pChangeLog->addIDChange(OldID, result);
+     }
+@@ -2500,9 +2506,11 @@
+ }
+ 
+ void UMLDoc::createDatatype(const QString &name)  {
+-    UMLObject* umlobject = findUMLObject(name, ot_Datatype);
++    UMLObjectList datatypes = m_datatypeRoot->containedObjects();
++    UMLObject* umlobject = Model_Utils::findUMLObject(datatypes, name,
++                                                      ot_Datatype, m_datatypeRoot);
+     if (!umlobject) {
+-        Object_Factory::createUMLObject(ot_Datatype, name);
++        Object_Factory::createUMLObject(ot_Datatype, name, m_datatypeRoot);
+     }
+     UMLApp::app()->getListView()->closeDatatypesFolder();
+ }
+--- umbrello/umbrello/node.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/node.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -24,11 +24,6 @@
+  * This class inherits from @ref UMLCanvasObject which contains most of the
+  * information.
+  *
+- * The @ref UMLDoc class creates instances of this type.  All Nodes will
+- * need a unique id.  This will be given by the @ref UMLDoc class.
+- * If you don't leave it up to the @ref UMLDoc class then call the method
+- * @ref UMLDoc::getUniqueID to get a unique id.
+- *
+  * @short Non-graphical information for a Node.
+  * @author Jonathan Riddell
+  * @see UMLCanvasObject
+--- umbrello/umbrello/clipboard/umldrag.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/clipboard/umldrag.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -1,8 +1,3 @@
+-/*
+- *  copyright (C) 2002-2004
+- *  Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>
+- */
+-
+ /***************************************************************************
+  *                                                                         *
+  *   This program is free software; you can redistribute it and/or modify  *
+@@ -10,6 +5,8 @@
+  *   the Free Software Foundation; either version 2 of the License, or     *
+  *   (at your option) any later version.                                   *
+  *                                                                         *
++ *   copyright (C) 2002-2006                                               *
++ *   Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>                 *
+  ***************************************************************************/
+ #include <kdebug.h>
+ #include <qdom.h>
+@@ -371,7 +368,8 @@
+                 return false;
+             }
+             Uml::Object_Type type = pObject->getBaseType();
+-            QString newName = Model_Utils::uniqObjectName(type, pObject->getName());
++            QString newName = Model_Utils::uniqObjectName(type, pObject->getUMLPackage(),
++                                                                pObject->getName());
+             pObject->setName(newName);
+             /****************************************************************/
+ 
+--- umbrello/umbrello/codegenerators/php5writer.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/codegenerators/php5writer.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -75,7 +75,7 @@
+       * @param interface indicates if the operation is an interface member
+       */
+     void writeOperations(QString classname, UMLOperationList &opList,
+-                         QTextStream &php, bool interface);
++                         QTextStream &php, bool interface, bool generateErrorStub);
+ 
+     /** write all the attributes of a class
+       * @param c the class we are generating code for
+--- umbrello/umbrello/codegenerators/php5writer.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/codegenerators/php5writer.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -3036,8 +3036,8 @@
+     UMLClassifier *conc;
+     for(conc = includes.first(); conc ;conc = includes.next()) {
+         QString headerName = findFileName(conc, ".php");
+-        if (headerName.isEmpty()) {
+-            php << "include '" << headerName << "';" << m_endl;
++        if (!headerName.isEmpty()) {
++            php << "require_once '" << headerName << "';" << m_endl;
+         }
+     }
+     php << m_endl;
+@@ -3153,6 +3153,7 @@
+     UMLOperationList oppub,opprot,oppriv;
+ 
+     bool isInterface = c->isInterface();
++    bool generateErrorStub = false;
+ 
+     oppub.setAutoDelete(false);
+     opprot.setAutoDelete(false);
+@@ -3181,21 +3182,47 @@
+     //write operations to file
+     if(forceSections() || !oppub.isEmpty()) {
+         php << m_endl;
+-        writeOperations(classname,oppub,php,isInterface);
++        writeOperations(classname,oppub,php,isInterface,generateErrorStub);
+     }
+ 
+     if(forceSections() || !opprot.isEmpty()) {
+         php << m_endl;
+-        writeOperations(classname,opprot,php,isInterface);
++        writeOperations(classname,opprot,php,isInterface,generateErrorStub);
+     }
+ 
+     if(forceSections() || !oppriv.isEmpty()) {
+         php << m_endl;
+-        writeOperations(classname,oppriv,php,isInterface);
++        writeOperations(classname,oppriv,php,isInterface,generateErrorStub);
+     }
++
++
++    // build an oplist for all of the realized operations
++    UMLOperationList opreal;
++    opreal.setAutoDelete(false);
++
++    // go through each of the realizations, taking each op
++    UMLAssociationList realizations = c->getRealizations();
++    UMLAssociation *a;
++
++    if( !realizations.isEmpty()) {
++        for (a = realizations.first(); a; a = realizations.next()) {
++
++            // we know its a classifier if its in the list
++            UMLClassifier *real = (UMLClassifier*)a->getObject(Uml::B);
++
++            UMLOperationList opl(real->getOpList());
++               for(UMLOperation *op = opl.first(); op ; op = opl.next()) {
++                   opreal.append(op);
++               }
++        }
++    }
++
++    // write out all the realizations operations
++    writeOperations(classname,opreal,php,false,true);
++
+ }
+ 
+-void Php5Writer::writeOperations(QString /* classname */, UMLOperationList &opList, QTextStream &php, bool isInterface = false) {
++void Php5Writer::writeOperations(QString /* classname */, UMLOperationList &opList, QTextStream &php, bool isInterface = false, bool generateErrorStub = false) {
+     UMLOperation *op;
+     UMLAttributeList *atl;
+     UMLAttribute *at;
+@@ -3216,7 +3243,7 @@
+             {
+                 if(forceDoc() || !at->getDoc().isEmpty()) {
+                     php <<m_indentation << " * @param " + at->getTypeName() + " " + cleanName(at->getName());
+-                    php << " " + formatDoc(at->getDoc(),"");
++                    php << " " + formatDoc(at->getDoc(),"") << m_endl;
+                 }
+             }//end for : write parameter documentation
+             php << m_indentation << " * @return " << op->getTypeName() << m_endl;
+@@ -3266,10 +3293,16 @@
+             << ((j < i-1)?", ":"");
+         }
+         php <<" )";
+-        if(!isInterface && !op->getAbstract())
+-            php << " {" << m_endl << m_indentation << m_indentation << m_endl << m_indentation << "} // end of member function " + cleanName(op->getName()) + m_endl;
+-        else
++        if(!isInterface && !op->getAbstract()) {
++            php << " {" << m_endl << m_indentation << m_indentation;
++            if(generateErrorStub) {
++                php << "trigger_error(\"Implement \" . __FUNCTION__);";
++            }
++            php << m_endl << m_indentation << "} // end of member function " + cleanName(op->getName()) + m_endl;
++        }
++        else {
+             php << ";" + m_endl;
++        }
+         php << m_endl;
+     }//end for
+ }
+--- umbrello/umbrello/codegenerators/pythonwriter.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/codegenerators/pythonwriter.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -87,7 +87,23 @@
+         h<<str<<m_endl;
+     }
+ 
+-
++    // generate import statement for superclasses and take packages into account 
++    str = cleanName(c->getName()); 
++    QString pkg = cleanName(c->getPackage());
++    if (!pkg.isEmpty())
++        str.prepend(pkg + "."); 
++    QStringList includesList  = QStringList(str); //save imported classes 
++    int i = superclasses.count(); 
++    for (UMLClassifier *classifier = superclasses.first(); 
++            classifier && i; classifier = superclasses.next(), i--) { 
++        str = cleanName(classifier->getName()); 
++        pkg = cleanName(classifier->getPackage());
++        if (!pkg.isEmpty()) 
++            str.prepend(pkg + "."); 
++        includesList.append(str); 
++        h << "from " + str + " import *" << m_endl; 
++    } 
++ 
+     //write includes and take namespaces into account
+     UMLClassifierList includes;
+     findObjectsRelated(c,includes);
+@@ -99,16 +115,15 @@
+             first = headerName.at(0);
+             first = first.upper();
+             headerName = headerName.replace(0, 1, first);
+-            if (headerName.find('/') > 0)
+-                h<<"from "<<headerName.replace(QChar('/'),QChar('.'))<<" import *"<<m_endl;
+-            else
+-                h<<"from "<<headerName<<" import *"<<m_endl;
++            str = headerName.replace(QChar('/'),QChar('.'));
++            if (includesList.findIndex(str) < 0)  // not yet imported
++                h << "from " << str << " import *" << m_endl;
+         }
+     }
+     h<<m_endl;
+ 
+-    h<<"class "<<classname<<(superclasses.count() > 0 ? " (":"");
+-    int i = superclasses.count();
++    h << "class " << classname << (superclasses.count() > 0 ? " (" : "(object)");
++    i = superclasses.count();
+ 
+     for (UMLClassifier *obj = superclasses.first();
+             obj && i; obj = superclasses.next(), i--) {
+--- umbrello/umbrello/dialogs/umloperationdialog.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/dialogs/umloperationdialog.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -1,8 +1,3 @@
+-/*
+- *  copyright (C) 2002-2004
+- *  Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>
+- */
+-
+ /***************************************************************************
+  *                                                                         *
+  *   This program is free software; you can redistribute it and/or modify  *
+@@ -10,6 +5,8 @@
+  *   the Free Software Foundation; either version 2 of the License, or     *
+  *   (at your option) any later version.                                   *
+  *                                                                         *
++ *   copyright (C) 2002-2006                                               *
++ *   Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>                 *
+  ***************************************************************************/
+ 
+ // own header
+@@ -48,6 +45,7 @@
+ #include "../dialog_utils.h"
+ #include "parmpropdlg.h"
+ #include "../stereotype.h"
++#include "../uniqueid.h"
+ 
+ UMLOperationDialog::UMLOperationDialog( QWidget * parent, UMLOperation * pOperation )
+         : KDialogBase( Plain, i18n("Operation Properties"), Help | Ok | Cancel , Ok, parent, "_UMLOPERATIONDLG_", true, true) {
+@@ -329,7 +327,7 @@
+             m_pOperation->addParm( dlg.getTypeName(), name, dlg.getInitialValue(),
+                                dlg.getDoc(), dlg.getParmKind() );
+              */
+-            newAttribute->setID( m_doc->getUniqueID() );
++            newAttribute->setID( UniqueID::gen() );
+             newAttribute->setName( name );
+             newAttribute->setTypeName( dlg.getTypeName() );
+             newAttribute->setInitialValue( dlg.getInitialValue() );
+--- umbrello/umbrello/actor.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/actor.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -22,9 +22,6 @@
+  * This class inherits from @ref UMLCanvasObject which contains most of the
+  * information.
+  * The @ref UMLDoc class creates instances of this type.
+- * All Actors will need a unique id.  This will be given by the @ref UMLDoc
+- * class.  If you don't leave it up to the @ref UMLDoc class then call the
+- * method @ref UMLDoc::getUniqueID to get a unique id.
+  *
+  * @short Information for a non-graphical UML Actor.
+  * @author Paul Hensgen <phensgen at techie.com>
+--- umbrello/umbrello/folder.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 0)
++++ umbrello/umbrello/folder.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -0,0 +1,108 @@
++/***************************************************************************
++ *                                                                         *
++ *   This program is free software; you can redistribute it and/or modify  *
++ *   it under the terms of the GNU General Public License as published by  *
++ *   the Free Software Foundation; either version 2 of the License, or     *
++ *   (at your option) any later version.                                   *
++ *                                                                         *
++ *   copyright (C) 2006                                                    *
++ *   Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>                 *
++ ***************************************************************************/
++
++#ifndef UMLFOLDER_H
++#define UMLFOLDER_H
++
++#include "package.h"
++#include "umlviewlist.h"
++
++/**
++ * This class manages the UMLObjects and UMLViews of a Folder.
++ * This class inherits from UMLPackage which contains most
++ * of the information.
++ *
++ * The UMLDoc class allocates a fixed instance of this class for
++ * each of the predefined Logical, UseCase, Component, Deployment, and
++ * Entity-Relationship folders.  Further instances are created on demand
++ * for user folders.
++ *
++ * @short Non-graphical management of objects and diagrams of a Folder
++ * @author Oliver Kellogg
++ * Bugs and comments to uml-devel at lists.sf.net or http://bugs.kde.org
++ */
++
++class UMLFolder : public UMLPackage {
++    Q_OBJECT
++public:
++    /**
++     * Sets up a Folder.
++     *
++     * @param name    The name of the Folder.
++     * @param id      The unique id of the Folder. A new ID will be generated
++     *                if this argument is left away.
++     */
++    UMLFolder(const QString & name = "", Uml::IDType id = Uml::id_None);
++
++    /**
++     * Empty deconstructor.
++     */
++    virtual ~UMLFolder();
++
++    /**
++     * Initializes key variables of the class.
++     */
++    virtual void init();
++
++    /**
++     * Make a clone of this object.
++     */
++    virtual UMLObject* clone() const;
++
++    /**
++     * Mark this folder as being for Umbrello special use.
++     * This is set for the predefined root views (Logical,
++     * UseCase, Component, Deployment, EntityRelationship,
++     * and the Datatypes folder inside the Logical View.)
++     */
++    void markPredefined();
++
++    /**
++     * Return whther this folder is one of the Umbrello special
++     * folders.
++     */
++    bool isPredefined();
++
++    /**
++     * Add a view to the diagram list.
++     */
++    void addView(UMLView *view);
++
++    /**
++     * Set the folder file name for a separate submodel.
++     */
++    void setFolderFile(QString fileName);
++
++    /**
++     * Get the folder file name for a separate submodel.
++     */
++    QString getFolderFile();
++
++    /**
++     * Creates a UML:Model or UML:Package element:
++     * UML:Model is created for the predefined fixed folders,
++     * UML:Package with stereotype <<folder>> is created for all else.
++     */
++    void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
++
++protected:
++    /**
++     * Loads the UML:Component element.
++     */
++    bool load(QDomElement & element);
++
++private:
++    bool m_bPredefined;
++    QString m_folderFile;
++    UMLViewList m_diagrams;
++};
++
++#endif
+--- umbrello/umbrello/stereotype.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/stereotype.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -1,8 +1,3 @@
+-/*
+- *  copyright (C) 2003-2004
+- *  Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>
+- */
+-
+ /***************************************************************************
+  *                                                                         *
+  *   This program is free software; you can redistribute it and/or modify  *
+@@ -10,6 +5,8 @@
+  *   the Free Software Foundation; either version 2 of the License, or     *
+  *   (at your option) any later version.                                   *
+  *                                                                         *
++ *   copyright (C) 2003-2006                                               *
++ *   Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>                 *
+  ***************************************************************************/
+ 
+ #ifndef STEREOTYPE_H
+@@ -24,6 +21,7 @@
+  *
+  * @short Sets up stereotype information.
+  * @author Jonathan Riddell
++ * @author Oliver Kellogg
+  * Bugs and comments to uml-devel at lists.sf.net or http://bugs.kde.org
+  */
+ 
+@@ -34,15 +32,11 @@
+      *
+      * @param name              The name of this UMLStereotype.
+      * @param id                The unique id given to this UMLStereotype.
+-     * @param listType  The list which this stereotype is part of
+-     *                  (attribute, operation etc)
+      */
+     UMLStereotype(const QString &name, Uml::IDType id = Uml::id_None);
+ 
+     /**
+      * Sets up a stereotype.
+-     *
+-     * @param parent    The parent of this UMLStereotype.
+      */
+     UMLStereotype();
+ 
+@@ -95,10 +89,14 @@
+ 
+ protected:
+     /**
+-     * Loads a <UML:StereoType> XMI element.
++     * Each stereotype object is reference counted, i.e. client code
++     * manages it such that it comes into existence as soon as there is
++     * at least one user, and ceases existing when the number of users
++     * drops to 0.
++     * m_refCount reflects the number of users.  It is externally managed,
++     * i.e. client code must take care to call incrRefCount() and
++     * decrRefCount() as appropriate.
+      */
+-    bool load(QDomElement& element);
+-
+     int m_refCount;
+ };
+ 
+--- umbrello/umbrello/enum.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/enum.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -25,11 +25,6 @@
+  * This class inherits from @ref UMLClassifier which contains most of the
+  * information.
+  *
+- * The @ref UMLDoc class creates instances of this type.  All Enums
+- * will need a unique id.  This will be given by the @ref UMLDoc class.
+- * If you don't leave it up to the @ref UMLDoc class then call the method
+- * @ref UMLDoc::getUniqueID to get a unique id.
+- *
+  * @short Non-graphical Information for an Enum.
+  * @author Jonathan Riddell
+  * Bugs and comments to uml-devel at lists.sf.net or http://bugs.kde.org
+--- umbrello/umbrello/folder.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 0)
++++ umbrello/umbrello/folder.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -0,0 +1,165 @@
++/***************************************************************************
++ *                                                                         *
++ *   This program is free software; you can redistribute it and/or modify  *
++ *   it under the terms of the GNU General Public License as published by  *
++ *   the Free Software Foundation; either version 2 of the License, or     *
++ *   (at your option) any later version.                                   *
++ *                                                                         *
++ *   copyright (C) 2006                                                    *
++ *   Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>                 *
++ ***************************************************************************/
++
++// own header
++#include "folder.h"
++// qt/kde includes
++#include <kdebug.h>
++#include <klocale.h>
++// app includes
++#include "uml.h"
++#include "umldoc.h"
++#include "umlview.h"
++#include "object_factory.h"
++#include "model_utils.h"
++
++UMLFolder::UMLFolder(const QString & name, Uml::IDType id)
++        : UMLPackage(name, id) {
++    init();
++}
++
++UMLFolder::~UMLFolder() {
++}
++
++void UMLFolder::init() {
++    m_BaseType = Uml::ot_Folder;
++    m_bPredefined = false;
++    m_diagrams.setAutoDelete(true);
++    UMLObject::setStereotype("folder");
++}
++
++UMLObject* UMLFolder::clone() const {
++    UMLFolder *clone = new UMLFolder();
++    UMLObject::copyInto(clone);
++    return clone;
++}
++
++void UMLFolder::markPredefined() {
++    m_bPredefined = true;
++}
++
++bool UMLFolder::isPredefined() {
++    return m_bPredefined;
++}
++
++void UMLFolder::addView(UMLView *view) {
++    m_diagrams.append(view);
++}
++
++    /**** From UMLListViewItem::saveToXMI :
++        if (UMLListView::typeIsFolder(m_Type) && !m_FolderFile.isEmpty()) {
++            itemElement.setAttribute( "external_file", m_FolderFile );
++            if (saveSubmodelFiles) {
++                folderFile.setName(umldoc->URL().directory(false) + m_FolderFile);
++                if( !folderFile.open( IO_WriteOnly ) ) {
++                    KMessageBox::error(0,
++                                       i18n("There was a problem saving file: %1").arg(m_FolderFile),
++                                       i18n("Save Error"));
++                    // TODO:
++                    // Resetting the m_FolderFile here is too late -
++                    // the folderfile contents are already lost.
++                    // The test for folder file writability needs to
++                    // be done before the main model is saved so that
++                    // if a folder file turns out not to be creatable,
++                    // the folder can be internalized in time.
++                    // ("Internalization": As a fallback to ensure that
++                    // nothing is lost, the folder contents are saved
++                    // in the main model file.)
++                    m_FolderFile = QString::null;
++                    m_Label.remove( QRegExp("\\s+\\(.*$") );
++                    QListViewItem::setText(0, m_Label);
++                } else {
++                    saveExternalFolder = true;
++                }
++            }
++        }
++     *****************/
++
++void UMLFolder::setFolderFile(QString fileName) {
++    m_folderFile = fileName;
++}
++
++QString UMLFolder::getFolderFile() {
++    return m_folderFile;
++}
++
++void UMLFolder::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
++    QDomElement folderElement;
++    UMLDoc *umldoc = UMLApp::app()->getDocument();
++    QString elementName("UML:Package");
++    for (int i = 0; i < Uml::N_MODELTYPES; i++) {
++        if (this == umldoc->getRootFolder((Uml::Model_Type)i)) {
++            elementName = "UML:Model";
++            break;
++        }
++    }
++    folderElement = UMLObject::save(elementName, qDoc);
++    QDomElement extension = qDoc.createElement("XMI.extension");
++    extension.setAttribute("xmi.extender", "umbrello");
++
++    if (!m_folderFile.isEmpty()) {
++        QDomElement fileElement = qDoc.createElement("external_file");
++        fileElement.setAttribute("name", m_folderFile);
++        extension.appendChild(fileElement);
++    } else {
++        QDomElement ownedElement = qDoc.createElement( "UML:Namespace.ownedElement" );
++        UMLObject *obj;
++        // Save contained objects if any.
++        for (UMLObjectListIt oit(m_objects); (obj = oit.current()) != NULL; ++oit)
++            obj->saveToXMI (qDoc, ownedElement);
++        // Save asscociations if any.
++        for (UMLObjectListIt ait(m_List); (obj = ait.current()) != NULL; ++ait)
++            obj->saveToXMI (qDoc, ownedElement);
++        folderElement.appendChild(ownedElement);
++        // Save diagrams to `extension'.
++        //........
++    }
++    folderElement.appendChild(extension);
++    qElement.appendChild(folderElement);
++}
++
++bool UMLFolder::load(QDomElement& element) {
++    for (QDomNode node = element.firstChild(); !node.isNull();
++            node = node.nextSibling()) {
++        if (node.isComment())
++            continue;
++        QDomElement tempElement = node.toElement();
++        QString type = tempElement.tagName();
++        if (Model_Utils::isCommonXMIAttribute(type))
++            continue;
++        if (Uml::tagEq(type, "Namespace.ownedElement") ||
++                Uml::tagEq(type, "Namespace.contents")) {
++            //CHECK: Umbrello currently assumes that nested elements
++            // are ownedElements anyway.
++            // Therefore these tags are not further interpreted.
++            if (! load(tempElement))
++                return false;
++            continue;
++        }
++        QString stereoID = tempElement.attribute("stereotype", "");
++        UMLObject *pObject = Object_Factory::makeObjectFromXMI(type, stereoID);
++        if (!pObject) {
++            kdWarning() << "UMLFolder::load: "
++                        << "Unknown type of umlobject to create: "
++                        << type << endl;
++            continue;
++        }
++        pObject->setUMLPackage(this);
++        if (pObject->loadFromXMI(tempElement)) {
++            addObject(pObject);
++        } else {
++            delete pObject;
++        }
++    }
++    return true;
++}
++
++#include "folder.moc"
+--- umbrello/umbrello/association.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/association.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -8,15 +8,19 @@
+  *  copyright (C) 2003-2006                                                *
+  *  Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>                  *
+  ***************************************************************************/
++
++// own header
++#include "association.h"
++// qt/kde includes
+ #include <kdebug.h>
+ #include <klocale.h>
+ #include <qregexp.h>
+-
+-#include "association.h"
++// app includes
+ #include "classifier.h"
+ #include "uml.h"
+ #include "umldoc.h"
+ #include "umlrole.h"
++#include "uniqueid.h"
+ #include "model_utils.h"
+ 
+ using namespace Uml;
+@@ -33,9 +37,9 @@
+         : UMLObject("")
+ {
+     init(type, roleA, roleB);
+-    UMLDoc *pDoc = UMLApp::app()->getDocument();
+-    m_pRole[Uml::A]->setID( pDoc->getUniqueID() );
+-    m_pRole[Uml::B]->setID( pDoc->getUniqueID() );
++
++    m_pRole[Uml::A]->setID( UniqueID::gen() );
++    m_pRole[Uml::B]->setID( UniqueID::gen() );
+ }
+ 
+ UMLAssociation::UMLAssociation( Association_Type type /* = Uml::at_Unknown */)
+--- umbrello/umbrello/usecase.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/usecase.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -20,9 +20,6 @@
+ /**
+  * This class contains the non-graphical information required for a UML UseCase.
+  * This class inherits from @ref UMLCanvasObject which contains most of the information.
+- * The @ref UMLDoc class creates instances of this type.  All UseCases will need a unique
+- * id.  This will be given by the @ref UMLDoc class.  If you don't leave it up to the @ref UMLDoc
+- * class then call the method @ref UMLDoc::getUniqueID to get a unique id.
+  *
+  * @short Information for a non-graphical UML UseCase.
+  * @author Paul Hensgen <phensgen at techie.com>
+--- umbrello/umbrello/artifact.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/artifact.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -24,10 +24,6 @@
+  * Artifact.
+  * This class inherits from @ref UMLCanvasObject which contains most of the
+  * information.
+- * The @ref UMLDoc class creates instances of this type.  All Artifacts will
+- * need a unique id.  This will be given by the @ref UMLDoc class.  If you
+- * don't leave it up to the @ref UMLDoc class then call the method @ref
+- * UMLDoc::getUniqueID to get a unique id.
+  *
+  * @short Non-graphical information for a Artifact.
+  * @author Jonathan Riddell
+--- umbrello/umbrello/stereotype.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/stereotype.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -1,8 +1,3 @@
+-/*
+- *  copyright (C) 2003-2004
+- *  Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>
+- */
+-
+ /***************************************************************************
+  *                                                                         *
+  *   This program is free software; you can redistribute it and/or modify  *
+@@ -10,6 +5,8 @@
+  *   the Free Software Foundation; either version 2 of the License, or     *
+  *   (at your option) any later version.                                   *
+  *                                                                         *
++ *   copyright (C) 2003-2006                                               *
++ *   Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>                 *
+  ***************************************************************************/
+ 
+ 
+@@ -66,10 +63,6 @@
+     qElement.appendChild( stereotypeElement );
+ }
+ 
+-bool UMLStereotype::load(QDomElement& /*element*/) {
+-    return true;
+-}
+-
+ bool UMLStereotype::showPropertiesDialogue(QWidget* parent) {
+     bool ok;
+     QString name = KInputDialog::getText(i18n("Stereotype"), i18n("Enter name:"), getName(),&ok, parent);
+--- umbrello/umbrello/umllistview.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/umllistview.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -45,51 +45,6 @@
+     Q_OBJECT
+ public:
+ 
+-    enum Icon_Type      {
+-        it_Home = 0,
+-        it_Folder_Cyan,
+-        it_Folder_Cyan_Open,
+-        it_Folder_Green,
+-        it_Folder_Green_Open,
+-        it_Folder_Grey,
+-        it_Folder_Grey_Open,
+-        it_Folder_Red,
+-        it_Folder_Red_Open,
+-        it_Folder_Violet,
+-        it_Folder_Violet_Open,
+-        it_Folder_Orange,
+-        it_Folder_Orange_Open,
+-        it_Diagram, //change to have different one for each type of diagram
+-        it_Class,
+-        it_Template,
+-        it_Package,
+-        it_Subsystem,
+-        it_Component,
+-        it_Node,
+-        it_Artifact,
+-        it_Interface,
+-        it_Datatype,
+-        it_Enum,
+-        it_Entity,
+-        it_Actor,
+-        it_UseCase,
+-        it_Public_Method,
+-        it_Private_Method,
+-        it_Protected_Method,
+-        it_Public_Attribute,
+-        it_Private_Attribute,
+-        it_Protected_Attribute,
+-        it_Diagram_Activity,
+-        it_Diagram_Class,
+-        it_Diagram_Collaboration,
+-        it_Diagram_Component,
+-        it_Diagram_Deployment,
+-        it_Diagram_EntityRelationship,
+-        it_Diagram_Sequence,
+-        it_Diagram_State,
+-        it_Diagram_Usecase
+-    };
+-
+     /**
+      * Constructs the tree view.
+      *
+@@ -189,7 +144,7 @@
+     /**
+      * Returns the correct pixmap for the given type.
+      */
+-    QPixmap & getPixmap( Icon_Type type );
++    QPixmap & getPixmap( Uml::Icon_Type type );
+ 
+     /**
+      * Returns the document pointer.  Called by the UMLListViewItem class.
+@@ -203,7 +158,7 @@
+      * Method will take care of signalling anyone needed on creation of new item.
+      * e.g. UMLDoc if an UMLObject is created.
+      */
+-    void addNewItem( QListViewItem * parent, Uml::ListView_Type type );
++    void addNewItem(UMLListViewItem * parent, Uml::ListView_Type type);
+ 
+     /**
+      * Find an UMLObject in the listview.
+@@ -211,7 +166,7 @@
+      * @param p         Pointer to the object to find in the list view.
+      * @return  Pointer to the UMLObject found or NULL if not found.
+      */
+-    UMLListViewItem * findUMLObject(UMLObject *p) const;
++    UMLListViewItem * findUMLObject(const UMLObject *p) const;
+ 
+     /**
+      * Searches through the tree for the item with the given ID.
+@@ -233,11 +188,24 @@
+     static bool typeIsCanvasWidget(Uml::ListView_Type type);
+ 
+     /**
++     * Returns true if the listview type is one of the predefined root views
++     * (root, logical, usecase, component, deployment, datatype, or entity-
++     * relationship view.)
++     */
++    static bool typeIsRootView(Uml::ListView_Type type);
++
++    /**
+      * Returns true if the listview type is a logical, usecase or component folder.
+      */
+     static bool typeIsFolder(Uml::ListView_Type type);
+ 
+     /**
++     * Returns true if the listview type may act as a container for other objects,
++     * i.e. if it is a folder, package, subsystem, or component.
++     */
++    static bool typeIsContainer(Uml::ListView_Type type);
++
++    /**
+      * Returns true if the listview type is a diagram.
+      */
+     static bool typeIsDiagram(Uml::ListView_Type type);
+@@ -250,7 +218,7 @@
+     /**
+      * Changes the icon for the given UMLObject to the given icon.
+      */
+-    void changeIconOf(UMLObject *o, Icon_Type to);
++    void changeIconOf(UMLObject *o, Uml::Icon_Type to);
+ 
+     /**
+      * Creates a UMLObject out of the given list view item.
+@@ -302,11 +270,35 @@
+     bool startedCopy() const;
+ 
+     /**
+-     * Converts an object type enum to the equivalent list view type
++     * Converts an object's type to the equivalent list view type
++     *
++     * @param o  Pointer to the UMLObject whose type shall be converted
++     *           to the equivalent Uml::ListView_Type.  We cannot just
++     *           pass in a Uml::Object_Type because a UMLPackage might
++     *           be rendered differently when it acts as a folder.
++     * @return  The equivalent Uml::ListView_Type.
+      */
+-    static Uml::ListView_Type convert_OT_LVT(Uml::Object_Type ot);
++    static Uml::ListView_Type convert_OT_LVT(const UMLObject *o);
+ 
+     /**
++     * Return the Icon_Type which corresponds to the given listview type.
++     *
++     * @param lvt  ListView_Type to convert.
++     * @return  The Uml::Icon_Type corresponding to the lvt.
++     *          Returns it_Home in case no mapping to Uml::Icon_Type exists.
++     */
++    static Uml::Icon_Type convert_LVT_IT(Uml::ListView_Type lvt);
++
++    /**
++     * Return the Diagram_Type which corresponds to the given listview type.
++     *
++     * @param lvt  ListView_Type to convert.
++     * @return  The Uml::Diagram_Type corresponding to the lvt.
++     *          Returns dt_Undefined in case no mapping to Diagram_Type exists.
++     */
++    static Uml::Diagram_Type convert_LVT_DT(Uml::ListView_Type lvt);
++
++    /**
+      * Moves an object given is unique ID and listview type to an
+      * other listview parent item.
+      * Also takes care of the corresponding move in the model.
+@@ -322,11 +314,23 @@
+     void closeDatatypesFolder();
+ 
+     UMLListViewItem *theRootView() { return m_rv; }
+-    UMLListViewItem *theLogicalView() { return m_lv; }
+-    UMLListViewItem *theUseCaseView() { return m_ucv; }
+-    UMLListViewItem *theComponentView() { return m_cmpv; }
+-    UMLListViewItem *theDeploymentView() { return m_dplv; }
++    UMLListViewItem *theLogicalView() { return m_lv[Uml::mt_Logical]; }
++    UMLListViewItem *theUseCaseView() { return m_lv[Uml::mt_UseCase]; }
++    UMLListViewItem *theComponentView() { return m_lv[Uml::mt_Component]; }
++    UMLListViewItem *theDeploymentView() { return m_lv[Uml::mt_Deployment]; }
++    UMLListViewItem *theDatatypeFolder() { return m_datatypeFolder; }
+ 
++    /**
++     * Determines the root listview type of the given UMLListViewItem.
++     * Starts at the given item, compares it against each of the
++     * predefined root views (Root, Logical, UseCase, Component,
++     * Deployment, EntityRelationship.) Returns the ListView_Type
++     * of the matching root view; if no match then continues the
++     * search using the item's parent, then grandparent, and so forth.
++     * Returns Uml::lvt_Unknown if no match at all is found.
++     */
++    Uml::ListView_Type rootViewType(UMLListViewItem *item);
++
+     void saveToXMI( QDomDocument & qDoc, QDomElement & qElement,
+                     bool saveSubmodelFiles = false );
+ 
+@@ -335,12 +339,8 @@
+     bool loadChildrenFromXMI( UMLListViewItem * parent, QDomElement & element );
+ 
+ protected:
+-    UMLListViewItem* m_rv;    // root view
+-    UMLListViewItem* m_ucv;   // use case view item
+-    UMLListViewItem* m_lv;    // logical view item
+-    UMLListViewItem* m_cmpv;  // component view item
+-    UMLListViewItem* m_dplv;  // deployment view item
+-    UMLListViewItem* m_entityRelationshipModel;//entity relationship view item
++    UMLListViewItem* m_rv;    // root view (home)
++    UMLListViewItem* m_lv[Uml::N_MODELTYPES];    // predefined list view roots
+     UMLListViewItem* m_datatypeFolder;
+     ListPopupMenu * m_pMenu;
+     QString oldText, message;
+@@ -352,51 +352,7 @@
+      */
+     bool m_bCreatingChildObject;
+ 
+-    struct Pixmaps {
+-        QPixmap Home;
+-        QPixmap Folder_Cyan;
+-        QPixmap Folder_Cyan_Open;
+-        QPixmap Folder_Green;
+-        QPixmap Folder_Green_Open;
+-        QPixmap Folder_Grey;
+-        QPixmap Folder_Grey_Open;
+-        QPixmap Folder_Orange;
+-        QPixmap Folder_Orange_Open;
+-        QPixmap Folder_Red;
+-        QPixmap Folder_Red_Open;
+-        QPixmap Folder_Violet;
+-        QPixmap Folder_Violet_Open;
+-        QPixmap Diagram; //change to have different one for each type of diagram
+-        QPixmap Class;
+-        QPixmap Template;
+-        QPixmap Package;
+-        QPixmap Subsystem;
+-        QPixmap Component;
+-        QPixmap Node;
+-        QPixmap Artifact;
+-        QPixmap Interface;
+-        QPixmap Datatype;
+-        QPixmap Enum;
+-        QPixmap Entity;
+-        QPixmap Actor;
+-        QPixmap UseCase;
+-        QPixmap Public_Method;
+-        QPixmap Private_Method;
+-        QPixmap Protected_Method;
+-        QPixmap Public_Attribute;
+-        QPixmap Private_Attribute;
+-        QPixmap Protected_Attribute;
+-        QPixmap Diagram_Activity;
+-        QPixmap Diagram_Class;
+-        QPixmap Diagram_Collaboration;
+-        QPixmap Diagram_Component;
+-        QPixmap Diagram_Deployment;
+-        QPixmap Diagram_EntityRelationship;
+-        QPixmap Diagram_Sequence;
+-        QPixmap Diagram_State;
+-        QPixmap Diagram_Usecase;
+-    }
+-    m_Pixmaps;
++    QPixmap m_Pixmaps[Uml::N_ICONTYPES];
+ 
+     bool eventFilter(QObject *o, QEvent *e);
+     void contentsMouseReleaseEvent(QMouseEvent * me);
+@@ -434,11 +390,16 @@
+      *
+      * @param lvt               The ListView_Type to convert.
+      * @return  The converted Object_Type if the listview type
+-     *          has a Object_Type representation, else 0.
++     *          has a Uml::Object_Type representation, else 0.
+      */
+     static Uml::Object_Type convert_LVT_OT(Uml::ListView_Type lvt);
+ 
+     /**
++     * Return true if the given list view type can be expanded/collapsed.
++     */
++    static bool isExpandable(Uml::ListView_Type lvt);
++
++    /**
+      *  Loads the pixmaps to use in the list items.
+      */
+     void loadPixmaps();
+@@ -464,6 +425,13 @@
+      */
+     void childObjectAdded(UMLClassifierListItem* child, UMLClassifier* parent);
+ 
++    /**
++     * Auxiliary method for moveObject(): Adds the model object at the proper
++     * new container (package if nested, UMLDoc if at global level), and
++     * updates the containment relationships in the model.
++     */
++    void addAtContainer(UMLListViewItem *item, UMLListViewItem *parent);
++
+ public slots:
+ 
+     /**
+--- umbrello/umbrello/package.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/package.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -1,8 +1,3 @@
+-/*
+- *  copyright (C) 2003-2005
+- *  Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>
+- */
+-
+ /***************************************************************************
+  *                                                                         *
+  *   This program is free software; you can redistribute it and/or modify  *
+@@ -10,6 +5,8 @@
+  *   the Free Software Foundation; either version 2 of the License, or     *
+  *   (at your option) any later version.                                   *
+  *                                                                         *
++ *   copyright (C) 2003-2006                                               *
++ *   Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>                 *
+  ***************************************************************************/
+ 
+ #ifndef PACKAGE_H
+@@ -24,11 +21,6 @@
+  * This class inherits from @ref UMLCanvasObject which contains most of the
+  * information.
+  *
+- * The @ref UMLDoc class creates instances of this type.  All Packages will
+- * need a unique id.  This will be given by the @ref UMLDoc class.
+- * If you don't leave it up to the @ref UMLDoc class then call the method
+- * @ref UMLDoc::getUniqueID to get a unique id.
+- *
+  * @short Non-graphical information for a Package.
+  * @author Jonathan Riddell
+  * @see UMLCanvasObject
+@@ -83,9 +75,15 @@
+     void removeObject(const UMLObject *pObject);
+ 
+     /**
++     * Removes all objects from this package.
++     * Inner containers (e.g. nested packages) are removed recursively.
++     */
++    virtual void removeAllObjects();
++
++    /**
+      * Returns the list of objects contained in this package.
+      */
+-    UMLObjectList& containedObjects();
++    UMLObjectList containedObjects(bool includeAssociations = false);
+ 
+     /**
+      * Find the object of the given name in the list of contained objects.
+@@ -173,6 +171,7 @@
+      * The UMLPackage is the owner of the objects.
+      */
+     UMLObjectList m_objects;
++
+ };
+ 
+ #endif
+--- umbrello/umbrello/package.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/package.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -1,8 +1,3 @@
+-/*
+- *  copyright (C) 2003-2005
+- *  Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>
+- */
+-
+ /***************************************************************************
+  *                                                                         *
+  *   This program is free software; you can redistribute it and/or modify  *
+@@ -10,6 +5,8 @@
+  *   the Free Software Foundation; either version 2 of the License, or     *
+  *   (at your option) any later version.                                   *
+  *                                                                         *
++ *   copyright (C) 2003-2006                                               *
++ *   Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>                 *
+  ***************************************************************************/
+ 
+ // own header file
+@@ -23,8 +20,11 @@
+ #include "uml.h"
+ #include "umldoc.h"
+ #include "classifier.h"
++#include "association.h"
+ #include "object_factory.h"
+ #include "model_utils.h"
++#include "umllistview.h"
++#include "umllistviewitem.h"
+ 
+ using namespace Uml;
+ 
+@@ -56,6 +56,16 @@
+ }
+ 
+ bool UMLPackage::addObject(const UMLObject *pObject) {
++    if (pObject == NULL) {
++        kdError() << "UMLPackage::addObject is called with a NULL object"
++            << endl;
++        return false;
++    }
++    if (pObject->getBaseType() == Uml::ot_Association) {
++        UMLObject *o = const_cast<UMLObject*>(pObject);
++        UMLAssociation *assoc = static_cast<UMLAssociation*>(o);
++        return UMLCanvasObject::addAssociation(assoc);
++    }
+     if (m_objects.find(pObject) != -1) {
+         kdDebug() << "UMLPackage::addObject: " << pObject->getName()
+                   << " is already there" << endl;
+@@ -69,10 +79,29 @@
+     m_objects.remove( pObject );
+ }
+ 
+-UMLObjectList& UMLPackage::containedObjects() {
+-    return m_objects;
++void UMLPackage::removeAllObjects() {
++    UMLCanvasObject::removeAllAssociations();
++    UMLObject *o;
++    for (UMLObjectListIt oit(m_objects); (o = oit.current()) != NULL; ++oit) {
++        UMLPackage *pkg = dynamic_cast<UMLPackage*>(o);
++        if (pkg)
++            pkg->removeAllObjects();
++        //delete o;
++    }
++    m_objects.clear();
+ }
+ 
++UMLObjectList UMLPackage::containedObjects(bool includeAssociations) {
++    UMLObjectList list = m_objects;
++    if (includeAssociations) {
++        UMLObject *o;
++        for (UMLObjectListIt oit(m_List); (o = oit.current()) != NULL; ++oit) {
++            list.append(o);
++        }
++    }
++    return list;
++}
++
+ UMLObject * UMLPackage::findObject(const QString &name) {
+     const bool caseSensitive = UMLApp::app()->activeLanguageIsCaseSensitive();
+     for (UMLObjectListIt oit(m_objects); oit.current(); ++oit) {
+@@ -97,9 +126,9 @@
+         UMLObject *o = oit.current();
+         Object_Type ot = o->getBaseType();
+         if (ot == ot_Class || ot == ot_Interface ||
+-                ot == ot_Datatype || ot == ot_Enum) {
++                ot == ot_Datatype || ot == ot_Enum || ot == ot_Entity) {
+             classifiers.append((UMLClassifier *)o);
+-        } else if (includeNested && ot == ot_Package) {
++        } else if (includeNested && (ot == ot_Package || ot == ot_Folder)) {
+             UMLPackage *inner = static_cast<UMLPackage *>(o);
+             inner->appendClassifiers(classifiers);
+         }
+@@ -114,7 +143,7 @@
+         if (ot == ot_Class) {
+             UMLClassifier *c = static_cast<UMLClassifier*>(o);
+             classes.append(c);
+-        } else if (includeNested && ot == ot_Package) {
++        } else if (includeNested && (ot == ot_Package || ot == ot_Folder)) {
+             UMLPackage *inner = static_cast<UMLPackage *>(o);
+             inner->appendClasses(classes);
+         }
+@@ -129,7 +158,7 @@
+         if (ot == ot_Class || ot == ot_Interface) {
+             UMLClassifier *c = static_cast<UMLClassifier*>(o);
+             classifiers.append(c);
+-        } else if (includeNested && ot == ot_Package) {
++        } else if (includeNested && (ot == ot_Package || ot == ot_Folder)) {
+             UMLPackage *inner = static_cast<UMLPackage *>(o);
+             inner->appendClassesAndInterfaces(classifiers);
+         }
+@@ -144,7 +173,7 @@
+         if (ot == ot_Interface) {
+             UMLClassifier *c = static_cast<UMLClassifier*>(o);
+             interfaces.append(c);
+-        } else if (includeNested && ot == ot_Package) {
++        } else if (includeNested && (ot == ot_Package || ot == ot_Folder)) {
+             UMLPackage *inner = static_cast<UMLPackage *>(o);
+             inner->appendInterfaces(interfaces);
+         }
+@@ -152,9 +181,7 @@
+ }
+ 
+ bool UMLPackage::resolveRef() {
+-    // UMLObject::resolveRef() is not required by ot_Package itself
+-    // but might be required by some inheriting class.
+-    bool overallSuccess = UMLObject::resolveRef();
++    bool overallSuccess = UMLCanvasObject::resolveRef();
+     for (UMLObjectListIt oit(m_objects); oit.current(); ++oit) {
+         UMLObject *obj = oit.current();
+         if (! obj->resolveRef())
+@@ -165,24 +192,20 @@
+ 
+ void UMLPackage::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
+     QDomElement packageElement = UMLObject::save("UML:Package", qDoc);
+-    QDomElement ownedElement = qDoc.createElement( "UML:Namespace.ownedElement" );
++    QDomElement ownedElement = qDoc.createElement("UML:Namespace.ownedElement");
++    UMLObject *obj;
++    // save classifiers etc.
++    for (UMLObjectListIt oit(m_objects); (obj = oit.current()) != NULL; ++oit)
++        obj->saveToXMI (qDoc, ownedElement);
++    // save associations
++    for (UMLObjectListIt ait(m_List); (obj = ait.current()) != NULL; ++ait)
++        obj->saveToXMI (qDoc, ownedElement);
+ 
+-#ifndef XMI_FLAT_PACKAGES
+-    // Save datatypes first.
+-    // This will cease to be necessary once deferred type resolution is up.
+-    for (UMLObject *obj = m_objects.first(); obj; obj = m_objects.next())
+-        if (obj->getBaseType() == Uml::ot_Datatype)
+-            obj->saveToXMI (qDoc, ownedElement);
+-    for (UMLObject *obj = m_objects.first(); obj; obj = m_objects.next())
+-        if (obj->getBaseType() != Uml::ot_Datatype)
+-            obj->saveToXMI (qDoc, ownedElement);
+-#endif
+-    packageElement.appendChild( ownedElement );
++    packageElement.appendChild(ownedElement);
+     qElement.appendChild(packageElement);
+ }
+ 
+ bool UMLPackage::load(QDomElement& element) {
+-    UMLDoc *umldoc = UMLApp::app()->getDocument();
+     for (QDomNode node = element.firstChild(); !node.isNull();
+             node = node.nextSibling()) {
+         if (node.isComment())
+@@ -203,15 +226,23 @@
+         UMLObject *pObject = Object_Factory::makeObjectFromXMI(type);
+         if( !pObject ) {
+             kdWarning() << "UMLPackage::load: "
+-            << "Unknown type of umlobject to create: "
+-            << type << endl;
++                << "Unknown type of umlobject to create: "
++                << type << endl;
+             continue;
+         }
+         pObject->setUMLPackage(this);
+         if (pObject->loadFromXMI(tempElement)) {
+             addObject(pObject);
+-            if (tagEq(type, "Generalization"))
+-                umldoc->addAssocToConcepts((UMLAssociation *) pObject);
++            /*
++            UMLAssociation *assoc = dynamic_cast<UMLAssociation*>(pObject);
++            if (assoc) {
++                // Adding the UMLAssociation at the participating concepts is done
++                // again later (in UMLAssociation::resolveRef()) if they are not yet
++                // known right here.
++                if (assoc->getObject(Uml::A) && assoc->getObject(Uml::B))
++                    umldoc->addAssocToConcepts(Assoc);
++            }
++             */
+         } else {
+             delete pObject;
+         }
+--- umbrello/umbrello/object_factory.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/object_factory.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -31,10 +31,7 @@
+  * @param n         A name to give to the object (optional.)
+  *                  If not given then an input dialog prompts
+  *                  the user to supply a name.
+- * @param parentPkg The object's parent package (optional.)
+- * @param prepend   Set true if it is desired to prepend the new
+- *                  object to the list of objects.
+- *                  The default is to append.
++ * @param parentPkg The object's parent package.
+  * @param solicitNewName  Ask user for a different name if an object
+  *                        of the given name already exists.
+  *                        If set to false and the name already exists
+@@ -44,7 +41,6 @@
+ UMLObject* createUMLObject(Uml::Object_Type type,
+                            const QString &n = QString::null,
+                            UMLPackage *parentPkg = 0,
+-                           bool prepend = false,
+                            bool solicitNewName = true);
+ 
+ /**
+@@ -79,7 +75,7 @@
+  * Make a new UMLObject according to the given XMI tag.
+  * Used by loadFromXMI and clipboard paste.
+  */
+-UMLObject* makeObjectFromXMI(const QString &xmiTag);
++UMLObject* makeObjectFromXMI(QString xmiTag, QString stereoID = QString::null);
+ 
+ }
+ 
+--- umbrello/umbrello/datatype.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/datatype.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -25,11 +25,6 @@
+  * This class inherits from @ref UMLClassifier which contains most of the
+  * information.
+  *
+- * The @ref UMLDoc class creates instances of this type.  All Datatypes
+- * will need a unique id.  This will be given by the @ref UMLDoc class.
+- * If you don't leave it up to the @ref UMLDoc class then call the method
+- * @ref UMLDoc::getUniqueID to get a unique id.
+- *
+  * @short Information for a non-graphical Datatype.
+  * @author Jonathan Riddell
+  * Bugs and comments to uml-devel at lists.sf.net or http://bugs.kde.org
+--- umbrello/umbrello/classifier.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/classifier.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -30,11 +30,6 @@
+  * This class inherits from @ref UMLPackage which allows classifiers
+  * to also act as namespaces, i.e. it allows classifiers to nest.
+  *
+- * The @ref UMLDoc class creates instances of this type.  All Classifiers
+- * need a unique id.  This will be given by the @ref UMLDoc class.  If you
+- * don't leave it up to the @ref UMLDoc class then call the method @ref
+- * UMLDoc::getUniqueID to get a unique id.
+- *
+  * @short Information for a non-graphical Concept/Class.
+  * @author Paul Hensgen <phensgen at techie.com>
+  * Bugs and comments to uml-devel at lists.sf.net or http://bugs.kde.org
+@@ -87,7 +82,7 @@
+      * @param name  An optional name, used by when creating through UMLListView
+      * @return  The UMLAttribute created
+      */
+-    virtual UMLObject* createAttribute(const QString &name = QString::null);
++    virtual UMLAttribute* createAttribute(const QString &name = QString::null);
+ 
+     /**
+      * Adds an attribute to the class.
+--- umbrello/umbrello/x-umbrello.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/x-umbrello.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -17,6 +17,7 @@
+ Comment[es]=Archivo del modeladore UML Umbrello
+ Comment[et]=Umbrello UML-fail
+ Comment[eu]=Umbrello UML modelatzaile fitxategia
++Comment[fa]=پرونده مدل‌ساز Umbrello UML
+ Comment[fi]=Umbrello UML -mallinnustiedosto
+ Comment[fr]=Fichier du modeleur UML Umbrello
+ Comment[ga]=Comhad le haghaidh an Mhúnlóra UML Umbrello
+@@ -28,6 +29,7 @@
+ Comment[nb]=Umbrello UML-modelleringsfil
+ Comment[nds]=UML-Modellmaker-Datei vun Umbrello
+ Comment[nl]=Umbrello UML Modeller-bestand
++Comment[nn]=Umbrello UML-modelleringsfil
+ Comment[pl]=Plik modelera UML Umbrello
+ Comment[pt]=Ficheiro do Modelador de UML Umbrello
+ Comment[pt_BR]=Arquivo de Modelador UML Umbrello
+--- umbrello/umbrello/umllistview.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/umllistview.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -32,6 +32,7 @@
+ #include "actor.h"
+ #include "classifier.h"
+ #include "package.h"
++#include "folder.h"
+ #include "component.h"
+ #include "node.h"
+ #include "artifact.h"
+@@ -52,6 +53,7 @@
+ #include "umlviewimageexporter.h"
+ #include "usecase.h"
+ #include "model_utils.h"
++#include "uniqueid.h"
+ #include "clipboard/idchangelog.h"
+ #include "clipboard/umldrag.h"
+ #include "dialogs/classpropdlg.h"
+@@ -112,14 +114,6 @@
+     //add columns and initial items
+     addColumn(m_doc->getName());
+ 
+-    m_rv =  new UMLListViewItem(this, i18n("Views"), Uml::lvt_View);
+-    m_ucv = new UMLListViewItem(m_rv, i18n("Use Case View"), Uml::lvt_UseCase_View);
+-    m_lv = new UMLListViewItem(m_rv, i18n("Logical View"), Uml::lvt_Logical_View);
+-    m_cmpv = new UMLListViewItem(m_rv, i18n("Component View"), Uml::lvt_Component_View);
+-    m_dplv = new UMLListViewItem(m_rv, i18n("Deployment View"), Uml::lvt_Deployment_View);
+-    m_entityRelationshipModel = new UMLListViewItem(m_rv, i18n("Entity Relationship Model"), Uml::lvt_EntityRelationship_Model);
+-    m_datatypeFolder = new UMLListViewItem(m_lv, i18n("Datatypes"), Uml::lvt_Datatype_Folder);
+-
+ #ifdef WANT_LVTOOLTIP
+     /* In KDE-3.3, we cannot use KListView's builtin mechanism for
+        overriding the tooltips. Instead, see the above class LVToolTip.
+@@ -128,7 +122,13 @@
+      */
+     (void) new LVToolTip(viewport());
+ #endif
+-    init();
++    m_pMenu = NULL;
++    m_bStartedCut = m_bStartedCopy = false;
++    m_bIgnoreCancelRename = true;
++    m_bCreatingChildObject = false;
++    m_rv = NULL;
++    for (int i = 0; i < Uml::N_MODELTYPES; i++)
++        m_lv[i] = NULL;
+     //setup slots/signals
+     connect(this, SIGNAL(dropped(QDropEvent *, QListViewItem *, QListViewItem *)),
+             this, SLOT(slotDropped(QDropEvent *, QListViewItem *, QListViewItem *)));
+@@ -165,51 +165,28 @@
+         clearSelection();
+     QPoint pt = this->QScrollView::contentsToViewport( me->pos() );
+     UMLListViewItem * item = (UMLListViewItem*)itemAt(pt);
++    const Qt::ButtonState button = me->button();
+ 
+-    if(  me -> button() != Qt::RightButton && me -> button() != Qt::LeftButton  ) {
+-        UMLApp::app() -> getDocWindow() -> updateDocumentation( true );
++    if (!item || (button != Qt::RightButton && button != Qt::LeftButton)) {
++        UMLApp::app()->getDocWindow()->updateDocumentation(true);
+         return;
+     }
+ 
+-    Uml::ListView_Type type;
+-    // if item is null (0), then do not chose lvt_Unknown type
+-    type = item ? item->getType() : Uml::lvt_Unknown;
+-    if (me->button() == Qt::LeftButton) {
+-        switch( type ) {
+-
+-        case Uml::lvt_UseCase:
+-        case Uml::lvt_Class:
+-        case Uml::lvt_Package:
+-        case Uml::lvt_Subsystem:
+-        case Uml::lvt_Component:
+-        case Uml::lvt_Node:
+-        case Uml::lvt_Interface:
+-        case Uml::lvt_Datatype:
+-        case Uml::lvt_Enum:
+-        case Uml::lvt_Entity:
+-        case Uml::lvt_Actor:
+-        case Uml::lvt_Attribute:
+-        case Uml::lvt_EntityAttribute:
+-        case Uml::lvt_Operation:
+-        case Uml::lvt_Template:
+-        case Uml::lvt_EnumLiteral:
+-            UMLApp::app() -> getDocWindow() -> showDocumentation( item -> getUMLObject(), false );
+-            break;
+-
+-        case Uml::lvt_Unknown:  // used for EnumLiteral, do not try to show item documentation
+-        default:
+-            UMLApp::app() -> getDocWindow() -> updateDocumentation( true );
+-            break;
+-        }
++    if (button == Qt::LeftButton) {
++        UMLObject *o = item->getUMLObject();
++        if (o)
++            UMLApp::app()->getDocWindow()->showDocumentation(o, false);
++        else
++            UMLApp::app()->getDocWindow()->updateDocumentation(true);
+     }
+-    if(me->button() == Qt::RightButton) {
++    if (button == Qt::RightButton) {
+         if(m_pMenu != 0) {
+             m_pMenu->hide();
+             disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(popupMenuSel(int)));
+             delete m_pMenu;
+             m_pMenu = 0;
+         }
+-
++        const Uml::ListView_Type type = item->getType();
+         m_pMenu = new ListPopupMenu(this, type);
+         m_pMenu->popup(me->globalPos());
+         connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(popupMenuSel(int)));
+@@ -396,19 +373,21 @@
+             fileDialog.setOperationMode(KFileDialog::Other);
+             UMLListViewItem *current = static_cast<UMLListViewItem*>(currentItem());
+             // set a sensible default filename
+-            QString defaultFilename = current->getFolderFile();
+-            if (defaultFilename.isEmpty()) {
+-                defaultFilename = current->getText().lower();
+-                defaultFilename.replace( QRegExp("\\W+"), "_" );
+-                defaultFilename.append(".xm1");  // default extension
+-            }
+-            fileDialog.setSelection(defaultFilename.lower());
++            QString defaultFilename = current->getText().lower();
++            defaultFilename.replace(QRegExp("\\W+"), "_");
++            defaultFilename.append(".xm1");  // default extension
++            fileDialog.setSelection(defaultFilename);
+             fileDialog.exec();
+             KURL selURL = fileDialog.selectedURL();
+             if (selURL.isEmpty())
+                 return;
+             QString fileName = selURL.fileName();
+-            current->setFolderFile( fileName );
++            UMLFolder *modelFolder = dynamic_cast<UMLFolder*>(current->getUMLObject());
++            if (modelFolder == NULL) {
++                kdError() << "UMLListView::popupMenuSel: modelFolder is NULL" << endl;
++                return;
++            }
++            modelFolder->setFolderFile(fileName);
+             // Recompute text of the folder
+             QString folderText = current->getText();
+             folderText.remove( QRegExp("\\s*\\(.*$") );
+@@ -420,7 +399,12 @@
+     case ListPopupMenu::mt_Internalize_Folder:
+         {
+             UMLListViewItem *current = static_cast<UMLListViewItem*>(currentItem());
+-            current->setFolderFile( QString::null );
++            UMLFolder *modelFolder = dynamic_cast<UMLFolder*>(current->getUMLObject());
++            if (modelFolder == NULL) {
++                kdError() << "UMLListView::popupMenuSel: modelFolder is NULL" << endl;
++                return;
++            }
++            modelFolder->setFolderFile(QString::null);
+             // Recompute text of the folder
+             QString folderText = current->getText();
+             folderText.remove( QRegExp("\\s*\\(.*$") );
+@@ -548,18 +532,20 @@
+         return;
+     //See if we wanted to create diagram in folder
+     UMLListViewItem * current = (UMLListViewItem *) currentItem();
+-    if ( current && typeIsFolder(current->getType()) ) {
++    if (current && typeIsFolder(current->getType()) && !typeIsRootView(current->getType())) {
+         p = current;
++        kdDebug() << "UMLListView::slotDiagramCreated: current " << p->getText()
++            << ", lvtype " << p->getType() << endl;
+     } else if (v->getType() == Uml::dt_UseCase) {
+-        p = m_ucv;
++        p = m_lv[Uml::mt_UseCase];
+     } else if (v->getType() == Uml::dt_Component) {
+-        p = m_cmpv;
++        p = m_lv[Uml::mt_Component];
+     } else if (v->getType() == Uml::dt_Deployment) {
+-        p = m_dplv;
++        p = m_lv[Uml::mt_Deployment];
+     } else if (v->getType() == Uml::dt_EntityRelationship) {
+-        p = m_entityRelationshipModel;
++        p = m_lv[Uml::mt_EntityRelationship];
+     } else {
+-        p = m_lv;
++        p = m_lv[Uml::mt_Logical];
+     }
+     temp = new UMLListViewItem( p, v->getName(), convert_DT_LVT( v->getType() ),  id );
+     setSelected( temp, true );
+@@ -572,9 +558,9 @@
+     Uml::ListView_Type lvt = Uml::lvt_Unknown;
+     if (current)
+         lvt = current->getType();
+-    Uml::Object_Type type = object->getBaseType();
++    Uml::Object_Type t = object->getBaseType();
+ 
+-    switch (type) {
++    switch (t) {
+     case Uml::ot_Attribute:
+     case Uml::ot_Operation:
+     case Uml::ot_Template:
+@@ -588,66 +574,30 @@
+     case Uml::ot_Stereotype:
+         return NULL;  // currently no representation in list view
+         break;
+-    case Uml::ot_Class:
+-    case Uml::ot_Interface:
+-    case Uml::ot_Enum:
+-    case Uml::ot_Package:
+-    case Uml::ot_Datatype:
+-    case Uml::ot_Component:
++    default:
+         {
+             UMLPackage *pkg = object->getUMLPackage();
+             if (pkg) {
+                 UMLListViewItem* pkgItem = findUMLObject(pkg);
+                 if (pkgItem == NULL)
+                     kdError() << "UMLListView::determineParentItem: could not find "
+-                    << "parent package " << pkg->getName() << endl;
++                        << "parent package " << pkg->getName() << endl;
+                 else
+                     parentItem = pkgItem;
+-            } else if (lvt == Uml::lvt_Logical_Folder ||
+-                       lvt == Uml::lvt_Component_Folder) {
++            } else if ((lvt == Uml::lvt_UseCase_Folder &&
++                           (t == Uml::ot_Actor || t == Uml::ot_UseCase))
++                    || (lvt == Uml::lvt_Component_Folder && t == Uml::ot_Component)
++                    || (lvt == Uml::lvt_Deployment_Folder && t == Uml::ot_Node)
++                    || (lvt == Uml::lvt_EntityRelationship_Folder && t == Uml::ot_Entity)) {
+                 parentItem = current;
+-            } else if (type == Uml::ot_Component ||
+-                       (type == Uml::ot_Package && object->getStereotype() == "subsystem")) {
+-                parentItem = m_cmpv;
+-            } else if (type == Uml::ot_Datatype) {
++            } else if (t == Uml::ot_Datatype) {
+                 parentItem = m_datatypeFolder;
+             } else {
+-                parentItem = m_lv;
++                Uml::Model_Type guess = Model_Utils::guessContainer(object);
++                parentItem = m_lv[guess];
+             }
+         }
+         break;
+-    case Uml::ot_Actor:
+-    case Uml::ot_UseCase:
+-        if (lvt == Uml::lvt_UseCase_Folder)
+-            parentItem = current;
+-        else
+-            parentItem = m_ucv;
+-        break;
+-    case Uml::ot_Artifact:
+-        if (lvt == Uml::lvt_Component_Folder)
+-            parentItem = current;
+-        else
+-            parentItem = m_cmpv;
+-        break;
+-    case Uml::ot_Node:
+-        if (lvt == Uml::lvt_Deployment_Folder) {
+-            parentItem = current;
+-        } else {
+-            parentItem = m_dplv;
+-        }
+-        break;
+-    case Uml::ot_Entity:
+-        if (lvt == Uml::lvt_EntityRelationship_Folder) {
+-            parentItem = current;
+-        } else {
+-            parentItem = m_entityRelationshipModel;
+-        }
+-        break;
+-    default:
+-        kdWarning() << "UMLListView::determineParentItem("<< object->getName()
+-        << ") : no appropriate parent found for type " << type
+-        << endl;
+-        return NULL;
+     }
+     return parentItem;
+ }
+@@ -677,8 +627,10 @@
+     UMLListViewItem* newItem = findUMLObject(object);
+     if (newItem) {
+         kdDebug() << "UMLListView::slotObjectCreated(" << object->getName()
+-                  << ", id= " << ID2STR(object->getID())
+-                  << "): item already exists." << endl;
++            << ", id= " << ID2STR(object->getID())
++            << "): item already exists." << endl;
++        Uml::Icon_Type icon = convert_LVT_IT(newItem->getType());
++        newItem->setIcon(icon);
+         return;
+     }
+     UMLListViewItem* parentItem = determineParentItem(object);
+@@ -687,7 +639,8 @@
+     Uml::Object_Type type = object->getBaseType();
+ 
+     connectNewObjectsSlots(object);
+-    newItem = new UMLListViewItem(parentItem, object->getName(), convert_OT_LVT(type), object);
++    const Uml::ListView_Type lvt = convert_OT_LVT(object);
++    newItem = new UMLListViewItem(parentItem, object->getName(), lvt, object);
+     if (mayHaveChildItems(type)) {
+         UMLClassifier *c = static_cast<UMLClassifier*>(object);
+         UMLClassifierListItemList cListItems = c->getFilteredList(Uml::ot_UMLObject);
+@@ -759,6 +712,7 @@
+     case Uml::ot_Component:
+     case Uml::ot_Artifact:
+     case Uml::ot_Node:
++    case Uml::ot_Folder:
+         connect(object,SIGNAL(modified()),this,SLOT(slotObjectChanged()));
+         break;
+     case Uml::ot_UMLObject:
+@@ -795,19 +749,18 @@
+     UMLListViewItem *parentItem = findUMLObject(parent);
+     if (parentItem == NULL) {
+         kdDebug() << "UMLListView::childObjectAdded(" << child->getName()
+-                  << "): parent " << parent->getName()
+-              << " does not yet exist, creating it now." << endl;
+-        parentItem = new UMLListViewItem(m_lv, parent->getName(),
+-                                         convert_OT_LVT(parent->getBaseType()),
+-                                         parent);
++            << "): parent " << parent->getName()
++            << " does not yet exist, creating it now." << endl;
++        const Uml::ListView_Type lvt = convert_OT_LVT(parent);
++        parentItem = new UMLListViewItem(m_lv[Uml::mt_Logical], parent->getName(), lvt, parent);
+     } else {
+-        childItem = parentItem->findUMLObject(child);
++        childItem = parentItem->findChildObject(child);
+     }
+     if (childItem) {
+         childItem->setText(text);
+     } else {
+-        childItem = new UMLListViewItem(parentItem, text,
+-                               convert_OT_LVT(child->getBaseType()), child);
++        const Uml::ListView_Type lvt = convert_OT_LVT(child);
++        childItem = new UMLListViewItem(parentItem, text, lvt, child);
+         if (! m_doc->loading()) {
+             ensureItemVisible(childItem);
+             clearSelection();
+@@ -819,18 +772,13 @@
+ 
+ void UMLListView::childObjectRemoved(UMLClassifierListItem* obj) {
+     UMLClassifier *parent = const_cast<UMLClassifier*>(dynamic_cast<const UMLClassifier*>(sender()));
+-    UMLListViewItem *item(0);
+     UMLListViewItem *parentItem = findUMLObject(parent);
+-    for( item = static_cast<UMLListViewItem*>(parentItem->firstChild());
+-            item;
+-            item = static_cast<UMLListViewItem*>(item->nextSibling()) )
+-    {
+-        if(item->getUMLObject() == obj)
+-        {
+-            delete item;
+-            return;
+-        }
++    if (parentItem == NULL) {
++        kdError() << "UMLListView::childObjectRemoved(" << obj->getName()
++            << "): cannot find parent UMLListViewItem" << endl;
++        return;
+     }
++    parentItem->deleteChildItem(obj);
+ }
+ 
+ void UMLListView::slotDiagramRenamed(Uml::IDType id) {
+@@ -884,7 +832,7 @@
+     while((item=it.current()) != 0) {
+         ++it;
+         Uml::ListView_Type type = item->getType();
+-        if ( !typeIsCanvasWidget(type) && !typeIsDiagram(type) && !typeIsFolder(type)
++        if (!typeIsCanvasWidget(type) && !typeIsDiagram(type)
+                 && !typeIsClassifierList(type)) {
+             return 0;
+         }
+@@ -941,7 +889,7 @@
+     return 0;
+ }
+ 
+-UMLListViewItem * UMLListView::findUMLObject(UMLObject *p) const {
++UMLListViewItem * UMLListView::findUMLObject(const UMLObject *p) const {
+     UMLListViewItem *item = static_cast<UMLListViewItem*>(firstChild());
+     while (item) {
+         UMLListViewItem *testItem = item->findUMLObject(p);
+@@ -952,11 +900,11 @@
+     return item;
+ }
+ 
+-void UMLListView::changeIconOf(UMLObject *o, Icon_Type to) {
++void UMLListView::changeIconOf(UMLObject *o, Uml::Icon_Type to) {
+     UMLListViewItem *item = findUMLObject(o);
+     if (item == NULL)
+         return;
+-    item->setPixmap(0, getPixmap(to));
++    item->setIcon(to);
+ }
+ 
+ UMLListViewItem* UMLListView::findView(UMLView* v) {
+@@ -969,15 +917,15 @@
+     Uml::ListView_Type type = convert_DT_LVT( dType );
+     Uml::IDType id = v->getID();
+     if (dType == Uml::dt_UseCase) {
+-        item = m_ucv;
++        item = m_lv[Uml::mt_UseCase];
+     } else if (dType == Uml::dt_Component) {
+-        item = m_cmpv;
++        item = m_lv[Uml::mt_Component];
+     } else if (dType == Uml::dt_Deployment) {
+-        item = m_dplv;
++        item = m_lv[Uml::mt_Deployment];
+     } else if (dType == Uml::dt_EntityRelationship) {
+-        item = m_entityRelationshipModel;
++        item = m_lv[Uml::mt_EntityRelationship];
+     } else {
+-        item = m_lv;
++        item = m_lv[Uml::mt_Logical];
+     }
+ 
+     UMLListViewItem* searchStartItem = (UMLListViewItem *)item->firstChild();
+@@ -1027,19 +975,25 @@
+ // or do connect()s.
+ //
+ void UMLListView::init() {
+-    deleteChildrenOf( m_ucv );
+-    deleteChildrenOf( m_lv );
+-    deleteChildrenOf( m_cmpv );
+-    deleteChildrenOf( m_dplv );
+-    deleteChildrenOf( m_entityRelationshipModel );
+-
++    if (m_rv == NULL) {
++        m_rv =  new UMLListViewItem(this, i18n("Views"), Uml::lvt_View);
++        for (int i = 0; i < Uml::N_MODELTYPES; i++) {
++            Uml::Model_Type mt = (Uml::Model_Type)i;
++            UMLFolder *sysFolder = m_doc->getRootFolder(mt);
++            Uml::ListView_Type lvt = Model_Utils::convert_MT_LVT(mt);
++            m_lv[i] = new UMLListViewItem(m_rv, sysFolder->getName(), lvt, sysFolder);
++        }
++    } else {
++        for (int i = 0; i < Uml::N_MODELTYPES; i++)
++            deleteChildrenOf(m_lv[i]);
++    }
++    UMLFolder *datatypeFolder = m_doc->getDatatypeFolder();
++    m_datatypeFolder = new UMLListViewItem(m_lv[Uml::mt_Logical], datatypeFolder->getName(),
++                                           Uml::lvt_Datatype_Folder, datatypeFolder);
+     m_rv->setOpen(true);
+-    m_ucv->setOpen(true);
+-    m_lv->setOpen(true);
++    for (int i = 0; i < Uml::N_MODELTYPES; i++)
++        m_lv[i]->setOpen(true);
+     m_datatypeFolder->setOpen(false);
+-    m_cmpv->setOpen(true);
+-    m_dplv->setOpen(true);
+-    m_entityRelationshipModel->setOpen(true);
+ 
+     //setup misc.
+     delete m_pMenu;
+@@ -1103,7 +1057,7 @@
+     UMLListViewItem* item = (UMLListViewItem*)itemAt(mousePoint);
+     if(!item) {
+         kdDebug() << "UMLListView::acceptDrag: itemAt(mousePoint) returns NULL"
+-        << endl;
++            << endl;
+         return false;
+     }
+     ((QListView*)this)->setCurrentItem( (QListViewItem*)item );
+@@ -1111,7 +1065,7 @@
+     UMLDrag::LvTypeAndID_List list;
+     if (! UMLDrag::getClip3TypeAndID(event, list)) {
+         kdDebug() << "UMLListView::acceptDrag: UMLDrag::getClip3TypeAndID returns false"
+-        << endl;
++            << endl;
+         return false;
+     }
+ 
+@@ -1173,6 +1127,34 @@
+                 accept = (dstType == Uml::lvt_Logical_View);
+             }
+             break;
++        case Uml::lvt_UseCase_Folder:
++            if (dstType == Uml::lvt_UseCase_Folder) {
++                accept = !item->isOwnParent(data->id);
++            } else {
++                accept = (dstType == Uml::lvt_UseCase_View);
++            }
++            break;
++        case Uml::lvt_Component_Folder:
++            if (dstType == Uml::lvt_Component_Folder) {
++                accept = !item->isOwnParent(data->id);
++            } else {
++                accept = (dstType == Uml::lvt_Component_View);
++            }
++            break;
++        case Uml::lvt_Deployment_Folder:
++            if (dstType == Uml::lvt_Deployment_Folder) {
++                accept = !item->isOwnParent(data->id);
++            } else {
++                accept = (dstType == Uml::lvt_Deployment_View);
++            }
++            break;
++        case Uml::lvt_EntityRelationship_Folder:
++            if (dstType == Uml::lvt_EntityRelationship_Folder) {
++                accept = !item->isOwnParent(data->id);
++            } else {
++                accept = (dstType == Uml::lvt_EntityRelationship_Model);
++            }
++            break;
+         case Uml::lvt_Actor:
+         case Uml::lvt_UseCase:
+         case Uml::lvt_UseCase_Diagram:
+@@ -1211,8 +1193,33 @@
+     return accept;
+ }
+ 
++void UMLListView::addAtContainer(UMLListViewItem *item, UMLListViewItem *parent) {
++    UMLCanvasObject *o = static_cast<UMLCanvasObject*>(item->getUMLObject());
++    if (o == NULL) {
++        kdDebug() << "UMLListView::addAtContainer(" << item->getText()
++            << "): item's UMLObject is NULL" << endl;
++    } else if (typeIsContainer(parent->getType())) {
++        /**** TBC: Do this here?
++                   If yes then remove that logic at the callers
++                   and rename this method to moveAtContainer()
++        UMLPackage *oldPkg = o->getUMLPackage();
++        if (oldPkg)
++            oldPkg->removeObject(o);
++         *********/
++        UMLPackage *pkg = static_cast<UMLPackage*>(parent->getUMLObject());
++        o->setUMLPackage(pkg);
++        pkg->addObject(o);
++    } else {
++        kdError() << "UMLListView::addAtContainer(" << item->getText()
++            << "): parent type is " << parent->getType() << endl;
++    }
++    UMLView *currentView = m_doc->getCurrentView();
++    if (currentView)
++        currentView->updateContainment(o);
++}
++
+ UMLListViewItem * UMLListView::moveObject(Uml::IDType srcId, Uml::ListView_Type srcType,
+-        UMLListViewItem *newParent) {
++                                          UMLListViewItem *newParent) {
+     if (newParent == NULL)
+         return NULL;
+     UMLListViewItem * move = findItem( srcId );
+@@ -1226,14 +1233,14 @@
+         newParentObj = newParent->getUMLObject();
+         if (srcObj == newParentObj) {
+             kdError() << "UMLListView::moveObject(" << srcObj->getName()
+-            << "): Cannot move onto self" << endl;
++                << "): Cannot move onto self" << endl;
+             return NULL;
+         }
+         UMLPackage *srcPkg = srcObj->getUMLPackage();
+         if (srcPkg) {
+             if (srcPkg == newParentObj) {
+                 kdError() << "UMLListView::moveObject(" << srcObj->getName()
+-                << "): Object is already in target package" << endl;
++                    << "): Object is already in target package" << endl;
+                 return NULL;
+             }
+             srcPkg->removeObject(srcObj);
+@@ -1254,6 +1261,7 @@
+                 newParentType == Uml::lvt_UseCase_View) {
+             newItem = move->deepCopy(newParent);
+             delete move;
++            addAtContainer(newItem, newParent);
+         }
+         break;
+     case Uml::lvt_Component_Folder:
+@@ -1263,6 +1271,7 @@
+                 newParentType == Uml::lvt_Component_View) {
+             newItem = move->deepCopy(newParent);
+             delete move;
++            addAtContainer(newItem, newParent);
+         }
+         break;
+     case Uml::lvt_Subsystem:
+@@ -1271,19 +1280,7 @@
+             newParentType == Uml::lvt_Subsystem) {
+             newItem = move->deepCopy(newParent);
+             delete move;
+-            UMLCanvasObject *o = static_cast<UMLCanvasObject*>(newItem->getUMLObject());
+-            if (o == NULL) {
+-                kdDebug() << "moveObject: newItem's UMLObject is NULL"
+-                          << endl;
+-            } else if (newParentType == Uml::lvt_Subsystem) {
+-                UMLPackage *pkg = static_cast<UMLPackage*>(newParentObj);
+-                o->setUMLPackage(pkg);
+-                pkg->addObject(o);
+-            } else {
+-                o->setUMLPackage(NULL);
+-                m_doc->addUMLObject(o);
+-            }
+-            m_doc->getCurrentView()->updateContainment(o);
++            addAtContainer(newItem, newParent);
+         }
+         break;
+     case Uml::lvt_Component:
+@@ -1293,20 +1290,7 @@
+             newParentType == Uml::lvt_Subsystem) {
+             newItem = move->deepCopy(newParent);
+             delete move;
+-            UMLCanvasObject *o = static_cast<UMLCanvasObject*>(newItem->getUMLObject());
+-            if (o == NULL) {
+-                kdDebug() << "moveObject: newItem's UMLObject is NULL"
+-                          << endl;
+-            } else if (newParentType == Uml::lvt_Subsystem ||
+-                       newParentType == Uml::lvt_Component) {
+-                UMLPackage *pkg = static_cast<UMLPackage*>(newParentObj);
+-                o->setUMLPackage(pkg);
+-                pkg->addObject(o);
+-            } else {
+-                o->setUMLPackage(NULL);
+-                m_doc->addUMLObject(o);
+-            }
+-            m_doc->getCurrentView()->updateContainment(o);
++            addAtContainer(newItem, newParent);
+         }
+         break;
+     case Uml::lvt_Deployment_Folder:
+@@ -1316,6 +1300,7 @@
+                 newParentType == Uml::lvt_Deployment_View) {
+             newItem = move->deepCopy(newParent);
+             delete move;
++            addAtContainer(newItem, newParent);
+         }
+         break;
+     case Uml::lvt_EntityRelationship_Folder:
+@@ -1325,6 +1310,7 @@
+                 newParentType == Uml::lvt_EntityRelationship_Model) {
+             newItem = move->deepCopy(newParent);
+             delete move;
++            addAtContainer(newItem, newParent);
+         }
+         break;
+     case Uml::lvt_Collaboration_Diagram:
+@@ -1337,6 +1323,7 @@
+                 newParentType == Uml::lvt_Logical_View) {
+             newItem = move->deepCopy(newParent);
+             delete move;
++            addAtContainer(newItem, newParent);
+         }
+         break;
+     case Uml::lvt_Class:
+@@ -1354,19 +1341,15 @@
+             delete move;
+             UMLCanvasObject *o = static_cast<UMLCanvasObject*>(newItem->getUMLObject());
+             if (o == NULL) {
+-                kdDebug() << "moveObject: newItem's UMLObject is NULL"
+-                << endl;
+-            } else if (newParentType == Uml::lvt_Package ||
+-                       newParentType == Uml::lvt_Interface ||
+-                       newParentType == Uml::lvt_Class) {
++                kdDebug() << "moveObject: newItem's UMLObject is NULL" << endl;
++            } else {
+                 UMLPackage *pkg = static_cast<UMLPackage*>(newParentObj);
+                 o->setUMLPackage( pkg );
+                 pkg->addObject( o );
+-            } else {
+-                o->setUMLPackage( NULL );
+-                m_doc->addUMLObject( o );
+             }
+-            m_doc->getCurrentView()->updateContainment(o);
++            UMLView *currentView = m_doc->getCurrentView();
++            if (currentView)
++                currentView->updateContainment(o);
+         }
+         break;
+     case Uml::lvt_Attribute:
+@@ -1376,6 +1359,8 @@
+             // update list view
+             newItem = move->deepCopy(newParent);
+             delete move;
++            UMLClassifierListItem *cli = dynamic_cast<UMLClassifierListItem*>(srcObj);
++            newParent->addClassifierListItem(cli, newItem);
+             // update model objects
+             m_bCreatingChildObject = true;
+             UMLClassifier *oldParentClassifier = dynamic_cast<UMLClassifier*>(srcObj->parent());
+@@ -1386,10 +1371,15 @@
+                 // because its parent is fixed to the old classifier
+                 // and we have no way of changing that:
+                 // QObject does not permit changing the parent().
+-                if (att && oldParentClassifier->takeItem(att) != -1) {
+-                    UMLAttribute *newAtt = static_cast<UMLAttribute*>(
+-                                               newParentClassifier->createAttribute(
+-                                                   att->getName()));
++                if (att == NULL) {
++                    kdError() << "moveObject internal error: srcObj "
++                        << srcObj->getName() << " is not a UMLAttribute" << endl;
++                } else if (oldParentClassifier->takeItem(att) == -1) {
++                    kdError() << "moveObject: oldParentClassifier->takeItem(att "
++                        << att->getName() << ") returns NULL" << endl;
++                } else {
++                    const QString& nm = att->getName();
++                    UMLAttribute *newAtt = newParentClassifier->createAttribute(nm);
+                     newAtt->setType(att->getType());
+                     newAtt->setVisibility(att->getVisibility());
+                     newAtt->setInitialValue(att->getInitialValue());
+@@ -1398,10 +1388,6 @@
+                     // because the old one is about to be physically deleted !
+                     UMLApp::app()->getDocWindow()->showDocumentation(newAtt, true);
+                     delete att;
+-
+-                } else {
+-                    kdError() << "moveObject: oldParentClassifier->takeItem(att) returns NULL"
+-                    << endl;
+                 }
+             } else {
+                 UMLOperation *op = dynamic_cast<UMLOperation*>(srcObj);
+@@ -1436,7 +1422,7 @@
+                     delete op;
+                 } else {
+                     kdError() << "moveObject: oldParentClassifier->takeItem(op) returns NULL"
+-                    << endl;
++                        << endl;
+                 }
+             }
+             m_bCreatingChildObject = false;
+@@ -1451,8 +1437,7 @@
+ void UMLListView::slotDropped(QDropEvent* de, QListViewItem* /* parent */, QListViewItem* item) {
+     item = (UMLListViewItem *)currentItem();
+     if(!item) {
+-        kdDebug() << "UMLListView::slotDropped: item is NULL - doing nothing"
+-        << endl;
++        kdDebug() << "UMLListView::slotDropped: item is NULL - doing nothing" << endl;
+         return;
+     }
+     UMLDrag::LvTypeAndID_List srcList;
+@@ -1460,8 +1445,7 @@
+         return;
+     }
+     UMLListViewItem *newParent = (UMLListViewItem*)item;
+-    kdDebug() << "slotDropped: newParent->getText() is " << newParent->getText()
+-    << endl;
++    kdDebug() << "slotDropped: newParent->getText() is " << newParent->getText() << endl;
+     UMLDrag::LvTypeAndID_It it(srcList);
+     UMLDrag::LvTypeAndID * src = 0;
+     while((src = it.current()) != 0) {
+@@ -1480,8 +1464,7 @@
+             ItemList.append(item);
+         }
+     }
+-    kdDebug() << "UMLListView::getSelectedItems: selItems = "
+-    << ItemList.count() << endl;
++    kdDebug() << "UMLListView::getSelectedItems: selItems = " << ItemList.count() << endl;
+ 
+     return (int)ItemList.count();
+ }
+@@ -1502,8 +1485,7 @@
+             }
+         }
+     }
+-    kdDebug() << "UMLListView::getSelectedItemsRoot: selItems = "
+-    << ItemList.count() << endl;
++    kdDebug() << "UMLListView::getSelectedItemsRoot: selItems = " << ItemList.count() << endl;
+ 
+     return (int)ItemList.count();
+ }
+@@ -1543,6 +1525,11 @@
+     case Uml::lvt_Datatype:
+     case Uml::lvt_Enum:
+     case Uml::lvt_Entity:
++    case Uml::lvt_Logical_Folder:
++    case Uml::lvt_UseCase_Folder:
++    case Uml::lvt_Component_Folder:
++    case Uml::lvt_Deployment_Folder:
++    case Uml::lvt_EntityRelationship_Folder:
+         /***
+         int newID = IDChanges.findNewID(Data.getID());
+         //if there is no ListViewItem associated with the new ID,
+@@ -1554,11 +1541,6 @@
+         pObject = m_doc->findObjectById( Data.getID() );
+         item = new UMLListViewItem(parent, Data.getText(), lvt, pObject);
+         break;
+-    case Uml::lvt_Logical_Folder:
+-    case Uml::lvt_UseCase_Folder:
+-    case Uml::lvt_Component_Folder:
+-    case Uml::lvt_Deployment_Folder:
+-    case Uml::lvt_EntityRelationship_Folder:
+     case Uml::lvt_Datatype_Folder:
+         item = new UMLListViewItem(parent, Data.getText(), lvt);
+         break;
+@@ -1603,28 +1585,31 @@
+ UMLListViewItem* UMLListView::determineParentItem(Uml::ListView_Type lvt) const {
+     UMLListViewItem* parent = 0;
+     switch (lvt) {
++    case Uml::lvt_Datatype:
++        parent = m_datatypeFolder;
++        break;
+     case Uml::lvt_Actor:
+     case Uml::lvt_UseCase:
+     case Uml::lvt_UseCase_Folder:
+     case Uml::lvt_UseCase_Diagram:
+-        parent = m_ucv;
++        parent = m_lv[Uml::mt_UseCase];
+         break;
+     case Uml::lvt_Component_Diagram:
+     case Uml::lvt_Component:
+     case Uml::lvt_Artifact:
+-        parent = m_cmpv;
++        parent = m_lv[Uml::mt_Component];
+         break;
+     case Uml::lvt_Deployment_Diagram:
+     case Uml::lvt_Node:
+-        parent = m_dplv;
++        parent = m_lv[Uml::mt_Deployment];
+         break;
+     case Uml::lvt_EntityRelationship_Diagram:
+     case Uml::lvt_Entity:
+-        parent = m_entityRelationshipModel;
++        parent = m_lv[Uml::mt_EntityRelationship];
+         break;
+     default:
+         if (typeIsDiagram(lvt) || !typeIsClassifierList(lvt))
+-            parent = m_lv;
++            parent = m_lv[Uml::mt_Logical];
+         break;
+     }
+     return parent;
+@@ -1654,6 +1639,25 @@
+     QListView::focusOutEvent(fe);
+ }
+ 
++Uml::ListView_Type UMLListView::rootViewType(UMLListViewItem *item) {
++    if (item == m_rv)
++        return Uml::lvt_View;
++    if (item == m_lv[Uml::mt_Logical])
++        return Uml::lvt_Logical_View;
++    if (item == m_lv[Uml::mt_UseCase])
++        return Uml::lvt_UseCase_View;
++    if (item == m_lv[Uml::mt_Component])
++        return Uml::lvt_Component_View;
++    if (item == m_lv[Uml::mt_Deployment])
++        return Uml::lvt_Deployment_View;
++    if (item == m_lv[Uml::mt_EntityRelationship])
++        return Uml::lvt_EntityRelationship_Model;
++    UMLListViewItem *parent = dynamic_cast<UMLListViewItem*>(item->parent());
++    if (parent)
++        return rootViewType(parent);
++    return Uml::lvt_Unknown;
++}
++
+ Uml::ListView_Type UMLListView::convert_DT_LVT(Uml::Diagram_Type dt) {
+     Uml::ListView_Type type =  Uml::lvt_Unknown;
+     switch(dt) {
+@@ -1699,7 +1703,8 @@
+     return type;
+ }
+ 
+-Uml::ListView_Type UMLListView::convert_OT_LVT(Uml::Object_Type ot) {
++Uml::ListView_Type UMLListView::convert_OT_LVT(const UMLObject *o) {
++    Uml::Object_Type ot = o->getBaseType();
+     Uml::ListView_Type type =  Uml::lvt_Unknown;
+     switch(ot) {
+     case Uml::ot_UseCase:
+@@ -1718,6 +1723,40 @@
+         type = Uml::lvt_Package;
+         break;
+ 
++    case Uml::ot_Folder:
++        {
++            UMLListView *lv = UMLApp::app()->getListView();
++            UMLListViewItem *lvItem = lv->findUMLObject(o);
++            if (lvItem) {
++                Uml::ListView_Type rootType = lv->rootViewType(lvItem);
++                switch (rootType) {
++                    case Uml::lvt_UseCase_View:
++                        type = Uml::lvt_UseCase_Folder;
++                        break;
++                    case Uml::lvt_Logical_View:
++                        type = Uml::lvt_Logical_Folder;
++                        break;
++                    case Uml::lvt_Component_View:
++                        type = Uml::lvt_Component_Folder;
++                        break;
++                    case Uml::lvt_Deployment_View:
++                        type = Uml::lvt_Deployment_Folder;
++                        break;
++                    case Uml::lvt_EntityRelationship_Model:
++                        type = Uml::lvt_EntityRelationship_Folder;
++                        break;
++                    default:
++                        kdError() << "convert_OT_LVT(" << o->getName()
++                            << "): illegal rootViewType " << rootType << endl;
++                        break;
++                }
++            } else {
++                kdError() << "convert_OT_LVT(" << o->getName()
++                    << "): lv->findUMLObject() returns NULL" << endl;
++            }
++        }
++        break;
++
+     case Uml::ot_Component:
+         type = Uml::lvt_Component;
+         break;
+@@ -1788,6 +1827,11 @@
+ 
+     case Uml::lvt_Package:
+     case Uml::lvt_Subsystem:
++    case Uml::lvt_Logical_Folder:
++    case Uml::lvt_UseCase_Folder:
++    case Uml::lvt_Component_Folder:
++    case Uml::lvt_Deployment_Folder:
++    case Uml::lvt_EntityRelationship_Folder:
+         ot = Uml::ot_Package;
+         break;
+ 
+@@ -1845,180 +1889,159 @@
+     return ot;
+ }
+ 
+-QPixmap & UMLListView::getPixmap( Icon_Type type ) {
+-    switch( type ) {
+-    case it_Home:
+-        return m_Pixmaps.Home;
+-        break;
++Uml::Icon_Type UMLListView::convert_LVT_IT(Uml::ListView_Type lvt) {
++    Uml::Icon_Type icon = Uml::it_Home;
++    switch (lvt) {
++        case Uml::lvt_UseCase_View:
++        case Uml::lvt_UseCase_Folder:
++            icon = Uml::it_Folder_Grey;
++            break;
++        case Uml::lvt_Logical_View:
++        case Uml::lvt_Logical_Folder:
++            icon = Uml::it_Folder_Green;
++            break;
++        case Uml::lvt_Datatype_Folder:
++            icon = Uml::it_Folder_Orange;
++            break;
++        case Uml::lvt_Component_View:
++        case Uml::lvt_Component_Folder:
++            icon = Uml::it_Folder_Red;
++            break;
++        case Uml::lvt_Deployment_View:
++        case Uml::lvt_Deployment_Folder:
++            icon = Uml::it_Folder_Violet;
++            break;
++        case Uml::lvt_EntityRelationship_Model:
++        case Uml::lvt_EntityRelationship_Folder:
++            icon = Uml::it_Folder_Cyan;
++            break;
+ 
+-    case it_Folder_Cyan:
+-        return m_Pixmaps.Folder_Cyan;
+-        break;
++        case Uml::lvt_Actor:
++            icon = Uml::it_Actor;
++            break;
++        case Uml::lvt_UseCase:
++            icon = Uml::it_UseCase;
++            break;
++        case Uml::lvt_Class:
++            icon = Uml::it_Class;
++            break;
++        case Uml::lvt_Package:
++            icon = Uml::it_Package;
++            break;
++        case Uml::lvt_Subsystem:
++            icon = Uml::it_Subsystem;
++            break;
++        case Uml::lvt_Component:
++            icon = Uml::it_Component;
++            break;
++        case Uml::lvt_Node:
++            icon = Uml::it_Node;
++            break;
++        case Uml::lvt_Artifact:
++            icon = Uml::it_Artifact;
++            break;
++        case Uml::lvt_Interface:
++            icon = Uml::it_Interface;
++            break;
++        case Uml::lvt_Datatype:
++            icon = Uml::it_Datatype;
++            break;
++        case Uml::lvt_Enum:
++            icon = Uml::it_Enum;
++            break;
++        case Uml::lvt_Entity:
++            icon = Uml::it_Entity;
++            break;
++        case Uml::lvt_Template:
++            icon = Uml::it_Template;
++            break;
++        case Uml::lvt_Attribute:
++            icon = Uml::it_Private_Attribute;
++            break;
++        case Uml::lvt_EntityAttribute:
++            icon = Uml::it_Private_Attribute;
++            break;
++        case Uml::lvt_Operation:
++            icon = Uml::it_Public_Method;
++            break;
+ 
+-    case it_Folder_Cyan_Open:
+-        return m_Pixmaps.Folder_Cyan_Open;
+-        break;
++        case Uml::lvt_Class_Diagram:
++            icon = Uml::it_Diagram_Class;
++            break;
++        case Uml::lvt_UseCase_Diagram:
++            icon = Uml::it_Diagram_Usecase;
++            break;
++        case Uml::lvt_Sequence_Diagram:
++            icon = Uml::it_Diagram_Sequence;
++            break;
++        case Uml::lvt_Collaboration_Diagram:
++            icon = Uml::it_Diagram_Collaboration;
++            break;
++        case Uml::lvt_State_Diagram:
++            icon = Uml::it_Diagram_State;
++            break;
++        case Uml::lvt_Activity_Diagram:
++            icon = Uml::it_Diagram_Activity;
++            break;
++        case Uml::lvt_Component_Diagram:
++            icon = Uml::it_Diagram_Component;
++            break;
++        case Uml::lvt_Deployment_Diagram:
++            icon = Uml::it_Diagram_Deployment;
++            break;
++        case Uml::lvt_EntityRelationship_Diagram:
++            icon = Uml::it_Diagram_EntityRelationship;
++            break;
+ 
+-    case it_Folder_Green:
+-        return m_Pixmaps.Folder_Green;
+-        break;
++        default:
++            break;
++    }
++    return icon;
++}
+ 
+-    case it_Folder_Green_Open:
+-        return m_Pixmaps.Folder_Green_Open;
+-        break;
++Uml::Diagram_Type UMLListView::convert_LVT_DT(Uml::ListView_Type lvt) {
++    Uml::Diagram_Type dt = Uml::dt_Undefined;
++    switch (lvt) {
++        case Uml::lvt_Class_Diagram:
++            dt = Uml::dt_Class;
++            break;
++        case Uml::lvt_UseCase_Diagram:
++            dt = Uml::dt_UseCase;
++            break;
++        case Uml::lvt_Sequence_Diagram:
++            dt = Uml::dt_Sequence;
++            break;
++        case Uml::lvt_Collaboration_Diagram:
++            dt = Uml::dt_Collaboration;
++            break;
++        case Uml::lvt_State_Diagram:
++            dt = Uml::dt_State;
++            break;
++        case Uml::lvt_Activity_Diagram:
++            dt = Uml::dt_Activity;
++            break;
++        case Uml::lvt_Component_Diagram:
++            dt = Uml::dt_Component;
++            break;
++        case Uml::lvt_Deployment_Diagram:
++            dt = Uml::dt_Deployment;
++            break;
++        case Uml::lvt_EntityRelationship_Diagram:
++            dt = Uml::dt_EntityRelationship;
++            break;
++        default:
++            break;
++    }
++    return dt;
++}
+ 
+-    case it_Folder_Grey:
+-        return m_Pixmaps.Folder_Grey;
+-        break;
+-
+-    case it_Folder_Grey_Open:
+-        return m_Pixmaps.Folder_Grey_Open;
+-        break;
+-
+-    case it_Folder_Orange:
+-        return m_Pixmaps.Folder_Orange;
+-        break;
+-
+-    case it_Folder_Orange_Open:
+-        return m_Pixmaps.Folder_Orange_Open;
+-        break;
+-
+-    case it_Folder_Red:
+-        return m_Pixmaps.Folder_Red;
+-        break;
+-
+-    case it_Folder_Red_Open:
+-        return m_Pixmaps.Folder_Red_Open;
+-        break;
+-
+-    case it_Folder_Violet:
+-        return m_Pixmaps.Folder_Violet;
+-        break;
+-
+-    case it_Folder_Violet_Open:
+-        return m_Pixmaps.Folder_Violet_Open;
+-        break;
+-
+-    case it_Diagram:
+-        return m_Pixmaps.Diagram;
+-        break;
+-
+-    case it_Diagram_Activity:
+-        return m_Pixmaps.Diagram_Activity;
+-        break;
+-
+-    case it_Diagram_Class:
+-        return m_Pixmaps.Diagram_Class;
+-        break;
+-
+-    case it_Diagram_Collaboration:
+-        return m_Pixmaps.Diagram_Collaboration;
+-        break;
+-
+-    case it_Diagram_Component:
+-        return m_Pixmaps.Diagram_Component;
+-        break;
+-
+-    case it_Diagram_Deployment:
+-        return m_Pixmaps.Diagram_Deployment;
+-        break;
+-
+-    case it_Diagram_EntityRelationship:
+-        return m_Pixmaps.Diagram_EntityRelationship;
+-        break;
+-
+-    case it_Diagram_Sequence:
+-        return m_Pixmaps.Diagram_Sequence;
+-        break;
+-
+-    case it_Diagram_State:
+-        return m_Pixmaps.Diagram_State;
+-        break;
+-
+-    case it_Diagram_Usecase:
+-        return m_Pixmaps.Diagram_Usecase;
+-        break;
+-
+-    case it_Class:
+-        return m_Pixmaps.Class;
+-        break;
+-
+-    case it_Template:
+-        return m_Pixmaps.Template;
+-        break;
+-
+-    case it_Package:
+-        return m_Pixmaps.Package;
+-        break;
+-
+-    case it_Subsystem:
+-        return m_Pixmaps.Subsystem;
+-        break;
+-
+-    case it_Component:
+-        return m_Pixmaps.Component;
+-        break;
+-
+-    case it_Node:
+-        return m_Pixmaps.Node;
+-        break;
+-
+-    case it_Artifact:
+-        return m_Pixmaps.Artifact;
+-        break;
+-
+-    case it_Interface:
+-        return m_Pixmaps.Interface;
+-        break;
+-
+-    case it_Datatype:
+-        return m_Pixmaps.Datatype;
+-        break;
+-
+-    case it_Enum:
+-        return m_Pixmaps.Enum;
+-        break;
+-
+-    case it_Entity:
+-        return m_Pixmaps.Entity;
+-        break;
+-
+-    case it_Actor:
+-        return m_Pixmaps.Actor;
+-        break;
+-
+-    case it_UseCase:
+-        return m_Pixmaps.UseCase;
+-        break;
+-
+-    case it_Public_Method:
+-        return m_Pixmaps.Public_Method;
+-        break;
+-
+-    case it_Private_Method:
+-        return m_Pixmaps.Private_Method;
+-        break;
+-
+-    case it_Protected_Method:
+-        return m_Pixmaps.Protected_Method;
+-        break;
+-
+-    case it_Public_Attribute:
+-        return m_Pixmaps.Public_Attribute;
+-        break;
+-
+-    case it_Private_Attribute:
+-        return m_Pixmaps.Private_Attribute;
+-        break;
+-
+-    case it_Protected_Attribute:
+-        return m_Pixmaps.Protected_Attribute;
+-        break;
+-
+-    default:
+-        kdWarning() << "getPixmap() called on unknown icon" << endl;
+-    }//end switch
+-    return m_Pixmaps.Home;//you'll know you have a problem if this shows up in the list!!
++QPixmap & UMLListView::getPixmap(Uml::Icon_Type type) {
++    if (type < Uml::it_Home || type >= Uml::N_ICONTYPES) {
++        kdWarning() << "getPixmap() called on unknown icon " << type << endl;
++        // you'll know you have a problem if this shows up in the list
++        type = Uml::it_Home;
++    }
++    return m_Pixmaps[type];
+ }
+ 
+ void UMLListView::loadPixmaps() {
+@@ -2026,98 +2049,81 @@
+     QString dataDir = dirs -> findResourceDir("data", "umbrello/pics/object.png");
+     dataDir += "/umbrello/pics/";
+ 
+-    m_Pixmaps.Home = BarIcon("folder_home");
+-    m_Pixmaps.Folder_Cyan = BarIcon("folder");
+-    m_Pixmaps.Folder_Cyan_Open = BarIcon("folder_open");
+-    m_Pixmaps.Folder_Green = BarIcon("folder_green");
+-    m_Pixmaps.Folder_Green_Open = BarIcon("folder_green_open");
+-    m_Pixmaps.Folder_Orange = BarIcon("folder_orange");
+-    m_Pixmaps.Folder_Orange_Open = BarIcon("folder_orange_open");
+-    m_Pixmaps.Folder_Grey = BarIcon("folder_grey");
+-    m_Pixmaps.Folder_Grey_Open = BarIcon("folder_grey_open");
+-    m_Pixmaps.Folder_Red = BarIcon("folder_red");
+-    m_Pixmaps.Folder_Red_Open = BarIcon("folder_red_open");
+-    m_Pixmaps.Folder_Violet = BarIcon("folder_violet");
+-    m_Pixmaps.Folder_Violet_Open = BarIcon("folder_violet_open");
++#define makeBarIcon(iconType, barIcon)   m_Pixmaps[iconType] = BarIcon(barIcon)
++    makeBarIcon(Uml::it_Home,               "folder_home");
++    makeBarIcon(Uml::it_Folder_Cyan,        "folder");
++    makeBarIcon(Uml::it_Folder_Cyan_Open,   "folder_open");
++    makeBarIcon(Uml::it_Folder_Green,       "folder_green");
++    makeBarIcon(Uml::it_Folder_Green_Open,  "folder_green_open");
++    makeBarIcon(Uml::it_Folder_Orange,      "folder_orange");
++    makeBarIcon(Uml::it_Folder_Orange_Open, "folder_orange_open");
++    makeBarIcon(Uml::it_Folder_Grey,        "folder_grey");
++    makeBarIcon(Uml::it_Folder_Grey_Open,   "folder_grey_open");
++    makeBarIcon(Uml::it_Folder_Red,         "folder_red");
++    makeBarIcon(Uml::it_Folder_Red_Open,    "folder_red_open");
++    makeBarIcon(Uml::it_Folder_Violet,      "folder_violet");
++    makeBarIcon(Uml::it_Folder_Violet_Open, "folder_violet_open");
+ 
+-    m_Pixmaps.Diagram_Activity = BarIcon("umbrello_diagram_activity");
+-    m_Pixmaps.Diagram_Class = BarIcon("umbrello_diagram_class");
+-    m_Pixmaps.Diagram_Component = BarIcon("umbrello_diagram_component");
+-    m_Pixmaps.Diagram_State = BarIcon("umbrello_diagram_state");
+-    m_Pixmaps.Diagram_Sequence = BarIcon("umbrello_diagram_sequence");
+-    m_Pixmaps.Diagram_Deployment = BarIcon("umbrello_diagram_deployment");
+-    m_Pixmaps.Diagram_EntityRelationship = BarIcon("umbrello_diagram_deployment");
+-    m_Pixmaps.Diagram_Usecase = BarIcon("umbrello_diagram_usecase");
+-    m_Pixmaps.Diagram_Collaboration = BarIcon("umbrello_diagram_collaboration");
++    makeBarIcon(Uml::it_Diagram_Activity,           "umbrello_diagram_activity");
++    makeBarIcon(Uml::it_Diagram_Class,              "umbrello_diagram_class");
++    makeBarIcon(Uml::it_Diagram_Component,          "umbrello_diagram_component");
++    makeBarIcon(Uml::it_Diagram_State,              "umbrello_diagram_state");
++    makeBarIcon(Uml::it_Diagram_Sequence,           "umbrello_diagram_sequence");
++    makeBarIcon(Uml::it_Diagram_Deployment,         "umbrello_diagram_deployment");
++    makeBarIcon(Uml::it_Diagram_EntityRelationship, "umbrello_diagram_deployment");
++    makeBarIcon(Uml::it_Diagram_Usecase,            "umbrello_diagram_usecase");
++    makeBarIcon(Uml::it_Diagram_Collaboration,      "umbrello_diagram_collaboration");
++#undef makeBarIcon
+ 
+-    m_Pixmaps.Diagram.load( dataDir + "CVnamespace.png" );
+-    m_Pixmaps.Class.load( dataDir + "class.png" );
+-    m_Pixmaps.Template.load( dataDir + "template.png" );
+-    m_Pixmaps.Package.load( dataDir + "package.png" );
+-    m_Pixmaps.Subsystem.load( dataDir + "subsystem.png" );
+-    m_Pixmaps.Component.load( dataDir + "component.png" );
+-    m_Pixmaps.Node.load( dataDir + "node.png" );
+-    m_Pixmaps.Artifact.load( dataDir + "artifact.png" );
+-    m_Pixmaps.Interface.load( dataDir + "interface.png" );
+-    m_Pixmaps.Datatype.load( dataDir + "datatype.png" );
+-    m_Pixmaps.Enum.load( dataDir + "enum.png" );
+-    m_Pixmaps.Entity.load( dataDir + "entity.png" );
+-    m_Pixmaps.Actor.load( dataDir + "actor.png" );
+-    m_Pixmaps.UseCase.load( dataDir + "usecase.png" );
+-    m_Pixmaps.Public_Method.load( dataDir + "CVpublic_meth.png" );
+-    m_Pixmaps.Private_Method.load( dataDir + "CVprivate_meth.png" );
+-    m_Pixmaps.Protected_Method.load( dataDir + "CVprotected_meth.png" );
+-    m_Pixmaps.Public_Attribute.load( dataDir + "CVpublic_var.png" );
+-    m_Pixmaps.Private_Attribute.load( dataDir + "CVprivate_var.png" );
+-    m_Pixmaps.Protected_Attribute.load( dataDir + "CVprotected_var.png" );
++#define loadPixmap(iconType, pngName)   m_Pixmaps[iconType].load(dataDir + pngName)
++    loadPixmap(Uml::it_Diagram,    "CVnamespace.png");
++    loadPixmap(Uml::it_Class,      "class.png");
++    loadPixmap(Uml::it_Template,   "template.png");
++    loadPixmap(Uml::it_Package,    "package.png");
++    loadPixmap(Uml::it_Subsystem,  "subsystem.png");
++    loadPixmap(Uml::it_Component,  "component.png");
++    loadPixmap(Uml::it_Node,       "node.png");
++    loadPixmap(Uml::it_Artifact,   "artifact.png");
++    loadPixmap(Uml::it_Interface,  "interface.png");
++    loadPixmap(Uml::it_Datatype,   "datatype.png");
++    loadPixmap(Uml::it_Enum,       "enum.png");
++    loadPixmap(Uml::it_Entity,     "entity.png");
++    loadPixmap(Uml::it_Actor,      "actor.png");
++    loadPixmap(Uml::it_UseCase,    "usecase.png");
++    loadPixmap(Uml::it_Public_Method,  "CVpublic_meth.png");
++    loadPixmap(Uml::it_Private_Method,  "CVprivate_meth.png");
++    loadPixmap(Uml::it_Protected_Method, "CVprotected_meth.png");
++    loadPixmap(Uml::it_Public_Attribute,  "CVpublic_var.png");
++    loadPixmap(Uml::it_Private_Attribute,  "CVprivate_var.png");
++    loadPixmap(Uml::it_Protected_Attribute, "CVprotected_var.png");
++#undef loadPixmap
+ }
+ 
++bool UMLListView::isExpandable(Uml::ListView_Type lvt) {
++    if (typeIsRootView(lvt) || typeIsFolder(lvt))
++        return true;
++    switch (lvt) {
++        case Uml::lvt_Package:
++        case Uml::lvt_Component:
++        case Uml::lvt_Subsystem:
++            return true;
++            break;
++        default:
++            break;
++    }
++    return false;
++}
++
+ void UMLListView::slotExpanded( QListViewItem * item ) {
+-    UMLListViewItem * myItem= (UMLListViewItem *)item;
+-    switch( myItem -> getType() ) {
+-    case Uml::lvt_Logical_View:
+-    case Uml::lvt_UseCase_View:
+-    case Uml::lvt_Component_View:
+-    case Uml::lvt_Deployment_View:
+-    case Uml::lvt_EntityRelationship_Model:
+-    case Uml::lvt_Logical_Folder:
+-    case Uml::lvt_UseCase_Folder:
+-    case Uml::lvt_Component_Folder:
+-    case Uml::lvt_Deployment_Folder:
+-    case Uml::lvt_EntityRelationship_Folder:
+-    case Uml::lvt_Datatype_Folder:
+-    case Uml::lvt_Package:
+-    case Uml::lvt_Component:
+-    case Uml::lvt_Subsystem:
++    UMLListViewItem * myItem= static_cast<UMLListViewItem*>(item);
++    if (isExpandable(myItem->getType()))
+         myItem->updateFolder();
+-        break;
+-    default:
+-        break;
+-    }//end switch
+ }
+ 
+ void UMLListView::slotCollapsed( QListViewItem * item ) {
+-    UMLListViewItem * myItem = (UMLListViewItem *)item;
+-    switch( myItem -> getType() ) {
+-    case Uml::lvt_Logical_View:
+-    case Uml::lvt_UseCase_View:
+-    case Uml::lvt_Component_View:
+-    case Uml::lvt_Deployment_View:
+-    case Uml::lvt_EntityRelationship_Model:
+-    case Uml::lvt_Logical_Folder:
+-    case Uml::lvt_UseCase_Folder:
+-    case Uml::lvt_Component_Folder:
+-    case Uml::lvt_Deployment_Folder:
+-    case Uml::lvt_EntityRelationship_Folder:
+-    case Uml::lvt_Datatype_Folder:
+-    case Uml::lvt_Package:
+-    case Uml::lvt_Component:
+-    case Uml::lvt_Subsystem:
++    UMLListViewItem * myItem = static_cast<UMLListViewItem*>(item);
++    if (isExpandable(myItem->getType()))
+         myItem->updateFolder();
+-        break;
+-    default:
+-        break;
+-    }//end switch
+ }
+ 
+ void UMLListView::slotCutSuccessful() {
+@@ -2128,181 +2134,45 @@
+     }
+ }
+ 
+-void UMLListView::addNewItem( QListViewItem * parent, Uml::ListView_Type type ) {
+-    QString name = i18n("folder");
+-    if (type == Uml::lvt_Datatype)  {
+-        parent = m_datatypeFolder;
+-    }
+-    UMLListViewItem * parentItem = static_cast<UMLListViewItem *>( parent );
+-    UMLListViewItem * newItem = NULL;
+-    parent -> setOpen( true );
+-    switch( type ) {
+-    case Uml::lvt_UseCase_Folder:
+-    case Uml::lvt_Logical_Folder:
+-    case Uml::lvt_Component_Folder:
+-    case Uml::lvt_Deployment_Folder:
+-    case Uml::lvt_EntityRelationship_Folder:
+-    case Uml::lvt_Datatype_Folder:
+-        newItem = new UMLListViewItem( parentItem,
+-                                       name, type, m_doc->getUniqueID() );
+-        break;
++void UMLListView::addNewItem(UMLListViewItem *parentItem, Uml::ListView_Type type) {
++    QString name;
+ 
+-    case Uml::lvt_Actor:
+-        name = Model_Utils::uniqObjectName( Uml::ot_Actor );
+-        newItem = new UMLListViewItem( parentItem, name, type, (UMLObject *)0 );
+-        newItem -> setPixmap( 0, getPixmap( it_Actor ) );
+-        break;
++    //// CHECK: Why?
++    // if (type == Uml::lvt_Datatype) {
++    //     parentItem = m_datatypeFolder;
++    // }
+ 
+-    case Uml::lvt_Class:
+-        name = Model_Utils::uniqObjectName( Uml::ot_Class);
+-        newItem = new UMLListViewItem( parentItem, name, type, (UMLObject *)0 );
+-        newItem -> setPixmap( 0, getPixmap( it_Class ) );
+-        break;
++    UMLPackage *parentPkg = dynamic_cast<UMLPackage*>(parentItem->getUMLObject());
++    if (parentPkg == NULL)
++        kdError() << "UMLListView::addNewItem(type " << type
++            << "): parentPkg is NULL" << endl;
++    UMLListViewItem * newItem = NULL;
++    parentItem->setOpen( true );
+ 
+-    case Uml::lvt_Package:
+-        name = Model_Utils::uniqObjectName( Uml::ot_Package );
+-        newItem = new UMLListViewItem( parentItem, name, type, (UMLObject *)0 );
+-        newItem->setPixmap( 0, getPixmap( it_Package ) );
+-        break;
++    Uml::Icon_Type icon = convert_LVT_IT(type);
+ 
+-    case Uml::lvt_Subsystem:
+-        name = Model_Utils::uniqObjectName( Uml::ot_Package );
+-        newItem = new UMLListViewItem( parentItem, name, type, (UMLObject *)0 );
+-        newItem->setPixmap( 0, getPixmap( it_Subsystem ) );
+-        break;
+-
+-    case Uml::lvt_Component:
+-        name = Model_Utils::uniqObjectName( Uml::ot_Component );
+-        newItem = new UMLListViewItem( parentItem, name, type, (UMLObject *)0 );
+-        newItem->setPixmap( 0, getPixmap( it_Component ) );
+-        break;
+-
+-    case Uml::lvt_Node:
+-        name = Model_Utils::uniqObjectName( Uml::ot_Node );
+-        newItem = new UMLListViewItem( parentItem, name, type, (UMLObject *)0 );
+-        newItem->setPixmap( 0, getPixmap( it_Node ) );
+-        break;
+-
+-    case Uml::lvt_Artifact:
+-        name = Model_Utils::uniqObjectName( Uml::ot_Artifact );
+-        newItem = new UMLListViewItem( parentItem, name, type, (UMLObject *)0 );
+-        newItem->setPixmap( 0, getPixmap( it_Artifact ) );
+-        break;
+-
+-    case Uml::lvt_Interface:
+-        name = Model_Utils::uniqObjectName( Uml::ot_Interface );
+-        newItem = new UMLListViewItem( parentItem, name, type, (UMLObject*)0 );
+-        newItem->setPixmap( 0, getPixmap( it_Interface ) );
+-        break;
+-
+-    case Uml::lvt_Datatype:
+-        name = Model_Utils::uniqObjectName( Uml::ot_Datatype );
+-        newItem = new UMLListViewItem( parentItem, name, type, (UMLObject*)0 );
+-        newItem->setPixmap( 0, getPixmap( it_Datatype ) );
+-        break;
+-
+-    case Uml::lvt_Enum:
+-        name = Model_Utils::uniqObjectName( Uml::ot_Enum );
+-        newItem = new UMLListViewItem( parentItem, name, type, (UMLObject*)0 );
+-        newItem->setPixmap( 0, getPixmap( it_Enum ) );
+-        break;
+-
+-    case Uml::lvt_Entity:
+-        name = Model_Utils::uniqObjectName( Uml::ot_Entity );
+-        newItem = new UMLListViewItem( parentItem, name, type, (UMLObject*)0 );
+-        newItem->setPixmap( 0, getPixmap( it_Entity ) );
+-        break;
+-
+-    case Uml::lvt_Template:
+-        {
+-            UMLClassifier *parent = static_cast<UMLClassifier*>(parentItem->getUMLObject());
+-            name = parent->uniqChildName(Uml::ot_Template);
+-            newItem = new UMLListViewItem( parentItem, name, type, (UMLObject*)0 );
+-            newItem->setPixmap( 0, getPixmap( it_Template ) );
+-            break;
++    if (typeIsDiagram(type)) {
++        Uml::Diagram_Type dt = convert_LVT_DT(type);
++        name = getUniqueDiagramName(dt);
++        newItem = new UMLListViewItem(parentItem, name, type, Uml::id_None);
++    } else {
++        Uml::Object_Type ot = convert_LVT_OT(type);
++        if (ot == Uml::ot_UMLObject) {
++            kdDebug() << "UMLListView::addNewItem: no UMLObject for listview type "
++                << type << endl;
++            return;
+         }
+-    case Uml::lvt_Attribute:
+-        {
+-            UMLClassifier *umlParent = static_cast<UMLClassifier*>(parentItem->getUMLObject());
+-            name = umlParent->uniqChildName( Uml::ot_Attribute );
+-            newItem = new UMLListViewItem( parentItem, name, type, (UMLObject *)0 );
+-            newItem -> setPixmap( 0, getPixmap( it_Private_Attribute ) );
+-            break;
++        if (typeIsClassifierList(type)) {
++            UMLClassifier *parent = static_cast<UMLClassifier*>(parentPkg);
++            name = parent->uniqChildName(ot);
++        } else {
++            name = Model_Utils::uniqObjectName(ot, parentPkg);
+         }
+-    case Uml::lvt_EntityAttribute:
+-        {
+-            UMLEntity *umlParent = static_cast<UMLEntity*>(parentItem->getUMLObject());
+-            name = umlParent->uniqChildName( Uml::ot_EntityAttribute );
+-            newItem = new UMLListViewItem( parentItem, name, type, (UMLObject *)0 );
+-            newItem -> setPixmap( 0, getPixmap( it_Private_Attribute ) );
+-            break;
+-        }
+-    case Uml::lvt_Operation:
+-        {
+-            UMLClassifier * childParent = static_cast<UMLClassifier *>( parentItem->getUMLObject() );
+-            name = childParent->uniqChildName( Uml::ot_Operation );
+-            newItem = new UMLListViewItem( parentItem, name, type, (UMLObject *)0 );
+-            newItem -> setPixmap( 0, getPixmap( it_Public_Method ) );
+-            break;
+-        }
+-    case Uml::lvt_UseCase:
+-        name = Model_Utils::uniqObjectName( Uml::ot_UseCase );
+-        newItem = new UMLListViewItem( parentItem, name, type, (UMLObject *)0 );
+-        newItem -> setPixmap( 0, getPixmap( it_UseCase ) );
+-        break;
+-
+-    case Uml::lvt_Class_Diagram:
+-        name = getUniqueDiagramName( Uml::dt_Class );
+-        newItem = new UMLListViewItem( parentItem, name, type, Uml::id_None );
+-        break;
+-
+-    case Uml::lvt_UseCase_Diagram:
+-        name = getUniqueDiagramName( Uml::dt_UseCase );
+-        newItem = new UMLListViewItem( parentItem, name, type, Uml::id_None );
+-        break;
+-
+-    case Uml::lvt_Sequence_Diagram:
+-        name = getUniqueDiagramName( Uml::dt_Sequence );
+-        newItem = new UMLListViewItem( parentItem, name, type, Uml::id_None );
+-        break;
+-
+-    case Uml::lvt_Collaboration_Diagram:
+-        name = getUniqueDiagramName( Uml::dt_Collaboration );
+-        newItem = new UMLListViewItem( parentItem, name, type, Uml::id_None );
+-        break;
+-
+-    case Uml::lvt_State_Diagram:
+-        name = getUniqueDiagramName( Uml::dt_State );
+-        newItem = new UMLListViewItem( parentItem, name, type, Uml::id_None );
+-        break;
+-
+-    case Uml::lvt_Activity_Diagram:
+-        name = getUniqueDiagramName( Uml::dt_Activity );
+-        newItem = new UMLListViewItem( parentItem, name, type, Uml::id_None );
+-        break;
+-
+-    case Uml::lvt_Component_Diagram:
+-        name = getUniqueDiagramName(Uml::dt_Component);
+-        newItem = new UMLListViewItem(parentItem, name, type, Uml::id_None);
+-        break;
+-
+-    case Uml::lvt_Deployment_Diagram:
+-        name = getUniqueDiagramName(Uml::dt_Deployment);
+-        newItem = new UMLListViewItem(parentItem, name, type, Uml::id_None);
+-        break;
+-
+-    case Uml::lvt_EntityRelationship_Diagram:
+-        name = getUniqueDiagramName(Uml::dt_EntityRelationship);
+-        newItem = new UMLListViewItem(parentItem, name, type, Uml::id_None);
+-        break;
+-    default:
+-        break;
++        newItem = new UMLListViewItem(parentItem, name, type, (UMLObject*)0);
++        newItem->setIcon(icon);
+     }
+-    if (newItem == NULL) {
+-        kdDebug() << "UMLListView::addNewItem: nothing added" << endl;
+-        return;
+-    }
+     m_bIgnoreCancelRename = false;
++    newItem->setIcon( icon );
+     newItem->setOpen( true );
+     newItem->setCreating( true );
+     newItem->startRename( 0 );  // calls QListView::ensureItemVisible()
+@@ -2329,10 +2199,6 @@
+             i18n( "Name Not Valid" ) );
+         return false;
+     }
+-    // No need to do anything for folders if the string length was > 0
+-    if( typeIsFolder(type) ) {
+-        return true;
+-    }
+ 
+     if( !isUnique( renamedItem, newText ) ) {
+         //if operation ask if ok not to be unique i.e overloading
+@@ -2356,6 +2222,11 @@
+     case Uml::lvt_Actor:
+     case Uml::lvt_Class:
+     case Uml::lvt_Package:
++    case Uml::lvt_Logical_Folder:
++    case Uml::lvt_UseCase_Folder:
++    case Uml::lvt_Component_Folder:
++    case Uml::lvt_Deployment_Folder:
++    case Uml::lvt_EntityRelationship_Folder:
+     case Uml::lvt_Subsystem:
+     case Uml::lvt_Component:
+     case Uml::lvt_Node:
+@@ -2374,6 +2245,8 @@
+             UMLObject *o = createUMLObject( renamedItem, ot );
+             if (type == Uml::lvt_Subsystem)
+                 o->setStereotype("subsystem");
++            else if (typeIsFolder(type))
++                o->setStereotype("folder");
+         }
+         break;
+ 
+@@ -2447,6 +2320,10 @@
+         object = new UMLPackage( name );
+         break;
+ 
++    case Uml::ot_Folder:
++        object = new UMLFolder( name );
++        break;
++
+     case Uml::ot_Component:
+         object = new UMLComponent( name );
+         break;
+@@ -2485,15 +2362,17 @@
+     }
+ 
+     UMLListViewItem * parentItem = static_cast<UMLListViewItem *>(item->parent());
+-    if (parentItem->getType() == Uml::lvt_Package ||
+-        parentItem->getType() == Uml::lvt_Subsystem ||
+-        parentItem->getType() == Uml::lvt_Component) {
+-        UMLPackage *pkg = static_cast<UMLPackage*>(parentItem->getUMLObject());
+-        object->setUMLPackage(pkg);
+-        pkg->addObject(object);
++    const Uml::ListView_Type lvt = parentItem->getType();
++    if (! typeIsContainer(lvt)) {
++        kdError() << "UMLListView::createUMLObject(" << object->getName()
++            << "): parentItem (" << lvt << " is not a container" << endl;
++        delete object;
++        return NULL;
+     }
++    UMLPackage *pkg = static_cast<UMLPackage*>(parentItem->getUMLObject());
++    object->setUMLPackage(pkg);
++    pkg->addObject(object);
+     connectNewObjectsSlots(object);
+-    m_doc -> addUMLObject( object );
+     item -> setUMLObject( object );
+     item -> setText( name );
+     return object;
+@@ -2504,8 +2383,7 @@
+     QString text = item->text( 0 );
+     UMLObject* parent = static_cast<UMLListViewItem *>( item->parent() )->getUMLObject();
+     if( !parent ) {
+-        kdError() << "UMLListView::createChildUMLObject: parent UMLObject is NULL"
+-        << endl;
++        kdError() << "UMLListView::createChildUMLObject: parent UMLObject is NULL" << endl;
+         m_bCreatingChildObject = false;
+         return false;
+     }
+@@ -2573,7 +2451,7 @@
+         text = op->toString(Uml::st_SigNoVis);
+     } else {
+         kdError() << "UMLListView::createChildUMLObject called for type "
+-        << type << " (ignored)" << endl;
++            << type << " (ignored)" << endl;
+         m_bCreatingChildObject = false;
+         return false;
+     }
+@@ -2597,7 +2475,7 @@
+     view = new UMLView();
+     view->setName( name );
+     view->setType( type );
+-    view->setID( m_doc -> getUniqueID() );
++    view->setID( UniqueID::gen() );
+     m_doc -> addView( view );
+     view -> setOptionState( Settings::getOptionState() );
+     item -> setID( view -> getID() );
+@@ -2662,20 +2540,22 @@
+     case Uml::lvt_Interface:
+     case Uml::lvt_Datatype:
+     case Uml::lvt_Enum:
++    case Uml::lvt_Entity:
+     case Uml::lvt_Component:
+     case Uml::lvt_Subsystem:
+-    case Uml::lvt_Entity:
++    case Uml::lvt_Logical_Folder:
++    case Uml::lvt_UseCase_Folder:
++    case Uml::lvt_Component_Folder:
++    case Uml::lvt_Deployment_Folder:
++    case Uml::lvt_EntityRelationship_Folder:
+         {
+             Uml::ListView_Type lvt = parentItem->getType();
+-            if (lvt != Uml::lvt_Package &&
+-                lvt != Uml::lvt_Component &&
+-                lvt != Uml::lvt_Subsystem)
++            if (!typeIsContainer(lvt))
+                 return (m_doc->findUMLObject(name) == NULL);
+             UMLPackage *pkg = static_cast<UMLPackage*>(parentItem->getUMLObject());
+             if (pkg == NULL) {
+                 kdError() << "UMLListView::isUnique: internal error - "
+-                << "parent listviewitem is package but has no UMLObject"
+-                << endl;
++                    << "parent listviewitem is package but has no UMLObject" << endl;
+                 return true;
+             }
+             return (pkg->findObject(name) == NULL);
+@@ -2745,6 +2625,7 @@
+ bool UMLListView::loadChildrenFromXMI( UMLListViewItem * parent, QDomElement & element ) {
+     QDomNode node = element.firstChild();
+     QDomElement domElement = node.toElement();
++    const QString pfx("UMLListView::loadChildrenFromXMI: ");
+     while( !domElement.isNull() ) {
+         node = domElement.nextSibling();
+         if( domElement.tagName() != "listitem" ) {
+@@ -2773,26 +2654,45 @@
+             if (idchanges != NULL) {
+                 Uml::IDType newID = idchanges->findNewID(nID);
+                 if (newID != Uml::id_None) {
+-                    kdDebug() << "UMLListView::loadChildrenFromXMI:"
+-                    << " using id " << ID2STR(newID)
+-                    << " instead of " << ID2STR(nID) << endl;
++                    kdDebug() << pfx << " using id " << ID2STR(newID)
++                        << " instead of " << ID2STR(nID) << endl;
+                     nID = newID;
+                 }
+             }
+             /************ End of hack for copy/paste code ************/
+ 
+             pObject = m_doc->findObjectById(nID);
+-            if (pObject && label.isEmpty())
+-                label = pObject->getName();
+-
++            if (pObject) {
++                if (label.isEmpty())
++                    label = pObject->getName();
++            } else if (typeIsFolder(lvType)) {
++                // Synthesize the UMLFolder here
++                UMLObject *umlParent = parent->getUMLObject();
++                UMLPackage *parentPkg = dynamic_cast<UMLPackage*>(umlParent);
++                if (parentPkg == NULL) {
++                    kdError() << pfx << "umlParent(" << umlParent << ") is not a UMLPackage"
++                        << endl;
++                    continue;
++                }
++                UMLFolder *f = new UMLFolder(label, nID);
++                f->setUMLPackage(parentPkg);
++                parentPkg->addObject(f);
++                pObject = f;
++                item = new UMLListViewItem(parent, label, lvType, pObject);
++                // Moving all relevant UMLObjects to the new UMLFolder is done below,
++                // in the switch(lvType)
++            }
++        } else if (typeIsRootView(lvType)) {
++            // Predefined folders did not have their ID set.
++            const Uml::Model_Type mt = Model_Utils::convert_LVT_MT(lvType);
++            nID = m_doc->getRootFolder(mt)->getID();
+         } else if (typeIsFolder(lvType)) {
+             // Pre-1.2 format: Folders did not have their ID set.
+             // Pull a new ID now.
+-            nID = m_doc->getUniqueID();
+-        } else if (type != "801" && type != "802" &&
+-                   type != "821" && type != "827" && type != "836") {
++            nID = UniqueID::get();
++        } else {
+             kdError() << "UMLListView::loadChildrenFromXMI: item of type "
+-            << type << " has no ID, skipping." << endl;
++                << type << " has no ID, skipping." << endl;
+             domElement = node.toElement();
+             continue;
+         }
+@@ -2810,8 +2710,16 @@
+         case Uml::lvt_Component:
+         case Uml::lvt_Node:
+         case Uml::lvt_Artifact:
++        case Uml::lvt_Logical_Folder:
++        case Uml::lvt_UseCase_Folder:
++        case Uml::lvt_Component_Folder:
++        case Uml::lvt_Deployment_Folder:
++        case Uml::lvt_EntityRelationship_Folder:
+             item = findItem(nID);
+             if (item == NULL) {
++                kdError() << pfx << "INTERNAL ERROR: "
++                    << "findItem(id " << ID2STR(nID) << ") returns NULL" << endl;
++                /*
+                 if (pObject && pObject->getUMLPackage() &&
+                         parent->getType() != Uml::lvt_Package) {
+                     // Pre-1.2 file format:
+@@ -2820,9 +2728,8 @@
+                     UMLPackage *umlpkg = pObject->getUMLPackage();
+                     UMLListViewItem *pkgItem = findUMLObject(umlpkg);
+                     if (pkgItem == NULL) {
+-                        kdDebug() << "UMLListView::loadChildrenFromXMI: "
+-                        << "synthesizing ListViewItem for package "
+-                        << ID2STR(umlpkg->getID()) << endl;
++                        kdDebug() << pfx << "synthesizing ListViewItem for package "
++                            << ID2STR(umlpkg->getID()) << endl;
+                         pkgItem = new UMLListViewItem(parent, umlpkg->getName(),
+                                                       Uml::lvt_Package, umlpkg);
+                         pkgItem->setOpen(true);
+@@ -2831,9 +2738,10 @@
+                 } else {
+                     item = new UMLListViewItem(parent, label, lvType, pObject);
+                 }
++                 */
+             }
+-            else if (parent != item->parent())
+-            { // The existing item was created by the slot event triggered
++            else if (parent != item->parent()) {
++                // The existing item was created by the slot event triggered
+                 // by the loading of the corresponding model object from the
+                 // XMI file.
+                 // This early creation is done in order to support the loading
+@@ -2844,12 +2752,12 @@
+                 // one of the default predefined folders, but the actual
+                 // listview item might be located in a user created folder.
+                 // Thanks to Achim Spangler for spotting the problem.
+-                /* kdDebug() << "UMLListView::loadChildrenFromXMI: Reparenting "
+-                          << item->getText() << endl;
+-                 */
+-                UMLListViewItem *newItem = item->deepCopy(parent);
+-                delete item;
++                UMLListViewItem *newItem = moveObject(nID, lvType, parent);
+                 item = newItem;
++                UMLListViewItem *currentParent = static_cast<UMLListViewItem*>(item->parent());
++                kdError() << pfx << "Attempted reparenting of " << item->getText()
++                    << "(current parent: " << currentParent->getText()
++                    << ", new parent: " << parent->getText() << ")" << endl;
+             }
+             break;
+         case Uml::lvt_Attribute:
+@@ -2859,18 +2767,15 @@
+         case Uml::lvt_EnumLiteral:
+             item = findItem(nID);
+             if (item == NULL) {
+-                kdDebug() << "UMLListView::loadChildrenFromXMI: "
+-                << "item " << ID2STR(nID) << " (of type "
+-                << lvType << ") does not yet exist..."
+-                << endl;
++                kdDebug() << pfx << "item " << ID2STR(nID) << " (of type "
++                    << lvType << ") does not yet exist..." << endl;
+                 UMLObject* umlObject = parent->getUMLObject();
+                 if (!umlObject) {
+                     kdDebug() << "And also the parent->getUMLObject() does not exist" << endl;
+                     return false;
+                 }
+                 if (nID == Uml::id_None) {
+-                    kdWarning() << "UMLListView::loadChildrenFromXMI: lvtype " << lvType
+-                    << " has id -1" << endl;
++                    kdWarning() << pfx << "lvtype " << lvType << " has id -1" << endl;
+                 } else {
+                     UMLClassifier *classifier = dynamic_cast<UMLClassifier*>(umlObject);
+                     if (classifier) {
+@@ -2880,55 +2785,43 @@
+                             label = umlObject->getName();
+                             item = new UMLListViewItem( parent, label, lvType, umlObject);
+                         } else {
+-                            kdDebug() << "UMLListView::loadChildrenFromXMI: "
+-                            << " lvtype " << lvType << " child object "
+-                            << ID2STR(nID) << " not found" << endl;
++                            kdDebug() << pfx << "lvtype " << lvType << " child object "
++                                << ID2STR(nID) << " not found" << endl;
+                         }
+                     } else {
+-                        kdDebug() << "UMLListView::loadChildrenFromXMI: "
+-                        << "cast to classifier object failed" << endl;
++                        kdDebug() << pfx << "cast to classifier object failed" << endl;
+                     }
+                 }
+             }
+             break;
+         case Uml::lvt_Logical_View:
+-            item = m_lv;
++            item = m_lv[Uml::mt_Logical];
+             break;
+         case Uml::lvt_Datatype_Folder:
+             item = m_datatypeFolder;
+             break;
+         case Uml::lvt_UseCase_View:
+-            item = m_ucv;
++            item = m_lv[Uml::mt_UseCase];
+             break;
+         case Uml::lvt_Component_View:
+-            item = m_cmpv;
++            item = m_lv[Uml::mt_Component];
+             break;
+         case Uml::lvt_Deployment_View:
+-            item = m_dplv;
++            item = m_lv[Uml::mt_Deployment];
+             break;
+         case Uml::lvt_EntityRelationship_Model:
+-            item = m_entityRelationshipModel;
++            item = m_lv[Uml::mt_EntityRelationship];
+             break;
+         default:
+-            {
++            if (typeIsDiagram(lvType)) {
+                 Settings::OptionState optionState = Settings::getOptionState();
+-                if (!optionState.generalState.tabdiagrams ||
+-                        //don't load diagrams any more, tabbed diagrams
+-                        !typeIsDiagram(lvType) ) {
++                // don't load diagrams any more when using tabbed diagrams
++                if (!optionState.generalState.tabdiagrams) {
+                     item = new UMLListViewItem( parent, label, lvType, nID );
+-                    if (UMLListView::typeIsFolder(lvType)) {
+-                        QString folderFile = domElement.attribute( "external_file", "" );
+-                        if (!folderFile.isEmpty()) {
+-                            setCurrentItem(item);
+-                            item->setFolderFile(folderFile);
+-                            const QString fqfn(m_doc->URL().directory(false) + folderFile);
+-                            kdDebug() << "UMLListView::loadChildrenFromXMI:"
+-                            << " fully qualified folderFile is " << fqfn
+-                            << endl;
+-                            m_doc->loadFolderFile(fqfn);
+-                        }
+-                    }
+                 }
++            } else {
++                kdError() << pfx << "INTERNAL ERROR: unexpected listview type "
++                    << lvType << " (ID " << ID2STR(nID) << ")" << endl;
+             }
+             break;
+         }//end switch
+@@ -2940,7 +2833,7 @@
+             }
+         } else {
+             kdWarning() << "unused list view item " << ID2STR(nID)
+-            << " of lvtype " << lvType << endl;
++                << " of lvtype " << lvType << endl;
+         }
+         domElement = node.toElement();
+     }//end while
+@@ -2980,58 +2873,94 @@
+             theView = m_rv;
+             break;
+         case Uml::lvt_Logical_View:
+-            theView = m_lv;
++            theView = m_lv[Uml::mt_Logical];
+             break;
+         case Uml::lvt_UseCase_View:
+-            theView = m_ucv;
++            theView = m_lv[Uml::mt_UseCase];
+             break;
+         case Uml::lvt_Component_View:
+-            theView = m_cmpv;
++            theView = m_lv[Uml::mt_Component];
+             break;
+         case Uml::lvt_Deployment_View:
+-            theView = m_dplv;
++            theView = m_lv[Uml::mt_Deployment];
+             break;
+         case Uml::lvt_EntityRelationship_Model:
+-            theView = m_entityRelationshipModel;
++            theView = m_lv[Uml::mt_EntityRelationship];
+             break;
++        case Uml::lvt_Datatype_Folder:   // @todo fix asymmetric naming
++            theView = m_datatypeFolder;
++            break;
+         default:
+             break;
+     }
+     return theView;
+ }
+ 
++bool UMLListView::typeIsRootView(Uml::ListView_Type type) {
++    switch (type) {
++        case Uml::lvt_View:
++        case Uml::lvt_Logical_View:
++        case Uml::lvt_UseCase_View:
++        case Uml::lvt_Component_View:
++        case Uml::lvt_Deployment_View:
++        case Uml::lvt_EntityRelationship_Model:
++            return true;
++            break;
++        default:
++            break;
++    }
++    return false;
++}
++
+ bool UMLListView::typeIsCanvasWidget(Uml::ListView_Type type) {
+-    if (type == Uml::lvt_Actor ||
+-            type == Uml::lvt_UseCase ||
+-            type == Uml::lvt_Class ||
+-            type == Uml::lvt_Package ||
+-            type == Uml::lvt_Subsystem ||
+-            type == Uml::lvt_Component ||
+-            type == Uml::lvt_Node ||
+-            type == Uml::lvt_Artifact ||
+-            type == Uml::lvt_Interface ||
+-            type == Uml::lvt_Datatype ||
+-            type == Uml::lvt_Enum ||
+-            type == Uml::lvt_Entity) {
+-        return true;
+-    } else {
+-        return false;
++    switch (type) {
++        case Uml::lvt_Actor:
++        case Uml::lvt_UseCase:
++        case Uml::lvt_Class:
++        case Uml::lvt_Package:
++        case Uml::lvt_Logical_Folder:
++        case Uml::lvt_UseCase_Folder:
++        case Uml::lvt_Component_Folder:
++        case Uml::lvt_Deployment_Folder:
++        case Uml::lvt_EntityRelationship_Folder:
++        case Uml::lvt_Subsystem:
++        case Uml::lvt_Component:
++        case Uml::lvt_Node:
++        case Uml::lvt_Artifact:
++        case Uml::lvt_Interface:
++        case Uml::lvt_Datatype:
++        case Uml::lvt_Enum:
++        case Uml::lvt_Entity:
++            return true;
++            break;
++        default:
++            break;
+     }
++    return false;
+ }
+ 
+ bool UMLListView::typeIsFolder(Uml::ListView_Type type) {
+-    if (type == Uml::lvt_Logical_Folder ||
++    if (typeIsRootView(type) ||
++            type == Uml::lvt_Datatype_Folder ||
++            type == Uml::lvt_Logical_Folder ||
+             type == Uml::lvt_UseCase_Folder ||
+             type == Uml::lvt_Component_Folder ||
+             type == Uml::lvt_Deployment_Folder ||
+-            type == Uml::lvt_EntityRelationship_Folder ||
+-            type == Uml::lvt_Datatype_Folder) {
++            type == Uml::lvt_EntityRelationship_Folder) {
+         return true;
+     } else {
+         return false;
+     }
+ }
+ 
++bool UMLListView::typeIsContainer(Uml::ListView_Type type) {
++    if (typeIsFolder(type))
++        return true;
++    return (type == Uml::lvt_Package ||
++            type == Uml::lvt_Subsystem ||
++            type == Uml::lvt_Component);
++}
++
+ bool UMLListView::typeIsClassifierList(Uml::ListView_Type type) {
+     if (type == Uml::lvt_Attribute ||
+         type == Uml::lvt_Operation ||
+@@ -3068,9 +2997,6 @@
+     while ( parent->firstChild() ) {
+         delete parent->firstChild();
+     }
+-    if (parent == m_lv)  {
+-        m_datatypeFolder = new UMLListViewItem(m_lv, i18n("Datatypes"), Uml::lvt_Datatype_Folder);
+-    }
+ }
+ 
+ void UMLListView::closeDatatypesFolder()  {
+@@ -3085,34 +3011,20 @@
+     Uml::ListView_Type lvt = temp->getType();
+     if ( typeIsDiagram(lvt) ) {
+         m_doc->removeDiagram( temp->getID() );
+-    } else if( typeIsFolder(lvt) ) {
++    } else if (temp == m_datatypeFolder) {
+         // we can't delete the datatypeFolder because umbrello will crash without a special handling
+-        if ( temp == m_datatypeFolder ) {
+-            return false;
+-        }
+-        if ( temp->firstChild() ) {
+-            KMessageBox::error(
+-                kapp->mainWidget(),
+-                i18n("The folder must be emptied before it can be deleted."),
+-                i18n("Folder Not Empty"));
+-        } else {
+-            delete temp;
+-        }
+-    } else if ( typeIsCanvasWidget(lvt) || typeIsClassifierList(lvt) ) {
+-        if (lvt == Uml::lvt_Package ||
+-            lvt == Uml::lvt_Class ||
+-            lvt == Uml::lvt_Component ||
+-            lvt == Uml::lvt_Subsystem) {
+-            UMLPackage *nmSpc = dynamic_cast<UMLPackage*>(object);
+-            if (nmSpc == NULL) {
+-                kdError() << "internal problem: object is not a package" << endl;
++        return false;
++    } else if (typeIsCanvasWidget(lvt) || typeIsClassifierList(lvt)) {
++        UMLPackage *nmSpc = dynamic_cast<UMLPackage*>(object);
++        if (nmSpc) {
++            UMLObjectList contained = nmSpc->containedObjects();
++            if (contained.count()) {
++                KMessageBox::error(
++                    kapp->mainWidget(),
++                    i18n("The folder must be emptied before it can be deleted."),
++                    i18n("Folder Not Empty"));
+                 return false;
+             }
+-            UMLObjectList contained = nmSpc->containedObjects();
+-            for (UMLObjectListIt it(contained); it.current(); ++it) {
+-                UMLObject *obj = it.current();
+-                moveObject(obj->getID(), convert_OT_LVT(obj->getBaseType()), m_lv);
+-            }
+         }
+         UMLCanvasObject *canvasObj = dynamic_cast<UMLCanvasObject*>(object);
+         if (canvasObj) {
+@@ -3126,10 +3038,16 @@
+              */
+             canvasObj->removeAllAssociations();
+         }
+-        m_doc->removeUMLObject(object);
++        if (object) {
++            m_doc->removeUMLObject(object);
++            // Physical deletion of `temp' will be done by Qt signal, see
++            // UMLDoc::removeUMLObject()
++        } else {
++            delete temp;
++        }
+     } else {
+         kdWarning() << "umllistview::listpopupmenu::mt_Delete called with unknown type"
+-        << endl;
++            << endl;
+     }
+     return true;
+ }
+--- umbrello/umbrello/main.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/main.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -32,6 +32,9 @@
+     I18N_NOOP("Umbrello UML Modeller");
+ // INSERT A DESCRIPTION FOR YOUR APPLICATION HERE
+ 
++/**
++ * @todo Add options to use the documentation generators from command line.
++ */
+ static KCmdLineOptions options[] =
+     {
+         { "+[File]", I18N_NOOP("File to open"), 0 },
+@@ -81,6 +84,11 @@
+  */
+ void exportAllViews(KCmdLineArgs *args, const QCStringList &exportOpt);
+ 
++extern "C" int flushEvents() {
++    kapp->processEvents();
++    return 0;
++}
++
+ int main(int argc, char *argv[]) {
+     KAboutData aboutData( "umbrello", I18N_NOOP("Umbrello UML Modeller"),
+                           UMBRELLO_VERSION, description, KAboutData::License_GPL,
+@@ -99,6 +107,7 @@
+         bool showGUI = getShowGUI(args);
+ 
+         UMLApp *uml = new UMLApp();
++        flushEvents();
+         KConfig * cfg = app.config();
+ 
+         KStartupLogo* startLogo = showStartupLogo(cfg, showGUI);
+@@ -196,3 +205,4 @@
+     // is sent and the app finishes without user interaction
+     kapp->postEvent(UMLApp::app(), new CmdLineExportAllViewsEvent(extension, directory, useFolders));
+ }
++
+--- umbrello/umbrello/operation.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/operation.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -1,8 +1,3 @@
+-/*
+- *  copyright (C) 2002-2005
+- *  Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>
+- */
+-
+ /***************************************************************************
+  *                                                                         *
+  *   This program is free software; you can redistribute it and/or modify  *
+@@ -10,6 +5,8 @@
+  *   the Free Software Foundation; either version 2 of the License, or     *
+  *   (at your option) any later version.                                   *
+  *                                                                         *
++ *   copyright (C) 2002-2006                                               *
++ *   Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>                 *
+  ***************************************************************************/
+ 
+ // own header
+@@ -25,6 +22,7 @@
+ #include "classifier.h"
+ #include "uml.h"
+ #include "umldoc.h"
++#include "uniqueid.h"
+ #include "dialogs/umloperationdialog.h"
+ 
+ UMLOperation::UMLOperation(const UMLClassifier *parent, QString Name, Uml::IDType id,
+@@ -51,8 +49,7 @@
+ UMLAttribute * UMLOperation::addParm(QString type, QString name, QString initialValue,
+                                      QString doc, Uml::Parameter_Direction kind) {
+     // make the new parameter (attribute) public, just to be safe
+-    UMLDoc *umldoc = UMLApp::app()->getDocument();
+-    UMLAttribute * a = new UMLAttribute(this, name, umldoc->getUniqueID(), Uml::Visibility::Public, type);
++    UMLAttribute * a = new UMLAttribute(this, name, UniqueID::gen(), Uml::Visibility::Public, type);
+     a -> setDoc(doc);
+     a -> setInitialValue(initialValue);
+     a -> setParmKind(kind);
+@@ -290,8 +287,7 @@
+     QDomElement featureElement = qDoc.createElement( "UML:BehavioralFeature.parameter" );
+     if (m_pSecondary) {
+         QDomElement retElement = qDoc.createElement("UML:Parameter");
+-        UMLDoc *pDoc = UMLApp::app()->getDocument();
+-        retElement.setAttribute( "xmi.id", ID2STR(pDoc->getUniqueID()) );
++        retElement.setAttribute( "xmi.id", ID2STR(UniqueID::gen()) );
+         retElement.setAttribute( "type", ID2STR(m_pSecondary->getID()) );
+         retElement.setAttribute( "kind", "return" );
+         featureElement.appendChild( retElement );
+@@ -424,8 +420,7 @@
+                     pAtt->setParmKind(Uml::pd_In);
+                 Uml::IDType id = pAtt->getID();
+                 if (ID2STR(id).contains( QRegExp("\\D") )) {
+-                    UMLDoc *pDoc = UMLApp::app()->getDocument();
+-                    (void) pDoc->getUniqueID();
++                    (void) UniqueID::gen();
+                     // This counts up UMLDoc::m_HighestIDForForeignFile.
+                 }
+                 m_List.append( pAtt );
+--- umbrello/umbrello/docgenerators/docbook2xhtml.xsl	(.../tags/KDE/3.5.4/kdesdk)	(revision 0)
++++ umbrello/umbrello/docgenerators/docbook2xhtml.xsl	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -0,0 +1,7 @@
++<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
++                version='1.0'>
++  <!--xsl:import href="docbook-xsl-1.70.1/xhtml/docbook.xsl"/-->
++  <xsl:import href="http://docbook.sourceforge.net/release/xsl/snapshot/html/docbook.xsl"/>
++  <xsl:param name="html.stylesheet">xmi.css</xsl:param>
++</xsl:stylesheet>
++
+--- umbrello/umbrello/docgenerators/xhtmlgenerator.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 0)
++++ umbrello/umbrello/docgenerators/xhtmlgenerator.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -0,0 +1,171 @@
++/***************************************************************************
++ *                        xhtmlgenerator.cpp  -  description             *
++ *                           -------------------                           *
++ *  copyright            : (C) 2006 by Gael de Chalendar (aka Kleag)       *
++ *    (C) 2006 Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>       *
++ ***************************************************************************
++ *                                                                         *
++ *   This program is free software; you can redistribute it and/or modify  *
++ *   it under the terms of the GNU General Public License as published by  *
++ *   the Free Software Foundation; either version 2 of the License, or     *
++ *   (at your option) any later version.                                   *
++ *                                                                         *
++ ***************************************************************************/
++
++#include "xhtmlgenerator.h"
++
++#include <libxml/xmlmemory.h>
++#include <libxml/debugXML.h>
++#include <libxml/HTMLtree.h>
++#include <libxml/xmlIO.h>
++#include <libxml/xinclude.h>
++#include <libxml/catalog.h>
++#include <libxslt/xslt.h>
++#include <libxslt/xsltInternals.h>
++#include <libxslt/transform.h>
++#include <libxslt/xsltutils.h>
++
++#include <kdebug.h>
++#include <klocale.h>
++#include <ktempfile.h>
++#include <kmessagebox.h>
++#include <kio/job.h>
++#include <kstandarddirs.h>
++#include <qfile.h>
++#include <qregexp.h>
++#include <qtextstream.h>
++
++#include "uml.h"
++#include "umldoc.h"
++#include "umlviewimageexportermodel.h"
++#include "docbookgenerator.h"
++
++extern int xmlLoadExtDtdDefaultValue;
++
++XhtmlGenerator::XhtmlGenerator()
++{
++}
++
++XhtmlGenerator::~XhtmlGenerator() {}
++
++
++bool XhtmlGenerator::generateXhtmlForProject()
++{
++  UMLApp *app = UMLApp::app();
++  UMLDoc* umlDoc = app->getDocument();
++  KURL url = umlDoc->URL();
++  QString fileName = url.fileName();
++  fileName.replace(QRegExp(".xmi$"),"");
++  url.setFileName(fileName);
++  kdDebug() << "Exporting to directory: " << url << endl;
++  return generateXhtmlForProjectInto(url);
++}
++
++bool XhtmlGenerator::generateXhtmlForProjectInto(const KURL& destDir)
++{
++  kdDebug() << "First convert to docbook" << endl;
++  m_destDir = destDir;
++//   KURL url(QString("file://")+m_tmpDir.name());
++  KIO::Job* docbookJob = DocbookGenerator().generateDocbookForProjectInto(destDir);
++  if (docbookJob == 0)
++  {
++    return false;
++  }
++  kdDebug() << "Connecting..." << endl;
++  connect(docbookJob, SIGNAL(result( KIO::Job * )), this, SLOT(slotDocbookToXhtml( KIO::Job *)));
++  return true; 
++}
++
++void XhtmlGenerator::slotDocbookToXhtml(KIO::Job * docbookJob)
++{
++  kdDebug() << "Now convert docbook to html..." << endl;
++  if ( docbookJob->error() )
++  {
++    docbookJob->showErrorDialog( 0L  );
++    return;
++  }
++  
++  UMLApp* app = UMLApp::app();
++  UMLDoc* umlDoc = app->getDocument();
++  
++  const KURL& url = umlDoc->URL();
++  QString docbookName = url.fileName();
++  docbookName.replace(QRegExp(".xmi$"),".docbook");
++//   KURL docbookUrl(QString("file://")+m_tmpDir.name());
++  KURL docbookUrl = m_destDir;
++  docbookUrl.addPath(docbookName);
++  
++  xsltStylesheetPtr cur = NULL;
++  xmlDocPtr doc, res;
++    
++  const char *params[16 + 1];
++  int nbparams = 0;
++  params[nbparams] = NULL;
++  
++  QString xsltFileName(KGlobal::dirs()->findResource("appdata","docbook2xhtml.xsl"));
++  kdDebug() << "XSLT file is'"<<xsltFileName<<"'" << endl;
++  QFile xsltFile(xsltFileName);
++  xsltFile.open(IO_ReadOnly);
++  QString xslt = xsltFile.readAll();
++  kdDebug() << "XSLT is'"<<xslt<<"'" << endl;
++  xsltFile.close();
++  
++  QString localXsl = KGlobal::dirs()->findResource("data","ksgmltools2/docbook/xsl/html/docbook.xsl");
++  kdDebug() << "Local xsl is'"<<localXsl<<"'" << endl;
++  if (!localXsl.isEmpty())
++  {
++    localXsl = QString("href=\"file://") + localXsl + "\"";
++    xslt.replace(QRegExp("href=\"http://[^\"]*\""),localXsl);
++  }
++  KTempFile tmpXsl;
++  *tmpXsl.textStream() << xslt;
++  tmpXsl.file()->close();
++  
++  
++  xmlSubstituteEntitiesDefault(1);
++  xmlLoadExtDtdDefaultValue = 1;
++  kdDebug() << "Parsing stylesheet " << tmpXsl.name() << endl;
++  cur = xsltParseStylesheetFile((const xmlChar *)tmpXsl.name().latin1());
++  kdDebug() << "Parsing file " << docbookUrl.path() << endl;
++  doc = xmlParseFile((const char*)(docbookUrl.path().utf8()));
++  kdDebug() << "Applying stylesheet " << endl;
++  res = xsltApplyStylesheet(cur, doc, params);
++  
++  KTempFile tmpXhtml;
++  tmpXhtml.setAutoDelete(false);
++  
++  kdDebug() << "Writing HTML result to temp file: " << tmpXhtml.file()->name() << endl;
++  xsltSaveResultToFile(tmpXhtml.fstream(), res, cur);
++  
++  xsltFreeStylesheet(cur);
++  xmlFreeDoc(res);
++  xmlFreeDoc(doc);
++
++  xsltCleanupGlobals();
++  xmlCleanupParser();
++  
++  QString xhtmlName = url.fileName();
++  xhtmlName.replace(QRegExp(".xmi$"),".html");
++  KURL xhtmlUrl = m_destDir;
++  xhtmlUrl.addPath(xhtmlName);
++  
++  kdDebug() << "Copying HTML result to: " << xhtmlUrl << endl;
++  KIO::Job* job = KIO::file_copy(tmpXhtml.file()->name(),xhtmlUrl,-1,true,false,false);
++  job->setAutoErrorHandlingEnabled(true);
++  connect (job, SIGNAL(result( KIO::Job* )), this, SLOT(slotHtmlCopyFinished( KIO::Job* )));
++
++  QString cssFileName(KGlobal::dirs()->findResource("appdata","xmi.css"));
++  kdDebug() << "CSS file is'"<<cssFileName<<"'" << endl;
++  KURL cssUrl = m_destDir;
++  cssUrl.addPath("xmi.css");
++  KIO::Job* cssJob = KIO::file_copy(cssFileName,cssUrl,-1,true,false,false);
++  cssJob->setAutoErrorHandlingEnabled(true);
++}
++    
++void XhtmlGenerator::slotHtmlCopyFinished( KIO::Job* )
++{
++  kdDebug() << "HTML copy finished: emiting finished" << endl;
++  emit(finished());
++}
++
++#include "xhtmlgenerator.moc"
+--- umbrello/umbrello/docgenerators/xmi.css	(.../tags/KDE/3.5.4/kdesdk)	(revision 0)
++++ umbrello/umbrello/docgenerators/xmi.css	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -0,0 +1,170 @@
++h1 {
++	font-family : Verdana, Arial, Helvetica;
++	font-size : 15pt;
++	font-weight : bold;
++	color : #333366;
++}
++
++.class-title {
++	background-color:#9999cc;
++	color : #ffffff;
++	font-family : Verdana, Helvetica;
++ 	font-size : 12pt;
++	font-weight : bold;
++}
++
++.class-name {
++	background-color:#ffffe0;
++	color : #6633cc;
++	font-family : Verdana, Helvetica;
++ 	font-size : 12pt;
++	font-weight : bold;
++}
++
++
++.interface-title {
++	background-color:#9999cc;
++	color : #ffffff;
++	font-family : Verdana, Helvetica;
++ 	font-size : 12pt;
++	font-weight : bold;
++}
++
++.interface-name {
++	background-color:#ffffe0;
++	color : #6633cc;
++	font-family : Verdana, Helvetica;
++ 	font-size : 12pt;
++	font-weight : bold;
++	font-style : italic;
++}
++
++.info-title { 
++	background-color:#f0f0f0;
++	color : #888888;
++	font-family : Verdana, Helvetica;
++ 	font-size : 11pt;
++	font-weight : bold;
++	text-align : left;
++}
++
++.info { 
++	background-color:#f0f0f0;
++	color : #000000;
++	font-family : Verdana, Helvetica;
++ 	font-size : 10pt;
++	text-align : left;
++}
++
++
++.class-feature { 
++	background-color:#f0f0f0;
++	color : #848484;
++	font-family : Verdana, Helvetica;
++ 	font-size : 12pt;
++	font-weight : bold;
++	text-align : left;
++}
++
++.feature-heading {
++	color : #000099;
++	background-color:#ffffe0;
++	font-family : Verdana, Helvetica;
++	font-weight : bold;
++	font-size : 10pt;
++}
++
++.feature-detail { 
++	color : #000000;
++	background-color:#ffffff;
++	font-family : Verdana, Helvetica;
++ 	font-size : 10pt;
++	text-align : left;
++}
++
++.comment {
++       color : #555555;
++       background-color:#ffffff;
++       font-family : Verdana, Helvetica;
++       font-size : 10pt;
++       text-align : left;
++       font-style : italic;
++}
++
++
++.datatype {
++	color : blue;
++}
++
++a.classifier:link {
++	color : blue;
++}
++
++a.classifier:visited {
++	color : blue;
++}
++
++a.interface:link {
++	color : blue;
++	font-style : italic;
++}
++
++a.interface:visited {
++	color : blue;
++	font-style : italic;
++}
++
++a.index-class:link {
++	font-family : Helvetica;
++	color : blue;
++	text-decoration : none;
++}
++
++a.index-class:visited {
++	font-family : Helvetica;
++	color : blue;
++	text-decoration : none;
++}
++
++a.index-interface:link {
++	color : blue;
++	font-style : italic;
++	text-decoration : none;
++}
++
++a.index-interface:visited {
++	color : blue;
++	font-style : italic;
++	text-decoration : none;
++}
++
++.index-title {
++	color : #000080;
++	font-family : Verdana, Helvetica;
++ 	font-size : 12pt;
++	font-weight : bold;
++}
++
++.parameter-heading {
++	color : #000099;
++	background-color: #f0f0f0;
++	font-family : Verdana, Helvetica;
++	font-weight : bold;
++	font-size : 10pt;
++}
++
++.property-name {
++        font-family : Verdana, Arial, Helvetica;
++        font-size : 8pt;
++        font-weight : bold;
++        color : Black;
++}
++
++.toc {
++color : #000099;
++background-color: #f0f0f0;
++font-family : Verdana, Helvetica;
++font-weight : normal;
++font-size : 10pt;
++}
++
+--- umbrello/umbrello/docgenerators/main.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 0)
++++ umbrello/umbrello/docgenerators/main.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -0,0 +1,94 @@
++/***************************************************************************
++ *                                                                         *
++ *   This program is free software; you can redistribute it and/or modify  *
++ *   it under the terms of the GNU General Public License as published by  *
++ *   the Free Software Foundation; either version 2 of the License, or     *
++ *   (at your option) any later version.                                   *
++ *                                                                         *
++ *   copyright (C) 2002-2006                                               *
++ *   Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>                 *
++ ***************************************************************************/
++
++#include <unistd.h>
++
++#include <libxml/xmlmemory.h>
++#include <libxml/debugXML.h>
++#include <libxml/HTMLtree.h>
++#include <libxml/xmlIO.h>
++#include <libxml/DOCBparser.h>
++#include <libxml/xinclude.h>
++#include <libxml/catalog.h>
++#include <libxslt/xslt.h>
++#include <libxslt/xsltInternals.h>
++#include <libxslt/transform.h>
++#include <libxslt/xsltutils.h>
++
++// kde includes
++#include <kaboutdata.h>
++#include <kapplication.h>
++#include <kcmdlineargs.h>
++#include <kconfig.h>
++#include <klocale.h>
++#include <ktip.h>
++#include <kdebug.h>
++#include <kwin.h>
++
++#include "version.h"
++
++extern int xmlLoadExtDtdDefaultValue;
++
++static const char description[] =
++    I18N_NOOP("Umbrello UML Modeller autonomous code generator");
++// INSERT A DESCRIPTION FOR YOUR APPLICATION HERE
++
++
++static KCmdLineOptions options[] =
++{
++  { "+[File]", I18N_NOOP("File to transform"), 0 },
++  { "xslt <url>", I18N_NOOP("The XSLT file to use"), 0},
++        // INSERT YOUR COMMANDLINE OPTIONS HERE
++  KCmdLineLastOption
++};
++
++int main(int argc, char *argv[])
++{
++  xsltStylesheetPtr cur = NULL;
++  xmlDocPtr doc, res;
++
++  const char *params[16 + 1];
++  int nbparams = 0;
++  params[nbparams] = NULL;
++
++  KAboutData aboutData( "umbodoc", I18N_NOOP("Umbrello UML Modeller autonomous code generator"),
++                        UMBRELLO_VERSION, description, KAboutData::License_GPL,
++                        I18N_NOOP("(c) 2006 Gael de Chalendar (aka Kleag), (c) 2002-2006 Umbrello UML Modeller Authors"), 0,
++                        "http://uml.sf.net/");
++  aboutData.addAuthor("Gael de Chalendar (aka Kleag)",0, "kleag at free.fr");
++  aboutData.addAuthor(I18N_NOOP("Umbrello UML Modeller Authors"), 0, "uml-devel at lists.sourceforge.net");
++  KCmdLineArgs::init( argc, argv, &aboutData );
++  KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
++
++  KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
++
++  QCStringList xsltOpt = args->getOptionList("xslt");
++  if (xsltOpt.size() > 0)
++  {
++    QString xsltFile(xsltOpt.last());
++
++    xmlSubstituteEntitiesDefault(1);
++    xmlLoadExtDtdDefaultValue = 1;
++    cur = xsltParseStylesheetFile((const xmlChar *)xsltFile.latin1());
++    doc = xmlParseFile(args->url( 0 ).url().latin1());
++    res = xsltApplyStylesheet(cur, doc, params);
++    xsltSaveResultToFile(stdout, res, cur);
++
++    xsltFreeStylesheet(cur);
++    xmlFreeDoc(res);
++    xmlFreeDoc(doc);
++
++    xsltCleanupGlobals();
++    xmlCleanupParser();
++  }
++  return(0);
++}
++
+--- umbrello/umbrello/docgenerators/xmi2docbook.xsl	(.../tags/KDE/3.5.4/kdesdk)	(revision 0)
++++ umbrello/umbrello/docgenerators/xmi2docbook.xsl	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -0,0 +1,992 @@
++<?xml version="1.0"?>
++<!DOCTYPE article PUBLIC "-//OASIS//DTD Simplified DocBook XML V4.1.2.5//EN"
++          "http://www.oasis-open.org/docbook/xml/simple/4.1.2.5/sdocbook.dtd" 
++          [ <!ENTITY % common SYSTEM "common.ent" > %common;] >
++
++<!--
++    Title: umbrello-xmi-to-html.xsl
++    Purpose: An XSL stylesheet for converting Umbrello 1.4 XMI to HTML.
++             Based on xmi-to-html.xsl from Objects by Design.
++
++    Copyright (C) 1999-2001, Objects by Design, Inc. All Rights Reserved.
++    Copyright (C) 2005, Oliver M. Kellogg <okellogg at users.sourceforge.net>
++    Copyright (C) 2006, Gaël de Chalendar (Kleag) <kleag at free.fr>
++
++    This program is free software; you can redistribute it and/or modify
++    it under the terms of the GNU General Public License as published by
++    the Free Software Foundation. A copy of the license may be found at
++    http://www.gnu.org/licenses/gpl.html
++
++    Version:  June, 16 2006
++
++    xmlns="http://www.w3.org/1999/xhtml"
++-->
++
++<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
++                version="1.0"
++                xmlns:UML="http://schema.omg.org/spec/UML/1.3"
++                exclude-result-prefixes="UML">
++                
++<xsl:output method="xml" indent="yes" 
++            doctype-system="http://www.oasis-open.org/docbook/xml/simple/4.1.2.5/sdocbook.dtd"
++            doctype-public="-//OASIS//DTD Simplified DocBook XML V4.1.2.5//EN" />
++
++<xsl:key
++    name="classifier"
++    match="//UML:Class"
++    use="@xmi.id"/>
++
++<xsl:key
++    name="generalization"
++    match="//UML:Generalization"
++    use="@xmi.id"/>
++
++<xsl:key
++    name="abstraction"
++    match="//UML:Abstraction"
++    use="@xmi.id"/>
++
++<xsl:key
++    name="multiplicity"
++    match="//UML:Multiplicity"
++    use="@xmi.id"/>
++
++
++<!-- Document Root -->
++<xsl:template match="/">
++    <article role="specification">
++    <xsl:apply-templates select="//UML:Model" mode="title"/>
++    
++    <!-- Actors -->
++    <section id="actors">
++      <title>Actors</title>
++      <xsl:apply-templates select="//UML:Actor"/>
++    </section>
++    
++    <!-- Use Cases -->
++    <section id="usecases">
++      <title>Use Cases</title>
++      <xsl:apply-templates select="//UML:UseCase"/>
++    </section>
++    
++    <!-- Interfaces -->
++    <section id="interfaces">
++      <title>Interfaces</title>
++      <xsl:apply-templates select="//UML:Interface"/>
++    </section>
++    
++      <!-- Classes -->
++      <section id="classes">
++        <title>Classes</title>
++        <xsl:apply-templates select="//UML:Class"/>
++      </section>
++      <!-- Diagrams -->
++      <section id="diagrams">
++        <title>Diagrams</title>
++        <xsl:apply-templates select="//diagrams/diagram"/>
++      </section>
++    </article>
++
++</xsl:template>
++
++
++<!-- Window Title -->
++<xsl:template match="UML:Model" mode="title">
++    <title>
++      <!-- Name of the model -->
++      <xsl:value-of select="@name"/>
++    </title>
++</xsl:template>
++
++
++<!-- Actor -->
++<xsl:template match="UML:Actor">
++  <xsl:variable name="element_name" select="@name"/>
++  <xsl:variable name="xmi_id" select="@xmi.id" />
++  <xsl:variable name="comment" select="@comment" />
++  
++  <section>
++    <title><xsl:value-of select="$element_name"/></title>
++    
++    <table frame='all'><title></title>
++      <tgroup cols='3' align='left' colsep='1' rowsep='1'>
++        <colspec colname='c1'/>
++        <colspec colname='c2'/>
++        <colspec colname='c3'/>
++        <thead>
++          <row>
++            <entry role="class-title" >Actor</entry>
++            <entry role="class-name" namest="c2" nameend="c3" ><xsl:value-of select="$element_name"/></entry>
++          </row>
++        </thead>
++        <tbody>
++          <xsl:if test="count($comment) > 0">
++            <row>
++              <entry role="comment" namest="c1" nameend="c3" ><para><xsl:value-of select="$comment"/></para></entry>
++            </row>
++          </xsl:if>  
++          
++          <xsl:call-template name="specifications"/>
++          
++          <xsl:call-template name="realizations"/>
++          
++          <xsl:call-template name="supertypes"/>
++          
++          <xsl:call-template name="subtypes"/>
++          
++          <xsl:call-template name="associations">
++            <xsl:with-param name="source" select="$xmi_id"/>
++          </xsl:call-template>
++          
++        </tbody>
++      </tgroup>
++    </table>
++    
++  </section>
++</xsl:template>
++
++<!-- Use Case -->
++<xsl:template match="UML:UseCase">
++  <xsl:variable name="element_name" select="@name"/>
++  <xsl:variable name="xmi_id" select="@xmi.id" />
++  <xsl:variable name="comment" select="@comment" />
++  
++  <section>
++    <title><xsl:value-of select="$element_name"/></title>
++    
++    <table frame='all'><title></title>
++      <tgroup cols='3' align='left' colsep='1' rowsep='1'>
++        <colspec colname='c1'/>
++        <colspec colname='c2'/>
++        <colspec colname='c3'/>
++        <thead>
++          <row>
++            <entry role="class-title" >Use Case</entry>
++            <entry role="class-name" namest="c2" nameend="c3" ><xsl:value-of select="$element_name"/></entry>
++          </row>
++        </thead>
++        <tbody>
++          <xsl:if test="count($comment) > 0">
++            <row>
++              <entry role="comment" namest="c1" nameend="c3" ><para><xsl:value-of select="$comment"/></para></entry>
++            </row>
++          </xsl:if>  
++          
++          <xsl:call-template name="specifications"/>
++          
++          <xsl:call-template name="realizations"/>
++          
++          <xsl:call-template name="supertypes"/>
++          
++          <xsl:call-template name="subtypes"/>
++          
++          <xsl:call-template name="associations">
++            <xsl:with-param name="source" select="$xmi_id"/>
++          </xsl:call-template>
++          
++        </tbody>
++      </tgroup>
++    </table>
++    
++  </section>
++</xsl:template>
++
++
++<!-- Interface -->
++<xsl:template match="UML:Interface">
++  <xsl:variable name="element_name" select="@name"/>
++  <xsl:variable name="comment" select="@comment" />
++  <xsl:variable name="realizations" 
++                select="Foundation.Core.ModelElement.supplierDependency/
++                Foundation.Core.Abstraction"/>
++  <xsl:variable name="generalizations" 
++                select="UML:Generalization"/>
++  <xsl:variable name="specializations" 
++                select="Foundation.Core.GeneralizableElement.specialization/
++                Foundation.Core.Generalization"/>
++  <xsl:variable name="class_operations" 
++                select="UML:Classifier.feature/UML:Operation" />
++  <section>
++    <title><xsl:value-of select="$element_name"/></title>
++    <table frame='all'><title></title>
++      <tgroup cols='3' align='left' colsep='1' rowsep='1'>
++        <colspec colname='c1'/>
++        <colspec colname='c2'/>
++        <colspec colname='c3'/>
++        <thead>
++          <row>
++            <entry role="class-title" >Interface</entry>
++            <entry role="class-name" namest="c2" nameend="c3" ><xsl:value-of select="$element_name"/></entry>
++          </row>
++        </thead>
++        <tbody>
++          <xsl:if test="count($comment) > 0">
++            <row>
++              <entry role="comment" namest="c1" nameend="c3" ><para><xsl:value-of select="$comment"/></para></entry>
++            </row>
++          </xsl:if>  
++          <xsl:if test="count($class_operations) = 0">
++            <row>
++              <entry namest="c1" nameend="c3" ><para/></entry>
++            </row>
++          </xsl:if>
++          
++          <xsl:if test="count($realizations) = 0 
++                  and count($generalizations) = 0
++                  and count($specializations) = 0
++                  and count($class_operations) = 0">
++          </xsl:if>
++          <xsl:call-template name="realizations"/>
++          <xsl:call-template name="supertypes"/>
++          <xsl:call-template name="subtypes"/>
++          <xsl:call-template name="operations"/>
++        </tbody>
++      </tgroup>
++    </table>
++  
++  </section>
++</xsl:template>
++
++
++<!-- Class -->
++<xsl:template match="UML:Class">
++  <xsl:variable name="element_name" select="@name"/>
++  <xsl:variable name="xmi_id" select="@xmi.id" />
++  <xsl:variable name="comment" select="@comment" />
++  <xsl:variable name="class_attributes" 
++                select="UML:Classifier.feature/UML:Attribute" />
++  <xsl:variable name="class_operations" 
++                select="UML:Classifier.feature/UML:Operation" />
++  
++  <section>
++    <title><xsl:value-of select="$element_name"/></title>
++    
++  <table frame='all'><title></title>
++    <tgroup cols='3' align='left' colsep='1' rowsep='1'>
++      <colspec colname='c1'/>
++      <colspec colname='c2'/>
++      <colspec colname='c3'/>
++      <thead>
++        <row>
++          <entry role="class-title" >Class</entry>
++          <entry role="class-name" namest="c2" nameend="c3" ><xsl:value-of select="$element_name"/></entry>
++        </row>
++      </thead>
++      <tbody>
++        <xsl:if test="count($comment) > 0">
++          <row>
++            <entry role="comment" namest="c1" nameend="c3" ><para><xsl:value-of select="$comment"/></para></entry>
++          </row>
++        </xsl:if>  
++        <xsl:if test="count($class_attributes) = 0 
++                and count($class_operations) = 0">
++          <row>
++            <entry namest="c1" nameend="c3" ><para/></entry>
++          </row>
++        </xsl:if>
++        
++        <xsl:call-template name="specifications"/>
++        
++        <xsl:call-template name="realizations"/>
++        
++        <xsl:call-template name="supertypes"/>
++        
++        <xsl:call-template name="subtypes"/>
++        
++        <xsl:call-template name="associations">
++          <xsl:with-param name="source" select="$xmi_id"/>
++        </xsl:call-template>
++        
++        <xsl:call-template name="attributes"/>
++        
++        <xsl:call-template name="operations"/>
++      </tbody>
++    </tgroup>
++  </table>
++    
++  </section>
++</xsl:template>
++
++
++<xsl:template match="diagrams/diagram">
++  <xsl:variable name="xmi_id" select="@xmi.id" />
++  <xsl:comment >diagrambegin<xsl:value-of select="position()"/>namebegin<xsl:value-of select="@name"/>nameend</xsl:comment>   
++  <xsl:comment >diagram<xsl:value-of select="position()"/>documentationbegin<xsl:value-of select="@documentation"/>documentationend</xsl:comment>   
++  
++  <section>
++    <title><xsl:value-of select="@name"/></title>
++    <para>
++      <xsl:value-of select="@documentation"/>
++    </para>
++    <mediaobject>
++      <imageobject>
++        <imagedata format="PNG">
++          <xsl:attribute name="fileref"><xsl:value-of select="@name"/>
++            <xsl:text>.png</xsl:text>
++          </xsl:attribute>
++        </imagedata>
++      </imageobject>
++    </mediaobject>
++  </section>
++  <xsl:if test="widgets/actorwidget">
++    <section>
++      <title>&actor;</title>
++      <xsl:for-each select="widgets/actorwidget">
++        <xsl:call-template name="actor"/>
++      </xsl:for-each>
++    </section>
++  </xsl:if>
++  
++  <xsl:if test="widgets/usecasewidget">
++    <section>
++      <title>&usecase;</title>
++      <xsl:for-each select="widgets/usecasewidget">
++        <xsl:call-template name="usecase"/>
++      </xsl:for-each>
++    </section>
++  </xsl:if>
++  
++  <xsl:if test="widgets/classwidget">
++    <section>
++      <title>&classes;</title>
++      <para/>
++      <!--xsl:for-each select="widgets/classwidget">
++        <xsl:call-template name="class"/>
++      </xsl:for-each-->
++    </section>
++  </xsl:if>
++  
++  <xsl:comment >diagramend<xsl:value-of select="position()"/></xsl:comment>
++</xsl:template>
++
++
++<!-- The following template is designed to be called for Abstractions with the "realize"
++     stereotype, i.e. Realization relationships.  It formats the name of the supplier of the
++     Abstraction dependency, i.e. the class or interface specifying the behaviour of the
++     client in the dependency.
++-->
++<!-- Specifications (interface or class) -->
++<xsl:template name="specifications">
++
++  <!-- Abstractions identify specifications -->
++  <xsl:variable name="specifications" 
++        select="Foundation.Core.ModelElement.clientDependency/
++                Foundation.Core.Abstraction"/>
++
++  <xsl:if test="count($specifications) > 0">
++    <section>
++    <title>Specifications:</title>
++      <xsl:for-each select="$specifications">
++        <!-- get the supplier in the abstraction -->
++        <xsl:variable name="abstraction"
++              select="key('abstraction', ./@xmi.idref)" />
++        <xsl:variable name="target"
++              select="$abstraction/
++                    Foundation.Core.Dependency.supplier/
++                    */@xmi.idref" /> 
++        <xsl:call-template name="classify">
++            <xsl:with-param name="target" select="$target"/>
++        </xsl:call-template>
++        
++        <xsl:if test="position() != last()">
++            <xsl:text>,  </xsl:text>
++        </xsl:if>
++      </xsl:for-each>
++    </section>
++  </xsl:if>  
++        
++</xsl:template>
++
++
++<!-- The following template is designed to be called for Abstractions with the "realize"
++     stereotype, i.e. Realization relationships.  It formats the name of the client of the
++     Abstraction dependency, i.e. the class realizing the specification defined by the
++     supplier in the dependency.
++-->
++<!-- Realizations (of interface) -->
++<xsl:template name="realizations">
++
++  <!-- Abstractions identify realizations -->
++  <xsl:variable name="realizations" 
++        select="Foundation.Core.ModelElement.supplierDependency/
++                Foundation.Core.Abstraction"/>
++
++  <xsl:if test="count($realizations) > 0">
++    <section>
++      <title>Realizations:</title>
++      <xsl:for-each select="$realizations">
++      
++        <!-- get the client in the abstraction -->
++        <xsl:variable name="abstraction"
++              select="key('abstraction', ./@xmi.idref)" />
++        <xsl:variable name="target"
++              select="$abstraction/
++                    Foundation.Core.Dependency.client/
++                    */@xmi.idref" /> 
++        <xsl:call-template name="classify">
++            <xsl:with-param name="target" select="$target"/>
++        </xsl:call-template>
++        
++        <xsl:if test="position() != last()">
++            <xsl:text>,  </xsl:text>
++        </xsl:if>
++      </xsl:for-each>
++    </section>
++  </xsl:if>  
++        
++</xsl:template>
++
++
++
++<!-- Supertypes (inheritance) -->
++<xsl:template name="supertypes">
++    
++  <!-- Generalizations identify supertypes -->
++  <xsl:variable name="generalizations" 
++        select="UML:Generalization"/>
++
++  <xsl:if test="count($generalizations) > 0">
++    <section>
++      <title>Supertypes:</title>
++      <xsl:for-each select="$generalizations">
++      
++        <!-- get the parent in the generalization -->
++        <xsl:variable name="generalization"
++              select="key('generalization', ./@xmi.idref)" />
++        <xsl:variable name="target"
++              select="$generalization/
++                    Foundation.Core.Generalization.parent/
++                    */@xmi.idref" /> 
++        <xsl:call-template name="classify">
++            <xsl:with-param name="target" select="$target"/>
++        </xsl:call-template>
++        
++        <xsl:if test="position() != last()">
++          <xsl:text>,  </xsl:text>
++        </xsl:if>
++      </xsl:for-each>
++    </section>
++  </xsl:if>  
++</xsl:template>
++
++
++<!-- Subtypes (inheritance) -->
++<xsl:template name="subtypes">
++    
++  <!-- Specializations identify subtypes -->
++  <xsl:variable name="specializations" 
++        select="Foundation.Core.GeneralizableElement.specialization/
++                Foundation.Core.Generalization"/>
++
++  <xsl:if test="count($specializations) > 0">
++    <section>
++      <title>Subtypes:</title>
++      <xsl:for-each select="$specializations">
++    
++        <!-- get the child in the generalization -->
++        <xsl:variable name="generalization"
++              select="key('generalization', ./@xmi.idref)" />
++        <xsl:variable name="target"
++              select="$generalization/
++                    Foundation.Core.Generalization.child/
++                    */@xmi.idref" /> 
++        <xsl:call-template name="classify">
++            <xsl:with-param name="target" select="$target"/>
++        </xsl:call-template>
++        
++        <xsl:if test="position() != last()">
++            <xsl:text>,  </xsl:text>
++        </xsl:if>
++      </xsl:for-each>
++    </section>
++  </xsl:if>  
++</xsl:template>
++
++
++<!-- Associations -->
++<xsl:template name="associations">
++  <xsl:param name="source"/>
++  
++  <xsl:variable name="association_ends" 
++        select="//UML:AssociationEnd[@type=$source]" />
++
++  <xsl:if test="count($association_ends) > 0">
++    <section>
++      <title>Associations</title>
++          <para>visibility, type, properties.</para>
++
++      <xsl:for-each select="$association_ends">
++        <xsl:for-each select="preceding-sibling::UML:AssociationEnd |
++                              following-sibling::UML:AssociationEnd">
++
++          <xsl:call-template name="association_end" />
++        
++        </xsl:for-each>
++      </xsl:for-each>
++    </section>
++  </xsl:if>
++</xsl:template>
++
++
++<!-- Association End -->
++<xsl:template name="association_end">
++  <!-- Visibility -->
++  <para>
++  <!--role="feature-detail"-->
++      <xsl:variable name="visibility"
++            select="@visibility" />
++      <xsl:choose>
++          <xsl:when test="string-length($visibility) > 0">
++              <xsl:value-of select="$visibility"/>
++          </xsl:when>
++          <xsl:otherwise>
++              <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
++          </xsl:otherwise>
++      </xsl:choose>        
++  </para>
++  
++  <!-- Type -->
++  <para>
++  <!--role="feature-detail"-->
++      <xsl:variable name="target"
++            select="Foundation.Core.AssociationEnd.type/*/@xmi.idref" />
++
++      <xsl:call-template name="classify">
++          <xsl:with-param name="target" select="$target"/>
++      </xsl:call-template>
++  </para>
++  
++  <!-- Properties -->
++  <para>
++  <!--role="feature-detail"-->
++    <!-- Rolename -->
++    <xsl:variable name="rolename" select="@name"/>
++
++      <!--role="property-name"-->
++      Rolename: 
++    <xsl:choose>
++        <xsl:when test="string-length($rolename) > 0">
++            <xsl:value-of select="$rolename"/>
++        </xsl:when>
++        <xsl:otherwise>(none)</xsl:otherwise>
++    </xsl:choose>
++  </para>
++    
++    <!-- Multiplicity -->
++    <xsl:apply-templates select=".//Foundation.Data_Types.Multiplicity" />
++
++    <!-- Navigable -->
++    <xsl:variable name="navigable" 
++          select="Foundation.Core.AssociationEnd.isNavigable/@xmi.value"/>
++    <xsl:if test="string-length($navigable) > 0">
++        
++      <para> 
++        <!--role="property-name"-->
++        Navigable: <xsl:value-of select="$navigable"/>
++      </para>
++    </xsl:if>
++    
++    <!-- Ordering -->
++    <xsl:variable name="ordering" 
++          select="Foundation.Core.AssociationEnd.ordering/@xmi.value"/>
++    <xsl:if test="string-length($ordering) > 0">
++      <para>
++        <!--role="property-name"-->
++        Ordering: <xsl:value-of select="$ordering"/>
++      </para>
++    </xsl:if>
++</xsl:template>
++
++
++<!-- Multiplicity (definition) -->
++<xsl:template match="Foundation.Data_Types.Multiplicity[@xmi.id]">
++    
++  <para>
++    <!--role="property-name"-->
++    Multiplicity: 
++    
++    <xsl:variable name="lower" 
++         select=".//Foundation.Data_Types.MultiplicityRange.lower"/>
++	 
++    <xsl:variable name="upper" 
++         select=".//Foundation.Data_Types.MultiplicityRange.upper"/>
++
++    <xsl:value-of select="$lower" />
++    <xsl:if test="$upper != $lower">
++        <xsl:text>..</xsl:text>
++        <xsl:value-of select="$upper" />
++    </xsl:if>
++  </para>
++    
++</xsl:template>
++
++<!-- Multiplicity (reference) -->
++<xsl:template match="Foundation.Data_Types.Multiplicity[@xmi.idref]">
++    <xsl:apply-templates select="key('multiplicity', @xmi.idref)" />
++</xsl:template>
++
++
++
++<!-- Attributes -->
++<xsl:template name="attributes">
++  <xsl:variable name="class_attributes" 
++                select="UML:Classifier.feature/UML:Attribute" />
++  <xsl:if test="count($class_attributes) > 0">
++    <row>
++      <entry role="info-title"  namest="c1" nameend="c3" >Attributes:</entry>
++    </row>
++    <row>
++      <entry role="feature-heading">visibility</entry>
++      <entry role="feature-heading">type</entry>
++      <entry role="feature-heading">name</entry>
++    </row>
++    <xsl:apply-templates select="UML:Classifier.feature/
++                         UML:Attribute" />
++  </xsl:if>
++</xsl:template>
++
++
++<xsl:template match="UML:Attribute">
++  <xsl:variable name="target"
++        select='@type'/>
++
++
++  <row>
++      <entry role="feature-detail">
++      <xsl:value-of select="@visibility"/>
++      </entry>
++
++      <entry role="feature-detail">
++      <xsl:call-template name="classify">
++          <xsl:with-param name="target" select="$target" />
++      </xsl:call-template>
++      </entry>
++
++      <entry role="feature-detail">
++      <xsl:value-of select="@name"/>
++      </entry>
++  </row>
++</xsl:template>
++
++
++
++<!-- Operations -->
++<xsl:template name="operations">
++  <xsl:variable name="class_operations" 
++                select="UML:Classifier.feature/UML:Operation" />
++  <xsl:if test="count($class_operations) > 0">
++    <row>
++      <entry role="info-title" namest="c1" nameend="c3" ><para>Operations:</para></entry>
++    </row>
++    <row>
++      <entry role="feature-heading" ><para>visibility</para></entry>
++      <entry role="feature-heading" ><para>return</para></entry>
++      <entry role="feature-heading" ><para>name</para></entry>
++    </row>
++
++    <xsl:apply-templates select="UML:Classifier.feature/
++                                 UML:Operation" />
++  </xsl:if>
++</xsl:template>
++
++
++<xsl:template match="UML:Operation">
++
++    <xsl:variable name="parameters"
++         select="UML:BehavioralFeature.parameter/
++         UML:Parameter[@kind!='return']" />
++	 
++    <xsl:variable name="return"
++         select="UML:BehavioralFeature.parameter/
++         UML:Parameter[@kind='return']" />
++		  
++    <xsl:variable name="target"
++         select="$return/@type" />
++
++    <row>
++        <entry role="feature-detail">
++            <xsl:value-of select="@visibility" />
++        </entry>
++
++        <entry role="feature-detail">
++
++        <xsl:choose>
++            <xsl:when test="string-length($target) = 0">
++                <para role="datatype"><xsl:text>void</xsl:text></para>
++            </xsl:when>
++
++            <xsl:otherwise>
++                <xsl:call-template name="classify">
++                    <xsl:with-param name="target" select="$target" />
++                </xsl:call-template>
++            </xsl:otherwise>
++        </xsl:choose>
++
++        </entry>
++
++        <entry role="feature-detail">
++            <xsl:value-of select="@name"/>
++        </entry>
++
++
++    </row>
++
++    <row>
++        <entry role="comment"/>
++        <entry namest="c2" nameend="c3" role="comment"><xsl:value-of select="@comment"/></entry>
++    </row>
++
++    <xsl:variable name="parameter-count" select="count($parameters)" />
++
++    <xsl:if test="not(normalize-space($parameter-count)='0')">
++
++    <row>
++        <entry role="feature-detail" >
++            <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
++        </entry>
++        
++        <entry role="parameter-heading" valign="top">parameters:</entry>
++        <entry bgcolor="#ffffff" align="right">
++            <!--table width="85%" align="right" cellpadding="0" cellspacing="0" border="0">
++                <xsl:apply-templates select="$parameters" />
++            </table-->
++        </entry>
++    </row>
++
++    </xsl:if >
++
++</xsl:template>
++
++
++
++<!-- Parameter -->
++<xsl:template match="UML:Parameter">
++    <xsl:variable name="target" 
++         select="@type" />
++
++    <row>
++        <entry role="feature-detail" width="45%">
++            <xsl:call-template name="classify">
++                <xsl:with-param name="target" select="$target" />
++            </xsl:call-template>
++        </entry>
++
++        <entry role="feature-detail" width="55%">
++            <xsl:value-of select="@name"/>
++        </entry>
++    </row>
++</xsl:template>
++
++
++<!-- Classification -->
++<xsl:template name="classify">
++    <xsl:param name="target"/>
++
++    <xsl:variable name="classifier"
++         select="key('classifier', $target)" />
++                  
++    <xsl:variable name="classifier_name"
++         select="$classifier/@name" />
++
++    <xsl:variable name="type" select="name($classifier)" />
++
++    <!-- Get the type of the classifier (class, interface, datatype) -->
++    <xsl:variable name="classifier_type">
++    <xsl:choose>
++        <xsl:when test="$type='UML:Class'">classifier</xsl:when>
++        <xsl:when test="$type='UML:Interface'">interface</xsl:when>
++        <xsl:when test="$type='UML:DataType'">datatype</xsl:when>
++        <xsl:otherwise>classifier</xsl:otherwise>
++    </xsl:choose>
++    </xsl:variable>
++    
++    <xsl:choose>
++        <!-- Datatypes don't have hyperlinks -->
++        <xsl:when test="$type='UML:DataType'">
++            <span role="datatype">
++                <xsl:value-of select="$classifier_name"/>
++            </span>
++        </xsl:when>
++        
++        <!-- Classes and Interfaces have hyperlinks -->
++        <!-- The classifier type is used to style appropriately -->
++        <xsl:otherwise>
++            <xsl:if test="string-length($classifier) > 0">
++                <!--a role={$classifier_type}" href="#{$classifier_name}"-->
++                <xsl:value-of select="$classifier_name"/>
++                <!--/a-->
++            </xsl:if>
++        </xsl:otherwise>
++    </xsl:choose>
++
++</xsl:template>
++
++<!--xsl:template match="XMI.content"> 
++  
++  <xsl:comment >maintitlebegin1&title1;maintitleend1</xsl:comment>   
++  <xsl:comment >maintitlebegin2&title2;maintitleend2</xsl:comment>   
++  <xsl:apply-templates select="diagrams/diagram"/>    
++</xsl:template--> 
++
++
++  <xsl:template name="actor"> 
++    <xsl:param name = "idvalue"><xsl:value-of select="@xmi.id"/></xsl:param>
++    <!--td valign="top"--> 
++      <para>
++        <!--role="push"-->
++      <xsl:for-each select="//XMI.content/umlobjects/UML:Actor">
++        <xsl:if test="@xmi.id = $idvalue">
++          <emphasis><xsl:value-of select="@name"/>:</emphasis>
++          <xsl:value-of select="@documentation"/>
++        </xsl:if>
++      </xsl:for-each > 
++      </para>
++    <!--/td-->
++  </xsl:template>
++  
++  <xsl:template name="usecase"> 
++    <xsl:param name = "idvalue"><xsl:value-of select="@xmi.id"/></xsl:param>
++    <!--td valign="top"--> 
++      <para>
++        <!--role="push"-->
++        <xsl:for-each select="//XMI.content/umlobjects/UML:UseCase"> 
++          <xsl:if test="@xmi.id = $idvalue">
++            <emphasis><xsl:value-of select="@name"/>:</emphasis>
++            <xsl:value-of select="@documentation"/>
++            
++          </xsl:if>
++        </xsl:for-each > 
++      </para>
++    <!--/td-->
++  </xsl:template>
++  
++  <xsl:template name="class"> 
++    <xsl:param name = "idvalue"><xsl:value-of select="@xmi.id"/></xsl:param>
++    <!--td valign="top"--> 
++      <div role="push">
++        <xsl:for-each select="//XMI.content/umlobjects/UML:Class">
++          <xsl:if test="@xmi.id = $idvalue">
++            <div role="boldtext">&packagename;<xsl:value-of select="@package"/></div>
++            <div role="boldtext">&classname;<xsl:value-of select="@name"/></div>
++            <xsl:value-of select="@documentation"/>
++            <div role="push">
++        
++              Stereotype: <xsl:value-of select="@stereotype"/>
++              
++              Abstarct: 
++              <xsl:if test="@abstract='1'">
++              <xsl:text>&yes;</xsl:text>
++              </xsl:if>
++              <xsl:if test="@abstract='0'">
++              <xsl:text>&no;</xsl:text>
++              </xsl:if>
++              
++              Visibility: 
++              <xsl:if test="@scope='200'">
++              <xsl:text>public</xsl:text>
++              </xsl:if>
++              <xsl:if test="@scope='201'">
++              <xsl:text>private</xsl:text>
++              </xsl:if>
++              <xsl:if test="@scope='202'">
++              <xsl:text>protected</xsl:text>
++              </xsl:if>
++              
++              <xsl:call-template name="attribute"/> 
++              <xsl:call-template name="operation"/> 
++            </div>
++          </xsl:if>
++        </xsl:for-each > 
++      </div>
++    <!--/td-->
++  </xsl:template>
++  
++
++  <xsl:template name="attribute"> 
++    <!--td valign="top"--> 
++      <div role="boldtext">&attributes;</div>
++      
++      <xsl:for-each select="UML:Attribute">
++        <xsl:value-of select="@name"/><xsl:text> - </xsl:text><xsl:value-of select="@type"/>
++        Static: 
++        <xsl:if test="@static='1'">
++          <xsl:text>&yes;</xsl:text>
++        </xsl:if>
++        <xsl:if test="@static='0'">
++          <xsl:text>&no;</xsl:text>
++        </xsl:if>
++        
++        Visibility: 
++        <xsl:if test="@scope='200'">
++          <xsl:text>public</xsl:text>
++        </xsl:if>
++        <xsl:if test="@scope='201'">
++          <xsl:text>private</xsl:text>
++        </xsl:if>
++        <xsl:if test="@scope='202'">
++          <xsl:text>protected</xsl:text>
++        </xsl:if>
++        
++        Default �t�: <xsl:value-of select="@value"/>
++        
++        <xsl:value-of select="@documentation"/>
++        
++      </xsl:for-each > 
++    <!--/td-->
++  </xsl:template>
++  
++  <xsl:template name="operation"> 
++    <entry valign="top"> 
++      <div role="boldtext">&metodes;</div>
++      
++      <xsl:for-each select="UML:Operation">
++        <i>
++          <xsl:if test="@abstract='1'">
++            <xsl:text>abstract </xsl:text>
++          </xsl:if>   
++          <xsl:if test="@scope='200'">
++            <xsl:text>public </xsl:text>
++          </xsl:if>
++          <xsl:if test="@scope='201'">
++            <xsl:text>private </xsl:text>
++          </xsl:if>
++          <xsl:if test="@scope='202'">
++            <xsl:text>protected </xsl:text>
++          </xsl:if>
++          
++          <xsl:value-of select="@type"/><xsl:text> </xsl:text>
++          
++          <xsl:value-of select="@name"/><xsl:text>(</xsl:text>
++          
++          <xsl:apply-templates select="UML:Parameter" mode="diagram"/>
++          <xsl:text>)</xsl:text>
++          
++        </i>
++        <xsl:value-of select="@documentation"/>  
++        &parameters;
++        <xsl:for-each select="UML:Parameter"> 
++        <div role="push">
++          <xsl:value-of select="@type"/>
++          <xsl:text> </xsl:text>
++          <xsl:value-of select="@name"/>
++          
++          <xsl:value-of select="@documentation"/>
++          
++        </div>
++        </xsl:for-each> 
++        
++      </xsl:for-each > 
++    </entry>
++  </xsl:template>
++  
++  <xsl:template match="UML:Parameter" mode="diagram"> 
++    
++    <xsl:value-of select="@type"/>
++    <xsl:text> </xsl:text>
++    <xsl:value-of select="@name"/>
++    <xsl:if test="position()!=last()">
++      <xsl:text>, </xsl:text>
++    </xsl:if>
++    
++  </xsl:template>  
++</xsl:stylesheet>
+--- umbrello/umbrello/docgenerators/docbookgenerator.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 0)
++++ umbrello/umbrello/docgenerators/docbookgenerator.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -0,0 +1,137 @@
++/***************************************************************************
++ *                        docbookgenerator.cpp  -  description             *
++ *                           -------------------                           *
++ *  copyright            : (C) 2006 by Gael de Chalendar (aka Kleag)       *
++ *    (C) 2006 Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>       *
++ ***************************************************************************
++ *                                                                         *
++ *   This program is free software; you can redistribute it and/or modify  *
++ *   it under the terms of the GNU General Public License as published by  *
++ *   the Free Software Foundation; either version 2 of the License, or     *
++ *   (at your option) any later version.                                   *
++ *                                                                         *
++ ***************************************************************************/
++
++#include "docbookgenerator.h"
++
++#include <libxml/xmlmemory.h>
++#include <libxml/debugXML.h>
++#include <libxml/HTMLtree.h>
++#include <libxml/xmlIO.h>
++#include <libxml/xinclude.h>
++#include <libxml/catalog.h>
++#include <libxslt/xslt.h>
++#include <libxslt/xsltInternals.h>
++#include <libxslt/transform.h>
++#include <libxslt/xsltutils.h>
++
++#include <kdebug.h>
++#include <klocale.h>
++#include <ktempfile.h>
++#include <kmessagebox.h>
++#include <kio/job.h>
++#include <kstandarddirs.h>
++#include <qfile.h>
++#include <qregexp.h>
++#include <qtextstream.h>
++
++#include "uml.h"
++#include "umldoc.h"
++#include "umlviewimageexportermodel.h"
++
++extern int xmlLoadExtDtdDefaultValue;
++
++DocbookGenerator::DocbookGenerator()
++{
++}
++
++DocbookGenerator::~DocbookGenerator() {}
++
++
++bool DocbookGenerator::generateDocbookForProject()
++{
++  UMLApp *app = UMLApp::app();
++  UMLDoc* umlDoc = app->getDocument();
++  KURL url = umlDoc->URL();
++  QString fileName = url.fileName();
++  fileName.replace(QRegExp(".xmi$"),"");
++  url.setFileName(fileName);
++  kdDebug() << "Exporting to directory: " << url << endl;
++  generateDocbookForProjectInto(url);
++  return true;
++}
++
++KIO::Job* DocbookGenerator::generateDocbookForProjectInto(const KURL& destDir)
++{
++  UMLApp* app = UMLApp::app();
++  UMLDoc* umlDoc = app->getDocument();
++
++  // export all views
++  umlDoc->writeToStatusBar(i18n("Exporting all views..."));
++  QStringList errors = UMLViewImageExporterModel().exportAllViews(
++      UMLViewImageExporterModel::mimeTypeToImageType("image/png"),
++      destDir, false);
++  if (!errors.empty()) 
++  {
++    KMessageBox::errorList(app, i18n("Some errors happened when exporting the images:"), errors);
++    return 0;
++  }
++  
++  //write the XMI model in an in-memory char* string
++  QString xmi;
++  QTextOStream xmiStream(&xmi);
++  
++  KTempFile tmpfile; // we need this tmp file if we are writing to a remote file
++
++  QFile file;
++  file.setName( tmpfile.name() );
++
++  // lets open the file for writing
++  if( !file.open( IO_WriteOnly ) ) {
++    KMessageBox::error(0, i18n("There was a problem saving file: %1").arg(tmpfile.name()), i18n("Save Error"));
++    return false;
++  }
++  umlDoc->saveToXMI( file, false ); // save the xmi stuff to it
++  file.close();
++  tmpfile.close();
++  
++  xsltStylesheetPtr cur = NULL;
++  xmlDocPtr doc, res;
++    
++  const char *params[16 + 1];
++  int nbparams = 0;
++  params[nbparams] = NULL;
++  
++  QString xsltFile(KGlobal::dirs()->findResource("appdata","xmi2docbook.xsl"));
++
++  xmlSubstituteEntitiesDefault(1);
++  xmlLoadExtDtdDefaultValue = 1;
++  cur = xsltParseStylesheetFile((const xmlChar *)xsltFile.latin1());
++  doc = xmlParseFile((const char*)(tmpfile.name().utf8()));
++  res = xsltApplyStylesheet(cur, doc, params);
++  
++  KTempFile tmpDocBook;
++  tmpDocBook.setAutoDelete(false);
++  
++  xsltSaveResultToFile(tmpDocBook.fstream(), res, cur);
++  xsltFreeStylesheet(cur);
++  xmlFreeDoc(res);
++  xmlFreeDoc(doc);
++
++  xsltCleanupGlobals();
++  xmlCleanupParser();
++  
++  KURL url = umlDoc->URL();
++  QString fileName = url.fileName();
++  fileName.replace(QRegExp(".xmi$"),".docbook");
++  url.setPath(destDir.path());
++  url.addPath(fileName);
++  kdDebug() << "Copying result to: " << url << endl;
++  KIO::Job* job = KIO::file_copy(tmpDocBook.file()->name(),url,-1,true,false,false);
++  job->setAutoErrorHandlingEnabled(true);
++
++  return job;
++}
++    
++
++#include "docbookgenerator.moc"
+--- umbrello/umbrello/docgenerators/Makefile.am	(.../tags/KDE/3.5.4/kdesdk)	(revision 0)
++++ umbrello/umbrello/docgenerators/Makefile.am	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -0,0 +1,21 @@
++INCLUDES = -I$(srcdir)/.. -I$(top_srcdir)/umbrello/docgenerators -I../../../umbrello/umbrello $(LIBXML_CFLAGS) $(all_includes)
++METASOURCES = AUTO
++bin_PROGRAMS = umbodoc
++
++AM_LDFLAGS = $(all_libraries)
++umbodoc_COMPILE_FIRST = version.h
++umbodoc_SOURCES = main.cpp
++umbodoc_LDADD = $(LIB_KDECORE) $(LIBXSLT_LIBS) $(LIBXML_LIBS)
++lib_LTLIBRARIES = libdocgenerators.la
++noinst_HEADERS = docbookgenerator.h version.h
++libdocgenerators_la_SOURCES = docbookgenerator.h docbookgenerator.cpp xhtmlgenerator.cpp
++libdocgenerators_la_LIBADD = $(LIB_KDECORE) $(LIBXSLT_LIBS) $(LIBXML_LIBS)
++
++appdir=$(kde_datadir)/umbrello
++app_DATA = xmi2docbook.xsl docbook2xhtml.xsl xmi.css common.ent
++
++version.h: $(top_srcdir)/umbrello/VERSION
++	printf "#undef UMBRELLO_VERSION\n#define UMBRELLO_VERSION \"`cat $(top_srcdir)/umbrello/VERSION`\"\n" > version.h
++
++CLEANFILES = version.h
++
+--- umbrello/umbrello/docgenerators/xhtmlgenerator.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 0)
++++ umbrello/umbrello/docgenerators/xhtmlgenerator.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -0,0 +1,104 @@
++/***************************************************************************
++                          xhtmlgenerator.h  -  description
++                             -------------------
++    begin                : Sat Jun 24 2006
++    copyright            : (C) 2006 by Gael de Chalendar (aka Kleag)
++    email                : kleag at free.fr
++ ***************************************************************************/
++
++/***************************************************************************
++ *                                                                         *
++ *   This program is free software; you can redistribute it and/or modify  *
++ *   it under the terms of the GNU General Public License as published by  *
++ *   the Free Software Foundation; either version 2 of the License, or     *
++ *   (at your option) any later version.                                   *
++ *                                                                         *
++ ***************************************************************************/
++
++#ifndef XHTMLGENERATOR_H
++#define XHTMLGENERATOR_H
++
++#include <kurl.h>
++#include <ktempdir.h>
++#include <qobject.h>
++
++namespace KIO
++{
++  class Job;
++}
++
++/**
++ * class XhtmlGenerator is a documentation generator for UML documents.
++ * It uses first @ref DocbookGenerator to convert the XMI generated by 
++ * UMLDoc::saveToXMI to docbook and next libxslt through
++ * the XSLT file stored in resources to convert the docbook file to XHTML.
++ * The latter uses the XSLT available on the Web at 
++ * http://docbook.sourceforge.net/release/xsl/snapshot/html/docbook.xsl
++ * 
++ * @todo allow to specify the destination and ensure that it works with distant
++ * ones
++ */
++class XhtmlGenerator : public QObject
++{
++  Q_OBJECT
++  public:
++
++    /**
++     * Constructor
++     */
++    XhtmlGenerator();
++
++    /**
++     * Empty Destructor
++     */
++    virtual ~XhtmlGenerator();
++
++    /**
++     * Exports the current model to XHTML in a directory named as the model
++     * with the .xmi suffix removed. The XHTML file will have the same name
++     * with the .html suffix. Figures will be named as the corresponding 
++     * diagrams in the GUI
++     * @todo change file naming to avoid paths with spaces or non-ASCII chars
++     * @todo better handling of error conditions
++     * @return true if saving is successful and false otherwise.
++     */
++    bool generateXhtmlForProject();
++    
++    /**
++     * Exports the current model to XHTML in the given directory
++     * @param destDir the directory where the XHTML file and the figures will
++     * be written
++     * @todo better handling of error conditions
++     * @return true if saving is successful and false otherwise.
++     */
++    bool generateXhtmlForProjectInto(const KURL& destDir);
++    
++  signals:
++    
++    /** Emited when the documentation generation is finished */
++    void finished();
++    
++  protected slots:
++    
++    /** This slot is triggerd when the first part, xmi to docbook, is 
++     * finished 
++     * @param docbookJob the job copying the docbook file to its destination.
++     * Used only for error reporting
++     */
++    void slotDocbookToXhtml(KIO::Job * docbookJob);
++    
++    /** Triggered when the copying of the HTML result file is finished. Emits
++     * the signal finished(). 
++     */
++    void slotHtmlCopyFinished( KIO::Job* );
++
++  private:
++    
++    /** The destination directory where the final documentation will be 
++     * written. 
++     */
++    KURL m_destDir;
++//     KTempDir m_tmpDir;
++};
++
++#endif // XHTMLGENERATOR_H
+--- umbrello/umbrello/docgenerators/xmi2docbook.sh	(.../tags/KDE/3.5.4/kdesdk)	(revision 0)
++++ umbrello/umbrello/docgenerators/xmi2docbook.sh	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -0,0 +1,9 @@
++#! /bin/bash
++
++echo Converting from XMI to docbook...
++java -cp /usr/share/java/xalan-j2-2.6.0.jar org.apache.xalan.xslt.Process -xml -in $1.xmi -xsl /home/gael/Logiciels/kde3.5-svn/kdesdk/umbrello.withdocgen/umbrello/docgenerators/xmi2docbook.xsl -out $1.docbook 
++
++echo Converting from docbook to XHTML...
++java -cp /usr/share/java/xalan-j2-2.6.0.jar org.apache.xalan.xslt.Process -in $1.docbook -xsl /home/gael/Logiciels/kde3.5-svn/kdesdk/umbrello.withdocgen/umbrello/docgenerators/docbook2xhtml.xsl -out $1.html -html
++
++echo done.
+--- umbrello/umbrello/docgenerators/configure.in.in	(.../tags/KDE/3.5.4/kdesdk)	(revision 0)
++++ umbrello/umbrello/docgenerators/configure.in.in	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -0,0 +1,73 @@
++
++HAVE_XSLT=yes
++
++KDE_FIND_PATH(xml2-config, XML_CONFIG, [${prefix}/bin ${exec_prefix}/bin], [
++  AC_MSG_WARN([Could not find libxml2 anywhere, check ftp://xmlsoft.org/ for libxml >= 2.4.8. (we also keep a version of it in kdesupport for CVS users' convience)])
++  HELP_SUBDIR=
++])
++
++if test -n "$XML_CONFIG"; then
++  vers=`$XML_CONFIG --version 2>/dev/null | sed -e 's/libxml //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
++  if test -n "$vers" && test "$vers" -ge 2004008
++  then
++     LIBXML_LIBS="`$XML_CONFIG --libs`"
++     LIBXML_RPATH=
++     for args in $LIBXML_LIBS; do
++	  case $args in
++	    -L*)
++  	       LIBXML_RPATH="$LIBXML_RPATH $args"
++ 	       ;;
++          esac
++     done
++     LIBXML_RPATH=`echo $LIBXML_RPATH | sed -e "s/-L/-R/g"`
++     LIBXML_CFLAGS="`$XML_CONFIG --cflags`"
++
++     KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin], [XMLLINT=""])
++     AC_DEFINE_UNQUOTED(XMLLINT, "$XMLLINT", [Defines the executable of xmllint])
++  else
++     AC_MSG_WARN([You need at least libxml 2.4.8])
++     HAVE_XSLT=no     
++  fi
++fi
++
++if test "$HAVE_XSLT" = yes; then
++
++  KDE_FIND_PATH(xslt-config, XSLT_CONFIG, [${prefix}/bin ${exec_prefix}/bin], [
++    AC_MSG_WARN([Could not find libxslt anywhere, check ftp://xmlsoft.org/ for libxslt >= 1.0.7. (we also keep a version of it in kdesupport for CVS users' convience)])
++    HAVE_XSLT=no 
++  ])
++
++  if test -n "$XSLT_CONFIG"; then
++     vers=`$XSLT_CONFIG --version 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
++     if test -n "$vers" && test "$vers" -ge 1000007; then
++       LIBXSLT_LIBS="`$XSLT_CONFIG --libs`"
++       LIBXSLT_RPATH=
++       for args in $LIBXSLT_LIBS; do
++	  case $args in
++	    -L*)
++  	       LIBXSLT_RPATH="$LIBXSLT_RPATH $args"
++ 	       ;;
++          esac
++       done
++       LIBXSLT_RPATH=`echo $LIBXSLT_RPATH | sed -e "s/-L/-R/g"`
++       LIBXSLT_CFLAGS="`$XSLT_CONFIG --cflags`"
++
++     else
++       AC_MSG_WARN([You need at least libxslt 1.0.7])
++       HAVE_XSLT=no
++     fi
++  fi
++fi
++
++if test "$HAVE_XSLT" = no; then  
++  DO_NOT_COMPILE="$DO_NOT_COMPILE umbrello"
++fi
++
++AC_SUBST(LIBXSLT_LIBS)
++AC_SUBST(LIBXSLT_CFLAGS)
++AC_SUBST(LIBXSLT_RPATH)
++
++AC_SUBST(LIBXML_LIBS)
++AC_SUBST(LIBXML_CFLAGS)
++AC_SUBST(LIBXML_RPATH)
++
+--- umbrello/umbrello/docgenerators/common.ent	(.../tags/KDE/3.5.4/kdesdk)	(revision 0)
++++ umbrello/umbrello/docgenerators/common.ent	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -0,0 +1,19 @@
++ 
++ <!ENTITY title1	"Software Specifications" > 
++ <!ENTITY title2	"" > 
++ <!ENTITY actor 	"Actor:">
++ <!ENTITY usecase 	"Use Cases:">
++ <!ENTITY classes 	"Classes:">
++ <!ENTITY back  	"Back">
++ <!ENTITY packagename  	"Package Name:">
++ <!ENTITY classname 	"Class Name:">
++ <!ENTITY yes 		"yes">
++ <!ENTITY no 		"no">
++ <!ENTITY attributes 	"Attributes:">
++ <!ENTITY metodes 	"Methods:">
++ <!ENTITY parameters 	"Parameters:">
++
++
++ 
++ 
++  
+--- umbrello/umbrello/docgenerators/docbookgenerator.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 0)
++++ umbrello/umbrello/docgenerators/docbookgenerator.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -0,0 +1,78 @@
++/***************************************************************************
++                          docbookgenerator.h  -  description
++                             -------------------
++    begin                : THu Jun 22 2006
++    copyright            : (C) 2006 by Gael de Chalendar (aka Kleag)
++    email                : kleag at free.fr
++ ***************************************************************************/
++
++/***************************************************************************
++ *                                                                         *
++ *   This program is free software; you can redistribute it and/or modify  *
++ *   it under the terms of the GNU General Public License as published by  *
++ *   the Free Software Foundation; either version 2 of the License, or     *
++ *   (at your option) any later version.                                   *
++ *                                                                         *
++ ***************************************************************************/
++
++#ifndef DOCBOOKGENERATOR_H
++#define DOCBOOKGENERATOR_H
++
++#include <kurl.h>
++#include <qobject.h>
++
++class UMLDoc;
++
++namespace KIO
++{
++  class Job;
++}
++
++/**
++ * class DocbookGenerator is a documentation generator for UML documents.
++ * It uses libxslt to convert the XMI generated by UMLDoc::saveToXMI through
++ * the XSLT file stored in resources.
++ *
++ * @todo Add configure checks for libxml2 and libxslt and use conditional 
++ * compilation of this library and its callers
++ * @todo allow to specify the destination and ensure that it works with distant
++ * ones
++ */
++class DocbookGenerator : public QObject
++{
++  Q_OBJECT
++  public:
++
++    /**
++     * Constructor
++     */
++    DocbookGenerator();
++
++    /**
++     * Empty Destructor
++     */
++    virtual ~DocbookGenerator();
++
++    /**
++     * Exports the current model to docbook in a directory named as the model
++     * with the .xmi suffix removed. The docbook file will have the same name
++     * with the .docbook suffix. Figures will be named as the corresponding 
++     * diagrams in the GUI
++     * @todo change file naming to avoid paths with spaces or non-ASCII chars
++     * @todo better handling of error conditions
++     * @return true if saving is successful and false otherwise.
++     */
++    bool generateDocbookForProject();
++    
++    /**
++     * Exports the current model to docbook in the given directory
++     * @param destDir the directory where the docbook file and the figures will
++     * be written
++     * @todo better handling of error conditions
++     * @return true if saving is successful and false otherwise.
++     */
++    KIO::Job* generateDocbookForProjectInto(const KURL& destDir);
++    
++};
++
++#endif // DOCBOOKGENERATOR_H
+--- umbrello/umbrello/codeimport/pascalimport.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/codeimport/pascalimport.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -44,19 +44,10 @@
+ void PascalImport::fillSource(QString word) {
+     QString lexeme;
+     const uint len = word.length();
+-    bool inString = false;
+     for (uint i = 0; i < len; i++) {
+         QChar c = word[i];
+-        if (c == '"') {
++        if (c.isLetterOrNumber() || c == '_' || c == '.' || c == '#') {
+             lexeme += c;
+-            if (inString) {
+-                m_source.append(lexeme);
+-                lexeme = QString::null;
+-            }
+-            inString = !inString;
+-        } else if (inString ||
+-                   c.isLetterOrNumber() || c == '_' || c == '.' || c == '#') {
+-            lexeme += c;
+         } else {
+             if (!lexeme.isEmpty()) {
+                 m_source.append(lexeme);
+@@ -78,6 +69,7 @@
+     while (true) {
+         QString lookAhead = m_source[m_srcIndex + 1].lower();
+         if (lookAhead != "virtual" && lookAhead != "abstract" &&
++            lookAhead != "override" &&
+             lookAhead != "register" && lookAhead != "cdecl" &&
+             lookAhead != "pascal" && lookAhead != "stdcall" &&
+             lookAhead != "safecall" && lookAhead != "saveregisters" &&
+@@ -209,7 +201,8 @@
+         skipStmt();
+         return true;
+     }
+-    if (keyword == "function" || keyword == "procedure") {
++    if (keyword == "function" || keyword == "procedure" ||
++        keyword == "constructor" || keyword == "destructor") {
+         if (m_klass == NULL) {
+             // Unlike a Pascal unit, a UML package does not support subprograms.
+             // In order to map those, we would need to create a UML class with
+@@ -223,6 +216,17 @@
+             advance();
+             const uint MAX_PARNAMES = 16;
+             while (m_srcIndex < srcLength && m_source[m_srcIndex] != ")") {
++                QString nextToken = m_source[m_srcIndex + 1].lower();
++                Uml::Parameter_Direction dir = Uml::pd_In;
++                if (nextToken == "var") {
++                    dir = Uml::pd_InOut;
++                    advance();
++                } else if (nextToken == "const") {
++                    advance();
++                } else if (nextToken == "out") {
++                    dir = Uml::pd_Out;
++                    advance();
++                }
+                 QString parName[MAX_PARNAMES];
+                 uint parNameCount = 0;
+                 do {
+@@ -233,26 +237,23 @@
+                     parName[parNameCount++] = advance();
+                 } while (advance() == ",");
+                 if (m_source[m_srcIndex] != ":") {
+-                    kdError() << "importPascal: expecting ':'" << endl;
++                    kdError() << "importPascal: expecting ':' at " << m_source[m_srcIndex] << endl;
+                     skipStmt();
+                     break;
+                 }
+-                const QString parMode = advance().lower();
+-                QString typeName;
+-                Uml::Parameter_Direction dir = Uml::pd_In;
+-                if (parMode == "var") {
+-                    dir = Uml::pd_InOut;
+-                    typeName = advance();
+-                } else if (parMode == "const") {
+-                    typeName = advance();
+-                } else if (parMode == "out") {
+-                    dir = Uml::pd_Out;
+-                    typeName = advance();
+-                } else {
+-                    typeName = parMode;  // The default is "pass by value".
++                nextToken = advance();
++                if (nextToken.lower() == "array") {
++                    nextToken = advance().lower();
++                    if (nextToken != "of") {
++                        kdError() << "importPascal(" << name << "): expecting 'array OF' at "
++                                  << nextToken << endl;
++                        skipStmt();
++                        return false;
++                    }
++                    nextToken = advance();
+                 }
+                 for (uint i = 0; i < parNameCount; i++) {
+-                    UMLAttribute *att = Import_Utils::addMethodParameter(op, typeName, parName[i]);
++                    UMLAttribute *att = Import_Utils::addMethodParameter(op, nextToken, parName[i]);
+                     att->setParmKind(dir);
+                 }
+                 if (advance() != ";")
+@@ -267,6 +268,8 @@
+                 return false;
+             }
+             returnType = advance();
++        } else if (keyword == "constructor" || keyword == "destructor") {
++            op->setStereotype(keyword);
+         }
+         skipStmt();
+         bool isVirtual = false;
+@@ -343,6 +346,14 @@
+             m_klass = static_cast<UMLClassifier*>(ns);
+             return true;
+         }
++        if (keyword == "function" || keyword == "procedure") {
++            UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Datatype, name,
++                                                          m_scope[m_scopeIndex], m_comment);
++            if (m_source[m_srcIndex + 1] == "(")
++                skipToClosing('(');
++            skipStmt();
++            return true;
++        }
+         // Datatypes: TO BE DONE
+         return false;
+     }
+@@ -352,7 +363,13 @@
+         skipStmt();
+         return true;
+     }
+-    const QString& name = keyword;
++    QString name, stereotype;
++    if (keyword == "property") {
++        stereotype = keyword;
++        name = advance();
++    } else {
++        name = keyword;
++    }
+     if (advance() != ":") {
+         kdError() << "PascalImport: expecting \":\" at " << name << " "
+                   << m_source[m_srcIndex] << endl;
+@@ -371,6 +388,7 @@
+     UMLObject *o = Import_Utils::insertAttribute(m_klass, m_currentAccess, name,
+                                                  typeName, m_comment);
+     UMLAttribute *attr = static_cast<UMLAttribute*>(o);
++    attr->setStereotype(stereotype);
+     attr->setInitialValue(initialValue);
+     skipStmt();
+     return true;
+--- umbrello/umbrello/codeimport/nativeimportbase.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/codeimport/nativeimportbase.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -50,6 +50,47 @@
+         m_srcIndex++;
+ }
+ 
++bool NativeImportBase::skipToClosing(QChar opener) {
++    QString closing;
++    switch (opener) {
++        case '{':
++            closing = "}";
++            break;
++        case '[':
++            closing = "]";
++            break;
++        case '(':
++            closing = ")";
++            break;
++        case '<':
++            closing = ">";
++            break;
++        default:
++            kdError() << "JavaImport::skipToClosing(" << opener
++                << "): " << "illegal input character" << endl;
++            return false;
++    }
++    const QString opening(opener);
++    skipStmt(opening);
++    const uint srcLength = m_source.count();
++    int nesting = 0;
++    while (m_srcIndex < srcLength) {
++        QString nextToken = advance();
++        if (nextToken.isEmpty())
++            break;
++        if (nextToken == closing) {
++            if (nesting <= 0)
++                break;
++            nesting--;
++        } else if (nextToken == opening) {
++            nesting++;
++        }
++    }
++    if (m_srcIndex == srcLength)
++        return false;
++    return true;
++}
++
+ QString NativeImportBase::advance() {
+     while (m_srcIndex < m_source.count() - 1) {
+         if (m_source[++m_srcIndex].startsWith(m_singleLineCommentIntro))
+@@ -147,6 +188,49 @@
+     return false;  // The input was not completely consumed by preprocessing.
+ }
+ 
++/// Split the line so that a string is returned as a single element of the list,
++/// when not in a string then split at white space.
++QStringList NativeImportBase::split(QString line) {
++    QStringList list;
++    QString listElement;
++    QChar stringIntro = 0;  // buffers the string introducer character
++    bool seenSpace = false;
++    line = line.stripWhiteSpace();
++    for (uint i = 0; i < line.length(); i++) {
++        const QChar& c = line[i];
++        if (stringIntro) {        // we are in a string
++            listElement += c;
++            if (c == stringIntro) {
++                if (line[i - 1] != '\\') {
++                    list.append(listElement);
++                    listElement = QString::null;
++                    stringIntro = 0;  // we are no longer in a string
++                }
++            }
++        } else if (c == '"' || c == '\'') {
++            if (!listElement.isEmpty()) {
++                list.append(listElement);
++            }
++            listElement = stringIntro = c;
++            seenSpace = false;
++        } else if (c == ' ' || c == '\t') {
++            if (seenSpace)
++                continue;
++            seenSpace = true;
++            if (!listElement.isEmpty()) {
++                list.append(listElement);
++                listElement = QString::null;
++            }
++        } else {
++            listElement += c;
++            seenSpace = false;
++        }
++    }
++    if (!listElement.isEmpty())
++        list.append(listElement);
++    return list;
++}
++
+ /// The lexer. Tokenizes the given string and fills `m_source'.
+ /// Stores possible comments in `m_comment'.
+ void NativeImportBase::scan(QString line) {
+@@ -161,15 +245,15 @@
+             return;
+         line = line.left(pos);
+     }
+-    line = line.simplifyWhiteSpace();
+-    if (line.isEmpty())
++    if (line.contains(QRegExp("^\\s*$")))
+         return;
+-    QStringList words = QStringList::split( QRegExp("\\s+"), line );
++    QStringList words = split(line);
+     for (QStringList::Iterator it = words.begin(); it != words.end(); ++it) {
+-        QString word = (*it).stripWhiteSpace();
+-        if (word.isEmpty())
+-            continue;
+-        fillSource(word);
++        QString word = *it;
++        if (word[0] == '"' || word[0] == '\'')
++            m_source.append(word);  // string constants are handled by split()
++        else
++            fillSource(word);
+     }
+ }
+ 
+--- umbrello/umbrello/codeimport/javaimport.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/codeimport/javaimport.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -29,6 +29,9 @@
+ #include "../operation.h"
+ #include "../attribute.h"
+ 
++QStringList JavaImport::s_filesAlreadyParsed;
++int JavaImport::s_parseDepth = 0;
++
+ JavaImport::JavaImport() : NativeImportBase("//") {
+     setMultiLineComment("/*", "*/");
+     initVars();
+@@ -42,8 +45,7 @@
+ }
+ 
+ /// Catenate possible template arguments/array dimensions to the end of the type name.
+-QString JavaImport::joinTypename() {
+-    QString typeName = m_source[m_srcIndex];
++QString JavaImport::joinTypename(QString typeName) {
+     if (m_source[m_srcIndex + 1] == "<" ||
+         m_source[m_srcIndex + 1] == "[") {
+         uint start = ++m_srcIndex;
+@@ -53,27 +55,20 @@
+             typeName += m_source[i];
+         }
+     }
++    // to handle multidimensional arrays, call recursively
++    if (m_source[m_srcIndex + 1] == "[") {
++        typeName = joinTypename( typeName );
++    }
+     return typeName;
+ }
+ 
+ void JavaImport::fillSource(QString word) {
+     QString lexeme;
+     const uint len = word.length();
+-    bool inString = false;
+     for (uint i = 0; i < len; i++) {
+         const QChar& c = word[i];
+-        if (c == '"') {
++        if (c.isLetterOrNumber() || c == '_' || c == '.') {
+             lexeme += c;
+-            if (i == 0 || word[i - 1] != '\\') {
+-                if (inString) {
+-                    m_source.append(lexeme);
+-                    lexeme = QString::null;
+-                }
+-                inString = !inString;
+-            }
+-        } else if (inString ||
+-                   c.isLetterOrNumber() || c == '_' || c == '.') {
+-            lexeme += c;
+         } else {
+             if (!lexeme.isEmpty()) {
+                 m_source.append(lexeme);
+@@ -86,63 +81,20 @@
+         m_source.append(lexeme);
+ }
+ 
+-bool JavaImport::skipToClosing(QChar opener) {
+-    QString closing;
+-    switch (opener) {
+-        case '{':
+-            closing = "}";
+-            break;
+-        case '[':
+-            closing = "]";
+-            break;
+-        case '(':
+-            closing = ")";
+-            break;
+-        case '<':
+-            closing = ">";
+-            break;
+-        default:
+-            kdError() << "JavaImport::skipToClosing(" << opener
+-                << "): " << "illegal input character" << endl;
+-            return false;
+-    }
+-    const QString opening(opener);
+-    skipStmt(opening);
+-    const uint srcLength = m_source.count();
+-    int nesting = 0;
+-    while (m_srcIndex < srcLength) {
+-        QString nextToken = advance();
+-        if (nextToken.isEmpty())
+-            break;
+-        if (nextToken == closing) {
+-            if (nesting <= 0)
+-                break;
+-            nesting--;
+-        } else if (nextToken == opening) {
+-            nesting++;
+-        }
+-    }
+-    if (m_srcIndex == srcLength)
+-        return false;
+-    return true;
+-}
+ 
+-
+ ///Spawn off an import of the specifed file
+ void JavaImport::spawnImport( QString file ) {
+-    static QStringList filesBeingParsed;
+     // if the file is being parsed, don't bother
+     //
+-    if (filesBeingParsed.contains( file ) ) {
++    if (s_filesAlreadyParsed.contains( file ) ) {
+         return;
+     }
+     if (QFile::exists(file)) {
+           JavaImport importer;
+           QStringList fileList;
+           fileList.append( file );
+-          filesBeingParsed.append( file );
++          s_filesAlreadyParsed.append( file );
+           importer.importFiles( fileList ); 
+-          filesBeingParsed.remove( file );
+     }
+ }
+ 
+@@ -157,6 +109,16 @@
+ 
+ ///Resolve the specified className 
+ UMLObject* JavaImport::resolveClass (QString className) {
++    kdDebug() << "importJava trying to resolve " << className << endl; 
++    // keep track if we are dealing with an array
++    //
++    bool isArray = className.contains('[');
++    // remove any [] so that the class itself can be resolved
++    //
++    QString baseClassName = className;
++    baseClassName.remove('[');
++    baseClassName.remove(']');
++
+     // java has a few implicit imports.  Most relevant for this is the 
+     // current package, which is in the same directory as the current file
+     // being parsed
+@@ -171,10 +133,15 @@
+     // current class
+     //
+     QString myDir = file.join( "/" );
+-    QString myFile = "/" + myDir + "/" + className + ".java";
++    QString myFile = "/" + myDir + "/" + baseClassName + ".java";
+     if ( QFile::exists(myFile) ) {
+         spawnImport( myFile );
+-        return findObject ( className, m_scope[m_scopeIndex]);
++        if ( isArray ) {
++            // we have imported the type. For arrays we want to return 
++            // the array type
++            return Import_Utils::createUMLObject(Uml::ot_Class, className, m_scope[m_scopeIndex]);
++        }
++        return findObject(baseClassName, m_scope[m_scopeIndex]);
+     }
+ 
+     // the class we want is not in the same package as the one being imported.
+@@ -196,11 +163,11 @@
+         QString import = (*pathIt);
+         QStringList split = QStringList::split( '.', import );
+         split.pop_back(); // remove the * or the classname
+-        if ( import.endsWith( "*" ) || import.endsWith( className) ) {
++        if ( import.endsWith( "*" ) || import.endsWith( baseClassName) ) {
+             // check if the file we want is in this imported package
+             // convert the org.test type package into a filename
+             //
+-            QString aFile = sourceRoot + split.join("/") + "/" + className + ".java";
++            QString aFile = sourceRoot + split.join("/") + "/" + baseClassName + ".java";
+             if ( QFile::exists(aFile) ) {
+                 spawnImport( aFile );
+                 // we need to set the package for the class that will be resolved
+@@ -211,13 +178,17 @@
+                 for (QStringList::Iterator it = split.begin(); it != split.end(); ++it) {
+                     QString name = (*it);
+                     UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Package,
+-                            name, parent);
++                                                                  name, parent);
+                     current = static_cast<UMLPackage*>(ns);
+                     parent = current;
+                 } // for
++                if ( isArray ) {
++                    // we have imported the type. For arrays we want to return 
++                    // the array type
++                    return Import_Utils::createUMLObject(Uml::ot_Class, className, current);
++                }
+                 // now that we have the right package, the class should be findable
+-                //
+-                return findObject ( className, current);
++                return findObject(baseClassName, current);
+             } // if file exists
+         } // if import matches
+     } //foreach import
+@@ -229,7 +200,22 @@
+ void JavaImport::parseFile(QString filename) {
+     m_currentFileName= filename;
+     m_imports.clear();
++    // default visibility is Impl, unless we are an interface, then it is 
++    // public for member vars and methods
++    m_defaultCurrentAccess = Uml::Visibility::Implementation;
++    m_currentAccess = m_defaultCurrentAccess;
++    s_parseDepth++;
++    // in the case of self referencing types, we can avoid parsing the 
++    // file twice by adding it to the list
++    s_filesAlreadyParsed.append(filename);
+     NativeImportBase::parseFile(filename);
++    s_parseDepth--;
++    if ( s_parseDepth <= 0 ) {
++        // if the user decides to clear things out and reparse, we need
++        // to honour the request, so reset things for next time.
++        s_filesAlreadyParsed.clear();
++        s_parseDepth = 0;
++    }
+ }
+ 
+ 
+@@ -253,9 +239,6 @@
+             kdError() << "importJava: unexpected: " << m_source[m_srcIndex] << endl;
+             skipStmt();
+         }
+-        // The default visibilty for java is implementation, since the absence
+-        // of a modifier means package visibility (which maps to implementation).
+-        m_currentAccess = Uml::Visibility::Implementation;
+         return true;
+     }
+     if (keyword == "class" || keyword == "interface") {
+@@ -271,6 +254,10 @@
+         // change it.
+         m_klass->setInterface(keyword == "interface");
+         m_isAbstract = m_isStatic = false;
++        // if no modifier is specified in an interface, then it means public
++        if ( m_klass->isInterface() ) {
++            m_defaultCurrentAccess =  Uml::Visibility::Public;
++        }
+         if (advance() == ";")   // forward declaration
+             return true;
+         if (m_source[m_srcIndex] == "<") {
+@@ -302,7 +289,7 @@
+         }
+         if (m_source[m_srcIndex] == "extends") {
+             const QString& baseName = advance();
+-            // try to resove the class we are extending, or if impossible
++            // try to resolve the class we are extending, or if impossible
+             // create a placeholder
+             UMLObject *parent = resolveClass( baseName );
+             if ( parent ) {
+@@ -369,6 +356,12 @@
+         m_isStatic = true;
+         return true;
+     }
++    // if we detected static previously and keyword is { then this is a static block
++    if (m_isStatic && keyword == "{") {
++        // reset static flag and jump to end of static block
++        m_isStatic = false;
++        return skipToClosing('{');
++    }
+     if (keyword == "abstract") {
+         m_isAbstract = true;
+         return true;
+@@ -430,7 +423,8 @@
+         kdError() << "importJava: ignoring " << keyword << endl;
+         return false;
+     }
+-    QString typeName = joinTypename();
++    QString typeName = m_source[m_srcIndex];
++    typeName = joinTypename(typeName);
+     // At this point we need a class.
+     if (m_klass == NULL) {
+         kdError() << "importJava: no class set for " << typeName << endl;
+@@ -455,19 +449,36 @@
+         UMLOperation *op = Import_Utils::makeOperation(m_klass, name);
+         m_srcIndex++;
+         while (m_srcIndex < srcLength && m_source[m_srcIndex] != ")") {
+-            QString typeName = joinTypename();
++            QString typeName = m_source[m_srcIndex];
++            if ( typeName == "final" || typeName.startsWith( "//") ) {
++                // ignore the "final" keyword and any comments in method args
++                typeName = advance();
++            } 
++            typeName = joinTypename(typeName);
+             QString parName = advance();
+-            UMLAttribute *att = Import_Utils::addMethodParameter(op, typeName, parName);
++            // the Class might not be resolved yet so resolve it if necessary
++            UMLObject *obj = resolveClass(typeName);
++            if (obj) {
++                // by prepending the package, unwanted placeholder types will not get created
++                typeName = obj->getFullyQualifiedName(".");
++            }
++            /* UMLAttribute *att = */ Import_Utils::addMethodParameter(op, typeName, parName);
+             if (advance() != ",")
+                 break;
+             m_srcIndex++;
+         }
++        // before adding the method, try resolving the return type
++        UMLObject *obj = resolveClass(typeName);
++        if (obj) {
++            // using the fully qualified name means that a placeholder type will not be created.
++            typeName = obj->getFullyQualifiedName(".");
++        }
+         Import_Utils::insertMethod(m_klass, op, m_currentAccess, typeName,
+                                    m_isStatic, m_isAbstract, false /*isFriend*/,
+                                    false /*isConstructor*/, m_comment);
+         m_isAbstract = m_isStatic = false;
+-        // Default visibility for java is implementation (package vis.)
+-        m_currentAccess = Uml::Visibility::Implementation;
++        // reset the default visibility
++        m_currentAccess = m_defaultCurrentAccess;
+         // At this point we do not know whether the method has a body or not.
+         do {
+             nextToken = advance();
+@@ -516,7 +527,7 @@
+             o = Import_Utils::insertAttribute(m_klass, m_currentAccess, name,
+                                                   typeName, m_comment, m_isStatic);
+         }
+-        UMLAttribute *attr = static_cast<UMLAttribute*>(o);
++        // UMLAttribute *attr = static_cast<UMLAttribute*>(o);
+         if (nextToken != ",") {
+             // reset the modifiers
+             m_isStatic = m_isAbstract = false;
+@@ -526,7 +537,7 @@
+         nextToken = advance();
+     }
+     // reset visibility to default
+-    m_currentAccess = Uml::Visibility::Implementation;
++    m_currentAccess = m_defaultCurrentAccess;
+     if (m_source[m_srcIndex] != ";") {
+         kdError() << "importJava: ignoring trailing items at " << name << endl;
+         skipStmt();
+--- umbrello/umbrello/codeimport/pythonimport.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/codeimport/pythonimport.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -93,27 +93,10 @@
+ void PythonImport::fillSource(QString word) {
+     QString lexeme;
+     const uint len = word.length();
+-    QChar stringIntro = 0;  // buffers the string introducer character
+     for (uint i = 0; i < len; i++) {
+         const QChar& c = word[i];
+-        if (stringIntro) {        // we are in a string
++        if (c.isLetterOrNumber() || c == '_' || c == '.') {
+             lexeme += c;
+-            if (c == stringIntro) {
+-                if (word[i - 1] != '\\') {
+-                    m_source.append(lexeme);
+-                    m_srcIndex++;
+-                    lexeme = QString::null;
+-                }
+-                stringIntro = 0;  // we are no longer in a string
+-            }
+-        } else if (c == '"' || c == '\'') {
+-            if (!lexeme.isEmpty()) {
+-                m_source.append(lexeme);
+-                m_srcIndex++;
+-            }
+-            lexeme = stringIntro = c;
+-        } else if (c.isLetterOrNumber() || c == '_' || c == '.') {
+-            lexeme += c;
+         } else {
+             if (!lexeme.isEmpty()) {
+                 m_source.append(lexeme);
+--- umbrello/umbrello/codeimport/adaimport.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/codeimport/adaimport.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -5,7 +5,7 @@
+  *   the Free Software Foundation; either version 2 of the License, or     *
+  *   (at your option) any later version.                                   *
+  *                                                                         *
+- *  copyright (C) 2005                                                     *
++ *  copyright (C) 2005-2006                                                *
+  *  Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>                  *
+  ***************************************************************************/
+ 
+@@ -37,22 +37,68 @@
+     m_inGenericFormalPart = false;
+ }
+ 
++/// Split the line so that a string is returned as a single element of the list,
++/// when not in a string then split at white space.
++QStringList AdaImport::split(QString line) {
++    QStringList list;
++    QString listElement;
++    bool inString = false;
++    bool seenSpace = false;
++    line = line.stripWhiteSpace();
++    uint len = line.length();
++    for (uint i = 0; i < len; i++) {
++        const QChar& c = line[i];
++        if (inString) {
++            listElement += c;
++            if (i > 0 && line[i - 1] == '"')
++                continue;   // escaped quotation mark
++            list.append(listElement);
++            listElement = QString::null;
++            inString = false;
++        } else if (c == '"') {
++            inString = true;
++            if (!listElement.isEmpty())
++                list.append(listElement);
++            listElement = QString(c);
++            seenSpace = false;
++        } else if (c == '\'') {
++            if (i < len - 2 && line[i + 2] == '\'') {
++                // character constant
++                if (!listElement.isEmpty())
++                    list.append(listElement);
++                listElement = line.mid(i, 3);
++                i += 2;
++                list.append(listElement);
++                listElement = QString::null;
++                continue;
++            }
++            listElement += c;
++            seenSpace = false;
++        } else if (c.isSpace()) {
++            if (seenSpace)
++                continue;
++            seenSpace = true;
++            if (!listElement.isEmpty()) {
++                list.append(listElement);
++                listElement = QString::null;
++            }
++        } else {
++            listElement += c;
++            seenSpace = false;
++        }
++    }
++    if (!listElement.isEmpty())
++        list.append(listElement);
++    return list;
++}
++
+ void AdaImport::fillSource(QString word) {
+     QString lexeme;
+     const uint len = word.length();
+-    bool inString = false;
+     for (uint i = 0; i < len; i++) {
+         QChar c = word[i];
+-        if (c == '"') {
++        if (c.isLetterOrNumber() || c == '_' || c == '.' || c == '#') {
+             lexeme += c;
+-            if (inString) {
+-                m_source.append(lexeme);
+-                lexeme = QString::null;
+-            }
+-            inString = !inString;
+-        } else if (inString ||
+-                   c.isLetterOrNumber() || c == '_' || c == '.' || c == '#') {
+-            lexeme += c;
+         } else {
+             if (!lexeme.isEmpty()) {
+                 m_source.append(lexeme);
+@@ -123,8 +169,8 @@
+     }
+     if (keyword == "package") {
+         const QString& name = advance();
+-        UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Package,
+-                        name, m_scope[m_scopeIndex], m_comment);
++        UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Package, name,
++                                                      m_scope[m_scopeIndex], m_comment);
+         if (advance() == "is") {
+             if (m_source[m_srcIndex + 1] == "new") {
+                 // generic package instantiation: TBD
+@@ -147,7 +193,17 @@
+         if (advance() == "(") {
+             kdDebug() << "AdaImport::parseFile(" << name << "): "
+                 << "discriminant handling is not yet implemented" << endl;
+-            skipStmt(")");
++            // @todo Find out how to map discriminated record to UML.
++            //       For now, we just create a pro forma empty record.
++            Import_Utils::createUMLObject(Uml::ot_Class, name, m_scope[m_scopeIndex],
++                                          m_comment, "record");
++            skipStmt("end");
++            if (m_source[++m_srcIndex] == "case")
++                m_srcIndex += 2;  // skip "case" ";"
++            // we are now positioned on "end"
++            m_srcIndex += 2;      // skip "end" "record"
++            // we are now positioned on ";"
++            return true;
+         }
+         if (m_source[m_srcIndex] == ";") {
+             // forward declaration
+@@ -181,7 +237,6 @@
+                             name, m_scope[m_scopeIndex], m_comment);
+             ns->setAbstract(m_isAbstract);
+             m_isAbstract = false;
+-            m_comment = QString::null;
+             m_srcIndex++;
+             isTaggedType = true;
+         }
+@@ -208,14 +263,14 @@
+         }
+         if (m_source[m_srcIndex] == "new") {
+             QString base = advance();
+-            UMLClassifier *parent = NULL;
+-            if (advance() == "with") {
+-                UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Class,
+-                                base, NULL);
+-                parent = static_cast<UMLClassifier*>(ns);
+-                ns = Import_Utils::createUMLObject(Uml::ot_Class, name,
+-                                       m_scope[m_scopeIndex], m_comment);
+-                m_comment = QString::null;
++            const bool isExtension = (advance() == "with");
++            Uml::Object_Type t = (isExtension || m_isAbstract ? Uml::ot_Class
++                                                              : Uml::ot_Datatype);
++            UMLObject *ns = Import_Utils::createUMLObject(t, base, NULL);
++            UMLClassifier *parent = static_cast<UMLClassifier*>(ns);
++            ns = Import_Utils::createUMLObject(Uml::ot_Class, name,
++                                               m_scope[m_scopeIndex], m_comment);
++            if (isExtension) {
+                 QString nextLexeme = advance();
+                 if (nextLexeme == "null" || nextLexeme == "record") {
+                     UMLClassifier *klass = static_cast<UMLClassifier*>(ns);
+@@ -223,10 +278,11 @@
+                     if (nextLexeme == "record") {
+                         // Set the m_klass for attributes.
+                         m_klass = klass;
+-                        return true;
+                     }
+                 }
+             }
++            skipStmt();
++            return true;
+         }
+         // Datatypes: TO BE DONE
+         return false;
+--- umbrello/umbrello/codeimport/nativeimportbase.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/codeimport/nativeimportbase.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -111,6 +111,13 @@
+     virtual bool preprocess(QString& line);
+ 
+     /**
++     * Split the line so that a string is returned as a single element of the list.
++     * When not in a string then split at white space.
++     * The default implementation is suitable for C style strings and char constants.
++     */
++    virtual QStringList split(QString line);
++
++    /**
+      * Analyze the given word and fill `m_source'.
+      * A "word" is a whitespace delimited item from the input line.
+      * To be provided by the specific importer class.
+@@ -134,6 +141,16 @@
+     void skipStmt(QString until = ";");
+ 
+     /**
++     * Advance m_srcIndex to the index of the corresponding closing character
++     * of the given opening.  Nested opening/closing pairs are respected.
++     * Valid openers are:    '{'  '['  '('  '<'
++     *
++     * @return  True for success, false for misuse (invalid opener) or
++     *          if no matching closing character is found in m_source.
++     */
++    bool skipToClosing(QChar opener);
++
++    /**
+      * Advance m_srcIndex until m_source[m_srcIndex] contains a non-comment.
+      * Comments encountered during advancement are accumulated in `m_comment'.
+      * If m_srcIndex hits the end of m_source then QString::null is returned.
+--- umbrello/umbrello/codeimport/javaimport.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/codeimport/javaimport.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -18,6 +18,7 @@
+ /**
+  * Java code import
+  * @author Oliver Kellogg
++ * @author JP Fournier
+  * Bugs and comments to uml-devel at lists.sf.net or http://bugs.kde.org
+  */
+ class JavaImport : public NativeImportBase {
+@@ -42,17 +43,6 @@
+     void fillSource(QString word);
+ 
+     /**
+-     * Advance NativeImportBase::m_srcIndex to the index of the
+-     * corresponding closing character of the given opening.
+-     * Nested opening/closing pairs are respected.
+-     * Valid openers are:    '{'  '['  '('  '<'
+-     *
+-     * @return  True for success, false for misuse (invalid opener) or
+-     *          if no matching closing character is found in m_source.
+-     */
+-    bool skipToClosing(QChar opener);
+-
+-    /**
+      * Keep track of the filename currently being parsed
+      */
+     void parseFile(QString filename);
+@@ -67,7 +57,14 @@
+      */
+     void spawnImport(QString file);
+ 
+-    QString joinTypename();
++    /**
++     * figure out if the type is really an array or template of the given typeName
++     */
++    QString joinTypename(QString typeName);
++    
++    /**
++     * true if the member var or method is declared static
++     */
+     bool m_isStatic;
+ 
+     /**
+@@ -85,7 +82,24 @@
+      */
+     QStringList m_imports;
+ 
++    /**
++     * Keep track of the files we have already parsed so we don't
++     * reparse the same ones over and over again.
++     */
++    static QStringList s_filesAlreadyParsed;
+ 
++    /**
++     * Keep track of the parses so that the filesAlreadyParsed 
++     * can be reset when we're done.
++     */
++    static int s_parseDepth;
++
++    /**
++     * The current visibility for when the visibility is absent
++     */
++    Uml::Visibility m_defaultCurrentAccess;
++
++
+ };
+ 
+ #endif
+--- umbrello/umbrello/codeimport/adaimport.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/codeimport/adaimport.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -5,7 +5,7 @@
+  *   the Free Software Foundation; either version 2 of the License, or     *
+  *   (at your option) any later version.                                   *
+  *                                                                         *
+- *  copyright (C) 2005                                                     *
++ *  copyright (C) 2005-2006                                                *
+  *  Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>                  *
+  ***************************************************************************/
+ 
+@@ -36,6 +36,15 @@
+     bool parseStmt();
+ 
+     /**
++     * Split the line so that a string is returned as a single element of the list.
++     * When not in a string then split at white space.
++     * Reimplementation of method from NativeImportBase is required because of
++     * Ada's tic which is liable to be confused with the beginning of a character
++     * constant.
++     */
++    QStringList split(QString line);
++
++    /**
+      * Implement abstract operation from NativeImportBase.
+      */
+     void fillSource(QString word);
+--- umbrello/umbrello/codeimport/import_utils.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/codeimport/import_utils.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -72,6 +72,9 @@
+ }
+ 
+ QString formatComment(const QString &comment) {
++    if (comment.isEmpty())
++        return comment;
++
+     QStringList lines = QStringList::split("\n", comment);
+     QString& first = lines.first();
+     QRegExp wordex("\\w");
+@@ -184,7 +187,6 @@
+                 bPutAtGlobalScope = false;
+             }
+             o = Object_Factory::createUMLObject(Uml::ot_Datatype, name, parentPkg,
+-                                                false,  //prepend
+                                                 false); //solicitNewName
+             UMLDatatype *dt = static_cast<UMLDatatype*>(o);
+             UMLClassifier *c = dynamic_cast<UMLClassifier*>(origType);
+@@ -233,7 +235,8 @@
+                                         UMLClassifier *attrType, QString comment /* ="" */,
+                                         bool isStatic /* =false */) {
+     Uml::Object_Type ot = owner->getBaseType();
+-    if (ot != Uml::ot_Class) {
++    Uml::Programming_Language pl = UMLApp::app()->getActiveLanguage();
++    if (ot != Uml::ot_Class && pl != Uml::pl_Java) {
+         kdDebug() << "insertAttribute: Don't know what to do with "
+         << owner->getName() << " (object type " << ot << ")" << endl;
+         return NULL;
+--- umbrello/umbrello/umlview.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/umbrello/umlview.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -60,6 +60,7 @@
+ #include "classifier.h"
+ #include "packagewidget.h"
+ #include "package.h"
++#include "folder.h"
+ #include "componentwidget.h"
+ #include "component.h"
+ #include "nodewidget.h"
+@@ -85,7 +86,7 @@
+ #include "forkjoinwidget.h"
+ #include "activitywidget.h"
+ #include "seqlinewidget.h"
+-
++#include "uniqueid.h"
+ #include "umllistviewitemlist.h"
+ #include "umllistviewitem.h"
+ #include "umllistview.h"
+@@ -338,12 +339,12 @@
+     int windowHeight = (int)ceil(dScaleUse*height);
+ #ifdef DEBUG_PRINTING
+     kdDebug() << "drawHeight: " << drawHeight << ", width: " << rect.width()
+-    << "\nPageHeight: " << height << ", PageWidht: " << width
+-    << "\nScaleY: " << dScaleY << ", ScaleX: " << dScaleX
+-    << "\ndScaleUse: " << dScaleUse
+-    << "\nVirtualSize: Width: " << windowWidth << ", Height: " << windowHeight
+-    << "\nFoot Top: " << footTop
+-    << endl;
++              << "\nPageHeight: " << height << ", PageWidht: " << width
++              << "\nScaleY: " << dScaleY << ", ScaleX: " << dScaleX
++              << "\ndScaleUse: " << dScaleUse
++              << "\nVirtualSize: Width: " << windowWidth << ", Height: " << windowHeight
++              << "\nFoot Top: " << footTop
++              << endl;
+ #endif
+     // set virtual drawing area window - where diagram fits 100% in
+     pPainter.setWindow( rect.x(), rect.y(), windowWidth, windowHeight );
+@@ -601,7 +602,7 @@
+     UMLDrag::LvTypeAndID * tid = tidIt.current();
+     if (!tid) {
+         kdDebug() << "UMLView::contentsDragEnterEvent: "
+-        << "UMLDrag::getClip3TypeAndID returned empty list" << endl;
++                  << "UMLDrag::getClip3TypeAndID returned empty list" << endl;
+         return;
+     }
+     ListView_Type lvtype = tid->type;
+@@ -697,7 +698,7 @@
+     UMLDrag::LvTypeAndID * tid = tidIt.current();
+     if (!tid) {
+         kdDebug() << "UMLView::contentsDropEvent: "
+-        << "UMLDrag::getClip3TypeAndID returned empty list" << endl;
++                  << "UMLDrag::getClip3TypeAndID returned empty list" << endl;
+         return;
+     }
+     ListView_Type lvtype = tid->type;
+@@ -718,7 +719,7 @@
+     UMLObject* o = m_pDoc->findObjectById(id);
+     if( !o ) {
+         kdDebug() << "UMLView::contentsDropEvent: object id=" << ID2STR(id)
+-        << " not found" << endl;
++                  << " not found" << endl;
+         return;
+     }
+     m_bCreateObject = true;
+@@ -844,8 +845,7 @@
+ AssociationWidget * UMLView::findAssocWidget(UMLWidget *pWidgetA, UMLWidget *pWidgetB) {
+     static QValueList<Association_Type> assocTypes;
+     if (assocTypes.isEmpty()) {
+-        assocTypes << Uml::at_Aggregation
+-        << Uml::at_Composition << Uml::at_Containment;
++        assocTypes << Uml::at_Aggregation << Uml::at_Composition << Uml::at_Containment;
+     }
+     AssociationWidget* retval = NULL;
+     for (uint i=0; i < assocTypes.size(); ++i) {
+@@ -873,8 +873,8 @@
+         if (pWidgetA->getID() == assoc->getWidgetID(B) &&
+                 pWidgetB->getID() == assoc->getWidgetID(A)) {
+             kdDebug() << "UMLView::findAssocWidget: found assoctype " << at
+-            << "with swapped roles (A: " << pWidgetA->getName()
+-            << ", B: " << pWidgetB->getName() << ")" << endl;
++                      << "with swapped roles (A: " << pWidgetA->getName()
++                      << ", B: " << pWidgetB->getName() << ")" << endl;
+             return assoc;
+         }
+     }
+@@ -1246,21 +1246,25 @@
+     UMLListViewItem *lvItem = listView->findItem(m_nID);
+     if (lvItem == NULL) {
+         kdError() << msgPrefix
+-        << "listView->findUMLObject(this) returns false"
+-        << endl;
++                  << "listView->findUMLObject(this) returns false" << endl;
+         return false;
+     }
+     UMLListViewItem *parentItem = dynamic_cast<UMLListViewItem*>( lvItem->parent() );
+     if (parentItem == NULL) {
+         kdError() << msgPrefix
+-        << "parent item in listview is not a UMLListViewItem (?)"
+-        << endl;
++                  << "parent item in listview is not a UMLListViewItem (?)" << endl;
+         return false;
+     }
+     const Uml::ListView_Type lvt = parentItem->getType();
+     if (! UMLListView::typeIsFolder(lvt))
+         return false;
+-    QString folderFile = parentItem->getFolderFile();
++    UMLFolder *modelFolder = dynamic_cast<UMLFolder*>(parentItem->getUMLObject());
++    if (modelFolder == NULL) {
++        kdError() << msgPrefix
++                  << "parent model object is not a UMLFolder (?)" << endl;
++        return false;
++    }
++    QString folderFile = modelFolder->getFolderFile();
+     return !folderFile.isEmpty();
+ }
+ 
+@@ -1542,8 +1546,8 @@
+                 name = ft->getDisplayText();
+         }
+         kdDebug() << "UMLView::addWidget (" << name << " type="
+-        << pWidget->getBaseType() << "): position (" << wX << ","
+-        << wY << ") is out of range" << endl;
++                  << pWidget->getBaseType() << "): position (" << wX << ","
++                  << wY << ") is out of range" << endl;
+         if (xIsOutOfRange) {
+             pWidget->setX(0);
+             wX = 0;
+@@ -1584,7 +1588,7 @@
+             UMLObject * pObject = m_pDoc -> findObjectById( newID );
+             if( !pObject ) {
+                 kdDebug() << "addWidget: Can't find UMLObject for id "
+-                << ID2STR(newID) << endl;
++                          << ID2STR(newID) << endl;
+                 return false;
+             }
+             pWidget -> setUMLObject( pObject );
+@@ -1630,7 +1634,7 @@
+             Uml::IDType newWBID = m_pIDChangesLog ->findNewID( wbID );
+             if( newWAID == Uml::id_None || newWBID == Uml::id_None ) {
+                 kdDebug() << "Error with ids : " << ID2STR(newWAID)
+-                << " " << ID2STR(newWBID) << endl;
++                          << " " << ID2STR(newWBID) << endl;
+                 return false;
+             }
+             // Assumption here is that the A/B objectwidgets and the textwidget
+@@ -1641,7 +1645,7 @@
+             if (ft == NULL)
+                 kdDebug() << "UMLView::addWidget: FloatingTextWidget of Message is NULL" << endl;
+             else if (ft->getID() == Uml::id_None)
+-                ft->setID( m_pDoc->getUniqueID() );
++                ft->setID( UniqueID::gen() );
+             else {
+                 Uml::IDType newTextID = m_pDoc->assignNewID( ft->getID() );
+                 ft->setID( newTextID );
+@@ -1748,7 +1752,7 @@
+     if( !isPasteOperation &&
+             !AssocRules::allowAssociation(pAssoc->getAssocType(), m_pWidgetA, m_pWidgetB, false) ) {
+         kdWarning() << "UMLView::addAssociation: allowAssociation returns false "
+-        << "for AssocType " << pAssoc->getAssocType() << endl;
++                    << "for AssocType " << pAssoc->getAssocType() << endl;
+         return false;
+     }
+ 
+@@ -1854,13 +1858,12 @@
+         UMLObject *objToBeMoved = a->getWidget(B)->getUMLObject();
+         if (objToBeMoved != NULL) {
+             UMLListView *lv = UMLApp::app()->getListView();
+-            Object_Type ot = objToBeMoved->getBaseType();
+             lv->moveObject( objToBeMoved->getID(),
+-                            UMLListView::convert_OT_LVT(ot),
++                            UMLListView::convert_OT_LVT(objToBeMoved),
+                             lv->theLogicalView() );
+         } else {
+             kdDebug() << "removeAssocInViewAndDoc(containment): "
+-            << "objB is NULL" << endl;
++                      << "objB is NULL" << endl;
+         }
+     } else {
+         // Remove assoc in doc.
+@@ -1937,9 +1940,8 @@
+             UMLObject *objToBeMoved = widgetB->getUMLObject();
+             if (newContainer && objToBeMoved) {
+                 UMLListViewItem *newLVParent = lv->findUMLObject(newContainer);
+-                Object_Type ot = objToBeMoved->getBaseType();
+                 lv->moveObject( objToBeMoved->getID(),
+-                                UMLListView::convert_OT_LVT(ot),
++                                UMLListView::convert_OT_LVT(objToBeMoved),
+                                 newLVParent );
+             }
+         }
+@@ -2219,13 +2221,13 @@
+         UMLObject *roleAObj = assoc->getObject(A);
+         if (roleAObj == NULL) {
+             kdDebug() << "createAutoAssociations: roleA object is NULL at UMLAssoc "
+-            << ID2STR(assoc->getID()) << endl;
++                      << ID2STR(assoc->getID()) << endl;
+             continue;
+         }
+         UMLObject *roleBObj = assoc->getObject(B);
+         if (roleBObj == NULL) {
+             kdDebug() << "createAutoAssociations: roleB object is NULL at UMLAssoc "
+-            << ID2STR(assoc->getID()) << endl;
++                      << ID2STR(assoc->getID()) << endl;
+             continue;
+         }
+         if (roleAObj->getID() == myID) {
+@@ -2234,8 +2236,8 @@
+             other = static_cast<UMLCanvasObject*>(roleAObj);
+         } else {
+             kdDebug() << "createAutoAssociations: Can't find own object "
+-            << ID2STR(myID) << " in UMLAssoc "
+-            << ID2STR(assoc->getID()) << endl;
++                      << ID2STR(myID) << " in UMLAssoc "
++                      << ID2STR(assoc->getID()) << endl;
+             continue;
+         }
+         // Now that we have determined the "other" UMLObject, seek it in
+@@ -2270,7 +2272,7 @@
+         // Check that the assoc is allowed.
+         if (!AssocRules::allowAssociation(assocType, widgetA, widgetB, false)) {
+             kdDebug() << "createAutoAssociations: not transferring assoc "
+-            << "of type " << assocType << endl;
++                      << "of type " << assocType << endl;
+             continue;
+         }
+         // Create the AssociationWidget.
+@@ -2294,7 +2296,7 @@
+     if (t == ot_Package || t == ot_Class || t == ot_Interface || t == ot_Component) {
+         // for each of the object's containedObjects
+         UMLPackage *umlPkg = static_cast<UMLPackage*>(umlObj);
+-        UMLObjectList& lst = umlPkg->containedObjects();
++        UMLObjectList lst = umlPkg->containedObjects();
+         for (UMLObject *obj = lst.first(); obj; obj = lst.next()) {
+             // if the containedObject has a widget representation on this view then
+             Uml::IDType id = obj->getID();
+@@ -2634,7 +2636,7 @@
+             if(!FloatingTextWidget::isTextValid(ft->getText())) {
+                 delete ft;
+             } else {
+-                ft->setID(m_pDoc->getUniqueID());
++                ft->setID(UniqueID::gen());
+                 setupNewWidget(ft);
+             }
+         }
+@@ -3373,7 +3375,7 @@
+         if( id == Uml::id_None || !( o = m_pDoc->findObjectById(id)) )
+         {
+             kdError() << "UMLView::loadWidgetFromXMI: cannot find object with id "
+-            << ID2STR(id) << endl;
++                      << ID2STR(id) << endl;
+             return NULL;
+         }
+ 
+@@ -3439,8 +3441,7 @@
+                 m_WidgetList.append( ft );
+             else if (message->getSequenceMessageType() != sequence_message_creation)
+                 kdDebug() << "UMLView::loadMessagesFromXMI: ft is NULL"
+-                << " for message " << ID2STR(message->getID())
+-                << endl;
++                          << " for message " << ID2STR(message->getID()) << endl;
+         }
+         node = messageElement.nextSibling();
+         messageElement = node.toElement();
+@@ -3460,8 +3461,8 @@
+             AssociationWidget *assoc = new AssociationWidget(this);
+             if( !assoc->loadFromXMI( assocElement ) ) {
+                 kdError() << "couldn't loadFromXMI association widget:"
+-                << assoc << ", bad XMI file? Deleting from umlview."
+-                << endl;
++                          << assoc << ", bad XMI file? Deleting from umlview."
++                          << endl;
+                 delete assoc;
+                 /* return false;
+                    Returning false here is a little harsh when the
+@@ -3498,7 +3499,7 @@
+         QString tag = elem.tagName();
+         if (! Uml::tagEq(tag, "Presentation")) {
+             kdError() << "ignoring unknown UisDiagramPresentation tag "
+-            << tag << endl;
++                      << tag << endl;
+             continue;
+         }
+         QDomNode n = elem.firstChild();
+@@ -3525,7 +3526,7 @@
+                 idStr = melem.attribute("xmi.idref", "");
+             } else {
+                 kdDebug() << "UMLView::uisLoadFromXMI: ignoring tag "
+-                << tag << endl;
++                          << tag << endl;
+             }
+             n = n.nextSibling();
+             e = n.toElement();
+@@ -3534,11 +3535,10 @@
+         UMLObject *o = m_pDoc->findObjectById(id);
+         if (o == NULL) {
+             kdError() << "UMLView::uisLoadFromXMI: Cannot find object for id "
+-            << idStr << endl;
++                      << idStr << endl;
+         } else {
+             Uml::Object_Type ot = o->getBaseType();
+-            kdDebug() << "Create widget for model object of type "
+-            << ot << endl;
++            kdDebug() << "Create widget for model object of type " << ot << endl;
+             UMLWidget *widget = NULL;
+             switch (ot) {
+             case Uml::ot_Class:
+@@ -3563,7 +3563,7 @@
+                         m_AssociationList.append(aw);
+                     } else {
+                         kdError() << "cannot create assocwidget from ("
+-                        << wA << ", " << wB << ")" << endl;
++                                  << wA << ", " << wB << ")" << endl;
+                     }
+                     break;
+                 }
+@@ -3579,12 +3579,12 @@
+                 }
+             default:
+                 kdError() << "UMLView::uisLoadFromXMI: "
+-                << "Cannot create widget of type "
+-                << ot << endl;
++                          << "Cannot create widget of type "
++                          << ot << endl;
+             }
+             if (widget) {
+                 kdDebug() << "Widget: x=" << x << ", y=" << y
+-                << ", w=" << w << ", h=" << h << endl;
++                          << ", w=" << w << ", h=" << h << endl;
+                 widget->setX(x);
+                 widget->setY(y);
+                 widget->setSize(w, h);
+@@ -3614,7 +3614,7 @@
+             QString diagramStyle = elem.text();
+             if (diagramStyle != "ClassDiagram") {
+                 kdError() << "UMLView::uisLoadFromXMI: diagram style " << diagramStyle
+-                << " is not yet implemented" << endl;
++                          << " is not yet implemented" << endl;
+                 continue;
+             }
+             m_pDoc->setMainViewID(m_nID);
+@@ -3625,8 +3625,7 @@
+         } else if (tag == "uisDiagramPresentation") {
+             loadUisDiagramPresentation(elem);
+         } else if (tag != "uisToolName") {
+-            kdDebug() << "UMLView::uisLoadFromXMI: ignoring tag "
+-            << tag << endl;
++            kdDebug() << "UMLView::uisLoadFromXMI: ignoring tag " << tag << endl;
+         }
+     }
+     return true;
+--- umbrello/umbrello/uniqueid.h	(.../tags/KDE/3.5.4/kdesdk)	(revision 0)
++++ umbrello/umbrello/uniqueid.h	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -0,0 +1,50 @@
++/***************************************************************************
++ *                                                                         *
++ *   This program is free software; you can redistribute it and/or modify  *
++ *   it under the terms of the GNU General Public License as published by  *
++ *   the Free Software Foundation; either version 2 of the License, or     *
++ *   (at your option) any later version.                                   *
++ *                                                                         *
++ *   copyright (C) 2006                                                    *
++ *   Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>                 *
++ ***************************************************************************/
++
++#ifndef UNIQUEID_H
++#define UNIQUEID_H
++
++#include "umlnamespace.h"
++
++namespace UniqueID {
++
++    /**
++     * MAIN FUNCTION: Return a new unique ID.
++     */
++    Uml::IDType gen();
++
++
++    /////////// auxiliary functions ////////////////////////////////////
++    // Only required by code that does special operations on unique IDs.
++    // NB Try to avoid these functions if possible because their
++    // implementation and/or programming interface may change.
++
++    /**
++     * Reinitialize the unique ID counter.
++     * Should not normally be required because the ID counter is
++     * initialized by default anyway.
++     */
++    void init();
++
++    /**
++     * Return the last generated unique ID without generating a new one.
++     */
++    Uml::IDType get();
++
++    /**
++     * Explicitly set a new ID value.
++     */
++    void set(Uml::IDType id);
++
++}  // end namespace UniqueID
++
++#endif
++
+--- umbrello/AUTHORS	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/AUTHORS	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -1,5 +1,13 @@
+ Original author: Paul Hensgen <phensgen at sourceforge.net>
+ 
+-For other authors see
++Maintainer: Jonathan Riddell <jr @jriddell.org>
+ 
+-http://uml.sf.net/developers.php
++Main Devs, in roughly chronological order
++
++* Jonathan Riddell (many areas)
++* Sebastian Stein (many areas)
++* Luis de la Parra Blum (various widgets & visuals)
++* Andrew Sutton (umbrello2)
++* Brian Thomas (advanced code generators, associations, various)
++* Oliver Kellogg (many areas)
++
+--- umbrello/VERSION	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/VERSION	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -1 +1 @@
+-1.5.4
++1.5.5
+--- umbrello/ChangeLog	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/ChangeLog	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -1,3 +1,17 @@
++Version 1.5.5
++
++* Bugs/wishes from http://bugs.kde.org:
++* Java import - importing interfaces - absent visibility treated as package
++  instead of public (131327)
++* Python code generation not independent of diagram view (131790)
++* Java import - method parameter types not resolved correctly (131825)
++* Java import: unable to import AzareusCore (131961)
++* Java import: error on multidimensional arrays (132017)
++* Java import - array types not resolved correctly (132035)
++* Java import - "final" and comments in method declaration not parsed correctly (132174)
++* Java import: spaces in strings cause next member var to be ignored (132472)
++* Java import - static member vars ignored in interfaces (132657)
++
+ Version 1.5.4
+ 
+ * Bugs/wishes from http://bugs.kde.org:
+--- umbrello/THANKS	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/THANKS	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -20,6 +20,7 @@
+ Zoltan Bartko <bartko.zoltan @pobox.sk>
+ Luis De la Parra Blum <lparrab @gmx.net>
+ Raymond Bosman <bosman @hetnet.nl>
++Clarke Brunsdon <clarke @vossoc.org>
+ Ben Burton <bab @debian.org>
+ Albert Cervera <albertca @jazzfree.com>
+ Albert Astals Cid <tsdgeos @terra.es>
+--- umbrello/configure.in.in	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ umbrello/configure.in.in	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -41,3 +41,26 @@
+ dnl #endif
+ dnl ])
+ 
++
++AC_LANG_SAVE
++AC_LANG_C
++
++AC_CHECK_HEADER(libxml2/libxml/xmlmemory.h,
++  [have_libxml2=yes],
++  [have_libxml2=no])
++
++if test "$have_libxml2" = "no"; then
++  DO_NOT_COMPILE="$DO_NOT_COMPILE umbrello"
++fi
++
++AC_CHECK_HEADER(libxslt/xslt.h,
++  [have_libxslt=yes],
++  [have_libxslt=no])
++
++if test "$have_libxslt" = "no"; then
++  DO_NOT_COMPILE="$DO_NOT_COMPILE umbrello"
++fi
++
++AC_LANG_RESTORE
++
++
+--- scripts/add_trace.pl	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ scripts/add_trace.pl	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -77,7 +77,7 @@
+ 	  s/^.*\([\s]*//; # Remove everything before first '('
+ 	  s/\s*\)\s*:\s+.*$/,/; # Remove any ") : blah", replace with a ','
+ 	  s/\s*\).*\{\s*$/,/; # Remove anything after ')', replace with a ','
+-          s/ const / /g;
++          s/ const[&] / /g;
+ 	  #print STDERR "Args list : $_\n";
+ 	  @args = split( ",", $_ );
+ 	  foreach (@args)
+--- scripts/svn2dist	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ scripts/svn2dist	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -16,7 +16,7 @@
+ cmdline="$@"
+ 
+ returndir=`pwd`
+-override="README ChangeLog INSTALL AUTHORS AUTHOR COPYING COPYING.LIB TODO"
++override="README ChangeLog INSTALL AUTHORS AUTHOR COPYING COPYING.LIB TODO COPYING-DOCS"
+ remove="config.cache config.log config.status Makefile configure inst-apps CVS acinclude.m4 aclocal.m4 config.h config.h.bot config.h.in configure.files libtool stamp-h stamp-h.in stamp-h1 subdirs *.moc *.la .libs .deps .svn .cvsignore autom4te.cache {arch} .arch-ids *.lo *.o *.bbg *.da *.bb"
+ toplevelremove="configure.in.bot"
+ # whitespace seperated list of languages to never include.
+@@ -223,13 +223,9 @@
+ pofiles=""
+ 
+ for makefile in `find $directory -name Makefile.am`; do
+-    cat $makefile | while read line; do echo $line; done | perl -e '$mes=0; while (<STDIN>) { if (/^messages:/) { $mes=1; next; } if ($_ !~ m/^[^\t ]/) { $mes=0; } if ($mes && /\$\(XGETTEXT\)/ && / -o/) { s,.*-o \$\(podir\)/([a-z.-_]+).*$,$1, ; print "potfile=$_" }  }' > _tmppot
+-    potfile=
++    cat $makefile | while read line; do echo $line; done | perl -e '$mes=0; while (<STDIN>) { if (/^messages:/) { $mes=1; next; } if ($_ !~ m/^[^\t ]/) { $mes=0; } if ($mes && /\$\(XGETTEXT\)/ && / -o/) { s,.*-o \$\(podir\)/([a-z._-]+).*$,$1, ; chomp $_; $_ =~ s/\.pot/.po/; print "pofiles=\"$_ \$pofiles\"\n" }  }' > _tmppot
+     . _tmppot
+     rm -f _tmppot
+- 
+-    pofile=${potfile/.pot/.po}
+-    pofiles="$pofiles $pofile"
+ done
+ 
+ if [ -z $name ]; then
+--- COPYING-DOCS	(.../tags/KDE/3.5.4/kdesdk)	(revision 0)
++++ COPYING-DOCS	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -0,0 +1,397 @@
++		GNU Free Documentation License
++		  Version 1.2, November 2002
++
++
++ Copyright (C) 2000,2001,2002  Free Software Foundation, Inc.
++     51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
++ Everyone is permitted to copy and distribute verbatim copies
++ of this license document, but changing it is not allowed.
++
++
++0. PREAMBLE
++
++The purpose of this License is to make a manual, textbook, or other
++functional and useful document "free" in the sense of freedom: to
++assure everyone the effective freedom to copy and redistribute it,
++with or without modifying it, either commercially or noncommercially.
++Secondarily, this License preserves for the author and publisher a way
++to get credit for their work, while not being considered responsible
++for modifications made by others.
++
++This License is a kind of "copyleft", which means that derivative
++works of the document must themselves be free in the same sense.  It
++complements the GNU General Public License, which is a copyleft
++license designed for free software.
++
++We have designed this License in order to use it for manuals for free
++software, because free software needs free documentation: a free
++program should come with manuals providing the same freedoms that the
++software does.  But this License is not limited to software manuals;
++it can be used for any textual work, regardless of subject matter or
++whether it is published as a printed book.  We recommend this License
++principally for works whose purpose is instruction or reference.
++
++
++1. APPLICABILITY AND DEFINITIONS
++
++This License applies to any manual or other work, in any medium, that
++contains a notice placed by the copyright holder saying it can be
++distributed under the terms of this License.  Such a notice grants a
++world-wide, royalty-free license, unlimited in duration, to use that
++work under the conditions stated herein.  The "Document", below,
++refers to any such manual or work.  Any member of the public is a
++licensee, and is addressed as "you".  You accept the license if you
++copy, modify or distribute the work in a way requiring permission
++under copyright law.
++
++A "Modified Version" of the Document means any work containing the
++Document or a portion of it, either copied verbatim, or with
++modifications and/or translated into another language.
++
++A "Secondary Section" is a named appendix or a front-matter section of
++the Document that deals exclusively with the relationship of the
++publishers or authors of the Document to the Document's overall subject
++(or to related matters) and contains nothing that could fall directly
++within that overall subject.  (Thus, if the Document is in part a
++textbook of mathematics, a Secondary Section may not explain any
++mathematics.)  The relationship could be a matter of historical
++connection with the subject or with related matters, or of legal,
++commercial, philosophical, ethical or political position regarding
++them.
++
++The "Invariant Sections" are certain Secondary Sections whose titles
++are designated, as being those of Invariant Sections, in the notice
++that says that the Document is released under this License.  If a
++section does not fit the above definition of Secondary then it is not
++allowed to be designated as Invariant.  The Document may contain zero
++Invariant Sections.  If the Document does not identify any Invariant
++Sections then there are none.
++
++The "Cover Texts" are certain short passages of text that are listed,
++as Front-Cover Texts or Back-Cover Texts, in the notice that says that
++the Document is released under this License.  A Front-Cover Text may
++be at most 5 words, and a Back-Cover Text may be at most 25 words.
++
++A "Transparent" copy of the Document means a machine-readable copy,
++represented in a format whose specification is available to the
++general public, that is suitable for revising the document
++straightforwardly with generic text editors or (for images composed of
++pixels) generic paint programs or (for drawings) some widely available
++drawing editor, and that is suitable for input to text formatters or
++for automatic translation to a variety of formats suitable for input
++to text formatters.  A copy made in an otherwise Transparent file
++format whose markup, or absence of markup, has been arranged to thwart
++or discourage subsequent modification by readers is not Transparent.
++An image format is not Transparent if used for any substantial amount
++of text.  A copy that is not "Transparent" is called "Opaque".
++
++Examples of suitable formats for Transparent copies include plain
++ASCII without markup, Texinfo input format, LaTeX input format, SGML
++or XML using a publicly available DTD, and standard-conforming simple
++HTML, PostScript or PDF designed for human modification.  Examples of
++transparent image formats include PNG, XCF and JPG.  Opaque formats
++include proprietary formats that can be read and edited only by
++proprietary word processors, SGML or XML for which the DTD and/or
++processing tools are not generally available, and the
++machine-generated HTML, PostScript or PDF produced by some word
++processors for output purposes only.
++
++The "Title Page" means, for a printed book, the title page itself,
++plus such following pages as are needed to hold, legibly, the material
++this License requires to appear in the title page.  For works in
++formats which do not have any title page as such, "Title Page" means
++the text near the most prominent appearance of the work's title,
++preceding the beginning of the body of the text.
++
++A section "Entitled XYZ" means a named subunit of the Document whose
++title either is precisely XYZ or contains XYZ in parentheses following
++text that translates XYZ in another language.  (Here XYZ stands for a
++specific section name mentioned below, such as "Acknowledgements",
++"Dedications", "Endorsements", or "History".)  To "Preserve the Title"
++of such a section when you modify the Document means that it remains a
++section "Entitled XYZ" according to this definition.
++
++The Document may include Warranty Disclaimers next to the notice which
++states that this License applies to the Document.  These Warranty
++Disclaimers are considered to be included by reference in this
++License, but only as regards disclaiming warranties: any other
++implication that these Warranty Disclaimers may have is void and has
++no effect on the meaning of this License.
++
++
++2. VERBATIM COPYING
++
++You may copy and distribute the Document in any medium, either
++commercially or noncommercially, provided that this License, the
++copyright notices, and the license notice saying this License applies
++to the Document are reproduced in all copies, and that you add no other
++conditions whatsoever to those of this License.  You may not use
++technical measures to obstruct or control the reading or further
++copying of the copies you make or distribute.  However, you may accept
++compensation in exchange for copies.  If you distribute a large enough
++number of copies you must also follow the conditions in section 3.
++
++You may also lend copies, under the same conditions stated above, and
++you may publicly display copies.
++
++
++3. COPYING IN QUANTITY
++
++If you publish printed copies (or copies in media that commonly have
++printed covers) of the Document, numbering more than 100, and the
++Document's license notice requires Cover Texts, you must enclose the
++copies in covers that carry, clearly and legibly, all these Cover
++Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
++the back cover.  Both covers must also clearly and legibly identify
++you as the publisher of these copies.  The front cover must present
++the full title with all words of the title equally prominent and
++visible.  You may add other material on the covers in addition.
++Copying with changes limited to the covers, as long as they preserve
++the title of the Document and satisfy these conditions, can be treated
++as verbatim copying in other respects.
++
++If the required texts for either cover are too voluminous to fit
++legibly, you should put the first ones listed (as many as fit
++reasonably) on the actual cover, and continue the rest onto adjacent
++pages.
++
++If you publish or distribute Opaque copies of the Document numbering
++more than 100, you must either include a machine-readable Transparent
++copy along with each Opaque copy, or state in or with each Opaque copy
++a computer-network location from which the general network-using
++public has access to download using public-standard network protocols
++a complete Transparent copy of the Document, free of added material.
++If you use the latter option, you must take reasonably prudent steps,
++when you begin distribution of Opaque copies in quantity, to ensure
++that this Transparent copy will remain thus accessible at the stated
++location until at least one year after the last time you distribute an
++Opaque copy (directly or through your agents or retailers) of that
++edition to the public.
++
++It is requested, but not required, that you contact the authors of the
++Document well before redistributing any large number of copies, to give
++them a chance to provide you with an updated version of the Document.
++
++
++4. MODIFICATIONS
++
++You may copy and distribute a Modified Version of the Document under
++the conditions of sections 2 and 3 above, provided that you release
++the Modified Version under precisely this License, with the Modified
++Version filling the role of the Document, thus licensing distribution
++and modification of the Modified Version to whoever possesses a copy
++of it.  In addition, you must do these things in the Modified Version:
++
++A. Use in the Title Page (and on the covers, if any) a title distinct
++   from that of the Document, and from those of previous versions
++   (which should, if there were any, be listed in the History section
++   of the Document).  You may use the same title as a previous version
++   if the original publisher of that version gives permission.
++B. List on the Title Page, as authors, one or more persons or entities
++   responsible for authorship of the modifications in the Modified
++   Version, together with at least five of the principal authors of the
++   Document (all of its principal authors, if it has fewer than five),
++   unless they release you from this requirement.
++C. State on the Title page the name of the publisher of the
++   Modified Version, as the publisher.
++D. Preserve all the copyright notices of the Document.
++E. Add an appropriate copyright notice for your modifications
++   adjacent to the other copyright notices.
++F. Include, immediately after the copyright notices, a license notice
++   giving the public permission to use the Modified Version under the
++   terms of this License, in the form shown in the Addendum below.
++G. Preserve in that license notice the full lists of Invariant Sections
++   and required Cover Texts given in the Document's license notice.
++H. Include an unaltered copy of this License.
++I. Preserve the section Entitled "History", Preserve its Title, and add
++   to it an item stating at least the title, year, new authors, and
++   publisher of the Modified Version as given on the Title Page.  If
++   there is no section Entitled "History" in the Document, create one
++   stating the title, year, authors, and publisher of the Document as
++   given on its Title Page, then add an item describing the Modified
++   Version as stated in the previous sentence.
++J. Preserve the network location, if any, given in the Document for
++   public access to a Transparent copy of the Document, and likewise
++   the network locations given in the Document for previous versions
++   it was based on.  These may be placed in the "History" section.
++   You may omit a network location for a work that was published at
++   least four years before the Document itself, or if the original
++   publisher of the version it refers to gives permission.
++K. For any section Entitled "Acknowledgements" or "Dedications",
++   Preserve the Title of the section, and preserve in the section all
++   the substance and tone of each of the contributor acknowledgements
++   and/or dedications given therein.
++L. Preserve all the Invariant Sections of the Document,
++   unaltered in their text and in their titles.  Section numbers
++   or the equivalent are not considered part of the section titles.
++M. Delete any section Entitled "Endorsements".  Such a section
++   may not be included in the Modified Version.
++N. Do not retitle any existing section to be Entitled "Endorsements"
++   or to conflict in title with any Invariant Section.
++O. Preserve any Warranty Disclaimers.
++
++If the Modified Version includes new front-matter sections or
++appendices that qualify as Secondary Sections and contain no material
++copied from the Document, you may at your option designate some or all
++of these sections as invariant.  To do this, add their titles to the
++list of Invariant Sections in the Modified Version's license notice.
++These titles must be distinct from any other section titles.
++
++You may add a section Entitled "Endorsements", provided it contains
++nothing but endorsements of your Modified Version by various
++parties--for example, statements of peer review or that the text has
++been approved by an organization as the authoritative definition of a
++standard.
++
++You may add a passage of up to five words as a Front-Cover Text, and a
++passage of up to 25 words as a Back-Cover Text, to the end of the list
++of Cover Texts in the Modified Version.  Only one passage of
++Front-Cover Text and one of Back-Cover Text may be added by (or
++through arrangements made by) any one entity.  If the Document already
++includes a cover text for the same cover, previously added by you or
++by arrangement made by the same entity you are acting on behalf of,
++you may not add another; but you may replace the old one, on explicit
++permission from the previous publisher that added the old one.
++
++The author(s) and publisher(s) of the Document do not by this License
++give permission to use their names for publicity for or to assert or
++imply endorsement of any Modified Version.
++
++
++5. COMBINING DOCUMENTS
++
++You may combine the Document with other documents released under this
++License, under the terms defined in section 4 above for modified
++versions, provided that you include in the combination all of the
++Invariant Sections of all of the original documents, unmodified, and
++list them all as Invariant Sections of your combined work in its
++license notice, and that you preserve all their Warranty Disclaimers.
++
++The combined work need only contain one copy of this License, and
++multiple identical Invariant Sections may be replaced with a single
++copy.  If there are multiple Invariant Sections with the same name but
++different contents, make the title of each such section unique by
++adding at the end of it, in parentheses, the name of the original
++author or publisher of that section if known, or else a unique number.
++Make the same adjustment to the section titles in the list of
++Invariant Sections in the license notice of the combined work.
++
++In the combination, you must combine any sections Entitled "History"
++in the various original documents, forming one section Entitled
++"History"; likewise combine any sections Entitled "Acknowledgements",
++and any sections Entitled "Dedications".  You must delete all sections
++Entitled "Endorsements".
++
++
++6. COLLECTIONS OF DOCUMENTS
++
++You may make a collection consisting of the Document and other documents
++released under this License, and replace the individual copies of this
++License in the various documents with a single copy that is included in
++the collection, provided that you follow the rules of this License for
++verbatim copying of each of the documents in all other respects.
++
++You may extract a single document from such a collection, and distribute
++it individually under this License, provided you insert a copy of this
++License into the extracted document, and follow this License in all
++other respects regarding verbatim copying of that document.
++
++
++7. AGGREGATION WITH INDEPENDENT WORKS
++
++A compilation of the Document or its derivatives with other separate
++and independent documents or works, in or on a volume of a storage or
++distribution medium, is called an "aggregate" if the copyright
++resulting from the compilation is not used to limit the legal rights
++of the compilation's users beyond what the individual works permit.
++When the Document is included in an aggregate, this License does not
++apply to the other works in the aggregate which are not themselves
++derivative works of the Document.
++
++If the Cover Text requirement of section 3 is applicable to these
++copies of the Document, then if the Document is less than one half of
++the entire aggregate, the Document's Cover Texts may be placed on
++covers that bracket the Document within the aggregate, or the
++electronic equivalent of covers if the Document is in electronic form.
++Otherwise they must appear on printed covers that bracket the whole
++aggregate.
++
++
++8. TRANSLATION
++
++Translation is considered a kind of modification, so you may
++distribute translations of the Document under the terms of section 4.
++Replacing Invariant Sections with translations requires special
++permission from their copyright holders, but you may include
++translations of some or all Invariant Sections in addition to the
++original versions of these Invariant Sections.  You may include a
++translation of this License, and all the license notices in the
++Document, and any Warranty Disclaimers, provided that you also include
++the original English version of this License and the original versions
++of those notices and disclaimers.  In case of a disagreement between
++the translation and the original version of this License or a notice
++or disclaimer, the original version will prevail.
++
++If a section in the Document is Entitled "Acknowledgements",
++"Dedications", or "History", the requirement (section 4) to Preserve
++its Title (section 1) will typically require changing the actual
++title.
++
++
++9. TERMINATION
++
++You may not copy, modify, sublicense, or distribute the Document except
++as expressly provided for under this License.  Any other attempt to
++copy, modify, sublicense or distribute the Document is void, and will
++automatically terminate your rights under this License.  However,
++parties who have received copies, or rights, from you under this
++License will not have their licenses terminated so long as such
++parties remain in full compliance.
++
++
++10. FUTURE REVISIONS OF THIS LICENSE
++
++The Free Software Foundation may publish new, revised versions
++of the GNU Free Documentation License from time to time.  Such new
++versions will be similar in spirit to the present version, but may
++differ in detail to address new problems or concerns.  See
++http://www.gnu.org/copyleft/.
++
++Each version of the License is given a distinguishing version number.
++If the Document specifies that a particular numbered version of this
++License "or any later version" applies to it, you have the option of
++following the terms and conditions either of that specified version or
++of any later version that has been published (not as a draft) by the
++Free Software Foundation.  If the Document does not specify a version
++number of this License, you may choose any version ever published (not
++as a draft) by the Free Software Foundation.
++
++
++ADDENDUM: How to use this License for your documents
++
++To use this License in a document you have written, include a copy of
++the License in the document and put the following copyright and
++license notices just after the title page:
++
++    Copyright (c)  YEAR  YOUR NAME.
++    Permission is granted to copy, distribute and/or modify this document
++    under the terms of the GNU Free Documentation License, Version 1.2
++    or any later version published by the Free Software Foundation;
++    with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
++    A copy of the license is included in the section entitled "GNU
++    Free Documentation License".
++
++If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
++replace the "with...Texts." line with this:
++
++    with the Invariant Sections being LIST THEIR TITLES, with the
++    Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
++
++If you have Invariant Sections without Cover Texts, or some other
++combination of the three, merge those two alternatives to suit the
++situation.
++
++If your document contains nontrivial examples of program code, we
++recommend releasing these examples in parallel under your choice of
++free software license, such as the GNU General Public License,
++to permit their use in free software.
+--- kompare/kompare.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kompare/kompare.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -26,6 +26,7 @@
+ GenericName[es]=Interfaz Diff/Patch
+ GenericName[et]=Diff/patch kasutajaliides
+ GenericName[eu]=Desberdintasun/Adabaki interfazea
++GenericName[fa]=پایانه Diff/کژنه
+ GenericName[fi]=Diff/Patch-käyttöliittymä
+ GenericName[fr]=Interface graphique pour Diff et Patch
+ GenericName[ga]=Comhéadan Diff/Patch
+@@ -39,7 +40,7 @@
+ GenericName[lt]=Diff/Patch naudotojo sÄ…saja
+ GenericName[lv]=Diff/Patch Frontends
+ GenericName[ms]=Bahagian Depan Beza/Tampal
+-GenericName[nb]=Endrings-/lappeprogram
++GenericName[nb]=Diff-/Patch-grensesnitt
+ GenericName[nds]=Böversiet för "diff" un "patch"
+ GenericName[nl]=Diff/Patch-hulpprogramma
+ GenericName[nn]=Diff-/Patch-grensesnitt
+--- kdeaccounts-plugin/kdeaccountsplugin.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kdeaccounts-plugin/kdeaccountsplugin.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -9,6 +9,7 @@
+ Name[es]=Cuentas del repositorio de KDE
+ Name[et]=KDE hoidla kontod
+ Name[eu]=KDE-ren biltegiaren kontuak
++Name[fa]=حسابهای انبار KDE
+ Name[fi]=KDE:n versionhallinnan käyttäjätunnukset
+ Name[fr]=Comptes du référentiel de KDE
+ Name[hu]=KDE SVN-azonosítók
+@@ -16,9 +17,10 @@
+ Name[it]=Account del deposito di KDE
+ Name[ja]=KDE レポジトリアカウント
+ Name[lt]=KDE saugyklos paskyros
+-Name[nb]=KDE arkiv-kontoer
++Name[nb]=KDE-lagerkontoer
+ Name[nds]=KDE-Archivkontos
+ Name[nl]=KDE Repository gebruikersnamen
++Name[nn]=KDE-lagerkontoar
+ Name[pa]=KDE ਰਿਪੋਜ਼ਟਰੀ ਖਾਤੇ
+ Name[pl]=Konta w repozytorium KDE
+ Name[pt]=Contas do Repositório do KDE
+--- scheck/scheck.themerc	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ scheck/scheck.themerc	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -15,6 +15,7 @@
+ Comment[es]=Estilo de desarrollo para buscar conflictos de accesos rápidos y guías de estilo
+ Comment[et]=Arendusstiil kiirklahvi- ja stiilijuhendi konfliktide leidmiseks
+ Comment[eu]=Bizkortzaile eta estilo-gida gatazken bilaketarako garapen estiloa
++Comment[fa]=سبک پیشرفته برای جستجوی شتاب ده و ناسازگاریهای راهنمای سبک
+ Comment[fi]=Kehitystyyli pikanäppäinten ja tyylioppaan ristiriitojen etsimiseen
+ Comment[fr]=Style de développement pour la recherche de conflits d'accélérateurs et guide de style
+ Comment[hi]=त्वरक खोज तथा स्टाइल गाइड कान्फ्लिक्ट्स के लिए डेवलपमेंट शैली
+@@ -23,9 +24,10 @@
+ Comment[it]=Stile di sviluppo per cercare conflitti nei tasti acceleratori e negli stili
+ Comment[ja]=検索アクセラレータとスタイルガイド衝突のための開発
+ Comment[ms]=Gaya pembangunan untuk cari pintasan dan gaya pengurusan konflik
+-Comment[nb]=Utviklingsstil for å finne konflikter mellom hurtigtaster og retningslinjene
++Comment[nb]=Utviklingsstil for å finne konflikter med retningslinjene og mellom snarveistaster
+ Comment[nds]=Stil för't Finnen vun Tastkombinatschoon- un Stilregel-Problemen
+ Comment[nl]=Ontwikkelstijl voor het zoeken naar sneltoets- en stijlgidsconflicten
++Comment[nn]=Utviklingsstil for å finna konfliktar med retningslinjene og mellom snarvegstastar
+ Comment[pl]=Styl programistyczny do wyszukiwania konfliktów klawiszy skrótu i prowadzenia stylu
+ Comment[pt]=Estilo de desenvolvimento para procurar conflitos de aceleradores e de guias de estilo
+ Comment[pt_BR]=Estilo de desenvolvimento para procurar conflitos de aceleradores e guias de estilo
+--- kcachegrind/kcachegrind/kcachegrind.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kcachegrind/kcachegrind/kcachegrind.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -22,6 +22,7 @@
+ GenericName[es]=Interfaz de Profiler
+ GenericName[et]=Profileerimisrakendus
+ GenericName[eu]=Profilatzailearen interfazea
++GenericName[fa]=پایانه گزارش‌گیر
+ GenericName[fi]=Profiloijan käyttöliittymä
+ GenericName[fr]=Interface de profilage
+ GenericName[ga]=Comhéadan ar Phróifíleoir
+@@ -34,6 +35,7 @@
+ GenericName[nb]=Grensesnitt for profilvisning
+ GenericName[nds]=Profiler-Böversiet
+ GenericName[nl]=Profiler-hulpprogramma
++GenericName[nn]=Grensesnitt for profilvising
+ GenericName[pa]=ਪਰੋਫਾਇਲਰ ਮੁੱਖ ਭੂਮੀ
+ GenericName[pl]=Interfejs do profilera
+ GenericName[pt]=Interface de Profiler
+@@ -61,6 +63,7 @@
+ Comment[es]=Visualización de datos de análisis de rendimiento
+ Comment[et]=Jõudluse profileerimise andmete visualiseerimise vahend
+ Comment[eu]=Errendimendu profil datuen bistaratzea
++Comment[fa]=تجسم کارایی گزارش داده‌ها
+ Comment[fi]=Visualisointi tehokkuusprofiloinnin tiedoista
+ Comment[fr]=Visualisation des données de performance de profilage
+ Comment[hi]=परफार्मेस प्रोफाइलिंग डाटा का विजुअलाइज़ेशन
+@@ -71,6 +74,7 @@
+ Comment[nb]=Vis informasjon om ytelse.
+ Comment[nds]=Visualiseren vun Programmleisten-Looptietdaten
+ Comment[nl]=Visualisatie van Performance Profiling Data
++Comment[nn]=Vis informasjon om yting
+ Comment[pl]=Wizualizacja danych profilowania wydajności
+ Comment[pt]=Visualização dos Dados de Análise de Performance
+ Comment[pt_BR]=Visualização de Dados de Perfil de Desempenho
+--- kcachegrind/kcachegrind/x-kcachegrind.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kcachegrind/kcachegrind/x-kcachegrind.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -10,6 +10,7 @@
+ Comment[es]=Resultado de análisis de Cachegrind/Callgring
+ Comment[et]=Cachegrind/Callgrind profileerimistõmmis
+ Comment[eu]=Cachegrind/Callgrind profil iraulketa
++Comment[fa]=تخلیه Profile Cachegrind/Callgrind
+ Comment[fi]=Cachegrind/Callgrind-profiilivedos
+ Comment[fr]=Dépôt de profil Cachegrind / Callgrind
+ Comment[hi]=केश-ग्रिंड/काल-ग्रिंड प्रोफ़ाइल डम्प
+@@ -19,6 +20,7 @@
+ Comment[ja]=Callgrind/Callgrind プロファイルダンプ
+ Comment[nds]=Cachegrind/Callgrind-Profilutgaav
+ Comment[nl]=Cachegrind/Callgrind Profieldump
++Comment[nn]=Cachegrind/Callgrind-profildump
+ Comment[pl]=Zrzut profilowania Cachegrind/Callgrind
+ Comment[pt]=Resultado da Análise do Cachegrind/Callgrind
+ Comment[pt_BR]=Depósito de Perfil Cachegrind/Callgrind
+--- cervisia/ChangeLog	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ cervisia/ChangeLog	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -1,3 +1,8 @@
++2006-08-12  André Wöbbeking  <Woebbeking at web.de>
++
++	* Fix BR #131695:
++	  Broken repository locations don't crash cvsservice anymore.
++
+ 2005-08-03  Christian Loose <christian.loose at kdemail.net>
+ 
+ 	* Implemented wish #92938:
+--- cervisia/cervisia.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ cervisia/cervisia.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -14,6 +14,7 @@
+ GenericName[es]=Interfaz CVS
+ GenericName[et]=CVSi kasutajaliides
+ GenericName[eu]=CVS interfazea
++GenericName[fa]=پایانه CVS
+ GenericName[fi]=Käyttöliittymä CVS:lle
+ GenericName[fr]=Interface graphique pour CVS
+ GenericName[ga]=Comhéadan ar CVS
+--- cervisia/eventsrc	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ cervisia/eventsrc	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -13,6 +13,7 @@
+ Name[es]=Entrega al CVS completada
+ Name[et]=CVS sissekanne tehtud
+ Name[eu]=CVS aldaketak egin dira
++Name[fa]=کار تصدیق CVS انجام شد
+ Name[fi]=CVS-toimitustyö tehty
+ Name[fr]=Validation CVS effectuée
+ Name[ga]=Athruithe curtha i bhfeidhm ag CVS
+@@ -21,9 +22,10 @@
+ Name[it]=Processo di consegna a CVS eseguito
+ Name[ja]=CVS コミットは終了しました。
+ Name[lt]=CVS įkėlimo veiksmas atliktas
+-Name[nb]=CVS commit jobb er gjort
++Name[nb]=CVS-innmeldingsjobb er gjort
+ Name[nds]=CVS-Inspeelopgaav is fardig
+ Name[nl]=CVS vastleggen (commit) voltooid
++Name[nn]=CVS-innmeldingsjobb er gjort
+ Name[pa]=CVS ਕਮਿਟ ਕੰਮ ਮੁਕੰਮਲ
+ Name[pl]=Wysyłanie do repozytorium CVS zakończone
+ Name[pt]=Trabalho de 'commit' de CVS terminado
+@@ -48,6 +50,7 @@
+ Comment[es]=Se ha completado una entrega al CVS
+ Comment[et]=CVS sissekanne tehtud
+ Comment[eu]=CVS aldaketa egin da
++Comment[fa]=یک کار تصدیق CVS انجام می‌شود.
+ Comment[fi]=CVS-toimitustyö on tehty
+ Comment[fr]=Une validation CVS a été effectué
+ Comment[ga]=Athruithe curtha i bhfeidhm ag CVS
+@@ -56,9 +59,10 @@
+ Comment[it]=Un processo di deposito su CVS è stato eseguito
+ Comment[ja]=CVS コミットは終了しました。
+ Comment[lt]=CVS įkėlimo veiksmas atliktas
+-Comment[nb]=En CVS commit jobb er gjort
++Comment[nb]=En CVS-innmeldingsjobb er utført
+ Comment[nds]=En CVS-Inspeelopgaav is fardig
+ Comment[nl]=Het vastleggen in CVS (commit) is voltooid
++Comment[nn]=Ein CVS-innmeldingsjobb er gjort
+ Comment[pa]=ਇੱਕ CVS ਕਮਿਟ ਕੰਮ ਖਤਮ ਹੋਇਆ
+ Comment[pl]=Wysyłanie do repozytorium CVS zostało zakończone
+ Comment[pt]=Um trabalho de 'commit' de CVS terminou
+--- cervisia/cvsservice/cvsservice.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ cervisia/cvsservice/cvsservice.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -39,6 +39,7 @@
+ Comment[es]=Un servicio DCOP que proporciona un interfaz para cvs
+ Comment[et]=CVSi DCOP liidese teenus
+ Comment[eu]=cvs-rako interfazea eskeintzen duen DCOP zerbitzua
++Comment[fa]=یک خدمت DCOP که واسطی را برای cvs فراهم می‌کند
+ Comment[fi]=DCOP-palvelu, joka tarjoaa rajapinnan cvs:lle
+ Comment[fr]=Un service DCOP qui fournit une interface à CVS
+ Comment[hi]=एक डीकॉप सर्विस जो सीवीएस को इंटरफेस प्रदान करता है
+@@ -50,6 +51,7 @@
+ Comment[nb]=En DCOP-tjeneste som tilbyr et grensesnitt mot cvs
+ Comment[nds]=En DCOP-Deenst, wat en Koppelsteed na CVS praatstellt
+ Comment[nl]=Een DCOP-dienst die een interface naar cvs biedt
++Comment[nn]=Ei DCOP-teneste som tilbyr eit grensesnitt mot CVS
+ Comment[pl]=Usługa DCOP pozwalająca na dostęp do CVS
+ Comment[pt]=Um serviço de DCOP que oferece uma interface para o CVS
+ Comment[pt_BR]=Um serviço DCOP que provê uma interface para o cvs
+--- cervisia/cvsservice/repository.cpp	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ cervisia/cvsservice/repository.cpp	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -227,15 +227,17 @@
+     if( !config->hasGroup(repositoryGroup) )
+     {
+         // find the position of the first path separator
+-        int insertPos = repositoryGroup.find('/');
+-        
+-        // add port to location
+-        // (1) :pserver:user at hostname.com:/path
+-        if( repositoryGroup.at(insertPos) == ':' )
+-            repositoryGroup.insert(insertPos, "2401");
+-        // (2) :pserver:user at hostname.com/path
+-        else
+-            repositoryGroup.insert(insertPos, ":2401");            
++        const int insertPos = repositoryGroup.find('/');
++        if( insertPos > 0 )
++        {
++            // add port to location
++            // (1) :pserver:user at hostname.com:/path
++            if( repositoryGroup.at(insertPos - 1) == ':' )
++                repositoryGroup.insert(insertPos, "2401");
++            // (2) :pserver:user at hostname.com/path
++            else
++                repositoryGroup.insert(insertPos, ":2401");
++        }
+     }
+ 
+     config->setGroup(repositoryGroup);
+--- kfile-plugins/ts/kfile_ts.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kfile-plugins/ts/kfile_ts.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -13,6 +13,7 @@
+ Name[es]=Información de archivo de Qt Linguist
+ Name[et]=Qt Linguisti faili info
+ Name[eu]=Qt Linguist fitxategi informazioa
++Name[fa]=اطلاعات پرونده زبان‌شناس Qt
+ Name[fi]=Qt Linquist -tiedoston tiedot
+ Name[fr]=Fichier d'informations Qt Linguist
+ Name[ga]=Eolas faoi Chomhad Qt Linguist
+@@ -22,9 +23,10 @@
+ Name[it]=Informazioni file per Qt Linguist
+ Name[ja]=Qt Linguist ファイル情報
+ Name[lt]=Qt Linguist bylos informacija
+-Name[nb]=Qt Linguist filinformasjon
++Name[nb]=Informasjon om Qt Linguist-fil
+ Name[nds]=QtLinguist-Datei-Info
+ Name[nl]=Qt Linquïst-bestandsinformatie
++Name[nn]=Informasjon om Qt Linguist-fil
+ Name[pa]=Qt Linguist ਫਾਇਲ ਜਾਣਕਾਰੀ
+ Name[pl]=Informacja pliku Qt Linguist
+ Name[pt]=Informação do Ficheiro do Qt Linguist
+--- kfile-plugins/c++/kfile_cpp.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kfile-plugins/c++/kfile_cpp.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -15,6 +15,7 @@
+ Name[es]=Info de C++
+ Name[et]=C++ info
+ Name[eu]=C++ informazioa
++Name[fa]=اطلاعات C++
+ Name[fi]=C++-tiedot
+ Name[fo]=C++-upplýsingar
+ Name[fr]=Informations C++
+--- kfile-plugins/c++/kfile_h.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kfile-plugins/c++/kfile_h.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -14,6 +14,7 @@
+ Name[es]=Info de cabecera C/C++
+ Name[et]=C/C++ päise info
+ Name[eu]=C/C++ goiburuen informazioa
++Name[fa]=اطلاعات سرآیند C/C++
+ Name[fi]=C/C++-otsikkotiedot
+ Name[fr]=Informations d'en-tête C/C++
+ Name[he]=מידע כותרות ++C/C
+--- kfile-plugins/diff/kfile_diff.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kfile-plugins/diff/kfile_diff.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -15,6 +15,7 @@
+ Name[es]=Estadísticas Diff
+ Name[et]=Võrdlemise tulemused
+ Name[eu]=Desberdintasun estatistikak
++Name[fa]=آمارهای Diff
+ Name[fi]=Diff-tilastot
+ Name[fr]=Statistiques de diff
+ Name[ga]=Staitistic Diff
+@@ -26,6 +27,7 @@
+ Name[ja]=Diff 統計
+ Name[lt]=Skirtumų statistika
+ Name[ms]=Stat Diff
++Name[nb]=Diff-statistikk
+ Name[nds]=Verscheelstatistiken
+ Name[nl]=Diff-statistieken
+ Name[nn]=Diff-statistikk
+--- kuiviewer/kuiviewer.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kuiviewer/kuiviewer.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -21,6 +21,7 @@
+ GenericName[es]=Visor de archivos UI de Qt Designer
+ GenericName[et]=Qt Designeri UI-failide näitaja
+ GenericName[eu]=Qt Designer UI fitxartegi ikusgailua
++GenericName[fa]=مشاهده‌گر پرونده واسط نگاره‌ای طراح Qt
+ GenericName[fi]=Qt Designerin UI-tiedostojen katselin
+ GenericName[fr]=Afficheur de fichiers UI de QT Designer
+ GenericName[hu]=Qt Designer UI-fájlnézegető
+@@ -31,6 +32,7 @@
+ GenericName[nb]=Qt Designer UI-filviser
+ GenericName[nds]=Kieker för Qt-Designer sien UI-Dateien
+ GenericName[nl]=Weergave van QT Designer UI-bestanden
++GenericName[nn]=Qt Designer UI-filvisar
+ GenericName[pl]=Przeglądarka plików interfejsu użytkownika Qt Designera
+ GenericName[pt]=Visualizador de Ficheiros UI do Qt Designer
+ GenericName[pt_BR]=Visualizador de Arquivos e Interface do Qt Designer
+--- kuiviewer/designerthumbnail.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kuiviewer/designerthumbnail.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -14,6 +14,7 @@
+ Name[es]=Archivos de Qt Designer
+ Name[et]=Qt Designeri failid
+ Name[eu]=Qt Designer fitxategiak
++Name[fa]=پرونده‌های طراح Qt
+ Name[fi]=Qt Designer -tiedostot
+ Name[fr]=Fichiers Qt Designer
+ Name[ga]=Comhaid Qt Designer
+@@ -26,6 +27,7 @@
+ Name[nb]=Qt Designer-filer
+ Name[nds]=Qt-Designer-Dateien
+ Name[nl]=Qt Designer-bestanden
++Name[nn]=Qt Designer-filer
+ Name[pa]=Qt Designer ਫਾਇਲ
+ Name[pl]=Pliki Qt Designer
+ Name[pt]=Ficheiros do Qt Designer
+--- kbugbuster/kbugbuster.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbugbuster/kbugbuster.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -20,6 +20,7 @@
+ GenericName[es]=Administración de errores de KDE
+ GenericName[et]=KDE veahaldusprogramm
+ GenericName[eu]=KDE programa-errore kudeaketa
++GenericName[fa]=مدیریت اشکال KDE
+ GenericName[fi]=KDE:n vianhallinta
+ GenericName[fo]=KDE-villuhandfaring
+ GenericName[fr]=Outil de gestion de bogues pour KDE
+@@ -34,7 +35,7 @@
+ GenericName[lt]=KDE ydų tvarkymas
+ GenericName[lv]=KDE Kļūdu Pārvalde
+ GenericName[ms]=Pengurusan Pepijat KDE
+-GenericName[nb]=KDE feilhåndterer
++GenericName[nb]=KDE-feilhåndtering
+ GenericName[nds]=KDE-Programmfehler-Pleeg
+ GenericName[nl]=KDE-bugs beheren
+ GenericName[nn]=KDE-feilhandtering
+--- kbugbuster/kresources/bugzilla.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kbugbuster/kresources/bugzilla.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -9,6 +9,7 @@
+ Name[es]=Listado de tareas pendientes de BugZilla
+ Name[et]=Bugzilla ülesannete nimekiri
+ Name[eu]=Bugzilla-ren egiteke zerrenda
++Name[fa]=فهرست انجام کار Bugzilla
+ Name[fi]=Bugzilla-tehtäväluettelo
+ Name[fr]=Liste de tâches de Bugzilla
+ Name[ga]=Tascliosta Bugzilla
+@@ -18,9 +19,10 @@
+ Name[it]=Lista delle cosa da fare di Bugzilla
+ Name[ja]=BugzillaToDo リスト
+ Name[lt]=Bugzilla darbų sąrašas
+-Name[nb]=Bugzilla gjøreliste
++Name[nb]=Bugzilla-huskeliste
+ Name[nds]=Bugzilla-Opgavenlist
+ Name[nl]=Bugzilla Todo-lijst
++Name[nn]=Bugzilla-hugseliste
+ Name[pa]=ਬੱਗਜੀਲਾ ਕਰਨ ਸੂਚੀ
+ Name[pl]=Lista rzeczy do zrobienia w Bugzilli
+ Name[pt]=Lista de Itens Por-Fazer do Bugzilla
+--- kioslave/svn/svn+http.protocol	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kioslave/svn/svn+http.protocol	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -24,7 +24,9 @@
+ Description[hu]=Subversion KDE-protokoll
+ Description[it]=Slave I/O di Subversion
+ Description[lt]=Subversion įvesties-išvesties priedas
++Description[nb]=Subversion-iu-slave
+ Description[nds]=In-/Utgaavmoduul för Subversion
++Description[nn]=Subversion-iu-slave
+ Description[pl]=Wtyczka protokołu Subversion
+ Description[pt]='Ioslave' para Subversion
+ Description[pt_BR]=ioslave de Subversão
+--- kioslave/svn/svn+file.protocol	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kioslave/svn/svn+file.protocol	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -24,7 +24,9 @@
+ Description[hu]=Subversion KDE-protokoll
+ Description[it]=Slave I/O di Subversion
+ Description[lt]=Subversion įvesties-išvesties priedas
++Description[nb]=Subversion-iu-slave
+ Description[nds]=In-/Utgaavmoduul för Subversion
++Description[nn]=Subversion-iu-slave
+ Description[pl]=Wtyczka protokołu Subversion
+ Description[pt]='Ioslave' para Subversion
+ Description[pt_BR]=ioslave de Subversão
+--- kioslave/svn/ksvnd/ksvnd.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kioslave/svn/ksvnd/ksvnd.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -11,6 +11,7 @@
+ Name[es]=Módulo de Subversion de KDED
+ Name[et]=KDED Subversioni moodul
+ Name[eu]=KDED Subversion modulua
++Name[fa]=پیمانه زیرنشخه KDED
+ Name[fi]=KDED Subversion -moduuli
+ Name[fr]=Module KDED Subversion
+ Name[ga]=Modúl Subversion KDED
+@@ -19,9 +20,10 @@
+ Name[it]=Modulo Subversion di KDED
+ Name[ja]=KDED Subversion モジュール
+ Name[lt]=KDED Subversion modulis
+-Name[nb]=KDED Subversion Modul
++Name[nb]=KDED Subversion-modul
+ Name[nds]=KDED Subversion-Moduul
+ Name[nl]=KDED Subversion-module
++Name[nn]=KDED Subversion-modul
+ Name[pa]=KDED ਸਬ-ਵਰਜਨ ਮੈਡੀਊਲ
+ Name[pl]=Moduł Subversion dla KDED
+ Name[pt]=Módulo KDED Subversion
+--- kioslave/svn/svn+ssh.protocol	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kioslave/svn/svn+ssh.protocol	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -24,7 +24,9 @@
+ Description[hu]=Subversion KDE-protokoll
+ Description[it]=Slave I/O di Subversion
+ Description[lt]=Subversion įvesties-išvesties priedas
++Description[nb]=Subversion-iu-slave
+ Description[nds]=In-/Utgaavmoduul för Subversion
++Description[nn]=Subversion-iu-slave
+ Description[pl]=Wtyczka protokołu Subversion
+ Description[pt]='Ioslave' para Subversion
+ Description[pt_BR]=ioslave de Subversão
+--- kioslave/svn/svn+https.protocol	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kioslave/svn/svn+https.protocol	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -24,7 +24,9 @@
+ Description[hu]=Subversion KDE-protokoll
+ Description[it]=Slave I/O di Subversion
+ Description[lt]=Subversion įvesties-išvesties priedas
++Description[nb]=Subversion-iu-slave
+ Description[nds]=In-/Utgaavmoduul för Subversion
++Description[nn]=Subversion-iu-slave
+ Description[pl]=Wtyczka protokołu Subversion
+ Description[pt]='Ioslave' para Subversion
+ Description[pt_BR]=ioslave de Subversão
+--- kioslave/svn/svn.protocol	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kioslave/svn/svn.protocol	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -24,7 +24,9 @@
+ Description[hu]=Subversion KDE-protokoll
+ Description[it]=Slave I/O di Subversion
+ Description[lt]=Subversion įvesties-išvesties priedas
++Description[nb]=Subversion-iu-slave
+ Description[nds]=In-/Utgaavmoduul för Subversion
++Description[nn]=Subversion-iu-slave
+ Description[pl]=Wtyczka protokołu Subversion
+ Description[pt]='Ioslave' para Subversion
+ Description[pt_BR]=ioslave de Subversão
+--- kioslave/svn/svnhelper/subversion_toplevel.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kioslave/svn/svnhelper/subversion_toplevel.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -16,6 +16,7 @@
+ Name[es]=Actualizar SVN
+ Name[et]=SVN uuendamine
+ Name[eu]=SVN eguneratu
++Name[fa]=به‌روزرسانی SVN
+ Name[fi]=SVN-päivitys (Update)
+ Name[fr]=Mise à jour SVN
+ Name[he]=עדכון SVN
+@@ -24,12 +25,14 @@
+ Name[it]=Aggiornamento SVN
+ Name[ja]=SVN アップデート
+ Name[lt]=SVN atnaujinti
++Name[nb]=SVN oppdater
+ Name[nds]=SVN-Archiv opfrischen
+ Name[nl]=SVN bijwerken
++Name[nn]=SVN oppdater
+ Name[pa]=SVN ਅੱਪਡੇਟ
+ Name[pl]=Uaktualnij
+ Name[pt]=Actualização do SVN
+-Name[pt_BR]=Actualização do SVN
++Name[pt_BR]=Atualização a partir do SVN
+ Name[ru]=Обновить
+ Name[sk]=SVN aktualizácia
+ Name[sl]=Posodobitev SVN
+@@ -53,6 +56,7 @@
+ Name[es]=Entrega SVN
+ Name[et]=SVN sissekanne
+ Name[eu]=SVN entregatu
++Name[fa]=تصدیق SVN
+ Name[fi]=SVN-toimitus (Commit)
+ Name[fr]=Validation SVN
+ Name[ga]=SVN Cur i bhFeidhm
+@@ -62,12 +66,14 @@
+ Name[it]=Deposito SVN
+ Name[ja]=SVN コミット
+ Name[lt]=SVN išsiųsti
++Name[nb]=SVN meld inn
+ Name[nds]=Na SVN-Archiv inspelen
+ Name[nl]=SVN vastleggen
++Name[nn]=SVN meld inn
+ Name[pa]=SVN ਕਮਿਟ
+ Name[pl]=Wyślij
+ Name[pt]=Envio do SVN
+-Name[pt_BR]=Envio do SVN
++Name[pt_BR]=Envio para o SVN
+ Name[ru]=Опубликовать
+ Name[sk]=SVN potvrdenie
+ Name[sl]=Udejanjanje SVN
+--- kioslave/svn/svnhelper/subversion.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kioslave/svn/svnhelper/subversion.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -2,6 +2,8 @@
+ Encoding=UTF-8
+ ServiceTypes=inode/directory,all/all
+ X-KDE-Submenu=Subversion
++X-KDE-Submenu[fa]=زیرنسخه
++X-KDE-Submenu[pt_BR]=Subversão
+ #X-KDE-ShowIfDcopCall=kded ksvnd anyValidWorkingCopy(KURL::List)
+ 
+ #Return type of below is a QStringList with a list of Actions which is appended to the Actions above
+@@ -19,6 +21,7 @@
+ Name[es]=Añadir al repositorio
+ Name[et]=Hoidlasse lisamine
+ Name[eu]=Gehitu biltegira
++Name[fa]=افزودن به انبار
+ Name[fi]=Lisää versionhallintaan
+ Name[fr]=Ajouter au référentiel
+ Name[ga]=Cuir leis an Stór
+@@ -28,9 +31,10 @@
+ Name[it]=Aggiungi al deposito
+ Name[ja]=レポジトリへ追加
+ Name[lt]=Įdėti į saugyklą
+-Name[nb]=Legg til arkiv
++Name[nb]=Legg til lager
+ Name[nds]=Na't Archiv tofögen
+ Name[nl]=Toevoegen aan repository
++Name[nn]=Legg til lager
+ Name[pa]=ਰਿਪੋਜ਼ਟਰੀ 'ਚ ਸ਼ਾਮਲ
+ Name[pl]=Dodaj do repozytorium
+ Name[pt]=Adicionar ao Repositório
+@@ -60,6 +64,7 @@
+ Name[es]=Eliminar del repositorio
+ Name[et]=Hoidlast kustutamine
+ Name[eu]=Ezabatu biltegitik
++Name[fa]=حذف ار انبار
+ Name[fi]=Poista versionhallinnasta
+ Name[fr]=Supprimer du référentiel
+ Name[ga]=Scrios ón Stór
+@@ -69,9 +74,10 @@
+ Name[it]=Elimina dal deposito
+ Name[ja]=レポジトリから削除
+ Name[lt]=Pašalinti iš saugyklos
+-Name[nb]=Slett fra arkiv
++Name[nb]=Slett fra lager
+ Name[nds]=Ut Archiv wegdoon
+ Name[nl]=Verwijderen uit repository
++Name[nn]=Slett frå lager
+ Name[pa]=ਰਿਪੋਜ਼ਟਰੀ ਤੋਂ ਹਟਾਓ
+ Name[pl]=Usuń z repozytorium
+ Name[pt]=Remover do Repositório
+@@ -100,6 +106,7 @@
+ Name[es]=Revertir cambios locales
+ Name[et]=Kohalike muudatuste tühistamine
+ Name[eu]=Leheneratu aldaketa lokalak
++Name[fa]=بازگشت تغییرات محلی
+ Name[fi]=Palauta paikalliset muutokset
+ Name[fr]=Annuler les modifications locales
+ Name[he]=נקה שינויים מקומיים
+@@ -111,6 +118,7 @@
+ Name[nb]=Tilbakestill lokale endringer
+ Name[nds]=Lokaal Ännern torüchnehmen
+ Name[nl]=Lokale wijzigingen ongedaan maken
++Name[nn]=Tilbakestill lokale endringar
+ Name[pa]=ਉਲਟ ਸਥਾਨਕ ਤਬਦੀਲੀਆਂ
+ Name[pl]=Cofnij lokalne zmiany
+ Name[pt]=Reverter as Modificações Locais
+@@ -137,6 +145,7 @@
+ Comment[es]=Eliminar cualquier cambio local. Atención: esto no se puede deshacer.
+ Comment[et]=Eemaldab kõik kohalikud muudatused. Hoiatus: seda ei saa tagasi võtta.
+ Comment[eu]=Kendu lokalki egindako aldaketak. Abisua: ekintza hau ezin da desegin.
++Comment[fa]=حذف همه تغییرات ایجادشده محلی. اخطار - این نمی تواند انجام نشود.
+ Comment[fi]=Poista kaikki paikallisesti tehdyt muutokset. Varoitus - muutosta ei voi perua.
+ Comment[fr]=Annuler toutes les modifications effectuées localement. Attention, cela ne peut pas être annulé.
+ Comment[hu]=A helyi módosítások visszavonása. Ez a művelet nem vonható vissza!
+@@ -147,9 +156,10 @@
+ Comment[nb]=Fjern alle endringer som er gjort lokalt. MERK - dette kan ikke angres.
+ Comment[nds]=All lokaal Ännern wegdoon. Wohrschoen - Dit lett sik nich torüchnehmen.
+ Comment[nl]=Lokale wijzigingen ongedaan maken. Let op: dit kan niet teruggedraaid worden.
++Comment[nn]=Fjern alle endringar som er gjorde lokalt. MERK - dette kan ikkje angrast.
+ Comment[pl]=Usuwa wszystkie zmiany dokonane lokalnie. Uwaga - tej operacji nie można cofnąć.
+ Comment[pt]=Remover as alterações que tenham sido feitas a nível local. Atenção - isto não pode ser anulado.
+-Comment[pt_BR]=Remover as alterações que tenham sido feitas a nível local. Atenção - isto não pode ser anulado.
++Comment[pt_BR]=Remover as alterações que tenham sido feitas localmente. Atenção - isto não pode ser desfeito.
+ Comment[ru]=Отменить все не опубликованные изменения. Эта операция не подлежит отмене.
+ Comment[sk]=Odstráni lokálne zmeny. Upozornenie - toto sa nedá už vrátiť.
+ Comment[sl]=Odstrani vse spremembe, opravljene krajevno. Opozorilo - tega ni mogoče razveljaviti.
+@@ -174,6 +184,7 @@
+ Name[es]=Renombrar...
+ Name[et]=Ãœmbernimetamine...
+ Name[eu]=Berrizendatu...
++Name[fa]=تغییر نام...
+ Name[fi]=Nimeä uudelleen...
+ Name[fr]=Renommer...
+ Name[ga]=Athainmnigh...
+@@ -183,13 +194,14 @@
+ Name[it]=Rinomina...
+ Name[ja]=名前の変更...
+ Name[lt]=Pervadinti...
+-Name[nb]=Gi nytt navn...
++Name[nb]=Endre navn ...
+ Name[nds]=Ümnömen...
+ Name[nl]=Hernoemen...
++Name[nn]=Endra namn ...
+ Name[pa]=ਨਾਂ-ਤਬਦੀਲ...
+ Name[pl]=Zmień nazwę...
+ Name[pt]=Mudar o Nome...
+-Name[pt_BR]=Mudar o Nome...
++Name[pt_BR]=Renomear...
+ Name[ru]=Переименовать...
+ Name[sk]=Premenovať...
+ Name[sl]=Preimenuj ...
+@@ -199,7 +211,7 @@
+ Name[tr]=Yeniden Adlandır...
+ Name[uk]=Перейменувати...
+ Name[zh_CN]=重命名...
+-Name[zh_TW]=重新命名…
++Name[zh_TW]=重新命名...
+ Icon=pencil
+ Exec=kio_svn_helper -r %U
+ Comment=Rename a file locally and in the repository.  Use this rather than adding and deleting to rename a file.
+@@ -212,6 +224,7 @@
+ Comment[es]=Renombrar un archivo localmente y en el repositorio. Use esto en lugar de añadir y eliminar para renombrar un archivo.
+ Comment[et]=Faili ümbernimetamine nii kohalikult kui hoidlas. See on eelistatud viis faili ümbernimetamisel lisamise ja kustutamise asemel.
+ Comment[eu]=Berrizendatu fitxategi bat lokalki eta biltegian. Erabili hau fitxategia ezabatu eta berriro gehitu ordez.
++Comment[fa]=تغییرنام یک پرونده محلی و در انبار.  به جای افزودن و حذف  برای تغییرنام یک پرونده از این استفاده کنید.
+ Comment[fi]=Nimeä uudelleen paikallinen ja versionhallinnassa oleva tiedosto.  Nimeä tiedosto uudelleen mieluummin näin kuin lisäämällä ja poistamalla.
+ Comment[fr]=Renommer un fichier localement et dans le référentiel. Utilisez cette option pour renommer un fichier, au lieu de le supprimer puis l'ajouter sous le nouveau nom.
+ Comment[hu]=Fájl átnevezése helyben és az adattárban. Ezt érdemes használni hozzáadás és törlés helyett.
+@@ -222,9 +235,10 @@
+ Comment[nb]=Gi en fil nytt navn lokalt og i arkivet. Bruk dette heller enn å slette og legge inn på nytt for å endre navn på en fil.
+ Comment[nds]=En Datei lokaal un in't Archiv ümnömen.  Bruuk beter dit, as "Tofögen" un "Wegdoon".
+ Comment[nl]=Hernoem een bestand lokaal en in de repository. Gebruik dit bij voorkeur boven het verwijderen van een bestand en het toevoegen onder een andere naam.
++Comment[nn]=Gi ei fil nytt namn lokalt og i arkivet. Bruk dette heller enn å sletta og leggja inn på nytt for å endra namn på ei fil.
+ Comment[pl]=Zmienia nazwę pliku lokalnie i w repozytorium. Należy tego używać zamiast dodawania i usuwania pliku.
+ Comment[pt]=Muda o nome de um ficheiro a nível local e no repositório. Use isto em vez de adicionar e remover o ficheiro para mudar o nome.
+-Comment[pt_BR]=Muda o nome de um ficheiro a nível local e no repositório. Use isto em vez de adicionar e remover o ficheiro para mudar o nome.
++Comment[pt_BR]=Muda o nome de um arquivo localmente e no repositório. Use isto em vez de adicionar e remover o arquivo para mudar o nome.
+ Comment[ru]=Переименовать файл с отражением этого в хранилище.
+ Comment[sk]=Premenuje súbor lokálne aj v archíve. Použite radšej toto ako pridanie a odstránenie súboru.
+ Comment[sl]=Preimenuj datoteko krajevno in v skladišču. Uporabite to namesto brisanja in dodajanja datoteke.
+@@ -247,6 +261,7 @@
+ Name[es]=Importar repositorio
+ Name[et]=Hoidla import
+ Name[eu]=Inportatu biltegia
++Name[fa]=انبار واردات
+ Name[fi]=Tuo versionhallinta
+ Name[fr]=Importer dans un référentiel
+ Name[ga]=Iompórtáil Stór
+@@ -255,9 +270,10 @@
+ Name[it]=Importa deposito
+ Name[ja]=レポジトリのインポート
+ Name[lt]=Importuoti saugyklÄ…
+-Name[nb]=Importer arkiv
++Name[nb]=Importer lager
+ Name[nds]=Archiv importeren
+ Name[nl]=Repository importeren
++Name[nn]=Importer lager
+ Name[pa]=ਰਿਪੋਜ਼ਟਰੀ ਅਯਾਤ
+ Name[pl]=Importuj repozytorium
+ Name[pt]=Importar um Repositório
+@@ -284,6 +300,7 @@
+ Comment[es]=Situar la carpeta en un repositorio existente para ponerla bajo control de revisión.
+ Comment[et]=Kataloogi lisamine olemasolevasse versioonikontrolli süsteemi hoidlasse.
+ Comment[eu]=Jarri karpeta biltegi batean errebisio kontrolpean edukitzeko.
++Comment[fa]=گذاشتن پوشه در یک انبار موجود جهت قراردادن آن تحت کنترل بازبینی
+ Comment[fi]=Laita kansio versionhallintaan viemällä se olemassa olevaan versionhallintavarastoon.
+ Comment[fr]=Place le dossier dans un référentiel existant afin de le mettre sous contrôle de version.
+ Comment[hu]=Könyvtár felvétele a verziókövető rendszer felügyelete alá.
+@@ -294,9 +311,10 @@
+ Comment[nb]=Legg mappe inn i et eksisterende arkiv slik at det får revisjonskontroll.
+ Comment[nds]=Orner na en vörhannen Archiv rinschuven un ünner Revischoonkuntrull stellen
+ Comment[nl]=Plaats een map in een bestaande repository zodat het onder het versiebeheer system valt.
++Comment[nn]=Legg ei mappe inn i eit eksisterande lager slik at det får revisjonskontroll.
+ Comment[pl]=Dodaje katalog do istniejącego repozytorium, aby umieścić go w systemie kontrolowania wersji.
+ Comment[pt]=Coloca a pasta num repositório existente para a colocar sob controlo de versões.
+-Comment[pt_BR]=Coloca a pasta num repositório existente para a colocar sob controlo de versões.
++Comment[pt_BR]=Coloca a pasta num repositório existente para colocá-lo sob controle de versões.
+ Comment[ru]=Поместить папку в существующее хранилище для добавления этой папки в систему контроля ревизий
+ Comment[sk]=Vloží priečinok do existujúceho archívu ako novú revíziu.
+ Comment[sl]=Uvozi mapo v obstoječe skladišče. Mapa tako postane del revizijskega nadzora.
+@@ -319,6 +337,7 @@
+ Name[es]=Obtener del repositorio...
+ Name[et]=Hoidla väljavõte...
+ Name[eu]=Deskargatu biltegitik...
++Name[fa]=وارسی از انبار...
+ Name[fi]=Nouda versionhallinnasta...
+ Name[fr]=Extraire depuis un référentiel...
+ Name[hu]=Kimásolás az adattárból...
+@@ -326,9 +345,10 @@
+ Name[it]=Ritira dal deposito...
+ Name[ja]=レポジトリからチェックアウト
+ Name[lt]=Atsisiųsti iš saugyklos...
+-Name[nb]=Sjekk ut fra arkiv ..
++Name[nb]=Sjekk ut fra lager ...
+ Name[nds]=Ut Archiv halen...
+ Name[nl]=Repository uitchecken...
++Name[nn]=Sjekk ut frå lager ...
+ Name[pa]=ਰਿਪੋਜ਼ਟਰੀ ਤੋਂ ਚੈਕਆਉਟ...
+ Name[pl]=Pobierz z repozytorium...
+ Name[pt]=Obter do Repositório...
+@@ -342,7 +362,7 @@
+ Name[tr]=Depodan Kontrol Et...
+ Name[uk]=Взяти зі сховища...
+ Name[zh_CN]=从仓库中检出...
+-Name[zh_TW]=從主目錄取出…
++Name[zh_TW]=從主目錄取出...
+ Icon=svn_checkout
+ Exec=kio_svn_helper -C %U
+ Comment=Checkout out files from an existing repository into this folder.
+@@ -355,6 +375,7 @@
+ Comment[es]=Descargar archivos de un repositorio existente en esta carpeta.
+ Comment[et]=Olemasoleva hoidla failide väljavõte sellesse kataloogi.
+ Comment[eu]=Deskargatu fitxategiak biltegi batetik karpeta honetara.
++Comment[fa]=وارسی پرونده‌های بیرونی از یک انبار موجود در این پوشه
+ Comment[fi]=Nouda tiedostot olemassa olevasta versionhallinnasta tähän kansioon.
+ Comment[fr]=Extraire dans ce dossier les fichiers d'un référentiel existant
+ Comment[hu]=Fájlok kimásolása az adattárból ebbe a könyvtárba.
+@@ -362,12 +383,13 @@
+ Comment[it]=Ritira i file da un deposito esistente in questa cartella.
+ Comment[ja]=既存のレポジトリから、このディレクトリへファイルをチェックアウトします。
+ Comment[lt]=Atsisiųsti bylas iš egzistuojančios saugyklos į šį aplanką.
+-Comment[nb]=Sjekk ut filer fra et arkiv inn i denne mappa.
++Comment[nb]=Sjekk ut filer fra et arkiv inn i denne mappa
+ Comment[nds]=Sekert Dateien ut en vörhannen Archiv na dissen Orner.
+ Comment[nl]=Bestanden van een bestaande repository uitchecken in deze map.
++Comment[nn]=Sjekk ut filer frå eit arkiv inn i denne mappa.
+ Comment[pl]=Pobranie plików z istniejącego repozytorium do tego katalogu.
+ Comment[pt]=Obtém todos os ficheiros de um repositório existente para esta pasta.
+-Comment[pt_BR]=Obtém todos os ficheiros de um repositório existente para esta pasta.
++Comment[pt_BR]=Obtém todos os arquivos de um repositório existente para esta pasta.
+ Comment[ru]=Загрузить файлы из существующего хранилища в указанную папку
+ Comment[sk]=Získa súbory z existujúceho archívu do tohoto priečinku.
+ Comment[sl]=Prevzemi datoteke iz obstoječega skladišča v to mapo.
+@@ -390,6 +412,7 @@
+ Name[es]=Cambiar...
+ Name[et]=Lülitumine...
+ Name[eu]=Aldatu...
++Name[fa]=سودهی...
+ Name[fi]=Vaihda...
+ Name[fr]=Basculer...
+ Name[he]=החלף...
+@@ -401,6 +424,7 @@
+ Name[nb]=Bytt ...
+ Name[nds]=Telg wesseln...
+ Name[nl]=Omzetten (switch)...
++Name[nn]=Byt ...
+ Name[pa]=ਤਬਦੀਲ...
+ Name[pl]=Przełącz...
+ Name[pt]=Mudar...
+@@ -414,7 +438,7 @@
+ Name[tr]=DeÄŸiÅŸtir...
+ Name[uk]=Перемкнути...
+ Name[zh_CN]=切换...
+-Name[zh_TW]=切換…
++Name[zh_TW]=切換...
+ Icon=svn_switch
+ Comment=Switch given working copy to another branch
+ Comment[bg]=Превключване на работното копие към друго разклонение.
+@@ -426,6 +450,7 @@
+ Comment[es]=Cambiar una determinada copia de trabajo a otra rama
+ Comment[et]=Antud töökoopia lülitamine teise harru
+ Comment[eu]=aldatu laneko kopia bat beste adar batekin
++Comment[fa]=سودهی رونوشت کار داده‌شده به شاخه دیگر
+ Comment[fi]=Vaihda annettu työkopio toiseen haaraan
+ Comment[fr]=Basculer la copie de travail vers une autre branche
+ Comment[hu]=A munkamásolat átváltása másik ágra
+@@ -433,12 +458,13 @@
+ Comment[it]=Passa la copia di lavoro a un altro ramo
+ Comment[ja]=作業中のコピーを他のブランチへ切り換えます。
+ Comment[lt]=Perjungti esamą vietinį saugyklos aplanką į kitą atšaką
+-Comment[nb]=Bytt oppgitt arbeidskopi til en annen gren
++Comment[nb]=Byt arbeidskopien til en annen gren
+ Comment[nds]=Arbeitkopie na en annern Telg verschuven
+ Comment[nl]=Zet een bestaande copy om naar een andere branch
++Comment[nn]=Byt arbeidskopien til ei anna grein
+ Comment[pl]=Przełącza katalog roboczy na inną gałąź
+ Comment[pt]=Muda a cópia de trabalho actual para outra ramificação
+-Comment[pt_BR]=Muda a cópia de trabalho actual para outra ramificação
++Comment[pt_BR]=Muda a cópia de trabalho atual para outra ramificação
+ Comment[ru]=Сменить адрес хранилища, например перейти от стабильной ветки к ветке разработки
+ Comment[sk]=Vymení danú pracovnú kópiu zo inú vetvu
+ Comment[sl]=Preklopi dano delovno kopijo na drugo vejo
+@@ -462,6 +488,7 @@
+ Name[es]=Mezclar...
+ Name[et]=Ãœhendamine...
+ Name[eu]=Bateratu...
++Name[fa]=ادغام...
+ Name[fi]=Yhdistä...
+ Name[fr]=Fusionner...
+ Name[ga]=Cumaisc...
+@@ -474,10 +501,11 @@
+ Name[nb]=Flett ...
+ Name[nds]=Tosamenföhren...
+ Name[nl]=Samenvoegen...
++Name[nn]=Flett ...
+ Name[pa]=ਮਿਲਾਨ...
+ Name[pl]=Połącz...
+ Name[pt]=Reunir...
+-Name[pt_BR]=Reunir...
++Name[pt_BR]=Mesclar...
+ Name[ru]=Объединить...
+ Name[sk]=Spojiť...
+ Name[sl]=Združi ...
+@@ -487,7 +515,7 @@
+ Name[tr]=BirleÅŸtir...
+ Name[uk]=Об'єднати...
+ Name[zh_CN]=合并...
+-Name[zh_TW]=合併…
++Name[zh_TW]=合併...
+ Icon=svn_merge
+ Comment=Merge changes between this and another branch
+ Comment[bg]=Смесване на промените от това разклонение с друго разклонение.
+@@ -499,6 +527,7 @@
+ Comment[es]=Mezclar los cambios entre esta y otra rama
+ Comment[et]=Selle ja teise haru muudatuste ühendamine
+ Comment[eu]=Bateratu hau eta beste adar baten arteko aldaketak
++Comment[fa]=تغییرات بین این شاخه و شاخه دیگر را ادغام می‌کند
+ Comment[fi]=Yhdistä tämän ja toisen haaran väliset muutokset
+ Comment[fr]=Fusionner les modifications entre cette branche et une autre
+ Comment[hu]=A módosítások összefésülése egy másik ággal
+@@ -509,9 +538,10 @@
+ Comment[nb]=Flett sammen endringer mellom denne og en annen gren
+ Comment[nds]=Ännern twischen dissen un en annern Telg tosamenföhren
+ Comment[nl]=Deze en een andere tak samenvoegen
++Comment[nn]=Flett saman endringar mellom denne og ei anna grein
+ Comment[pl]=Łączy zmiany między tą i inną gałęzią
+ Comment[pt]=Junta as modificações entre esta ramificação e outra
+-Comment[pt_BR]=Junta as modificações entre esta ramificação e outra
++Comment[pt_BR]=Mescla as modificações entre esta ramificação e outra
+ Comment[ru]=Объеденить изменения между этой и другой ветками
+ Comment[sk]=Spojí zmeny medzi touto a inou vetvou
+ Comment[sl]=Združi spremembe med to in drugo vejo
+@@ -534,6 +564,7 @@
+ Name[es]=Responsabilizar...
+ Name[et]=Autorsus...
+ Name[eu]=Erruduna...
++Name[fa]=سرزنش کردن
+ Name[fr]=Blâmer...
+ Name[he]=האשם...
+ Name[hu]=Ki tette ezt...
+@@ -544,6 +575,7 @@
+ Name[nb]=Skyld på ...
+ Name[nds]=Naspören...
+ Name[nl]=Annotatie...
++Name[nn]=Skuld på ...
+ Name[pa]=ਬਲਾਮੀ...
+ Name[pl]=Obwiń...
+ Name[pt]=Culpar...
+@@ -556,7 +588,7 @@
+ Name[sv]=Klandra...
+ Name[uk]=Вина...
+ Name[zh_CN]=历史...
+-Name[zh_TW]=最後狀態註記…
++Name[zh_TW]=最後狀態註記...
+ Icon=svn_blame
+ Comment=See who wrote each line of the file and in what revision
+ Comment[bg]=Информация за файла.
+@@ -568,6 +600,7 @@
+ Comment[es]=Ver quién escribió cada línea del archivo y en qué revisión
+ Comment[et]=Vaatamine, kes ja millises versioonis mingi faili rea kirjutas
+ Comment[eu]=Ikusi nork idatzi duen lerro bakoitza eta zer errebisiotan
++Comment[fa]=ببینید چه کسی هر خط پرونده را و در چه بازبینی نوشته است
+ Comment[fi]=Tarkista kuka on kirjoittanut tiedoston rivit missäkin versiossa
+ Comment[fr]=Voir qui a écrit chacune des lignes du fichier, et dans quelle version.
+ Comment[hu]=A fájlok készítőinek megtekintése soronként, verzió szerint
+@@ -578,9 +611,10 @@
+ Comment[nb]=Se hvem som skrev hver linje i fila og i hvilken revisjon
+ Comment[nds]=Wiest, wokeen wannehr welke Dateiregen ännert hett
+ Comment[nl]=Bekijk wie welke regel van het bestand geschreven heeft en in welke revisie
++Comment[nn]=Sjå kven som skreiv kvar linje i fila og i kva revisjon
+ Comment[pl]=Pokazuje, kto ostatni zmienił każdą linię w pliku i w której wersji
+ Comment[pt]=Vê quem escreveu uma dada linha no ficheiro e em que versão
+-Comment[pt_BR]=Vê quem escreveu uma dada linha no ficheiro e em que versão
++Comment[pt_BR]=Vê quem escreveu uma determinada linha no arquivo e em que versão
+ Comment[ru]=Просмотреть авторов каждой строки в файле и в выбранной ревизии
+ Comment[sk]=Pozrite sa, kto a v ktorej revízii napísal každý riadok súboru
+ Comment[sl]=Prikaži, kdo je napisal katero vrstico in v kateri reviziji
+@@ -603,6 +637,7 @@
+ Name[es]=Crear parche...
+ Name[et]=Paiga loomine...
+ Name[eu]=Sortu adabakia...
++Name[fa]=ایجاد کژنه...
+ Name[fi]=Luo korjaus...
+ Name[fr]=Créer un correctif...
+ Name[ga]=Cruthaigh Paiste...
+@@ -615,6 +650,7 @@
+ Name[nb]=Lag lapp ...
+ Name[nds]=Kodeplaster opstellen...
+ Name[nl]=Patch aanmaken...
++Name[nn]=Lag lapp ...
+ Name[pa]=ਪੈਂਚ ਬਣਾਓ...
+ Name[pl]=Stwórz łatę...
+ Name[pt]=Criar um 'Patch'...
+@@ -628,7 +664,7 @@
+ Name[tr]=Yama OluÅŸtur...
+ Name[uk]=Створити латку...
+ Name[zh_CN]=创建补丁...
+-Name[zh_TW]=建立修補檔…
++Name[zh_TW]=建立修補檔...
+ Exec=kio_svn_helper -p %U
+ 
+ [Desktop Action Export]
+@@ -644,6 +680,7 @@
+ Name[es]=Exportar...
+ Name[et]=Eksport...
+ Name[eu]=Esportatu...
++Name[fa]=صادرات...
+ Name[fi]=Vie...
+ Name[fr]=Exporter...
+ Name[ga]=Easpórtáil...
+@@ -656,6 +693,7 @@
+ Name[nb]=Eksporter ...
+ Name[nds]=Exporteren...
+ Name[nl]=Exporteren...
++Name[nn]=Eksporter ...
+ Name[pa]=ਨਿਰਯਾਤ...
+ Name[pl]=Eksportuj...
+ Name[pt]=Exportar...
+@@ -669,7 +707,7 @@
+ Name[tr]=Dışa Aktar...
+ Name[uk]=Експортувати...
+ Name[zh_CN]=导出...
+-Name[zh_TW]=匯出…
++Name[zh_TW]=匯出...
+ Icon=svn_export
+ Exec=kio_svn_helper -e %U
+ Comment=Checkout out an unversioned copy of a tree from a repository
+@@ -682,6 +720,7 @@
+ Comment[es]=Exporta una copia no versionada de un árbol de un repositorio
+ Comment[et]=Hoidla failipuu versioonita koopia väljavõte
+ Comment[eu]=Deskargatu bertsio-gabeko zuhaitz baten kopia bat biltegitik
++Comment[fa]=بررسی یک رونوشت کلی درخت از یک انبار
+ Comment[fi]=Nouda versioimaton kopio versionhallinnan puusta
+ Comment[fr]=Extraire une copie sans contrôle de version d'une arborescence depuis un référentiel
+ Comment[hu]=Verzió nélküli másolat készítése az adattárból
+@@ -689,12 +728,13 @@
+ Comment[it]=Ritira una copia senza versione di un albero da un deposito
+ Comment[ja]=レポジトリから非バージョン管理ツリーとしてチェックアウトします。
+ Comment[lt]=Atsisiųsti bylas iš egzistuojančios saugyklos be keitimų sekimo.
+-Comment[nb]=Sjekk ut en kopi av et tre uten versjon fra et arkiv
++Comment[nb]=Sjekk ut en kopi av et tre uten versjon fra et lager
+ Comment[nds]=En Boomkopie ahn Verschooninformatschoon ut en Archiv halen
+ Comment[nl]=Een niet onder versiebeheer vallende kopie uitchecken van een tak uit de repository
++Comment[nn]=Sjekk ut ein kopi av eit tre utan versjon frå eit lager
+ Comment[pl]=Pobiera kopiÄ™ drzewa z repozytorium bez informacji do kontroli wersji
+ Comment[pt]=Obtém uma cópia sem controlo de versões de uma árvore do repositório
+-Comment[pt_BR]=Obtém uma cópia sem controlo de versões de uma árvore do repositório
++Comment[pt_BR]=Obtém uma cópia sem controle de versões de uma árvore do repositório
+ Comment[ru]=Загрузить копию дерева без служебной информации системы управления версиями
+ Comment[sk]=Získa neverzionovanú kópiu stromu z archívu
+ Comment[sl]=Iz skladišča prevzemi kopijo drevesa brez različice
+@@ -716,6 +756,7 @@
+ Name[es]=Diferencias (locales)
+ Name[et]=Võrdlemine (kohalik)
+ Name[eu]=Desberdintasunak (lokala)
++Name[fa]=Diff (محلی)
+ Name[fi]=Diff (paikallinen)
+ Name[fr]=Différences (locales)
+ Name[ga]=Diff (logánta)
+@@ -728,6 +769,7 @@
+ Name[nb]=Diff (lokal)
+ Name[nds]=Verscheel (lokaal)
+ Name[nl]=Diff (lokaal)
++Name[nn]=Diff (lokal)
+ Name[pa]=ਅੰਤਰ (ਸਥਾਨਕ)
+ Name[pl]=Różnice (lokalne)
+ Name[pt]=Diferenças (local)
+@@ -754,6 +796,7 @@
+ Comment[es]=Mostrar los cambios locales desde la última actualización
+ Comment[et]=Kohalike muudatuste näitamine pärast viimast uuendamist
+ Comment[eu]=Erakutsi azken aldaketatik gertatu diren aldaketa lokalak
++Comment[fa]=نمایش تغییرات محلی از آخرین به‌روزرسانی
+ Comment[fi]=Näytä viimeisen päivityksen jälkeen tehdyt paikalliset muutokset
+ Comment[fr]=Afficher les changements locaux effectués depuis la dernière mise à jour
+ Comment[hu]=A helyi módosítások mutatása (az utolsó frissítés óta)
+@@ -764,9 +807,10 @@
+ Comment[nb]=Vis lokale endringer siden siste oppdatering
+ Comment[nds]=Lokaal Ännern na de verleden Opfrischen wiesen
+ Comment[nl]=Lokale wijzigingen sinds de laatste update tonen
++Comment[nn]=Vis lokale endringar sidan siste oppdatering
+ Comment[pl]=Pokazuje lokalne zmiany od ostatniego uaktualnienia
+ Comment[pt]=Mostra as modificações locais desde a última actualização
+-Comment[pt_BR]=Mostra as modificações locais desde a última actualização
++Comment[pt_BR]=Mostra as modificações locais desde a última atualização
+ Comment[ru]=Определить изменения, не внесенные в общее хранилище
+ Comment[sk]=Zobrazí lokálne zmeny od poslednej aktualizácie
+ Comment[sl]=Prikaži krajevne spremembe od zadnje posodobitve
+--- kioslave/svn/svnhelper/apply_patch.desktop	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ kioslave/svn/svnhelper/apply_patch.desktop	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -15,6 +15,7 @@
+ Name[es]=Aplicar parche...
+ Name[et]=Paiga rakendamine...
+ Name[eu]=Aplikatu adabakia...
++Name[fa]=اعمال کژنه...
+ Name[fi]=Toteuta korjaus...
+ Name[fr]=Appliquer le correctif...
+ Name[ga]=Cuir Paiste i bhFeidhm...
+@@ -27,6 +28,7 @@
+ Name[nb]=Bruk lapp ...
+ Name[nds]=Kodeplaster inspelen...
+ Name[nl]=Patch toepassen...
++Name[nn]=Bruk lapp ...
+ Name[pa]=ਪੈਂਚ ਲਾਗੂ...
+ Name[pl]=Nałóż łatę...
+ Name[pt]=Aplicar um 'Patch'...
+@@ -40,7 +42,7 @@
+ Name[tr]=Yamayı Uygula...
+ Name[uk]=Застосувати латку...
+ Name[zh_CN]=应用补丁...
+-Name[zh_TW]=套用修補…
++Name[zh_TW]=套用修補...
+ Icon=apply
+ Exec=
+ Comment=Apply the patch to another folder/file
+@@ -53,6 +55,7 @@
+ Comment[es]=Aplicar el parche a otra carpeta o archivo
+ Comment[et]=Paiga rakendamine teisele kataloogile/failile
+ Comment[eu]=Aplikatu adabakia beste karpeta/fitxategi bati
++Comment[fa]=اعمال کژنه به پوشه/پرونده دیگر
+ Comment[fi]=Toteuta korjaus toiseen kansioon/tiedostoon
+ Comment[fr]=Appliquer le correctif sur un autre dossier / fichier
+ Comment[ga]=Cuir an paiste i bhfeidhm ar fhillteán/chomhad eile
+@@ -64,10 +67,11 @@
+ Comment[nb]=Bruk lappen på en annen mappe/fil
+ Comment[nds]=Kodeplaster op en anner Orner/Datei anwennen
+ Comment[nl]=Patch toepassen op een andere map of een ander bestand
++Comment[nn]=Bruk lappen på ei anna mappe/fil
+ Comment[pa]=ਹੋਰ ਫੋਲਡਰ/ਫਾਇਲ ਲਈ ਪੈਂਚ ਲਾਗੂ
+ Comment[pl]=Nałożenie łaty na inny plik/katalog
+ Comment[pt]=Aplicar o 'patch' (actualização) noutra pasta/ficheiro
+-Comment[pt_BR]=Aplicar o 'patch' (actualização) noutra pasta/ficheiro
++Comment[pt_BR]=Aplicar o 'patch' (atualização) noutra pasta/arquivo
+ Comment[ru]=Применить заплатку к другой папке или файлу
+ Comment[sk]=Aplikovať záplatu na iný priečinok/súbor
+ Comment[sl]=Uveljavi popravek za drugo mapo/datoteko
+--- Makefile.am.in	(.../tags/KDE/3.5.4/kdesdk)	(revision 577421)
++++ Makefile.am.in	(.../branches/KDE/3.5/kdesdk)	(revision 577421)
+@@ -1,7 +1,7 @@
+ ## kdesdk/Makefile.am
+ ## (C) 1997 Stephan Kulow
+ 
+-AUTOMAKE_OPTIONS = foreign 1.5
++AUTOMAKE_OPTIONS = foreign 1.6.1
+ DISTCLEANFILES = inst-apps
+ 
+ MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 SUBDIRS




More information about the pkg-kde-commits mailing list