diff options
Diffstat (limited to 'lib/kofficecore/KoUnit.cpp')
-rw-r--r-- | lib/kofficecore/KoUnit.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/kofficecore/KoUnit.cpp b/lib/kofficecore/KoUnit.cpp index cc882345..3ba89f24 100644 --- a/lib/kofficecore/KoUnit.cpp +++ b/lib/kofficecore/KoUnit.cpp @@ -183,15 +183,15 @@ KoUnit::Unit KoUnit::unit( const TQString &_unitName, bool* ok ) { if ( ok ) *ok = true; - if ( _unitName == TQString::tqfromLatin1( "mm" ) ) return U_MM; - if ( _unitName == TQString::tqfromLatin1( "cm" ) ) return U_CM; - if ( _unitName == TQString::tqfromLatin1( "dm" ) ) return U_DM; - if ( _unitName == TQString::tqfromLatin1( "in" ) - || _unitName == TQString::tqfromLatin1("inch") /*compat*/ ) return U_INCH; - if ( _unitName == TQString::tqfromLatin1( "pi" ) ) return U_PI; - if ( _unitName == TQString::tqfromLatin1( "dd" ) ) return U_DD; - if ( _unitName == TQString::tqfromLatin1( "cc" ) ) return U_CC; - if ( _unitName == TQString::tqfromLatin1( "pt" ) ) return U_PT; + if ( _unitName == TQString::fromLatin1( "mm" ) ) return U_MM; + if ( _unitName == TQString::fromLatin1( "cm" ) ) return U_CM; + if ( _unitName == TQString::fromLatin1( "dm" ) ) return U_DM; + if ( _unitName == TQString::fromLatin1( "in" ) + || _unitName == TQString::fromLatin1("inch") /*compat*/ ) return U_INCH; + if ( _unitName == TQString::fromLatin1( "pi" ) ) return U_PI; + if ( _unitName == TQString::fromLatin1( "dd" ) ) return U_DD; + if ( _unitName == TQString::fromLatin1( "cc" ) ) return U_CC; + if ( _unitName == TQString::fromLatin1( "pt" ) ) return U_PT; if ( ok ) *ok = false; return U_PT; @@ -199,14 +199,14 @@ KoUnit::Unit KoUnit::unit( const TQString &_unitName, bool* ok ) TQString KoUnit::unitName( Unit _unit ) { - if ( _unit == U_MM ) return TQString::tqfromLatin1( "mm" ); - if ( _unit == U_CM ) return TQString::tqfromLatin1( "cm" ); - if ( _unit == U_DM ) return TQString::tqfromLatin1( "dm" ); - if ( _unit == U_INCH ) return TQString::tqfromLatin1( "in" ); - if ( _unit == U_PI ) return TQString::tqfromLatin1( "pi" ); - if ( _unit == U_DD ) return TQString::tqfromLatin1( "dd" ); - if ( _unit == U_CC ) return TQString::tqfromLatin1( "cc" ); - return TQString::tqfromLatin1( "pt" ); + if ( _unit == U_MM ) return TQString::fromLatin1( "mm" ); + if ( _unit == U_CM ) return TQString::fromLatin1( "cm" ); + if ( _unit == U_DM ) return TQString::fromLatin1( "dm" ); + if ( _unit == U_INCH ) return TQString::fromLatin1( "in" ); + if ( _unit == U_PI ) return TQString::fromLatin1( "pi" ); + if ( _unit == U_DD ) return TQString::fromLatin1( "dd" ); + if ( _unit == U_CC ) return TQString::fromLatin1( "cc" ); + return TQString::fromLatin1( "pt" ); } void KoUnit::saveOasis(KoXmlWriter* settingsWriter, Unit _unit) |