--------------Boundary-00=_X4A1FHDMEA7K7APIO46R Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit The attached patch is for the file kspread/kspread_doc.cc It only works with my previous patch for lib/kofficeui/koGlobal.cc If this patch is accepted, I will send another patch to clean up the method KSpreadDoc::setPaperLayout --------------Boundary-00=_X4A1FHDMEA7K7APIO46R Content-Type: text/x-diff; charset="iso-8859-1"; name="patch_kspread_doc_cc.txt" Content-Transfer-Encoding: quoted-printable Content-Description: Patch for kspread_doc.cc Content-Disposition: attachment; filename="patch_kspread_doc_cc.txt" --- kspread_doc.cc.orig=09Wed Oct 17 21:57:16 2001 +++ kspread_doc.cc=09Tue Oct 30 15:35:27 2001 @@ -458,26 +458,25 @@ void KSpreadDoc::setPaperLayout( float _leftBorder, float _topBorder, fl= oat _rightBorder, float _bottomBorder, const char * _paper, const char* _orientat= ion ) { - KoFormat f =3D paperFormat(); KoOrientation o =3D orientation(); =20 QString paper( _paper ); - if ( paper[0].isDigit() ) // Custom format + + KoFormat f =3D KoPageFormat::formatFromString( paper ); + + if ( f =3D=3D PG_CUSTOM ) // Custom format { m_paperWidth =3D 0.0; m_paperHeight =3D 0.0; - f =3D PG_CUSTOM; m_paperWidth =3D atof( _paper ); int i =3D paper.find( 'x' ); if ( i !=3D -1 ) - m_paperHeight =3D paper.toDouble() + i + 1; + m_paperHeight =3D paper.toDouble() + i + 1; // FIXME: that is su= rely not what the programmer has meant! if ( m_paperWidth < 10.0 ) m_paperWidth =3D PG_A4_WIDTH; if ( m_paperHeight < 10.0 ) m_paperWidth =3D PG_A4_HEIGHT; } - else - f =3D KoPageFormat::formatFromString( paper ); =20 if ( strcmp( "Portrait", _orientation ) =3D=3D 0L ) o =3D PG_PORTRAIT; --------------Boundary-00=_X4A1FHDMEA7K7APIO46R-- _______________________________________________ koffice-devel mailing list koffice-devel@mail.kde.org http://mail.kde.org/mailman/listinfo/koffice-devel