diff --git a/filters/kspread/libkspreadexport/KSpreadLeader.cc b/filters/kspread/libkspreadexport/KSpreadLeader.cc index b1b9a0aa..8e300c7d 100644 --- a/filters/kspread/libkspreadexport/KSpreadLeader.cc +++ b/filters/kspread/libkspreadexport/KSpreadLeader.cc @@ -186,8 +186,8 @@ KoFilter::ConversionStatus Leader::doSpreadBook(KSpreadDoc *document) { docSpreadBookProperty["dateformat"] = document->locale()->dateFormat(); docSpreadBookProperty["dateformatshort"] = document->locale()->dateFormatShort(); docSpreadBookProperty["timeformat"] = document->locale()->timeFormat(); - docSpreadBookProperty["defaultlanguage"] = KLocale::defaultLanguage(); - docSpreadBookProperty["defaultcountry"] = KLocale::defaultCountry(); + docSpreadBookProperty["defaultlanguage"] = TDELocale::defaultLanguage(); + docSpreadBookProperty["defaultcountry"] = TDELocale::defaultCountry(); docSpreadBookProperty["defaultgridpencolorname"] = document->defaultGridPen().color().name(); docSpreadBookProperty["defaultgridpencolorred"] = TQString::number(document->defaultGridPen().color().red()); docSpreadBookProperty["defaultgridpencolorgreen"] = TQString::number(document->defaultGridPen().color().green()); diff --git a/filters/kspread/opencalc/opencalcexport.cc b/filters/kspread/opencalc/opencalcexport.cc index 04e25541..f092d6b1 100644 --- a/filters/kspread/opencalc/opencalcexport.cc +++ b/filters/kspread/opencalc/opencalcexport.cc @@ -832,13 +832,13 @@ void OpenCalcExport::exportDefaultCellStyle( TQDomDocument & doc, TQDomElement & Doc * ksdoc = static_cast(document); Format * format = new Format( 0, ksdoc->styleManager()->defaultStyle() ); - const KLocale *locale = ksdoc->locale(); + const TDELocale *locale = ksdoc->locale(); TQString language; TQString country; TQString charSet; TQString l( locale->language() ); - KLocale::splitLocale( l, language, country, charSet ); + TDELocale::splitLocale( l, language, country, charSet ); TQFont font( format->font() ); m_styles.addFont( font, true ); diff --git a/filters/kspread/opencalc/opencalcexport.h b/filters/kspread/opencalc/opencalcexport.h index 173c1cd3..837e4934 100644 --- a/filters/kspread/opencalc/opencalcexport.h +++ b/filters/kspread/opencalc/opencalcexport.h @@ -28,7 +28,7 @@ class TQDomDocument; class TQDomElement; -class KLocale; +class TDELocale; class KoStore; namespace KSpread @@ -84,7 +84,7 @@ class OpenCalcExport : public KoFilter TQString convertFormula( TQString const & formula ) const; private: /// Pointer to the KSpread locale - KLocale* m_locale; + TDELocale* m_locale; }; #endif diff --git a/filters/kword/oowriter/oowriterimport.cc b/filters/kword/oowriter/oowriterimport.cc index 07262c86..6bd88ec9 100644 --- a/filters/kword/oowriter/oowriterimport.cc +++ b/filters/kword/oowriter/oowriterimport.cc @@ -749,7 +749,7 @@ void OoWriterImport::importDateTimeStyle( const TQDomElement& parent ) #if 0 // TQDate doesn't work both ways!!! It can't parse something back from // a string and a format (e.g. 01/02/03 and dd/MM/yy, it will assume MM/dd/yy). - // So we also need to generate a KLocale-like format, to parse the value + // So we also need to generate a TDELocale-like format, to parse the value // Update: we don't need to parse the date back. TQString kdeFormat; @@ -776,13 +776,13 @@ void OoWriterImport::importDateTimeStyle( const TQDomElement& parent ) } else if ( localName == "year" ) { kdeFormat += shortForm ? "%y" : "%Y"; } else if ( localName == "week-of-year" || localName == "quarter") { - // ### not supported in KLocale + // ### not supported in TDELocale } else if ( localName == "hours" ) { kdeFormat += shortForm ? "%k" : "%H"; // TODO should depend on presence of am/pm } else if ( localName == "minutes" ) { - kdeFormat += shortForm ? "%M" : "%M"; // KLocale doesn't have 1-digit minutes + kdeFormat += shortForm ? "%M" : "%M"; // TDELocale doesn't have 1-digit minutes } else if ( localName == "seconds" ) { - kdeFormat += shortForm ? "%S" : "%S"; // KLocale doesn't have 1-digit seconds + kdeFormat += shortForm ? "%S" : "%S"; // TDELocale doesn't have 1-digit seconds } else if ( localName == "am-pm" ) { kdeFormat += "%p"; } else if ( localName == "text" ) { // litteral diff --git a/filters/kword/rtf/export/ExportFilter.cc b/filters/kword/rtf/export/ExportFilter.cc index 14f0f2a0..14dce1e2 100644 --- a/filters/kword/rtf/export/ExportFilter.cc +++ b/filters/kword/rtf/export/ExportFilter.cc @@ -604,9 +604,9 @@ TQString RTFWorker::ProcessParagraphData ( const TQString ¶Text, key += TDEGlobal::locale()->timeFormat(); } - kdDebug(30515) << "Locale date in KLocale format: " << key << endl; + kdDebug(30515) << "Locale date in TDELocale format: " << key << endl; - // KLocale's key differ from KWord + // TDELocale's key differ from KWord // Date key.replace( "%Y", "yyyy" ); // Year 4 digits @@ -620,15 +620,15 @@ TQString RTFWorker::ProcessParagraphData ( const TQString ¶Text, key.replace( "%a", "ddd" ); // Day 3 letters key.replace( "%A", "dddd" ); // Day all letters // 12h - key.replace( "%p", "am/pm" ); // AM/PM (KLocale knows it only lower case) + key.replace( "%p", "am/pm" ); // AM/PM (TDELocale knows it only lower case) key.replace( "%I", "hh" ); // 12 hour 2 digits key.replace( "%l", "h" ); // 12 hour 1 digits // 24h key.replace( "%H", "HH" ); // 24 hour 2 digits key.replace( "%k", "H" ); // 24 hour 1 digit // Other times - key.replace( "%M", "mm" ); // minute 2 digits (KLocale knows it with 2 digits) - key.replace( "%S", "ss" ); // second 2 digits (KLocale knows it with 2 digits) + key.replace( "%M", "mm" ); // minute 2 digits (TDELocale knows it with 2 digits) + key.replace( "%S", "ss" ); // second 2 digits (TDELocale knows it with 2 digits) kdDebug(30515) << "Locale date in RTF format: " << key << endl; } diff --git a/karbon/karbon_part.cc b/karbon/karbon_part.cc index 47418a69..896b0450 100644 --- a/karbon/karbon_part.cc +++ b/karbon/karbon_part.cc @@ -635,7 +635,7 @@ KarbonPart::initConfig() undos = config->readNumEntry( "UndoRedo", -1 ); TQString defaultUnit = "cm"; - if( TDEGlobal::locale()->measureSystem() == KLocale::Imperial ) + if( TDEGlobal::locale()->measureSystem() == TDELocale::Imperial ) defaultUnit = "in"; setUnit( KoUnit::unit( config->readEntry( "Units", defaultUnit ) ) ); diff --git a/kexi/3rdparty/kolibs/koGlobal.cc b/kexi/3rdparty/kolibs/koGlobal.cc index fc21f3a5..24aa75ed 100644 --- a/kexi/3rdparty/kolibs/koGlobal.cc +++ b/kexi/3rdparty/kolibs/koGlobal.cc @@ -109,7 +109,7 @@ TQStringList KoGlobal::_listOfLanguages() void KoGlobal::createListOfLanguages() { TDEConfig config( "all_languages", true, false, "locale" ); - // Note that we could also use KLocale::allLanguagesTwoAlpha + // Note that we could also use TDELocale::allLanguagesTwoAlpha TQMap seenLanguages; const TQStringList langlist = config.groupList(); diff --git a/kexi/3rdparty/kolibs/koUnitWidgets.cc b/kexi/3rdparty/kolibs/koUnitWidgets.cc index 13ddf55b..3f6fb09e 100644 --- a/kexi/3rdparty/kolibs/koUnitWidgets.cc +++ b/kexi/3rdparty/kolibs/koUnitWidgets.cc @@ -97,7 +97,7 @@ TQString KoUnitDoubleBase::getVisibleText( double value ) const double KoUnitDoubleBase::toDouble( const TQString& str, bool* ok ) const { TQString str2( str ); - /* KLocale::readNumber wants the thousand separator exactly at 1000. + /* TDELocale::readNumber wants the thousand separator exactly at 1000. But when editing, it might be anywhere. So we need to remove it. */ const TQString sep( TDEGlobal::locale()->thousandsSeparator() ); if ( !sep.isEmpty() ) diff --git a/kexi/kexidb/utils.h b/kexi/kexidb/utils.h index 334ea20c..e535cd4b 100644 --- a/kexi/kexidb/utils.h +++ b/kexi/kexidb/utils.h @@ -304,7 +304,7 @@ namespace KexiDB For example, "12.345" becomes "12.345000" if N=6. No rounding is actually performed. - KLocale::formatNumber() and KLocale::decimalSymbol() are used to get locale settings. + TDELocale::formatNumber() and TDELocale::decimalSymbol() are used to get locale settings. @see KexiDB::Field::visibleDecimalPlaces() */ KEXI_DB_EXPORT TQString formatNumberForVisibleDecimalPlaces(double value, int decimalPlaces); diff --git a/kexi/main/printing/kexisimpleprintingpagesetup.cpp b/kexi/main/printing/kexisimpleprintingpagesetup.cpp index 158c3ffc..5d823a13 100644 --- a/kexi/main/printing/kexisimpleprintingpagesetup.cpp +++ b/kexi/main/printing/kexisimpleprintingpagesetup.cpp @@ -324,7 +324,7 @@ KexiSimplePrintingPageSetup::KexiSimplePrintingPageSetup( KexiMainWindow *mainWi // settings //! @todo default? - m_unit = KLocale::Metric == TDEGlobal::locale()->measureSystem() ? KoUnit::U_CM : KoUnit::U_INCH; + m_unit = TDELocale::Metric == TDEGlobal::locale()->measureSystem() ? KoUnit::U_CM : KoUnit::U_INCH; // GUI TQVBoxLayout *lyr = new TQVBoxLayout(this); diff --git a/kexi/widget/utils/kexidatetimeformatter.cpp b/kexi/widget/utils/kexidatetimeformatter.cpp index c6fe3460..6582b321 100644 --- a/kexi/widget/utils/kexidatetimeformatter.cpp +++ b/kexi/widget/utils/kexidatetimeformatter.cpp @@ -45,8 +45,8 @@ KexiDateFormatter::KexiDateFormatter() bool ok = df.length()>=8; int yearpos, monthpos, daypos; //result of df.find() if (ok) {//look at % variables -//! @todo more variables are possible here, see void KLocale::setDateFormatShort() docs -//! http://developer.kde.org/documentation/library/3.5-api/tdelibs-apidocs/tdecore/html/classKLocale.html#a59 +//! @todo more variables are possible here, see void TDELocale::setDateFormatShort() docs +//! http://developer.kde.org/documentation/library/3.5-api/tdelibs-apidocs/tdecore/html/classTDELocale.html#a59 yearpos = df.find("%y", 0, false); //&y or %y m_longYear = !(yearpos>=0 && df.mid(yearpos+1, 1)=="y"); if (!m_longYear) { diff --git a/kexi/widget/utils/kexidatetimeformatter.h b/kexi/widget/utils/kexidatetimeformatter.h index f011a0e2..4e916026 100644 --- a/kexi/widget/utils/kexidatetimeformatter.h +++ b/kexi/widget/utils/kexidatetimeformatter.h @@ -131,7 +131,7 @@ class KEXIGUIUTILS_EXPORT KexiTimeFormatter bool m_hoursWithLeadingZero; - //! Time format used in timeToString(). Notation from KLocale::setTimeFormat() is used. + //! Time format used in timeToString(). Notation from TDELocale::setTimeFormat() is used. TQString m_outputFormat; //! Used in stringToTime() to convert string back to TQTime diff --git a/kivio/kiviopart/kivioglobal.cpp b/kivio/kiviopart/kivioglobal.cpp index c794afea..669af992 100644 --- a/kivio/kiviopart/kivioglobal.cpp +++ b/kivio/kiviopart/kivioglobal.cpp @@ -1285,7 +1285,7 @@ TQString Kivio::systemDefaultUnit() { TQString defMS = "cm"; - if(TDEGlobal::locale()->measureSystem() == KLocale::Imperial) { + if(TDEGlobal::locale()->measureSystem() == TDELocale::Imperial) { defMS = "in"; } diff --git a/kplato/kptaccountsview.cc b/kplato/kptaccountsview.cc index 2527b5fe..89eb9c67 100644 --- a/kplato/kptaccountsview.cc +++ b/kplato/kptaccountsview.cc @@ -209,7 +209,7 @@ void AccountsView::slotUpdate() { //kdDebug()<calendar(); TQString t; diff --git a/kplato/kptganttview.cc b/kplato/kptganttview.cc index db077819..ffed6ad2 100644 --- a/kplato/kptganttview.cc +++ b/kplato/kptganttview.cc @@ -482,7 +482,7 @@ void GanttView::modifyProject(KDGanttViewItem *item, Node *node) void GanttView::modifySummaryTask(KDGanttViewItem *item, Task *task) { //kdDebug()<name()<<": "<currentSchedule()<<", "<notScheduled()<<", "<<(m_project ? m_project->notScheduled() : false)<currentSchedule() == 0) { item->setShowNoInformation(m_showNoInformation); @@ -530,7 +530,7 @@ void GanttView::modifySummaryTask(KDGanttViewItem *item, Task *task) void GanttView::modifyTask(KDGanttViewItem *item, Task *task) { //kdDebug()<name()<<": "<currentSchedule()<<", "<notScheduled()<<", "<<(m_project ? m_project->notScheduled() : false)<setListViewText(task->name()); item->setListViewText(1, task->wbs()); @@ -652,7 +652,7 @@ void GanttView::modifyTask(KDGanttViewItem *item, Task *task) void GanttView::modifyMilestone(KDGanttViewItem *item, Task *task) { //kdDebug()<name()<<": "<currentSchedule()<<", "<notScheduled()<<", "<<(m_project ? m_project->notScheduled() : false)<currentSchedule() == 0) { item->setShowNoInformation(m_showNoInformation); diff --git a/kplato/kptreportview.cc b/kplato/kptreportview.cc index 24a541f4..1e893ccf 100644 --- a/kplato/kptreportview.cc +++ b/kplato/kptreportview.cc @@ -79,7 +79,7 @@ public: TQString getData(TQString tag) const { //kdDebug()<calendar(); const Calendar *resCal = m_resource->calendar(); const TQDateTime availFrom = m_resource->availableFrom(); diff --git a/kplato/kpttaskappointmentsview.cc b/kplato/kpttaskappointmentsview.cc index 7c9288a3..c38cc3ce 100644 --- a/kplato/kpttaskappointmentsview.cc +++ b/kplato/kpttaskappointmentsview.cc @@ -108,7 +108,7 @@ void TaskAppointmentsView::slotUpdate() { return; TQApplication::setOverrideCursor(TQt::waitCursor); createSlaveItems(); - KLocale *locale = TDEGlobal::locale(); + TDELocale *locale = TDEGlobal::locale(); const KCalendarSystem *cal = locale->calendar(); // Add columns for selected period/periods diff --git a/kspread/dialogs/kspread_dlg_layout.h b/kspread/dialogs/kspread_dlg_layout.h index 03c8486b..657850c7 100644 --- a/kspread/dialogs/kspread_dlg_layout.h +++ b/kspread/dialogs/kspread_dlg_layout.h @@ -518,7 +518,7 @@ public: bool isSingleCell() { return ( left == right && top == bottom ); } bool checkCircle( TQString const & name, TQString const & parent ); - KLocale * locale() const { return m_pView->doc()->locale(); } + TDELocale * locale() const { return m_pView->doc()->locale(); } struct CellBorderFormat diff --git a/kspread/dialogs/kspread_dlg_preference.cc b/kspread/dialogs/kspread_dlg_preference.cc index b26e2816..a14312d2 100644 --- a/kspread/dialogs/kspread_dlg_preference.cc +++ b/kspread/dialogs/kspread_dlg_preference.cc @@ -157,7 +157,7 @@ parameterLocale::parameterLocale( View* _view, TQVBox *box , char *name ) m_bUpdateLocale=false; TQGroupBox* tmpTQGroupBox = new TQVGroupBox( i18n("Settings"), box, "GroupBox" ); - KLocale* locale=_view->doc()->locale(); + TDELocale* locale=_view->doc()->locale(); m_language=new TQLabel( tmpTQGroupBox,"label"); m_number=new TQLabel( tmpTQGroupBox,"label6"); @@ -186,11 +186,11 @@ void parameterLocale::updateDefaultSystemConfig() { m_bUpdateLocale=true; static_cast(m_pView->doc()->locale())->defaultSystemConfig( ); - KLocale* locale=m_pView->doc()->locale(); + TDELocale* locale=m_pView->doc()->locale(); updateToMatchLocale( locale ); } -void parameterLocale::updateToMatchLocale(KLocale* locale) +void parameterLocale::updateToMatchLocale(TDELocale* locale) { m_language->setText( i18n("Language: %1").arg( locale->language() )); m_number->setText( i18n("Default number format: %1").arg( locale->formatNumber(12.55) )); diff --git a/kspread/dialogs/kspread_dlg_preference.h b/kspread/dialogs/kspread_dlg_preference.h index bdd2af09..484f26a2 100644 --- a/kspread/dialogs/kspread_dlg_preference.h +++ b/kspread/dialogs/kspread_dlg_preference.h @@ -57,7 +57,7 @@ public slots: /** * Updates the GUI widgets to match the specified locale. */ - void updateToMatchLocale(KLocale* locale); + void updateToMatchLocale(TDELocale* locale); TQLabel *m_shortDate,*m_time,*m_money,*m_date,*m_language,*m_number; TQPushButton *m_updateButton; diff --git a/kspread/formula.cc b/kspread/formula.cc index 45cf8d02..b357151b 100644 --- a/kspread/formula.cc +++ b/kspread/formula.cc @@ -425,7 +425,7 @@ bool Formula::isValid() const { if( d->dirty ) { - KLocale* locale = d->cell ? d->cell->locale() : 0; + TDELocale* locale = d->cell ? d->cell->locale() : 0; if ((!locale) && d->sheet) locale = d->sheet->doc()->locale(); Tokens tokens = scan( d->expression, locale ); @@ -455,13 +455,13 @@ void Formula::clear() Tokens Formula::tokens() const { - KLocale* locale = d->cell ? d->cell->locale() : 0; + TDELocale* locale = d->cell ? d->cell->locale() : 0; if ((!locale) && d->sheet) locale = d->sheet->doc()->locale(); return scan( d->expression, locale ); } -Tokens Formula::scan( const TQString& expr, KLocale* locale ) const +Tokens Formula::scan( const TQString& expr, TDELocale* locale ) const { // to hold the result Tokens tokens; diff --git a/kspread/formula.h b/kspread/formula.h index 8ece47c5..18b1d176 100644 --- a/kspread/formula.h +++ b/kspread/formula.h @@ -23,7 +23,7 @@ #include #include -class KLocale; +class TDELocale; namespace KSpread { @@ -304,7 +304,7 @@ class Formula * If the expression contains error (e.g. unknown operator, string no terminated) * this function returns tokens which is not valid. */ - Tokens scan( const TQString& expr, KLocale* locale = 0 ) const; + Tokens scan( const TQString& expr, TDELocale* locale = 0 ) const; TQString dump() const; diff --git a/kspread/kspread_cell.cc b/kspread/kspread_cell.cc index 7e2d85cd..d8799d9f 100644 --- a/kspread/kspread_cell.cc +++ b/kspread/kspread_cell.cc @@ -404,7 +404,7 @@ TQString Cell::columnName() const return columnName( d->column ); } -KLocale* Cell::locale() const +TDELocale* Cell::locale() const { return d->format->sheet()->doc()->locale(); } @@ -6814,9 +6814,9 @@ bool Cell::loadCellData(const TQDomElement & text, Paste::Operation op ) kdWarning(36001) << "Couldn't parse '" << t << "' as number." << endl; } /* We will need to localize the text version of the number */ - KLocale* locale = format()->sheet()->doc()->locale(); + TDELocale* locale = format()->sheet()->doc()->locale(); - /* KLocale::formatNumber requires the precision we want to return. + /* TDELocale::formatNumber requires the precision we want to return. */ int precision = t.length() - t.find('.') - 1; diff --git a/kspread/kspread_cell.h b/kspread/kspread_cell.h index fd100c45..588ae12d 100644 --- a/kspread/kspread_cell.h +++ b/kspread/kspread_cell.h @@ -41,7 +41,7 @@ #include "kspread_condition.h" -class KLocale; +class TDELocale; class TQDomElement; class TQDomDocument; class KoXmlWriter; @@ -211,7 +211,7 @@ public: /** * Returns the locale setting of this cell. */ - KLocale* locale() const; + TDELocale* locale() const; /** * Returns true if this cell holds a formula. */ diff --git a/kspread/kspread_doc.cc b/kspread/kspread_doc.cc index 09611b95..6b11b6da 100644 --- a/kspread/kspread_doc.cc +++ b/kspread/kspread_doc.cc @@ -95,7 +95,7 @@ class Doc::Private public: Map *map; - KLocale *locale; + TDELocale *locale; StyleManager *styleManager; ValueParser *parser; ValueFormatter *formatter; @@ -395,7 +395,7 @@ void Doc::initEmpty() KoDocument::initEmpty(); } -KLocale *Doc::locale () const +TDELocale *Doc::locale () const { return d->locale; } diff --git a/kspread/kspread_doc.h b/kspread/kspread_doc.h index 40a6e48c..f734d6fb 100644 --- a/kspread/kspread_doc.h +++ b/kspread/kspread_doc.h @@ -151,7 +151,7 @@ public: */ virtual TQCString mimeType() const { return MIME_TYPE; } - KLocale *locale () const; + TDELocale *locale () const; Map *map () const; StyleManager *styleManager () const; ValueParser *parser () const; diff --git a/kspread/kspread_format.h b/kspread/kspread_format.h index 41e3f0ae..5af772b8 100644 --- a/kspread/kspread_format.h +++ b/kspread/kspread_format.h @@ -34,7 +34,7 @@ class TQDomElement; class TQDomDocument; class DCOPObject; -class KLocale; +class TDELocale; class KoGenStyle; class KoGenStyles; class KoOasisLoadingContext; diff --git a/kspread/kspread_functions_text.cc b/kspread/kspread_functions_text.cc index e61aff93..432bfc28 100644 --- a/kspread/kspread_functions_text.cc +++ b/kspread/kspread_functions_text.cc @@ -252,7 +252,7 @@ Value func_dollar (valVector args, ValueCalc *calc, FuncExtra *) // do round, because formatMoney doesn't value = floor (value * pow (10.0, precision) + 0.5) / pow (10.0, precision); - KLocale *locale = calc->conv()->locale(); + TDELocale *locale = calc->conv()->locale(); TQString s = locale->formatMoney (value, locale->currencySymbol(), precision); return Value (s); @@ -303,9 +303,9 @@ Value func_fixed (valVector args, ValueCalc *calc, FuncExtra *) no_commas = calc->conv()->asBoolean (args[2]).asBoolean(); TQString result; - KLocale *locale = calc->conv()->locale(); + TDELocale *locale = calc->conv()->locale(); - // unfortunately, we can't just use KLocale::formatNumber because + // unfortunately, we can't just use TDELocale::formatNumber because // * if decimals < 0, number is rounded // * if no_commas is true, thousand separators shouldn't show up diff --git a/kspread/kspread_locale.cc b/kspread/kspread_locale.cc index fbbfbfbf..fc665f0a 100644 --- a/kspread/kspread_locale.cc +++ b/kspread/kspread_locale.cc @@ -5,7 +5,7 @@ using namespace KSpread; Locale::Locale() - : KLocale("kspread") + : TDELocale("kspread") { insertCatalogue("koffice"); } @@ -84,7 +84,7 @@ TQDomElement Locale::save( TQDomDocument& doc ) const void Locale::defaultSystemConfig( ) { - KLocale locale("kspread"); + TDELocale locale("kspread"); setWeekStartDay( locale.weekStartDay() ); setDecimalSymbol( locale.decimalSymbol()); setThousandsSeparator( locale.thousandsSeparator() ); diff --git a/kspread/kspread_locale.h b/kspread/kspread_locale.h index 7b3041e7..12081731 100644 --- a/kspread/kspread_locale.h +++ b/kspread/kspread_locale.h @@ -9,7 +9,7 @@ class TQDomDocument; namespace KSpread { -class Locale : public KLocale +class Locale : public TDELocale { public: Locale(); diff --git a/kspread/kspread_numformat.cc b/kspread/kspread_numformat.cc index 906086f9..769aa61a 100644 --- a/kspread/kspread_numformat.cc +++ b/kspread/kspread_numformat.cc @@ -253,7 +253,7 @@ void resetGlobals() g_convertionInfo.ampm = false; } -void initGlobals( KLocale const * const locale ) +void initGlobals( TDELocale const * const locale ) { g_Monday = locale->calendar()->weekDayName( 1, false ); g_Tuesday = locale->calendar()->weekDayName( 2, false ); @@ -438,7 +438,7 @@ void createScientificStruct( BaseFormat * data, TQString const & format, bool in } -int doPreScan( TQString & format, TQString const & formatBack, KLocale const * const /* locale */, +int doPreScan( TQString & format, TQString const & formatBack, TDELocale const * const /* locale */, bool insert, BaseFormat * data ) { int type = g_formatStore.getType( format, data ); @@ -1571,7 +1571,7 @@ void createDateTime( TQString & result, Value const & value, } TQString formatNumber( Value const & value, TQString format, bool & setRed, - KLocale const * const locale, bool insert ) + TDELocale const * const locale, bool insert ) { // need delocalized strings: dcSymbol: '.', thSymbol = ',' if ( !g_init ) diff --git a/kspread/kspread_util.cc b/kspread/kspread_util.cc index 81761bad..3950c5b9 100644 --- a/kspread/kspread_util.cc +++ b/kspread/kspread_util.cc @@ -1015,7 +1015,7 @@ bool KSpread::localReferenceAnchor( const TQString &_ref ) } -TQString KSpread::Oasis::decodeFormula(const TQString& expr, const KLocale* locale) +TQString KSpread::Oasis::decodeFormula(const TQString& expr, const TDELocale* locale) { // parsing state enum { Start, InNumber, InString, InIdentifier, InReference, InSheetName } state; @@ -1208,7 +1208,7 @@ TQString KSpread::Oasis::decodeFormula(const TQString& expr, const KLocale* loca return result; } -/*TQString KSpread::Oasis::encodeFormula(const TQString& expr, const KLocale* locale) +/*TQString KSpread::Oasis::encodeFormula(const TQString& expr, const TDELocale* locale) { // TODO move Cell::convertFormulaToOasisFormat to this point //expr = "not here yet"; diff --git a/kspread/kspread_util.h b/kspread/kspread_util.h index fc39708b..ad5227f8 100644 --- a/kspread/kspread_util.h +++ b/kspread/kspread_util.h @@ -35,7 +35,7 @@ class TQPen; class TQDomElement; class TQDomDocument; -class KLocale; +class TDELocale; bool util_isPointValid(TQPoint point); bool util_isRectValid(TQRect rect); @@ -340,14 +340,14 @@ namespace Oasis * @param locale The locale to which the expression should be converted. */ // TODO check visibility - KSPREAD_EXPORT TQString decodeFormula(const TQString& expr, const KLocale* locale = 0); + KSPREAD_EXPORT TQString decodeFormula(const TQString& expr, const TDELocale* locale = 0); /** * Converts a localized formula/cell reference to an OpenDocument * representation of a formula/cell reference. * @param expr The expression to convert to OpenDocument format. * @param locale The locale from which the expression should be converted. */ - KSPREAD_EXPORT TQString encodeFormula(const TQString& expr, const KLocale* locale = 0); + KSPREAD_EXPORT TQString encodeFormula(const TQString& expr, const TDELocale* locale = 0); } } // namespace KSpread diff --git a/kspread/tests/formula_tester.cc b/kspread/tests/formula_tester.cc index 19a70d61..97993c82 100644 --- a/kspread/tests/formula_tester.cc +++ b/kspread/tests/formula_tester.cc @@ -414,7 +414,7 @@ void FormulaOasisConversionTester::checkOasis( const char *file, int line, const { testCount++; - KLocale locale("en_US"); + TDELocale locale("en_US"); locale.setDecimalSymbol(","); // KSpread -> OpenDocument diff --git a/kspread/valueconverter.cc b/kspread/valueconverter.cc index cd649c36..21cb7531 100644 --- a/kspread/valueconverter.cc +++ b/kspread/valueconverter.cc @@ -28,7 +28,7 @@ ValueConverter::ValueConverter (ValueParser* p) : parser( p ) { } -KLocale* ValueConverter::locale() +TDELocale* ValueConverter::locale() { return parser->locale(); } diff --git a/kspread/valueconverter.h b/kspread/valueconverter.h index 367d08ae..3657aeec 100644 --- a/kspread/valueconverter.h +++ b/kspread/valueconverter.h @@ -20,7 +20,7 @@ #ifndef KSPREAD_VALUECONVERTER #define KSPREAD_VALUECONVERTER -class KLocale; +class TDELocale; #include "kspread_value.h" @@ -48,7 +48,7 @@ class ValueConverter { Value asDate (const Value &value) const; Value asTime (const Value &value) const; - KLocale* locale(); + TDELocale* locale(); private: ValueParser *parser; diff --git a/kspread/valueparser.cc b/kspread/valueparser.cc index ff5b4b8c..08ebe628 100644 --- a/kspread/valueparser.cc +++ b/kspread/valueparser.cc @@ -27,11 +27,11 @@ using namespace KSpread; -ValueParser::ValueParser( KLocale* locale ) : parserLocale( locale ) +ValueParser::ValueParser( TDELocale* locale ) : parserLocale( locale ) { } -KLocale* ValueParser::locale() +TDELocale* ValueParser::locale() { return parserLocale; } @@ -364,7 +364,7 @@ Value ValueParser::tryParseDate (const TQString& str, bool *ok) { // Note: if shortdate format only specifies 2 digits year, then 3/4/1955 // will be treated as in year 3055, while 3/4/55 as year 2055 - // (because 55 < 69, see KLocale) and thus there's no way to enter for + // (because 55 < 69, see TDELocale) and thus there's no way to enter for // year 1995 // The following fixes the problem, 3/4/1955 will always be 1955 @@ -374,11 +374,11 @@ Value ValueParser::tryParseDate (const TQString& str, bool *ok) tmpDate = tmpDate.addYears( -1900 ); // this is another HACK ! - // with two digit years, 0-69 is treated as year 2000-2069 (see KLocale) + // with two digit years, 0-69 is treated as year 2000-2069 (see TDELocale) // however, in Excel only 0-29 is year 2000-2029, 30 or later is 1930 // onwards - // the following provides workaround for KLocale so we're compatible + // the following provides workaround for TDELocale so we're compatible // with Excel // (e.g 3/4/45 is Mar 4, 1945 not Mar 4, 2045) if( ( tmpDate.year() >= 2030 ) && ( tmpDate.year() <= 2069 ) ) diff --git a/kspread/valueparser.h b/kspread/valueparser.h index 120c2734..0d00aa49 100644 --- a/kspread/valueparser.h +++ b/kspread/valueparser.h @@ -25,7 +25,7 @@ #include "kspread_global.h" -class KLocale; +class TDELocale; namespace KSpread { @@ -40,9 +40,9 @@ Value in the desired format. class ValueParser { public: /** constructor */ - ValueParser (KLocale *locale); + ValueParser (TDELocale *locale); - KLocale* locale(); + TDELocale* locale(); /** try to parse the text in a given cell and set value accordingly */ void parse (const TQString& str, Cell *cell); @@ -56,7 +56,7 @@ class ValueParser { Value tryParseTime (const TQString& str, bool *ok = 0); protected: - KLocale* parserLocale; + TDELocale* parserLocale; // Try to parse the text as a bool/number/date/time/etc. // Helpers for parse. diff --git a/kugar/kudesigner/main.cpp b/kugar/kudesigner/main.cpp index afe985d7..939f9764 100644 --- a/kugar/kudesigner/main.cpp +++ b/kugar/kudesigner/main.cpp @@ -35,7 +35,7 @@ static const KCmdLineOptions options[] = extern "C" KUGARDESIGNER_EXPORT int kdemain( int argc, char **argv ) { - KLocale::setMainCatalogue( "kugar" ); + TDELocale::setMainCatalogue( "kugar" ); TDECmdLineArgs::init( argc, argv, newKudesignerAboutData() ); TDECmdLineArgs::addCmdLineOptions( options ); KoApplication app; diff --git a/kword/KWStatisticsDialog.cpp b/kword/KWStatisticsDialog.cpp index e1a371f5..9b1f462a 100644 --- a/kword/KWStatisticsDialog.cpp +++ b/kword/KWStatisticsDialog.cpp @@ -110,7 +110,7 @@ void KWStatisticsDialog::slotRefreshValue(bool state) void KWStatisticsDialog::calcGeneral( TQLabel **resultLabel ) { - KLocale *locale = TDEGlobal::locale(); + TDELocale *locale = TDEGlobal::locale(); resultLabel[0]->setText( locale->formatNumber( m_doc->pageCount(), 0) ); int table =0; @@ -194,7 +194,7 @@ bool KWStatisticsDialog::calcStats( TQLabel **resultLabel, bool selection, bool } // assign results - KLocale *locale = TDEGlobal::locale(); + TDELocale *locale = TDEGlobal::locale(); resultLabel[0]->setText( locale->formatNumber( charsWithSpace, 0) ); resultLabel[1]->setText( locale->formatNumber( charsWithoutSpace, 0 ) ); resultLabel[2]->setText( locale->formatNumber( syllables, 0 ) ); diff --git a/lib/kofficecore/KoDocument.cpp b/lib/kofficecore/KoDocument.cpp index c657ee32..15e7b892 100644 --- a/lib/kofficecore/KoDocument.cpp +++ b/lib/kofficecore/KoDocument.cpp @@ -112,7 +112,7 @@ public: { m_confirmNonNativeSave[0] = true; m_confirmNonNativeSave[1] = true; - if ( TDEGlobal::locale()->measureSystem() == KLocale::Imperial ) { + if ( TDEGlobal::locale()->measureSystem() == TDELocale::Imperial ) { m_unit = KoUnit::U_INCH; } else { m_unit = KoUnit::U_CM; diff --git a/lib/kofficecore/KoGlobal.cpp b/lib/kofficecore/KoGlobal.cpp index 40050232..78c39540 100644 --- a/lib/kofficecore/KoGlobal.cpp +++ b/lib/kofficecore/KoGlobal.cpp @@ -112,7 +112,7 @@ TQStringList KoGlobal::_listOfLanguages() void KoGlobal::createListOfLanguages() { TDEConfig config( "all_languages", true, false, "locale" ); - // Note that we could also use KLocale::allLanguagesTwoAlpha + // Note that we could also use TDELocale::allLanguagesTwoAlpha TQMap seenLanguages; const TQStringList langlist = config.groupList(); diff --git a/lib/kofficeui/KoUnitWidgets.cpp b/lib/kofficeui/KoUnitWidgets.cpp index 3599c76a..0b9f26e7 100644 --- a/lib/kofficeui/KoUnitWidgets.cpp +++ b/lib/kofficeui/KoUnitWidgets.cpp @@ -98,7 +98,7 @@ TQString KoUnitDoubleBase::getVisibleText( double value ) const double KoUnitDoubleBase::toDouble( const TQString& str, bool* ok ) const { TQString str2( str ); - /* KLocale::readNumber wants the thousand separator exactly at 1000. + /* TDELocale::readNumber wants the thousand separator exactly at 1000. But when editing, it might be anywhere. So we need to remove it. */ const TQString sep( TDEGlobal::locale()->thousandsSeparator() ); if ( !sep.isEmpty() ) diff --git a/lib/kotext/KoAutoFormat.cpp b/lib/kotext/KoAutoFormat.cpp index b46973b3..1a3c5245 100644 --- a/lib/kotext/KoAutoFormat.cpp +++ b/lib/kotext/KoAutoFormat.cpp @@ -166,7 +166,7 @@ KoAutoFormat::KoAutoFormat( KoDocument *_doc, KoVariableCollection *_varCollecti loadListOfWordCompletion(); m_listCompletion->setIgnoreCase( true ); updateMaxWords(); - KLocale klocale(m_doc->instance()->instanceName()); + TDELocale klocale(m_doc->instance()->instanceName()); for (int i = 1; i <=7; i++) { m_cacheNameOfDays.append(klocale.calendar()->weekDayName( i ).lower()); @@ -391,7 +391,7 @@ void KoAutoFormat::readConfig(bool force) void KoAutoFormat::readAutoCorrectConfig() { Q_ASSERT( m_entries.isEmpty() ); // readConfig is only called once... - KLocale klocale(m_doc->instance()->instanceName()); + TDELocale klocale(m_doc->instance()->instanceName()); TQString kdelang = klocale.languageList().front(); kdelang.remove( TQRegExp( "@.*" ) ); kdDebug(32500) << "KoAutoFormat: m_autoFormatLanguage=" << m_autoFormatLanguage << " kdelang=" << kdelang << endl; @@ -616,7 +616,7 @@ void KoAutoFormat::loadEntry( const TQDomElement &nl, bool _allLanguages) void KoAutoFormat::saveConfig() { TDEConfig* config = KoGlobal::kofficeConfig(); - KLocale klocale(m_doc->instance()->instanceName()); + TDELocale klocale(m_doc->instance()->instanceName()); TDEConfigGroupSaver cgs( config, "AutoFormat" ); config->writeEntry( "ConvertUpperCase", m_convertUpperCase );