Subversion Repositories Scribus

Compare Revisions

Regard whitespace Rev 202 → Rev 203

/trunk/Scribus/ChangeLogCVS
1,4 → 1,10
Changes since Version 1.1.5
21.02.2004 Added ability to include Softmasks into PDFs when exporting to PDF 1.4
Fixed Bugs #279, #277, #235
Bug #235 was fixed by Petr Vanek.
 
20.02.2004 Fixed Bug when scaling Groups containg lines, Bug #276
 
19.02.2004 Improved the PDF-Export settings, the Compression method for
Images can now be set. Zip and JPEG Compression is available.
 
/trunk/Scribus/scribus/pdfopts.cpp
27,7 → 27,7
EffVal = Eff;
Einheit = view->Doc->Einheit;
PDFOptsLayout = new QVBoxLayout( this );
PDFOptsLayout->setSpacing( 6 );
PDFOptsLayout->setSpacing( 5 );
PDFOptsLayout->setMargin( 11 );
Name = new QLabel( this, "Name" );
Name->setFrameShape( QLabel::NoFrame );
34,7 → 34,7
Name->setText( tr( "Output to File:" ) );
PDFOptsLayout->addWidget( Name );
Layout5 = new QHBoxLayout;
Layout5->setSpacing( 6 );
Layout5->setSpacing( 5 );
Layout5->setMargin( 0 );
Datei = new QLineEdit( this, "Datei" );
Datei->setMinimumSize( QSize( 268, 22 ) );
54,15 → 54,15
Options = new QTabWidget( this, "TabWidget2" );
tab = new QWidget( Options, "tab" );
tabLayout = new QVBoxLayout( tab );
tabLayout->setSpacing( 6 );
tabLayout->setSpacing( 5 );
tabLayout->setMargin( 11 );
 
Layout13 = new QHBoxLayout( 0, 0, 6, "Layout13");
Layout13 = new QHBoxLayout( 0, 0, 5, "Layout13");
 
RangeGroup = new QButtonGroup( tab, "RangeGroup" );
RangeGroup->setTitle( tr( "Export Range" ) );
RangeGroup->setColumnLayout(0, Qt::Vertical );
RangeGroup->layout()->setSpacing( 6 );
RangeGroup->layout()->setSpacing( 5 );
RangeGroup->layout()->setMargin( 11 );
RangeGroupLayout = new QVBoxLayout( RangeGroup->layout() );
RangeGroupLayout->setAlignment( Qt::AlignTop );
70,7 → 70,7
AllPages->setText( tr( "All Pages" ) );
AllPages->setChecked( true );
RangeGroupLayout->addWidget( AllPages );
Layout11 = new QGridLayout( 0, 1, 1, 0, 6, "Layout11");
Layout11 = new QGridLayout( 0, 1, 1, 0, 5, "Layout11");
OnlySome = new QRadioButton( RangeGroup, "OnlySome" );
OnlySome->setText( tr( "From:" ) );
Layout11->addWidget( OnlySome, 0, 0 );
100,7 → 100,7
GroupBox1->layout()->setMargin( 0 );
GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
GroupBox1Layout->setAlignment( Qt::AlignTop );
GroupBox1Layout->setSpacing( 6 );
GroupBox1Layout->setSpacing( 5 );
GroupBox1Layout->setMargin( 11 );
TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
TextLabel1->setText( tr( "Compatibility:" ) );
169,7 → 169,7
CBox = new QGroupBox( tab, "CBox" );
CBox->setTitle( tr( "Image Settings" ) );
CBox->setColumnLayout(0, Qt::Vertical );
CBox->layout()->setSpacing( 6 );
CBox->layout()->setSpacing( 5 );
CBox->layout()->setMargin( 11 );
CBoxLayout = new QGridLayout( CBox->layout() );
CBoxLayout->setAlignment( Qt::AlignTop );
214,7 → 214,7
 
