From 4c8faa8eb5c382b3e8d55a11b651152260e92bc4 Mon Sep 17 00:00:00 2001
From: Philippe Mavridis <philippe.mavridis@yandex.com>
Date: Wed, 24 Jun 2026 21:26:36 +0900
Subject: Minor code clean extracted from TDE/koffice#76

Signed-off-by: Philippe Mavridis <philippe.mavridis@yandex.com>
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
---
 .../chalk/gmagick/kis_image_magick_converter.cpp   | 24 +++++-----
 .../chalk/magick/kis_image_magick_converter.cpp    |  9 ++--
 kexi/core/kexipartmanager.cpp                      | 20 ++++----
 kexi/main/keximainwindowimpl.cpp                   |  2 +-
 kexi/migration/importwizard.cpp                    | 56 +++++++++++-----------
 kexi/plugins/macros/tests/komacrotestgui.cpp       |  2 +-
 lib/kformula/kformulacontainer.cpp                 |  2 +-
 lib/kformula/kformuladocument.cpp                  | 10 ++--
 lib/kofficecore/KoDocument.cpp                     |  6 +--
 lib/kofficecore/KoMainWindow.cpp                   |  6 +--
 lib/kofficecore/KoSpeaker.cpp                      |  6 +--
 lib/kofficeui/KoInsertLink.cpp                     | 10 ++--
 lib/kofficeui/KoSelectAction.cpp                   |  8 ++--
 lib/kofficeui/KoTemplateChooseDia.cpp              |  2 +-
 14 files changed, 79 insertions(+), 84 deletions(-)

