Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 19366 → Rev 19365

/trunk/Scribus/scribus/ui/marksmanager.cpp
115,18 → 115,17
{
if (m_Doc != NULL)
disconnect(m_Doc->scMW(), SIGNAL(UpdateRequest(int)), this , SLOT(handleUpdateRequest(int)));
 
bool hasDoc = (doc != NULL);
m_Doc = doc;
if (!m_Doc)
if (hasDoc)
{
UpdateButton->setEnabled(true);
listView->setEnabled(true);
updateListView();
connect(m_Doc->scMW(), SIGNAL(UpdateRequest(int)), this , SLOT(handleUpdateRequest(int)));
}
else
listView->clear();
return;
}
 
UpdateButton->setEnabled(true);
listView->setEnabled(true);
updateListView();
connect(m_Doc->scMW(), SIGNAL(UpdateRequest(int)), this , SLOT(handleUpdateRequest(int)));
}
 
void MarksManager::languageChange()
178,35 → 177,34
if (mrk->isUnique() && !mrk->label.startsWith("UNVISIBLE*") && !m_Doc->isMarkUsed(mrk, true))
notUsed.append(mrk);
}
 
if (notUsed.isEmpty())
return;
 
for (int a=0; a < notUsed.count(); ++a)
if (!notUsed.isEmpty())
{
Mark* mrk = notUsed.at(a);
QString l = "UNVISIBLE*" + mrk->label;
getUniqueName(l, m_Doc->marksLabelsList(mrk->getType()), "_");
mrk->label = l;
for (int a=0; a<notUsed.count(); ++a)
{
Mark* mrk = notUsed.at(a);
QString l = "UNVISIBLE*" + mrk->label;
getUniqueName(l,m_Doc->marksLabelsList(mrk->getType()),"_");
mrk->label = l;
}
updateListView();
}
updateListView();
}
 
void MarksManager::on_EditButton_clicked()
{
Mark* mrk = getMarkFromListView();
if (mrk == NULL)
return;
 
if (m_Doc->scMW()->editMarkDlg(mrk))
if (mrk != NULL)
{
if (mrk->isType(MARKVariableTextType))
m_Doc->flag_updateMarksLabels = true;
// else
// currItem->invalid = true;
m_Doc->changed();
m_Doc->regionsChanged()->update(QRectF());
updateListView();
if (m_Doc->scMW()->editMarkDlg(mrk))
{
if (mrk->isType(MARKVariableTextType))
m_Doc->flag_updateMarksLabels = true;
// else
// currItem->invalid = true;
m_Doc->changed();
m_Doc->regionsChanged()->update(QRectF());
updateListView();
}
}
}
 
213,17 → 211,17
void MarksManager::on_DeleteButton_clicked()
{
Mark* mrk = getMarkFromListView();
if (mrk == NULL)
return;
 
if (mrk->isType(MARKNoteMasterType))
m_Doc->setUndoDelNote(mrk->getNotePtr());
else
m_Doc->setUndoDelMark(mrk);
m_Doc->eraseMark(mrk, true, NULL, true);
m_Doc->changed();
m_Doc->regionsChanged()->update(QRectF());
updateListView();
if (mrk != NULL)
{
if (mrk->isType(MARKNoteMasterType))
m_Doc->setUndoDelNote(mrk->getNotePtr());
else
m_Doc->setUndoDelMark(mrk);
m_Doc->eraseMark(mrk, true, NULL, true);
m_Doc->changed();
m_Doc->regionsChanged()->update(QRectF());
updateListView();
}
}
 
void MarksManager::on_listView_doubleClicked(const QModelIndex &index)
/trunk/Scribus/scribus/fonts/ftface.h
100,6 → 100,8
mutable QString m_pdfDescender;
mutable QString m_italicAngle;
mutable QString m_pdfFontBBox;
mutable QString StdVW;
QString FontEnc;
 
mutable int m_encoding;
 
