Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 362 → Rev 361

/trunk/Scribus/scribus/pageitem.cpp
1811,29 → 1811,17
QString PageItem::ExpandToken(uint base)
{
uint zae = 0;
uint za2 = base;
QString chx = "#";
if (!Doc->MasterP)
{
do
while (Ptext.at(base+zae)->ch == QChar(30))
{
if (za2 == 0)
break;
za2--;
}
while (Ptext.at(za2)->ch == QChar(30));
if (Ptext.at(za2)->ch != QChar(30))
za2++;
while (Ptext.at(za2+zae)->ch == QChar(30))
{
zae++;
if (za2+zae == Ptext.count())
if (base+zae == Ptext.count())
break;
}
QString out="%1";
QString out2;
out2 = out.arg(OwnPage->PageNr+Doc->FirstPnum, -zae);
chx = out2.mid(base-za2, 1);
chx = out.arg(OwnPage->PageNr+Doc->FirstPnum, zae).right(zae).left(1);
}
return chx;
}
/trunk/Scribus/scribus/scribus.cpp
2634,10 → 2634,7
editMenu->setItemEnabled(edid1, 1);
editMenu->setItemEnabled(edid2, 1);
editMenu->setItemEnabled(edid4, 0);
if (b->Ptext.count() == 0)
editMenu->setItemEnabled(Sear, 0);
else
editMenu->setItemEnabled(Sear, 1);
editMenu->setItemEnabled(Sear, 1);
extraMenu->setItemEnabled(hyph, 1);
menuBar()->setItemEnabled(Stm, 1);
menuBar()->setItemEnabled(Obm, 1);
2791,7 → 2788,6
{
ObjMenu->setItemEnabled(DistM, 1);
ObjMenu->setItemEnabled(PfadTP, 0);
editMenu->setItemEnabled(Sear, 0);
bool hPoly = true;
bool isGroup = true;
int firstElem = -1;
/trunk/Scribus/scribus/story.cpp
38,8 → 38,6
wasMod = false;
StyledText.clear();
StyledText.setAutoDelete(true);
cBuffer.setAutoDelete(true);
cBuffer.clear();
setUndoRedoEnabled(true);
setUndoDepth(0);
setTextFormat(Qt::PlainText);
206,6 → 204,7
chars = new ChList;
chars->setAutoDelete(true);
chars->clear();
QString db;
if (StyledText.count() != 0)
{
if (p >= static_cast<int>(StyledText.count()))
282,123 → 281,6
}
}
 
void SEditor::insStyledText()
{
if (cBuffer.count() == 0)
return;
int p, i, p2, ccab;
if (hasSelectedText())
deleteSel();
getCursorPosition(&p, &i);
ChList *chars;
p2 = p;
if ((p >= static_cast<int>(StyledText.count())) || (StyledText.count() == 0))
{
chars = new ChList;
chars->setAutoDelete(true);
chars->clear();
p2 = static_cast<int>(StyledText.count());
}
else
chars = StyledText.at(p);
if (chars->count() != 0)
ccab = chars->at(0)->cab;
else
ccab = CurrentABStil;
for (uint a = 0; a < cBuffer.count()-1; ++a)
{
struct PtiSmall *hg;
if (cBuffer.at(a)->ch == QChar(13))
{
ChList *chars2;
chars2 = new ChList;
chars2->setAutoDelete(true);
chars2->clear();
if (p2 >= static_cast<int>(StyledText.count()))
StyledText.append(chars2);
else
{
int a = static_cast<int>(chars->count());
for (int s = i; s < a; ++s)
{
chars2->append(chars->take(i));
}
StyledText.insert(p2+1, chars2);
}
p2++;
chars = StyledText.at(p2);
i = 0;
}
else
{
hg = new PtiSmall;
hg->ch = cBuffer.at(a)->ch;
hg->ccolor = cBuffer.at(a)->ccolor;
hg->cshade = cBuffer.at(a)->cshade;
hg->cstroke = cBuffer.at(a)->cstroke;
hg->cshade2 = cBuffer.at(a)->cshade2;
hg->cfont = cBuffer.at(a)->cfont;
hg->csize = cBuffer.at(a)->csize;
hg->cstyle = cBuffer.at(a)->cstyle;
hg->cab = ccab;
hg->cextra = cBuffer.at(a)->cextra;
hg->cscale = cBuffer.at(a)->cscale;
chars->insert(i, hg);
i++;
}
}
}
 
