summaryrefslogtreecommitdiffstats
path: root/kspread/kspread_genvalidationstyle.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kspread/kspread_genvalidationstyle.cc
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kspread/kspread_genvalidationstyle.cc')
-rw-r--r--kspread/kspread_genvalidationstyle.cc86
1 files changed, 43 insertions, 43 deletions
diff --git a/kspread/kspread_genvalidationstyle.cc b/kspread/kspread_genvalidationstyle.cc
index 13e5c0e4..f886836a 100644
--- a/kspread/kspread_genvalidationstyle.cc
+++ b/kspread/kspread_genvalidationstyle.cc
@@ -34,12 +34,12 @@ GenValidationStyles::~GenValidationStyles()
}
-QString GenValidationStyles::lookup( const GenValidationStyle& style )
+TQString GenValidationStyles::lookup( const GenValidationStyle& style )
{
- StyleMap::iterator it = m_styles.find( style );
+ StyleMap::iterator it = m_styles.tqfind( style );
if ( it == m_styles.end() ) {
- QString styleName( "val" );
+ TQString styleName( "val" );
styleName = makeUniqueName( styleName );
m_names.insert( styleName, true );
it = m_styles.insert( style, styleName );
@@ -47,14 +47,14 @@ QString GenValidationStyles::lookup( const GenValidationStyle& style )
return it.data();
}
-QString GenValidationStyles::makeUniqueName( const QString& base ) const
+TQString GenValidationStyles::makeUniqueName( const TQString& base ) const
{
int num = 1;
- QString name;
+ TQString name;
do {
name = base;
- name += QString::number( num++ );
- } while ( m_names.find( name ) != m_names.end() );
+ name += TQString::number( num++ );
+ } while ( m_names.tqfind( name ) != m_names.end() );
return name;
}
@@ -75,8 +75,8 @@ void GenValidationStyles::writeStyle( KoXmlWriter& writer )
writer.addAttribute( "table:title", it.key().title );
writer.addAttribute( "table:display", it.key().displayValidationInformation );
- QStringList text = QStringList::split( "\n", it.key().messageInfo );
- for ( QStringList::Iterator it2 = text.begin(); it2 != text.end(); ++it2 ) {
+ TQStringList text = TQStringList::split( "\n", it.key().messageInfo );
+ for ( TQStringList::Iterator it2 = text.begin(); it2 != text.end(); ++it2 ) {
writer.startElement( "text:p" );
writer.addTextNode( *it2 );
writer.endElement();
@@ -88,8 +88,8 @@ void GenValidationStyles::writeStyle( KoXmlWriter& writer )
writer.addAttribute("table:title", it.key().titleInfo);
writer.addAttribute("table:display", it.key().displayMessage);
- text = QStringList::split( "\n", it.key().message );
- for ( QStringList::Iterator it3 = text.begin(); it3 != text.end(); ++it3 ) {
+ text = TQStringList::split( "\n", it.key().message );
+ for ( TQStringList::Iterator it3 = text.begin(); it3 != text.end(); ++it3 ) {
writer.startElement( "text:p" );
writer.addTextNode( *it3 );
writer.endElement();
@@ -131,9 +131,9 @@ void GenValidationStyle::initVal( Validity *_val )
}
}
-QString GenValidationStyle::createValidationCondition( Validity* _val )
+TQString GenValidationStyle::createValidationCondition( Validity* _val )
{
- QString result;
+ TQString result;
switch( _val->m_restriction )
{
case Restriction::None:
@@ -163,17 +163,17 @@ QString GenValidationStyle::createValidationCondition( Validity* _val )
return result;
}
-QString GenValidationStyle::createListValidationCondition( Validity* _val )
+TQString GenValidationStyle::createListValidationCondition( Validity* _val )
{
- QString result = "oooc:cell-content-is-in-list(";
+ TQString result = "oooc:cell-content-is-in-list(";
result = _val->listValidity.join( ";" );
result +=")";
return result;
}
-QString GenValidationStyle::createNumberValidationCondition( Validity* _val )
+TQString GenValidationStyle::createNumberValidationCondition( Validity* _val )
{
- QString result;
+ TQString result;
if ( _val->m_restriction == Restriction::Number )
result = "oooc:cell-content-is-whole-number() and ";
else if ( _val->m_restriction == Restriction::Integer )
@@ -186,45 +186,45 @@ QString GenValidationStyle::createNumberValidationCondition( Validity* _val )
case Conditional::Equal:
result+="cell-content()";
result+="=";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::Superior:
result+="cell-content()";
result+=">";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::Inferior:
result+="cell-content()";
result+="<";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::SuperiorEqual:
result+="cell-content()";
result+=">=";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::InferiorEqual:
result+="cell-content()";
result+="<=";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::Different:
result+="cell-content()";
result+="!=";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::Between:
result+="cell-content-is-between(";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
result+=",";
- result+=QString::number( _val->valMax );
+ result+=TQString::number( _val->valMax );
result+=")";
break;
case Conditional::DifferentTo:
result+="cell-content-is-not-between(";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
result+=",";
- result+=QString::number( _val->valMax );
+ result+=TQString::number( _val->valMax );
result+=")";
break;
}
@@ -232,9 +232,9 @@ QString GenValidationStyle::createNumberValidationCondition( Validity* _val )
}
-QString GenValidationStyle::createTimeValidationCondition( Validity* _val )
+TQString GenValidationStyle::createTimeValidationCondition( Validity* _val )
{
- QString result( "oooc:cell-content-is-time() and " );
+ TQString result( "oooc:cell-content-is-time() and " );
switch( _val->m_cond )
{
case Conditional::None:
@@ -288,9 +288,9 @@ QString GenValidationStyle::createTimeValidationCondition( Validity* _val )
return result;
}
-QString GenValidationStyle::createDateValidationCondition( Validity* _val )
+TQString GenValidationStyle::createDateValidationCondition( Validity* _val )
{
- QString result( "oooc:cell-content-is-date() and " );
+ TQString result( "oooc:cell-content-is-date() and " );
switch( _val->m_cond )
{
case Conditional::None:
@@ -344,9 +344,9 @@ QString GenValidationStyle::createDateValidationCondition( Validity* _val )
return result;
}
-QString GenValidationStyle::createTextValidationCondition( Validity* _val )
+TQString GenValidationStyle::createTextValidationCondition( Validity* _val )
{
- QString result;
+ TQString result;
switch( _val->m_cond )
{
case Conditional::None:
@@ -355,45 +355,45 @@ QString GenValidationStyle::createTextValidationCondition( Validity* _val )
case Conditional::Equal:
result+="oooc:cell-content-text-length()";
result+="=";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::Superior:
result+="oooc:cell-content-text-length()";
result+=">";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::Inferior:
result+="oooc:cell-content-text-length()";
result+="<";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::SuperiorEqual:
result+="oooc:cell-content-text-length()";
result+=">=";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::InferiorEqual:
result+="oooc:cell-content-text-length()";
result+="<=";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::Different:
result+="oooc:cell-content-text-length()";
result+="!=";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::Between:
result+="oooc:cell-content-text-length-is-between(";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
result+=",";
- result+=QString::number( _val->valMax );
+ result+=TQString::number( _val->valMax );
result+=")";
break;
case Conditional::DifferentTo:
result+="oooc:cell-content-text-length-is-not-between(";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
result+=",";
- result+=QString::number( _val->valMax );
+ result+=TQString::number( _val->valMax );
result+=")";
break;
}