Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 104 → Rev 105

/trunk/Scribus/ChangeLogCVS
1,4 → 1,7
Changes since Version 1.1.2
17.11.2003 Fixed Segfault when creating Template Pages.
The Story Editor can handle now linked Textframes correctly.
 
16.11.2003 Improved the Story Editor.
Fixed some issues with Copy and Paste.
 
/trunk/Scribus/scribus/hyphenator.cpp
27,7 → 27,7
 
Hyphenator::Hyphenator(QWidget* parent, ScribusDoc *dok, ScribusApp* app) : QObject( parent, "bu")
{
std::string filename;
char *filename = NULL;
doc = dok;
Sap = app;
MinWordLen = doc->MinWordLen;
44,7 → 44,11
pfad += "/lib/scribus/dicts/" + Sap->Sprachen[Language];
QCString fn = pfad.latin1();
filename = fn.data();
hdict = hnj_hyphen_load(filename.c_str());
hdict = hnj_hyphen_load(filename);
if (hdict == NULL)
useAble = false;
else
useAble = true;
}
 
Hyphenator::~Hyphenator()
54,7 → 58,7
 
void Hyphenator::slotNewDict(QString name)
{
std::string filename;
char *filename = NULL;
if (!Sap->Sprachen.contains(name))
return;
if (hdict != NULL)
65,7 → 69,11
pfad += "/lib/scribus/dicts/" + Sap->Sprachen[Language];
QCString fn = pfad.latin1();
filename = fn.data();
hdict = hnj_hyphen_load(filename.c_str());
hdict = hnj_hyphen_load(filename);
if (hdict == NULL)
useAble = false;
else
useAble = true;
}
 
void Hyphenator::slotNewSettings(int Wordlen, bool Autom, bool ACheck)
84,6 → 92,10
char *buffer;
const int BORDER = 2;
QCString te;
if (!useAble)
return;
if (!Sap->Sprachen.contains(it->Language))
return;
QString found = text;
if (static_cast<int>(found.length()) > MinWordLen)
{
118,6 → 130,8
QString text = "";
QString buf;
QCString te;
if (!useAble)
return;
if (it->PType != 4)
return;
if (it->Ptext.count() == 0)
/trunk/Scribus/scribus/story.cpp
144,7 → 144,6
int pstyle;
doc = docc;
QString Dat = "";
QPtrList<Pti> y = ite->Ptext;
setCaption( tr( "Story Editor" ) );
setIcon(loadIcon("AppIcon.png"));
Form1Layout = new QHBoxLayout( this, 5, 5, "Form1Layout");
195,21 → 194,35
Form1Layout->addWidget( table1 );
resize( QSize(509, 326).expandedTo(minimumSizeHint()) );
show();
for (a = 0; a < y.count(); ++a)
{
QString b = y.at(a)->ch;
pstyle = y.at(a)->cab;
if (b == QChar(13))
{
QPtrList<Pti> y;
PageItem *nb = ite;
while (nb != 0)
{
if (nb->BackBox != 0)
nb = nb->BackBox;
else
break;
}
while (nb != 0)
{
y = nb->Ptext;
for (a = 0; a < y.count(); ++a)
{
QString b = y.at(a)->ch;
pstyle = y.at(a)->cab;
if (b == QChar(13))
{
addPar(para, Dat, pstyle);
Dat = "";
para++;
}
else
Dat += b;
}
nb = nb->NextBox;
}
if (Dat != "")
addPar(para, Dat, pstyle);
Dat = "";
para++;
}
else
Dat += b;
}
if (Dat != "")
addPar(para, Dat, pstyle);
if (table1->numRows() == 0)
addPar(0, "", doc->CurrentABStil);
TextChanged = false;
311,9 → 324,26
delete ss;
first = true;
}
if (doc->Trenner->AutoCheck)
doc->Trenner->slotHyphenate(CurrItem);
doc->ActPage->RefreshItem(CurrItem);
PageItem *nb = CurrItem;
while (nb != 0)
{
if (nb->BackBox != 0)
nb = nb->BackBox;
else
break;
}
while (nb != 0)
{
if (doc->Trenner->AutoCheck)
{
if (doc->Trenner->Language != nb->Language)
doc->Trenner->slotNewDict(nb->Language);
doc->Trenner->slotHyphenate(nb);
}
else
doc->ActPage->RefreshItem(nb);
nb = nb->NextBox;
}
TextChanged = false;
}
 
/trunk/Scribus/scribus/libabout/about.cpp
32,7 → 32,7
tabLayout1->addWidget( PixmapLabel1 );
BuildID = new QLabel( tab, "BB" );
BuildID->setAlignment(Qt::AlignCenter);
QString bu = "15. November 2003 ";
QString bu = "17. November 2003 ";
#ifdef HAVE_CMS
bu += "C";
#else
/trunk/Scribus/scribus/hyphenator.h
21,6 → 21,7
HyphenDict *hdict;
ScribusDoc *doc;
ScribusApp *Sap;
bool useAble;
 
