/trunk/Scribus/scribus/mpalette.cpp |
---|
9,6 → 9,9 |
#include "autoform.h" |
#include "tabmanager.h" |
#include "scribus.h" |
using namespace std; |
extern QPixmap loadIcon(QString nam); |
extern double UmReFaktor; |
extern ProfilesL InputProfiles; |
/trunk/Scribus/scribus/util.cpp |
---|
84,6 → 84,8 |
extern ProfilesL InputProfiles; |
extern ScribusApp* ScApp; |
using namespace std; |
void ReOrderText(ScribusDoc *doc, ScribusView *view); |
void WordAndPara(PageItem* b, int *w, int *p, int *c, int *wN, int *pN, int *cN); |
void CopyPageItem(struct CLBuf *Buffer, PageItem *b); |
845,7 → 847,7 |
{ |
uint cl = FT_Get_Char_Index(doc->FFonts[name], c1); |
FT_Load_Glyph( doc->FFonts[name], cl, FT_LOAD_NO_SCALE | FT_LOAD_NO_BITMAP ); |
w = (doc->FFonts[name]->glyph->metrics.width + fabs(doc->FFonts[name]->glyph->metrics.horiBearingX)) / fo->uniEM * (Siz / 10.0); |
w = (doc->FFonts[name]->glyph->metrics.width + fabs((double)doc->FFonts[name]->glyph->metrics.horiBearingX)) / fo->uniEM * (Siz / 10.0); |
ww = doc->FFonts[name]->glyph->metrics.horiAdvance / fo->uniEM * (Siz / 10.0); |
return QMAX(ww, w); |
} |
/trunk/Scribus/scribus/libprefs/prefs.cpp |
---|
13,6 → 13,8 |
#include <qwmatrix.h> |
#include <cmath> |
using namespace std; |
extern QPixmap fontSamples(QString da, int s, QString ts, QColor back); |
extern QPixmap loadIcon(QString nam); |
extern QPointArray RegularPolygon(double w, double h, uint c, bool star, double factor, double rota); |
2337,7 → 2339,7 |
*/ |
double Preferences::GetZeroFaktor() |
{ |
return sqrt(pow(1,2)-pow(((sin((360.0/(T6_Ecken->value()*2))/180*M_PI)* 2.0)/2.0),2)); |
return sqrt(pow(1.0,2.0)-pow(((sin((360.0/(T6_Ecken->value()*2))/180*M_PI)* 2.0)/2.0),2)); |
} |
/*! |
/trunk/Scribus/scribus/measurements.cpp |
---|
9,6 → 9,8 |
#include <qpixmap.h> |
#include <cmath> |
using namespace std; |
extern QPixmap loadIcon(QString nam); |
extern double UmReFaktor; |
/trunk/Scribus/scribus/page.cpp |
---|
74,6 → 74,8 |
#include CMS_INC |
#endif |
using namespace std; |
extern int PolyC; |
extern int PolyFd; |
extern double PolyF; |
3255,7 → 3257,7 |
p.end(); |
np = ApplyGrid(np); |
b->Rot = xy2Deg(np.x(), np.y()); |
b->Width = sqrt(pow(np.x(),2)+pow(np.y(),2)); |
b->Width = sqrt(pow(np.x(),2.0)+pow(np.y(),2.0)); |
b->Height = 0; |
b->Sizing = false; |
UpdateClip(b); |
/trunk/Scribus/scribus/fpointarray.cpp |
---|
18,6 → 18,8 |
#include "fpointarray.h" |
#include <cstdarg> |
using namespace std; |
void FPointArray::setPoint(uint i, double x, double y) |
{ |
QMemArray<FPoint>::at( i ) = FPoint( x, y ); |
/trunk/Scribus/scribus/scfonts.cpp |
---|
400,7 → 400,9 |
else |
pathfile = path+d[dc]; |
QFileInfo fi2(pathfile); |
QString ext = fi2.extension(false).lower(); |
QString ext = fi.extension(false).lower(); |
QString ext2 = fi2.extension(false).lower(); |
if ((ext != ext2) && (ext == "")) ext = ext2; |
if ((ext == "pfa") || (ext == "pfb") || (ext == "ttf") || (ext == "otf")) |
{ |
error = FT_New_Face( library, pathfile, 0, &face ); |
/trunk/Scribus/scribus/pageitem.cpp |
---|
37,6 → 37,9 |
#include <ft2build.h> |
#include FT_GLYPH_H |
using namespace std; |
extern double Cwidth(ScribusDoc *doc, QString name, QString ch, int Siz, QString ch2 = " "); |
extern double RealCWidth(ScribusDoc *doc, QString name, QString ch, int Siz); |
extern QPointArray FlattenPath(FPointArray ina, QValueList<uint> &Segs); |
1562,7 → 1565,7 |
if (Ptext.count() != 0) |
CurX += Ptext.at(0)->cextra; |
zae = 0; |
wid = sqrt(pow(cl.point(zae+1).x()-cl.point(zae).x(),2)+pow(cl.point(zae+1).y()-cl.point(zae).y(),2)); |
wid = sqrt(pow(cl.point(zae+1).x()-cl.point(zae).x(),2.0)+pow(cl.point(zae+1).y()-cl.point(zae).y(),2.0)); |
while (wid < 1) |
{ |
zae++; |
1571,8 → 1574,8 |
MaxChars = Ptext.count(); |
break; |
} |
wid = sqrt(pow(cl.point(zae+1).x()-cl.point(zae).x(),2) + |
pow(cl.point(zae+1).y()-cl.point(zae).y(),2)); |
wid = sqrt(pow(cl.point(zae+1).x()-cl.point(zae).x(),2.0) + |
pow(cl.point(zae+1).y()-cl.point(zae).y(),2.0)); |
} |
rota = xy2Deg(cl.point(zae+1).x()-cl.point(zae).x(),cl.point(zae+1).y()-cl.point(zae).y()); |
for (a = 0; a < Ptext.count(); ++a) |
1616,8 → 1619,8 |
MaxChars = a+1; |
break; |
} |
wid = sqrt(pow(cl.point(zae+1).x()-cl.point(zae).x(),2)+ |
pow(cl.point(zae+1).y()-cl.point(zae).y(),2)); |
wid = sqrt(pow(cl.point(zae+1).x()-cl.point(zae).x(),2.0)+ |
pow(cl.point(zae+1).y()-cl.point(zae).y(),2.0)); |
rota = xy2Deg(cl.point(zae+1).x()-cl.point(zae).x(), |
cl.point(zae+1).y()-cl.point(zae).y()); |
} |
/trunk/Scribus/scribus/scribusview.cpp |
---|
37,6 → 37,8 |
#include <cmath> |
#include "scribus.h" |
using namespace std; |
extern void Level2Layer(ScribusDoc *doc, struct Layer *ll, int Level); |
extern double Cwidth(ScribusDoc *doc, QString name, QString ch, int Siz, QString ch2 = " "); |
extern ScribusApp* ScApp; |
/trunk/Scribus/scribus/plugins/svgimplugin/svgplugin.cpp |
---|
21,6 → 21,8 |
#include <zlib.h> |
#endif |
using namespace std; |
extern QPointArray FlattenPath(FPointArray ina, QValueList<uint> &Segs); |
extern bool loadText(QString nam, QString *Buffer); |
extern QPixmap loadIcon(QString nam); |
/trunk/Scribus/scribus/polyprops.cpp |
---|
14,6 → 14,8 |
#include <qwmatrix.h> |
#include <cmath> |
using namespace std; |
extern int PolyC; |
extern int PolyFd; |
extern double PolyF; |
190,7 → 192,7 |
double PolygonProps::GetZeroFaktor() |
{ |
return sqrt(pow(1,2)-pow(((sin((360.0/(Ecken->value()*2))/180*M_PI)* 2.0)/2.0),2)); |
return sqrt(pow(1.0,2.0)-pow(((sin((360.0/(Ecken->value()*2))/180*M_PI)* 2.0)/2.0),2.0)); |
} |
double PolygonProps::GetMaxFaktor() |
/trunk/Scribus/scribus/libpdf/pdflib.cpp |
---|
34,6 → 34,8 |
#include <unistd.h> |
#include "rc4.h" |
using namespace std; |
extern int callGS(const QStringList & args); |
extern QString Path2Relative(QString Path); |
extern bool GlyIndex(QMap<uint, PDFlib::GlNamInd> *GListInd, QString Dat); |
/trunk/Scribus/scribus/gdk-pixbuf-xlibrgb.c |
---|
232,7 → 232,7 |
unsigned char rt[16], gt[16], bt[16]; |
int i; |
colorcube = malloc(sizeof(unsigned char) * 4096); |
colorcube = (unsigned char *) malloc(sizeof(unsigned char) * 4096); |
memset(colorcube, 0, (sizeof(unsigned char) * 4096)); |
for (i = 0; i < 16; i++) |
{ |
257,7 → 257,7 |
int r, g, b; |
int i; |
colorcube_d = malloc(sizeof(unsigned char) * 512); |
colorcube_d = (unsigned char *) malloc(sizeof(unsigned char) * 512); |
memset(colorcube_d, 0, (sizeof(unsigned char) * 512)); |
for (i = 0; i < 512; i++) |
{ |
309,7 → 309,7 |
#ifndef GAMMA |
if (!xlib_rgb_install_cmap) { |
/* go out and get the colors for this colormap. */ |
colors = malloc(sizeof(XColor) * visual->colormap_size); |
colors = (XColor *) malloc(sizeof(XColor) * visual->colormap_size); |
for (i=0; i < visual->colormap_size; i++){ |
colors[i].pixel = i; |
} |
449,7 → 449,7 |
else |
cmap = image_info->default_colormap; |
colorcube_d = malloc(sizeof(unsigned char) * 512); |
colorcube_d = (unsigned char *) malloc(sizeof(unsigned char) * 512); |
for (i = 0; i < 8; i++) |
{ |
623,7 → 623,7 |
} |
/* make a copy of the visual so that we can free |
the allocated visual list above. */ |
final_visual = malloc(sizeof(XVisualInfo)); |
final_visual = (XVisualInfo *) malloc(sizeof(XVisualInfo)); |
memcpy(final_visual, best_visual, sizeof(XVisualInfo)); |
image_info->x_visual_info = final_visual; |
XFree(visuals); |
676,7 → 676,7 |
} |
/* make a copy of the visual so that we can free |
the allocated visual list above. */ |
final_visual = malloc(sizeof(XVisualInfo)); |
final_visual = (XVisualInfo *) malloc(sizeof(XVisualInfo)); |
memcpy(final_visual, best_visual, sizeof(XVisualInfo)); |
image_info->x_visual_info = final_visual; |
XFree(visuals); |
721,7 → 721,7 |
/* Now, we make fake colorcubes - we ultimately just use the pseudocolor |
methods. */ |
colorcube = malloc(sizeof(unsigned char) * 4096); |
colorcube = (unsigned char *) malloc(sizeof(unsigned char) * 4096); |
for (i = 0; i < 4096; i++) |
{ |
794,7 → 794,7 |
if (image_info == NULL) |
{ |
image_info = malloc(sizeof(XlibRgbInfo)); |
image_info = (XlibRgbInfo *) malloc(sizeof(XlibRgbInfo)); |
memset(image_info, 0, sizeof(XlibRgbInfo)); |
image_info->display = display; |
911,7 → 911,7 |
0, 0, IMAGE_WIDTH, IMAGE_HEIGHT, |
8, |
0); |
static_image[i]->data = malloc(IMAGE_WIDTH * IMAGE_HEIGHT >> 3); |
static_image[i]->data = (char *) malloc(IMAGE_WIDTH * IMAGE_HEIGHT >> 3); |
static_image[i]->bitmap_bit_order = MSBFirst; |
static_image[i]->byte_order = MSBFirst; |
} |
925,7 → 925,7 |
IMAGE_HEIGHT, |
32, 0); |
/* remove this when we are using shared memory.. */ |
static_image[i]->data = malloc((size_t)IMAGE_WIDTH * IMAGE_HEIGHT * image_info->x_visual_info->depth); |
static_image[i]->data = (char *) malloc((size_t)IMAGE_WIDTH * IMAGE_HEIGHT * image_info->x_visual_info->depth); |
static_image[i]->bitmap_bit_order = MSBFirst; |
static_image[i]->byte_order = MSBFirst; |
} |
1338,7 → 1338,7 |
if (DM_565 == NULL) |
{ |
DM_565 = malloc(sizeof(unsigned int) * DM_WIDTH * DM_HEIGHT); |
DM_565 = (unsigned int *) malloc(sizeof(unsigned int) * DM_WIDTH * DM_HEIGHT); |
for (i = 0; i < DM_WIDTH * DM_HEIGHT; i++) |
{ |
dith = DM[0][i] >> 3; |
2780,7 → 2780,7 |
xlib_rgb_ensure_stage (void) |
{ |
if (image_info->stage_buf == NULL) |
image_info->stage_buf = malloc (IMAGE_HEIGHT * STAGE_ROWSTRIDE); |
image_info->stage_buf = (unsigned char *) malloc (IMAGE_HEIGHT * STAGE_ROWSTRIDE); |
return image_info->stage_buf; |
} |
3537,7 → 3537,7 |
return NULL; |
if (n_colors > 256) |
return NULL; |
cmap = malloc(sizeof(XlibRgbCmap)); |
cmap = (XlibRgbCmap *) malloc(sizeof(XlibRgbCmap)); |
memcpy (cmap->colors, colors, n_colors * sizeof(unsigned int)); |
if (image_info->bpp == 1 && |
(image_info->x_visual_info->class == PseudoColor || |
/trunk/Scribus/scribus/scpreview.cpp |
---|
13,6 → 13,9 |
#include <cstdlib> |
#include "missing.h" |
#include "scribus.h" |
using namespace std; |
extern double QStodouble(QString in); |
extern int QStoInt(QString in); |
extern QString GetAttr(QDomElement *el, QString at, QString def="0"); |
628,13 → 631,13 |
if (Ptexti.count() != 0) |
CurX += Ptexti.at(0)->cextra; |
zae = 0; |
wid = sqrt(pow(cl.point(zae+1).x()-cl.point(zae).x(),2)+pow(cl.point(zae+1).y()-cl.point(zae).y(),2)); |
wid = sqrt(pow(cl.point(zae+1).x()-cl.point(zae).x(),2.0)+pow(cl.point(zae+1).y()-cl.point(zae).y(),2.0)); |
while (wid < 1) |
{ |
zae++; |
if (zae == cl.size()-1) |
goto PfadEnd; |
wid = sqrt(pow(cl.point(zae+1).x()-cl.point(zae).x(),2)+pow(cl.point(zae+1).y()-cl.point(zae).y(),2)); |
wid = sqrt(pow(cl.point(zae+1).x()-cl.point(zae).x(),2.0)+pow(cl.point(zae+1).y()-cl.point(zae).y(),2.0)); |
} |
rota = xy2Deg(cl.point(zae+1).x()-cl.point(zae).x(),cl.point(zae+1).y()-cl.point(zae).y()); |
for (a = 0; a < Ptexti.count(); a++) |
688,7 → 691,7 |
zae++; |
if (zae == cl.size()-1) |
goto PfadEnd; |
wid = sqrt(pow(cl.point(zae+1).x()-cl.point(zae).x(),2)+pow(cl.point(zae+1).y()-cl.point(zae).y(),2)); |
wid = sqrt(pow(cl.point(zae+1).x()-cl.point(zae).x(),2.0)+pow(cl.point(zae+1).y()-cl.point(zae).y(),2.0)); |
rota = xy2Deg(cl.point(zae+1).x()-cl.point(zae).x(),cl.point(zae+1).y()-cl.point(zae).y()); |
} |
while (wid == 0); |