@@ -1000,15 +1000,15 @@ void QgsComposer::on_mActionExportAsImage_triggered()
1000
1000
// Write the world file if asked to
1001
1001
if ( mComposition ->generateWorldFile () )
1002
1002
{
1003
- double params[ 6 ] ;
1004
- mComposition ->computeWorldFileParameters ( params );
1003
+ double a, b, c, d, e, f ;
1004
+ mComposition ->computeWorldFileParameters ( a, b, c, d, e, f );
1005
1005
1006
1006
QFileInfo fi ( fileNExt.first );
1007
1007
// build the world file name
1008
1008
QString worldFileName = fi.absolutePath () + " /" + fi.baseName () + " ."
1009
1009
+ fi.suffix ()[0 ] + fi.suffix ()[fi.suffix ().size ()-1 ] + " w" ;
1010
1010
1011
- writeWorldFile ( worldFileName, params );
1011
+ writeWorldFile ( worldFileName, a, b, c, d, e, f );
1012
1012
}
1013
1013
1014
1014
mView ->setPaintingEnabled ( true );
@@ -1158,15 +1158,15 @@ void QgsComposer::on_mActionExportAsImage_triggered()
1158
1158
// Write the world file if asked to
1159
1159
if ( mComposition ->generateWorldFile () )
1160
1160
{
1161
- double params[ 6 ] ;
1162
- mComposition ->computeWorldFileParameters ( params );
1163
-
1164
- QFileInfo fi ( filename );
1165
- // build the world file name
1166
- QString worldFileName = fi.absolutePath () + " /" + fi.baseName () + " ."
1167
- + fi.suffix ()[0 ] + fi.suffix ()[fi.suffix ().size ()-1 ] + " w" ;
1168
-
1169
- writeWorldFile ( worldFileName, params );
1161
+ double a, b, c, d, e, f ;
1162
+ mComposition ->computeWorldFileParameters ( a, b, c, d, e, f );
1163
+
1164
+ QFileInfo fi ( filename );
1165
+ // build the world file name
1166
+ QString worldFileName = fi.absolutePath () + " /" + fi.baseName () + " ."
1167
+ + fi.suffix ()[0 ] + fi.suffix ()[fi.suffix ().size ()-1 ] + " w" ;
1168
+
1169
+ writeWorldFile ( worldFileName, a, b, c, d, e, f );
1170
1170
}
1171
1171
}
1172
1172
atlasMap->endRender ();
@@ -2354,7 +2354,7 @@ void QgsComposer::createComposerView()
2354
2354
mViewLayout ->addWidget ( mView , 1 , 1 );
2355
2355
}
2356
2356
2357
- void QgsComposer::writeWorldFile ( QString worldFileName, double p[ 6 ] ) const
2357
+ void QgsComposer::writeWorldFile ( QString worldFileName, double a, double b, double c, double d, double e, double f ) const
2358
2358
{
2359
2359
QFile worldFile ( worldFileName );
2360
2360
if ( !worldFile.open ( QIODevice::WriteOnly | QIODevice::Text ) )
@@ -2365,10 +2365,10 @@ void QgsComposer::writeWorldFile( QString worldFileName, double p[6] ) const
2365
2365
2366
2366
// QString::number does not use locale settings (for the decimal point)
2367
2367
// which is what we want here
2368
- fout << QString::number ( p[ 0 ] ) << " \r\n " ;
2369
- fout << QString::number ( p[ 3 ] ) << " \r\n " ;
2370
- fout << QString::number ( p[ 1 ] ) << " \r\n " ;
2371
- fout << QString::number ( p[ 4 ] ) << " \r\n " ;
2372
- fout << QString::number ( p[ 2 ] ) << " \r\n " ;
2373
- fout << QString::number ( p[ 5 ] ) << " \r\n " ;
2368
+ fout << QString::number (a ) << " \r\n " ;
2369
+ fout << QString::number (b ) << " \r\n " ;
2370
+ fout << QString::number (c ) << " \r\n " ;
2371
+ fout << QString::number (d ) << " \r\n " ;
2372
+ fout << QString::number (e ) << " \r\n " ;
2373
+ fout << QString::number (f ) << " \r\n " ;
2374
2374
}
0 commit comments