void SEditor::copyStyledText()
{
int PStart, PEnd, SelStart, SelEnd, start, end;
ChList *chars;
struct PtiSmall *hg;
cBuffer.clear();
getSelection(&PStart, &SelStart, &PEnd, &SelEnd);
for (int pa = PStart; pa < PEnd+1; ++pa)
{
chars = StyledText.at(pa);
if (pa == PStart)
start = SelStart;
else
start = 0;
if (pa == PEnd)
end = SelEnd;
else
end = chars->count();
for (int ca = start; ca < end; ++ca)
{
hg = new PtiSmall;
hg->ch = chars->at(ca)->ch;
hg->cfont = chars->at(ca)->cfont;
hg->csize = chars->at(ca)->csize;
hg->ccolor = chars->at(ca)->ccolor;
hg->cshade = chars->at(ca)->cshade;
hg->cstroke = chars->at(ca)->cstroke;
hg->cshade2 = chars->at(ca)->cshade2;
hg->cscale = chars->at(ca)->cscale;
hg->cstyle = chars->at(ca)->cstyle;
hg->cab = chars->at(ca)->cab;
hg->cextra = chars->at(ca)->cextra;
cBuffer.append(hg);
}
hg = new PtiSmall;
hg->ch = QChar(13);
hg->cfont = "";
hg->csize = 1;
hg->ccolor = "";
hg->cshade = 1;
hg->cstroke = "";
hg->cshade2 = 1;
hg->cscale = 0;
hg->cstyle = 0;
hg->cab = 0;
hg->cextra = 0;
cBuffer.append(hg);
}
}
 
void SEditor::saveItemText(PageItem* b)
{
ChList *chars;
678,6 → 560,7
QString Ccol = chars->at(0)->ccolor;
int Csha = chars->at(0)->cshade;
int Csty = chars->at(0)->cstyle;
setAlign(chars->at(0)->cab);
for (uint a = 0; a < chars->count(); ++a)
{
if ((Ccol == chars->at(a)->ccolor) && (Csha == chars->at(a)->cshade) && (Csty == chars->at(a)->cstyle))
685,6 → 568,7
else
{
setSelection(pa, SelStart, pa, SelEnd);
setAlign(chars->at(0)->cab);
setFarbe(Ccol, Csha);
setStyle(Csty);
removeSelection();
691,15 → 575,15
Ccol = chars->at(a)->ccolor;
Csha = chars->at(a)->cshade;
Csty = chars->at(a)->cstyle;
SelEnd++;
SelStart = SelEnd;
SelEnd++;
}
}
setSelection(pa, SelStart, pa, SelEnd);
setAlign(chars->at(0)->cab);
setFarbe(Ccol, Csha);
setStyle(Csty);
removeSelection();
setAlign(chars->at(0)->cab);
setCursorPosition(p, i);
}
 
859,33 → 743,12
setColor(tmp);
}
 
void SEditor::copy()
{
if ((hasSelectedText()) && (selectedText() != ""))
{
tBuffer = selectedText();
copyStyledText();
}
}
 
void SEditor::cut()
{
copy();
if (hasSelectedText())
{
deleteSel();
removeSelectedText();
}
}
 
void SEditor::paste()
{
int p, i;
getCursorPosition(&p, &i);
insStyledText();
insert(tBuffer);
for (int pa = p; pa < static_cast<int>(StyledText.count()); ++pa)
updateFromChars(pa);
}
 
/* Toolbar for Fill Colour */
1508,6 → 1371,7
Editor->CurrFont = hg->cfont;
Editor->CurrFontSize = hg->csize;
Editor->CurrentStyle = hg->cstyle & 127;
Editor->CurrentABStil = hg->cab;
Editor->CurrTextKern = hg->cextra;
Editor->CurrTextScale = hg->cscale;
StrokeTools->SetShade(hg->cshade2);
1547,14 → 1411,12
StrokeTools->TxStroke->setEnabled(false);
StrokeTools->PM1->setEnabled(false);
}
AlignTools->SetAlign(hg->cab);
StyleTools->SetKern(hg->cextra);
StyleTools->SetStyle(hg->cstyle & 127);
FontTools->SetSize(hg->csize / 10.0);
FontTools->SetFont(hg->cfont);
FontTools->SetScale(hg->cscale);
hg = chars->at(0);
Editor->CurrentABStil = hg->cab;
AlignTools->SetAlign(hg->cab);
updateStatus();
}
 
1700,17 → 1562,23
 
void StoryEditor::Do_copy()
{
Editor->copy();
/* SEditor *cp = dynamic_cast<SEditor*>(table1->cellWidget(table1->currentRow(), 1));
cp->copy();
table1->adjHeight(table1->currentRow()); */
}
 
void StoryEditor::Do_paste()
{
Editor->paste();
/* SEditor *cp = dynamic_cast<SEditor*>(table1->cellWidget(table1->currentRow(), 1));
cp->paste();
table1->adjHeight(table1->currentRow()); */
}
 
void StoryEditor::Do_cut()
{
Editor->cut();
/* SEditor *cp = dynamic_cast<SEditor*>(table1->cellWidget(table1->currentRow(), 1));
cp->cut();
table1->adjHeight(table1->currentRow()); */
}
 
void StoryEditor::Do_del()
1726,13 → 1594,9
 
void StoryEditor::CopyAvail(bool u)
{
emenu->setItemEnabled(Mcopy, u);
emenu->setItemEnabled(Mcut, u);
// emenu->setItemEnabled(Mcopy, u);
// emenu->setItemEnabled(Mcut, u);
emenu->setItemEnabled(Mdel, u);
if (Editor->tBuffer.length() != 0)
emenu->setItemEnabled(Mpaste, 1);
else
emenu->setItemEnabled(Mpaste, 0);
}
 
void StoryEditor::updateTextFrame()
1918,10 → 1782,6
firstSet = true;
emenu->setItemEnabled(Mupdt, 1);
fmenu->setItemEnabled(fid52, 1);
if (Editor->tBuffer.length() != 0)
emenu->setItemEnabled(Mpaste, 1);
else
emenu->setItemEnabled(Mpaste, 0);
DatUpdt->setEnabled(true);
DatRel->setEnabled(true);
updateStatus();
/trunk/Scribus/scribus/libabout/about.cpp
56,7 → 56,7
tabLayout1->addWidget( PixmapLabel1 );
BuildID = new QLabel( tab, "BB" );
BuildID->setAlignment(Qt::AlignCenter);
QString bu = tr("%1. %2 %3 ").arg("05").arg("August").arg("2004");
QString bu = tr("%1. %2 %3 ").arg("04").arg("August").arg("2004");
#ifdef HAVE_CMS
bu += "C";
#else
/trunk/Scribus/scribus/druck.cpp
95,7 → 95,7
QToolTip::add( PS3, tr( "Creates PostScript Level 3" ) );
QToolTip::add( PS2, tr( "Creates PostScript Level 2 only, beware,\nthis can create huge files" ) );
QToolTip::add( PS1, tr( "Creates PostScript Level 1 only, beware,\nthis can create huge files" ) );
QToolTip::add( GcR, tr( "A way of switching off some of the gray shades which are composed\n"
QToolTip::add( GcR, tr( "A way of switching some of the gray shades which are composed\n"
"of cyan, yellow and magenta and using black instead.\n"
"UCR most affects parts of images which are neutral and/or dark tones\n"
"which are close to the gray. Use of this may improve printing some images\n"
211,7 → 211,7
 
OtherCom = new QCheckBox(tr("A&lternative Printer Command"), Drucker, "Dc");
OtherCom->setChecked(false);
QToolTip::add( OtherCom, tr( "Use an alternative print manager, such as kprinter or gtklp,\nto utilize additional printing options") );
QToolTip::add( OtherCom, tr( "Use an alternative print manager to utilize additional\nprinting options, such as kprinter or gtklp") );
DruckerLayout->addWidget( OtherCom, 2, 0, Qt::AlignLeft);
LayoutCC = new QHBoxLayout;
LayoutCC->setSpacing( 6 );
/trunk/Scribus/scribus/plugins/pixmapexport/dialog.cpp
173,9 → 173,9
OkButton->setText( tr( "&OK" ) );
CancelButton->setText( tr( "&Cancel" ) );
CancelButton->setAccel( QKeySequence( tr( "C" ) ) );
QToolTip::add( IntervalPagesRadio, tr( "Export a range of pages" ) );
QToolTip::add( IntervalPagesRadio, tr( "Export a range of pages to images" ) );
QToolTip::add( RangeVal, tr( "Insert a comma separated list of tokens where\na token can be * for all the pages, 1-5 for\na range of pages or a single page number." ) );
QToolTip::add( AllPagesRadio, tr( "Export all pages" ) );
QToolTip::add( AllPagesRadio, tr( "Export all pages to images" ) );
QToolTip::add( OnePageRadio, tr( "Export only the current page" ) );
QToolTip::add( SizeBox, tr( "Resolution of the Images\nUse 72 dpi for Images intended for the Screen" ) );
QToolTip::add( QualityBox, tr( "The quality of your images - 100% is the best, 1% the lowest quality" ) );
/trunk/Scribus/scribus/layers.h
73,6 → 73,7
void Schliessen();
 
protected:
virtual void windowActivationChange(bool oldActive);
QVBoxLayout* LayerPaletteLayout;
QHBoxLayout* Layout1;
 
/trunk/Scribus/scribus/layers.cpp
29,10 → 29,8
 
void LayerTable::endEdit ( int row, int col, bool accept, bool replace )
{
QTable::EditMode ed = editMode();
QTable::endEdit(row, col, accept, replace);
if (ed != QTable::NotEditing)
emit updtName(row);
emit updtName(row);
}
 
LayerPalette::LayerPalette(QWidget* parent)
124,6 → 122,19
emit LayerActivated(*Activ);
}
 
void LayerPalette::windowActivationChange(bool oldActive)
{
QDialog::windowActivationChange(oldActive);
if (oldActive)
{
if (Table->numRows() > 0)
{
changeName(Table->currentRow(), 0);
emit LayerActivated(*Activ);
}
}
}
 
void LayerPalette::ClearInhalt()
{
disconnect(Table, SIGNAL(currentChanged(int, int)), this, SLOT(setActiveLayer(int)));
/trunk/Scribus/scribus/icons/compfile16.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/Scribus/ChangeLogCVS
1,12 → 1,5
Changes since Version 1.1.7
 
06.08.2004
* bug #167: spacing across columns/frames
* bug #312: Newlines not handled properly when c/p'ing
* bug #724: No left aligned page numbers
* feature #933: Scripter crash on running sample script when no previous documents open
* feature #934: Search/Replace enabled when multiple items are selected and they arent all text frames
 
04.08.2004
* bug #790: Update Picture From Right-Click Menu Does Not Work
* bug #927: layer chooser on the bottom of scribus isnt updated after adding a new layer immediately