tab_3 = new QWidget( Options, "tab_3" );
tabLayout_3 = new QVBoxLayout( tab_3 );
tabLayout_3->setSpacing( 6 );
tabLayout_3->setSpacing( 5 );
tabLayout_3->setMargin( 11 );
EmbedFonts = new QCheckBox( tab_3, "EmbedFonts" );
EmbedFonts->setText( tr( "Embed all Fonts" ) );
226,7 → 226,7
GroupFont->layout()->setMargin( 0 );
GroupFontLayout = new QHBoxLayout( GroupFont->layout() );
GroupFontLayout->setAlignment( Qt::AlignTop );
GroupFontLayout->setSpacing( 6 );
GroupFontLayout->setSpacing( 5 );
GroupFontLayout->setMargin( 11 );
Layout4_2 = new QVBoxLayout;
Layout4_2->setSpacing( 6 );
247,11 → 247,11
}
}
AvailFlist->setMinimumSize(QSize(150, 140));
AvailFlist->setMaximumSize(QSize(150, 140));
// AvailFlist->setMaximumSize(QSize(150, 140));
Layout4_2->addWidget( AvailFlist );
GroupFontLayout->addLayout( Layout4_2 );
Layout5_2 = new QVBoxLayout;
Layout5_2->setSpacing( 6 );
Layout5_2->setSpacing( 5 );
Layout5_2->setMargin( 0 );
ToEmbed = new QPushButton( GroupFont, "ToEmbed" );
ToEmbed->setText( tr( ">>" ) );
263,7 → 263,7
Layout5_2->addWidget( FromEmbed );
GroupFontLayout->addLayout( Layout5_2 );
Layout6 = new QVBoxLayout;
Layout6->setSpacing( 6 );
Layout6->setSpacing( 5 );
Layout6->setMargin( 0 );
TextFont1_2 = new QLabel( GroupFont, "TextFont1_2" );
TextFont1_2->setText( tr( "Fonts to embed:" ) );
270,7 → 270,7
Layout6->addWidget( TextFont1_2 );
EmbedList = new QListBox( GroupFont, "EmbedList" );
EmbedList->setMinimumSize(QSize(150, 140));
EmbedList->setMaximumSize(QSize(150, 140));
// EmbedList->setMaximumSize(QSize(150, 140));
if (Optionen->EmbedList.count() != 0)
{
for (uint efo = 0; efo < Optionen->EmbedList.count(); ++efo)
290,7 → 290,7
Options->insertTab( tab_3, tr( "Fonts" ) );
tab_5 = new QWidget( Options, "tab_5" );
tabLayout_5 = new QGridLayout( tab_5 );
tabLayout_5->setSpacing( 6 );
tabLayout_5->setSpacing( 5 );
tabLayout_5->setMargin( 11 );
CheckBox10 = new QCheckBox( tab_5, "CheckBox10" );
CheckBox10->setText( tr( "Enable Presentation Effects" ) );
344,7 → 344,7
Effects->layout()->setMargin( 0 );
EffectsLayout = new QGridLayout( Effects->layout() );
EffectsLayout->setAlignment( Qt::AlignTop );
EffectsLayout->setSpacing( 6 );
EffectsLayout->setSpacing( 5 );
EffectsLayout->setMargin( 11 );
TextLabel1e = new QLabel( Effects, "TextLabel1_2" );
TextLabel1e->setText( tr( "Display Duration:" ) );
408,7 → 408,7
Options->insertTab( tab_5, tr( "Extras" ) );
 
tabsec = new QWidget( Options, "tabsec" );
tabsecLayout = new QVBoxLayout( tabsec, 11, 6, "tabsecLayout");
tabsecLayout = new QVBoxLayout( tabsec, 11, 5, "tabsecLayout");
Encry = new QCheckBox( tabsec, "Enc" );
Encry->setText( tr( "Use Encryption" ) );
Encry->setChecked( Optionen->Encrypt );
418,7 → 418,7
GroupPass->sizePolicy().hasHeightForWidth() ) );
GroupPass->setTitle( tr( "Passwords" ) );
GroupPass->setColumnLayout(0, Qt::Vertical );
GroupPass->layout()->setSpacing( 6 );
GroupPass->layout()->setSpacing( 5 );
GroupPass->layout()->setMargin( 11 );
GroupPassLayout = new QGridLayout( GroupPass->layout() );
GroupPassLayout->setAlignment( Qt::AlignTop );
443,7 → 443,7
GroupSecSet->sizePolicy().hasHeightForWidth() ) );
GroupSecSet->setTitle( tr( "Settings" ) );
GroupSecSet->setColumnLayout(0, Qt::Vertical );
GroupSecSet->layout()->setSpacing( 6 );
GroupSecSet->layout()->setSpacing( 5 );
GroupSecSet->layout()->setMargin( 11 );
GroupSecSetLayout = new QVBoxLayout( GroupSecSet->layout() );
GroupSecSetLayout->setAlignment( Qt::AlignTop );
472,11 → 472,11
Options->insertTab( tabsec, tr( "Security" ) );
 
tabcolor = new QWidget( Options, "tabcolor" );
tabcolorLayout = new QVBoxLayout( tabcolor, 11, 6, "tabcolorLayout");
tabcolorLayout = new QVBoxLayout( tabcolor, 11, 5, "tabcolorLayout");
ColorGroup = new QGroupBox( tabcolor, "ColorGroup" );
ColorGroup->setTitle( tr( "General" ) );
ColorGroup->setColumnLayout(0, Qt::Vertical );
ColorGroup->layout()->setSpacing( 6 );
ColorGroup->layout()->setSpacing( 5 );
ColorGroup->layout()->setMargin( 11 );
ColorGroupLayout = new QHBoxLayout( ColorGroup->layout() );
ColorGroupLayout->setAlignment( Qt::AlignTop );
494,7 → 494,7
GroupBox9 = new QGroupBox( tabcolor, "GroupBox9" );
GroupBox9->setTitle( tr( "Solid Colors:" ) );
GroupBox9->setColumnLayout(0, Qt::Vertical );
GroupBox9->layout()->setSpacing( 6 );
GroupBox9->layout()->setSpacing( 5 );
GroupBox9->layout()->setMargin( 11 );
GroupBox9Layout = new QGridLayout( GroupBox9->layout() );
GroupBox9Layout->setAlignment( Qt::AlignTop );
522,7 → 522,7
ProfsGroup = new QGroupBox( tabcolor, "ProfsGroup" );
ProfsGroup->setTitle( tr( "Images:" ) );
ProfsGroup->setColumnLayout(0, Qt::Vertical );
ProfsGroup->layout()->setSpacing( 6 );
ProfsGroup->layout()->setSpacing( 5 );
ProfsGroup->layout()->setMargin( 11 );
ProfsGroupLayout = new QGridLayout( ProfsGroup->layout() );
ProfsGroupLayout->setAlignment( Qt::AlignTop );
601,7 → 601,7
Options->insertTab( tabcolor, tr( "Color" ) );
 
