summaryrefslogtreecommitdiffstats
path: root/kspread/kspread_format.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_format.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_format.cc')
-rw-r--r--kspread/kspread_format.cc485
1 files changed, 242 insertions, 243 deletions
diff --git a/kspread/kspread_format.cc b/kspread/kspread_format.cc
index 13663f52a..1b0e6d7a3 100644
--- a/kspread/kspread_format.cc
+++ b/kspread/kspread_format.cc
@@ -1,5 +1,4 @@
-/* This file is part of the KDE project
- Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
+/* This file is part of the KDE project Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
Copyright (C) 2000 - 2005 The KSpread Team
www.koffice.org/kspread
@@ -65,7 +64,7 @@ double Format::s_rowHeight = 20.0;
Format::Format( Sheet * _sheet, Style * _style )
: m_pSheet( _sheet ),
m_pStyle( _style ),
- m_mask( 0 ),
+ m_tqmask( 0 ),
m_bNoFallBack( 0 ),
m_flagsMask( 0 ),
m_strComment( 0 ),
@@ -117,7 +116,7 @@ void Format::copy( const Format & _l )
setStyle( _l.m_pStyle );
- m_mask = _l.m_mask;
+ m_tqmask = _l.m_tqmask;
m_flagsMask = _l.m_flagsMask;
m_bNoFallBack = _l.m_bNoFallBack;
@@ -125,7 +124,7 @@ void Format::copy( const Format & _l )
{
if (m_strComment)
delete m_strComment;
- m_strComment = new QString( *_l.m_strComment );
+ m_strComment = new TQString( *_l.m_strComment );
}
}
@@ -148,29 +147,29 @@ void Format::setStyle( Style * style )
void Format::clearFlag( FormatFlags flag )
{
- m_flagsMask &= ~(Q_UINT32)flag;
+ m_flagsMask &= ~(TQ_UINT32)flag;
}
void Format::setFlag( FormatFlags flag )
{
- m_flagsMask |= (Q_UINT32)flag;
+ m_flagsMask |= (TQ_UINT32)flag;
}
bool Format::testFlag( FormatFlags flag ) const
{
- return ( m_flagsMask & (Q_UINT32)flag );
+ return ( m_flagsMask & (TQ_UINT32)flag );
}
void Format::clearProperties()
{
- m_mask = 0;
+ m_tqmask = 0;
m_pStyle->clearFeature( (Style::FlagsSet) ~(uint)0 );
formatChanged();
}
void Format::clearProperty( Properties p )
{
- m_mask &= ~(uint)p;
+ m_tqmask &= ~(uint)p;
m_pStyle->clearFeature( (Style::FlagsSet) p );
formatChanged();
}
@@ -182,12 +181,12 @@ bool Format::hasProperty( Properties p, bool withoutParent ) const
if ( m_pStyle->hasFeature( (Style::FlagsSet) p, withoutParent ) )
return true;
- return ( m_mask & (uint)p );
+ return ( m_tqmask & (uint)p );
}
void Format::setProperty( Properties p )
{
- m_mask |= (uint)p;
+ m_tqmask |= (uint)p;
}
void Format::clearNoFallBackProperties()
@@ -222,9 +221,9 @@ void Format::setNoFallBackProperties( Properties p )
/////////////
-QString Format::saveOasisCellStyle( KoGenStyle &currentCellStyle, KoGenStyles &mainStyles )
+TQString Format::saveOasisCellStyle( KoGenStyle &currentCellStyle, KoGenStyles &mainStyles )
{
- QString styleName;
+ TQString styleName;
styleName = m_pStyle->saveOasis( currentCellStyle, mainStyles );
// user styles are already stored
@@ -236,9 +235,9 @@ QString Format::saveOasisCellStyle( KoGenStyle &currentCellStyle, KoGenStyles &m
return styleName;
}
-QDomElement Format::saveFormat( QDomDocument & doc, int _col, int _row, bool force, bool copy ) const
+TQDomElement Format::saveFormat( TQDomDocument & doc, int _col, int _row, bool force, bool copy ) const
{
- QDomElement format( doc.createElement( "format" ) );
+ TQDomElement format( doc.createElement( "format" ) );
if ( m_pStyle->type() == Style::BUILTIN || m_pStyle->type() == Style::CUSTOM )
{
@@ -249,8 +248,8 @@ QDomElement Format::saveFormat( QDomDocument & doc, int _col, int _row, bool for
}
else
{
- if ( m_pStyle->parent() && m_pStyle->parent()->name().length() > 0 )
- format.setAttribute( "parent", m_pStyle->parent()->name() );
+ if ( m_pStyle->tqparent() && m_pStyle->tqparent()->name().length() > 0 )
+ format.setAttribute( "tqparent", m_pStyle->tqparent()->name() );
}
if ( hasProperty( PAlign, true ) || hasNoFallBackProperties( PAlign ) || force )
@@ -282,7 +281,7 @@ QDomElement Format::saveFormat( QDomDocument & doc, int _col, int _row, bool for
format.setAttribute( "format", (int)getFormatType( _col, _row ));
if ( hasProperty( PCustomFormat, true ) || hasNoFallBackProperties( PCustomFormat ) || force )
{
- QString s( getFormatString( _col, _row ) );
+ TQString s( getFormatString( _col, _row ) );
if ( s.length() > 0 )
format.setAttribute( "custom", s );
}
@@ -319,37 +318,37 @@ QDomElement Format::saveFormat( QDomDocument & doc, int _col, int _row, bool for
}
if ( hasProperty( PLeftBorder, true ) || hasNoFallBackProperties( PLeftBorder ) || force )
{
- QDomElement left = doc.createElement( "left-border" );
+ TQDomElement left = doc.createElement( "left-border" );
left.appendChild( util_createElement( "pen", leftBorderPen( _col, _row ), doc ) );
format.appendChild( left );
}
if ( hasProperty( PTopBorder, true ) || hasNoFallBackProperties( PTopBorder ) || force )
{
- QDomElement top = doc.createElement( "top-border" );
+ TQDomElement top = doc.createElement( "top-border" );
top.appendChild( util_createElement( "pen", topBorderPen( _col, _row ), doc ) );
format.appendChild( top );
}
if ( hasProperty( PRightBorder, true ) || hasNoFallBackProperties( PRightBorder ) || force )
{
- QDomElement right = doc.createElement( "right-border" );
+ TQDomElement right = doc.createElement( "right-border" );
right.appendChild( util_createElement( "pen", rightBorderPen( _col, _row ), doc ) );
format.appendChild( right );
}
if ( hasProperty( PBottomBorder, true ) || hasNoFallBackProperties( PBottomBorder ) || force )
{
- QDomElement bottom = doc.createElement( "bottom-border" );
+ TQDomElement bottom = doc.createElement( "bottom-border" );
bottom.appendChild( util_createElement( "pen", bottomBorderPen( _col, _row ), doc ) );
format.appendChild( bottom );
}
if ( hasProperty( PFallDiagonal, true ) || hasNoFallBackProperties( PFallDiagonal ) || force )
{
- QDomElement fallDiagonal = doc.createElement( "fall-diagonal" );
+ TQDomElement fallDiagonal = doc.createElement( "fall-diagonal" );
fallDiagonal.appendChild( util_createElement( "pen", fallDiagonalPen( _col, _row ), doc ) );
format.appendChild( fallDiagonal );
}
if ( hasProperty( PGoUpDiagonal, true ) || hasNoFallBackProperties( PGoUpDiagonal ) || force )
{
- QDomElement goUpDiagonal = doc.createElement( "up-diagonal" );
+ TQDomElement goUpDiagonal = doc.createElement( "up-diagonal" );
goUpDiagonal.appendChild( util_createElement( "pen", goUpDiagonalPen( _col, _row ), doc ) );
format.appendChild( goUpDiagonal );
}
@@ -357,9 +356,9 @@ QDomElement Format::saveFormat( QDomDocument & doc, int _col, int _row, bool for
}
-QDomElement Format::saveFormat( QDomDocument& doc, bool force, bool copy ) const
+TQDomElement Format::saveFormat( TQDomDocument& doc, bool force, bool copy ) const
{
- QDomElement format( doc.createElement( "format" ) );
+ TQDomElement format( doc.createElement( "format" ) );
if ( m_pStyle->type() == Style::BUILTIN || m_pStyle->type() == Style::CUSTOM )
{
@@ -370,8 +369,8 @@ QDomElement Format::saveFormat( QDomDocument& doc, bool force, bool copy ) const
}
else
{
- if ( m_pStyle->parent() && m_pStyle->parentName().length() > 0 )
- format.setAttribute( "parent", m_pStyle->parentName() );
+ if ( m_pStyle->tqparent() && m_pStyle->tqparentName().length() > 0 )
+ format.setAttribute( "tqparent", m_pStyle->tqparentName() );
}
if ( hasProperty( PAlign, true ) || hasNoFallBackProperties( PAlign ) || force )
@@ -440,50 +439,50 @@ QDomElement Format::saveFormat( QDomDocument& doc, bool force, bool copy ) const
}
if ( hasProperty( PLeftBorder, true ) || hasNoFallBackProperties( PLeftBorder ) || force )
{
- QDomElement left = doc.createElement( "left-border" );
+ TQDomElement left = doc.createElement( "left-border" );
left.appendChild( util_createElement( "pen", m_pStyle->leftBorderPen(), doc ) );
format.appendChild( left );
}
if ( hasProperty( PTopBorder, true ) || hasNoFallBackProperties( PTopBorder ) || force )
{
- QDomElement top = doc.createElement( "top-border" );
+ TQDomElement top = doc.createElement( "top-border" );
top.appendChild( util_createElement( "pen", m_pStyle->topBorderPen(), doc ) );
format.appendChild( top );
}
if ( hasProperty( PRightBorder, true ) || hasNoFallBackProperties( PRightBorder ) || force )
{
- QDomElement right = doc.createElement( "right-border" );
+ TQDomElement right = doc.createElement( "right-border" );
right.appendChild( util_createElement( "pen", m_pStyle->rightBorderPen(), doc ) );
format.appendChild( right );
}
if ( hasProperty( PBottomBorder, true ) || hasNoFallBackProperties( PBottomBorder ) || force )
{
- QDomElement bottom = doc.createElement( "bottom-border" );
+ TQDomElement bottom = doc.createElement( "bottom-border" );
bottom.appendChild( util_createElement( "pen", m_pStyle->bottomBorderPen(), doc ) );
format.appendChild( bottom );
}
if ( hasProperty( PFallDiagonal, true ) || hasNoFallBackProperties( PFallDiagonal ) || force )
{
- QDomElement fallDiagonal = doc.createElement( "fall-diagonal" );
+ TQDomElement fallDiagonal = doc.createElement( "fall-diagonal" );
fallDiagonal.appendChild( util_createElement( "pen", m_pStyle->fallDiagonalPen(), doc ) );
format.appendChild( fallDiagonal );
}
if ( hasProperty( PGoUpDiagonal, true ) || hasNoFallBackProperties( PGoUpDiagonal ) || force )
{
- QDomElement goUpDiagonal = doc.createElement( "up-diagonal" );
+ TQDomElement goUpDiagonal = doc.createElement( "up-diagonal" );
goUpDiagonal.appendChild( util_createElement( "pen", m_pStyle->goUpDiagonalPen(), doc ) );
format.appendChild( goUpDiagonal );
}
return format;
}
-QDomElement Format::save( QDomDocument & doc, int _col, int _row, bool force, bool copy ) const
+TQDomElement Format::save( TQDomDocument & doc, int _col, int _row, bool force, bool copy ) const
{
- QDomElement format = saveFormat( doc, _col, _row, force, copy );
+ TQDomElement format = saveFormat( doc, _col, _row, force, copy );
return format;
}
-bool Format::loadFormat( const QDomElement & f, Paste::Mode pm, bool paste )
+bool Format::loadFormat( const TQDomElement & f, Paste::Mode pm, bool paste )
{
if ( f.hasAttribute( "style-name" ) )
{
@@ -500,10 +499,10 @@ bool Format::loadFormat( const QDomElement & f, Paste::Mode pm, bool paste )
return false;
}
else
- if ( f.hasAttribute( "parent" ) )
+ if ( f.hasAttribute( "tqparent" ) )
{
- CustomStyle* s = static_cast<CustomStyle*>( m_pSheet->doc()->styleManager()->style( f.attribute( "parent" ) ) );
- //kdDebug() << "Loading Style, parent: " << s->name() << ": " << s << endl;
+ CustomStyle* s = static_cast<CustomStyle*>( m_pSheet->doc()->styleManager()->style( f.attribute( "tqparent" ) ) );
+ //kdDebug() << "Loading Style, tqparent: " << s->name() << ": " << s << endl;
if ( s )
{
@@ -540,8 +539,8 @@ bool Format::loadFormat( const QDomElement & f, Paste::Mode pm, bool paste )
}
if ( f.hasAttribute( "bgcolor" ) ) {
- QColor col( f.attribute( "bgcolor" ) );
- if ( col != Qt::white )
+ TQColor col( f.attribute( "bgcolor" ) );
+ if ( col != TQt::white )
setBgColor( col );
}
@@ -643,62 +642,62 @@ bool Format::loadFormat( const QDomElement & f, Paste::Mode pm, bool paste )
}
if ( f.hasAttribute( "brushcolor" ) )
- setBackGroundBrushColor( QColor( f.attribute( "brushcolor" ) ) );
+ setBackGroundBrushColor( TQColor( f.attribute( "brushcolor" ) ) );
- QDomElement pen( f.namedItem( "pen" ).toElement() );
+ TQDomElement pen( f.namedItem( "pen" ).toElement() );
if ( !pen.isNull() )
setTextPen( util_toPen( pen ) );
- QDomElement font( f.namedItem( "font" ).toElement() );
+ TQDomElement font( f.namedItem( "font" ).toElement() );
if ( !font.isNull() )
setTextFont( util_toFont( font ) );
if ( ( pm != Paste::NoBorder ) && ( pm != Paste::Text ) && ( pm != Paste::Comment ) )
{
- QDomElement left( f.namedItem( "left-border" ).toElement() );
+ TQDomElement left( f.namedItem( "left-border" ).toElement() );
if ( !left.isNull() )
{
- QDomElement pen( left.namedItem( "pen" ).toElement() );
+ TQDomElement pen( left.namedItem( "pen" ).toElement() );
if ( !pen.isNull() )
setLeftBorderPen( util_toPen( pen ) );
}
- QDomElement top( f.namedItem( "top-border" ).toElement() );
+ TQDomElement top( f.namedItem( "top-border" ).toElement() );
if ( !top.isNull() )
{
- QDomElement pen( top.namedItem( "pen" ).toElement() );
+ TQDomElement pen( top.namedItem( "pen" ).toElement() );
if ( !pen.isNull() )
setTopBorderPen( util_toPen( pen ) );
}
- QDomElement right( f.namedItem( "right-border" ).toElement() );
+ TQDomElement right( f.namedItem( "right-border" ).toElement() );
if ( !right.isNull() )
{
- QDomElement pen( right.namedItem( "pen" ).toElement() );
+ TQDomElement pen( right.namedItem( "pen" ).toElement() );
if ( !pen.isNull() )
setRightBorderPen( util_toPen( pen ) );
}
- QDomElement bottom( f.namedItem( "bottom-border" ).toElement() );
+ TQDomElement bottom( f.namedItem( "bottom-border" ).toElement() );
if ( !bottom.isNull() )
{
- QDomElement pen( bottom.namedItem( "pen" ).toElement() );
+ TQDomElement pen( bottom.namedItem( "pen" ).toElement() );
if ( !pen.isNull() )
setBottomBorderPen( util_toPen( pen ) );
}
- QDomElement fallDiagonal( f.namedItem( "fall-diagonal" ).toElement() );
+ TQDomElement fallDiagonal( f.namedItem( "fall-diagonal" ).toElement() );
if ( !fallDiagonal.isNull() )
{
- QDomElement pen( fallDiagonal.namedItem( "pen" ).toElement() );
+ TQDomElement pen( fallDiagonal.namedItem( "pen" ).toElement() );
if ( !pen.isNull() )
setFallDiagonalPen( util_toPen( pen ) );
}
- QDomElement goUpDiagonal( f.namedItem( "up-diagonal" ).toElement() );
+ TQDomElement goUpDiagonal( f.namedItem( "up-diagonal" ).toElement() );
if ( !goUpDiagonal.isNull() )
{
- QDomElement pen( goUpDiagonal.namedItem( "pen" ).toElement() );
+ TQDomElement pen( goUpDiagonal.namedItem( "pen" ).toElement() );
if ( !pen.isNull() )
setGoUpDiagonalPen( util_toPen( pen ) );
}
@@ -712,7 +711,7 @@ bool Format::loadFormat( const QDomElement & f, Paste::Mode pm, bool paste )
return true;
}
-bool Format::load( const QDomElement & f, Paste::Mode pm, bool paste )
+bool Format::load( const TQDomElement & f, Paste::Mode pm, bool paste )
{
if ( !loadFormat( f, pm, paste ) )
return false;
@@ -730,7 +729,7 @@ bool Format::loadFontOasisStyle( KoStyleStack & font )
setTextFontFamily( font.attributeNS( KoXmlNS::fo, "font-family" ) );
if ( font.hasAttributeNS( KoXmlNS::fo, "color" ) )
- setTextColor( QColor( font.attributeNS( KoXmlNS::fo, "color" ) ) );
+ setTextColor( TQColor( font.attributeNS( KoXmlNS::fo, "color" ) ) );
if ( font.hasAttributeNS( KoXmlNS::fo, "font-size" ) )
setTextFontSize( (int) KoUnit::parseValue( font.attributeNS( KoXmlNS::fo, "font-size" ), 10.0 ) );
@@ -764,9 +763,9 @@ bool Format::loadFontOasisStyle( KoStyleStack & font )
return true;
}
-void Format::loadOasisStyle( /*const QDomElement& style,*/ KoOasisLoadingContext& context )
+void Format::loadOasisStyle( /*const TQDomElement& style,*/ KoOasisLoadingContext& context )
{
- QString str; // multi purpose string
+ TQString str; // multi purpose string
KoOasisStyles& oasisStyles = context.oasisStyles();
/* context.styleStack().save();
@@ -789,7 +788,7 @@ void Format::loadOasisStyle( /*const QDomElement& style,*/ KoOasisLoadingContext
if ( !str.isEmpty() )
{
- QString tmp = oasisStyles.dataFormats()[str].prefix;
+ TQString tmp = oasisStyles.dataFormats()[str].prefix;
if ( !tmp.isEmpty() )
{
setPrefix( tmp );
@@ -836,10 +835,10 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
return false;
}
else
- if ( f.hasAttribute( "parent" ) )
+ if ( f.hasAttribute( "tqparent" ) )
{
- CustomStyle * s = (CustomStyle *) m_pSheet->doc()->styleManager()->style( f.attribute( "parent" ) );
- //kdDebug() << "Loading Style, parent: " << s->name() << ": " << s << endl;
+ CustomStyle * s = (CustomStyle *) m_pSheet->doc()->styleManager()->style( f.attribute( "tqparent" ) );
+ //kdDebug() << "Loading Style, tqparent: " << s->name() << ": " << s << endl;
if ( s )
{
@@ -851,9 +850,9 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
}
}
#endif
- if ( styleStack.hasAttributeNS( KoXmlNS::style, "parent-style-name" ) )
+ if ( styleStack.hasAttributeNS( KoXmlNS::style, "tqparent-style-name" ) )
{
- Style * s = m_pSheet->doc()->styleManager()->style( styleStack.attributeNS( KoXmlNS::style, "parent-style-name" ) );
+ Style * s = m_pSheet->doc()->styleManager()->style( styleStack.attributeNS( KoXmlNS::style, "tqparent-style-name" ) );
//kdDebug() << "Using style: " << f.attribute( "style-name" ) << ", s: " << s << endl;
if ( s )
@@ -869,7 +868,7 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
if ( styleStack.hasAttributeNS( KoXmlNS::style, "font-name" ) )
{
- const QDomElement * font = oasisStyles.findStyle( styleStack.attributeNS( KoXmlNS::style, "font-name" ) );
+ const TQDomElement * font = oasisStyles.findStyle( styleStack.attributeNS( KoXmlNS::style, "font-name" ) );
if ( font )
{
styleStack.save();
@@ -895,7 +894,7 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
//kdDebug()<<"property.hasAttribute( fo:text-align ) :"<<styleStack.hasAttributeNS( KoXmlNS::fo, "text-align" )<<endl;
if ( styleStack.hasAttributeNS( KoXmlNS::fo, "text-align" ) )
{
- QString s = styleStack.attributeNS( KoXmlNS::fo, "text-align" );
+ TQString s = styleStack.attributeNS( KoXmlNS::fo, "text-align" );
if ( s == "center" )
setAlign( Format::Center );
else if ( s == "end" )
@@ -929,7 +928,7 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
}
if ( styleStack.hasAttributeNS( KoXmlNS::style, "direction" ) )
{
- QString dir = styleStack.attributeNS( KoXmlNS::fo, "direction" );
+ TQString dir = styleStack.attributeNS( KoXmlNS::fo, "direction" );
if ( dir == "ttb" )
setVerticalText( true );
else if ( dir == "ltr" )
@@ -939,7 +938,7 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
kdDebug()<<"property.hasAttribute( fo:background-color ) :"<<styleStack.hasAttributeNS( KoXmlNS::fo, "background-color" )<<endl;
if ( styleStack.hasAttributeNS( KoXmlNS::fo, "background-color" ) )
- setBgColor( QColor( styleStack.attributeNS( KoXmlNS::fo, "background-color" ) ) );
+ setBgColor( TQColor( styleStack.attributeNS( KoXmlNS::fo, "background-color" ) ) );
if ( styleStack.hasAttributeNS( KoXmlNS::style, "print-content" ) )
{
@@ -948,7 +947,7 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
}
if ( styleStack.hasAttributeNS( KoXmlNS::style, "cell-protect" ) )
{
- QString prot( styleStack.attributeNS( KoXmlNS::style, "cell-protect" ) );
+ TQString prot( styleStack.attributeNS( KoXmlNS::style, "cell-protect" ) );
if ( prot == "none" )
{
setNotProtected( true );
@@ -989,7 +988,7 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
if ( styleStack.hasAttributeNS( KoXmlNS::style, "vertical-align" ) )
{
- QString s = styleStack.attributeNS( KoXmlNS::style, "vertical-align" );
+ TQString s = styleStack.attributeNS( KoXmlNS::style, "vertical-align" );
if ( s == "middle" )
setAlignY( Format::Middle );
else if ( s == "bottom" )
@@ -1001,7 +1000,7 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
if ( styleStack.hasAttributeNS( KoXmlNS::fo, "wrap-option" ) )
{
// we do not support anything else yet
- QString wrapOpt = styleStack.attributeNS( KoXmlNS::fo, "wrap-option" );
+ TQString wrapOpt = styleStack.attributeNS( KoXmlNS::fo, "wrap-option" );
if ( wrapOpt == "wrap" )
setMultiRow( true );
else if ( wrapOpt == "no-wrap" )
@@ -1033,7 +1032,7 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
if ( styleStack.hasAttributeNS( KoXmlNS::fo, "border" ) )
{
- QPen pen = convertOasisStringToPen( styleStack.attributeNS( KoXmlNS::fo, "border" ) );
+ TQPen pen = convertOasisStringToPen( styleStack.attributeNS( KoXmlNS::fo, "border" ) );
setLeftBorderPen( pen );
setRightBorderPen( pen );
setTopBorderPen( pen );
@@ -1054,7 +1053,7 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
{
//kdDebug()<<" style name :"<<styleStack.attributeNS( KoXmlNS::draw, "style-name" )<<endl;
- const QDomElement * style = oasisStyles.findStyle( styleStack.attributeNS( KoXmlNS::draw, "style-name" ), "graphic" );
+ const TQDomElement * style = oasisStyles.findStyle( styleStack.attributeNS( KoXmlNS::draw, "style-name" ), "graphic" );
if ( style )
{
//kdDebug()<<" style :"<<style<<endl;
@@ -1063,12 +1062,12 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
drawStyleStack.setTypeProperties( "graphic" );
if ( drawStyleStack.hasAttributeNS( KoXmlNS::draw, "fill" ) )
{
- const QString fill = drawStyleStack.attributeNS( KoXmlNS::draw, "fill" );
+ const TQString fill = drawStyleStack.attributeNS( KoXmlNS::draw, "fill" );
kdDebug()<<" load object gradient fill type :"<<fill<<endl;
if ( fill == "solid" || fill == "hatch" )
{
- QBrush brush=KoOasisStyles::loadOasisFillStyle( drawStyleStack, fill, oasisStyles );
+ TQBrush brush=KoOasisStyles::loadOasisFillStyle( drawStyleStack, fill, oasisStyles );
setBackGroundBrushStyle( brush.style() );
setBackGroundBrushColor( brush.color() );
}
@@ -1089,7 +1088,7 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
//
/////////////
-void Format::setFormatString( QString const & format )
+void Format::setFormatString( TQString const & format )
{
if ( format.isEmpty() )
{
@@ -1154,7 +1153,7 @@ void Format::setAlignY( AlignY _alignY)
formatChanged();
}
-void Format::setPrefix( const QString& _prefix )
+void Format::setPrefix( const TQString& _prefix )
{
if ( _prefix.isEmpty() )
{
@@ -1171,7 +1170,7 @@ void Format::setPrefix( const QString& _prefix )
formatChanged();
}
-void Format::setPostfix( const QString& _postfix )
+void Format::setPostfix( const TQString& _postfix )
{
if ( _postfix.isEmpty() )
{
@@ -1205,9 +1204,9 @@ void Format::setPrecision( int _p )
formatChanged();
}
-void Format::setLeftBorderPen( const QPen & _p )
+void Format::setLeftBorderPen( const TQPen & _p )
{
- if ( _p.style() == Qt::NoPen )
+ if ( _p.style() == TQt::NoPen )
{
clearProperty( PLeftBorder );
setNoFallBackProperties( PLeftBorder );
@@ -1224,28 +1223,28 @@ void Format::setLeftBorderPen( const QPen & _p )
void Format::setLeftBorderStyle( Qt::PenStyle s )
{
- QPen p( m_pStyle->leftBorderPen() );
+ TQPen p( m_pStyle->leftBorderPen() );
p.setStyle( s );
setLeftBorderPen( p );
}
-void Format::setLeftBorderColor( const QColor & c )
+void Format::setLeftBorderColor( const TQColor & c )
{
- QPen p( m_pStyle->leftBorderPen() );
+ TQPen p( m_pStyle->leftBorderPen() );
p.setColor( c );
setLeftBorderPen( p );
}
void Format::setLeftBorderWidth( int _w )
{
- QPen p( m_pStyle->leftBorderPen() );
+ TQPen p( m_pStyle->leftBorderPen() );
p.setWidth( _w );
setLeftBorderPen( p );
}
-void Format::setTopBorderPen( const QPen & _p )
+void Format::setTopBorderPen( const TQPen & _p )
{
- if ( _p.style() == Qt::NoPen )
+ if ( _p.style() == TQt::NoPen )
{
clearProperty( PTopBorder );
setNoFallBackProperties( PTopBorder );
@@ -1262,28 +1261,28 @@ void Format::setTopBorderPen( const QPen & _p )
void Format::setTopBorderStyle( Qt::PenStyle s )
{
- QPen p( m_pStyle->topBorderPen() );
+ TQPen p( m_pStyle->topBorderPen() );
p.setStyle( s );
setTopBorderPen( p );
}
-void Format::setTopBorderColor( const QColor& c )
+void Format::setTopBorderColor( const TQColor& c )
{
- QPen p( m_pStyle->topBorderPen() );
+ TQPen p( m_pStyle->topBorderPen() );
p.setColor( c );
setTopBorderPen( p );
}
void Format::setTopBorderWidth( int _w )
{
- QPen p( m_pStyle->topBorderPen() );
+ TQPen p( m_pStyle->topBorderPen() );
p.setWidth( _w );
setTopBorderPen( p );
}
-void Format::setRightBorderPen( const QPen& p )
+void Format::setRightBorderPen( const TQPen& p )
{
- if ( p.style() == Qt::NoPen )
+ if ( p.style() == TQt::NoPen )
{
clearProperty( PRightBorder );
setNoFallBackProperties( PRightBorder );
@@ -1300,28 +1299,28 @@ void Format::setRightBorderPen( const QPen& p )
void Format::setRightBorderStyle( Qt::PenStyle _s )
{
- QPen p( m_pStyle->rightBorderPen() );
+ TQPen p( m_pStyle->rightBorderPen() );
p.setStyle( _s );
setRightBorderPen( p );
}
-void Format::setRightBorderColor( const QColor & _c )
+void Format::setRightBorderColor( const TQColor & _c )
{
- QPen p( m_pStyle->rightBorderPen() );
+ TQPen p( m_pStyle->rightBorderPen() );
p.setColor( _c );
setRightBorderPen( p );
}
void Format::setRightBorderWidth( int _w )
{
- QPen p( m_pStyle->rightBorderPen() );
+ TQPen p( m_pStyle->rightBorderPen() );
p.setWidth( _w );
setRightBorderPen( p );
}
-void Format::setBottomBorderPen( const QPen& p )
+void Format::setBottomBorderPen( const TQPen& p )
{
- if ( p.style() == Qt::NoPen )
+ if ( p.style() == TQt::NoPen )
{
clearProperty( PBottomBorder );
setNoFallBackProperties( PBottomBorder );
@@ -1338,28 +1337,28 @@ void Format::setBottomBorderPen( const QPen& p )
void Format::setBottomBorderStyle( Qt::PenStyle _s )
{
- QPen p( m_pStyle->bottomBorderPen() );
+ TQPen p( m_pStyle->bottomBorderPen() );
p.setStyle( _s );
setBottomBorderPen( p );
}
-void Format::setBottomBorderColor( const QColor & _c )
+void Format::setBottomBorderColor( const TQColor & _c )
{
- QPen p( m_pStyle->bottomBorderPen() );
+ TQPen p( m_pStyle->bottomBorderPen() );
p.setColor( _c );
setBottomBorderPen( p );
}
void Format::setBottomBorderWidth( int _w )
{
- QPen p( m_pStyle->bottomBorderPen() );
+ TQPen p( m_pStyle->bottomBorderPen() );
p.setWidth( _w );
setBottomBorderPen( p );
}
-void Format::setFallDiagonalPen( const QPen & _p )
+void Format::setFallDiagonalPen( const TQPen & _p )
{
- if ( _p.style() == Qt::NoPen )
+ if ( _p.style() == TQt::NoPen )
{
clearProperty( PFallDiagonal );
setNoFallBackProperties( PFallDiagonal );
@@ -1376,28 +1375,28 @@ void Format::setFallDiagonalPen( const QPen & _p )
void Format::setFallDiagonalStyle( Qt::PenStyle s )
{
- QPen p( m_pStyle->fallDiagonalPen() );
+ TQPen p( m_pStyle->fallDiagonalPen() );
p.setStyle( s );
setFallDiagonalPen( p );
}
-void Format::setFallDiagonalColor( const QColor& c )
+void Format::setFallDiagonalColor( const TQColor& c )
{
- QPen p( m_pStyle->fallDiagonalPen() );
+ TQPen p( m_pStyle->fallDiagonalPen() );
p.setColor( c );
setFallDiagonalPen( p );
}
void Format::setFallDiagonalWidth( int _w )
{
- QPen p( m_pStyle->fallDiagonalPen() );
+ TQPen p( m_pStyle->fallDiagonalPen() );
p.setWidth( _w );
setFallDiagonalPen( p );
}
-void Format::setGoUpDiagonalPen( const QPen & _p )
+void Format::setGoUpDiagonalPen( const TQPen & _p )
{
- if ( _p.style() == Qt::NoPen )
+ if ( _p.style() == TQt::NoPen )
{
clearProperty( PGoUpDiagonal );
setNoFallBackProperties( PGoUpDiagonal );
@@ -1414,28 +1413,28 @@ void Format::setGoUpDiagonalPen( const QPen & _p )
void Format::setGoUpDiagonalStyle( Qt::PenStyle s )
{
- QPen p( m_pStyle->goUpDiagonalPen() );
+ TQPen p( m_pStyle->goUpDiagonalPen() );
p.setStyle( s );
setGoUpDiagonalPen( p );
}
-void Format::setGoUpDiagonalColor( const QColor& c )
+void Format::setGoUpDiagonalColor( const TQColor& c )
{
- QPen p( m_pStyle->goUpDiagonalPen() );
+ TQPen p( m_pStyle->goUpDiagonalPen() );
p.setColor( c );
setGoUpDiagonalPen( p );
}
void Format::setGoUpDiagonalWidth( int _w )
{
- QPen p( m_pStyle->goUpDiagonalPen() );
+ TQPen p( m_pStyle->goUpDiagonalPen() );
p.setWidth( _w );
setGoUpDiagonalPen( p );
}
-void Format::setBackGroundBrush( const QBrush & _p)
+void Format::setBackGroundBrush( const TQBrush & _p)
{
- if ( _p.style() == Qt::NoBrush )
+ if ( _p.style() == TQt::NoBrush )
{
clearProperty( PBackgroundBrush );
setNoFallBackProperties( PBackgroundBrush );
@@ -1452,26 +1451,26 @@ void Format::setBackGroundBrush( const QBrush & _p)
void Format::setBackGroundBrushStyle( Qt::BrushStyle s )
{
- QBrush b( m_pStyle->backGroundBrush() );
+ TQBrush b( m_pStyle->backGroundBrush() );
b.setStyle( s );
setBackGroundBrush( b );
}
-void Format::setBackGroundBrushColor( const QColor & c )
+void Format::setBackGroundBrushColor( const TQColor & c )
{
- QBrush b( m_pStyle->backGroundBrush() );
+ TQBrush b( m_pStyle->backGroundBrush() );
b.setColor( c );
setBackGroundBrush( b );
}
-void Format::setTextFont( const QFont & _f )
+void Format::setTextFont( const TQFont & _f )
{
- if( m_pStyle->parent() && _f == m_pStyle->parent()->font())
+ if( m_pStyle->tqparent() && _f == m_pStyle->tqparent()->font())
{
clearProperty( PFont );
setNoFallBackProperties( PFont );
}
- else if( !m_pStyle->parent() && _f == KoGlobal::defaultFont() )
+ else if( !m_pStyle->tqparent() && _f == KoGlobal::defaultFont() )
{
clearProperty( PFont );
setNoFallBackProperties( PFont );
@@ -1489,47 +1488,47 @@ void Format::setTextFont( const QFont & _f )
void Format::setTextFontSize( int _s )
{
- QFont f( m_pStyle->font() );
+ TQFont f( m_pStyle->font() );
f.setPointSize( _s );
setTextFont( f );
}
-void Format::setTextFontFamily( const QString & _f )
+void Format::setTextFontFamily( const TQString & _f )
{
- QFont f( m_pStyle->font() );
+ TQFont f( m_pStyle->font() );
f.setFamily( _f );
setTextFont( f );
}
void Format::setTextFontBold( bool _b )
{
- QFont f( m_pStyle->font() );
+ TQFont f( m_pStyle->font() );
f.setBold( _b );
setTextFont( f );
}
void Format::setTextFontItalic( bool _i )
{
- QFont f( m_pStyle->font() );
+ TQFont f( m_pStyle->font() );
f.setItalic( _i );
setTextFont( f );
}
void Format::setTextFontUnderline( bool _i )
{
- QFont f( m_pStyle->font() );
+ TQFont f( m_pStyle->font() );
f.setUnderline( _i );
setTextFont( f );
}
void Format::setTextFontStrike( bool _i )
{
- QFont f( m_pStyle->font() );
+ TQFont f( m_pStyle->font() );
f.setStrikeOut( _i );
setTextFont( f );
}
-void Format::setTextPen( const QPen & _p )
+void Format::setTextPen( const TQPen & _p )
{
// An invalid color means "the default text color, from the color scheme"
// It doesn't mean "no setting here, look at fallback"
@@ -1551,14 +1550,14 @@ void Format::setTextPen( const QPen & _p )
formatChanged();
}
-void Format::setTextColor( const QColor & _c )
+void Format::setTextColor( const TQColor & _c )
{
- QPen p( m_pStyle->pen() );
+ TQPen p( m_pStyle->pen() );
p.setColor( _c );
setTextPen( p );
}
-void Format::setBgColor( const QColor & _c )
+void Format::setBgColor( const TQColor & _c )
{
if ( !_c.isValid() )
{
@@ -1676,7 +1675,7 @@ void Format::setIndent( double _indent )
formatChanged();
}
-void Format::setComment( const QString & _comment )
+void Format::setComment( const TQString & _comment )
{
if ( _comment.isEmpty() )
{
@@ -1692,7 +1691,7 @@ void Format::setComment( const QString & _comment )
// not part of the style
delete m_strComment;
if ( !_comment.isEmpty() )
- m_strComment = new QString( _comment );
+ m_strComment = new TQString( _comment );
else
m_strComment = 0;
formatChanged();
@@ -1771,7 +1770,7 @@ void Format::setCurrency( Currency const & c )
m_pStyle = m_pStyle->setCurrency( c );
}
-void Format::setCurrency( int type, QString const & symbol )
+void Format::setCurrency( int type, TQString const & symbol )
{
Currency c;
@@ -1793,7 +1792,7 @@ void Format::setCurrency( int type, QString const & symbol )
//
/////////////
-QString const & Format::getFormatString( int col, int row ) const
+TQString const & Format::getFormatString( int col, int row ) const
{
if ( !hasProperty( PCustomFormat, false ) && !hasNoFallBackProperties( PCustomFormat ))
{
@@ -1804,7 +1803,7 @@ QString const & Format::getFormatString( int col, int row ) const
return m_pStyle->strFormat();
}
-QString Format::prefix( int col, int row ) const
+TQString Format::prefix( int col, int row ) const
{
if ( !hasProperty( PPrefix, false ) && !hasNoFallBackProperties(PPrefix ))
{
@@ -1815,7 +1814,7 @@ QString Format::prefix( int col, int row ) const
return m_pStyle->prefix();
}
-QString Format::postfix( int col, int row ) const
+TQString Format::postfix( int col, int row ) const
{
if ( !hasProperty( PPostfix, false ) && !hasNoFallBackProperties(PPostfix ))
{
@@ -1826,7 +1825,7 @@ QString Format::postfix( int col, int row ) const
return m_pStyle->postfix();
}
-const QPen& Format::fallDiagonalPen( int col, int row ) const
+const TQPen& Format::fallDiagonalPen( int col, int row ) const
{
if ( !hasProperty( PFallDiagonal, false ) && !hasNoFallBackProperties(PFallDiagonal ))
{
@@ -1847,12 +1846,12 @@ Qt::PenStyle Format::fallDiagonalStyle( int col, int row ) const
return fallDiagonalPen( col, row ).style();
}
-const QColor & Format::fallDiagonalColor( int col, int row ) const
+const TQColor & Format::fallDiagonalColor( int col, int row ) const
{
return fallDiagonalPen( col, row ).color();
}
-const QPen & Format::goUpDiagonalPen( int col, int row ) const
+const TQPen & Format::goUpDiagonalPen( int col, int row ) const
{
if ( !hasProperty( PGoUpDiagonal, false ) && !hasNoFallBackProperties( PGoUpDiagonal ) )
{
@@ -1873,7 +1872,7 @@ Qt::PenStyle Format::goUpDiagonalStyle( int col, int row ) const
return goUpDiagonalPen( col, row ).style();
}
-const QColor& Format::goUpDiagonalColor( int col, int row ) const
+const TQColor& Format::goUpDiagonalColor( int col, int row ) const
{
return goUpDiagonalPen( col, row ).color();
}
@@ -1934,7 +1933,7 @@ uint Format::topBorderValue( int col, int row ) const
return m_pStyle->topPenValue();
}
-const QPen& Format::leftBorderPen( int col, int row ) const
+const TQPen& Format::leftBorderPen( int col, int row ) const
{
if ( !hasProperty( PLeftBorder, false ) && !hasNoFallBackProperties( PLeftBorder ) )
{
@@ -1952,7 +1951,7 @@ Qt::PenStyle Format::leftBorderStyle( int col, int row ) const
return leftBorderPen( col, row ).style();
}
-const QColor& Format::leftBorderColor( int col, int row ) const
+const TQColor& Format::leftBorderColor( int col, int row ) const
{
return leftBorderPen( col, row ).color();
}
@@ -1962,7 +1961,7 @@ int Format::leftBorderWidth( int col, int row ) const
return leftBorderPen( col, row ).width();
}
-const QPen& Format::topBorderPen( int col, int row ) const
+const TQPen& Format::topBorderPen( int col, int row ) const
{
if ( !hasProperty( PTopBorder, false ) && !hasNoFallBackProperties( PTopBorder ) )
{
@@ -1975,7 +1974,7 @@ const QPen& Format::topBorderPen( int col, int row ) const
return m_pStyle->topBorderPen();
}
-const QColor& Format::topBorderColor( int col, int row ) const
+const TQColor& Format::topBorderColor( int col, int row ) const
{
return topBorderPen( col, row ).color();
}
@@ -1990,7 +1989,7 @@ int Format::topBorderWidth( int col, int row ) const
return topBorderPen( col, row ).width();
}
-const QPen& Format::rightBorderPen( int col, int row ) const
+const TQPen& Format::rightBorderPen( int col, int row ) const
{
if ( !hasProperty( PRightBorder, false ) && !hasNoFallBackProperties( PRightBorder ) )
{
@@ -2013,12 +2012,12 @@ Qt::PenStyle Format::rightBorderStyle( int col, int row ) const
return rightBorderPen( col, row ).style();
}
-const QColor& Format::rightBorderColor( int col, int row ) const
+const TQColor& Format::rightBorderColor( int col, int row ) const
{
return rightBorderPen( col, row ).color();
}
-const QPen& Format::bottomBorderPen( int col, int row ) const
+const TQPen& Format::bottomBorderPen( int col, int row ) const
{
if ( !hasProperty( PBottomBorder, false )&& !hasNoFallBackProperties( PBottomBorder ) )
{
@@ -2041,12 +2040,12 @@ Qt::PenStyle Format::bottomBorderStyle( int col, int row ) const
return bottomBorderPen( col, row ).style();
}
-const QColor& Format::bottomBorderColor( int col, int row ) const
+const TQColor& Format::bottomBorderColor( int col, int row ) const
{
return bottomBorderPen( col, row ).color();
}
-const QBrush& Format::backGroundBrush( int col, int row ) const
+const TQBrush& Format::backGroundBrush( int col, int row ) const
{
if ( !hasProperty( PBackgroundBrush, false ) && !hasNoFallBackProperties(PBackgroundBrush ))
{
@@ -2062,7 +2061,7 @@ Qt::BrushStyle Format::backGroundBrushStyle( int col, int row ) const
return backGroundBrush( col, row ).style();
}
-const QColor& Format::backGroundBrushColor( int col, int row ) const
+const TQColor& Format::backGroundBrushColor( int col, int row ) const
{
return backGroundBrush( col, row ).color();
}
@@ -2100,7 +2099,7 @@ Format::FloatColor Format::floatColor( int col, int row ) const
return m_pStyle->floatColor();
}
-const QColor& Format::bgColor( int col, int row ) const
+const TQColor& Format::bgColor( int col, int row ) const
{
if ( !hasProperty( PBackgroundColor, false ) && !hasNoFallBackProperties( PBackgroundColor ) )
{
@@ -2112,7 +2111,7 @@ const QColor& Format::bgColor( int col, int row ) const
return m_pStyle->bgColor();
}
-const QPen& Format::textPen( int col, int row ) const
+const TQPen& Format::textPen( int col, int row ) const
{
if ( !hasProperty( PTextPen, false ) && !hasNoFallBackProperties( PTextPen ) )
{
@@ -2123,12 +2122,12 @@ const QPen& Format::textPen( int col, int row ) const
return m_pStyle->pen();
}
-const QColor& Format::textColor( int col, int row ) const
+const TQColor& Format::textColor( int col, int row ) const
{
return textPen( col, row ).color();
}
-const QFont Format::textFont( int col, int row ) const
+const TQFont Format::textFont( int col, int row ) const
{
if ( !hasProperty( PFont, false ) && !hasNoFallBackProperties( PFont ) )
{
@@ -2152,7 +2151,7 @@ int Format::textFontSize( int col, int row ) const
return m_pStyle->fontSize();
}
-QString const & Format::textFontFamily( int col, int row ) const
+TQString const & Format::textFontFamily( int col, int row ) const
{
if ( !hasProperty( PFont, false ) && !hasNoFallBackProperties( PFont ) )
{
@@ -2284,7 +2283,7 @@ int Format::getAngle( int col, int row ) const
return m_pStyle->rotateAngle();
}
-QString Format::comment( int col, int row ) const
+TQString Format::comment( int col, int row ) const
{
if ( !hasProperty( PComment, false ) && !hasNoFallBackProperties( PComment ))
{
@@ -2294,13 +2293,13 @@ QString Format::comment( int col, int row ) const
}
if ( !m_strComment )
- return QString::null;
+ return TQString();
// not part of the style
return *m_strComment;
}
-QString * Format::commentP( int col, int row ) const
+TQString * Format::commentP( int col, int row ) const
{
if ( !hasProperty( PComment, false ) && !hasNoFallBackProperties( PComment ))
{
@@ -2390,13 +2389,13 @@ bool Format::currencyInfo( Currency & currency) const
return true;
}
-QString Format::getCurrencySymbol() const
+TQString Format::getCurrencySymbol() const
{
// TODO: fallback ?
return m_pStyle->currency().symbol;
}
-QFont Format::font() const
+TQFont Format::font() const
{
return m_pStyle->font();
}
@@ -2408,47 +2407,47 @@ QFont Format::font() const
//
/////////////
-const QPen & Format::leftBorderPen() const
+const TQPen & Format::leftBorderPen() const
{
return m_pStyle->leftBorderPen();
}
-const QPen & Format::topBorderPen() const
+const TQPen & Format::topBorderPen() const
{
return m_pStyle->topBorderPen();
}
-const QPen & Format::rightBorderPen() const
+const TQPen & Format::rightBorderPen() const
{
return m_pStyle->rightBorderPen();
}
-const QPen & Format::bottomBorderPen() const
+const TQPen & Format::bottomBorderPen() const
{
return m_pStyle->bottomBorderPen();
}
-const QPen & Format::fallDiagonalPen() const
+const TQPen & Format::fallDiagonalPen() const
{
return m_pStyle->fallDiagonalPen();
}
-const QPen & Format::goUpDiagonalPen() const
+const TQPen & Format::goUpDiagonalPen() const
{
return m_pStyle->goUpDiagonalPen();
}
-const QBrush & Format::backGroundBrush() const
+const TQBrush & Format::backGroundBrush() const
{
return m_pStyle->backGroundBrush();
}
-const QFont Format::textFont() const
+const TQFont Format::textFont() const
{
return m_pStyle->font();
}
-const QPen & Format::textPen() const
+const TQPen & Format::textPen() const
{
return m_pStyle->pen();
}
@@ -2481,11 +2480,11 @@ const Format* Format::fallbackFormat( int, int row ) const
bool Format::isDefault() const
{
// NOTE Stefan: Don't compare sheet and cell.
- // Because of the comment we have to check m_mask.
- if ( ( m_mask & PComment ) && m_strComment != 0 )
+ // Because of the comment we have to check m_tqmask.
+ if ( ( m_tqmask & PComment ) && m_strComment != 0 )
return false;
#if 0 // These are copied in Style.
- if ( m_mask ) // Properties
+ if ( m_tqmask ) // Properties
return false;
if ( m_flagsMask != 0 ) // FormatFlags
return false;
@@ -2498,11 +2497,11 @@ bool Format::isDefault() const
bool Format::operator==( const Format& other ) const
{
// NOTE Stefan: Don't compare sheet and cell.
- // Because of the comment we have to check m_mask.
- if ( ( m_mask & other.m_mask & PComment ) && m_strComment != other.m_strComment )
+ // Because of the comment we have to check m_tqmask.
+ if ( ( m_tqmask & other.m_tqmask & PComment ) && m_strComment != other.m_strComment )
return false;
#if 0 // These are copied in Style.
- if ( m_mask != other.m_mask ) // Properties
+ if ( m_tqmask != other.m_tqmask ) // Properties
return false;
if ( m_flagsMask != other.m_flagsMask ) // FormatFlags
return false;
@@ -2610,27 +2609,27 @@ double RowFormat::mmHeight() const
return POINT_TO_MM ( dblHeight() );
}
-QDomElement RowFormat::save( QDomDocument& doc, int yshift, bool copy ) const
+TQDomElement RowFormat::save( TQDomDocument& doc, int yshift, bool copy ) const
{
- QDomElement row = doc.createElement( "row" );
+ TQDomElement row = doc.createElement( "row" );
row.setAttribute( "height", m_fHeight );
row.setAttribute( "row", m_iRow - yshift );
if( m_bHide )
row.setAttribute( "hide", (int) m_bHide );
- QDomElement format( saveFormat( doc, false, copy ) );
+ TQDomElement format( saveFormat( doc, false, copy ) );
row.appendChild( format );
return row;
}
#if 0
-bool RowFormat::loadOasis( const QDomElement& /*row*/, QDomElement * /*rowStyle*/ )
+bool RowFormat::loadOasis( const TQDomElement& /*row*/, TQDomElement * /*rowStyle*/ )
{
return true;
}
#endif
-bool RowFormat::load( const QDomElement & row, int yshift, Paste::Mode sp, bool paste )
+bool RowFormat::load( const TQDomElement & row, int yshift, Paste::Mode sp, bool paste )
{
bool ok;
@@ -2641,7 +2640,7 @@ bool RowFormat::load( const QDomElement & row, int yshift, Paste::Mode sp, bool
if ( row.hasAttribute( "height" ) )
{
if ( m_pSheet->doc()->syntaxVersion() < 1 ) //compatibility with old format - was in millimeter
- m_fHeight = qRound( MM_TO_POINT( row.attribute( "height" ).toDouble( &ok ) ) );
+ m_fHeight = tqRound( MM_TO_POINT( row.attribute( "height" ).toDouble( &ok ) ) );
else
m_fHeight = row.attribute( "height" ).toDouble( &ok );
@@ -2667,7 +2666,7 @@ bool RowFormat::load( const QDomElement & row, int yshift, Paste::Mode sp, bool
return false;
}
- QDomElement f( row.namedItem( "format" ).toElement() );
+ TQDomElement f( row.namedItem( "format" ).toElement() );
if ( !f.isNull() && ( sp == Paste::Normal || sp == Paste::Format || sp == Paste::NoBorder ) )
{
@@ -2679,7 +2678,7 @@ bool RowFormat::load( const QDomElement & row, int yshift, Paste::Mode sp, bool
return true;
}
-const QPen & RowFormat::topBorderPen( int _col, int _row ) const
+const TQPen & RowFormat::topBorderPen( int _col, int _row ) const
{
// First look at the row above us
if ( !hasProperty( PTopBorder, false ) )
@@ -2692,7 +2691,7 @@ const QPen & RowFormat::topBorderPen( int _col, int _row ) const
return Format::topBorderPen( _col, _row );
}
-void RowFormat::setTopBorderPen( const QPen & p )
+void RowFormat::setTopBorderPen( const TQPen & p )
{
RowFormat * cl = sheet()->nonDefaultRowFormat( row() - 1, false );
if ( cl )
@@ -2701,7 +2700,7 @@ void RowFormat::setTopBorderPen( const QPen & p )
Format::setTopBorderPen( p );
}
-const QPen & RowFormat::bottomBorderPen( int _col, int _row ) const
+const TQPen & RowFormat::bottomBorderPen( int _col, int _row ) const
{
// First look at the row below of us
if ( !hasProperty( PBottomBorder, false ) && ( _row < KS_rowMax ) )
@@ -2714,7 +2713,7 @@ const QPen & RowFormat::bottomBorderPen( int _col, int _row ) const
return Format::bottomBorderPen( _col, _row );
}
-void RowFormat::setBottomBorderPen( const QPen & p )
+void RowFormat::setBottomBorderPen( const TQPen & p )
{
if ( row() < KS_rowMax )
{
@@ -2726,7 +2725,7 @@ void RowFormat::setBottomBorderPen( const QPen & p )
Format::setBottomBorderPen( p );
}
-void RowFormat::setHide( bool _hide, bool repaint )
+void RowFormat::setHide( bool _hide, bool tqrepaint )
{
if ( _hide != m_bHide ) // only if we change the status
{
@@ -2735,14 +2734,14 @@ void RowFormat::setHide( bool _hide, bool repaint )
// Lower maximum size by height of row
m_pSheet->adjustSizeMaxY ( - dblHeight() );
m_bHide = _hide; //hide must be set after we requested the height
- m_pSheet->emit_updateRow( this, m_iRow, repaint );
+ m_pSheet->emit_updateRow( this, m_iRow, tqrepaint );
}
else
{
// Rise maximum size by height of row
m_bHide = _hide; //unhide must be set before we request the height
m_pSheet->adjustSizeMaxY ( dblHeight() );
- m_pSheet->emit_updateRow( this, m_iRow, repaint );
+ m_pSheet->emit_updateRow( this, m_iRow, tqrepaint );
}
}
}
@@ -2876,28 +2875,28 @@ double ColumnFormat::mmWidth() const
}
-QDomElement ColumnFormat::save( QDomDocument& doc, int xshift, bool copy ) const
+TQDomElement ColumnFormat::save( TQDomDocument& doc, int xshift, bool copy ) const
{
- QDomElement col( doc.createElement( "column" ) );
+ TQDomElement col( doc.createElement( "column" ) );
col.setAttribute( "width", m_fWidth );
col.setAttribute( "column", m_iColumn - xshift );
if ( m_bHide )
col.setAttribute( "hide", (int) m_bHide );
- QDomElement format( saveFormat( doc, false, copy ) );
+ TQDomElement format( saveFormat( doc, false, copy ) );
col.appendChild( format );
return col;
}
-bool ColumnFormat::load( const QDomElement & col, int xshift, Paste::Mode sp, bool paste )
+bool ColumnFormat::load( const TQDomElement & col, int xshift, Paste::Mode sp, bool paste )
{
bool ok;
if ( col.hasAttribute( "width" ) )
{
if ( m_pSheet->doc()->syntaxVersion() < 1 ) //combatibility to old format - was in millimeter
- m_fWidth = qRound( MM_TO_POINT ( col.attribute( "width" ).toDouble( &ok ) ) );
+ m_fWidth = tqRound( MM_TO_POINT ( col.attribute( "width" ).toDouble( &ok ) ) );
else
m_fWidth = col.attribute( "width" ).toDouble( &ok );
@@ -2928,7 +2927,7 @@ bool ColumnFormat::load( const QDomElement & col, int xshift, Paste::Mode sp, bo
return false;
}
- QDomElement f( col.namedItem( "format" ).toElement() );
+ TQDomElement f( col.namedItem( "format" ).toElement() );
if ( !f.isNull() && ( sp == Paste::Normal || sp == Paste::Format || sp == Paste::NoBorder ))
{
@@ -2940,7 +2939,7 @@ bool ColumnFormat::load( const QDomElement & col, int xshift, Paste::Mode sp, bo
return true;
}
-const QPen & ColumnFormat::leftBorderPen( int _col, int _row ) const
+const TQPen & ColumnFormat::leftBorderPen( int _col, int _row ) const
{
// First look ar the right column at the right
if ( !hasProperty( PLeftBorder, false ) )
@@ -2953,7 +2952,7 @@ const QPen & ColumnFormat::leftBorderPen( int _col, int _row ) const
return Format::leftBorderPen( _col, _row );
}
-void ColumnFormat::setLeftBorderPen( const QPen & p )
+void ColumnFormat::setLeftBorderPen( const TQPen & p )
{
ColumnFormat * cl = sheet()->nonDefaultColumnFormat( column() - 1, false );
if ( cl )
@@ -2962,7 +2961,7 @@ void ColumnFormat::setLeftBorderPen( const QPen & p )
Format::setLeftBorderPen( p );
}
-const QPen & ColumnFormat::rightBorderPen( int _col, int _row ) const
+const TQPen & ColumnFormat::rightBorderPen( int _col, int _row ) const
{
// First look ar the right column at the right
if ( !hasProperty( PRightBorder, false ) && ( _col < KS_colMax ) )
@@ -2975,7 +2974,7 @@ const QPen & ColumnFormat::rightBorderPen( int _col, int _row ) const
return Format::rightBorderPen( _col, _row );
}
-void ColumnFormat::setRightBorderPen( const QPen & p )
+void ColumnFormat::setRightBorderPen( const TQPen & p )
{
if ( column() < KS_colMax )
{
@@ -3141,7 +3140,7 @@ namespace Currency_LNS
{ "COP", I18N_NOOP("Colombia"), I18N_NOOP("Colombian Peso"), I18N_NOOP("C$") },
{ "KMF", I18N_NOOP("Comoros"), I18N_NOOP("Comoro Franc"), I18N_NOOP("KMF") },
{ "XAF", I18N_NOOP("Congo"), I18N_NOOP("CFA Franc BEAC"), I18N_NOOP("XAF") },
- { "CDF", I18N_NOOP("Congo, The Democratic Republic Of"), I18N_NOOP("Franc Congolais"), I18N_NOOP("CDF") },
+ { "CDF", I18N_NOOP("Congo, The Detqmocratic Republic Of"), I18N_NOOP("Franc Congolais"), I18N_NOOP("CDF") },
{ "NZD", I18N_NOOP("Cook Islands"), I18N_NOOP("New Zealand Dollar"), I18N_NOOP("NZD") },
{ "CRC", I18N_NOOP("Costa Rica"), I18N_NOOP("Costa Rican Colon"), I18N_NOOP("C") },
{ "XOF", I18N_NOOP("Cote D'Ivoire"), I18N_NOOP("CFA Franc BCEAO"), I18N_NOOP("XOF") },
@@ -3215,11 +3214,11 @@ namespace Currency_LNS
{ "KZT", I18N_NOOP("Kazakhstan"), I18N_NOOP("Tenge"), I18N_NOOP("KZT") },
{ "KES", I18N_NOOP("Kenya"), I18N_NOOP("Kenyan Shilling"), I18N_NOOP("KES") },
{ "AUD", I18N_NOOP("Kiribati"), I18N_NOOP("Australian Dollar"), I18N_NOOP("AUD") },
- { "KPW", I18N_NOOP("Korea, Democratic People's Republic Of"), I18N_NOOP("North Korean Won"), I18N_NOOP("KPW") },
+ { "KPW", I18N_NOOP("Korea, Detqmocratic People's Republic Of"), I18N_NOOP("North Korean Won"), I18N_NOOP("KPW") },
{ "KRW", I18N_NOOP("Korea, Republic Of"), I18N_NOOP("Won"), I18N_NOOP("KRW") },
{ "KWD", I18N_NOOP("Kuwait"), I18N_NOOP("Kuwaiti Dinar"), I18N_NOOP("KWD") },
{ "KGS", I18N_NOOP("Kyrgyzstan"), I18N_NOOP("Som"), I18N_NOOP("KGS") },
- { "LAK", I18N_NOOP("Lao People's Democratic Republic"), I18N_NOOP("Kip"), I18N_NOOP("LAK") },
+ { "LAK", I18N_NOOP("Lao People's Detqmocratic Republic"), I18N_NOOP("Kip"), I18N_NOOP("LAK") },
{ "LVL", I18N_NOOP("Latvia"), I18N_NOOP("Latvian Lats"), I18N_NOOP("Ls") },
{ "LBP", I18N_NOOP("Lebanon"), I18N_NOOP("Lebanese Pound"), I18N_NOOP("LBP") },
{ "ZAR", I18N_NOOP("Lesotho"), I18N_NOOP("Rand"), I18N_NOOP("ZAR") },
@@ -3283,7 +3282,7 @@ namespace Currency_LNS
{ "EUR", I18N_NOOP("Portugal"), I18N_NOOP("Euro"), I18N_NOOP("EUR") },
{ "PTE", I18N_NOOP("Portugal"), I18N_NOOP("Escudo"), I18N_NOOP("Esc.") },
{ "USD", I18N_NOOP("Puerto Rico"), I18N_NOOP("US Dollar"), I18N_NOOP("USD") },
- { "QAR", I18N_NOOP("Qatar"), I18N_NOOP("Qatari Rial"), I18N_NOOP("QAR") },
+ { "TQAR", I18N_NOOP("Qatar"), I18N_NOOP("Qatari Rial"), I18N_NOOP("TQAR") },
{ "ROL", I18N_NOOP("Romania"), I18N_NOOP("Leu"), I18N_NOOP("LEI") },
{ "RUR", I18N_NOOP("Russian Federation"), I18N_NOOP("Russian Ruble"), I18N_NOOP("RUR") },
{ "RUB", I18N_NOOP("Russian Federation"), I18N_NOOP("Russian Ruble"), I18N_NOOP("RUB") },
@@ -3361,27 +3360,27 @@ namespace Currency_LNS
}
// Those return the _untranslated_ strings from the above array
- QString getCode(int t) const
+ TQString getCode(int t) const
{
- return QString::fromUtf8( m_List[t].code );
+ return TQString::fromUtf8( m_List[t].code );
}
- QString getCountry(int t) const
+ TQString getCountry(int t) const
{
- return QString::fromUtf8( m_List[t].country );
+ return TQString::fromUtf8( m_List[t].country );
}
- QString getName(int t) const
+ TQString getName(int t) const
{
- return QString::fromUtf8( m_List[t].name );
+ return TQString::fromUtf8( m_List[t].name );
}
- QString getDisplayCode(int t) const
+ TQString getDisplayCode(int t) const
{
- return QString::fromUtf8( m_List[t].display );
+ return TQString::fromUtf8( m_List[t].display );
}
- int getIndex(const QString& code) const
+ int getIndex(const TQString& code) const
{
int index = 0;
while (m_List[index].code != 0 && m_List[index].code != code)
@@ -3415,7 +3414,7 @@ Currency::Currency(int index)
{
}
-Currency::Currency(int index, QString const & code)
+Currency::Currency(int index, TQString const & code)
: m_type ( 1 ), // unspec
m_code( code )
{
@@ -3423,22 +3422,22 @@ Currency::Currency(int index, QString const & code)
m_type = index;
}
-Currency::Currency(QString const & code, currencyFormat format)
+Currency::Currency(TQString const & code, currencyFormat format)
: m_type( 1 ), // unspec
m_code( code )
{
if ( format == Gnumeric )
{
- // I use QChar(c,r) here so that this file can be opened in any encoding...
- if ( code.find( QChar( 172, 32 ) ) != -1 ) // Euro sign
- m_code = QChar( 172, 32 );
- else if ( code.find( QChar( 163, 0 ) ) != -1 ) // Pound sign
- m_code = QChar( 163, 0 );
- else if ( code.find( QChar( 165, 0 ) ) != -1 ) // Yen sign
- m_code = QChar( 165, 0 );
+ // I use TQChar(c,r) here so that this file can be opened in any encoding...
+ if ( code.tqfind( TQChar( 172, 32 ) ) != -1 ) // Euro sign
+ m_code = TQChar( 172, 32 );
+ else if ( code.tqfind( TQChar( 163, 0 ) ) != -1 ) // Pound sign
+ m_code = TQChar( 163, 0 );
+ else if ( code.tqfind( TQChar( 165, 0 ) ) != -1 ) // Yen sign
+ m_code = TQChar( 165, 0 );
else if ( code[0] == '[' && code[1] == '$' )
{
- int n = code.find(']');
+ int n = code.tqfind(']');
if (n != -1)
{
m_code = code.mid( 2, n - 2 );
@@ -3448,7 +3447,7 @@ Currency::Currency(QString const & code, currencyFormat format)
m_type = 0;
}
}
- else if ( code.find( '$' ) != -1 )
+ else if ( code.tqfind( '$' ) != -1 )
m_code = "$";
} // end gnumeric
m_type = gCurrencyMap.getIndex( m_code );
@@ -3494,22 +3493,22 @@ Currency::operator int() const
return m_type;
}
-QString Currency::getCode() const
+TQString Currency::getCode() const
{
return m_code;
}
-QString Currency::getCountry() const
+TQString Currency::getCountry() const
{
return gCurrencyMap.getCountry( m_type );
}
-QString Currency::getName() const
+TQString Currency::getName() const
{
return gCurrencyMap.getName( m_type );
}
-QString Currency::getDisplayCode() const
+TQString Currency::getDisplayCode() const
{
return gMoneyList[m_type].display;
}
@@ -3519,14 +3518,14 @@ int Currency::getIndex() const
return m_type;
}
-QString Currency::getExportCode( currencyFormat format ) const
+TQString Currency::getExportCode( currencyFormat format ) const
{
if ( format == Gnumeric )
{
if ( m_code.length() == 1 ) // symbol
return m_code;
- QString ret( "[$");
+ TQString ret( "[$");
ret += m_code;
ret += "]";
@@ -3536,16 +3535,16 @@ QString Currency::getExportCode( currencyFormat format ) const
return m_code;
}
-QString Currency::getChooseString( int type, bool & ok )
+TQString Currency::getChooseString( int type, bool & ok )
{
if ( !gMoneyList[type].country )
{
ok = false;
- return QString::null;
+ return TQString();
}
if ( type < 24 )
{
- QString ret( i18n( gMoneyList[type].name ) );
+ TQString ret( i18n( gMoneyList[type].name ) );
if ( gMoneyList[type].country[0] )
{
ret += " (";
@@ -3556,7 +3555,7 @@ QString Currency::getChooseString( int type, bool & ok )
}
else
{
- QString ret( i18n( gMoneyList[type].country ) );
+ TQString ret( i18n( gMoneyList[type].country ) );
if ( gMoneyList[type].name[0] )
{
ret += " (";
@@ -3567,15 +3566,15 @@ QString Currency::getChooseString( int type, bool & ok )
}
}
-QString Currency::getDisplaySymbol( int type )
+TQString Currency::getDisplaySymbol( int type )
{
return i18n( gMoneyList[type].display );
}
// Currently unused
-QString Currency::getCurrencyCode( int type )
+TQString Currency::getCurrencyCode( int type )
{
- return QString::fromUtf8( gMoneyList[type].code );
+ return TQString::fromUtf8( gMoneyList[type].code );
}
#undef UPDATE_BEGIN