/trunk/Scribus/scribus/fonts/scface_ps.h
64,6 → 64,7
// Descender = tmp.setNum(face->descender);
// CapHeight = Ascent;
// ItalicAngle = "0";
// StdVW = "1";
// FontBBox = tmp.setNum(face->bbox.xMin)+" "+tmp2.setNum(face->bbox.yMin)+" "+tmp3.setNum(face->bbox.xMax)+" "+tmp4.setNum(face->bbox.yMax);
/*
setBestEncoding(face);
/trunk/Scribus/scribus/scribusdoc.cpp
17543,14 → 17543,15
for (int a = lastItem +1; a < DocItems.count(); ++a)
{
item = DocItems.at(a);
if (!item || !item->isTextFrame() || (item->itemText.length() <= 0))
continue;
for (int i = item->firstInFrame(); i <= item->lastInFrame(); ++i)
if ((item != NULL) && item->isTextFrame() && (item->itemText.length() > 0))
{
if (item->itemText.hasMark(i, mrk))
for (int i = item->firstInFrame(); i <= item->lastInFrame(); ++i)
{
lastItem = a;
return item;
if (item->itemText.hasMark(i, mrk))
{
lastItem = a;
return item;
}
}
}
}
17570,7 → 17571,7
{
for (int pos = 0; pos < item->itemText.length(); ++pos)
{
if (item->itemText.hasMark(pos, mrk))
if (item->itemText.hasMark(pos, mrk))
{
currItem = item;
return pos;
17612,7 → 17613,7
}
for (; i < end; ++i)
{
if (currItem->itemText.hasMark(i, mrk))
if (currItem->itemText.hasMark(i, mrk))
return true;
}
}
17708,8 → 17709,7
}
 
void ScribusDoc::setUndoDelMark(Mark *mrk)
{
//used by MarksManager
{ //used by MarksManager
if (UndoManager::undoEnabled())
{
ScItemsState* ims = new ScItemsState(Um::DeleteMark,"",Um::IDelete);
17787,22 → 17787,25
{
foreach (PageItem* item, DocItems)
{
if (!item->isTextFrame() || item->isNoteFrame())
continue;
if (item->prevInChain() != NULL)
continue;
item = item->lastInChain();
int pos = item->lastInFrame() + 1;
if (pos >= item->itemText.length())
continue;
for (int i = pos; i < item->itemText.length(); ++i)
if (item->isTextFrame() && !item->isNoteFrame())
{
if (item->itemText.hasMark(i) && item->itemText.mark(i)->isNoteType())
if (item->prevInChain() == NULL)
{
TextNote * note = item->itemText.mark(i)->getNotePtr();
note->setNoteMark(NULL);
note->masterMark()->setItemPtr(item);
note->masterMark()->setItemName(item->itemName());
item = item->lastInChain();
int pos = item->lastInFrame() +1;
if (pos < item->itemText.length())
{
for (int i = pos; i < item->itemText.length(); ++i)
{
if (item->itemText.hasMark(i) && item->itemText.mark(i)->isNoteType())
{
TextNote * note = item->itemText.mark(i)->getNotePtr();
note->setNoteMark(NULL);
note->masterMark()->setItemPtr(item);
note->masterMark()->setItemName(item->itemName());
}
}
}
}
}
}
/trunk/Scribus/scribus/scfonts.cpp
669,7 → 669,27
t.subset(true);
t.m->forDocument = DocName;
//setBestEncoding(face); //AV
if (showFontInformation)
/* switch (face->charmap? face->charmap->encoding : -1)
{
case FT_ENCODING_ADOBE_STANDARD:
t->FontEnc = QString("StandardEncoding");
break;
case FT_ENCODING_APPLE_ROMAN:
t->FontEnc = QString("MacRomanEncoding");
break;
case FT_ENCODING_ADOBE_EXPERT:
t->FontEnc = QString("MacExpertEncoding");
break;
case FT_ENCODING_ADOBE_LATIN_1:
t->FontEnc = QString("WinAnsiEncoding");
break;
case FT_ENCODING_UNICODE:
t->FontEnc = QString("Unicode");
break;
default:
t->FontEnc = QString();
}
*/ if (showFontInformation)
sDebug(QObject::tr("Font %1 loaded from %2(%3)").arg(t.psName()).arg(filename).arg(faceindex+1));
 
/*