tabpdfx = new QWidget( Options, "tabpdfx" );
tabpdfxLayout = new QVBoxLayout( tabpdfx, 11, 6, "tabpdfxLayout");
tabpdfxLayout = new QVBoxLayout( tabpdfx, 11, 5, "tabpdfxLayout");
X3Group = new QGroupBox( tabpdfx, "X3Group" );
X3Group->setTitle( tr( "PDF/X-3 Output Intent" ) );
X3Group->setColumnLayout(0, Qt::Vertical );
637,7 → 637,7
BleedGroup = new QGroupBox( tabpdfx, "BleedGroup" );
BleedGroup->setTitle( tr( "Trim Box" ) );
BleedGroup->setColumnLayout(0, Qt::Vertical );
BleedGroup->layout()->setSpacing( 6 );
BleedGroup->layout()->setSpacing( 5 );
BleedGroup->layout()->setMargin( 11 );
BleedGroupLayout = new QGridLayout( BleedGroup->layout() );
BleedGroupLayout->setAlignment( Qt::AlignTop );
712,7 → 712,7
SetEffOpts(EffectType->currentItem());
}
Layout7 = new QHBoxLayout;
Layout7->setSpacing( 6 );
Layout7->setSpacing( 5 );
Layout7->setMargin( 0 );
QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout7->addItem( spacer_2 );
/trunk/Scribus/scribus/util.cpp
81,6 → 81,7
#endif
extern ProfilesL InputProfiles;
 
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);
bool overwrite(QWidget *parent, QString filename);
100,6 → 101,7
QString ImageToCMYK_PS(QImage *im, int pl, bool pre);
void Convert2JPG(QString fn, QImage *image, int Quality, bool isCMYK);
QString MaskToTxt(QImage *im, bool PDF = true);
QString MaskToTxt14(QImage *im);
void Level2Layer(ScribusDoc *doc, struct Layer *ll, int Level);
void BezierPoints(QPointArray *ar, QPoint n1, QPoint n2, QPoint n3, QPoint n4);
double xy2Deg(double x, double y);
946,6 → 948,24
return ImgStr;
}
 
QString MaskToTxt14(QImage *im)
{
int h = im->height();
int w = im->width();
QString ImgStr = "";
for( int yi=0; yi < h; ++yi )
{
QRgb * s = (QRgb*)(im->scanLine( yi ));
for( int xi=0; xi < w; ++xi )
{
QRgb r=*s++;
unsigned char u=qAlpha(r);
ImgStr += u;
}
}
return ImgStr;
}
 
typedef struct my_error_mgr
{
struct jpeg_error_mgr pub; /* "public" fields */
1605,3 → 1625,34
*pN = paraN;
*cN = ccN;
}
 
void ReOrderText(ScribusDoc *doc, ScribusView *view)
{
double savScale = doc->Scale;
doc->Scale = 1.0;
doc->RePos = true;
QPixmap pgPix(10, 10);
QRect rd = QRect(0,0,9,9);
ScPainter *painter = new ScPainter(&pgPix, pgPix.width(), pgPix.height());
for (uint az=0; az<view->MasterPages.count(); az++)
{
for (uint azz=0; azz<view->MasterPages.at(az)->Items.count(); ++azz)
{
PageItem *ite = view->MasterPages.at(az)->Items.at(azz);
if (ite->PType == 4)
ite->DrawObj(painter, rd);
}
}
for (uint az=0; az<view->Pages.count(); az++)
{
for (uint azz=0; azz<view->Pages.at(az)->Items.count(); ++azz)
{
PageItem *ite = view->Pages.at(az)->Items.at(azz);
if (ite->PType == 4)
ite->DrawObj(painter, rd);
}
}
doc->RePos = false;
doc->Scale = savScale;
delete painter;
}
/trunk/Scribus/scribus/guidemanager.cpp
92,7 → 92,7
Layout4 = new QHBoxLayout(0, 0, 6, "Layout4");
 
TextLabel2 = new QLabel(HorGroup, "TextLabel2");
TextLabel2->setText( tr("X-Pos:"));
TextLabel2->setText( tr("Y-Pos:"));
Layout4->addWidget(TextLabel2);
 
HorSpin = new MSpinBox(HorGroup, 4);
134,7 → 134,7
Layout2 = new QHBoxLayout(0, 0, 6, "Layout2");
 
