summaryrefslogtreecommitdiffstats
path: root/lib/kotext/KoVariable.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 13:23:24 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 13:23:24 -0600
commit5b8ab149469c8e186ee8b05d90c0103ae722dd85 (patch)
treefb31321c80b12ee8e2237bdcf8c228fe44e67772 /lib/kotext/KoVariable.cpp
parentfe33d391dd7c9da0f83e779344a17e2e445b70a8 (diff)
downloadkoffice-5b8ab149469c8e186ee8b05d90c0103ae722dd85.tar.gz
koffice-5b8ab149469c8e186ee8b05d90c0103ae722dd85.zip
Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4
Diffstat (limited to 'lib/kotext/KoVariable.cpp')
-rw-r--r--lib/kotext/KoVariable.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/lib/kotext/KoVariable.cpp b/lib/kotext/KoVariable.cpp
index 489752f0..6b040905 100644
--- a/lib/kotext/KoVariable.cpp
+++ b/lib/kotext/KoVariable.cpp
@@ -235,18 +235,18 @@ TQString KoVariableDateFormat::convert( const TQVariant& data ) const
return i18n("No date set"); // e.g. old KWord documents
if (m_strFormat.lower() == "locale" || m_strFormat.isEmpty())
- return KGlobal::locale()->formatDate( dateTime.date(), false );
+ return TDEGlobal::locale()->formatDate( dateTime.date(), false );
else if ( m_strFormat.lower() == "localeshort" )
- return KGlobal::locale()->formatDate( dateTime.date(), true );
+ return TDEGlobal::locale()->formatDate( dateTime.date(), true );
else if ( m_strFormat.lower() == "localedatetime" )
- return KGlobal::locale()->formatDateTime( dateTime, false );
+ return TDEGlobal::locale()->formatDateTime( dateTime, false );
else if ( m_strFormat.lower() == "localedatetimeshort" )
- return KGlobal::locale()->formatDateTime( dateTime, true );
+ return TDEGlobal::locale()->formatDateTime( dateTime, true );
TQString tmp ( dateTime.toString(m_strFormat) );
const int month = dateTime.date().month();
- tmp.replace("PPPP", KGlobal::locale()->calendar()->monthNamePossessive(month, false)); //long possessive month name
- tmp.replace("PPP", KGlobal::locale()->calendar()->monthNamePossessive(month, true)); //short possessive month name
+ tmp.replace("PPPP", TDEGlobal::locale()->calendar()->monthNamePossessive(month, false)); //long possessive month name
+ tmp.replace("PPP", TDEGlobal::locale()->calendar()->monthNamePossessive(month, true)); //short possessive month name
return tmp;
}
@@ -350,7 +350,7 @@ TQString KoVariableTimeFormat::convert( const TQVariant & time ) const
}
if( m_strFormat.lower() == "locale" || m_strFormat.isEmpty() )
- return KGlobal::locale()->formatTime( time.toTime() );
+ return TDEGlobal::locale()->formatTime( time.toTime() );
return time.toTime().toString(m_strFormat);
}
@@ -1198,11 +1198,11 @@ void KoDateVariable::resize()
TQString oldLanguage;
if ( !fmt->language().isEmpty())
{
- oldLanguage=KGlobal::locale()->language();
- bool changeLanguage = KGlobal::locale()->setLanguage( fmt->language() );
+ oldLanguage=TDEGlobal::locale()->language();
+ bool changeLanguage = TDEGlobal::locale()->setLanguage( fmt->language() );
KoVariable::resize();
if ( changeLanguage )
- KGlobal::locale()->setLanguage( oldLanguage );
+ TDEGlobal::locale()->setLanguage( oldLanguage );
}
else
KoVariable::resize();
@@ -1315,13 +1315,13 @@ void KoDateVariable::saveOasis( KoXmlWriter& writer, KoSavingContext& context )
value.lower() == "localedatetimeshort" )
{
if ( value.lower() == "locale" || value.isEmpty())
- value = KGlobal::locale()->dateFormat();
+ value = TDEGlobal::locale()->dateFormat();
else if ( value.lower() == "localeshort" )
- value = KGlobal::locale()->dateFormatShort();
+ value = TDEGlobal::locale()->dateFormatShort();
else if ( value.lower() == "localedatetime" )
- value = TQString( "%1 %2" ).arg( KGlobal::locale()->dateFormat() ).arg( KGlobal::locale()->timeFormat() );
+ value = TQString( "%1 %2" ).arg( TDEGlobal::locale()->dateFormat() ).arg( TDEGlobal::locale()->timeFormat() );
else if ( value.lower() == "localedatetimeshort" )
- value = TQString( "%1 %2" ).arg( KGlobal::locale()->dateFormatShort() ).arg( KGlobal::locale()->timeFormat() );
+ value = TQString( "%1 %2" ).arg( TDEGlobal::locale()->dateFormatShort() ).arg( TDEGlobal::locale()->timeFormat() );
klocaleFormat = true;
}
writer.addAttribute( "style:data-style-name", KoOasisStyles::saveOasisDateStyle(context.mainStyles(), value, klocaleFormat ) );
@@ -1466,11 +1466,11 @@ void KoTimeVariable::resize()
KoTextFormat * fmt = format();
if ( !fmt->language().isEmpty() )
{
- TQString oldLanguage = KGlobal::locale()->language();
- bool changeLanguage = KGlobal::locale()->setLanguage( fmt->language() );
+ TQString oldLanguage = TDEGlobal::locale()->language();
+ bool changeLanguage = TDEGlobal::locale()->setLanguage( fmt->language() );
KoVariable::resize();
if ( changeLanguage )
- KGlobal::locale()->setLanguage( oldLanguage );
+ TDEGlobal::locale()->setLanguage( oldLanguage );
}
else
KoVariable::resize();
@@ -1570,7 +1570,7 @@ void KoTimeVariable::saveOasis( KoXmlWriter& writer, KoSavingContext& context )
bool klocaleFormat = false;
if ( value.lower() == "locale" )
{
- value = KGlobal::locale()->timeFormat();
+ value = TDEGlobal::locale()->timeFormat();
klocaleFormat = true;
}
writer.addAttribute( "style:data-style-name", KoOasisStyles::saveOasisTimeStyle(context.mainStyles(), m_varFormat->formatProperties(), klocaleFormat ) );
@@ -2517,7 +2517,7 @@ TQString KoNoteVariable::fieldCode()
TQString KoNoteVariable::createdNote() const
{
- return KGlobal::locale()->formatDate( m_createdNoteDate, false );
+ return TDEGlobal::locale()->formatDate( m_createdNoteDate, false );
}
void KoNoteVariable::loadOasis( const TQDomElement &elem, KoOasisContext& /*context*/ )