public slots:
void slotNewDict(QString name);
/trunk/Scribus/scribus/scribus.cpp
3369,11 → 3369,14
connect(doc->ActPage, SIGNAL(ChBMText(PageItem *)), this, SLOT(BookMarkTxT(PageItem *)));
connect(doc->ActPage, SIGNAL(NewBMNr(int, int)), BookPal->BView, SLOT(ChangeItem(int, int)));
connect(doc->ActPage, SIGNAL(RasterPic(bool)), this, SLOT(HaveRaster(bool)));
connect(doc->ActPage, SIGNAL(DelObj(uint, uint)), Tpal, SLOT(slotRemoveElement(uint, uint)));
connect(doc->ActPage, SIGNAL(AddObj(uint, uint)), Tpal, SLOT(slotAddElement(uint, uint)));
connect(doc->ActPage, SIGNAL(UpdtObj(uint, uint)), Tpal, SLOT(slotUpdateElement(uint, uint)));
connect(doc->ActPage, SIGNAL(MoveObj(uint, uint, uint)), Tpal, SLOT(slotMoveElement(uint, uint, uint)));
connect(doc->ActPage, SIGNAL(EditText()), this, SLOT(slotStoryEditor()));
if (!doc->TemplateMode)
{
connect(doc->ActPage, SIGNAL(DelObj(uint, uint)), Tpal, SLOT(slotRemoveElement(uint, uint)));
connect(doc->ActPage, SIGNAL(AddObj(uint, uint)), Tpal, SLOT(slotAddElement(uint, uint)));
connect(doc->ActPage, SIGNAL(UpdtObj(uint, uint)), Tpal, SLOT(slotUpdateElement(uint, uint)));
connect(doc->ActPage, SIGNAL(MoveObj(uint, uint, uint)), Tpal, SLOT(slotMoveElement(uint, uint, uint)));
}
slotDocCh(!doc->loading);
}
 
5709,7 → 5712,6
void ScribusApp::ManTempEnd()
{
view->HideTemplate();
doc->TemplateMode = false;
menuBar()->setItemEnabled(pgmm, 1);
editMenu->setItemEnabled(tman, 1);
DatNeu->setEnabled(true);
5726,6 → 5728,7
{
Apply_Temp(view->Pages.at(c)->MPageNam, c, false);
}
doc->TemplateMode = false;
Sepal->EnablePal();
Sepal->RebuildTemp();
ActWin->muster = NULL;
/trunk/Scribus/scribus/serializer.cpp
50,31 → 50,35
{
struct Pti *hg;
PageItem *nb;
PageItem *it = Item;
uint a;
if (!Append)
{
if (Item->NextBox != 0)
nb = Item;
while (nb != 0)
{
nb = Item->NextBox;
while (nb != 0)
{
nb->Ptext.clear();
nb->CPos = 0;
nb->Dirty = true;
nb = nb->NextBox;
}
if (nb->BackBox != 0)
nb = nb->BackBox;
else
break;
}
Item->Ptext.clear();
Item->CPos = 0;
it = nb;
while (nb != 0)
{
nb->Ptext.clear();
nb->CPos = 0;
nb->Dirty = true;
nb = nb->NextBox;
}
}
for (a=0; a<Objekt.length(); ++a)
{
if ((Objekt.at(a) == QChar(0)) || (Objekt.at(a) == QChar(13)))
continue;
hg = new Pti;
hg->ch = Objekt.at(a);
if ((hg->ch == QChar(10)) || (hg->ch == QChar(5)))
hg->ch = QChar(13);
if ((Objekt.at(a) == QChar(0)) || (Objekt.at(a) == QChar(13)))
continue;
hg = new Pti;
hg->ch = Objekt.at(a);
if ((hg->ch == QChar(10)) || (hg->ch == QChar(5)))
hg->ch = QChar(13);
if (hg->ch == QChar(9)) { hg->ch = " "; }
if (font != "")
{
83,14 → 87,14
}
else
{
hg->cfont = Item->IFont;
hg->csize = Item->ISize;
hg->cfont = it->IFont;
hg->csize = it->ISize;
}
hg->ccolor = Item->TxtFill;
hg->cshade = Item->ShTxtFill;
hg->cstroke = Item->TxtStroke;
hg->cshade2 = Item->ShTxtStroke;
hg->cscale = Item->TxtScale;
hg->ccolor = it->TxtFill;
hg->cshade = it->ShTxtFill;
hg->cstroke = it->TxtStroke;
hg->cshade2 = it->ShTxtStroke;
hg->cscale = it->TxtScale;
hg->cextra = 0;
hg->cselect = false;
hg->cstyle = 0;
101,10 → 105,10
hg->PtransX = 0;
hg->PtransY = 0;
if (Append)
Item->Ptext.insert(Item->CPos, hg);
it->Ptext.insert(it->CPos, hg);
else
Item->Ptext.append(hg);
Item->CPos += 1;
it->Ptext.append(hg);
it->CPos += 1;
}
}
 
/trunk/Scribus/scribus/tree.cpp
44,6 → 44,8
 
void Tree::slotShowSelect(uint SNr, int Nr)
{
if (vie->Doc->TemplateMode)
return;
disconnect(ListView1, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(slotSelect(QListViewItem*)));
ListView1->clearSelection();
if (Nr != -1)