TextLabel1 = new QLabel(VerGroup, "TextLabel1");
TextLabel1->setText( tr("Y-Pos:"));
TextLabel1->setText( tr("X-Pos:"));
Layout2->addWidget(TextLabel1);
 
VerSpin = new MSpinBox(VerGroup, 4);
/trunk/Scribus/scribus/pageitem.cpp
261,9 → 261,11
}
Doc->Vorlagen[0].Ausri = Ausrich;
pf.begin(Parent);
pf.translate(qRound(Xpos*sc), qRound(Ypos*sc));
// pf.translate(qRound(Xpos*sc), qRound(Ypos*sc));
// pf.scale(sc, sc);
pf.translate(Xpos*sc, Ypos*sc);
pf.rotate(Rot);
pf.scale(sc, sc);
pf.rotate(Rot);
if (!Doc->RePos)
pf.setClipRect(!e.isEmpty() ? e : OwnPage->ViewReg().boundingRect());
bool doStroke = true;
388,8 → 390,8
}
else
{
imd.setAlphaBuffer(true);
imd = pixm.copy();
imd.setAlphaBuffer(true);
int wi = imd.width();
int hi = imd.height();
for( int yi=0; yi < hi; ++yi )
397,10 → 399,8
QRgb *s = (QRgb*)(imd.scanLine( yi ));
for(int xi=0; xi < wi; ++xi )
{
if(qAlpha((*s)) >127)
(*s) = 0xff000000;
else
(*s) = 0xffffffff;
int aa = 255 - qAlpha((*s));
(*s) = qRgba(aa,aa,aa,255);
s++;
}
}
449,8 → 449,12
QRgb *s2 = (QRgb*)(imd.scanLine( yi ));
for(int xi=0; xi < wi; ++xi )
{
if((*s2) != 0xff000000)
int aa2 = 255-qRed((*s2));
if (qAlpha((*s)) != 0)
{
(*s) &= 0x00ffffff;
(*s) |= (aa2 << 24) & 0xff000000;
}
s++;
s2++;
}
589,8 → 593,10
if (OwnPage->Items.at(a)->Textflow)
{
pp.begin(Parent);
pp.translate(OwnPage->Items.at(a)->Xpos*sc, OwnPage->Items.at(a)->Ypos*sc);
// pp.translate(OwnPage->Items.at(a)->Xpos*sc, OwnPage->Items.at(a)->Ypos*sc);
// pp.scale(sc, sc);
pp.scale(sc, sc);
pp.translate(OwnPage->Items.at(a)->Xpos, OwnPage->Items.at(a)->Ypos);
pp.rotate(OwnPage->Items.at(a)->Rot);
if (OwnPage->Items.at(a)->Textflow2)
{
747,8 → 753,8
wide = Cwidth(Doc, hl->cfont, chx2, chs);
wide = wide * (hl->cscale / 100.0);
desc2 = -(*Doc->AllFonts)[hl->cfont]->numDescender * (chs / 10.0);
desc = static_cast<int>(-(*Doc->AllFonts)[hl->cfont]->numDescender * (chs / 10.0));
asce = static_cast<int>((*Doc->AllFonts)[hl->cfont]->numAscent * (chs / 10.0));
desc = qRound(-(*Doc->AllFonts)[hl->cfont]->numDescender * (chs / 10.0));
asce = qRound((*Doc->AllFonts)[hl->cfont]->numAscent * (chs / 10.0));
fBorder = false;
if (LiList.isEmpty())
{
758,8 → 764,8
TopOffset = asce+TExtra+lineCorr;
else
TopOffset = asce;
pt1 = QPoint(static_cast<int>(CurX), static_cast<int>(CurY+BotOffset));
pt2 = QPoint(static_cast<int>(CurX), static_cast<int>(CurY-TopOffset));
pt1 = QPoint(qRound(CurX), qRound(CurY+BotOffset));
pt2 = QPoint(qRound(CurX), qRound(CurY-TopOffset));
while ((!cl.contains(pf.xForm(pt1))) || (!cl.contains(pf.xForm(pt2))))
{
fBorder = true;
810,8 → 816,8
}
}
}
pt1 = QPoint(static_cast<int>(CurX), static_cast<int>(CurY+BotOffset));
pt2 = QPoint(static_cast<int>(CurX), static_cast<int>(CurY-TopOffset));
pt1 = QPoint(qRound(CurX), qRound(CurY+BotOffset));
pt2 = QPoint(qRound(CurX), qRound(CurY-TopOffset));
}
if ((fBorder) && (!AbsHasDrop))
CurX += Extra;
879,8 → 885,8
hl->xp = CurX;
if ((TabCode == 4) && (RTab))
CurX += (wide+hl->cextra) / 2;
pt1 = QPoint(static_cast<int>(CurX), static_cast<int>(CurY+desc+BExtra+lineCorr));
pt2 = QPoint(static_cast<int>(CurX), static_cast<int>(CurY-asce));
pt1 = QPoint(qRound(CurX), qRound(CurY+desc+BExtra+lineCorr));
pt2 = QPoint(qRound(CurX), qRound(CurY-asce));
if ((!cl.contains(pf.xForm(pt1))) || (!cl.contains(pf.xForm(pt2))) || (CurX+RExtra+lineCorr > ColBound.y()))
outs = true;
Zli = new ZZ;
980,8 → 986,8
EndX = LastXp;
do
{
pt1 = QPoint(static_cast<int>(EndX), static_cast<int>(CurY+desc));
pt2 = QPoint(static_cast<int>(EndX), static_cast<int>(CurY-asce));
pt1 = QPoint(qRound(EndX), qRound(CurY+desc));
pt2 = QPoint(qRound(EndX), qRound(CurY-asce));
EndX++;
}
while ((cl.contains(pf.xForm(pt1))) && (cl.contains(pf.xForm(pt2))) && (EndX+RExtra+lineCorr < ColBound.y()));
1040,8 → 1046,8
EndX = CurX;
do
{
pt1 = QPoint(static_cast<int>(EndX), static_cast<int>(CurY+desc));
pt2 = QPoint(static_cast<int>(EndX), static_cast<int>(CurY-asce));
pt1 = QPoint(qRound(EndX), qRound(CurY+desc));
pt2 = QPoint(qRound(EndX), qRound(CurY-asce));
EndX++;
}
while ((cl.contains(pf.xForm(pt1))) && (cl.contains(pf.xForm(pt2))) && (EndX+RExtra+lineCorr < ColBound.y()));
1101,8 → 1107,8
}
bool fromOut = true;
double BotOffset = desc+BExtra+lineCorr;
pt1 = QPoint(static_cast<int>(CurX), static_cast<int>(CurY+BotOffset));
pt2 = QPoint(static_cast<int>(CurX), static_cast<int>(CurY-asce));
pt1 = QPoint(qRound(CurX), qRound(CurY+BotOffset));
pt2 = QPoint(qRound(CurX), qRound(CurY-asce));
while ((!cl.contains(pf.xForm(pt1))) || (!cl.contains(pf.xForm(pt2))))
{
CurX++;
1132,8 → 1138,8
}
break;
}
pt1 = QPoint(static_cast<int>(CurX), static_cast<int>(CurY+BotOffset));
pt2 = QPoint(static_cast<int>(CurX), static_cast<int>(CurY-asce));
pt1 = QPoint(qRound(CurX), qRound(CurY+BotOffset));
pt2 = QPoint(qRound(CurX), qRound(CurY-asce));
}
if (fromOut)
CurX--;
1216,8 → 1222,8
EndX = CurX;
do
{
pt1 = QPoint(static_cast<int>(EndX), static_cast<int>(CurY+desc));
pt2 = QPoint(static_cast<int>(EndX), static_cast<int>(CurY-asce));
pt1 = QPoint(qRound(EndX), qRound(CurY+desc));
pt2 = QPoint(qRound(EndX), qRound(CurY-asce));
EndX++;
}
while ((cl.contains(pf.xForm(pt1))) && (cl.contains(pf.xForm(pt2))) && (EndX+RExtra+lineCorr < ColBound.y()));
1278,8 → 1284,8
if ((Zli2->Sele) && (Doc->AppMode == 7) && (Select))
{
wide = Zli2->wide;
desc = static_cast<int>((*Doc->AllFonts)[Zli2->ZFo]->numDescender * (-Zli2->Siz / 10.0));
asce = static_cast<int>((*Doc->AllFonts)[Zli2->ZFo]->numAscent * (Zli2->Siz / 10.0));
desc = qRound((*Doc->AllFonts)[Zli2->ZFo]->numDescender * (-Zli2->Siz / 10.0));
asce = qRound((*Doc->AllFonts)[Zli2->ZFo]->numAscent * (Zli2->Siz / 10.0));
p->setFillMode(1);
p->setBrush(darkBlue);
if (!Doc->RePos)
/trunk/Scribus/scribus/cpalette.cpp
48,6 → 48,9
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout1->addItem( spacer );
Mode = 2;
ShadeTxt = new QLabel( this, "ShadeTxt" );
ShadeTxt->setText( tr( "Shade:" ) );
Layout1->addWidget( ShadeTxt );
PM1 = new ShadeButton(this);
PM1->setValue(100);
Layout1->addWidget(PM1);
/trunk/Scribus/scribus/libabout/about.cpp
54,7 → 54,7
tabLayout1->addWidget( PixmapLabel1 );
BuildID = new QLabel( tab, "BB" );
BuildID->setAlignment(Qt::AlignCenter);
QString bu = tr("%1. %2 %3 ").arg(19).arg("February").arg(2004);
QString bu = tr("%1. %2 %3 ").arg(21).arg("February").arg(2004);
#ifdef HAVE_CMS
bu += "C";
#else
/trunk/Scribus/scribus/Makefile.am
148,7 → 148,7
-rm -f $(prefix)/include/scribus/scpainter.h
-rm -f $(prefix)/include/scribus/vgradient.h
 
scribus_LDADD = $(LIBART_LIBS) $(LIBFREETYPE_LIBS) $(LIBCUPS) $(LIBLCMS) $(LIBDL) $(LIBDL2) $(LIBTIFF) -lm $(LIB_QT) -lXext -lX11 $(LIBSOCKET)
scribus_LDADD = $(LIBJPEG) $(LIBART_LIBS) $(LIBFREETYPE_LIBS) $(LIBCUPS) $(LIBLCMS) $(LIBDL) $(LIBDL2) $(LIBTIFF) -lm $(LIB_QT) -lXext -lX11 $(LIBSOCKET)
AM_LDFLAGS = -export-dynamic -s
# set the include path for X, qt and KDE
INCLUDES= $(LIBART_CFLAGS) $(LIBFREETYPE_CFLAGS) $(all_includes)
/trunk/Scribus/scribus/scribus.cpp
88,6 → 88,7
extern QPixmap loadIcon(QString nam);
extern bool overwrite(QWidget *parent, QString filename);
extern void CopyPageItem(struct CLBuf *Buffer, PageItem *b);
extern void ReOrderText(ScribusDoc *doc, ScribusView *view);
 
using namespace std;
 
2139,10 → 2140,10
StilMenu->insertItem( tr("Font"), FontMenu);
StilMenu->insertItem( tr("Size"), SizeTMenu);
StilMenu->insertItem( tr("Effects"), TypeStyleMenu);
StilMenu->insertItem( tr("Tabulators..."), this, SLOT(EditTabs()));
StilMenu->insertItem( tr("Alignment"), AliMenu);
StilMenu->insertItem( tr("Color"), ColorMenu);
StilMenu->insertItem( tr("Shade"), ShadeMenu);
StilMenu->insertItem( tr("Tabulators..."), this, SLOT(EditTabs()));
WerkTools->Rotiere->setEnabled(true);
WerkTools->Textedit2->setEnabled(true);
if ((b->NextBox != 0) || (b->BackBox != 0))
3052,6 → 3053,7
printer->setFromTo(1, view->Pages.count());
if (printer->exec())
{
ReOrderText(doc, view);
qApp->setOverrideCursor(QCursor(waitCursor), true);
prn = printer->printerName();
fna = printer->outputFileName();
5806,6 → 5808,7
bool ScribusApp::DoSaveAsEps(QString fn)
{
bool return_value = true;
ReOrderText(doc, view);
qApp->setOverrideCursor(QCursor(waitCursor), true);
QMap<QString,QFont> ReallyUsed;
ReallyUsed.clear();
5874,6 → 5877,7
if (dia->exec())
{
qApp->setOverrideCursor(QCursor(waitCursor), true);
ReOrderText(doc, view);
fn = dia->Datei->text();
doc->PDF_Optionen.Datei = fn;
doc->PDF_Optionen.Thumbnails = dia->CheckBox1->isChecked();
/trunk/Scribus/scribus/plugins/scriptplugin/guiapp.h
0,0 → 1,26
#ifndef GUIAPP_H
#define GUIAPP_H
 
/**
Changes the status bar string.
TODO: national chars handling.
(Petr Vanek 02/19/04)
*/
PyObject *scribus_messagebartext(PyObject *self, PyObject* args);
 
/**
Progressbar handling
TODO: check total vs. set values.
(Petr Vanek 02/19/04)
*/
PyObject *scribus_progressreset(PyObject *self, PyObject* args);
PyObject *scribus_progresssettotalsteps(PyObject *self, PyObject* args);
PyObject *scribus_progresssetprogress(PyObject *self, PyObject* args);
 
/**
Cursor handling
(Petr Vanek 02/19/04)
*/
PyObject *scribus_setcursor(PyObject *self, PyObject* args);
 
#endif
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
===================================================================
--- Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp (revision 202)
+++ Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp (revision 203)
@@ -29,6 +29,7 @@
#include "scriptplugin.moc"
#include "cmdutil.h"
#include "cmdvar.h"
+#include "guiapp.h"
#include "customfdialog.h"
#include "helpbrowser.h"
@@ -365,6 +366,11 @@
}
static PyMethodDef scribus_methods[] = {
+ {"ProgressReset", scribus_progressreset, METH_VARARGS},
+ {"ProgressTotal", scribus_progresssettotalsteps, METH_VARARGS},
+ {"ProgressSet", scribus_progresssetprogress, METH_VARARGS},
+ {"MessagebarText", scribus_messagebartext, METH_VARARGS},
+ {"SetCursor", scribus_setcursor, METH_VARARGS},
{"PageDimension", scribus_pagedimension, METH_VARARGS},
{"NewDocDialog", scribus_newdocdia, METH_VARARGS},
{"FileDialog", scribus_filedia, METH_VARARGS},
/trunk/Scribus/scribus/plugins/scriptplugin/guiapp.cpp
0,0 → 1,70
#include <Python.h>
 
#include "guiapp.h"
#include "cmdvar.h"
#include <qstring.h>
#include <qcursor.h>
//#include <iostream.h>
 
 
PyObject *scribus_messagebartext(PyObject *self, PyObject* args)
{
char *aText;
if (!PyArg_ParseTuple(args, "s", &aText))
return NULL;
Py_INCREF(Py_None);
Carrier->FMess->setText(QString(aText));
return Py_None;
}
 
 
PyObject *scribus_progressreset(PyObject *self, PyObject* args)
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Py_INCREF(Py_None);
Carrier->FProg->reset();
qApp->processEvents();
return Py_None;
}
 
 
PyObject *scribus_progresssettotalsteps(PyObject *self, PyObject* args)
{
int steps;
if (!PyArg_ParseTuple(args, "i", &steps))
return NULL;
Py_INCREF(Py_None);
Carrier->FProg->setTotalSteps(steps);
Carrier->FProg->setProgress(0);
qApp->processEvents();
return Py_None;
}
 
 
PyObject *scribus_progresssetprogress(PyObject *self, PyObject* args)
{
int position;
if (!PyArg_ParseTuple(args, "i", &position))
return NULL;
Py_INCREF(Py_None);
if (position > Carrier->FProg->totalSteps())
return Py_None;
Carrier->FProg->setProgress(position);
qApp->processEvents();
return Py_None;
}
 
 
PyObject *scribus_setcursor(PyObject *self, PyObject* args)
{
char *aCursor;
if (!PyArg_ParseTuple(args, "s", &aCursor))
return NULL;
Py_INCREF(Py_None);
if (aCursor=="wait")
qApp->setOverrideCursor(Qt::WaitCursor);
else
qApp->restoreOverrideCursor();
return Py_None;
}
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: Scribus/scribus/plugins/scriptplugin/Makefile.am
===================================================================
--- Scribus/scribus/plugins/scriptplugin/Makefile.am (revision 202)
+++ Scribus/scribus/plugins/scriptplugin/Makefile.am (revision 203)
@@ -5,7 +5,7 @@
INCLUDES = $(LIBFREETYPE_CFLAGS) $(all_includes)
libscriptplugin_la_LDFLAGS = -version-info 0:0:0
libscriptplugin_la_METASOURCES = AUTO
-libscriptplugin_la_SOURCES = cmdutil.cpp cmddialog.cpp cmddoc.cpp cmdpage.cpp cmdobj.cpp cmdgetprop.cpp cmdsetprop.cpp cmdtext.cpp cmdmani.cpp cmdcolor.cpp cmdmisc.cpp conswin.cpp pconsole.cpp scriptplugin.cpp
-EXTRA_DIST = cmdvar.h cmdutil.cpp cmdutil.h cmddialog.cpp cmddialog.h cmddoc.cpp cmddoc.h cmdpage.cpp cmdpage.h cmdobj.cpp cmdobj.h cmdgetprop.cpp cmdgetprop.h cmdsetprop.cpp cmdsetprop.h cmdtext.cpp cmdtext.h cmdmani.cpp cmdmani.h cmdcolor.cpp cmdcolor.h cmdmisc.cpp cmdmisc.h scriptplugin.cpp scriptplugin.h pconsole.cpp pconsole.h conswin.cpp conswin.h
+libscriptplugin_la_SOURCES = cmdutil.cpp cmddialog.cpp cmddoc.cpp cmdpage.cpp cmdobj.cpp cmdgetprop.cpp cmdsetprop.cpp cmdtext.cpp cmdmani.cpp cmdcolor.cpp cmdmisc.cpp guiapp.cpp conswin.cpp pconsole.cpp scriptplugin.cpp
+EXTRA_DIST = cmdvar.h cmdutil.cpp cmdutil.h cmddialog.cpp cmddialog.h cmddoc.cpp cmddoc.h cmdpage.cpp cmdpage.h cmdobj.cpp cmdobj.h cmdgetprop.cpp cmdgetprop.h cmdsetprop.cpp cmdsetprop.h cmdtext.cpp cmdtext.h cmdmani.cpp cmdmani.h cmdcolor.cpp cmdcolor.h cmdmisc.cpp cmdmisc.h guiapp.cpp guiapp.h scriptplugin.cpp scriptplugin.h pconsole.cpp pconsole.h conswin.cpp conswin.h
KDE_OPTIONS = qtonly
AM_LDFLAGS = -Xlinker -s $(PYTHONLIB) $(LIBPYTHON)
Index: Scribus/scribus/plugins/printpreview/preview.cpp
===================================================================
--- Scribus/scribus/plugins/printpreview/preview.cpp (revision 202)
+++ Scribus/scribus/plugins/printpreview/preview.cpp (revision 203)
@@ -20,6 +20,7 @@
#include <cstdlib>
extern QPixmap loadIcon(QString nam);
+extern void ReOrderText(ScribusDoc *doc, ScribusView *view);
/*!
\fn QString Name()
@@ -268,6 +269,7 @@
QString cmd1, cmd2, tmp, tmp2, tmp3;
QMap<QString,QFont> ReallyUsed;
QPixmap Bild;
+ ReOrderText(app->doc, app->view);
ReallyUsed.clear();
app->GetUsedFonts(&ReallyUsed);
PSLib *dd = app->getPSDriver(true, app->Prefs.AvailFonts, ReallyUsed, app->doc->PageColors, false);
/trunk/Scribus/scribus/page.cpp
1844,6 → 1844,15
h -= g;
h1 = transformPoint(h, 0, 0, 0, scx, scy);
bb->Pwidth = QMAX(bb->Pwidth*((scx+scy)/2), 0.01);
if (bb->PType == 5)
{
bb->Rot = atan2(t1.y()-b1.y(),t1.x()-b1.x())*(180.0/M_PI);
bb->Width = sqrt(pow(t1.x()-b1.x(),2)+pow(t1.y()-b1.y(),2));
bb->Xpos = b1.x()+gx;
bb->Ypos = b1.y()+gy;
}
else
{
FPoint oldPos = FPoint(bb->Xpos, bb->Ypos);
QWMatrix ma;
ma.rotate(bb->Rot);
1870,6 → 1879,7
bb->PoLine.map(ma);
AdjustItemSize(bb);
}
}
bb->ISize = QMAX(qRound(bb->ISize*((scx+scy)/2)), 1);
if (bb->Ptext.count() != 0)
{
4462,7 → 4472,7
doku->ActPage = this;
emit PgCh(PageNr);
}
if ((m->state() & (ControlButton | ShiftButton)) && (SelItem.count() != 0))
if ((m->state() == (ControlButton | ShiftButton)) && (SelItem.count() != 0))
{
for (a = 0; a < Items.count(); ++a)
{
/trunk/Scribus/scribus/libpdf/pdflib.cpp
43,6 → 43,7
extern QString ImageToCMYK(QImage *im);
extern void Convert2JPG(QString fn, QImage *image, int Quality, bool isCMYK);
extern QString MaskToTxt(QImage *im, bool PDF = true);
extern QString MaskToTxt14(QImage *im);
extern char *toHex( uchar u );
extern QString String2Hex(QString *in, bool lang = true);
extern double Cwidth(ScribusDoc *doc, QString name, QString ch, int Siz, QString ch2 = " ");
2952,17 → 2953,32
}
if (alphaM)
{
QImage iMask = img.createAlphaMask();
QString im2 = MaskToTxt(&iMask);
QString im2;
StartObj(ObjCounter);
ObjCounter++;
PutDoc("<<\n/Type /XObject\n/Subtype /Image\n");
if (Options->Version == 14)
{
im2 = MaskToTxt14(&img);
if ((Options->CompressMethod != 3) && (CompAvail))
im2 = CompressStr(&im2);
PutDoc("<<\n/Type /XObject\n/Subtype /Image\n");
PutDoc("/Width "+IToStr(img.width())+"\n");
PutDoc("/Height "+IToStr(img.height())+"\n");
PutDoc("/ColorSpace /DeviceGray\n");
PutDoc("/BitsPerComponent 8\n");
PutDoc("/Length "+IToStr(im2.length())+"\n");
}
else
{
QImage iMask = img.createAlphaMask();
im2 = MaskToTxt(&iMask);
if ((Options->CompressMethod != 3) && (CompAvail))
im2 = CompressStr(&im2);
PutDoc("/Width "+IToStr(iMask.width())+"\n");
PutDoc("/Height "+IToStr(iMask.height())+"\n");
PutDoc("/ImageMask true\n/BitsPerComponent 1\n");
PutDoc("/Length "+IToStr(im2.length())+"\n");
}
if ((Options->CompressMethod != 3) && (CompAvail))
PutDoc("/Filter /FlateDecode\n");
PutDoc(">>\nstream\n"+EncStream(&im2, ObjCounter-1)+"\nendstream\nendobj\n");
3050,7 → 3066,12
PutDoc("/BitsPerComponent 8\n");
PutDoc("/Length "+IToStr(im.length())+"\n");
if (alphaM)
{
if (Options->Version == 14)
PutDoc("/SMask "+IToStr(ObjCounter-2)+" 0 R\n");
else
PutDoc("/Mask "+IToStr(ObjCounter-2)+" 0 R\n");
}
if (CompAvail)
{
if (cm == 1)
/trunk/Scribus/scribus/scribusdoc.cpp
115,7 → 115,7
PDF_Optionen.RecalcPic = false;
PDF_Optionen.Bookmarks = false;
PDF_Optionen.PicRes = 300;
PDF_Optionen.Version = 13;
PDF_Optionen.Version = 14;
PDF_Optionen.Resolution = 300;
PDF_Optionen.Binding = 0;
PDF_Optionen.EmbedList.clear();
122,7 → 122,7
PDF_Optionen.PresentMode = false;
PDF_Optionen.Datei = "";
PDF_Optionen.PresentVals.clear();
PDF_Optionen.UseRGB = false;
PDF_Optionen.UseRGB = true;
PDF_Optionen.UseProfiles = false;
PDF_Optionen.UseProfiles2 = false;
PDF_Optionen.SolidProf = "";
/trunk/Scribus/scribus/cpalette.h
53,6 → 53,7
QRadioButton* GrColor2;
QButtonGroup* TransGroup;
QLabel* TransTxt;
QLabel* ShadeTxt;
QSpinBox* TransSpin;
int Mode;
QString sFarbe;