diff --git a/filters/chalk/gmagick/kis_image_magick_converter.cpp b/filters/chalk/gmagick/kis_image_magick_converter.cpp
index bb91d788c..e17bcc460 100644
--- a/filters/chalk/gmagick/kis_image_magick_converter.cpp
+++ b/filters/chalk/gmagick/kis_image_magick_converter.cpp
@@ -119,14 +119,14 @@ namespace {
     KisProfile * getProfileForProfileInfo(const Image * image)
     {
         size_t length;
-        
+
         const unsigned char * profiledata = GetImageProfile(image, "ICM", &length);
         if( profiledata == NULL )
             return 0;
         TQByteArray rawdata;
         rawdata.resize(length);
         memcpy(rawdata.data(), profiledata, length);
-        
+
         KisProfile* p = new KisProfile(rawdata);
         return p;
 
@@ -167,14 +167,14 @@ namespace {
     void setAnnotationsForImage(const Image * src, KisImageSP image)
     {
         size_t length;
-        
+
         const unsigned char * profiledata = GetImageProfile(src, "IPTC", &length);
         if( profiledata != NULL )
         {
             TQByteArray rawdata;
             rawdata.resize(length);
             memcpy(rawdata.data(), profiledata, length);
-            
+
             KisAnnotation* annotation = new KisAnnotation(TQString("IPTC"), "", rawdata);
             TQ_CHECK_PTR(annotation);
 
@@ -187,14 +187,14 @@ namespace {
             TQByteArray rawdata;
             rawdata.resize(length);
             memcpy(rawdata.data(), src->generic_profile[i].info, src->generic_profile[i].length);
-            
+
             KisAnnotation* annotation = new KisAnnotation(TQString(src->generic_profile[i].name), "", rawdata);
             TQ_CHECK_PTR(annotation);
 
             image -> addAnnotation(annotation);
         }
 #endif
-        
+
         const ImageAttribute* imgAttr = GetImageAttribute(src, NULL);
         while(imgAttr)
         {
@@ -202,7 +202,7 @@ namespace {
             int len = strlen(imgAttr -> value) + 1;
             rawdata.resize(len);
             memcpy(rawdata.data(), imgAttr -> value, len);
-            
+
             KisAnnotation* annotation = new KisAnnotation( TQString("chalk_attribute:%1").arg(TQString(imgAttr -> key)), "", rawdata );
             TQ_CHECK_PTR(annotation);
 
@@ -308,7 +308,6 @@ namespace {
 
         if (!init) {
             TDEApplication *app = tdeApp;
-
             InitializeMagick(*app -> argv());
             atexit(DestroyMagick);
             init = true;
@@ -329,7 +328,6 @@ namespace {
     MagickBooleanType monitor(const char *text, const ExtendedSignedIntegralType, const ExtendedUnsignedIntegralType, ExceptionInfo *)
     {
         TDEApplication *app = tdeApp;
-
         Q_ASSERT(app);
 
         if (app -> hasPendingEvents())
@@ -406,7 +404,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB
         kdDebug(41008) << "Exceptions happen when loading" << endl;
         return KisImageBuilder_RESULT_FAILURE;
     }
-    
+
 
     if (images == 0) {
         DestroyImageInfo(ii);
@@ -445,7 +443,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB
         }
 
         kdDebug(41008) << "image has " << csName << " colorspace\n";
-        
+
         KisProfile * profile = getProfileForProfileInfo(image);
         if (profile)
         {
@@ -470,7 +468,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB
             m_img = new KisImage(m_doc->undoAdapter(), image -> columns, image -> rows, cs, "built image");
             TQ_CHECK_PTR(m_img);
             m_img->blockSignals(true); // Don't send out signals while we're building the image
-            
+
             // XXX I'm assuming seperate layers won't have other profile things like EXIF
             setAnnotationsForImage(image, m_img);
         }
@@ -560,7 +558,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB
                     while(! hiter.isDone())
                     {
                         TQ_UINT16 *ptr = reinterpret_cast<TQ_UINT16 *>(hiter.rawData());
-                        
+
                         *(ptr++) = ScaleQuantumToShort(pp->red);
                         *(ptr++) = ScaleQuantumToShort(pp->green);
                         *(ptr++) = ScaleQuantumToShort(pp->blue);
diff --git a/filters/chalk/magick/kis_image_magick_converter.cpp b/filters/chalk/magick/kis_image_magick_converter.cpp
index 958cabf76..22727669e 100644
--- a/filters/chalk/magick/kis_image_magick_converter.cpp
+++ b/filters/chalk/magick/kis_image_magick_converter.cpp
@@ -256,7 +256,6 @@ namespace {
 
         if (!init) {
             TDEApplication *app = tdeApp;
-
             InitializeMagick(*app -> argv());
             atexit(DestroyMagick);
             init = true;
@@ -277,7 +276,6 @@ namespace {
     MagickBooleanType monitor(const char *text, const ExtendedSignedIntegralType, const ExtendedUnsignedIntegralType, ExceptionInfo *)
     {
         TDEApplication *app = tdeApp;
-
         Q_ASSERT(app);
 
         if (app -> hasPendingEvents())
@@ -290,7 +288,6 @@ namespace {
     unsigned int monitor(const char *text, const ExtendedSignedIntegralType, const ExtendedUnsignedIntegralType, ExceptionInfo *)
     {
         TDEApplication *app = tdeApp;
-
         Q_ASSERT(app);
 
         if (app -> hasPendingEvents())
@@ -387,7 +384,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB
         }
 
         kdDebug(41008) << "image has " << csName << " colorspace\n";
-        
+
         KisProfile * profile = getProfileForProfileInfo(image);
         if (profile)
         {
@@ -412,7 +409,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB
             m_img = new KisImage(m_doc->undoAdapter(), image -> columns, image -> rows, cs, "built image");
             TQ_CHECK_PTR(m_img);
             m_img->blockSignals(true); // Don't send out signals while we're building the image
-            
+
             // XXX I'm assuming seperate layers won't have other profile things like EXIF
             setAnnotationsForImage(image, m_img);
         }
@@ -502,7 +499,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB
                     while(! hiter.isDone())
                     {
                         TQ_UINT16 *ptr = reinterpret_cast<TQ_UINT16 *>(hiter.rawData());
-                        
+
                         *(ptr++) = ScaleQuantumToShort(pp->red);
                         *(ptr++) = ScaleQuantumToShort(pp->green);
                         *(ptr++) = ScaleQuantumToShort(pp->blue);
diff --git a/kexi/core/kexipartmanager.cpp b/kexi/core/kexipartmanager.cpp
index 31e335ac4..c593f883f 100644
--- a/kexi/core/kexipartmanager.cpp
+++ b/kexi/core/kexipartmanager.cpp
@@ -55,16 +55,16 @@ Manager::lookup()
 	m_partlist.clear();
 	m_partsByMime.clear();
 	m_parts.clear();
-	TDETrader::OfferList tlist = TDETrader::self()->query("Kexi/Handler", 
+	TDETrader::OfferList tlist = TDETrader::self()->query("Kexi/Handler",
 		"[X-Kexi-PartVersion] == " + TQString::number(KEXI_PART_VERSION));
-	
+
 	TDEConfig conf("kexirc", true);
 	conf.setGroup("Parts");
 	TQStringList sl_order = TQStringList::split( ",", conf.readEntry("Order") );//we'll set parts in defined order
 	const int size = TQMAX( tlist.count(), sl_order.count() );
 	TQPtrVector<KService> ordered( size*2 );
 	int offset = size; //we will insert not described parts from #offset
-	
+
 	//compute order
 	for(TDETrader::OfferList::ConstIterator it(tlist.constBegin()); it != tlist.constEnd(); ++it)
 	{
@@ -85,14 +85,14 @@ Manager::lookup()
 		if (idx!=-1)
 			ordered.insert(idx, ptr);
 		else //add to end
-			ordered.insert(offset++, ptr);	
+			ordered.insert(offset++, ptr);
 	}
 	//fill final list using computed order
 	for (int i = 0; i< (int)ordered.size(); i++) {
 		KService::Ptr ptr = ordered[i];
 		if (ptr) {
 			Info *info = new Info(ptr);
-			info->setProjectPartID(m_nextTempProjectPartID--); // temp. part id are -1, -2, and so on, 
+			info->setProjectPartID(m_nextTempProjectPartID--); // temp. part id are -1, -2, and so on,
 			                                                   // to avoid duplicates
 			if (!info->mimeType().isEmpty()) {
 				m_partsByMime.insert(info->mimeType(), info);
@@ -122,11 +122,11 @@ Manager::part(Info *i)
 	}
 
 	Part *p = m_parts[i->projectPartID()];
-	
+
 	if(!p) {
 //		kdDebug() << "Manager::part().." << endl;
 		int error=0;
-		p = KParts::ComponentFactory::createInstanceFromService<Part>(i->ptr(), this, 
+		p = KParts::ComponentFactory::createInstanceFromService<Part>(i->ptr(), this,
 			TQString(i->objectName()+"_part").latin1(), TQStringList(), &error);
 		if(!p) {
 			kdDebug() << "Manager::part(): failed :( (ERROR #" << error << ")" << endl;
@@ -164,7 +164,7 @@ Manager::unloadPart(Info *i)
 	m_partlist.removeRef(p);*/
 }
 
-void 
+void
 Manager::unloadAllParts()
 {
 //	m_partsByMime.clear();
@@ -175,7 +175,7 @@ Manager::unloadAllParts()
 }
 #endif
 
-/*void 
+/*void
 Manager::removeClients( KexiMainWindow *win )
 {
 	if (!win)
@@ -270,7 +270,7 @@ void Manager::insertStaticPart(StaticPart* part)
 {
 	if (!part)
 		return;
-	part->info()->setProjectPartID(m_nextTempProjectPartID--); // temp. part id are -1, -2, and so on, 
+	part->info()->setProjectPartID(m_nextTempProjectPartID--); // temp. part id are -1, -2, and so on,
 	m_partlist.append(part->info());
 	if (!part->info()->mimeType().isEmpty())
 		m_partsByMime.insert(part->info()->mimeType(), part->info());
diff --git a/kexi/main/keximainwindowimpl.cpp b/kexi/main/keximainwindowimpl.cpp
index 3f76c9552..f0bdf43aa 100644
--- a/kexi/main/keximainwindowimpl.cpp
+++ b/kexi/main/keximainwindowimpl.cpp
@@ -1923,7 +1923,7 @@ void KexiMainWindowImpl::updateAppCaption()
 			view = 0;
 	}
 
-	kApp->setCaption( d->appCaption );
+	tdeApp->setCaption( d->appCaption );
 	if (view && view->mdiParent()->state()==KMdiChildFrm::Maximized) {
 		setCaption( view->caption() );
 	}
diff --git a/kexi/migration/importwizard.cpp b/kexi/migration/importwizard.cpp
index 757d1fc87..957efc0a6 100644
--- a/kexi/migration/importwizard.cpp
+++ b/kexi/migration/importwizard.cpp
@@ -132,8 +132,8 @@ void ImportWizard::parseArguments()
 		m_predefinedMimeType = (*m_args)["mimeType"];
 		if (m_args->contains("connectionData")) {
 			m_predefinedConnectionData = new KexiDB::ConnectionData();
-			KexiDB::fromMap( 
-				KexiUtils::deserializeMap((*m_args)["connectionData"]), *m_predefinedConnectionData 
+			KexiDB::fromMap(
+				KexiUtils::deserializeMap((*m_args)["connectionData"]), *m_predefinedConnectionData
 			);
 		}
 	}
@@ -146,7 +146,7 @@ void ImportWizard::setupIntro()
 {
 	m_introPage = new TQWidget(this);
 	TQVBoxLayout *vbox = new TQVBoxLayout(m_introPage, KDialog::marginHint());
-	
+
 	TQLabel *lblIntro = new TQLabel(m_introPage);
 	lblIntro->setAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak );
 	TQString msg;
@@ -179,7 +179,7 @@ void ImportWizard::setupSrcType()
 {
 	m_srcTypePage = new TQWidget(this);
 
-//! @todo Would be good if KexiDBDriverComboBox worked for migration drivers 
+//! @todo Would be good if KexiDBDriverComboBox worked for migration drivers
 	TQVBoxLayout *vbox = new TQVBoxLayout(m_srcTypePage, KDialog::marginHint());
 
 	TQHBoxLayout *hbox = new TQHBoxLayout(vbox);
@@ -206,7 +206,7 @@ void ImportWizard::setupSrcConn()
 	m_srcConnPage = new TQWidget(this);
 	TQVBoxLayout *vbox = new TQVBoxLayout(m_srcConnPage, KDialog::marginHint());
 
-	m_srcConn = new KexiConnSelectorWidget(Kexi::connset(), 
+	m_srcConn = new KexiConnSelectorWidget(Kexi::connset(),
 		":ProjectMigrationSourceDir", m_srcConnPage, "m_srcConnSelector");
 
 	m_srcConn->hideConnectonIcon();
@@ -256,7 +256,7 @@ void ImportWizard::setupDstType()
 	m_dstPrjTypeSelector->option_server->setText(i18n("Database project stored on a server"));
 
 	TQVBoxLayout *frame_server_vbox = new TQVBoxLayout(m_dstPrjTypeSelector->frame_server, KDialog::spacingHint());
-	m_dstServerTypeCombo = new KexiDBDriverComboBox(m_dstPrjTypeSelector->frame_server, drvs, 
+	m_dstServerTypeCombo = new KexiDBDriverComboBox(m_dstPrjTypeSelector->frame_server, drvs,
 		KexiDBDriverComboBox::ShowServerDrivers);
 	frame_server_vbox->addWidget(m_dstServerTypeCombo);
 	hbox->addStretch(1);
@@ -272,7 +272,7 @@ void ImportWizard::setupDstType()
 //
 void ImportWizard::setupDstTitle()
 {
-	m_dstTitlePage = new KexiDBTitlePage(i18n("Destination project's caption:"), 
+	m_dstTitlePage = new KexiDBTitlePage(i18n("Destination project's caption:"),
 		this, "KexiDBTitlePage");
 	m_dstTitlePage->layout()->setMargin( KDialog::marginHint() );
 	m_dstTitlePage->updateGeometry();
@@ -287,7 +287,7 @@ void ImportWizard::setupDst()
 	m_dstPage = new TQWidget(this);
 	TQVBoxLayout *vbox = new TQVBoxLayout(m_dstPage, KDialog::marginHint());
 
-	m_dstConn = new KexiConnSelectorWidget(Kexi::connset(), 
+	m_dstConn = new KexiConnSelectorWidget(Kexi::connset(),
 		":ProjectMigrationDestinationDir", m_dstPage, "m_dstConnSelector");
 	m_dstConn->hideHelpers();
 	//me: Can't connect m_dstConn->m_fileDlg here, it doesn't exist yet
@@ -377,7 +377,7 @@ void ImportWizard::setupFinish()
 	m_finishLbl->setAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak );
 
 	vbox->addWidget( m_finishLbl );
-	m_openImportedProjectCheckBox = new TQCheckBox(i18n("Open imported project"), 
+	m_openImportedProjectCheckBox = new TQCheckBox(i18n("Open imported project"),
 		m_finishPage, "openImportedProjectCheckBox");
 	m_openImportedProjectCheckBox->setChecked(true);
 	vbox->addSpacing( KDialog::spacingHint() );
@@ -482,7 +482,7 @@ void ImportWizard::arriveDstTitlePage()
 	if(fileBasedSrcSelected()) {
 		TQString suggestedDBName( TQFileInfo(m_srcConn->selectedFileName()).fileName() );
 		const TQFileInfo fi( suggestedDBName );
-		suggestedDBName = suggestedDBName.left(suggestedDBName.length() 
+		suggestedDBName = suggestedDBName.left(suggestedDBName.length()
 			- (fi.extension().length() ? (fi.extension().length()+1) : 0));
 		m_dstNewDBNameLineEdit->setText( suggestedDBName );
 	} else {
@@ -547,14 +547,14 @@ void ImportWizard::arriveImportingPage() {
 //todo
 
 	//temp. hack for MS Access driver only
-//! @todo for other databases we will need KexiMigration::Conenction 
+//! @todo for other databases we will need KexiMigration::Conenction
 //! and KexiMigration::Driver classes
 	bool showOptions = false;
 	if (fileBasedSrcSelected()) {
 		Kexi::ObjectStatus result;
 		KexiMigrate* sourceDriver = prepareImport(result);
 		if (sourceDriver) {
-			showOptions = !result.error() 
+			showOptions = !result.error()
 				&& sourceDriver->propertyValue( "source_database_has_nonunicode_encoding" ).toBool();
 			KexiMigration::Data *data = sourceDriver->data();
 			sourceDriver->setData( 0 );
@@ -621,7 +621,7 @@ TQString ImportWizard::driverNameForSelectedSource()
 		return m_predefinedConnectionData->driverName;
 	}
 
-	return m_srcConn->selectedConnectionData() 
+	return m_srcConn->selectedConnectionData()
 		? m_srcConn->selectedConnectionData()->driverName : TQString();
 }
 
@@ -653,7 +653,7 @@ void ImportWizard::accept()
 KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result)
 {
 	KexiUtils::WaitCursor wait;
-	
+
 	// Start with a driver manager
 	KexiDB::DriverManager manager;
 
@@ -686,7 +686,7 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result)
 			cdata = m_dstConn->selectedConnectionData();
 			dbname = m_dstNewDBNameLineEdit->text();
 		}
-		else // if (m_dstTypeCombo->currentText().lower() == KexiDB::Driver::defaultFileBasedDriverName()) 
+		else // if (m_dstTypeCombo->currentText().lower() == KexiDB::Driver::defaultFileBasedDriverName())
 		{
 			//file-based project
 			kdDebug() << "File Destination..." << endl;
@@ -701,7 +701,7 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result)
 /*		else
 		{
 			//TODO This needs a better message
-			//KMessageBox::error(this, 
+			//KMessageBox::error(this,
 			result.setStatus(i18n("No connection data is available. You did not select a destination filename."),"");
 			//return false;
 		} */
@@ -713,7 +713,7 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result)
 	{
 		sourceDriverName = driverNameForSelectedSource();
 		if (sourceDriverName.isEmpty())
-			result.setStatus(i18n("No appropriate migration driver found."), 
+			result.setStatus(i18n("No appropriate migration driver found."),
 				m_migrateManager.possibleProblemsInfoMsg());
 	}
 
@@ -736,7 +736,7 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result)
 		// Setup progress feedback for the GUI
 		if(sourceDriver->progressSupported()) {
 			m_progressBar->updateGeometry();
-			disconnect(sourceDriver, TQ_SIGNAL(progressPercent(int)), 
+			disconnect(sourceDriver, TQ_SIGNAL(progressPercent(int)),
 				this, TQ_SLOT(progressUpdated(int)));
 			connect(sourceDriver, TQ_SIGNAL(progressPercent(int)),
 				this, TQ_SLOT(progressUpdated(int)));
@@ -759,7 +759,7 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result)
 			kdDebug() << "Neither radio button is selected (not possible?) presume keep data" << endl;
 			keepData = true;
 		}
-		
+
 		KexiMigration::Data* md = new KexiMigration::Data();
 	//	delete md->destination;
 		md->destination = new KexiProjectData(*cdata, dbname);
@@ -769,7 +769,7 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result)
 			md->source = conn_data;
 			md->sourceName = "";
 		}
-		else 
+		else
 		{
 			if (m_predefinedConnectionData)
 				md->source = m_predefinedConnectionData;
@@ -802,8 +802,8 @@ tristate ImportWizard::import()
 	if (sourceDriver && !result.error())
 	{
 		if (!m_sourceDBEncoding.isEmpty()) {
-			sourceDriver->setPropertyValue( "source_database_nonunicode_encoding", 
-				TQVariant(m_sourceDBEncoding.upper().replace(' ',"")) // "CP1250", not "cp 1250" 
+			sourceDriver->setPropertyValue( "source_database_nonunicode_encoding",
+				TQVariant(m_sourceDBEncoding.upper().replace(' ',"")) // "CP1250", not "cp 1250"
 			);
 		}
 
@@ -835,10 +835,10 @@ tristate ImportWizard::import()
 	{
 		if (m_args) {
 //				if (fileBasedDstSelected()) {
-			m_args->insert("destinationDatabaseName", 
+			m_args->insert("destinationDatabaseName",
 				sourceDriver->data()->destination->databaseName());
 //				}
-			TQString destinationConnectionShortcut( 
+			TQString destinationConnectionShortcut(
 				Kexi::connset().fileNameForConnectionData( m_dstConn->selectedConnectionData() ) );
 			if (!destinationConnectionShortcut.isEmpty()) {
 				m_args->insert("destinationConnectionShortcut", destinationConnectionShortcut);
@@ -859,14 +859,14 @@ tristate ImportWizard::import()
 
 		kdDebug() << msg << "\n" << details << endl;
 		setTitle(m_finishPage, i18n("Failure"));
-		m_finishLbl->setText(	
+		m_finishLbl->setText(
 			i18n("<p>Import failed.</p>%1<p>%2</p><p>You can click \"Back\" button and try again.</p>")
 			.arg(msg).arg(details));
 		return false;
 	}
 //	delete kexi_conn;
 	return true;
-} 
+}
 
 void ImportWizard::reject()
 {
@@ -896,7 +896,7 @@ void ImportWizard::next()
 			if (fileBasedSrcSelected())
 				dbname = m_srcConn->selectedFileName();
 			else
-				dbname = m_srcConn->selectedConnectionData() 
+				dbname = m_srcConn->selectedConnectionData()
 					? m_srcConn->selectedConnectionData()->serverInfoString() : TQString();
 				if (!dbname.isEmpty())
 					dbname = TQString(" \"%1\"").arg(dbname);
@@ -920,7 +920,7 @@ void ImportWizard::next()
 			m_lblImportingTxt->setText(i18n("Importing in progress..."));
 			tristate res = import();
 			if (true == res) {
-				m_finishLbl->setText( 
+				m_finishLbl->setText(
 					i18n("Database has been imported into Kexi database project \"%1\".")
 					.arg(m_dstNewDBNameLineEdit->text()) );
 				cancelButton()->setEnabled(false);
diff --git a/kexi/plugins/macros/tests/komacrotestgui.cpp b/kexi/plugins/macros/tests/komacrotestgui.cpp
index ea4bbb9c7..de0345c1f 100644
--- a/kexi/plugins/macros/tests/komacrotestgui.cpp
+++ b/kexi/plugins/macros/tests/komacrotestgui.cpp
@@ -42,7 +42,7 @@ int main( int argc, char** argv )
 
 		TDECmdLineArgs::init(argc, argv, &about);
 		TDECmdLineArgs::addCmdLineOptions( options );
-		//create new kapplication
+		//create new tdeApplication
 		TDEApplication app;
 		//create new kunitrunnergui
 		KUnitTest::RunnerGUI runner(0);
diff --git a/lib/kformula/kformulacontainer.cpp b/lib/kformula/kformulacontainer.cpp
index a6123154d..5499fe915 100644
--- a/lib/kformula/kformulacontainer.cpp
+++ b/lib/kformula/kformulacontainer.cpp
@@ -528,7 +528,7 @@ void Container::saveMathML( TQTextStream& stream, bool oasisFormat )
 {
     TQDomDocument doc;
     if ( !oasisFormat ) {
-        doc = document()->createMathMLDomDocument(); 
+        doc = document()->createMathMLDomDocument();
    }
     rootElement()->writeMathML( doc, doc, oasisFormat );
     stream << doc;
diff --git a/lib/kformula/kformuladocument.cpp b/lib/kformula/kformuladocument.cpp
index 4cb52d8f8..34db396a6 100644
--- a/lib/kformula/kformuladocument.cpp
+++ b/lib/kformula/kformuladocument.cpp
@@ -125,7 +125,7 @@ int Document::formulaCount()
 bool Document::loadXML( const TQDomDocument& doc )
 {
     setCreationStrategy( "Ordinary" );
-        
+
     //clear();
     TQDomElement root = doc.documentElement();
 
@@ -205,12 +205,12 @@ TQDomDocument Document::createDomDocument()
  */
 TQDomDocument Document::createMathMLDomDocument()
 {
-    TQDomDocumentType dt = 
+    TQDomDocumentType dt =
         TQDomImplementation().createDocumentType( "math",
                                                  "-//W3C//DTD MathML 2.0//EN",
                                                  "http://www.w3.org/TR/MathML2/dtd/mathml2.dtd");
     TQDomDocument doc( dt );
-    doc.insertBefore( doc.createProcessingInstruction( "xml", 
+    doc.insertBefore( doc.createProcessingInstruction( "xml",
                                                        "version=\"1.0\" encoding=\"UTF-8\"" ),
                       doc.documentElement() );
     return doc;
@@ -1212,10 +1212,10 @@ void DocumentWrapper::setEnabled( bool enabled )
     getAddLowerLeftAction()->setEnabled( enabled );
     getAddUpperRightAction()->setEnabled( enabled );
     getAddLowerRightAction()->setEnabled( enabled );
-    
+
     getAddGenericUpperAction()->setEnabled( enabled );
     getAddGenericLowerAction()->setEnabled( enabled );
-    
+
 
     if ( enabled ) {
         getAddGenericUpperAction()->
diff --git a/lib/kofficecore/KoDocument.cpp b/lib/kofficecore/KoDocument.cpp
index f2e5bc903..0b9be64cd 100644
--- a/lib/kofficecore/KoDocument.cpp
+++ b/lib/kofficecore/KoDocument.cpp
@@ -375,9 +375,9 @@ bool KoDocument::exp0rt( const KURL & _url )
 bool KoDocument::saveFile()
 {
     kdDebug(30003) << "KoDocument::saveFile() doc='" << url().url() <<"'"<< endl;
-    
+
     // set local again as it can happen that it gets resetted
-    // so that all saved numbers have a . and not e.g a , as a 
+    // so that all saved numbers have a . and not e.g a , as a
     // decimal seperator
     setlocale( LC_NUMERIC, "C" );
 
@@ -1265,7 +1265,7 @@ TQPixmap KoDocument::generatePreview( const TQSize& size )
 TQString KoDocument::autoSaveFile( const TQString & path ) const
 {
     // set local again as it can happen that it gets resetted
-    // so that all saved numbers have a . and not e.g a , as a 
+    // so that all saved numbers have a . and not e.g a , as a
     // decimal seperator
     setlocale( LC_NUMERIC, "C" );
 
diff --git a/lib/kofficecore/KoMainWindow.cpp b/lib/kofficecore/KoMainWindow.cpp
index 0264981e7..a227bae07 100644
--- a/lib/kofficecore/KoMainWindow.cpp
+++ b/lib/kofficecore/KoMainWindow.cpp
@@ -1635,9 +1635,9 @@ void KoMainWindow::slotEmailFile()
     if (!fileURL.isEmpty())
     {
         tdeApp->invokeMailer(TQString(), TQString(), TQString(), theSubject,
-                            TQString(), //body
-                            TQString(),
-                            urls); // attachments
+                             TQString(), //body
+                             TQString(),
+                             urls); // attachments
     }
 }
 
diff --git a/lib/kofficecore/KoSpeaker.cpp b/lib/kofficecore/KoSpeaker.cpp
index 3637b90b8..83c0de179 100644
--- a/lib/kofficecore/KoSpeaker.cpp
+++ b/lib/kofficecore/KoSpeaker.cpp
@@ -1,4 +1,4 @@
-/* 
+/*
 *   This file is part of the KDE/KOffice project.
 *   Copyright (C) 2005, Gary Cramblitt <garycramblitt@comcast.net>
 *
@@ -371,10 +371,10 @@ bool KoSpeaker::maybeSayWidget(TQWidget* w, const TQPoint& pos /*=TQPoint()*/)
     else
     if (w->inherits("TQComboBox"))
         text = dynamic_cast<TQComboBox *>(w)->currentText();
-    else 
+    else
     if (w->inherits("TQLineEdit"))
         text = dynamic_cast<TQLineEdit *>(w)->text();
-    else 
+    else
     if (w->inherits("TQTextEdit"))
         text = dynamic_cast<TQTextEdit *>(w)->text();
     else
diff --git a/lib/kofficeui/KoInsertLink.cpp b/lib/kofficeui/KoInsertLink.cpp
index 03609b327..ddd27f612 100644
--- a/lib/kofficeui/KoInsertLink.cpp
+++ b/lib/kofficeui/KoInsertLink.cpp
@@ -242,7 +242,7 @@ internetLinkPage::internetLinkPage( TQWidget *parent , char *name  )
   lay2->addWidget(m_hrefName);
 
   lay2->addStretch( 1 );
-  
+
   m_linkName->setFocus();
 
   connect(m_linkName,TQ_SIGNAL(textChanged ( const TQString & )),this,TQ_SLOT(textChanged ( const TQString & )));
@@ -315,7 +315,7 @@ bookmarkLinkPage::bookmarkLinkPage( TQWidget *parent , char *name  )
   lay2->addWidget(m_hrefName);
 
   lay2->addStretch( 1 );
-  
+
   m_linkName->setFocus();
 
   connect(m_linkName,TQ_SIGNAL(textChanged ( const TQString & )),this,TQ_SLOT(textChanged ( const TQString & )));
@@ -396,7 +396,7 @@ mailLinkPage::mailLinkPage( TQWidget *parent , char *name  )
 
   lay2->addWidget(m_hrefName);
   lay2->addStretch( 1 );
-  
+
   connect(m_linkName,TQ_SIGNAL(textChanged ( const TQString & )),this,TQ_SLOT(textChanged ( const TQString & )));
   connect(m_hrefName,TQ_SIGNAL(textChanged ( const TQString & )),this,TQ_SLOT(textChanged ( const TQString & )));
   KSeparator* bar1 = new KSeparator( KSeparator::HLine, this);
@@ -483,9 +483,9 @@ fileLinkPage::fileLinkPage( TQWidget *parent , char *name  )
   }
   else
       recentFile->insertStringList( lst);
-  
+
   recentFile->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed );
-  
+
   connect( recentFile , TQ_SIGNAL(highlighted ( const TQString &)), this,  TQ_SLOT( slotSelectRecentFile( const TQString & )));
 
   tmpTQLabel = new TQLabel( this);
diff --git a/lib/kofficeui/KoSelectAction.cpp b/lib/kofficeui/KoSelectAction.cpp
index d8542ec5c..3cc02db3a 100644
--- a/lib/kofficeui/KoSelectAction.cpp
+++ b/lib/kofficeui/KoSelectAction.cpp
@@ -40,13 +40,13 @@ class KoSelectAction::KoSelectActionPrivate
       m_popup = new TDEPopupMenu(0L,"KoLineStyleAction::popup");
       m_currentSelection = 0;
     }
-    
+
     ~KoSelectActionPrivate()
     {
       delete m_popup;
       m_popup = 0;
     }
-    
+
     TDEPopupMenu* m_popup;
     int m_currentSelection;
 };
@@ -56,7 +56,7 @@ KoSelectAction::KoSelectAction(const TQString &text, const TQString& icon,
 {
   d = new KoSelectActionPrivate;
   setShowCurrentSelection(true);
-  
+
   connect(popupMenu(), TQ_SIGNAL(activated(int)), this, TQ_SLOT(execute(int)));
 }
 
@@ -64,7 +64,7 @@ KoSelectAction::KoSelectAction(const TQString &text, const TQString& icon, const
   const char* slot, TQObject* parent, const char* name) : TDEAction(text, icon, 0, parent, name)
 {
   d = new KoSelectActionPrivate;
-  
+
   connect(this, TQ_SIGNAL(selectionChanged(int)), receiver, slot);
   connect(popupMenu(), TQ_SIGNAL(activated(int)), this, TQ_SLOT(execute(int)));
 }
diff --git a/lib/kofficeui/KoTemplateChooseDia.cpp b/lib/kofficeui/KoTemplateChooseDia.cpp
index 719d0310f..4cda2503e 100644
--- a/lib/kofficeui/KoTemplateChooseDia.cpp
+++ b/lib/kofficeui/KoTemplateChooseDia.cpp
@@ -471,7 +471,7 @@ void KoTemplateChooseDia::setupTemplateDialog(TQWidget * widgetbase, TQGridLayou
 	d->m_jwidget->showPage(templateNum);
     else if ( defaultTemplateGroup != -1)
 	d->m_jwidget->showPage(defaultTemplateGroup);
-    
+
 
     // Set the initially selected template, possibly from the last usage of the dialog
     currentChanged(itemtoselect);
-- 
cgit v1.2.3

