summaryrefslogtreecommitdiffstats
path: root/kspread/kspread_style.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kspread/kspread_style.cc')
-rw-r--r--kspread/kspread_style.cc526
1 files changed, 263 insertions, 263 deletions
diff --git a/kspread/kspread_style.cc b/kspread/kspread_style.cc
index 79619793..ef3b9158 100644
--- a/kspread/kspread_style.cc
+++ b/kspread/kspread_style.cc
@@ -17,8 +17,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
-#include <qbuffer.h>
+#include <tqdom.h>
+#include <tqbuffer.h>
#include <kdebug.h>
#include <klocale.h>
@@ -37,7 +37,7 @@
using namespace KSpread;
-static uint calculateValue( QPen const & pen )
+static uint calculateValue( TQPen const & pen )
{
uint n = pen.color().red() + pen.color().green() + pen.color().blue();
@@ -58,18 +58,18 @@ Style::Style()
m_floatColor( Format::AllBlack ),
m_formatType( Generic_format ),
m_fontFlags( 0 ),
- m_bgColor( Qt::white ),
- m_backGroundBrush( Qt::red, Qt::NoBrush ),
+ m_bgColor( TQt::white ),
+ m_backGroundBrush( TQt::red, TQt::NoBrush ),
m_rotateAngle( 0 ),
m_indent( 0.0 ),
m_precision( -1 ),
m_properties( 0 )
{
- QFont f( KoGlobal::defaultFont() );
+ TQFont f( KoGlobal::defaultFont() );
m_fontFamily = f.family();
m_fontSize = f.pointSize();
- QPen pen( Qt::black, 1, Qt::NoPen );
+ TQPen pen( TQt::black, 1, TQt::NoPen );
m_textPen = pen;
m_leftBorderPen = pen;
@@ -134,7 +134,7 @@ bool Style::operator == (const Style& style) const
if ( m_type != style.m_type )
return false;
// NOTE Stefan: Only compare the values of the set features.
- if ( // layout (4)
+ if ( // tqlayout (4)
( m_featuresSet & SAlignX ) && ( m_alignX != style.m_alignX ) ||
( m_featuresSet & SAlignY ) && ( m_alignY != style.m_alignY ) ||
( m_featuresSet & SAngle ) && ( m_rotateAngle != style.m_rotateAngle ) ||
@@ -181,9 +181,9 @@ bool Style::operator == (const Style& style) const
return true;
}
-void Style::loadOasisStyle( KoOasisStyles& oasisStyles, const QDomElement & element )
+void Style::loadOasisStyle( KoOasisStyles& oasisStyles, const TQDomElement & element )
{
- // NOTE Stefan: Don't fill the style stack with the parent styles!
+ // NOTE Stefan: Don't fill the style stack with the tqparent styles!
KoStyleStack styleStack;
styleStack.push( element );
styleStack.setTypeProperties( "table-cell" );
@@ -196,22 +196,22 @@ void Style::loadOasisStyle( KoOasisStyles& oasisStyles, const QDomElement & elem
loadOasisDataStyle( oasisStyles, element );
}
-void Style::loadOasisDataStyle( KoOasisStyles& oasisStyles, const QDomElement& element )
+void Style::loadOasisDataStyle( KoOasisStyles& oasisStyles, const TQDomElement& element )
{
- QString str;
+ TQString str;
if ( element.hasAttributeNS( KoXmlNS::style, "data-style-name" ) )
{
-// kdDebug()<<"element.attribute( style:data-style-name ) :"<<element.attributeNS( KoXmlNS::style, "data-style-name", QString::null )<<endl;
-// kdDebug()<< " oasisStyles.dataFormats()[...] :"<< oasisStyles.dataFormats()[element.attributeNS( KoXmlNS::style, "data-style-name" , QString::null)].formatStr<<endl;
-// kdDebug()<< " oasisStyles.dataFormats()[...] prefix :"<< oasisStyles.dataFormats()[element.attributeNS( KoXmlNS::style, "data-style-name" , QString::null)].prefix<<endl;
-// kdDebug()<< " oasisStyles.dataFormats()[...] suffix :"<< oasisStyles.dataFormats()[element.attributeNS( KoXmlNS::style, "data-style-name" , QString::null)].suffix<<endl;
+// kdDebug()<<"element.attribute( style:data-style-name ) :"<<element.attributeNS( KoXmlNS::style, "data-style-name", TQString() )<<endl;
+// kdDebug()<< " oasisStyles.dataFormats()[...] :"<< oasisStyles.dataFormats()[element.attributeNS( KoXmlNS::style, "data-style-name" , TQString())].formatStr<<endl;
+// kdDebug()<< " oasisStyles.dataFormats()[...] prefix :"<< oasisStyles.dataFormats()[element.attributeNS( KoXmlNS::style, "data-style-name" , TQString())].prefix<<endl;
+// kdDebug()<< " oasisStyles.dataFormats()[...] suffix :"<< oasisStyles.dataFormats()[element.attributeNS( KoXmlNS::style, "data-style-name" , TQString())].suffix<<endl;
- const QString styleName = element.attributeNS( KoXmlNS::style, "data-style-name", QString::null );
- if ( oasisStyles.dataFormats().contains(styleName) )
+ const TQString styleName = element.attributeNS( KoXmlNS::style, "data-style-name", TQString() );
+ if ( oasisStyles.dataFormats().tqcontains(styleName) )
{
const KoOasisStyles::NumericStyleFormat dataStyle = oasisStyles.dataFormats()[styleName];
- QString tmp = dataStyle.prefix;
+ TQString tmp = dataStyle.prefix;
if ( !tmp.isEmpty() )
{
m_prefix = tmp;
@@ -304,7 +304,7 @@ void Style::loadOasisParagraphProperties( KoOasisStyles& oasisStyles, const KoSt
kdDebug() << "\t paragraph-properties" << endl;
if ( styleStack.hasAttributeNS( KoXmlNS::fo, "text-align" ) )
{
- QString str = styleStack.attributeNS( KoXmlNS::fo, "text-align" );
+ TQString str = styleStack.attributeNS( KoXmlNS::fo, "text-align" );
if ( str == "center" )
m_alignX = Format::Center;
else if ( str == "end" )
@@ -320,7 +320,7 @@ void Style::loadOasisParagraphProperties( KoOasisStyles& oasisStyles, const KoSt
void Style::loadOasisTableCellProperties( KoOasisStyles& oasisStyles, const KoStyleStack& styleStack )
{
- QString str;
+ TQString str;
if ( styleStack.hasAttributeNS( KoXmlNS::style, "vertical-align" ) )
{
m_alignY = Format::UndefinedY;
@@ -338,8 +338,8 @@ void Style::loadOasisTableCellProperties( KoOasisStyles& oasisStyles, const KoSt
}
if ( styleStack.hasAttributeNS( KoXmlNS::fo, "background-color" ) )
{
- m_bgColor = QColor( styleStack.attributeNS( KoXmlNS::fo, "background-color" ) );
- if ( m_bgColor.isValid() && m_bgColor != Qt::white )
+ m_bgColor = TQColor( styleStack.attributeNS( KoXmlNS::fo, "background-color" ) );
+ if ( m_bgColor.isValid() && m_bgColor != TQt::white )
m_featuresSet |= SBackgroundColor;
}
@@ -408,7 +408,7 @@ void Style::loadOasisTableCellProperties( KoOasisStyles& oasisStyles, const KoSt
if ( styleStack.hasAttributeNS( KoXmlNS::fo, "border" ) )
{
str=styleStack.attributeNS( KoXmlNS::fo, "border" );
- QPen pen = convertOasisStringToPen( str );
+ TQPen pen = convertOasisStringToPen( str );
m_featuresSet |= SLeftBorder;
m_featuresSet |= SRightBorder;
m_featuresSet |= STopBorder;
@@ -459,7 +459,7 @@ void Style::loadOasisTableCellProperties( KoOasisStyles& oasisStyles, const KoSt
{
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" );
kdDebug()<<" style :"<<style<<endl;
if ( style )
{
@@ -468,7 +468,7 @@ void Style::loadOasisTableCellProperties( KoOasisStyles& oasisStyles, const KoSt
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" )
@@ -547,12 +547,12 @@ void Style::loadOasisTextProperties( KoOasisStyles& oasisStyles, const KoStyleSt
}
if ( styleStack.hasAttributeNS( KoXmlNS::fo, "color" ) )
{
- QColor color = QColor( styleStack.attributeNS( KoXmlNS::fo, "color" ) );
+ TQColor color = TQColor( styleStack.attributeNS( KoXmlNS::fo, "color" ) );
if ( color.isValid() )
{
m_featuresSet |= STextPen;
- m_textPen = QPen( color );
- kdDebug() << "\t\t fo:color: " << color.name() << endl;
+ m_textPen = TQPen( color );
+ kdDebug() << "\t\t fo:color: " << TQString(color.name()) << endl;
}
}
if ( styleStack.hasAttributeNS( KoXmlNS::style, "text-line-through-style" ) )
@@ -568,26 +568,26 @@ void Style::loadOasisTextProperties( KoOasisStyles& oasisStyles, const KoStyleSt
}
}
-static QString convertDateFormat( const QString& date )
+static TQString convertDateFormat( const TQString& date )
{
- QString result = date;
- result.replace( "%Y", "yyyy" );
- result.replace( "%y", "yy" );
- result.replace( "%n", "M" );
- result.replace( "%m", "MM" );
- result.replace( "%e", "d" );
- result.replace( "%d", "dd" );
- result.replace( "%b", "MMM" );
- result.replace( "%B", "MMMM" );
- result.replace( "%a", "ddd" );
- result.replace( "%A", "dddd" );
+ TQString result = date;
+ result.tqreplace( "%Y", "yyyy" );
+ result.tqreplace( "%y", "yy" );
+ result.tqreplace( "%n", "M" );
+ result.tqreplace( "%m", "MM" );
+ result.tqreplace( "%e", "d" );
+ result.tqreplace( "%d", "dd" );
+ result.tqreplace( "%b", "MMM" );
+ result.tqreplace( "%B", "MMMM" );
+ result.tqreplace( "%a", "ddd" );
+ result.tqreplace( "%A", "dddd" );
return result;
}
-FormatType Style::dateType( const QString &_format )
+FormatType Style::dateType( const TQString &_format )
{
- const QString dateFormatShort = convertDateFormat( KGlobal::locale()->dateFormatShort() );
- const QString dateFormat = convertDateFormat( KGlobal::locale()->dateFormat() );
+ const TQString dateFormatShort = convertDateFormat( KGlobal::locale()->dateFormatShort() );
+ const TQString dateFormat = convertDateFormat( KGlobal::locale()->dateFormat() );
if ( _format == "dd-MMM-yy" )
return date_format1;
@@ -647,7 +647,7 @@ FormatType Style::dateType( const QString &_format )
return ShortDate_format;
}
-FormatType Style::timeType( const QString &_format )
+FormatType Style::timeType( const TQString &_format )
{
if ( _format == "h:mm AP" )
return Time_format1;
@@ -669,7 +669,7 @@ FormatType Style::timeType( const QString &_format )
return Time_format;
}
-FormatType Style::fractionType( const QString &_format )
+FormatType Style::fractionType( const TQString &_format )
{
if ( _format == "# ?/2" )
return fraction_half;
@@ -693,14 +693,14 @@ FormatType Style::fractionType( const QString &_format )
return fraction_half;
}
-QString Style::saveOasisStyleNumeric( KoGenStyle &style, KoGenStyles &mainStyles,
+TQString Style::saveOasisStyleNumeric( KoGenStyle &style, KoGenStyles &mainStyles,
FormatType _style,
- const QString &_prefix, const QString &_postfix,
- int _precision, const QString& symbol )
+ const TQString &_prefix, const TQString &_postfix,
+ int _precision, const TQString& symbol )
{
// kdDebug() << k_funcinfo << endl;
- QString styleName;
- QString valueType;
+ TQString styleName;
+ TQString valueType;
switch( _style )
{
case Number_format:
@@ -801,15 +801,15 @@ QString Style::saveOasisStyleNumeric( KoGenStyle &style, KoGenStyles &mainStyles
return styleName;
}
-QString Style::saveOasisStyleNumericNumber( KoGenStyles& mainStyles, FormatType /*_style*/, int _precision,
- const QString &_prefix, const QString &_suffix )
+TQString Style::saveOasisStyleNumericNumber( KoGenStyles& mainStyles, FormatType /*_style*/, int _precision,
+ const TQString &_prefix, const TQString &_suffix )
{
- QString format;
+ TQString format;
if ( _precision == -1 )
format="0";
else
{
- QString tmp;
+ TQString tmp;
for ( int i = 0; i <_precision; i++ )
{
tmp+="0";
@@ -819,22 +819,22 @@ QString Style::saveOasisStyleNumericNumber( KoGenStyles& mainStyles, FormatType
return KoOasisStyles::saveOasisNumberStyle( mainStyles, format, _prefix, _suffix );
}
-QString Style::saveOasisStyleNumericText( KoGenStyles& /*mainStyles*/, FormatType /*_style*/, int /*_precision*/,
- const QString &/*_prefix*/, const QString &/*_suffix*/ )
+TQString Style::saveOasisStyleNumericText( KoGenStyles& /*mainStyles*/, FormatType /*_style*/, int /*_precision*/,
+ const TQString &/*_prefix*/, const TQString &/*_suffix*/ )
{
return "";
}
-QString Style::saveOasisStyleNumericMoney( KoGenStyles& mainStyles, FormatType /*_style*/,
- const QString& symbol, int _precision,
- const QString &_prefix, const QString &_suffix )
+TQString Style::saveOasisStyleNumericMoney( KoGenStyles& mainStyles, FormatType /*_style*/,
+ const TQString& symbol, int _precision,
+ const TQString &_prefix, const TQString &_suffix )
{
- QString format;
+ TQString format;
if ( _precision == -1 )
format="0";
else
{
- QString tmp;
+ TQString tmp;
for ( int i = 0; i <_precision; i++ )
{
tmp+="0";
@@ -844,21 +844,21 @@ QString Style::saveOasisStyleNumericMoney( KoGenStyles& mainStyles, FormatType /
return KoOasisStyles::saveOasisCurrencyStyle( mainStyles, format, symbol, _prefix, _suffix );
}
-QString Style::saveOasisStyleNumericPercentage( KoGenStyles&mainStyles, FormatType /*_style*/,
+TQString Style::saveOasisStyleNumericPercentage( KoGenStyles&mainStyles, FormatType /*_style*/,
int _precision,
- const QString &_prefix, const QString &_suffix )
+ const TQString &_prefix, const TQString &_suffix )
{
//<number:percentage-style style:name="N106" style:family="data-style">
//<number:number number:decimal-places="6" number:min-integer-digits="1"/>
//<number:text>%</number:text>
//</number:percentage-style>
//TODO add decimal etc.
- QString format;
+ TQString format;
if ( _precision == -1 )
format="0";
else
{
- QString tmp;
+ TQString tmp;
for ( int i = 0; i <_precision; i++ )
{
tmp+="0";
@@ -869,18 +869,18 @@ QString Style::saveOasisStyleNumericPercentage( KoGenStyles&mainStyles, FormatTy
}
-QString Style::saveOasisStyleNumericScientific( KoGenStyles&mainStyles, FormatType /*_style*/,
- const QString &_prefix, const QString _suffix, int _precision )
+TQString Style::saveOasisStyleNumericScientific( KoGenStyles&mainStyles, FormatType /*_style*/,
+ const TQString &_prefix, const TQString _suffix, int _precision )
{
//<number:number-style style:name="N60" style:family="data-style">
// <number:scientific-number number:decimal-places="2" number:min-integer-digits="1" number:min-exponent-digits="3"/>
//</number:number-style>
- QString format;
+ TQString format;
if ( _precision == -1 )
format="0E+00";
else
{
- QString tmp;
+ TQString tmp;
for ( int i = 0; i <_precision; i++ )
{
tmp+="0";
@@ -890,10 +890,10 @@ QString Style::saveOasisStyleNumericScientific( KoGenStyles&mainStyles, FormatTy
return KoOasisStyles::saveOasisScientificStyle( mainStyles, format, _prefix, _suffix );
}
-QString Style::saveOasisStyleNumericDate( KoGenStyles&mainStyles, FormatType _style,
- const QString &_prefix, const QString &_suffix )
+TQString Style::saveOasisStyleNumericDate( KoGenStyles&mainStyles, FormatType _style,
+ const TQString &_prefix, const TQString &_suffix )
{
- QString format;
+ TQString format;
bool locale = false;
switch( _style )
{
@@ -991,8 +991,8 @@ QString Style::saveOasisStyleNumericDate( KoGenStyles&mainStyles, FormatType _st
return KoOasisStyles::saveOasisDateStyle( mainStyles, format, locale, _prefix, _suffix );
}
-QString Style::saveOasisStyleNumericCustom( KoGenStyles& /*mainStyles*/, FormatType /*_style*/,
- const QString &/*_prefix*/, const QString &/*_suffix*/ )
+TQString Style::saveOasisStyleNumericCustom( KoGenStyles& /*mainStyles*/, FormatType /*_style*/,
+ const TQString &/*_prefix*/, const TQString &/*_suffix*/ )
{
//TODO
//<number:date-style style:name="N50" style:family="data-style" number:automatic-order="true" number:format-source="language">
@@ -1011,8 +1011,8 @@ QString Style::saveOasisStyleNumericCustom( KoGenStyles& /*mainStyles*/, FormatT
return "";
}
-QString Style::saveOasisStyleNumericTime( KoGenStyles& mainStyles, FormatType _style,
- const QString &_prefix, const QString &_suffix )
+TQString Style::saveOasisStyleNumericTime( KoGenStyles& mainStyles, FormatType _style,
+ const TQString &_prefix, const TQString &_suffix )
{
//<number:time-style style:name="N42" style:family="data-style">
//<number:hours number:style="long"/>
@@ -1022,7 +1022,7 @@ QString Style::saveOasisStyleNumericTime( KoGenStyles& mainStyles, FormatType _s
//<number:am-pm/>
//</number:time-style>
- QString format;
+ TQString format;
bool locale = false;
//TODO use format
switch( _style )
@@ -1065,13 +1065,13 @@ QString Style::saveOasisStyleNumericTime( KoGenStyles& mainStyles, FormatType _s
}
-QString Style::saveOasisStyleNumericFraction( KoGenStyles &mainStyles, FormatType _style,
- const QString &_prefix, const QString _suffix )
+TQString Style::saveOasisStyleNumericFraction( KoGenStyles &mainStyles, FormatType _style,
+ const TQString &_prefix, const TQString _suffix )
{
//<number:number-style style:name="N71" style:family="data-style">
//<number:fraction number:min-integer-digits="0" number:min-numerator-digits="2" number:min-denominator-digits="2"/>
//</number:number-style>
- QString format;
+ TQString format;
switch( _style )
{
case fraction_half:
@@ -1109,7 +1109,7 @@ QString Style::saveOasisStyleNumericFraction( KoGenStyles &mainStyles, FormatTyp
return KoOasisStyles::saveOasisFractionStyle( mainStyles, format, _prefix, _suffix );
}
-QString Style::saveOasis( KoGenStyle& style, KoGenStyles& mainStyles )
+TQString Style::saveOasis( KoGenStyle& style, KoGenStyles& mainStyles )
{
// KSpread::Style is definitly an OASIS auto style,
// but don't overwrite it, if it already exists
@@ -1117,7 +1117,7 @@ QString Style::saveOasis( KoGenStyle& style, KoGenStyles& mainStyles )
style = KoGenStyle( Doc::STYLE_CELL_AUTO, "table-cell" );
// doing the real work
saveOasisStyle( style, mainStyles );
- return QString::null;
+ return TQString();
}
void Style::saveOasisStyle( KoGenStyle &style, KoGenStyles &mainStyles )
@@ -1131,14 +1131,14 @@ void Style::saveOasisStyle( KoGenStyle &style, KoGenStyles &mainStyles )
// kdDebug() << "AUTO" << endl;
#endif
- // don't store parent, if it's the default style
+ // don't store tqparent, if it's the default style
if ( m_parent && (m_parent->type() != BUILTIN || m_parent->name() != "Default") )
- // FIXME this is not the OASIS parent style's name. it's its display name!
- style.addAttribute( "style:parent-style-name", m_parent->name() );
+ // FIXME this is not the OASIS tqparent style's name. it's its display name!
+ style.addAttribute( "style:tqparent-style-name", m_parent->name() );
if ( featureSet( SAlignX ) && alignX() != Format::Undefined )
{
- QString value;
+ TQString value;
switch( alignX() )
{
case Format::Center:
@@ -1162,7 +1162,7 @@ void Style::saveOasisStyle( KoGenStyle &style, KoGenStyles &mainStyles )
if ( featureSet( SAlignY ) )
{
- QString value;
+ TQString value;
switch( alignY() )
{
case Format::Top:
@@ -1182,7 +1182,7 @@ void Style::saveOasisStyle( KoGenStyle &style, KoGenStyles &mainStyles )
style.addProperty( "style:vertical-align", value );
}
- if ( featureSet( SBackgroundColor ) && m_bgColor != QColor() && m_bgColor.isValid() )
+ if ( featureSet( SBackgroundColor ) && m_bgColor != TQColor() && m_bgColor.isValid() )
style.addProperty( "fo:background-color", colorName(m_bgColor) );
if ( featureSet( SMultiRow ) && hasProperty( PMultiRow ) )
@@ -1213,7 +1213,7 @@ void Style::saveOasisStyle( KoGenStyle &style, KoGenStyles &mainStyles )
if ( featureSet( SAngle ) && m_rotateAngle != 0 )
{
style.addProperty( "style:rotation-align", "none" );
- style.addProperty( "style:rotation-angle", QString::number( -1.0 *m_rotateAngle ) );
+ style.addProperty( "style:rotation-angle", TQString::number( -1.0 *m_rotateAngle ) );
}
if ( featureSet( SIndent ) && m_indent != 0.0 )
@@ -1257,7 +1257,7 @@ void Style::saveOasisStyle( KoGenStyle &style, KoGenStyles &mainStyles )
}
// borders
- // NOTE Stefan: QPen api docs:
+ // NOTE Stefan: TQPen api docs:
// For horizontal and vertical lines a line width of 0 is
// the same as a line width of 1.
// A line width of 0 will produce a 1 pixel wide line using
@@ -1270,28 +1270,28 @@ void Style::saveOasisStyle( KoGenStyle &style, KoGenStyles &mainStyles )
( m_leftBorderPen == m_rightBorderPen ) &&
( m_leftBorderPen == m_bottomBorderPen ) )
{
- if ( m_leftBorderPen.style() != Qt::NoPen )
+ if ( m_leftBorderPen.style() != TQt::NoPen )
style.addProperty("fo:border", convertOasisPenToString( m_leftBorderPen ) );
}
else
{
- if ( featureSet( SLeftBorder ) && ( m_leftBorderPen.style() != Qt::NoPen ) )
+ if ( featureSet( SLeftBorder ) && ( m_leftBorderPen.style() != TQt::NoPen ) )
style.addProperty( "fo:border-left", convertOasisPenToString( m_leftBorderPen ) );
- if ( featureSet( SRightBorder ) && ( m_rightBorderPen.style() != Qt::NoPen ) )
+ if ( featureSet( SRightBorder ) && ( m_rightBorderPen.style() != TQt::NoPen ) )
style.addProperty( "fo:border-right", convertOasisPenToString( m_rightBorderPen ) );
- if ( featureSet( STopBorder ) && ( m_topBorderPen.style() != Qt::NoPen ) )
+ if ( featureSet( STopBorder ) && ( m_topBorderPen.style() != TQt::NoPen ) )
style.addProperty( "fo:border-top", convertOasisPenToString( m_topBorderPen ) );
- if ( featureSet( SBottomBorder ) && ( m_bottomBorderPen.style() != Qt::NoPen ) )
+ if ( featureSet( SBottomBorder ) && ( m_bottomBorderPen.style() != TQt::NoPen ) )
style.addProperty( "fo:border-bottom", convertOasisPenToString( m_bottomBorderPen ) );
}
- if ( featureSet( SFallDiagonal ) && ( m_fallDiagonalPen.style() != Qt::NoPen ) )
+ if ( featureSet( SFallDiagonal ) && ( m_fallDiagonalPen.style() != TQt::NoPen ) )
{
style.addProperty("style:diagonal-tl-br", convertOasisPenToString( m_fallDiagonalPen ) );
}
- if ( featureSet( SGoUpDiagonal ) && ( m_goUpDiagonalPen.style() != Qt::NoPen ) )
+ if ( featureSet( SGoUpDiagonal ) && ( m_goUpDiagonalPen.style() != TQt::NoPen ) )
{
style.addProperty("style:diagonal-bl-tr", convertOasisPenToString(m_goUpDiagonalPen ) );
}
@@ -1324,22 +1324,22 @@ void Style::saveOasisStyle( KoGenStyle &style, KoGenStyles &mainStyles )
if ( featureSet( SFontFlag ) && m_fontFlags & (uint) FStrike )
style.addProperty( "style:text-line-through-style", "solid", KoGenStyle::TextType );
- if ( featureSet( STextPen ) && m_textPen.color().isValid() ) // always save; default: m_textPen.style() == Qt::NoPen
+ if ( featureSet( STextPen ) && m_textPen.color().isValid() ) // always save; default: m_textPen.style() == TQt::NoPen
{
style.addProperty("fo:color", colorName(m_textPen.color()), KoGenStyle::TextType );
}
//I don't think there is a reason why the background brush should be saved if it is null,
//but remove the check if it causes problems. -- Robert Knight <robertknight@gmail.com>
- if ( featureSet( SBackgroundBrush ) && (m_backGroundBrush.style() != Qt::NoBrush) )
+ if ( featureSet( SBackgroundBrush ) && (m_backGroundBrush.style() != TQt::NoBrush) )
{
- QString tmp = saveOasisBackgroundStyle( mainStyles, m_backGroundBrush );
+ TQString tmp = saveOasisBackgroundStyle( mainStyles, m_backGroundBrush );
if ( !tmp.isEmpty() )
style.addProperty("draw:style-name", tmp );
}
- QString _prefix;
- QString _postfix;
+ TQString _prefix;
+ TQString _postfix;
int _precision = -1;
if ( featureSet( SPrefix ) && !prefix().isEmpty() )
_prefix = m_prefix;
@@ -1348,27 +1348,27 @@ void Style::saveOasisStyle( KoGenStyle &style, KoGenStyles &mainStyles )
if ( featureSet( SPrecision ) && m_precision != -1 )
_precision = m_precision;
- QString symbol;
+ TQString symbol;
if ( featureSet( SFormatType ) && m_formatType == Money_format )
{
symbol = Currency::getCurrencyCode(m_currency.type);
}
- QString numericStyle = saveOasisStyleNumeric( style, mainStyles, m_formatType,
+ TQString numericStyle = saveOasisStyleNumeric( style, mainStyles, m_formatType,
_prefix, _postfix, _precision,
symbol );
if ( !numericStyle.isEmpty() )
style.addAttribute( "style:data-style-name", numericStyle );
}
-QString Style::saveOasisBackgroundStyle( KoGenStyles &mainStyles, const QBrush &brush )
+TQString Style::saveOasisBackgroundStyle( KoGenStyles &mainStyles, const TQBrush &brush )
{
KoGenStyle styleobjectauto = KoGenStyle( KoGenStyle::STYLE_GRAPHICAUTO, "graphic" );
KoOasisStyles::saveOasisFillStyle( styleobjectauto, mainStyles, brush );
return mainStyles.lookup( styleobjectauto, "gr" );
}
-void Style::saveXML( QDomDocument & doc, QDomElement & format ) const
+void Style::saveXML( TQDomDocument & doc, TQDomElement & format ) const
{
if ( featureSet( SAlignX ) && alignX() != Format::Undefined )
format.setAttribute( "alignX", (int) m_alignX );
@@ -1376,7 +1376,7 @@ void Style::saveXML( QDomDocument & doc, QDomElement & format ) const
if ( featureSet( SAlignY ) && alignY() != Format::Middle )
format.setAttribute( "alignY", (int) m_alignY );
- if ( featureSet( SBackgroundColor ) && m_bgColor != QColor() && m_bgColor.isValid() )
+ if ( featureSet( SBackgroundColor ) && m_bgColor != TQColor() && m_bgColor.isValid() )
format.setAttribute( "bgcolor", m_bgColor.name() );
if ( featureSet( SMultiRow ) && hasProperty( PMultiRow ) )
@@ -1451,48 +1451,48 @@ void Style::saveXML( QDomDocument & doc, QDomElement & format ) const
if ( featureSet( SLeftBorder ) )
{
- QDomElement left = doc.createElement( "left-border" );
+ TQDomElement left = doc.createElement( "left-border" );
left.appendChild( util_createElement( "pen", m_leftBorderPen, doc ) );
format.appendChild( left );
}
if ( featureSet( STopBorder ) )
{
- QDomElement top = doc.createElement( "top-border" );
+ TQDomElement top = doc.createElement( "top-border" );
top.appendChild( util_createElement( "pen", m_topBorderPen, doc ) );
format.appendChild( top );
}
if ( featureSet( SRightBorder ) )
{
- QDomElement right = doc.createElement( "right-border" );
+ TQDomElement right = doc.createElement( "right-border" );
right.appendChild( util_createElement( "pen", m_rightBorderPen, doc ) );
format.appendChild( right );
}
if ( featureSet( SBottomBorder ) )
{
- QDomElement bottom = doc.createElement( "bottom-border" );
+ TQDomElement bottom = doc.createElement( "bottom-border" );
bottom.appendChild( util_createElement( "pen", m_bottomBorderPen, doc ) );
format.appendChild( bottom );
}
if ( featureSet( SFallDiagonal ) )
{
- QDomElement fallDiagonal = doc.createElement( "fall-diagonal" );
+ TQDomElement fallDiagonal = doc.createElement( "fall-diagonal" );
fallDiagonal.appendChild( util_createElement( "pen", m_fallDiagonalPen, doc ) );
format.appendChild( fallDiagonal );
}
if ( featureSet( SGoUpDiagonal ) )
{
- QDomElement goUpDiagonal = doc.createElement( "up-diagonal" );
+ TQDomElement goUpDiagonal = doc.createElement( "up-diagonal" );
goUpDiagonal.appendChild( util_createElement( "pen", m_goUpDiagonalPen, doc ) );
format.appendChild( goUpDiagonal );
}
}
-bool Style::loadXML( QDomElement & format )
+bool Style::loadXML( TQDomElement & format )
{
bool ok;
if ( format.hasAttribute( "type" ) )
@@ -1527,9 +1527,9 @@ bool Style::loadXML( QDomElement & format )
if ( format.hasAttribute( "bgcolor" ) )
{
- m_bgColor = QColor( format.attribute( "bgcolor" ) );
+ m_bgColor = TQColor( format.attribute( "bgcolor" ) );
// FIXME: Is white always correct here?
- if ( m_bgColor != Qt::white )
+ if ( m_bgColor != TQt::white )
m_featuresSet |= SBackgroundColor;
}
@@ -1646,10 +1646,10 @@ bool Style::loadXML( QDomElement & format )
}
// TODO: remove that...
- QDomElement font = format.namedItem( "font" ).toElement();
+ TQDomElement font = format.namedItem( "font" ).toElement();
if ( !font.isNull() )
{
- QFont f( util_toFont( font ) );
+ TQFont f( util_toFont( font ) );
m_fontFamily = f.family();
m_fontSize = f.pointSize();
if ( f.italic() )
@@ -1693,7 +1693,7 @@ bool Style::loadXML( QDomElement & format )
if ( format.hasAttribute( "brushcolor" ) )
{
- m_backGroundBrush.setColor( QColor( format.attribute( "brushcolor" ) ) );
+ m_backGroundBrush.setColor( TQColor( format.attribute( "brushcolor" ) ) );
// It is not necessary to set this feature just because the color changes.
// FIXME: Or is it?
//m_featuresSet |= SBackgroundBrush;
@@ -1705,86 +1705,86 @@ bool Style::loadXML( QDomElement & format )
if ( !ok )
return false;
- if ( m_backGroundBrush.style() != Qt::NoBrush )
+ if ( m_backGroundBrush.style() != TQt::NoBrush )
m_featuresSet |= SBackgroundBrush;
}
- QDomElement pen = format.namedItem( "pen" ).toElement();
+ TQDomElement pen = format.namedItem( "pen" ).toElement();
if ( !pen.isNull() )
{
m_textPen = util_toPen( pen );
- if ( m_textPen.style() != Qt::NoPen )
+ if ( m_textPen.style() != TQt::NoPen )
m_featuresSet |= STextPen;
}
- QDomElement left = format.namedItem( "left-border" ).toElement();
+ TQDomElement left = format.namedItem( "left-border" ).toElement();
if ( !left.isNull() )
{
- QDomElement pen = left.namedItem( "pen" ).toElement();
+ TQDomElement pen = left.namedItem( "pen" ).toElement();
if ( !pen.isNull() )
{
m_leftBorderPen = util_toPen( pen );
- if ( m_leftBorderPen.style() != Qt::NoPen )
+ if ( m_leftBorderPen.style() != TQt::NoPen )
m_featuresSet |= SLeftBorder;
}
}
- QDomElement top = format.namedItem( "top-border" ).toElement();
+ TQDomElement top = format.namedItem( "top-border" ).toElement();
if ( !top.isNull() )
{
- QDomElement pen = top.namedItem( "pen" ).toElement();
+ TQDomElement pen = top.namedItem( "pen" ).toElement();
if ( !pen.isNull() )
{
m_topBorderPen = util_toPen( pen );
- if ( m_topBorderPen.style() != Qt::NoPen )
+ if ( m_topBorderPen.style() != TQt::NoPen )
m_featuresSet |= STopBorder;
}
}
- QDomElement right = format.namedItem( "right-border" ).toElement();
+ TQDomElement right = format.namedItem( "right-border" ).toElement();
if ( !right.isNull() )
{
- QDomElement pen = right.namedItem( "pen" ).toElement();
+ TQDomElement pen = right.namedItem( "pen" ).toElement();
if ( !pen.isNull() )
{
m_rightBorderPen = util_toPen( pen );
- if ( m_rightBorderPen.style() != Qt::NoPen )
+ if ( m_rightBorderPen.style() != TQt::NoPen )
m_featuresSet |= SRightBorder;
}
}
- QDomElement bottom = format.namedItem( "bottom-border" ).toElement();
+ TQDomElement bottom = format.namedItem( "bottom-border" ).toElement();
if ( !bottom.isNull() )
{
- QDomElement pen = bottom.namedItem( "pen" ).toElement();
+ TQDomElement pen = bottom.namedItem( "pen" ).toElement();
if ( !pen.isNull() )
{
m_bottomBorderPen = util_toPen( pen );
- if ( m_bottomBorderPen.style() != Qt::NoPen )
+ if ( m_bottomBorderPen.style() != TQt::NoPen )
m_featuresSet |= SBottomBorder;
}
}
- QDomElement fallDiagonal = format.namedItem( "fall-diagonal" ).toElement();
+ TQDomElement fallDiagonal = format.namedItem( "fall-diagonal" ).toElement();
if ( !fallDiagonal.isNull() )
{
- QDomElement pen = fallDiagonal.namedItem( "pen" ).toElement();
+ TQDomElement pen = fallDiagonal.namedItem( "pen" ).toElement();
if ( !pen.isNull() )
{
m_fallDiagonalPen = util_toPen( pen );
- if ( m_fallDiagonalPen.style() != Qt::NoPen )
+ if ( m_fallDiagonalPen.style() != TQt::NoPen )
m_featuresSet |= SFallDiagonal;
}
}
- QDomElement goUpDiagonal = format.namedItem( "up-diagonal" ).toElement();
+ TQDomElement goUpDiagonal = format.namedItem( "up-diagonal" ).toElement();
if ( !goUpDiagonal.isNull() )
{
- QDomElement pen = goUpDiagonal.namedItem( "pen" ).toElement();
+ TQDomElement pen = goUpDiagonal.namedItem( "pen" ).toElement();
if ( !pen.isNull() )
{
m_goUpDiagonalPen = util_toPen( pen );
- if ( m_goUpDiagonalPen.style() != Qt::NoPen )
+ if ( m_goUpDiagonalPen.style() != TQt::NoPen )
m_featuresSet |= SGoUpDiagonal;
}
}
@@ -1803,14 +1803,14 @@ bool Style::loadXML( QDomElement & format )
return true;
}
-void Style::setParent( CustomStyle * parent )
+void Style::setParent( CustomStyle * tqparent )
{
- m_parent = parent;
+ m_parent = tqparent;
if ( m_parent )
m_parentName = m_parent->name();
}
-CustomStyle * Style::parent() const
+CustomStyle * Style::tqparent() const
{
return m_parent;
}
@@ -1871,7 +1871,7 @@ bool Style::hasFeature( FlagsSet f, bool withoutParent ) const
{
bool b = ( m_featuresSet & (uint) f );
- // check if feature is defined here or at parent level
+ // check if feature is defined here or at tqparent level
if ( m_parent && !withoutParent )
b = ( m_parent->hasFeature( f, withoutParent ) ? true : b );
@@ -1883,13 +1883,13 @@ void Style::clearFeature( FlagsSet f )
m_featuresSet &= ~(uint)f;
}
-QFont Style::font() const
+TQFont Style::font() const
{
- QString family = fontFamily();
+ TQString family = fontFamily();
int size = fontSize();
uint ff = fontFlags();
- QFont f( family, size );
+ TQFont f( family, size );
if ( ff & (uint) FBold )
f.setBold( true );
if ( ff & (uint) FItalic )
@@ -1902,7 +1902,7 @@ QFont Style::font() const
return f;
}
-QString const & Style::fontFamily() const
+TQString const & Style::fontFamily() const
{
return ( !m_parent || featureSet( SFontFamily ) ? m_fontFamily : m_parent->fontFamily() );
}
@@ -1917,42 +1917,42 @@ int Style::fontSize() const
return ( !m_parent || featureSet( SFontSize ) ? m_fontSize : m_parent->fontSize() );
}
-QPen const & Style::pen() const
+TQPen const & Style::pen() const
{
return ( !m_parent || featureSet( STextPen ) ? m_textPen : m_parent->pen() );
}
-QColor const & Style::bgColor() const
+TQColor const & Style::bgColor() const
{
return ( !m_parent || featureSet( SBackgroundColor ) ? m_bgColor : m_parent->bgColor() );
}
-QPen const & Style::rightBorderPen() const
+TQPen const & Style::rightBorderPen() const
{
return ( !m_parent || featureSet( SRightBorder ) ? m_rightBorderPen : m_parent->rightBorderPen() );
}
-QPen const & Style::bottomBorderPen() const
+TQPen const & Style::bottomBorderPen() const
{
return ( !m_parent || featureSet( SBottomBorder ) ? m_bottomBorderPen : m_parent->bottomBorderPen() );
}
-QPen const & Style::leftBorderPen() const
+TQPen const & Style::leftBorderPen() const
{
return ( !m_parent || featureSet( SLeftBorder ) ? m_leftBorderPen : m_parent->leftBorderPen() );
}
-QPen const & Style::topBorderPen() const
+TQPen const & Style::topBorderPen() const
{
return ( !m_parent || featureSet( STopBorder ) ? m_topBorderPen : m_parent->topBorderPen() );
}
-QPen const & Style::fallDiagonalPen() const
+TQPen const & Style::fallDiagonalPen() const
{
return ( !m_parent || featureSet( SFallDiagonal ) ? m_fallDiagonalPen : m_parent->fallDiagonalPen() );
}
-QPen const & Style::goUpDiagonalPen() const
+TQPen const & Style::goUpDiagonalPen() const
{
return ( !m_parent || featureSet( SGoUpDiagonal ) ? m_goUpDiagonalPen : m_parent->goUpDiagonalPen() );
}
@@ -1972,7 +1972,7 @@ double Style::indent() const
return ( !m_parent || featureSet( SIndent ) ? m_indent : m_parent->indent() );
}
-QBrush const & Style::backGroundBrush() const
+TQBrush const & Style::backGroundBrush() const
{
return ( !m_parent || featureSet( SBackgroundBrush ) ? m_backGroundBrush : m_parent->backGroundBrush() );
}
@@ -2007,17 +2007,17 @@ Format::Currency const & Style::currency() const
return ( !m_parent || featureSet( SFormatType ) ? m_currency : m_parent->currency() );
}
-QString const & Style::strFormat() const
+TQString const & Style::strFormat() const
{
return ( !m_parent || featureSet( SCustomFormat ) ? m_strFormat : m_parent->strFormat() );
}
-QString const & Style::prefix() const
+TQString const & Style::prefix() const
{
return ( !m_parent || featureSet( SPrefix ) ? m_prefix : m_parent->prefix() );
}
-QString const & Style::postfix() const
+TQString const & Style::postfix() const
{
return ( !m_parent || featureSet( SPostfix ) ? m_postfix : m_parent->postfix() );
}
@@ -2054,7 +2054,7 @@ Style * Style::setAlignY( Format::AlignY alignY )
return this;
}
-Style * Style::setFont( QFont const & f )
+Style * Style::setFont( TQFont const & f )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
@@ -2163,7 +2163,7 @@ Style * Style::setFont( QFont const & f )
return this;
}
-Style * Style::setFontFamily( QString const & fam )
+Style * Style::setFontFamily( TQString const & fam )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
@@ -2226,146 +2226,146 @@ Style * Style::setFontSize( int size )
return this;
}
-Style * Style::setPen( QPen const & pen )
+Style * Style::setPen( TQPen const & pen )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
Style * style = new Style( this );
style->m_textPen = pen;
- if ( style->m_textPen.style() != Qt::NoPen )
+ if ( style->m_textPen.style() != TQt::NoPen )
style->m_featuresSet |= STextPen;
return style;
}
m_textPen = pen;
- if ( m_textPen.style() != Qt::NoPen )
+ if ( m_textPen.style() != TQt::NoPen )
m_featuresSet |= STextPen;
return this;
}
-Style * Style::setBgColor( QColor const & color )
+Style * Style::setBgColor( TQColor const & color )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
Style * style = new Style( this );
style->m_bgColor = color;
- if ( style->m_bgColor != Qt::white )
+ if ( style->m_bgColor != TQt::white )
style->m_featuresSet |= SBackgroundColor;
return style;
}
m_bgColor = color;
- if ( m_bgColor != Qt::white )
+ if ( m_bgColor != TQt::white )
m_featuresSet |= SBackgroundColor;
return this;
}
-Style * Style::setRightBorderPen( QPen const & pen )
+Style * Style::setRightBorderPen( TQPen const & pen )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
Style * style = new Style( this );
style->m_rightBorderPen = pen;
style->m_rightPenValue = calculateValue( pen );
- if ( style->m_rightBorderPen.style() != Qt::NoPen )
+ if ( style->m_rightBorderPen.style() != TQt::NoPen )
style->m_featuresSet |= SRightBorder;
return style;
}
m_rightBorderPen = pen;
m_rightPenValue = calculateValue( pen );
- if ( m_rightBorderPen.style() != Qt::NoPen )
+ if ( m_rightBorderPen.style() != TQt::NoPen )
m_featuresSet |= SRightBorder;
return this;
}
-Style * Style::setBottomBorderPen( QPen const & pen )
+Style * Style::setBottomBorderPen( TQPen const & pen )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
Style * style = new Style( this );
style->m_bottomBorderPen = pen;
style->m_bottomPenValue = calculateValue( pen );
- if ( style->m_bottomBorderPen.style() != Qt::NoPen )
+ if ( style->m_bottomBorderPen.style() != TQt::NoPen )
style->m_featuresSet |= SBottomBorder;
return style;
}
m_bottomBorderPen = pen;
m_bottomPenValue = calculateValue( pen );
- if ( m_bottomBorderPen.style() != Qt::NoPen )
+ if ( m_bottomBorderPen.style() != TQt::NoPen )
m_featuresSet |= SBottomBorder;
return this;
}
-Style * Style::setLeftBorderPen( QPen const & pen )
+Style * Style::setLeftBorderPen( TQPen const & pen )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
Style * style = new Style( this );
style->m_leftBorderPen = pen;
style->m_leftPenValue = calculateValue( pen );
- if ( style->m_leftBorderPen.style() != Qt::NoPen )
+ if ( style->m_leftBorderPen.style() != TQt::NoPen )
style->m_featuresSet |= SLeftBorder;
return style;
}
m_leftBorderPen = pen;
m_leftPenValue = calculateValue( pen );
- if ( m_leftBorderPen.style() != Qt::NoPen )
+ if ( m_leftBorderPen.style() != TQt::NoPen )
m_featuresSet |= SLeftBorder;
return this;
}
-Style * Style::setTopBorderPen( QPen const & pen )
+Style * Style::setTopBorderPen( TQPen const & pen )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
Style * style = new Style( this );
style->m_topBorderPen = pen;
style->m_topPenValue = calculateValue( pen );
- if ( style->m_topBorderPen.style() != Qt::NoPen )
+ if ( style->m_topBorderPen.style() != TQt::NoPen )
style->m_featuresSet |= STopBorder;
return style;
}
m_topBorderPen = pen;
m_topPenValue = calculateValue( pen );
- if ( m_topBorderPen.style() != Qt::NoPen )
+ if ( m_topBorderPen.style() != TQt::NoPen )
m_featuresSet |= STopBorder;
return this;
}
-Style * Style::setFallDiagonalPen( QPen const & pen )
+Style * Style::setFallDiagonalPen( TQPen const & pen )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
Style * style = new Style( this );
style->m_fallDiagonalPen = pen;
- if ( style->m_fallDiagonalPen.style() != Qt::NoPen )
+ if ( style->m_fallDiagonalPen.style() != TQt::NoPen )
style->m_featuresSet |= SFallDiagonal;
return style;
}
m_fallDiagonalPen = pen;
- if ( m_fallDiagonalPen.style() != Qt::NoPen )
+ if ( m_fallDiagonalPen.style() != TQt::NoPen )
m_featuresSet |= SFallDiagonal;
return this;
}
-Style * Style::setGoUpDiagonalPen( QPen const & pen )
+Style * Style::setGoUpDiagonalPen( TQPen const & pen )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
Style * style = new Style( this );
style->m_goUpDiagonalPen = pen;
- if ( style->m_goUpDiagonalPen.style() != Qt::NoPen )
+ if ( style->m_goUpDiagonalPen.style() != TQt::NoPen )
style->m_featuresSet |= SGoUpDiagonal;
return style;
}
m_goUpDiagonalPen = pen;
- if ( m_goUpDiagonalPen.style() != Qt::NoPen )
+ if ( m_goUpDiagonalPen.style() != TQt::NoPen )
m_featuresSet |= SGoUpDiagonal;
return this;
}
@@ -2400,19 +2400,19 @@ Style * Style::setIndent( double indent )
return this;
}
-Style * Style::setBackGroundBrush( QBrush const & brush )
+Style * Style::setBackGroundBrush( TQBrush const & brush )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
Style * style = new Style( this );
style->m_backGroundBrush = brush;
- if ( style->m_backGroundBrush.style() != Qt::NoBrush )
+ if ( style->m_backGroundBrush.style() != TQt::NoBrush )
style->m_featuresSet |= SBackgroundBrush;
return style;
}
m_backGroundBrush = brush;
- if ( m_backGroundBrush.style() != Qt::NoBrush )
+ if ( m_backGroundBrush.style() != TQt::NoBrush )
m_featuresSet |= SBackgroundBrush;
return this;
}
@@ -2447,7 +2447,7 @@ Style * Style::setFloatColor( Format::FloatColor color )
return this;
}
-Style * Style::setStrFormat( QString const & strFormat )
+Style * Style::setStrFormat( TQString const & strFormat )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
@@ -2477,7 +2477,7 @@ Style * Style::setPrecision( int precision )
return this;
}
-Style * Style::setPrefix( QString const & prefix )
+Style * Style::setPrefix( TQString const & prefix )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
@@ -2492,7 +2492,7 @@ Style * Style::setPrefix( QString const & prefix )
return this;
}
-Style * Style::setPostfix( QString const & postfix )
+Style * Style::setPostfix( TQString const & postfix )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
@@ -2668,13 +2668,13 @@ Style * Style::setFormatType( FormatType format )
return this;
}
-QString Style::colorName( const QColor& color )
+TQString Style::colorName( const TQColor& color )
{
- static QMap<QRgb , QString> map;
+ static TQMap<TQRgb , TQString> map;
- QRgb rgb = color.rgb();
+ TQRgb rgb = color.rgb();
- if (!map.contains( rgb ))
+ if (!map.tqcontains( rgb ))
{
map[rgb] = color.name();
return map[rgb];
@@ -2699,7 +2699,7 @@ CustomStyle::CustomStyle()
m_parent = 0;
}
-CustomStyle::CustomStyle( Style * parent, QString const & name )
+CustomStyle::CustomStyle( Style * tqparent, TQString const & name )
: Style(),
m_name( name )
{
@@ -2707,52 +2707,52 @@ CustomStyle::CustomStyle( Style * parent, QString const & name )
m_parent = 0;
// one to one copy
- if ( parent->hasProperty( PDontPrintText ) )
+ if ( tqparent->hasProperty( PDontPrintText ) )
addProperty( PDontPrintText );
- if ( parent->hasProperty( PCustomFormat ) )
+ if ( tqparent->hasProperty( PCustomFormat ) )
addProperty( PCustomFormat );
- if ( parent->hasProperty( PNotProtected ) )
+ if ( tqparent->hasProperty( PNotProtected ) )
addProperty( PNotProtected );
- if ( parent->hasProperty( PHideAll ) )
+ if ( tqparent->hasProperty( PHideAll ) )
addProperty( PHideAll );
- if ( parent->hasProperty( PHideFormula ) )
+ if ( tqparent->hasProperty( PHideFormula ) )
addProperty( PHideFormula );
- if ( parent->hasProperty( PMultiRow ) )
+ if ( tqparent->hasProperty( PMultiRow ) )
addProperty( PMultiRow );
- if ( parent->hasProperty( PVerticalText ) )
+ if ( tqparent->hasProperty( PVerticalText ) )
addProperty( PVerticalText );
- changeAlignX( parent->alignX() );
- changeAlignY( parent->alignY() );
- changeFloatFormat( parent->floatFormat() );
- changeFloatColor( parent->floatColor() );
- changeFormatType( parent->formatType() );
- changeFontFamily( parent->fontFamily() );
- changeFontSize( parent->fontSize() );
- changeFontFlags( parent->fontFlags() );
- changePen( parent->pen() );
- changeBgColor( parent->bgColor() );
- changeRightBorderPen( parent->rightBorderPen() );
- changeBottomBorderPen( parent->bottomBorderPen() );
- changeLeftBorderPen( parent->leftBorderPen() );
- changeTopBorderPen( parent->topBorderPen() );
- changeFallBorderPen( parent->fallDiagonalPen() );
- changeGoUpBorderPen( parent->goUpDiagonalPen() );
- changeBackGroundBrush( parent->backGroundBrush() );
- changeRotateAngle( parent->rotateAngle() );
- changeIndent( parent->indent() );
- changeStrFormat( parent->strFormat() );
- changePrecision( parent->precision() );
- changePrefix( parent->prefix() );
- changePostfix( parent->postfix() );
- changeCurrency( parent->currency() );
-}
-
-CustomStyle::CustomStyle( QString const & name, CustomStyle * parent )
+ changeAlignX( tqparent->alignX() );
+ changeAlignY( tqparent->alignY() );
+ changeFloatFormat( tqparent->floatFormat() );
+ changeFloatColor( tqparent->floatColor() );
+ changeFormatType( tqparent->formatType() );
+ changeFontFamily( tqparent->fontFamily() );
+ changeFontSize( tqparent->fontSize() );
+ changeFontFlags( tqparent->fontFlags() );
+ changePen( tqparent->pen() );
+ changeBgColor( tqparent->bgColor() );
+ changeRightBorderPen( tqparent->rightBorderPen() );
+ changeBottomBorderPen( tqparent->bottomBorderPen() );
+ changeLeftBorderPen( tqparent->leftBorderPen() );
+ changeTopBorderPen( tqparent->topBorderPen() );
+ changeFallBorderPen( tqparent->fallDiagonalPen() );
+ changeGoUpBorderPen( tqparent->goUpDiagonalPen() );
+ changeBackGroundBrush( tqparent->backGroundBrush() );
+ changeRotateAngle( tqparent->rotateAngle() );
+ changeIndent( tqparent->indent() );
+ changeStrFormat( tqparent->strFormat() );
+ changePrecision( tqparent->precision() );
+ changePrefix( tqparent->prefix() );
+ changePostfix( tqparent->postfix() );
+ changeCurrency( tqparent->currency() );
+}
+
+CustomStyle::CustomStyle( TQString const & name, CustomStyle * tqparent )
: Style(),
m_name( name )
{
- m_parent = parent;
+ m_parent = tqparent;
if ( m_parent )
m_parentName = m_parent->name();
}
@@ -2761,7 +2761,7 @@ CustomStyle::~CustomStyle()
{
}
-QString CustomStyle::saveOasis( KoGenStyle& style, KoGenStyles &mainStyles )
+TQString CustomStyle::saveOasis( KoGenStyle& style, KoGenStyles &mainStyles )
{
// If the type is undefined, we're called from Format
// and the OASIS style is not an automatic style.
@@ -2773,7 +2773,7 @@ QString CustomStyle::saveOasis( KoGenStyle& style, KoGenStyles &mainStyles )
style = KoGenStyle( Doc::STYLE_CELL_USER, "table-cell" );
if ( m_name.isEmpty() )
- return QString::null; // TODO fallback to Style::saveOasis() ???
+ return TQString(); // TODO fallback to Style::saveOasis() ???
// default style does not need display name
if( type() != BUILTIN || m_name != "Default" )
@@ -2784,7 +2784,7 @@ QString CustomStyle::saveOasis( KoGenStyle& style, KoGenStyles &mainStyles )
// The lookup is done in the calling object (Format).
if ( style.type() == Doc::STYLE_CELL_AUTO )
- return QString::null;
+ return TQString();
if( ( m_type == BUILTIN ) && ( m_name == "Default" ) )
{
@@ -2797,11 +2797,11 @@ QString CustomStyle::saveOasis( KoGenStyle& style, KoGenStyles &mainStyles )
return mainStyles.lookup( style, "custom-style" );
}
-void CustomStyle::loadOasis( KoOasisStyles& oasisStyles, const QDomElement& style, const QString & name )
+void CustomStyle::loadOasis( KoOasisStyles& oasisStyles, const TQDomElement& style, const TQString & name )
{
m_name = name;
- if ( style.hasAttributeNS( KoXmlNS::style, "parent-style-name" ) )
- m_parentName = style.attributeNS( KoXmlNS::style, "parent-style-name", QString::null );
+ if ( style.hasAttributeNS( KoXmlNS::style, "tqparent-style-name" ) )
+ m_parentName = style.attributeNS( KoXmlNS::style, "tqparent-style-name", TQString() );
else if ( m_name != "Default" )
m_parentName = "Default";
@@ -2810,30 +2810,30 @@ void CustomStyle::loadOasis( KoOasisStyles& oasisStyles, const QDomElement& styl
Style::loadOasisStyle( oasisStyles, style );
}
-void CustomStyle::save( QDomDocument & doc, QDomElement & styles )
+void CustomStyle::save( TQDomDocument & doc, TQDomElement & styles )
{
if ( m_name.isEmpty() )
return;
- QDomElement style( doc.createElement( "style" ) );
+ TQDomElement style( doc.createElement( "style" ) );
style.setAttribute( "type", (int) m_type );
if ( m_parent )
- style.setAttribute( "parent", m_parent->name() );
+ style.setAttribute( "tqparent", m_parent->name() );
style.setAttribute( "name", m_name );
- QDomElement format( doc.createElement( "format" ) );
+ TQDomElement format( doc.createElement( "format" ) );
saveXML( doc, format );
style.appendChild( format );
styles.appendChild( style );
}
-bool CustomStyle::loadXML( QDomElement const & style, QString const & name )
+bool CustomStyle::loadXML( TQDomElement const & style, TQString const & name )
{
m_name = name;
- if ( style.hasAttribute( "parent" ) )
- m_parentName = style.attribute( "parent" );
+ if ( style.hasAttribute( "tqparent" ) )
+ m_parentName = style.attribute( "tqparent" );
if ( !style.hasAttribute( "type" ) )
return false;
@@ -2843,7 +2843,7 @@ bool CustomStyle::loadXML( QDomElement const & style, QString const & name )
if ( !ok )
return false;
- QDomElement f( style.namedItem( "format" ).toElement() );
+ TQDomElement f( style.namedItem( "format" ).toElement() );
if ( !f.isNull() )
if ( !Style::loadXML( f ) )
return false;
@@ -2851,7 +2851,7 @@ bool CustomStyle::loadXML( QDomElement const & style, QString const & name )
return true;
}
-void CustomStyle::setName( QString const & name )
+void CustomStyle::setName( TQString const & name )
{
m_name = name;
}
@@ -2938,7 +2938,7 @@ void CustomStyle::changeAlignY( Format::AlignY alignY )
m_featuresSet |= SAlignY;
}
-void CustomStyle::changeFont( QFont const & f )
+void CustomStyle::changeFont( TQFont const & f )
{
if ( m_fontFamily != f.family() )
{
@@ -2991,7 +2991,7 @@ void CustomStyle::changeFont( QFont const & f )
}
}
-void CustomStyle::changeFontFamily( QString const & fam )
+void CustomStyle::changeFontFamily( TQString const & fam )
{
if ( m_fontFamily != fam )
{
@@ -3021,59 +3021,59 @@ void CustomStyle::changeFontFlags( uint flags )
}
}
-void CustomStyle::changeTextColor( QColor const & color )
+void CustomStyle::changeTextColor( TQColor const & color )
{
m_textPen.setColor( color );
m_featuresSet |= STextPen;
}
-void CustomStyle::changePen( QPen const & pen )
+void CustomStyle::changePen( TQPen const & pen )
{
m_textPen = pen;
m_featuresSet |= STextPen;
}
-void CustomStyle::changeBgColor( QColor const & color )
+void CustomStyle::changeBgColor( TQColor const & color )
{
m_bgColor = color;
m_featuresSet |= SBackgroundColor;
}
-void CustomStyle::changeRightBorderPen( QPen const & pen )
+void CustomStyle::changeRightBorderPen( TQPen const & pen )
{
m_rightBorderPen = pen;
m_rightPenValue = calculateValue( pen );
m_featuresSet |= SRightBorder;
}
-void CustomStyle::changeBottomBorderPen( QPen const & pen )
+void CustomStyle::changeBottomBorderPen( TQPen const & pen )
{
m_bottomBorderPen = pen;
m_bottomPenValue = calculateValue( pen );
m_featuresSet |= SBottomBorder;
}
-void CustomStyle::changeLeftBorderPen( QPen const & pen )
+void CustomStyle::changeLeftBorderPen( TQPen const & pen )
{
m_leftBorderPen = pen;
m_leftPenValue = calculateValue( pen );
m_featuresSet |= SLeftBorder;
}
-void CustomStyle::changeTopBorderPen( QPen const & pen )
+void CustomStyle::changeTopBorderPen( TQPen const & pen )
{
m_topBorderPen = pen;
m_topPenValue = calculateValue( pen );
m_featuresSet |= STopBorder;
}
-void CustomStyle::changeFallBorderPen( QPen const & pen )
+void CustomStyle::changeFallBorderPen( TQPen const & pen )
{
m_fallDiagonalPen = pen;
m_featuresSet |= SFallDiagonal;
}
-void CustomStyle::changeGoUpBorderPen( QPen const & pen )
+void CustomStyle::changeGoUpBorderPen( TQPen const & pen )
{
m_goUpDiagonalPen = pen;
m_featuresSet |= SGoUpDiagonal;
@@ -3091,7 +3091,7 @@ void CustomStyle::changeIndent( double indent )
m_featuresSet |= SIndent;
}
-void CustomStyle::changeBackGroundBrush( QBrush const & brush )
+void CustomStyle::changeBackGroundBrush( TQBrush const & brush )
{
m_backGroundBrush = brush;
m_featuresSet |= SBackgroundBrush;
@@ -3115,7 +3115,7 @@ void CustomStyle::changeFormatType( FormatType format )
m_featuresSet |= SFormatType;
}
-void CustomStyle::changeStrFormat( QString const & strFormat )
+void CustomStyle::changeStrFormat( TQString const & strFormat )
{
m_strFormat = strFormat;
m_featuresSet |= SCustomFormat;
@@ -3127,13 +3127,13 @@ void CustomStyle::changePrecision( int precision )
m_featuresSet |= SPrecision;
}
-void CustomStyle::changePrefix( QString const & prefix )
+void CustomStyle::changePrefix( TQString const & prefix )
{
m_prefix = prefix;
m_featuresSet |= SPrefix;
}
-void CustomStyle::changePostfix( QString const & postfix )
+void CustomStyle::changePostfix( TQString const & postfix )
{
m_postfix = postfix;
m_featuresSet |= SPostfix;