[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    [PATCH] : Bug 76757. Windows too big in 800x600 in KWord
From:       p.stirnweiss_koffice () bluewin ! ch
Date:       2004-07-30 12:32:28
Message-ID: 40F7A9ED0005A3B3 () mssbzhb-int ! msg ! bluewin ! ch
[Download RAW message or body]

Hello,

These are the last two patches for this bug.

The page layout one has basicelly gotten rid of the sliders in the page margin.
I have also removed the titles and positioned the spin box according to what
they affect (left on the left, top on top...). I have also changed the steps
from 1 by 1 to 0.2 by 0.2 to minimize the impact of the disparition of the
slider.

The paragraph layout one has moved the end of frame behaviour from the indent
and spacing tab to the alignement tab and renamed it to general layout.

With these two patches, all the windows in KWord now fit perfectly in 800x600
(with Plastik theme). The bug for KWord can then be closed.
I will be away for a week and will have a look at the other apps in KOffice
at my return. If you come accross a window that is too big in 800x600 (or
that you suspect being too big) please post on the list.

Pierre


["bug76757_page_layout.diff" (text/x-diff)]

Index: kofficeui/koPageLayoutDia.cc
===================================================================
RCS file: /home/kdecvs/kde/koffice/lib/kofficeui/koPageLayoutDia.cc,v
retrieving revision 1.85
diff -u -3 -p -u -p -r1.85 koPageLayoutDia.cc
--- kofficeui/koPageLayoutDia.cc	22 Jul 2004 23:47:57 -0000	1.85
+++ kofficeui/koPageLayoutDia.cc	30 Jul 2004 12:12:02 -0000
@@ -358,19 +358,23 @@ void KoPageLayoutDia::setupTab1()
     // --------------- orientation ---------------
     QButtonGroup *orientFrame = new QButtonGroup( i18n( "Orientation" ), tab1 );
     grid1->addWidget( orientFrame, 2, 0 );
-    QLayout *orientLayout = new QGridLayout( orientFrame, 2, 2,
+    QGridLayout *orientLayout = new QGridLayout( orientFrame, 1, 4,
        2*KDialog::marginHint(), KDialog::spacingHint() );
-    orientLayout->setAutoAdd( true );
 
     QLabel* lbPortrait = new QLabel( orientFrame );
     lbPortrait->setPixmap( QPixmap( UserIcon( "koPortrait" ) ) );
     lbPortrait->setMaximumWidth( lbPortrait->pixmap()->width() );
+    orientLayout->addWidget(lbPortrait, 0, 0);
     rbPortrait = new QRadioButton( i18n("&Portrait"), orientFrame );
+    orientLayout->addWidget(rbPortrait, 0, 1);
 
     QLabel* lbLandscape = new QLabel( orientFrame );
     lbLandscape->setPixmap( QPixmap( UserIcon( "koLandscape" ) ) );
     lbLandscape->setMaximumWidth( lbLandscape->pixmap()->width() );
+    orientLayout->addWidget(lbLandscape, 0, 2);
     rbLandscape = new QRadioButton( i18n("La&ndscape"), orientFrame );
+    orientLayout->addWidget(rbLandscape, 0, 3);
 
 
     connect( rbPortrait, SIGNAL( clicked() ), this, SLOT( orientationChanged() ) );
@@ -379,47 +383,47 @@ void KoPageLayoutDia::setupTab1()
     // --------------- page margins ---------------
     QButtonGroup *marginsFrame = new QButtonGroup( i18n( "Margins" ), tab1 );
     grid1->addWidget( marginsFrame, 3, 0 );
-    QGridLayout *marginsLayout = new QGridLayout( marginsFrame, 4, 2,
+    QGridLayout *marginsLayout = new QGridLayout( marginsFrame, 3, 3,
        2*KDialog::marginHint(), KDialog::spacingHint() );
-    marginsLayout->setColStretch( 1, 1 );
 
     // left margin
-    QLabel* lbLeft = new QLabel( i18n( "&Left:" ), marginsFrame );
-    marginsLayout->addWidget( lbLeft,
-       0, 0, Qt::AlignRight | Qt::AlignVCenter );
     ebrLeft = new KDoubleNumInput( marginsFrame, "Left" );
-    lbLeft->setBuddy( ebrLeft );
-    marginsLayout->addWidget( ebrLeft, 0, 1 );
+    marginsLayout->addWidget( ebrLeft, 1, 0 );
     connect( ebrLeft, SIGNAL( valueChanged( double ) ), this, SLOT( leftChanged() ) );
     if ( !enableBorders ) ebrLeft->setEnabled( false );
 
     // right margin
-    QLabel* lbRight = new QLabel( i18n( "&Right:" ), marginsFrame );
-    marginsLayout->addWidget( lbRight,
-       1, 0, Qt::AlignRight | Qt::AlignVCenter );
     ebrRight = new KDoubleNumInput( marginsFrame, "Right" );
-    lbRight->setBuddy( ebrRight );
-    marginsLayout->addWidget( ebrRight, 1, 1 );
+    marginsLayout->addWidget( ebrRight, 1, 2 );
     connect( ebrRight, SIGNAL( valueChanged( double ) ), this, SLOT( rightChanged() ) );
     if ( !enableBorders ) ebrRight->setEnabled( false );
 
     // top margin
-    QLabel* lbTop = new QLabel( i18n( "&Top:" ), marginsFrame );
-    marginsLayout->addWidget( lbTop,
-       2, 0, Qt::AlignRight | Qt::AlignVCenter );
     ebrTop = new KDoubleNumInput( marginsFrame, "Top" );
-    lbTop->setBuddy( ebrTop );
-    marginsLayout->addWidget( ebrTop, 2, 1 );
+    marginsLayout->addWidget( ebrTop, 0, 1 , Qt::AlignCenter );
     connect( ebrTop, SIGNAL( valueChanged( double ) ), this, SLOT( topChanged() ) );
     if ( !enableBorders ) ebrTop->setEnabled( false );
 
     // bottom margin
-    QLabel* lbBottom = new QLabel ( i18n( "&Bottom:" ), marginsFrame );
-    marginsLayout->addWidget( lbBottom,
-       3, 0, Qt::AlignRight | Qt::AlignVCenter );
     ebrBottom = new KDoubleNumInput( marginsFrame, "Bottom" );
-    lbBottom->setBuddy( ebrBottom );
-    marginsLayout->addWidget( ebrBottom, 3, 1 );
+    marginsLayout->addWidget( ebrBottom, 2, 1, Qt::AlignCenter );
     connect( ebrBottom, SIGNAL( valueChanged( double ) ), this, SLOT( bottomChanged() ) );
     if ( !enableBorders ) ebrBottom->setEnabled( false );
 
@@ -472,19 +476,19 @@ void KoPageLayoutDia::setValuesTab1Helpe
 
     ebrLeft->setValue( KoUnit::toUserValue( m_layout.ptLeft, m_unit ) );
     ebrLeft->setSuffix( KoUnit::unitName( m_unit ) );
-    ebrLeft->setRange( 0, KoUnit::toUserValue( m_layout.ptWidth, m_unit)  );
+    ebrLeft->setRange( 0, KoUnit::toUserValue( m_layout.ptWidth, m_unit), 0.2, false );
 
     ebrRight->setValue( KoUnit::toUserValue( m_layout.ptRight, m_unit ) );
     ebrRight->setSuffix( KoUnit::unitName( m_unit ) );
-    ebrRight->setRange( 0, KoUnit::toUserValue( m_layout.ptWidth, m_unit)  );
+    ebrRight->setRange( 0, KoUnit::toUserValue( m_layout.ptWidth, m_unit), 0.2, false );
 
     ebrTop->setValue( KoUnit::toUserValue( m_layout.ptTop, m_unit ) );
     ebrTop->setSuffix( KoUnit::unitName( m_unit ) );
-    ebrTop->setRange( 0, KoUnit::toUserValue( m_layout.ptHeight, m_unit)  );
+    ebrTop->setRange( 0, KoUnit::toUserValue( m_layout.ptHeight, m_unit), 0.2, false );
 
     ebrBottom->setValue( KoUnit::toUserValue( m_layout.ptBottom, m_unit ) );
     ebrBottom->setSuffix( KoUnit::unitName( m_unit ) );
-    ebrBottom->setRange( 0, KoUnit::toUserValue( m_layout.ptHeight, m_unit)  );
+    ebrBottom->setRange( 0, KoUnit::toUserValue( m_layout.ptHeight, m_unit), 0.2, false );
 }
 
 /*================ setup header and footer tab ===================*/
Index: kofficeui/koPageLayoutDia.h
===================================================================
RCS file: /home/kdecvs/kde/koffice/lib/kofficeui/koPageLayoutDia.h,v
retrieving revision 1.44
diff -u -3 -p -u -p -r1.44 koPageLayoutDia.h
--- kofficeui/koPageLayoutDia.h	22 Jul 2004 23:47:57 -0000	1.44
+++ kofficeui/koPageLayoutDia.h	30 Jul 2004 12:12:02 -0000
@@ -23,7 +23,7 @@
 #define __KOPGLAYOUTDIA_H__
 
 #include <qgroupbox.h>
-
+#include <qlayout.h>
 #include <koGlobal.h>
 #include <koUnit.h>
 #include <kdialogbase.h>

["bug76757_parag_layout.diff" (text/x-diff)]

Index: kotext/koParagDia.cc
===================================================================
RCS file: /home/kdecvs/kde/koffice/lib/kotext/koParagDia.cc,v
retrieving revision 1.108
diff -u -3 -p -u -p -r1.108 koParagDia.cc
--- kotext/koParagDia.cc	15 Jul 2004 10:01:42 -0000	1.108
+++ kotext/koParagDia.cc	30 Jul 2004 12:12:03 -0000
@@ -797,11 +797,11 @@ void KoStylePreview::drawContents( QPain
     painter->restore();
 }
 
-KoIndentSpacingWidget::KoIndentSpacingWidget( KoUnit::Unit unit, bool breakLine, \
double _frameWidth,QWidget * parent, const char * name ) \
+KoIndentSpacingWidget::KoIndentSpacingWidget( KoUnit::Unit unit,  double \
                _frameWidth,QWidget * parent, const char * name )
         : KoParagLayoutWidget( KoParagDia::PD_SPACING, parent, name ), m_unit( unit \
)  {
     QString unitName = KoUnit::unitName( m_unit );
-    QGridLayout *mainGrid = new QGridLayout( this, 4, 2, KDialog::marginHint(), \
KDialog::spacingHint() ); +    QGridLayout *mainGrid = new QGridLayout( this, 3, 2, \
KDialog::marginHint(), KDialog::spacingHint() );  
     // mainGrid gives equal space to each groupbox, apparently
     // I tried setRowStretch but the result is awful (much space between them and \
not equal!) @@ -865,27 +865,7 @@ KoIndentSpacingWidget::KoIndentSpacingWi
         indentGrid->setRowStretch( i, 1 );
     mainGrid->addWidget( indentFrame, 0, 0 );
 
-    // --------------- End of page /frame ---------------
-    QGroupBox * endFramePage = new QGroupBox( i18n( "Behavior at &End of Frame/Page" \
                ), this );
-    QGridLayout * endFramePageGrid = new QGridLayout( endFramePage, 4, 1,
-                                                      KDialog::marginHint(), \
                KDialog::spacingHint() );
-
-    cKeepLinesTogether = new QCheckBox( i18n("&Keep lines together"),endFramePage);
-    endFramePageGrid->addWidget( cKeepLinesTogether, 1, 0 );
-    cHardBreakBefore = new QCheckBox( i18n("Insert break before \
                paragraph"),endFramePage);
-    endFramePageGrid->addWidget( cHardBreakBefore, 2, 0 );
-    cHardBreakAfter = new QCheckBox( i18n("Insert break after \
                paragraph"),endFramePage);
-    endFramePageGrid->addWidget( cHardBreakAfter, 3, 0 );
-
-    endFramePageGrid->addRowSpacing( 0, fontMetrics().height() / 2 ); // groupbox \
                title
-    for ( int i = 0 ; i < endFramePageGrid->numRows()-1 ; ++i )
-        endFramePageGrid->setRowStretch( 0, 0 );
-    endFramePageGrid->setRowStretch( endFramePageGrid->numRows()-1, 1 );
-    mainGrid->addWidget( endFramePage, 2, 0 );
-
-    endFramePage->setEnabled(breakLine);
-
-    // --------------- line spacing ---------------
+        // --------------- line spacing ---------------
     QGroupBox * spacingFrame = new QGroupBox( i18n( "Line &Spacing" ), this, \
"spacingFrame" );  QGridLayout * spacingGrid = new QGridLayout( spacingFrame, 2, 1,
                                                  KDialog::marginHint(), \
KDialog::spacingHint() ); @@ -912,7 +892,7 @@ \
                KoIndentSpacingWidget::KoIndentSpacingWi
     spacingGrid->addRowSpacing( 0, fontMetrics().height() / 2 ); // groupbox title
     for ( int i = 1 ; i < spacingGrid->numRows() ; ++i )
         spacingGrid->setRowStretch( i, 1 );
-    mainGrid->addWidget( spacingFrame, 4, 0 );
+    mainGrid->addWidget( spacingFrame, 1, 0 );
 
     eSpacing->setEnabled( true );
 
@@ -943,7 +923,7 @@ KoIndentSpacingWidget::KoIndentSpacingWi
     pSpaceGrid->addRowSpacing( 0, fontMetrics().height() / 2 ); // groupbox title
     for ( int i = 1 ; i < pSpaceGrid->numRows() ; ++i )
         pSpaceGrid->setRowStretch( i, 1 );
-    mainGrid->addWidget( pSpaceFrame, 6, 0 );
+    mainGrid->addWidget( pSpaceFrame, 2, 0 );
 
     // --------------- preview --------------------
     prev1 = new KPagePreview( this, "KPagePreview" );
@@ -1009,17 +989,6 @@ double KoIndentSpacingWidget::lineSpacin
                                : QMAX(0, KoUnit::fromUserValue( eSpacing->value(), \
m_unit ));  }
 
-int KoIndentSpacingWidget::pageBreaking() const
-{
-    int pb = 0;
-    if ( cKeepLinesTogether->isChecked() )
-        pb |= KoParagLayout::KeepLinesTogether;
-    if ( cHardBreakBefore->isChecked() )
-        pb |= KoParagLayout::HardFrameBreakBefore;
-    if ( cHardBreakAfter->isChecked() )
-        pb |= KoParagLayout::HardFrameBreakAfter;
-    return pb;
-}
 
 void KoIndentSpacingWidget::display( const KoParagLayout & lay )
 {
@@ -1078,10 +1047,6 @@ void KoIndentSpacingWidget::display( con
     eSpacing->setValue( (_type == KoParagLayout::LS_MULTIPLE) ? QMAX( 1, _spacing )
                         : KoUnit::toUserValue( _spacing, m_unit ) );
 
-    cKeepLinesTogether->setChecked( lay.pageBreaking & \
                KoParagLayout::KeepLinesTogether );
-    cHardBreakBefore->setChecked( lay.pageBreaking & \
                KoParagLayout::HardFrameBreakBefore );
-    cHardBreakAfter->setChecked( lay.pageBreaking & \
                KoParagLayout::HardFrameBreakAfter );
-    // ## preview support for end-of-frame ?
 }
 
 void KoIndentSpacingWidget::save( KoParagLayout & lay )
@@ -1093,7 +1058,6 @@ void KoIndentSpacingWidget::save( KoPara
     lay.margins[QStyleSheetItem::MarginFirstLine] = firstLineIndent();
     lay.margins[QStyleSheetItem::MarginTop] = spaceBeforeParag();
     lay.margins[QStyleSheetItem::MarginBottom] = spaceAfterParag();
-    lay.pageBreaking = pageBreaking();
 }
 
 QString KoIndentSpacingWidget::tabName()
@@ -1156,42 +1120,80 @@ void KoIndentSpacingWidget::afterChanged
     prev1->setAfter( _val );
 }
 
-KoParagAlignWidget::KoParagAlignWidget( QWidget * parent, const char * name )
+
+KoParagAlignWidget::KoParagAlignWidget( bool breakLine, QWidget * parent, const char \
* name )  : KoParagLayoutWidget( KoParagDia::PD_ALIGN, parent, name )
 {
-    QGridLayout *grid = new QGridLayout( this, 6, 2, KDialog::marginHint(), \
KDialog::spacingHint() ); +    QGridLayout *grid = new QGridLayout( this, 3, 2, \
KDialog::marginHint(), KDialog::spacingHint() );  
-    QLabel * lAlign = new QLabel( i18n( "Align:" ), this );
-    grid->addWidget( lAlign, 0, 0 );
+    QVGroupBox * AlignGroup = new QVGroupBox( i18n( "Alignment" ), this );
+        
+    QLabel * lAlign = new QLabel( i18n( "Align:" ), AlignGroup );
+//    AlignGroup->addWidget( lAlign, 0, 0 );
 
-    rLeft = new QRadioButton( i18n( "&Left" ), this );
-    grid->addWidget( rLeft, 1, 0 );
+    rLeft = new QRadioButton( i18n( "&Left" ), AlignGroup );
+//    AlignGroup->addWidget( rLeft, 1, 0 );
     connect( rLeft, SIGNAL( clicked() ), this, SLOT( alignLeft() ) );
 
-    rCenter = new QRadioButton( i18n( "C&enter" ), this );
-    grid->addWidget( rCenter, 2, 0 );
+    rCenter = new QRadioButton( i18n( "C&enter" ), AlignGroup );
+//    AlignGroup->addWidget( rCenter, 2, 0 );
     connect( rCenter, SIGNAL( clicked() ), this, SLOT( alignCenter() ) );
 
-    rRight = new QRadioButton( i18n( "&Right" ), this );
-    grid->addWidget( rRight, 3, 0 );
+    rRight = new QRadioButton( i18n( "&Right" ), AlignGroup );
+//    grid->addWidget( rRight, 3, 0 );
     connect( rRight, SIGNAL( clicked() ), this, SLOT( alignRight() ) );
 
-    rJustify = new QRadioButton( i18n( "&Justify" ), this );
-    grid->addWidget( rJustify, 4, 0 );
+    rJustify = new QRadioButton( i18n( "&Justify" ), AlignGroup );
+//    grid->addWidget( rJustify, 4, 0 );
     connect( rJustify, SIGNAL( clicked() ), this, SLOT( alignJustify() ) );
 
     clearAligns();
     rLeft->setChecked( true );
+    
+    grid->addWidget(AlignGroup, 0, 0);
 
+    // --------------- End of page /frame ---------------
+    QGroupBox * endFramePage = new QGroupBox( i18n( "Behavior at &End of Frame/Page" \
), this ); +    QGridLayout * endFramePageGrid = new QGridLayout( endFramePage, 4, 1,
+                                                      KDialog::marginHint(), \
KDialog::spacingHint() ); +
+    cKeepLinesTogether = new QCheckBox( i18n("&Keep lines together"),endFramePage);
+    endFramePageGrid->addWidget( cKeepLinesTogether, 1, 0 );
+    cHardBreakBefore = new QCheckBox( i18n("Insert break before \
paragraph"),endFramePage); +    endFramePageGrid->addWidget( cHardBreakBefore, 2, 0 \
); +    cHardBreakAfter = new QCheckBox( i18n("Insert break after \
paragraph"),endFramePage); +    endFramePageGrid->addWidget( cHardBreakAfter, 3, 0 );
+
+    endFramePageGrid->addRowSpacing( 0, fontMetrics().height() / 2 ); // groupbox \
title +    for ( int i = 0 ; i < endFramePageGrid->numRows()-1 ; ++i )
+        endFramePageGrid->setRowStretch( 0, 0 );
+    endFramePageGrid->setRowStretch( endFramePageGrid->numRows()-1, 1 );
+    grid->addWidget( endFramePage, 2, 0 );
+
+    endFramePage->setEnabled(breakLine);
+    
     // --------------- preview --------------------
     prev2 = new KPagePreview2( this, "KPagePreview2" );
-    grid->addMultiCellWidget( prev2, 0, 5, 1, 1 );
+    grid->addMultiCellWidget( prev2, 0, 2, 1, 1 );
 
     // --------------- main grid ------------------
     grid->setColStretch( 1, 1 );
-    grid->setRowStretch( 5, 1 );
+    grid->setRowStretch( 1, 1 );
 }
 
+int KoParagAlignWidget::pageBreaking() const
+{
+    int pb = 0;
+    if ( cKeepLinesTogether->isChecked() )
+        pb |= KoParagLayout::KeepLinesTogether;
+    if ( cHardBreakBefore->isChecked() )
+        pb |= KoParagLayout::HardFrameBreakBefore;
+    if ( cHardBreakAfter->isChecked() )
+        pb |= KoParagLayout::HardFrameBreakAfter;
+    return pb;
+}
+
+
 void KoParagAlignWidget::display( const KoParagLayout & lay )
 {
     int align = lay.alignment;
@@ -1212,12 +1214,19 @@ void KoParagAlignWidget::display( const 
         case Qt::AlignJustify:
             rJustify->setChecked( true );
             break;
+	    
+    cKeepLinesTogether->setChecked( lay.pageBreaking & \
KoParagLayout::KeepLinesTogether ); +    cHardBreakBefore->setChecked( \
lay.pageBreaking & KoParagLayout::HardFrameBreakBefore ); +    \
cHardBreakAfter->setChecked( lay.pageBreaking & KoParagLayout::HardFrameBreakAfter ); \
+    // ## preview support for end-of-frame ? +
     }
 }
 
 void KoParagAlignWidget::save( KoParagLayout & lay )
 {
     lay.alignment = align();
+    lay.pageBreaking = pageBreaking();
 }
 
 int KoParagAlignWidget::align() const
@@ -1232,7 +1241,7 @@ int KoParagAlignWidget::align() const
 
 QString KoParagAlignWidget::tabName()
 {
-    return i18n( "Al&ignment" );
+    return i18n( "General &Layout" );
 }
 
 void KoParagAlignWidget::alignLeft()
@@ -2064,12 +2073,12 @@ KoParagDia::KoParagDia( QWidget* parent,
     if ( m_flags & PD_SPACING )
     {
         QVBox * page = addVBoxPage( i18n( "Indent && S&pacing" ) );
-        m_indentSpacingWidget = new KoIndentSpacingWidget( unit, \
breakLine,_frameWidth,page, "indent-spacing" ); +        m_indentSpacingWidget = new \
KoIndentSpacingWidget( unit,_frameWidth,page, "indent-spacing" );  }
     if ( m_flags & PD_ALIGN )
     {
-        QVBox * page = addVBoxPage( i18n( "Al&ignment" ) );
-        m_alignWidget = new KoParagAlignWidget( page, "align" );
+        QVBox * page = addVBoxPage( i18n( "General &Layout" ) );
+        m_alignWidget = new KoParagAlignWidget( breakLine, page, "align" );
     }
     if ( m_flags & PD_BORDERS )
     {
Index: kotext/koParagDia.h
===================================================================
RCS file: /home/kdecvs/kde/koffice/lib/kotext/koParagDia.h,v
retrieving revision 1.35
diff -u -3 -p -u -p -r1.35 koParagDia.h
--- kotext/koParagDia.h	15 Jul 2004 10:01:42 -0000	1.35
+++ kotext/koParagDia.h	30 Jul 2004 12:12:03 -0000
@@ -32,6 +32,7 @@
 #include "koparagcounter.h"
 #include <knuminput.h>
 #include <qgroupbox.h>
+#include <qvgroupbox.h>
 
 class KButtonBox;
 class KColorButton;
@@ -99,7 +100,7 @@ class KoIndentSpacingWidget : public KoP
 {
     Q_OBJECT
 public:
-    KoIndentSpacingWidget( KoUnit::Unit unit, bool breakLine, double _frameWidth, \
QWidget * parent,const char * name = 0 ); +    KoIndentSpacingWidget( KoUnit::Unit \
unit, double _frameWidth, QWidget * parent,const char * name = 0 );  virtual \
~KoIndentSpacingWidget() {}  
     virtual void display( const KoParagLayout & lay );
@@ -113,7 +114,6 @@ public:
     double spaceBeforeParag() const;
     double spaceAfterParag() const;
     double lineSpacing() const;
-    int pageBreaking() const;
     KoParagLayout::SpacingType lineSpacingType() const;
 private slots:
     void leftChanged( double );
@@ -128,7 +128,6 @@ private:
 
     KDoubleNumInput *eLeft, *eRight, *eFirstLine, *eBefore, *eAfter, *eSpacing;
     QComboBox *cSpacing;
-    QCheckBox *cKeepLinesTogether, *cHardBreakBefore, *cHardBreakAfter;
     KPagePreview *prev1;
     KoUnit::Unit m_unit;
 };
@@ -140,14 +139,15 @@ class KoParagAlignWidget : public KoPara
 {
     Q_OBJECT
 public:
-    KoParagAlignWidget( QWidget * parent, const char * name = 0 );
+    KoParagAlignWidget(bool breakLine, QWidget * parent, const char * name = 0 );
     virtual ~KoParagAlignWidget() {}
 
     virtual void display( const KoParagLayout & lay );
     virtual void save( KoParagLayout & lay );
     //virtual bool isModified();
     virtual QString tabName();
-
+    
+    int pageBreaking() const;
     int align() const;
 
 protected slots:
@@ -161,6 +161,7 @@ protected:
 
 private:
     QRadioButton *rLeft, *rCenter, *rRight, *rJustify;
+    QCheckBox *cKeepLinesTogether, *cHardBreakBefore, *cHardBreakAfter;
     KPagePreview2 *prev2;
 };
 
@@ -464,10 +465,10 @@ public:
     double spaceAfterParag() const { return \
                m_indentSpacingWidget->spaceAfterParag(); }
     double lineSpacing() const { return m_indentSpacingWidget->lineSpacing(); }
     KoParagLayout::SpacingType lineSpacingType() const{ return \
                m_indentSpacingWidget->lineSpacingType(); }
-    int pageBreaking() const { return m_indentSpacingWidget->pageBreaking(); }
 
     // tab 2
     int align() const { return m_alignWidget->align(); }
+    int pageBreaking() const { return m_alignWidget->pageBreaking(); }
 
     // tab 3
     KoBorder leftBorder() const { return m_borderWidget->leftBorder(); }
Index: kotext/koStylist.cc
===================================================================
RCS file: /home/kdecvs/kde/koffice/lib/kotext/koStylist.cc,v
retrieving revision 1.57
diff -u -3 -p -u -p -r1.57 koStylist.cc
--- kotext/koStylist.cc	27 Jul 2004 03:33:46 -0000	1.57
+++ kotext/koStylist.cc	30 Jul 2004 12:12:03 -0000
@@ -80,11 +80,11 @@ KoStyleManager::KoStyleManager( QWidget 
     addTab( fontTab );
 
     KoStyleParagTab *newTab = new KoStyleParagTab( m_tabs );
-    newTab->setWidget( new KoIndentSpacingWidget( unit, true,-1/*no limit*/,newTab ) \
); +    newTab->setWidget( new KoIndentSpacingWidget( unit, -1/*no limit*/,newTab ) \
);  addTab( newTab );
 
     newTab = new KoStyleParagTab( m_tabs );
-    newTab->setWidget( new KoParagAlignWidget( newTab ) );
+    newTab->setWidget( new KoParagAlignWidget( true, newTab ) );
     addTab( newTab );
 
     newTab = new KoStyleParagTab( m_tabs );



_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic