Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 375 → Rev 376

/trunk/Scribus/ChangeLogCVS
1,5 → 1,8
Changes since Version 1.1.7
 
14.08.2004
* feature #828: Group members should be hidden for aligning and other operations
 
13.08.2004
* bug #263: distribute items shuffles the order of the items
* feature #966: Scribus 1.2 Slovene translation file
/trunk/Scribus/scribus/story.cpp
156,6 → 156,8
setUndoDepth(0);
setTextFormat(Qt::PlainText);
viewport()->setAcceptDrops(false);
ClipData = 0;
connect(QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(ClipChange()));
}
 
void SEditor::keyPressEvent(QKeyEvent *k)
377,38 → 379,70
 
void SEditor::insChars(QString t)
{
int p, i;
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();
StyledText.append(chars);
ParagStyles.append(CurrentABStil);
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 < t.length(); ++a)
{
struct PtiSmall *hg;
hg = new PtiSmall;
hg->ch = t[a];
hg->ccolor = CurrTextFill;
hg->cshade = CurrTextFillSh;
hg->cstroke = CurrTextStroke;
hg->cshade2 = CurrTextStrokeSh;
hg->cfont = CurrFont;
hg->csize = CurrFontSize;
hg->cstyle = CurrentStyle;
hg->cab = CurrentABStil;
hg->cextra = CurrTextKern;
hg->cscale = CurrTextScale;
chars->insert(i, hg);
i++;
if (t[a] == QChar(13))
{
ChList *chars2;
chars2 = new ChList;
chars2->setAutoDelete(true);
chars2->clear();
if (p2 >= static_cast<int>(StyledText.count()))
{
StyledText.append(chars2);
ParagStyles.append(ccab);
}
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);
ParagStyles.insert(ParagStyles.at(p2+1), ccab);
}
p2++;
chars = StyledText.at(p2);
i = 0;
}
else
{
struct PtiSmall *hg;
hg = new PtiSmall;
hg->ch = t[a];
hg->ccolor = CurrTextFill;
hg->cshade = CurrTextFillSh;
hg->cstroke = CurrTextStroke;
hg->cshade2 = CurrTextStrokeSh;
hg->cfont = CurrFont;
hg->csize = CurrFontSize;
hg->cstyle = CurrentStyle;
hg->cab = ccab;
hg->cextra = CurrTextKern;
hg->cscale = CurrTextScale;
chars->insert(i, hg);
i++;
}
}
}
 
1114,8 → 1148,13
emit SideBarUp(false);
if ((hasSelectedText()) && (selectedText() != ""))
{
disconnect(QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(ClipChange()));
tBuffer = selectedText();
copyStyledText();
QApplication::clipboard()->setText(tBuffer, QClipboard::Clipboard);
ClipData = 1;
connect(QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(ClipChange()));
emit PasteAvail();
}
emit SideBarUp(true);
}
1138,7 → 1177,18
emit SideBarUp(false);
int p, i;
getCursorPosition(&p, &i);
insStyledText();
if (ClipData == 2)
{
QString data = QApplication::clipboard()->text(QClipboard::Clipboard);
if (!data.isNull())
{
data.replace(QRegExp("\r"), "");
data.replace(QRegExp("\n"), QChar(13));
insChars(data);
}
}
else
insStyledText();
updateAll();
emit SideBarUp(true);
emit SideBarUpdate();
1154,6 → 1204,12
return p;
}
 
void SEditor::ClipChange()
{
ClipData = 2;
emit PasteAvail();
}
 
/* Toolbar for Fill Colour */
SToolBColorF::SToolBColorF(QMainWindow* parent, ScribusDoc *doc) : QToolBar( tr("Fill Color Settings"), parent)
{
1530,6 → 1586,7
connect(Editor, SIGNAL(setProps(int, int)), this, SLOT(updateProps(int, int)));
connect(Editor, SIGNAL(cursorPositionChanged(int, int)), this, SLOT(updateProps(int, int)));
connect(Editor, SIGNAL(copyAvailable(bool)), this, SLOT(CopyAvail(bool )));
connect(Editor, SIGNAL(PasteAvail()), this, SLOT(PasteAvail()));
connect(Editor, SIGNAL(contentsMoving(int, int)), EditorBar, SLOT(doMove(int, int )));
connect(Editor, SIGNAL(textChanged()), EditorBar, SLOT(doRepaint()));
connect(Editor, SIGNAL(SideBarUp(bool )), EditorBar, SLOT(setRepaint(bool )));
2028,6 → 2085,11
emenu->setItemEnabled(Mpaste, 0);
}
 
void StoryEditor::PasteAvail()
{
emenu->setItemEnabled(Mpaste, 1);
}
 
void StoryEditor::updateTextFrame()
{
PageItem *nb = CurrItem;
2339,7 → 2401,6
if (ss->Read(LoadEnc))
{
QString data = ss->GetObjekt();
QString Dat = "";
data.replace(QRegExp("\r"), "");
data.replace(QRegExp("\n"), QChar(13));
Editor->loadText(data, CurrItem);
/trunk/Scribus/scribus/pageitem.cpp
904,7 → 904,10
tTabValues = Doc->Vorlagen[hl->cab].TabValues;
if (tTabValues.isEmpty())
{
CurX = ColBound.x() + ceil((CurX-ColBound.x()) / 36.0) * 36.0;
if ((CurX - ColBound.x()) != 0)
CurX = ColBound.x() + ceil((CurX-ColBound.x()) / 36.0) * 36.0;
else
CurX = ColBound.x() + 36.0;
TabCode = 0;
RTab = false;
}
/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("13").arg("August").arg("2004");
QString bu = tr("%1. %2 %3 ").arg("14").arg("August").arg("2004");
#ifdef HAVE_CMS
bu += "C";
#else
/trunk/Scribus/scribus/plugins/fontpreview/ui.cpp
106,7 → 106,7
*/
void FontPreview::languageChange()
{
setCaption( tr( "Font Preview" ) );
setCaption( tr( "Fonts Preview" ) );
okButton->setText( tr( "&OK" ) );
okButton->setAccel( QKeySequence( tr( "Alt+O" ) ) );
cancelButton->setText( tr( "&Cancel" ) );
/trunk/Scribus/scribus/page.cpp
1423,7 → 1423,7
-ph,static_cast<int>(b->Height+ph));
break;
default:
if (!b->ClipEdited)
if ((!b->ClipEdited) || (b->FrameType < 3))
{
switch (b->FrameType)
{
1436,6 → 1436,8
case 2:
SetFrameRound(b);
break;
default:
break;
}
if ((b->OldB2 != 0) && (b->OldH2 != 0))
{
1451,10 → 1453,20
b->GrStartY = gr.point(0).y();
b->GrEndX = gr.point(1).x();
b->GrEndY = gr.point(0).y();
if (b->FrameType > 2)
{
b->PoLine.map(ma);
b->ContourLine.map(ma);
if (b->PType == 8)
UpdatePolyClip(b);
else
b->Clip = FlattenPath(b->PoLine, b->Segments);
}
}
b->OldB2 = b->Width;
b->OldH2 = b->Height;
b->ContourLine = b->PoLine.copy();
if (b->FrameType < 3)
b->ContourLine = b->PoLine.copy();
}
else
{
8883,6 → 8895,7
SetFrameRound(b);
else
SetRectFrame(b);
b->ClipEdited = true;
}
if (b->PType == 2)
{
/trunk/Scribus/scribus/story.h
97,6 → 97,7
QString UniCinS;
QString tBuffer;
ChList cBuffer;
int ClipData;
 
protected:
void keyPressEvent(QKeyEvent *k);
106,11 → 107,13
void cut();
void copy();
void paste();
void ClipChange();
 
signals:
void setProps(int, int);
void SideBarUp(bool);
void SideBarUpdate();
void PasteAvail();
};
 
class SideBar : public QLabel
330,6 → 333,7
void Do_insSp();
void Do_fontPrev();
void CopyAvail(bool u);
void PasteAvail();
void updateTextFrame();
void SearchText();
void slotEditStyles();