summaryrefslogtreecommitdiffstats
path: root/lib/kotext
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kotext')
-rw-r--r--lib/kotext/DESIGN16
-rw-r--r--lib/kotext/KFontDialog_local.cpp2
-rw-r--r--lib/kotext/KoChangeCaseDia.cpp2
-rw-r--r--lib/kotext/KoCompletionBase.ui10
-rw-r--r--lib/kotext/KoCompletionDia.cpp2
-rw-r--r--lib/kotext/KoComplexText.cpp34
-rw-r--r--lib/kotext/KoParagCounter.cpp8
-rw-r--r--lib/kotext/KoParagDia.cpp30
-rw-r--r--lib/kotext/KoParagDia.h2
-rw-r--r--lib/kotext/KoParagLayout.cpp336
-rw-r--r--lib/kotext/KoParagLayout.h20
-rw-r--r--lib/kotext/KoParagStyle.cpp26
-rw-r--r--lib/kotext/KoParagStyle.h6
-rw-r--r--lib/kotext/KoRichText.cpp10
-rw-r--r--lib/kotext/KoRichText.h10
-rw-r--r--lib/kotext/KoSearchDia.cpp8
-rw-r--r--lib/kotext/KoStyleManager.cpp4
-rw-r--r--lib/kotext/KoStyleManager.h2
-rw-r--r--lib/kotext/KoTextCommand.cpp2
-rw-r--r--lib/kotext/KoTextDocument.cpp6
-rw-r--r--lib/kotext/KoTextFormat.cpp12
-rw-r--r--lib/kotext/KoTextFormat.h4
-rw-r--r--lib/kotext/KoTextFormatter.cpp8
-rw-r--r--lib/kotext/KoTextObject.cpp2
-rw-r--r--lib/kotext/KoTextObject.h10
-rw-r--r--lib/kotext/KoTextParag.cpp66
-rw-r--r--lib/kotext/KoTextParag.h2
-rw-r--r--lib/kotext/KoTextView.cpp40
-rw-r--r--lib/kotext/KoTextZoomHandler.h14
-rw-r--r--lib/kotext/KoVariable.cpp8
-rw-r--r--lib/kotext/kolayouttabbase.ui4
-rw-r--r--lib/kotext/timedateformatwidget.ui6
32 files changed, 356 insertions, 356 deletions
diff --git a/lib/kotext/DESIGN b/lib/kotext/DESIGN
index 4fd1e479..12bc2940 100644
--- a/lib/kotext/DESIGN
+++ b/lib/kotext/DESIGN
@@ -26,17 +26,17 @@ Zoomed: (aka Normal)
Internal:
The former two were mostly for objects like frames etc, not for text. Text (the individual
- words and characters) are positioned with the tqlayout coordinates. Layout is similar to the
+ words and characters) are positioned with the layout coordinates. Layout is similar to the
Zoomed system, but always uses the same resolution. This resolution is sufficiently high to
- do the tqlayout in integers, and not really lose info.
+ do the layout in integers, and not really lose info.
- This is the high-resolution unit in which the text tqlayout is done,
+ This is the high-resolution unit in which the text layout is done,
currently set to 1440 DPI. Everything known the QRT classes will be in
this coordinate system (including the QTextFormats). When painting, we apply
the current zoom and resolution to find the right font size to use, and we
have to catch up with rounding differences. However the position of the words
- (i.e. tqlayout) is the one determined previously in tqlayout units. KoZoomHandler
- offers methods for converting between tqlayout units and zoom-dependent points
+ (i.e. layout) is the one determined previously in layout units. KoZoomHandler
+ offers methods for converting between layout units and zoom-dependent points
and pixels.
Note that the Internal coordinate system starts at the topleft corner of
@@ -73,14 +73,14 @@ Document (pt values, in double, KoPoint, KoRect.)
|
|--KWTextFrameSet::documentToInternal
V
-Internal coordinates (the coordinates given to QRT - in "tqlayout units")
-Note that there are pixels and pts in the tqlayout unit system too !
+Internal coordinates (the coordinates given to QRT - in "layout units")
+Note that there are pixels and pts in the layout unit system too !
There are conversions between LU points and document points,
but also direct conversions between LU pixels and view pixels.
Font sizes
==========
-A 12pt font will lead to a tqlayout font of ptToLayoutUnit(12)=20*12=240pt -
+A 12pt font will lead to a layout font of ptToLayoutUnit(12)=20*12=240pt -
that's the value stored in the QTextFormat.
However font metrics are calculated from the 100%-zoom-level font (e.g. 12pt for a 12pt font)
diff --git a/lib/kotext/KFontDialog_local.cpp b/lib/kotext/KFontDialog_local.cpp
index 393488c9..8be2f699 100644
--- a/lib/kotext/KFontDialog_local.cpp
+++ b/lib/kotext/KFontDialog_local.cpp
@@ -473,7 +473,7 @@ void KFontChooser_local::family_chosen_slot(const TQString& family)
TQFontDatabase dbase;
- TQStringList styles = TQStringList(dbase.tqstyles(currentFamily));
+ TQStringList styles = TQStringList(dbase.styles(currentFamily));
styleListBox->clear();
currentStyles.clear();
for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) {
diff --git a/lib/kotext/KoChangeCaseDia.cpp b/lib/kotext/KoChangeCaseDia.cpp
index 8f7c2515..cde58f0a 100644
--- a/lib/kotext/KoChangeCaseDia.cpp
+++ b/lib/kotext/KoChangeCaseDia.cpp
@@ -36,7 +36,7 @@ KoChangeCaseDia::KoChangeCaseDia( TQWidget *parent, const char *name )
TQButtonGroup *grp = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Case" ),page );
grp->setRadioButtonExclusive( TRUE );
- grp->tqlayout();
+ grp->layout();
m_upperCase=new TQRadioButton( i18n("&Uppercase"), grp );
m_lowerCase=new TQRadioButton( i18n("&Lowercase"), grp );
diff --git a/lib/kotext/KoCompletionBase.ui b/lib/kotext/KoCompletionBase.ui
index 3156e078..babc467c 100644
--- a/lib/kotext/KoCompletionBase.ui
+++ b/lib/kotext/KoCompletionBase.ui
@@ -29,7 +29,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
- <cstring>tqlayout9</cstring>
+ <cstring>layout9</cstring>
</property>
<hbox>
<property name="name">
@@ -45,7 +45,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
- <cstring>tqlayout8</cstring>
+ <cstring>layout8</cstring>
</property>
<vbox>
<property name="name">
@@ -129,7 +129,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
- <cstring>tqlayout11</cstring>
+ <cstring>layout11</cstring>
</property>
<grid>
<property name="name">
@@ -254,7 +254,7 @@ This option is most important when Automatically add words to completion list is
</widget>
<widget class="TQLayoutWidget">
<property name="name">
- <cstring>tqlayout10</cstring>
+ <cstring>layout10</cstring>
</property>
<hbox>
<property name="name">
@@ -302,7 +302,7 @@ This option is most important when Automatically add words to completion list is
</widget>
<widget class="TQLayoutWidget">
<property name="name">
- <cstring>tqlayout5</cstring>
+ <cstring>layout5</cstring>
</property>
<hbox>
<property name="name">
diff --git a/lib/kotext/KoCompletionDia.cpp b/lib/kotext/KoCompletionDia.cpp
index abe89b56..09e12f0d 100644
--- a/lib/kotext/KoCompletionDia.cpp
+++ b/lib/kotext/KoCompletionDia.cpp
@@ -40,7 +40,7 @@ KoCompletionDia::KoCompletionDia( TQWidget *parent, const char *name, KoAutoForm
{
TQVBox *page = makeVBoxMainWidget();
m_widget = new KoCompletion(page, autoFormat);
- m_widget->tqlayout()->setMargin(0);
+ m_widget->layout()->setMargin(0);
connect( this, TQT_SIGNAL( user1Clicked() ), m_widget, TQT_SLOT(slotResetConf()));
setButtonWhatsThis(Ok,i18n("This will save your options."));
setButtonWhatsThis(Cancel,i18n("This will abort all changes."));
diff --git a/lib/kotext/KoComplexText.cpp b/lib/kotext/KoComplexText.cpp
index 96ff88e1..475f439d 100644
--- a/lib/kotext/KoComplexText.cpp
+++ b/lib/kotext/KoComplexText.cpp
@@ -72,7 +72,7 @@ static int shapeBufSize = 0;
Arabic shaping obeys a number of rules according to the joining classes (see Unicode book, section on
arabic).
- Each tqunicode char has a joining class (right, dual (left&right), center (joincausing) or transparent).
+ Each unicode char has a joining class (right, dual (left&right), center (joincausing) or transparent).
transparent joining is not encoded in TQChar::joining(), but applies to all combining marks and format marks.
Right join-causing: dual + center
@@ -113,7 +113,7 @@ static inline const TQChar *prevChar( const TQString &str, int pos )
{
//kdDebug() << "leftChar: pos=" << pos << endl;
pos--;
- const TQChar *ch = str.tqunicode() + pos;
+ const TQChar *ch = str.unicode() + pos;
while( pos > -1 ) {
if( !ch->isMark() )
return ch;
@@ -127,7 +127,7 @@ static inline const TQChar *nextChar( const TQString &str, int pos)
{
pos++;
int len = str.length();
- const TQChar *ch = str.tqunicode() + pos;
+ const TQChar *ch = str.unicode() + pos;
while( pos < len ) {
//kdDebug() << "rightChar: " << pos << " isLetter=" << ch.isLetter() << ", joining=" << ch.joining() << endl;
if( !ch->isMark() )
@@ -155,7 +155,7 @@ KoComplexText::Shape KoComplexText::glyphVariant( const TQString &str, int pos)
{
// ignores L1 - L3, done in the codec
TQChar::Joining joining = str[pos].joining();
- //kdDebug() << "checking " << str[pos].tqunicode() << ", joining=" << joining << endl;
+ //kdDebug() << "checking " << str[pos].unicode() << ", joining=" << joining << endl;
switch ( joining ) {
case TQChar::OtherJoining:
case TQChar::Center:
@@ -200,7 +200,7 @@ KoComplexText::Shape KoComplexText::glyphVariantLogical( const TQString &str, in
{
// ignores L1 - L3, ligatures are job of the codec
TQChar::Joining joining = str[pos].joining();
- //kdDebug() << "checking " << str[pos].tqunicode() << ", joining=" << joining << endl;
+ //kdDebug() << "checking " << str[pos].unicode() << ", joining=" << joining << endl;
switch ( joining ) {
case TQChar::OtherJoining:
case TQChar::Center:
@@ -229,7 +229,7 @@ KoComplexText::Shape KoComplexText::glyphVariantLogical( const TQString &str, in
// -------------------------------------------------------------
-// The tqunicode to tqunicode shaping codec.
+// The unicode to unicode shaping codec.
// does only presentation forms B at the moment, but that should be enough for
// simple display
static const ushort arabicUnicodeMapping[256][2] = {
@@ -561,13 +561,13 @@ TQString KoComplexText::shapedString(const TQString& uc, int from, int len, TQPa
// we have to ignore NSMs at the beginning and add at the end.
int num = uc.length() - from - len;
- const TQChar *ch = uc.tqunicode() + from + len;
+ const TQChar *ch = uc.unicode() + from + len;
while ( num > 0 && ch->combiningClass() != 0 ) {
ch++;
num--;
len++;
}
- ch = uc.tqunicode() + from;
+ ch = uc.unicode() + from;
while ( len > 0 && ch->combiningClass() != 0 ) {
ch++;
len--;
@@ -602,7 +602,7 @@ TQString KoComplexText::shapedString(const TQString& uc, int from, int len, TQPa
if ( dir == TQPainter::RTL )
pos = from + len - 1 - i;
int shape = glyphVariantLogical( uc, pos );
- //kdDebug() << "mapping U+" << ch->tqunicode() << " to shape " << shape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][shape] << endl;
+ //kdDebug() << "mapping U+" << ch->unicode() << " to shape " << shape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][shape] << endl;
// take care of lam-alef ligatures (lam right of alef)
ushort map;
switch ( c ) {
@@ -627,7 +627,7 @@ TQString KoComplexText::shapedString(const TQString& uc, int from, int len, TQPa
case 0x23: // alef with hamza above
case 0x25: // alef with hamza below
case 0x27: // alef
- if ( prevChar( uc, pos )->tqunicode() == 0x0644 ) {
+ if ( prevChar( uc, pos )->unicode() == 0x0644 ) {
// have a lam alef ligature
//kdDebug() << " alef of lam-alef ligature" << endl;
goto skip;
@@ -689,12 +689,12 @@ TQString KoComplexText::shapedString(const TQString& uc, int from, int len, TQPa
TQChar KoComplexText::shapedCharacter( const TQString &str, int pos, const TQFontMetrics *fm )
{
- const TQChar *ch = str.tqunicode() + pos;
+ const TQChar *ch = str.unicode() + pos;
if ( ch->row() != 0x06 )
return *ch;
else {
int shape = glyphVariantLogical( str, pos );
- //kdDebug() << "mapping U+" << ch->tqunicode() << " to shape " << shape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][shape] << endl;
+ //kdDebug() << "mapping U+" << ch->unicode() << " to shape " << shape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][shape] << endl;
// lam aleph ligatures
switch ( ch->cell() ) {
case 0x44: { // lam
@@ -716,7 +716,7 @@ TQChar KoComplexText::shapedCharacter( const TQString &str, int pos, const TQFon
case 0x23: // alef with hamza above
case 0x25: // alef with hamza below
case 0x27: // alef
- if ( prevChar( str, pos )->tqunicode() == 0x0644 )
+ if ( prevChar( str, pos )->unicode() == 0x0644 )
// have a lam alef ligature
return TQChar(0);
default:
@@ -842,7 +842,7 @@ TQPointArray KoComplexText::positionMarks( TQFontPrivate *f, const TQString &str
default:
break;
}
- //kdDebug() << "char=" << mark.tqunicode() << " combiningClass = " << cmb << " offset=" << p.x() << "/" << p.y() << endl;
+ //kdDebug() << "char=" << mark.unicode() << " combiningClass = " << cmb << " offset=" << p.x() << "/" << p.y() << endl;
markRect.moveBy( p.x(), p.y() );
p += TQPoint( -baseOffset, 0 );
attachmentRect |= markRect;
@@ -864,7 +864,7 @@ static TQChar::Direction basicDirection(const TQString &str, int start = 0)
{
int len = str.length();
int pos = start > len ? len -1 : start;
- const TQChar *uc = str.tqunicode() + pos;
+ const TQChar *uc = str.unicode() + pos;
while( pos < len ) {
switch( uc->direction() )
{
@@ -1406,8 +1406,8 @@ TQString KoComplexText::bidiReorderString( const TQString &str, TQChar::Directio
int len = str.length();
TQString visual;
visual.setUnicode( 0, len );
- TQChar *vch = (TQChar *)visual.tqunicode();
- const TQChar *ch = str.tqunicode();
+ TQChar *vch = (TQChar *)visual.unicode();
+ const TQChar *ch = str.unicode();
while( lineStart < len ) {
lineEnd = lineStart;
while( *ch != '\n' && lineEnd < len ) {
diff --git a/lib/kotext/KoParagCounter.cpp b/lib/kotext/KoParagCounter.cpp
index 56adc3a2..9810e8b0 100644
--- a/lib/kotext/KoParagCounter.cpp
+++ b/lib/kotext/KoParagCounter.cpp
@@ -216,7 +216,7 @@ void KoParagCounter::loadOasisListStyle( const TQDomElement& listStyle,
TQString bulletChar = listStyle.attributeNS( KoXmlNS::text, "bullet-char", TQString() );
if ( !bulletChar.isEmpty() ) {
// Reverse engineering, I found those codes:
- switch( bulletChar[0].tqunicode() ) {
+ switch( bulletChar[0].unicode() ) {
case 0x2022: // small disc -> circle
m_style = STYLE_CIRCLEBULLET;
break;
@@ -235,7 +235,7 @@ void KoParagCounter::loadOasisListStyle( const TQDomElement& listStyle,
m_style = STYLE_BOXBULLET;
break;
default:
- kdDebug() << "Unhandled bullet code 0x" << TQString::number( (uint)m_customBulletChar.tqunicode(), 16 ) << endl;
+ kdDebug() << "Unhandled bullet code 0x" << TQString::number( (uint)m_customBulletChar.unicode(), 16 ) << endl;
// fallback
case 0x2794: // arrow
case 0x2717: // cross
@@ -504,7 +504,7 @@ void KoParagCounter::save( TQDomElement & element )
element.setAttribute( "depth", m_depth );
if ( (Style)m_style == STYLE_CUSTOMBULLET )
{
- element.setAttribute( "bullet", m_customBulletChar.tqunicode() );
+ element.setAttribute( "bullet", m_customBulletChar.unicode() );
if ( !m_customBulletFont.isEmpty() )
element.setAttribute( "bulletfont", m_customBulletFont );
}
@@ -973,7 +973,7 @@ void KoParagCounter::printRTDebug( KoTextParag* parag )
if ( restartCounter() )
additionalInfo = "[restartCounter]";
if ( m_style == STYLE_CUSTOMBULLET )
- additionalInfo += " [customBullet: " + TQString::number( m_customBulletChar.tqunicode() )
+ additionalInfo += " [customBullet: " + TQString::number( m_customBulletChar.unicode() )
+ " in font '" + m_customBulletFont + "']";
static const char * const s_numbering[] = { "List", "Chapter", "None", "Footnote" };
kdDebug(32500) << " Counter style=" << style()
diff --git a/lib/kotext/KoParagDia.cpp b/lib/kotext/KoParagDia.cpp
index 1d424b27..0e38c8b5 100644
--- a/lib/kotext/KoParagDia.cpp
+++ b/lib/kotext/KoParagDia.cpp
@@ -830,7 +830,7 @@ void KoStylePreview::drawContents( TQPainter *painter )
TQRect whiteRect( r.x() + 10, r.y() + 10,
r.width() - 20, r.height() - 20 );
- TQColorGroup cg = TQApplication::tqpalette().active();
+ TQColorGroup cg = TQApplication::palette().active();
painter->fillRect( whiteRect, cg.brush( TQColorGroup::Base ) );
KoTextParag * parag = m_textdoc->firstParag();
@@ -1605,9 +1605,9 @@ KoParagCounterWidget::KoParagCounterWidget( bool disableAll, TQWidget * parent,
gNumbering = new TQButtonGroup( this, "numberingGroup" );
gNumbering->setTitle( i18n( "Numbering" ) );
gNumbering->setColumnLayout(0, Qt::Vertical );
- gNumbering->tqlayout()->setSpacing( 0 );
- gNumbering->tqlayout()->setMargin( 0 );
- TQHBoxLayout *numberingGroupLayout = new TQHBoxLayout( gNumbering->tqlayout() );
+ gNumbering->layout()->setSpacing( 0 );
+ gNumbering->layout()->setMargin( 0 );
+ TQHBoxLayout *numberingGroupLayout = new TQHBoxLayout( gNumbering->layout() );
numberingGroupLayout->setAlignment( TQt::AlignTop );
numberingGroupLayout->setSpacing( KDialog::spacingHint() );
numberingGroupLayout->setMargin( KDialog::marginHint() );
@@ -1770,9 +1770,9 @@ KoParagTabulatorsWidget::KoParagTabulatorsWidget( KoUnit::Unit unit, double fram
gPosition = new TQGroupBox( this, "gPosition" );
gPosition->setTitle( i18n( "Po&sition" ) );
gPosition->setColumnLayout(0, Qt::Vertical );
- gPosition->tqlayout()->setSpacing( 0 );
- gPosition->tqlayout()->setMargin( 0 );
- TQVBoxLayout* GroupBox2Layout = new TQVBoxLayout( gPosition->tqlayout() );
+ gPosition->layout()->setSpacing( 0 );
+ gPosition->layout()->setMargin( 0 );
+ TQVBoxLayout* GroupBox2Layout = new TQVBoxLayout( gPosition->layout() );
GroupBox2Layout->setAlignment( TQt::AlignTop );
GroupBox2Layout->setSpacing( KDialog::spacingHint() );
GroupBox2Layout->setMargin( KDialog::marginHint() );
@@ -1798,9 +1798,9 @@ KoParagTabulatorsWidget::KoParagTabulatorsWidget( KoUnit::Unit unit, double fram
bgAlign = new TQButtonGroup( this );
bgAlign->setTitle( i18n( "Alignment" ) );
bgAlign->setColumnLayout(0, Qt::Vertical );
- bgAlign->tqlayout()->setSpacing( 0 );
- bgAlign->tqlayout()->setMargin( 0 );
- TQVBoxLayout* ButtonGroup1Layout = new TQVBoxLayout( bgAlign->tqlayout() );
+ bgAlign->layout()->setSpacing( 0 );
+ bgAlign->layout()->setMargin( 0 );
+ TQVBoxLayout* ButtonGroup1Layout = new TQVBoxLayout( bgAlign->layout() );
ButtonGroup1Layout->setAlignment( TQt::AlignTop );
ButtonGroup1Layout->setSpacing( KDialog::spacingHint() );
ButtonGroup1Layout->setMargin( KDialog::marginHint() );
@@ -2159,31 +2159,31 @@ KoParagDia::KoParagDia( TQWidget* parent, const char* name,
{
TQVBox * page = addVBoxPage( i18n( "Indent && S&pacing" ) );
m_indentSpacingWidget = new KoIndentSpacingWidget( unit,_frameWidth,page, "indent-spacing" );
- m_indentSpacingWidget->tqlayout()->setMargin(0);
+ m_indentSpacingWidget->layout()->setMargin(0);
}
if ( m_flags & PD_ALIGN )
{
TQVBox * page = addVBoxPage( i18n( "General &Layout" ) );
m_alignWidget = new KoParagAlignWidget( breakLine, page, "align" );
- m_alignWidget->tqlayout()->setMargin(0);
+ m_alignWidget->layout()->setMargin(0);
}
if ( m_flags & PD_DECORATION )
{
TQVBox * page = addVBoxPage( i18n( "D&ecorations" ) );
m_decorationsWidget = new KoParagDecorationWidget( page, "decorations");
- m_decorationsWidget->tqlayout()->setMargin(0);
+ m_decorationsWidget->layout()->setMargin(0);
}
if ( m_flags & PD_NUMBERING )
{
TQVBox * page = addVBoxPage( i18n( "B&ullets/Numbers" ) );
m_counterWidget = new KoParagCounterWidget( disableAll , page, "numbers" );
- m_counterWidget->tqlayout()->setMargin(0);
+ m_counterWidget->layout()->setMargin(0);
}
if ( m_flags & PD_TABS )
{
TQVBox * page = addVBoxPage( i18n( "&Tabulators" ) );
m_tabulatorsWidget = new KoParagTabulatorsWidget( unit,_frameWidth, page, "tabs");
- m_tabulatorsWidget->tqlayout()->setMargin(0);
+ m_tabulatorsWidget->layout()->setMargin(0);
}
connect( this, TQT_SIGNAL( user1Clicked() ), this, TQT_SLOT(slotReset()));
diff --git a/lib/kotext/KoParagDia.h b/lib/kotext/KoParagDia.h
index 443bb62f..4fd8f784 100644
--- a/lib/kotext/KoParagDia.h
+++ b/lib/kotext/KoParagDia.h
@@ -95,7 +95,7 @@ public:
/** return the (i18n-ed) name of the tab */
virtual TQString tabName() = 0;
- // Return the part of the paragtqlayout that this widget cares about
+ // Return the part of the paraglayout that this widget cares about
int flag() const { return m_flag; }
private:
diff --git a/lib/kotext/KoParagLayout.cpp b/lib/kotext/KoParagLayout.cpp
index 8e5178a5..37fbbfb5 100644
--- a/lib/kotext/KoParagLayout.cpp
+++ b/lib/kotext/KoParagLayout.cpp
@@ -44,72 +44,72 @@ KoParagLayout::KoParagLayout()
initialise();
}
-void KoParagLayout::operator=( const KoParagLayout &tqlayout )
+void KoParagLayout::operator=( const KoParagLayout &layout )
{
- alignment = tqlayout.alignment;
+ alignment = layout.alignment;
for ( int i = 0 ; i < 5 ; ++i )
- margins[i] = tqlayout.margins[i];
- pageBreaking = tqlayout.pageBreaking;
- leftBorder = tqlayout.leftBorder;
- rightBorder = tqlayout.rightBorder;
- topBorder = tqlayout.topBorder;
- bottomBorder = tqlayout.bottomBorder;
- joinBorder = tqlayout.joinBorder;
- backgroundColor = tqlayout.backgroundColor;
- if ( tqlayout.counter )
- counter = new KoParagCounter( *tqlayout.counter );
+ margins[i] = layout.margins[i];
+ pageBreaking = layout.pageBreaking;
+ leftBorder = layout.leftBorder;
+ rightBorder = layout.rightBorder;
+ topBorder = layout.topBorder;
+ bottomBorder = layout.bottomBorder;
+ joinBorder = layout.joinBorder;
+ backgroundColor = layout.backgroundColor;
+ if ( layout.counter )
+ counter = new KoParagCounter( *layout.counter );
else
counter = 0L;
- lineSpacing = tqlayout.lineSpacing;
- lineSpacingType = tqlayout.lineSpacingType;
- style = tqlayout.style;
- direction = tqlayout.direction;
- setTabList( tqlayout.tabList() );
+ lineSpacing = layout.lineSpacing;
+ lineSpacingType = layout.lineSpacingType;
+ style = layout.style;
+ direction = layout.direction;
+ setTabList( layout.tabList() );
}
-int KoParagLayout::compare( const KoParagLayout & tqlayout ) const
+int KoParagLayout::compare( const KoParagLayout & layout ) const
{
int flags = 0;
- if ( alignment != tqlayout.alignment )
+ if ( alignment != layout.alignment )
flags |= Alignment;
for ( int i = 0 ; i < 5 ; ++i )
- if ( margins[i] != tqlayout.margins[i] )
+ if ( margins[i] != layout.margins[i] )
{
flags |= Margins;
break;
}
- if ( pageBreaking != tqlayout.pageBreaking )
+ if ( pageBreaking != layout.pageBreaking )
flags |= PageBreaking;
- if ( leftBorder != tqlayout.leftBorder
- || rightBorder != tqlayout.rightBorder
- || topBorder != tqlayout.topBorder
- || bottomBorder != tqlayout.bottomBorder
- || joinBorder != tqlayout.joinBorder )
+ if ( leftBorder != layout.leftBorder
+ || rightBorder != layout.rightBorder
+ || topBorder != layout.topBorder
+ || bottomBorder != layout.bottomBorder
+ || joinBorder != layout.joinBorder )
flags |= Borders;
- if ( tqlayout.counter )
+ if ( layout.counter )
{
if ( counter )
{
- if ( ! ( *tqlayout.counter == *counter ) )
+ if ( ! ( *layout.counter == *counter ) )
flags |= BulletNumber;
} else
- if ( tqlayout.counter->numbering() != KoParagCounter::NUM_NONE )
+ if ( layout.counter->numbering() != KoParagCounter::NUM_NONE )
flags |= BulletNumber;
}
else
if ( counter && counter->numbering() != KoParagCounter::NUM_NONE )
flags |= BulletNumber;
- if ( lineSpacing != tqlayout.lineSpacing
- || lineSpacingType != tqlayout.lineSpacingType )
+ if ( lineSpacing != layout.lineSpacing
+ || lineSpacingType != layout.lineSpacingType )
flags |= LineSpacing;
- //if ( style != tqlayout.style )
+ //if ( style != layout.style )
// flags |= Style;
- if ( m_tabList != tqlayout.m_tabList )
+ if ( m_tabList != layout.m_tabList )
flags |= Tabulator;
- if ( backgroundColor != tqlayout.backgroundColor)
+ if ( backgroundColor != layout.backgroundColor)
flags |= BackgroundColor;
// This method is used for the GUI stuff only, so we don't have a flag
@@ -141,13 +141,13 @@ KoParagLayout::~KoParagLayout()
delete counter;
}
-void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement& parentElem, int docVersion )
+void KoParagLayout::loadParagLayout( KoParagLayout& layout, const TQDomElement& parentElem, int docVersion )
{
- // tqlayout is an input and output parameter
+ // layout is an input and output parameter
// It can have been initialized already, e.g. by copying from a style
// (we don't do that anymore though).
- // Load the paragraph tabs - we load into a clean list, not mixing with those already in "tqlayout"
+ // Load the paragraph tabs - we load into a clean list, not mixing with those already in "layout"
// We can't apply the 'default comes from the style' in this case, because
// there is no way to differentiate between "I want no tabs in the parag"
// and "use default from style".
@@ -171,15 +171,15 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement
}
}
qHeapSort( tabList );
- tqlayout.setTabList( tabList );
- tqlayout.alignment = TQt::AlignAuto;
+ layout.setTabList( tabList );
+ layout.alignment = TQt::AlignAuto;
element = parentElem.namedItem( "FLOW" ).toElement(); // Flow is what is now called alignment internally
if ( !element.isNull() )
{
TQString flow = element.attribute( "align" ); // KWord-1.0 DTD
if ( !flow.isEmpty() )
{
- tqlayout.alignment = flow=="right" ? TQt::AlignRight :
+ layout.alignment = flow=="right" ? TQt::AlignRight :
flow=="center" ? TQt::AlignHCenter :
flow=="justify" ? TQt::AlignJustify :
flow=="left" ? TQt::AlignLeft : TQt::AlignAuto;
@@ -187,9 +187,9 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement
TQString dir = element.attribute( "dir" ); // KWord-1.2
if ( !dir.isEmpty() ) {
if ( dir == "L" )
- tqlayout.direction = TQChar::DirL;
+ layout.direction = TQChar::DirL;
else if ( dir == "R" )
- tqlayout.direction = TQChar::DirR;
+ layout.direction = TQChar::DirR;
else
kdWarning() << "Unexpected value for paragraph direction: " << dir << endl;
}
@@ -197,7 +197,7 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement
flow = element.attribute( "value" ); // KWord-0.8
static const int flow2align[] = { TQt::AlignAuto, TQt::AlignRight, TQt::AlignHCenter, TQt::AlignJustify };
if ( !flow.isEmpty() && flow.toInt() < 4 )
- tqlayout.alignment = flow2align[flow.toInt()];
+ layout.alignment = flow2align[flow.toInt()];
}
}
@@ -205,34 +205,34 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement
{
element = parentElem.namedItem( "OHEAD" ).toElement(); // used by KWord-0.8
if ( !element.isNull() )
- tqlayout.margins[TQStyleSheetItem::MarginTop] = getAttribute( element, "pt", 0.0 );
+ layout.margins[TQStyleSheetItem::MarginTop] = getAttribute( element, "pt", 0.0 );
element = parentElem.namedItem( "OFOOT" ).toElement(); // used by KWord-0.8
if ( !element.isNull() )
- tqlayout.margins[TQStyleSheetItem::MarginBottom] = getAttribute( element, "pt", 0.0 );
+ layout.margins[TQStyleSheetItem::MarginBottom] = getAttribute( element, "pt", 0.0 );
element = parentElem.namedItem( "IFIRST" ).toElement(); // used by KWord-0.8
if ( !element.isNull() )
- tqlayout.margins[TQStyleSheetItem::MarginFirstLine] = getAttribute( element, "pt", 0.0 );
+ layout.margins[TQStyleSheetItem::MarginFirstLine] = getAttribute( element, "pt", 0.0 );
element = parentElem.namedItem( "ILEFT" ).toElement(); // used by KWord-0.8
if ( !element.isNull() )
- tqlayout.margins[TQStyleSheetItem::MarginLeft] = getAttribute( element, "pt", 0.0 );
+ layout.margins[TQStyleSheetItem::MarginLeft] = getAttribute( element, "pt", 0.0 );
}
// KWord-1.0 DTD
element = parentElem.namedItem( "INDENTS" ).toElement();
if ( !element.isNull() )
{
- tqlayout.margins[TQStyleSheetItem::MarginFirstLine] = getAttribute( element, "first", 0.0 );
- tqlayout.margins[TQStyleSheetItem::MarginLeft] = getAttribute( element, "left", 0.0 );
- tqlayout.margins[TQStyleSheetItem::MarginRight] = getAttribute( element, "right", 0.0 );
+ layout.margins[TQStyleSheetItem::MarginFirstLine] = getAttribute( element, "first", 0.0 );
+ layout.margins[TQStyleSheetItem::MarginLeft] = getAttribute( element, "left", 0.0 );
+ layout.margins[TQStyleSheetItem::MarginRight] = getAttribute( element, "right", 0.0 );
}
element = parentElem.namedItem( "OFFSETS" ).toElement();
if ( !element.isNull() )
{
- tqlayout.margins[TQStyleSheetItem::MarginTop] = getAttribute( element, "before", 0.0 );
- tqlayout.margins[TQStyleSheetItem::MarginBottom] = getAttribute( element, "after", 0.0 );
+ layout.margins[TQStyleSheetItem::MarginTop] = getAttribute( element, "before", 0.0 );
+ layout.margins[TQStyleSheetItem::MarginBottom] = getAttribute( element, "after", 0.0 );
}
if ( docVersion < 2 )
@@ -240,8 +240,8 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement
element = parentElem.namedItem( "LINESPACE" ).toElement(); // used by KWord-0.8
if ( !element.isNull() )
{
- tqlayout.lineSpacingType = KoParagLayout::LS_CUSTOM;
- tqlayout.lineSpacing = getAttribute( element, "pt", 0.0 );
+ layout.lineSpacingType = KoParagLayout::LS_CUSTOM;
+ layout.lineSpacing = getAttribute( element, "pt", 0.0 );
}
}
@@ -254,18 +254,18 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement
TQString value = element.attribute( "value" );
if ( value == "oneandhalf" )
{
- tqlayout.lineSpacingType = KoParagLayout::LS_ONEANDHALF;
- tqlayout.lineSpacing = 0;
+ layout.lineSpacingType = KoParagLayout::LS_ONEANDHALF;
+ layout.lineSpacing = 0;
}
else if ( value == "double" )
{
- tqlayout.lineSpacingType = KoParagLayout::LS_DOUBLE;
- tqlayout.lineSpacing = 0;
+ layout.lineSpacingType = KoParagLayout::LS_DOUBLE;
+ layout.lineSpacing = 0;
}
else
{
- tqlayout.lineSpacingType = KoParagLayout::LS_CUSTOM;
- tqlayout.lineSpacing = value.toDouble();
+ layout.lineSpacingType = KoParagLayout::LS_CUSTOM;
+ layout.lineSpacing = value.toDouble();
}
}
else
@@ -273,36 +273,36 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement
TQString type = element.attribute( "type" );
if ( type == "oneandhalf" )
{
- tqlayout.lineSpacingType = KoParagLayout::LS_ONEANDHALF;
- tqlayout.lineSpacing = 0;
+ layout.lineSpacingType = KoParagLayout::LS_ONEANDHALF;
+ layout.lineSpacing = 0;
}
else if ( type == "double" )
{
- tqlayout.lineSpacingType = KoParagLayout::LS_DOUBLE;
- tqlayout.lineSpacing = 0;
+ layout.lineSpacingType = KoParagLayout::LS_DOUBLE;
+ layout.lineSpacing = 0;
}
else if ( type == "custom" )
{
- tqlayout.lineSpacingType = KoParagLayout::LS_CUSTOM;
- tqlayout.lineSpacing = element.attribute( "spacingvalue" ).toDouble();
+ layout.lineSpacingType = KoParagLayout::LS_CUSTOM;
+ layout.lineSpacing = element.attribute( "spacingvalue" ).toDouble();
}
else if ( type == "atleast" )
{
- tqlayout.lineSpacingType = KoParagLayout::LS_AT_LEAST;
- tqlayout.lineSpacing = element.attribute( "spacingvalue" ).toDouble();
+ layout.lineSpacingType = KoParagLayout::LS_AT_LEAST;
+ layout.lineSpacing = element.attribute( "spacingvalue" ).toDouble();
}
else if ( type == "multiple" )
{
- tqlayout.lineSpacingType = KoParagLayout::LS_MULTIPLE;
- tqlayout.lineSpacing = element.attribute( "spacingvalue" ).toDouble();
+ layout.lineSpacingType = KoParagLayout::LS_MULTIPLE;
+ layout.lineSpacing = element.attribute( "spacingvalue" ).toDouble();
}
else if ( type == "fixed" )
{
- tqlayout.lineSpacingType = KoParagLayout::LS_FIXED;
- tqlayout.lineSpacing = element.attribute( "spacingvalue" ).toDouble();
+ layout.lineSpacingType = KoParagLayout::LS_FIXED;
+ layout.lineSpacing = element.attribute( "spacingvalue" ).toDouble();
}
else if ( type == "single" ) // not used; just in case future versions use it.
- tqlayout.lineSpacingType = KoParagLayout::LS_SINGLE;
+ layout.lineSpacingType = KoParagLayout::LS_SINGLE;
}
}
@@ -323,37 +323,37 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement
if ( !element.isNull() )
pageBreaking |= KoParagLayout::HardFrameBreakBefore;
}
- tqlayout.pageBreaking = pageBreaking;
+ layout.pageBreaking = pageBreaking;
element = parentElem.namedItem( "LEFTBORDER" ).toElement();
if ( !element.isNull() )
- tqlayout.leftBorder = KoBorder::loadBorder( element );
+ layout.leftBorder = KoBorder::loadBorder( element );
else
- tqlayout.leftBorder.setPenWidth(0);
+ layout.leftBorder.setPenWidth(0);
element = parentElem.namedItem( "RIGHTBORDER" ).toElement();
if ( !element.isNull() )
- tqlayout.rightBorder = KoBorder::loadBorder( element );
+ layout.rightBorder = KoBorder::loadBorder( element );
else
- tqlayout.rightBorder.setPenWidth(0);
+ layout.rightBorder.setPenWidth(0);
element = parentElem.namedItem( "TOPBORDER" ).toElement();
if ( !element.isNull() )
- tqlayout.topBorder = KoBorder::loadBorder( element );
+ layout.topBorder = KoBorder::loadBorder( element );
else
- tqlayout.topBorder.setPenWidth(0);
+ layout.topBorder.setPenWidth(0);
element = parentElem.namedItem( "BOTTOMBORDER" ).toElement();
if ( !element.isNull() )
- tqlayout.bottomBorder = KoBorder::loadBorder( element );
+ layout.bottomBorder = KoBorder::loadBorder( element );
else
- tqlayout.bottomBorder.setPenWidth(0);
+ layout.bottomBorder.setPenWidth(0);
element = parentElem.namedItem( "COUNTER" ).toElement();
if ( !element.isNull() )
{
- tqlayout.counter = new KoParagCounter;
- tqlayout.counter->load( element );
+ layout.counter = new KoParagCounter;
+ layout.counter->load( element );
}
// Compatibility with KOffice-1.2
@@ -434,29 +434,29 @@ TQCString KoParagLayout::saveOasisAlignment( TQt::AlignmentFlags alignment )
"start"; // i.e. direction-dependent
}
-void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContext& context )
+void KoParagLayout::loadOasisParagLayout( KoParagLayout& layout, KoOasisContext& context )
{
context.styleStack().setTypeProperties( "paragraph" );
- // tqlayout is an input and output parameter
+ // layout is an input and output parameter
// It can have been initialized already, e.g. by copying from a style
// code from OoWriterImport::writeLayout
if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "text-align" ) ) {
TQCString align = context.styleStack().attributeNS( KoXmlNS::fo, "text-align" ).latin1();
- tqlayout.alignment = loadOasisAlignment( align );
+ layout.alignment = loadOasisAlignment( align );
}
if ( context.styleStack().hasAttributeNS( KoXmlNS::style, "writing-mode" ) ) { // http://web4.w3.org/TR/xsl/slice7.html#writing-mode
// LTR is lr-tb. RTL is rl-tb
TQString writingMode = context.styleStack().attributeNS( KoXmlNS::style, "writing-mode" );
- tqlayout.direction = ( writingMode=="rl-tb" || writingMode=="rl" ) ? TQChar::DirR : TQChar::DirL;
+ layout.direction = ( writingMode=="rl-tb" || writingMode=="rl" ) ? TQChar::DirR : TQChar::DirL;
}
// Indentation (margins)
if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "margin-left" ) || // 3.11.19
context.styleStack().hasAttributeNS( KoXmlNS::fo, "margin-right" ) ) {
- tqlayout.margins[TQStyleSheetItem::MarginLeft] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-left" ) );
- tqlayout.margins[TQStyleSheetItem::MarginRight] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-right" ) );
+ layout.margins[TQStyleSheetItem::MarginLeft] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-left" ) );
+ layout.margins[TQStyleSheetItem::MarginRight] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-right" ) );
// *text-indent must always be bound to either margin-left or margin-right
double first = 0;
if ( context.styleStack().attributeNS( KoXmlNS::style, "auto-text-indent") == "true" ) // style:auto-text-indent takes precedence
@@ -467,14 +467,14 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex
else if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "text-indent") )
first = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "text-indent") );
- tqlayout.margins[TQStyleSheetItem::MarginFirstLine] = first;
+ layout.margins[TQStyleSheetItem::MarginFirstLine] = first;
}
// Offset before and after paragraph
if( context.styleStack().hasAttributeNS( KoXmlNS::fo, "margin-top") || // 3.11.22
context.styleStack().hasAttributeNS( KoXmlNS::fo, "margin-bottom")) {
- tqlayout.margins[TQStyleSheetItem::MarginTop] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-top" ) );
- tqlayout.margins[TQStyleSheetItem::MarginBottom] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-bottom" ) );
+ layout.margins[TQStyleSheetItem::MarginTop] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-top" ) );
+ layout.margins[TQStyleSheetItem::MarginBottom] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-bottom" ) );
}
// Line spacing
@@ -483,23 +483,23 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex
TQString value = context.styleStack().attributeNS( KoXmlNS::fo, "line-height" );
if ( value != "normal" ) {
if ( value == "100%" )
- tqlayout.lineSpacingType = KoParagLayout::LS_SINGLE;
+ layout.lineSpacingType = KoParagLayout::LS_SINGLE;
else if( value=="150%")
- tqlayout.lineSpacingType = KoParagLayout::LS_ONEANDHALF;
+ layout.lineSpacingType = KoParagLayout::LS_ONEANDHALF;
else if( value=="200%")
- tqlayout.lineSpacingType = KoParagLayout::LS_DOUBLE;
+ layout.lineSpacingType = KoParagLayout::LS_DOUBLE;
else if ( value.find('%') > -1 )
{
value = value.remove( '%' );
double percent = value.toDouble();
- tqlayout.lineSpacingType = KoParagLayout::LS_MULTIPLE;
- tqlayout.lineSpacing = percent / 100.0;
- kdDebug(33001) << "line-height =" << percent << ", " << tqlayout.lineSpacing << ", " << percent/100 << endl;
+ layout.lineSpacingType = KoParagLayout::LS_MULTIPLE;
+ layout.lineSpacing = percent / 100.0;
+ kdDebug(33001) << "line-height =" << percent << ", " << layout.lineSpacing << ", " << percent/100 << endl;
}
else // fixed value
{
- tqlayout.lineSpacingType = KoParagLayout::LS_FIXED;
- tqlayout.lineSpacing = KoUnit::parseValue( value );
+ layout.lineSpacingType = KoParagLayout::LS_FIXED;
+ layout.lineSpacing = KoUnit::parseValue( value );
}
}
}
@@ -512,8 +512,8 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex
// Did we make the wrong choice in kotext?
//kdWarning() << "Unimplemented support for style:line-height-at-least: " << value << endl;
// Well let's see if this makes a big difference.
- tqlayout.lineSpacingType = KoParagLayout::LS_AT_LEAST;
- tqlayout.lineSpacing = KoUnit::parseValue( value );
+ layout.lineSpacingType = KoParagLayout::LS_AT_LEAST;
+ layout.lineSpacing = KoUnit::parseValue( value );
}
// Line-spacing is mutually exclusive with line-height and line-height-at-least
else if ( context.styleStack().hasAttributeNS( KoXmlNS::style, "line-spacing") ) // 3.11.3
@@ -521,8 +521,8 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex
double value = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::style, "line-spacing" ) );
if ( value != 0.0 )
{
- tqlayout.lineSpacingType = KoParagLayout::LS_CUSTOM;
- tqlayout.lineSpacing = value;
+ layout.lineSpacingType = KoParagLayout::LS_CUSTOM;
+ layout.lineSpacing = value;
}
}
@@ -530,7 +530,7 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex
KoTabulatorList tabList;
if ( context.styleStack().hasChildNodeNS( KoXmlNS::style, "tab-stops" ) ) { // 3.11.10
TQDomElement tabStops = context.styleStack().childNodeNS( KoXmlNS::style, "tab-stops" );
- //kdDebug(30519) << k_funcinfo << tabStops.childNodes().count() << " tab stops in tqlayout." << endl;
+ //kdDebug(30519) << k_funcinfo << tabStops.childNodes().count() << " tab stops in layout." << endl;
TQDomElement tabStop;
forEachElement( tabStop, tabStops )
{
@@ -540,7 +540,7 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex
KoTabulator tab;
tab.ptPos = KoUnit::parseValue( tabStop.attributeNS( KoXmlNS::style, "position", TQString() ) );
// Tab stop positions in the XML are relative to the left-margin
- tab.ptPos += tqlayout.margins[TQStyleSheetItem::MarginLeft];
+ tab.ptPos += layout.margins[TQStyleSheetItem::MarginLeft];
if ( type == "center" )
tab.type = T_CENTER;
else if ( type == "right" )
@@ -573,7 +573,7 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex
}
else
{
- // Fallback: convert leaderChar's tqunicode value
+ // Fallback: convert leaderChar's unicode value
TQString leaderChar = tabStop.attributeNS( KoXmlNS::style, "leader-text", TQString() );
if ( !leaderChar.isEmpty() )
{
@@ -594,27 +594,27 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex
} //for
}
qHeapSort( tabList );
- tqlayout.setTabList( tabList );
+ layout.setTabList( tabList );
- tqlayout.joinBorder = !( context.styleStack().attributeNS( KoXmlNS::style, "join-border") == "false" );
+ layout.joinBorder = !( context.styleStack().attributeNS( KoXmlNS::style, "join-border") == "false" );
// Borders
if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "border","left") )
- tqlayout.leftBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","left") );
+ layout.leftBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","left") );
else
- tqlayout.leftBorder.setPenWidth(0);
+ layout.leftBorder.setPenWidth(0);
if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "border","right") )
- tqlayout.rightBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","right") );
+ layout.rightBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","right") );
else
- tqlayout.rightBorder.setPenWidth(0);
+ layout.rightBorder.setPenWidth(0);
if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "border","top") )
- tqlayout.topBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","top") );
+ layout.topBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","top") );
else
- tqlayout.topBorder.setPenWidth(0);
+ layout.topBorder.setPenWidth(0);
if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "border","bottom") )
- tqlayout.bottomBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","bottom") );
+ layout.bottomBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","bottom") );
else
- tqlayout.bottomBorder.setPenWidth(0);
+ layout.bottomBorder.setPenWidth(0);
// Page breaking
@@ -647,25 +647,25 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex
pageBreaking |= KoParagLayout::KeepWithNext;
}
}
- tqlayout.pageBreaking = pageBreaking;
+ layout.pageBreaking = pageBreaking;
// Paragraph background color - fo:background-color
// The background color for parts of a paragraph that have no text underneath
if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "background-color" ) ) {
TQString bgColor = context.styleStack().attributeNS( KoXmlNS::fo, "background-color");
if (bgColor != "transparent")
- tqlayout.backgroundColor.setNamedColor( bgColor );
+ layout.backgroundColor.setNamedColor( bgColor );
}
}
void KoParagLayout::saveParagLayout( TQDomElement & parentElem, int alignment ) const
{
- const KoParagLayout& tqlayout = *this; // code moved from somewhere else;)
+ const KoParagLayout& layout = *this; // code moved from somewhere else;)
TQDomDocument doc = parentElem.ownerDocument();
TQDomElement element = doc.createElement( "NAME" );
parentElem.appendChild( element );
- if ( tqlayout.style )
- element.setAttribute( "value", tqlayout.style->displayName() );
+ if ( layout.style )
+ element.setAttribute( "value", layout.style->displayName() );
//else
// kdWarning() << "KoParagLayout::saveParagLayout: style==0!" << endl;
@@ -677,118 +677,118 @@ void KoParagLayout::saveParagLayout( TQDomElement & parentElem, int alignment )
alignment==TQt::AlignJustify ? "justify" :
alignment==TQt::AlignAuto ? "auto" : "left" ); // Note: styles can have AlignAuto. Not paragraphs.
- if ( static_cast<TQChar::Direction>(tqlayout.direction) == TQChar::DirR )
+ if ( static_cast<TQChar::Direction>(layout.direction) == TQChar::DirR )
element.setAttribute( "dir", "R" );
else
- if ( static_cast<TQChar::Direction>(tqlayout.direction) == TQChar::DirL )
+ if ( static_cast<TQChar::Direction>(layout.direction) == TQChar::DirL )
element.setAttribute( "dir", "L" );
- if ( tqlayout.margins[TQStyleSheetItem::MarginFirstLine] != 0 ||
- tqlayout.margins[TQStyleSheetItem::MarginLeft] != 0 ||
- tqlayout.margins[TQStyleSheetItem::MarginRight] != 0 )
+ if ( layout.margins[TQStyleSheetItem::MarginFirstLine] != 0 ||
+ layout.margins[TQStyleSheetItem::MarginLeft] != 0 ||
+ layout.margins[TQStyleSheetItem::MarginRight] != 0 )
{
element = doc.createElement( "INDENTS" );
parentElem.appendChild( element );
- if ( tqlayout.margins[TQStyleSheetItem::MarginFirstLine] != 0 )
- element.setAttribute( "first", tqlayout.margins[TQStyleSheetItem::MarginFirstLine] );
- if ( tqlayout.margins[TQStyleSheetItem::MarginLeft] != 0 )
- element.setAttribute( "left", tqlayout.margins[TQStyleSheetItem::MarginLeft] );
- if ( tqlayout.margins[TQStyleSheetItem::MarginRight] != 0 )
- element.setAttribute( "right", tqlayout.margins[TQStyleSheetItem::MarginRight] );
+ if ( layout.margins[TQStyleSheetItem::MarginFirstLine] != 0 )
+ element.setAttribute( "first", layout.margins[TQStyleSheetItem::MarginFirstLine] );
+ if ( layout.margins[TQStyleSheetItem::MarginLeft] != 0 )
+ element.setAttribute( "left", layout.margins[TQStyleSheetItem::MarginLeft] );
+ if ( layout.margins[TQStyleSheetItem::MarginRight] != 0 )
+ element.setAttribute( "right", layout.margins[TQStyleSheetItem::MarginRight] );
}
- if ( tqlayout.margins[TQStyleSheetItem::MarginTop] != 0 ||
- tqlayout.margins[TQStyleSheetItem::MarginBottom] != 0 )
+ if ( layout.margins[TQStyleSheetItem::MarginTop] != 0 ||
+ layout.margins[TQStyleSheetItem::MarginBottom] != 0 )
{
element = doc.createElement( "OFFSETS" );
parentElem.appendChild( element );
- if ( tqlayout.margins[TQStyleSheetItem::MarginTop] != 0 )
- element.setAttribute( "before", tqlayout.margins[TQStyleSheetItem::MarginTop] );
- if ( tqlayout.margins[TQStyleSheetItem::MarginBottom] != 0 )
- element.setAttribute( "after", tqlayout.margins[TQStyleSheetItem::MarginBottom] );
+ if ( layout.margins[TQStyleSheetItem::MarginTop] != 0 )
+ element.setAttribute( "before", layout.margins[TQStyleSheetItem::MarginTop] );
+ if ( layout.margins[TQStyleSheetItem::MarginBottom] != 0 )
+ element.setAttribute( "after", layout.margins[TQStyleSheetItem::MarginBottom] );
}
- if ( tqlayout.lineSpacingType != LS_SINGLE )
+ if ( layout.lineSpacingType != LS_SINGLE )
{
element = doc.createElement( "LINESPACING" );
parentElem.appendChild( element );
- if ( tqlayout.lineSpacingType == KoParagLayout::LS_ONEANDHALF ) {
+ if ( layout.lineSpacingType == KoParagLayout::LS_ONEANDHALF ) {
element.setAttribute( "type", "oneandhalf" );
element.setAttribute( "value", "oneandhalf" ); //compatibility with koffice 1.2
}
- else if ( tqlayout.lineSpacingType == KoParagLayout::LS_DOUBLE ) {
+ else if ( layout.lineSpacingType == KoParagLayout::LS_DOUBLE ) {
element.setAttribute( "type", "double" );
element.setAttribute( "value", "double" ); //compatibility with koffice 1.2
}
- else if ( tqlayout.lineSpacingType == KoParagLayout::LS_CUSTOM )
+ else if ( layout.lineSpacingType == KoParagLayout::LS_CUSTOM )
{
element.setAttribute( "type", "custom" );
- element.setAttribute( "spacingvalue", tqlayout.lineSpacing);
- element.setAttribute( "value", tqlayout.lineSpacing ); //compatibility with koffice 1.2
+ element.setAttribute( "spacingvalue", layout.lineSpacing);
+ element.setAttribute( "value", layout.lineSpacing ); //compatibility with koffice 1.2
}
- else if ( tqlayout.lineSpacingType == KoParagLayout::LS_AT_LEAST )
+ else if ( layout.lineSpacingType == KoParagLayout::LS_AT_LEAST )
{
element.setAttribute( "type", "atleast" );
- element.setAttribute( "spacingvalue", tqlayout.lineSpacing);
+ element.setAttribute( "spacingvalue", layout.lineSpacing);
}
- else if ( tqlayout.lineSpacingType == KoParagLayout::LS_MULTIPLE )
+ else if ( layout.lineSpacingType == KoParagLayout::LS_MULTIPLE )
{
element.setAttribute( "type", "multiple" );
- element.setAttribute( "spacingvalue", tqlayout.lineSpacing);
+ element.setAttribute( "spacingvalue", layout.lineSpacing);
}
- else if ( tqlayout.lineSpacingType == KoParagLayout::LS_FIXED )
+ else if ( layout.lineSpacingType == KoParagLayout::LS_FIXED )
{
element.setAttribute( "type", "fixed" );
- element.setAttribute( "spacingvalue", tqlayout.lineSpacing);
+ element.setAttribute( "spacingvalue", layout.lineSpacing);
}
else
kdDebug()<<" error in lineSpacing Type\n";
}
- if ( tqlayout.pageBreaking != 0 )
+ if ( layout.pageBreaking != 0 )
{
element = doc.createElement( "PAGEBREAKING" );
parentElem.appendChild( element );
- if ( tqlayout.pageBreaking & KoParagLayout::KeepLinesTogether )
+ if ( layout.pageBreaking & KoParagLayout::KeepLinesTogether )
element.setAttribute( "linesTogether", "true" );
- if ( tqlayout.pageBreaking & KoParagLayout::HardFrameBreakBefore )
+ if ( layout.pageBreaking & KoParagLayout::HardFrameBreakBefore )
element.setAttribute( "hardFrameBreak", "true" );
- if ( tqlayout.pageBreaking & KoParagLayout::HardFrameBreakAfter )
+ if ( layout.pageBreaking & KoParagLayout::HardFrameBreakAfter )
element.setAttribute( "hardFrameBreakAfter", "true" );
}
- if ( tqlayout.leftBorder.penWidth() > 0 )
+ if ( layout.leftBorder.penWidth() > 0 )
{
element = doc.createElement( "LEFTBORDER" );
parentElem.appendChild( element );
- tqlayout.leftBorder.save( element );
+ layout.leftBorder.save( element );
}
- if ( tqlayout.rightBorder.penWidth() > 0 )
+ if ( layout.rightBorder.penWidth() > 0 )
{
element = doc.createElement( "RIGHTBORDER" );
parentElem.appendChild( element );
- tqlayout.rightBorder.save( element );
+ layout.rightBorder.save( element );
}
- if ( tqlayout.topBorder.penWidth() > 0 )
+ if ( layout.topBorder.penWidth() > 0 )
{
element = doc.createElement( "TOPBORDER" );
parentElem.appendChild( element );
- tqlayout.topBorder.save( element );
+ layout.topBorder.save( element );
}
- if ( tqlayout.bottomBorder.penWidth() > 0 )
+ if ( layout.bottomBorder.penWidth() > 0 )
{
element = doc.createElement( "BOTTOMBORDER" );
parentElem.appendChild( element );
- tqlayout.bottomBorder.save( element );
+ layout.bottomBorder.save( element );
}
- if ( tqlayout.counter && tqlayout.counter->numbering() != KoParagCounter::NUM_NONE )
+ if ( layout.counter && layout.counter->numbering() != KoParagCounter::NUM_NONE )
{
element = doc.createElement( "COUNTER" );
parentElem.appendChild( element );
- if ( tqlayout.counter )
- tqlayout.counter->save( element );
+ if ( layout.counter )
+ layout.counter->save( element );
}
- KoTabulatorList tabList = tqlayout.tabList();
+ KoTabulatorList tabList = layout.tabList();
KoTabulatorList::ConstIterator it = tabList.begin();
for ( ; it != tabList.end() ; it++ )
{
diff --git a/lib/kotext/KoParagLayout.h b/lib/kotext/KoParagLayout.h
index c0582b19..975fdaf0 100644
--- a/lib/kotext/KoParagLayout.h
+++ b/lib/kotext/KoParagLayout.h
@@ -40,7 +40,7 @@ class KOTEXT_EXPORT KoParagLayout
{
public:
KoParagLayout();
- KoParagLayout( const KoParagLayout &tqlayout ) { operator=( tqlayout ); }
+ KoParagLayout( const KoParagLayout &layout ) { operator=( layout ); }
~KoParagLayout();
@@ -122,29 +122,29 @@ public:
const KoTabulatorList& tabList() const { return m_tabList; }
//! Assignment operator for KoParagLayout
- /** Copy a paragraph tqlayout.
+ /** Copy a paragraph layout.
*
* If you're modifying this, you might also need to modify
* KoTextParag::setParagLayout
*/
void operator=( const KoParagLayout & );
- /** Return a set of flags showing the differences between this and 'tqlayout' */
- int compare( const KoParagLayout & tqlayout ) const;
+ /** Return a set of flags showing the differences between this and 'layout' */
+ int compare( const KoParagLayout & layout ) const;
- /** Save this parag tqlayout to XML.
+ /** Save this parag layout to XML.
* This format is used by KWord for paragraphs, and by KPresenter+KWord for styles.
*/
void saveParagLayout( TQDomElement & parentElem, int alignment ) const;
- /** Load this parag tqlayout from XML.
+ /** Load this parag layout from XML.
* This format is used by KWord for paragraphs, and by KPresenter+KWord for styles.
*/
- static void loadParagLayout( KoParagLayout& tqlayout, const TQDomElement& parentElem, int docVersion = 2 );
+ static void loadParagLayout( KoParagLayout& layout, const TQDomElement& parentElem, int docVersion = 2 );
- /// Load this parag tqlayout from Oasis XML
- static void loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContext& context );
- /// Save this parag tqlayout to Oasis XML
+ /// Load this parag layout from Oasis XML
+ static void loadOasisParagLayout( KoParagLayout& layout, KoOasisContext& context );
+ /// Save this parag layout to Oasis XML
/// @param savingStyle true if this is saved as part of a user style,
/// false when saving a paragraph
/// @param gs the style where all the properties will be saved to
diff --git a/lib/kotext/KoParagStyle.cpp b/lib/kotext/KoParagStyle.cpp
index b09fe90e..fcae882c 100644
--- a/lib/kotext/KoParagStyle.cpp
+++ b/lib/kotext/KoParagStyle.cpp
@@ -103,12 +103,12 @@ void KoParagStyle::saveStyle( TQDomElement & parentElem )
void KoParagStyle::loadStyle( TQDomElement & parentElem, int docVersion )
{
- KoParagLayout tqlayout;
- KoParagLayout::loadParagLayout( tqlayout, parentElem, docVersion );
+ KoParagLayout layout;
+ KoParagLayout::loadParagLayout( layout, parentElem, docVersion );
// This way, KoTextParag::setParagLayout also sets the style pointer, to this style
- tqlayout.style = this;
- m_paragLayout = tqlayout;
+ layout.style = this;
+ m_paragLayout = layout;
// Load name
TQDomElement nameElem = parentElem.namedItem("NAME").toElement();
@@ -138,8 +138,8 @@ void KoParagStyle::loadStyle( TQDomElement & styleElem, KoOasisContext& context
context.styleStack().save();
context.addStyles( &styleElem, "paragraph" ); // Load all parents - only because we don't support inheritance.
- KoParagLayout tqlayout;
- KoParagLayout::loadOasisParagLayout( tqlayout, context );
+ KoParagLayout layout;
+ KoParagLayout::loadOasisParagLayout( layout, context );
// loadOasisParagLayout doesn't load the counter. It's modelled differently for parags and for styles.
int level = 0;
@@ -172,15 +172,15 @@ void KoParagStyle::loadStyle( TQDomElement & styleElem, KoOasisContext& context
const TQDomElement listStyle = context.listStyleStack().currentListStyle();
// The tag is either text:list-level-style-number or text:list-level-style-bullet
const bool ordered = listStyle.localName() == "list-level-style-number";
- Q_ASSERT( !tqlayout.counter );
- tqlayout.counter = new KoParagCounter;
- tqlayout.counter->loadOasis( context, -1, ordered, m_bOutline, level, true );
+ Q_ASSERT( !layout.counter );
+ layout.counter = new KoParagCounter;
+ layout.counter->loadOasis( context, -1, ordered, m_bOutline, level, true );
context.listStyleStack().pop();
}
// This way, KoTextParag::setParagLayout also sets the style pointer, to this style
- tqlayout.style = this;
- m_paragLayout = tqlayout;
+ layout.style = this;
+ m_paragLayout = layout;
m_format.load( context );
@@ -269,9 +269,9 @@ void KoParagStyle::propagateChanges( int paragLayoutFlag, int /*formatFlag*/ )
#if 0
if ( paragLayoutFlag == KoParagLayout::All )
{
- setDirection( static_cast<TQChar::Direction>(tqlayout.direction) );
+ setDirection( static_cast<TQChar::Direction>(layout.direction) );
// Don't call applyStyle from here, it would overwrite any paragraph-specific settings
- setStyle( tqlayout.style );
+ setStyle( layout.style );
}
#endif
// TODO a flag for the "is outline" bool? Otherwise we have no way to inherit
diff --git a/lib/kotext/KoParagStyle.h b/lib/kotext/KoParagStyle.h
index 190ad345..0e396b64 100644
--- a/lib/kotext/KoParagStyle.h
+++ b/lib/kotext/KoParagStyle.h
@@ -49,7 +49,7 @@ protected:
/**
* A paragraph style is a combination of a character style
- * and paragraph-tqlayout attributes, all grouped under a name.
+ * and paragraph-layout attributes, all grouped under a name.
*/
class KOTEXT_EXPORT KoParagStyle : public KoCharStyle
{
@@ -71,10 +71,10 @@ public:
KoParagStyle *followingStyle() const { return m_followingStyle; }
void setFollowingStyle( KoParagStyle *fst );
- /// Saves the name, tqlayout, the following style and the outline bool. Not the format.
+ /// Saves the name, layout, the following style and the outline bool. Not the format.
/// @deprecated (1.3 format)
void saveStyle( TQDomElement & parentElem );
- /// Loads the name, tqlayout and the outline bool. Not the "following style" nor the format.
+ /// Loads the name, layout and the outline bool. Not the "following style" nor the format.
/// (1.3 format)
void loadStyle( TQDomElement & parentElem, int docVersion = 2 );
diff --git a/lib/kotext/KoRichText.cpp b/lib/kotext/KoRichText.cpp
index addbd574..d9d6c1df 100644
--- a/lib/kotext/KoRichText.cpp
+++ b/lib/kotext/KoRichText.cpp
@@ -1332,7 +1332,7 @@ TQString KoTextString::toString( const TQMemArray<KoTextStringChar> &data )
int l = data.size();
s.setUnicode( 0, l );
KoTextStringChar *c = data.data();
- TQChar *uc = (TQChar *)s.tqunicode();
+ TQChar *uc = (TQChar *)s.unicode();
while ( l-- ) {
*uc = c->c;
uc++;
@@ -1348,7 +1348,7 @@ TQString KoTextString::toReverseString() const
int l = length();
s.setUnicode(0, l);
KoTextStringChar *c = data.data() + (l-1);
- TQChar *uc = (TQChar *)s.tqunicode();
+ TQChar *uc = (TQChar *)s.unicode();
while ( l-- ) {
*uc = c->c;
uc++;
@@ -1505,7 +1505,7 @@ KoTextParagLineStart *KoTextFormatterBase::bidiReorderLine( KoTextParag * /*para
str.setUnicode( 0, last - start + 1 );
// fill string with logically ordered chars.
KoTextStringChar *ch = startChar;
- TQChar *qch = (TQChar *)str.tqunicode();
+ TQChar *qch = (TQChar *)str.unicode();
while ( ch <= lastChar ) {
*qch = ch->c;
qch++;
@@ -1562,7 +1562,7 @@ KoTextParagLineStart *KoTextFormatterBase::bidiReorderLine( KoTextParag * /*para
c->rightToLeft = TRUE;
c->startOfRun = FALSE;
int ww = 0;
- if ( c->c.tqunicode() >= 32 || c->c == '\t' || c->c == '\n' || c->isCustom() ) {
+ if ( c->c.unicode() >= 32 || c->c == '\t' || c->c == '\n' || c->isCustom() ) {
ww = c->width;
} else {
ww = c->format()->width( ' ' );
@@ -1589,7 +1589,7 @@ KoTextParagLineStart *KoTextFormatterBase::bidiReorderLine( KoTextParag * /*para
c->rightToLeft = FALSE;
c->startOfRun = FALSE;
int ww = 0;
- if ( c->c.tqunicode() >= 32 || c->c == '\t' || c->isCustom() ) {
+ if ( c->c.unicode() >= 32 || c->c == '\t' || c->isCustom() ) {
ww = c->width;
} else {
ww = c->format()->width( ' ' );
diff --git a/lib/kotext/KoRichText.h b/lib/kotext/KoRichText.h
index f3cf9746..35bb8bd7 100644
--- a/lib/kotext/KoRichText.h
+++ b/lib/kotext/KoRichText.h
@@ -93,7 +93,7 @@ public:
// this is the same struct as in qtextengine_p.h. Don't change!
uchar softBreak :1; // Potential linebreak point
- uchar whiteSpace :1; // A tqunicode whitespace character, except NBSP, ZWNBSP
+ uchar whiteSpace :1; // A unicode whitespace character, except NBSP, ZWNBSP
uchar charStop :1; // Valid cursor position (for left/right arrow)
uchar wordStop :1; // Valid cursor position (for ctrl + left/right arrow) (TODO: use)
//uchar nobreak :1;
@@ -564,12 +564,12 @@ public:
TQString richText() const;
- int minimumWidth() const { return tqlayout ? tqlayout->minimumSize().width() : 0; }
- int widthHint() const { return ( tqlayout ? tqlayout->sizeHint().width() : 0 ) + 2 * outerborder; }
+ int minimumWidth() const { return layout ? layout->minimumSize().width() : 0; }
+ int widthHint() const { return ( layout ? layout->sizeHint().width() : 0 ) + 2 * outerborder; }
TQPtrList<KoTextTableCell> tableCells() const { return cells; }
- TQRect geometry() const { return tqlayout ? tqlayout->geometry() : TQRect(); }
+ TQRect geometry() const { return layout ? layout->geometry() : TQRect(); }
bool isStretching() const { return stretch; }
private:
@@ -577,7 +577,7 @@ private:
void addCell( KoTextTableCell* cell );
private:
- TQGridLayout* tqlayout;
+ TQGridLayout* layout;
TQPtrList<KoTextTableCell> cells;
TQPainter* painter;
int cachewidth;
diff --git a/lib/kotext/KoSearchDia.cpp b/lib/kotext/KoSearchDia.cpp
index 8aaab47b..b022eb72 100644
--- a/lib/kotext/KoSearchDia.cpp
+++ b/lib/kotext/KoSearchDia.cpp
@@ -605,25 +605,25 @@ KoFormatDia::KoFormatDia( TQWidget* parent, const TQString & _caption, KoSearchC
TQButtonGroup *grpBold = new TQButtonGroup( 1, Qt::Vertical, page );
grpBold->setRadioButtonExclusive( TRUE );
- grpBold->tqlayout();
+ grpBold->layout();
m_boldYes=new TQRadioButton( i18n("Yes"), grpBold );
m_boldNo=new TQRadioButton( i18n("No"), grpBold );
TQButtonGroup *grpItalic = new TQButtonGroup( 1, Qt::Vertical, page );
grpItalic->setRadioButtonExclusive( TRUE );
- grpItalic->tqlayout();
+ grpItalic->layout();
m_italicYes=new TQRadioButton( i18n("Yes"), grpItalic );
m_italicNo=new TQRadioButton( i18n("No"), grpItalic );
TQButtonGroup *grpShadow = new TQButtonGroup( 1, Qt::Vertical, page );
grpShadow->setRadioButtonExclusive( TRUE );
- grpShadow->tqlayout();
+ grpShadow->layout();
m_shadowYes=new TQRadioButton( i18n("Yes"), grpShadow );
m_shadowNo=new TQRadioButton( i18n("No"), grpShadow );
TQButtonGroup *grpWordByWord = new TQButtonGroup( 1, Qt::Vertical, page );
grpWordByWord->setRadioButtonExclusive( TRUE );
- grpWordByWord->tqlayout();
+ grpWordByWord->layout();
m_wordByWordYes=new TQRadioButton( i18n("Yes"), grpWordByWord );
m_wordByWordNo=new TQRadioButton( i18n("No"), grpWordByWord );
diff --git a/lib/kotext/KoStyleManager.cpp b/lib/kotext/KoStyleManager.cpp
index 2c759282..5a99c38b 100644
--- a/lib/kotext/KoStyleManager.cpp
+++ b/lib/kotext/KoStyleManager.cpp
@@ -86,7 +86,7 @@ KoStyleManager::KoStyleManager( TQWidget *_parent, KoUnit::Unit unit,
newTab = new KoStyleParagTab( m_tabs );
KoParagLayoutWidget *decorations = new KoParagDecorationWidget( newTab );
- decorations->tqlayout()->setMargin(KDialog::marginHint());
+ decorations->layout()->setMargin(KDialog::marginHint());
newTab->setWidget( decorations );
addTab( newTab );
@@ -122,7 +122,7 @@ void KoStyleManager::addTab( KoStyleManagerTab * tab )
{
m_tabsList.append( tab );
m_tabs->insertTab( tab, tab->tabName() );
- tab->tqlayout()->activate();
+ tab->layout()->activate();
}
void KoStyleManager::setupWidget(const KoStyleCollection& styleCollection)
diff --git a/lib/kotext/KoStyleManager.h b/lib/kotext/KoStyleManager.h
index 84c75349..b562e1f6 100644
--- a/lib/kotext/KoStyleManager.h
+++ b/lib/kotext/KoStyleManager.h
@@ -137,7 +137,7 @@ protected:
KoParagStyle *m_style;
};
-// A tab to edit parts of the parag-tqlayout of the style
+// A tab to edit parts of the parag-layout of the style
// Acts as a wrapper around KoParagLayoutWidget [which doesn't know about styles].
class KOTEXT_EXPORT KoStyleParagTab : public KoStyleManagerTab
{
diff --git a/lib/kotext/KoTextCommand.cpp b/lib/kotext/KoTextCommand.cpp
index 1b0f1076..875c1e71 100644
--- a/lib/kotext/KoTextCommand.cpp
+++ b/lib/kotext/KoTextCommand.cpp
@@ -96,7 +96,7 @@ KoTextCursor * KoTextDeleteCommand::unexecute( KoTextCursor *c )
while ( p ) {
if ( lit != m_oldParagLayouts.end() )
{
- kdDebug(32500) << "KoTextDeleteCommand::unexecute applying paragtqlayout to parag " << p->paragId() << endl;
+ kdDebug(32500) << "KoTextDeleteCommand::unexecute applying paraglayout to parag " << p->paragId() << endl;
p->setParagLayout( *lit );
}
else
diff --git a/lib/kotext/KoTextDocument.cpp b/lib/kotext/KoTextDocument.cpp
index fe20b049..35adf814 100644
--- a/lib/kotext/KoTextDocument.cpp
+++ b/lib/kotext/KoTextDocument.cpp
@@ -729,7 +729,7 @@ void KoTextDocument::setFormat( int id, const KoTextFormat *f, int flags )
if ( !hasSelection( id ) )
return;
- TQApplication::tqclipboard()->setText( selectedText( id ) );
+ TQApplication::clipboard()->setText( selectedText( id ) );
#endif
}*/
@@ -1217,7 +1217,7 @@ void KoTextDocument::drawWithoutDoubleBuffer( TQPainter *p, const TQRect &cr, co
TQRect pr( parag->pixelRect( zoomHandler ) );
pr.setLeft( 0 );
pr.setWidth( TQWIDGETSIZE_MAX );
- // The cliprect is checked in tqlayout units, in KoTextParag::paint
+ // The cliprect is checked in layout units, in KoTextParag::paint
TQRect crect_lu( parag->rect() );
if ( !cr.isNull() && !cr.intersects( pr ) ) {
@@ -1350,7 +1350,7 @@ void KoTextDocument::drawParagWYSIWYG( TQPainter *p, KoTextParag *parag, int cx,
#endif
//painter->setBrushOrigin( painter->brushOrigin() + rect.topLeft() - ir.topLeft() );
- // The cliprect is checked in tqlayout units, in KoTextParag::paint
+ // The cliprect is checked in layout units, in KoTextParag::paint
TQRect crect_lu( zoomHandler->pixelToLayoutUnit( crect ) );
#ifdef DEBUG_PAINTING
kdDebug(32500) << "KoTextDocument::drawParagWYSIWYG crect_lu=" << crect_lu << endl;
diff --git a/lib/kotext/KoTextFormat.cpp b/lib/kotext/KoTextFormat.cpp
index 9b8e8869..2554d4ee 100644
--- a/lib/kotext/KoTextFormat.cpp
+++ b/lib/kotext/KoTextFormat.cpp
@@ -1179,8 +1179,8 @@ TQFont KoTextFormat::smallCapsFont( const KoTextZoomHandler* zh, bool applyZoom
int KoTextFormat::charWidth( const KoTextZoomHandler* zh, bool applyZoom, const KoTextStringChar* c,
const KoTextParag* parag, int i ) const
{
- ushort tqunicode = c->c.tqunicode();
- if ( !c->charStop || tqunicode == 0xad || tqunicode == 0x2028 )
+ ushort unicode = c->c.unicode();
+ if ( !c->charStop || unicode == 0xad || unicode == 0x2028 )
return 0;
Q_ASSERT( !c->isCustom() ); // actually it's a bit stupid to call this for custom items
if( c->isCustom() ) {
@@ -1209,13 +1209,13 @@ int KoTextFormat::charWidth( const KoTextZoomHandler* zh, bool applyZoom, const
pixelww = this->screenFontMetrics( zh ).width( displayedChar( c->c ) );
} else {
// Use the m_screenWidths[] array when possible, even faster
- Q_ASSERT( tqunicode < 256 );
- pixelww = d->m_screenWidths[ tqunicode ];
+ Q_ASSERT( unicode < 256 );
+ pixelww = d->m_screenWidths[ unicode ];
// Not in cache yet -> calculate
if ( pixelww == 0 ) {
pixelww = this->screenFontMetrics( zh ).width( displayedChar( c->c ) );
Q_ASSERT( pixelww < 65535 );
- d->m_screenWidths[ tqunicode ] = pixelww;
+ d->m_screenWidths[ unicode ] = pixelww;
}
}
}
@@ -1319,7 +1319,7 @@ TQString KoTextFormat::displayedString( const TQString& str )const
TQChar KoTextFormat::displayedChar( TQChar c )const
{
- if ( c.tqunicode() == 0xa0 ) // nbsp
+ if ( c.unicode() == 0xa0 ) // nbsp
return ' ';
switch ( m_attributeFont ) {
case ATT_NONE:
diff --git a/lib/kotext/KoTextFormat.h b/lib/kotext/KoTextFormat.h
index 0e7c1a13..4c155b91 100644
--- a/lib/kotext/KoTextFormat.h
+++ b/lib/kotext/KoTextFormat.h
@@ -75,7 +75,7 @@ public:
// caching for speedup when formatting
TQFont* m_screenFont; // font to be used when painting (zoom-dependent)
TQFontMetrics* m_screenFontMetrics; // font metrics on screen (zoom-dependent)
- TQFont* m_refFont; // font to be used when formatting text for tqlayout units
+ TQFont* m_refFont; // font to be used when formatting text for layout units
TQFontMetrics* m_refFontMetrics; // font metrics for m_refFontMetrics
int m_refAscent;
int m_refDescent;
@@ -308,7 +308,7 @@ public:
/**
* @return the reference font, i.e. with the size specified by the user.
- * This is used at text tqlayout time (e.g. kotextformatter)
+ * This is used at text layout time (e.g. kotextformatter)
*/
TQFont refFont() const;
diff --git a/lib/kotext/KoTextFormatter.cpp b/lib/kotext/KoTextFormatter.cpp
index d978ba43..552bcf27 100644
--- a/lib/kotext/KoTextFormatter.cpp
+++ b/lib/kotext/KoTextFormatter.cpp
@@ -196,7 +196,7 @@ bool KoTextFormatterCore::format()
// but with counters/margins this might be different). This is why
// we call determineCharWidth() again from within the loop.
TQPair<int, int> widths = determineCharWidth();
- int ww = widths.first; // width in tqlayout units
+ int ww = widths.first; // width in layout units
#ifndef REF_IS_LU
int pixelww = widths.second; // width in pixels
#endif
@@ -516,11 +516,11 @@ bool KoTextFormatterCore::format()
spaceAfterLine -= c->width;
//else
- if ( c->c.tqunicode() == 0xad || hyphenated ) // soft hyphen or hyphenation
+ if ( c->c.unicode() == 0xad || hyphenated ) // soft hyphen or hyphenation
{
// Recalculate its width, the hyphen will appear finally (important for the parag rect)
int width = KoTextZoomHandler::ptToLayoutUnitPt( c->format()->refFontMetrics().width( TQChar(0xad) ) );
- if ( c->c.tqunicode() == 0xad )
+ if ( c->c.unicode() == 0xad )
c->width = width;
spaceAfterLine -= width;
}
@@ -934,7 +934,7 @@ KoTextParagLineStart *KoTextFormatterCore::koBidiReorderLine(
str.setUnicode( 0, last - start + 1 );
// fill string with logically ordered chars.
KoTextStringChar *ch = startChar;
- TQChar *qch = (TQChar *)str.tqunicode();
+ TQChar *qch = (TQChar *)str.unicode();
while ( ch <= lastChar ) {
*qch = ch->c;
qch++;
diff --git a/lib/kotext/KoTextObject.cpp b/lib/kotext/KoTextObject.cpp
index 06394275..afd18909 100644
--- a/lib/kotext/KoTextObject.cpp
+++ b/lib/kotext/KoTextObject.cpp
@@ -564,7 +564,7 @@ void KoTextObject::doKeyboardAction( KoTextCursor * cursor, KoTextFormat * & /*c
undoRedoInfo.oldParagLayouts << parag->paragLayout();
}
if ( cursor->atParagEnd() ) {
- // Get paragtqlayout from next parag (next can't be 0 here)
+ // Get paraglayout from next parag (next can't be 0 here)
KoParagLayout paragLayout = parag->next()->paragLayout();
if ( cursor->remove() )
{
diff --git a/lib/kotext/KoTextObject.h b/lib/kotext/KoTextObject.h
index 90693bed..7970a323 100644
--- a/lib/kotext/KoTextObject.h
+++ b/lib/kotext/KoTextObject.h
@@ -64,11 +64,11 @@ public:
*/
virtual KCommand *setFormatCommand( const KoTextFormat *format, int flags, bool zoomFont = false ) = 0;
- /** Interface for accessing the current parag tqlayout */
+ /** Interface for accessing the current parag layout */
virtual const KoParagLayout * currentParagLayoutFormat() const = 0;
- /** Interface for changing the paragraph tqlayout.
- * @param newLayout pointer to the new tqlayout to apply
+ /** Interface for changing the paragraph layout.
+ * @param newLayout pointer to the new layout to apply
* @param flags one of the KoParagLayout flags
* @param marginIndex type of margin. Only used if flags==KoParagLayout::Margins
*/
@@ -345,7 +345,7 @@ public:
* @param cursor the current cursor; used if there is no selection. Can be 0L if there is one.
* @param style the KoParagStyle to apply
* @param selectionId the id of the selection, usually Standard or Temp
- * @param paragLayoutFlags which settings from the paragraph tqlayout to apply
+ * @param paragLayoutFlags which settings from the paragraph layout to apply
* @param formatFlags which settings from the text format to apply
* @param createUndoRedo if true, an undo/redo command will be created and emitted
* @param interactive if true, the text will be reformatted/repainted to show the new style
@@ -429,7 +429,7 @@ public:
/**
* Abort the current formatMore() loop, or prevent the next one from starting.
* Use with care. This is e.g. for KWFootNoteVariable, so that it can do
- * a frame tqlayout before formatting the main text again.
+ * a frame layout before formatting the main text again.
* It is important to make sure that formatMore will be called again ;)
*/
void abortFormatting();
diff --git a/lib/kotext/KoTextParag.cpp b/lib/kotext/KoTextParag.cpp
index aba58abc..cc1aecb9 100644
--- a/lib/kotext/KoTextParag.cpp
+++ b/lib/kotext/KoTextParag.cpp
@@ -1296,7 +1296,7 @@ int KoTextParag::rightMargin() const
return zh->ptToLayoutUnitPixX(
m_layout.margins[ TQStyleSheetItem::MarginRight ]
+ m_layout.rightBorder.width() )
- + cw; /* in tqlayout units already */
+ + cw; /* in layout units already */
}
int KoTextParag::firstLineMargin() const
@@ -1597,7 +1597,7 @@ void KoTextParag::paintLines( TQPainter &painter, const TQColorGroup &cg, KoText
// we flush before and after tabs
flush = flush || ( chr->c == '\t' || nextchr->c == '\t' );
// we flush on soft hypens
- flush = flush || ( chr->c.tqunicode() == 0xad );
+ flush = flush || ( chr->c.unicode() == 0xad );
// we flush on custom items
flush = flush || chr->isCustom();
// we flush before custom items
@@ -1847,7 +1847,7 @@ void KoTextParag::drawParagStringInternal( TQPainter &painter, const TQString &s
// 3) Paint
TQString str( s );
- if ( str[ (int)str.length() - 1 ].tqunicode() == 0xad )
+ if ( str[ (int)str.length() - 1 ].unicode() == 0xad )
str.remove( str.length() - 1, 1 );
painter.setPen( TQPen( textColor ) );
painter.setFont( font );
@@ -1877,7 +1877,7 @@ void KoTextParag::drawParagStringInternal( TQPainter &painter, const TQString &s
}
KoTextParag::drawFontEffects( &painter, format, zh, font, textColor, startX, baseLine, bw, lastY, h, str[start] );
- if ( str[ start ] != '\t' && str[ start ].tqunicode() != 0xad ) {
+ if ( str[ start ] != '\t' && str[ start ].unicode() != 0xad ) {
str = format->displayedString( str ); // #### This converts the whole string, instead of from start to start+len!
if ( format->vAlign() == KoTextFormat::AlignNormal ) {
int posY = lastY + baseLine;
@@ -1965,7 +1965,7 @@ void KoTextParag::drawParagStringInternal( TQPainter &painter, const TQString &s
#ifdef DEBUG_PAINT
//kdDebug(32500) << "we are drawing the end of line " << line << ". Auto-hyphenated: " << lineHyphenated( line ) << endl;
#endif
- bool drawHyphen = at( start+len-1 )->c.tqunicode() == 0xad;
+ bool drawHyphen = at( start+len-1 )->c.unicode() == 0xad;
drawHyphen = drawHyphen || lineHyphenated( line );
if ( drawHyphen ) {
#ifdef DEBUG_PAINT
@@ -2059,7 +2059,7 @@ void KoTextParag::copyParagData( KoTextParag *parag )
//else
// kdWarning() << "Paragraph has no style " << paragId() << endl;
- // No "following style" setting, or same style -> copy tqlayout & format of previous paragraph
+ // No "following style" setting, or same style -> copy layout & format of previous paragraph
if (!styleApplied)
{
setParagLayout( parag->paragLayout() );
@@ -2082,7 +2082,7 @@ void KoTextParag::copyParagData( KoTextParag *parag )
// Note: we don't call the original KoTextParag::copyParagData on purpose.
// We don't want setListStyle to get called - it ruins our stylesheetitems
// And we don't care about copying the stylesheetitems directly,
- // applying the parag tqlayout will create them
+ // applying the parag layout will create them
}
void KoTextParag::setTabList( const KoTabulatorList &tabList )
@@ -2240,43 +2240,43 @@ void KoTextParag::applyStyle( KoParagStyle *style )
setFormat( newFormat );
}
-void KoTextParag::setParagLayout( const KoParagLayout & tqlayout, int flags, int marginIndex )
+void KoTextParag::setParagLayout( const KoParagLayout & layout, int flags, int marginIndex )
{
//kdDebug(32500) << "KoTextParag::setParagLayout flags=" << flags << endl;
if ( flags & KoParagLayout::Alignment )
- setAlign( tqlayout.alignment );
+ setAlign( layout.alignment );
if ( flags & KoParagLayout::Margins ) {
if ( marginIndex == -1 )
- setMargins( tqlayout.margins );
+ setMargins( layout.margins );
else
- setMargin( (TQStyleSheetItem::Margin)marginIndex, tqlayout.margins[marginIndex] );
+ setMargin( (TQStyleSheetItem::Margin)marginIndex, layout.margins[marginIndex] );
}
if ( flags & KoParagLayout::LineSpacing )
{
- setLineSpacingType( tqlayout.lineSpacingType );
- setLineSpacing( tqlayout.lineSpacingValue() );
+ setLineSpacingType( layout.lineSpacingType );
+ setLineSpacing( layout.lineSpacingValue() );
}
if ( flags & KoParagLayout::Borders )
{
- setLeftBorder( tqlayout.leftBorder );
- setRightBorder( tqlayout.rightBorder );
- setTopBorder( tqlayout.topBorder );
- setBottomBorder( tqlayout.bottomBorder );
- setJoinBorder( tqlayout.joinBorder );
+ setLeftBorder( layout.leftBorder );
+ setRightBorder( layout.rightBorder );
+ setTopBorder( layout.topBorder );
+ setBottomBorder( layout.bottomBorder );
+ setJoinBorder( layout.joinBorder );
}
if ( flags & KoParagLayout::BackgroundColor )
{
- setBackgroundColor( tqlayout.backgroundColor );
+ setBackgroundColor( layout.backgroundColor );
}
if ( flags & KoParagLayout::BulletNumber )
- setCounter( tqlayout.counter );
+ setCounter( layout.counter );
if ( flags & KoParagLayout::Tabulator )
- setTabList( tqlayout.tabList() );
+ setTabList( layout.tabList() );
if ( flags == KoParagLayout::All )
{
- setDirection( static_cast<TQChar::Direction>(tqlayout.direction) );
+ setDirection( static_cast<TQChar::Direction>(layout.direction) );
// Don't call applyStyle from here, it would overwrite any paragraph-specific settings
- setStyle( tqlayout.style );
+ setStyle( layout.style );
}
}
@@ -2421,7 +2421,7 @@ void KoTextParag::printRTDebug( int info )
attrs.truncate( attrs.length() - 1 );
kdDebug(32500) << i << ": '" << TQString(ch.c).rightJustify(2)
- << "' (" << TQString::number( ch.c.tqunicode() ).rightJustify(3) << ")"
+ << "' (" << TQString::number( ch.c.unicode() ).rightJustify(3) << ")"
<< " x(LU)=" << ch.x
<< " w(LU)=" << ch.width//s->width(i)
<< " x(PIX)=" << pixelx
@@ -2849,7 +2849,7 @@ void KoTextParag::loadOasisSpan( const TQDomElement& parent, KoOasisContext& con
KoParagLayout KoTextParag::loadParagLayout( KoOasisContext& context, KoStyleCollection *styleCollection, bool findStyle )
{
- KoParagLayout tqlayout;
+ KoParagLayout layout;
// Only when loading paragraphs, not when loading styles
if ( findStyle )
@@ -2877,17 +2877,17 @@ KoParagLayout KoTextParag::loadParagLayout( KoOasisContext& context, KoStyleColl
style = styleCollection->findStyle( "Standard" );
}
Q_ASSERT(style);
- tqlayout.style = style;
+ layout.style = style;
}
- KoParagLayout::loadOasisParagLayout( tqlayout, context );
+ KoParagLayout::loadOasisParagLayout( layout, context );
- return tqlayout;
+ return layout;
}
void KoTextParag::loadOasis( const TQDomElement& parent, KoOasisContext& context, KoStyleCollection *styleCollection, uint& pos )
{
- // First load tqlayout from style
+ // First load layout from style
KoParagLayout paragLayout = loadParagLayout( context, styleCollection, true );
setParagLayout( paragLayout );
@@ -2915,7 +2915,7 @@ void KoTextParag::saveOasis( KoXmlWriter& writer, KoSavingContext& context,
{
KoGenStyles& mainStyles = context.mainStyles();
- // Write paragtqlayout to styles (with parent == the parag's style)
+ // Write paraglayout to styles (with parent == the parag's style)
TQString parentStyleName;
if ( m_layout.style )
parentStyleName = m_layout.style->name();
@@ -2924,11 +2924,11 @@ void KoTextParag::saveOasis( KoXmlWriter& writer, KoSavingContext& context,
paragFormat()->save( autoStyle, context );
m_layout.saveOasis( autoStyle, context, false );
- // First paragraph is special, it includes page-tqlayout info (for word-processing at least)
+ // First paragraph is special, it includes page-layout info (for word-processing at least)
if ( !prev() ) {
if ( context.variableSettings() )
autoStyle.addProperty( "style:page-number", context.variableSettings()->startingPageNumber() );
- // Well we support only one page tqlayout, so the first parag always points to "Standard".
+ // Well we support only one page layout, so the first parag always points to "Standard".
autoStyle.addAttribute( "style:master-page-name", "Standard" );
}
@@ -3212,7 +3212,7 @@ void KoTextParag::drawFormattingChars( TQPainter &painter, int start, int len,
#endif
if ( ch.isCustom() )
continue;
- if ( (ch.c == ' ' || ch.c.tqunicode() == 0x00a0U)
+ if ( (ch.c == ' ' || ch.c.unicode() == 0x00a0U)
&& (whichFormattingChars & FormattingSpace))
{
// Don't use ch.pixelwidth here. We want a square with
diff --git a/lib/kotext/KoTextParag.h b/lib/kotext/KoTextParag.h
index f42c3285..d8e0c29b 100644
--- a/lib/kotext/KoTextParag.h
+++ b/lib/kotext/KoTextParag.h
@@ -214,7 +214,7 @@ public:
/** Sets all or some parameters from a paragLayout struct.
* @param flags selects which settings to apply, see KoParagLayout's enum. */
- virtual void setParagLayout( const KoParagLayout &tqlayout, int flags = KoParagLayout::All,
+ virtual void setParagLayout( const KoParagLayout &layout, int flags = KoParagLayout::All,
int marginIndex = -1 );
const KoParagLayout & paragLayout() { return m_layout; }
diff --git a/lib/kotext/KoTextView.cpp b/lib/kotext/KoTextView.cpp
index 6211e1d8..9733e123 100644
--- a/lib/kotext/KoTextView.cpp
+++ b/lib/kotext/KoTextView.cpp
@@ -291,7 +291,7 @@ void KoTextView::handleKeyPressEvent( TQKeyEvent * e, TQWidget *widget, const TQ
break;
}
default: {
- //kdDebug(32500) << "KoTextView::keyPressEvent ascii=" << e->ascii() << " text=" << e->text()[0].tqunicode() << " state=" << e->state() << endl;
+ //kdDebug(32500) << "KoTextView::keyPressEvent ascii=" << e->ascii() << " text=" << e->text()[0].unicode() << " state=" << e->state() << endl;
if (e->key() == TQt::Key_Tab)
{
if (doToolTipCompletion(m_cursor, m_cursor->parag(), m_cursor->index() - 1, e->key()) )
@@ -331,7 +331,7 @@ void KoTextView::handleKeyPressEvent( TQKeyEvent * e, TQWidget *widget, const TQ
// Bidi support: need to reverse mirrored chars (e.g. parenthesis)
KoTextParag *p = m_cursor->parag();
if ( p && p->string() && p->string()->isRightToLeft() ) {
- TQChar *c = (TQChar *)text.tqunicode();
+ TQChar *c = (TQChar *)text.unicode();
int l = text.length();
while( l-- ) {
if ( c->mirrored() )
@@ -643,9 +643,9 @@ KoTextCursor KoTextView::selectParagUnderCursor( const KoTextCursor& cursor, int
{
textObject()->selectionChangedNotify();
// Copy the selection.
- TQApplication::tqclipboard()->setSelectionMode( true );
+ TQApplication::clipboard()->setSelectionMode( true );
emit copy();
- TQApplication::tqclipboard()->setSelectionMode( false );
+ TQApplication::clipboard()->setSelectionMode( false );
}
return c2;
}
@@ -808,9 +808,9 @@ void KoTextView::handleMouseReleaseEvent()
textObject()->selectionChangedNotify();
// Copy the selection.
- TQApplication::tqclipboard()->setSelectionMode( true );
+ TQApplication::clipboard()->setSelectionMode( true );
emit copy();
- TQApplication::tqclipboard()->setSelectionMode( false );
+ TQApplication::clipboard()->setSelectionMode( false );
}
inDoubleClick = FALSE;
@@ -831,9 +831,9 @@ void KoTextView::handleMouseDoubleClickEvent( TQMouseEvent*ev, const TQPoint& i
*m_cursor = selectWordUnderCursor( *m_cursor );
textObject()->selectionChangedNotify();
// Copy the selection.
- TQApplication::tqclipboard()->setSelectionMode( true );
+ TQApplication::clipboard()->setSelectionMode( true );
emit copy();
- TQApplication::tqclipboard()->setSelectionMode( false );
+ TQApplication::clipboard()->setSelectionMode( false );
possibleTripleClick=true;
@@ -1450,10 +1450,10 @@ void KoTextView::copyTextOfComment()
{
KURL::List lst;
lst.append( var->note() );
- TQApplication::tqclipboard()->setSelectionMode(true);
- TQApplication::tqclipboard()->setData( new KURLDrag(lst, 0, 0) );
- TQApplication::tqclipboard()->setSelectionMode(false);
- TQApplication::tqclipboard()->setData( new KURLDrag(lst, 0, 0) );
+ TQApplication::clipboard()->setSelectionMode(true);
+ TQApplication::clipboard()->setData( new KURLDrag(lst, 0, 0) );
+ TQApplication::clipboard()->setSelectionMode(false);
+ TQApplication::clipboard()->setData( new KURLDrag(lst, 0, 0) );
}
}
@@ -1476,13 +1476,13 @@ KoParagStyle * KoTextView::createStyleFromSelection(const TQString & name)
if ( textDocument()->hasSelection( KoTextDocument::Standard ) )
cursor = textDocument()->selectionStartCursor( KoTextDocument::Standard );
KoParagStyle * style = new KoParagStyle (name);
- KoParagLayout tqlayout(cursor.parag()->paragLayout());
- tqlayout.style = style;
+ KoParagLayout layout(cursor.parag()->paragLayout());
+ layout.style = style;
style->setFollowingStyle( style );
style->format() = *(cursor.parag()->at(cursor.index())->format());
- style->paragLayout() = tqlayout;
- // Select this new style - hmm only the parag tqlayout, we don't want to erase any text-formatting
+ style->paragLayout() = layout;
+ // Select this new style - hmm only the parag layout, we don't want to erase any text-formatting
cursor.parag()->setParagLayout( style->paragLayout() );
return style;
}
@@ -1515,10 +1515,10 @@ void KoTextView::copyLink()
{
KURL::List lst;
lst.append( var->url() );
- TQApplication::tqclipboard()->setSelectionMode(true);
- TQApplication::tqclipboard()->setData( new KURLDrag(lst, 0, 0) );
- TQApplication::tqclipboard()->setSelectionMode(false);
- TQApplication::tqclipboard()->setData( new KURLDrag(lst, 0, 0) );
+ TQApplication::clipboard()->setSelectionMode(true);
+ TQApplication::clipboard()->setData( new KURLDrag(lst, 0, 0) );
+ TQApplication::clipboard()->setSelectionMode(false);
+ TQApplication::clipboard()->setData( new KURLDrag(lst, 0, 0) );
}
}
diff --git a/lib/kotext/KoTextZoomHandler.h b/lib/kotext/KoTextZoomHandler.h
index f8c2ef12..d1bc6025 100644
--- a/lib/kotext/KoTextZoomHandler.h
+++ b/lib/kotext/KoTextZoomHandler.h
@@ -33,7 +33,7 @@ public:
//// Support for WYSIWYG text layouting /////
- /** The "[zoomed] view pixel" -> "tqlayout unit pixel" conversions. */
+ /** The "[zoomed] view pixel" -> "layout unit pixel" conversions. */
int pixelToLayoutUnitX( int x ) const;
int pixelToLayoutUnitY( int y ) const;
TQPoint pixelToLayoutUnit( const TQPoint &p ) const
@@ -43,7 +43,7 @@ public:
{ return TQRect( pixelToLayoutUnit( r.topLeft() ),
pixelToLayoutUnit( r.bottomRight() ) ); }
- /** The "tqlayout unit pixel" -> "[zoomed] view pixel" conversions. */
+ /** The "layout unit pixel" -> "[zoomed] view pixel" conversions. */
int layoutUnitToPixelX( int lupix ) const;
int layoutUnitToPixelY( int lupix ) const;
@@ -89,26 +89,26 @@ public:
}
/**
- * Given the font size for the font in tqlayout units, in pt (use pointSize())
+ * Given the font size for the font in layout units, in pt (use pointSize())
* this returns the font size to use on screen the current zoom, in pt (use setPointSizeFloat()),
*/
double layoutUnitToFontSize( int luSize, bool /*forPrint*/ ) const;
- // Note: For converting fontsizes from/to tqlayout units and zoom-independent
+ // Note: For converting fontsizes from/to layout units and zoom-independent
// pt sizes (like the one the user sees, e.g. 12pt),
// use ptToLayoutUnit and layoutUnitToPt, not layoutToFontSize.
- // The conversions below convert between an internal text tqlayout resolution of
+ // The conversions below convert between an internal text layout resolution of
// ~1440 DPI (by default) and the point-size for the fonts (those known by the user).
// Those conversions don't depend on the zoom level.
/** Change the factor that converts between pointsizes
- * and tqlayout units (by default 20 - for 1440 DPI at 72 DPI) */
+ * and layout units (by default 20 - for 1440 DPI at 72 DPI) */
static void setPtToLayoutUnitFactor( int factor ) { m_layoutUnitFactor = factor; }
/** Not zoom dependent. Simply convert a pt value (e.g. a frame)
- * to high-resolution tqlayout unit coordinates (in pt). */
+ * to high-resolution layout unit coordinates (in pt). */
static double ptToLayoutUnitPt( double pt )
{ return pt * static_cast<double>( m_layoutUnitFactor ); }
/** Same thing for integer values, e.g. a font size in pt */
diff --git a/lib/kotext/KoVariable.cpp b/lib/kotext/KoVariable.cpp
index 70eab87e..489752f0 100644
--- a/lib/kotext/KoVariable.cpp
+++ b/lib/kotext/KoVariable.cpp
@@ -123,7 +123,7 @@ void KoVariableSettings::saveOasis( KoXmlWriter &settingsWriter ) const
settingsWriter.addConfigItem( "displayfieldcode", m_displayFieldCode);
// m_startingPageNumber isn't saved to OASIS. Applications must use either
// style:page-number in the first parag of a page (see KoTextParag), or
- // style:first-page-number in style:page-tqlayout, for spreadsheets etc.
+ // style:first-page-number in style:page-layout, for spreadsheets etc.
if ( d->m_lastPrintingDate.isValid())
settingsWriter.addConfigItem("lastPrintingDate", d->m_lastPrintingDate.toString(Qt::ISODate));
@@ -978,7 +978,7 @@ void KoVariable::drawCustomItemHelper( TQPainter* p, int x, int y, int wpix, int
//p->drawText( x, posY, str );
// We can't just drawText, it wouldn't use the same kerning as the one
// that resize() planned for [which is zoom-independent].
- // We need to do the tqlayout using tqlayout units instead, so for simplicity
+ // We need to do the layout using layout units instead, so for simplicity
// I just draw every char individually (whereas KoTextFormatter/KoTextParag
// detect runs of text that can be drawn together)
const int len = str.length();
@@ -988,9 +988,9 @@ void KoVariable::drawCustomItemHelper( TQPainter* p, int x, int y, int wpix, int
{
const TQChar ch = str[i];
p->drawText( x, posY, TQString(ch) );
- // Do like KoTextFormatter: do the tqlayout in tqlayout units.
+ // Do like KoTextFormatter: do the layout in layout units.
xLU += KoTextZoomHandler::ptToLayoutUnitPt( fm.width( ch ) );
- // And then compute the X position in pixels from the tqlayout unit X.
+ // And then compute the X position in pixels from the layout unit X.
x = zh->layoutUnitToPixelX( xLU );
}
diff --git a/lib/kotext/kolayouttabbase.ui b/lib/kotext/kolayouttabbase.ui
index e7e03d58..646bc795 100644
--- a/lib/kotext/kolayouttabbase.ui
+++ b/lib/kotext/kolayouttabbase.ui
@@ -40,7 +40,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
- <cstring>tqlayout3</cstring>
+ <cstring>layout3</cstring>
</property>
<vbox>
<property name="name">
@@ -103,7 +103,7 @@
</spacer>
<widget class="TQLayoutWidget">
<property name="name">
- <cstring>tqlayout2</cstring>
+ <cstring>layout2</cstring>
</property>
<grid>
<property name="name">
diff --git a/lib/kotext/timedateformatwidget.ui b/lib/kotext/timedateformatwidget.ui
index 77a261ea..ded1c906 100644
--- a/lib/kotext/timedateformatwidget.ui
+++ b/lib/kotext/timedateformatwidget.ui
@@ -38,7 +38,7 @@
</property>
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>tqlayout7</cstring>
+ <cstring>layout7</cstring>
</property>
<vbox>
<property name="name">
@@ -59,7 +59,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
- <cstring>tqlayout5</cstring>
+ <cstring>layout5</cstring>
</property>
<hbox>
<property name="name">
@@ -113,7 +113,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
- <cstring>tqlayout4</cstring>
+ <cstring>layout4</cstring>
</property>
<hbox>
<property name="name">