/trunk/Scribus/scribus/fonts/ftface.h |
---|
100,8 → 100,6 |
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,7 → 64,6 |
// 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/scfonts.cpp |
---|
669,27 → 669,7 |
t.subset(true); |
t.m->forDocument = DocName; |
//setBestEncoding(face); //AV |
/* 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) |
if (showFontInformation) |
sDebug(QObject::tr("Font %1 loaded from %2(%3)").arg(t.psName()).arg(filename).arg(faceindex+1)); |
/* |
/trunk/Scribus/scribus/scribusdoc.cpp |
---|
17543,15 → 17543,14 |
for (int a = lastItem +1; a < DocItems.count(); ++a) |
{ |
item = DocItems.at(a); |
if ((item != NULL) && item->isTextFrame() && (item->itemText.length() > 0)) |
if (!item || !item->isTextFrame() || (item->itemText.length() <= 0)) |
continue; |
for (int i = item->firstInFrame(); i <= item->lastInFrame(); ++i) |
{ |
for (int i = item->firstInFrame(); i <= item->lastInFrame(); ++i) |
if (item->itemText.hasMark(i, mrk)) |
{ |
if (item->itemText.hasMark(i, mrk)) |
{ |
lastItem = a; |
return item; |
} |
lastItem = a; |
return item; |
} |
} |
} |
17571,7 → 17570,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; |
17613,7 → 17612,7 |
} |
for (; i < end; ++i) |
{ |
if (currItem->itemText.hasMark(i, mrk)) |
if (currItem->itemText.hasMark(i, mrk)) |
return true; |
} |
} |
17709,7 → 17708,8 |
} |
void ScribusDoc::setUndoDelMark(Mark *mrk) |
{ //used by MarksManager |
{ |
//used by MarksManager |
if (UndoManager::undoEnabled()) |
{ |
ScItemsState* ims = new ScItemsState(Um::DeleteMark,"",Um::IDelete); |
17787,25 → 17787,22 |
{ |
foreach (PageItem* item, DocItems) |
{ |
if (item->isTextFrame() && !item->isNoteFrame()) |
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->prevInChain() == NULL) |
if (item->itemText.hasMark(i) && item->itemText.mark(i)->isNoteType()) |
{ |
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()); |
} |
} |
} |
TextNote * note = item->itemText.mark(i)->getNotePtr(); |
note->setNoteMark(NULL); |
note->masterMark()->setItemPtr(item); |
note->masterMark()->setItemName(item->itemName()); |
} |
} |
} |
/trunk/Scribus/scribus/ui/marksmanager.cpp |
---|
115,17 → 115,18 |
{ |
if (m_Doc != NULL) |
disconnect(m_Doc->scMW(), SIGNAL(UpdateRequest(int)), this , SLOT(handleUpdateRequest(int))); |
bool hasDoc = (doc != NULL); |
m_Doc = doc; |
if (hasDoc) |
if (!m_Doc) |
{ |
UpdateButton->setEnabled(true); |
listView->setEnabled(true); |
updateListView(); |
connect(m_Doc->scMW(), SIGNAL(UpdateRequest(int)), this , SLOT(handleUpdateRequest(int))); |
listView->clear(); |
return; |
} |
else |
listView->clear(); |
UpdateButton->setEnabled(true); |
listView->setEnabled(true); |
updateListView(); |
connect(m_Doc->scMW(), SIGNAL(UpdateRequest(int)), this , SLOT(handleUpdateRequest(int))); |
} |
void MarksManager::languageChange() |
177,34 → 178,35 |
if (mrk->isUnique() && !mrk->label.startsWith("UNVISIBLE*") && !m_Doc->isMarkUsed(mrk, true)) |
notUsed.append(mrk); |
} |
if (!notUsed.isEmpty()) |
if (notUsed.isEmpty()) |
return; |
for (int a=0; a < notUsed.count(); ++a) |
{ |
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(); |
Mark* mrk = notUsed.at(a); |
QString l = "UNVISIBLE*" + mrk->label; |
getUniqueName(l, m_Doc->marksLabelsList(mrk->getType()), "_"); |
mrk->label = l; |
} |
updateListView(); |
} |
void MarksManager::on_EditButton_clicked() |
{ |
Mark* mrk = getMarkFromListView(); |
if (mrk != NULL) |
if (mrk == NULL) |
return; |
if (m_Doc->scMW()->editMarkDlg(mrk)) |
{ |
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(); |
} |
if (mrk->isType(MARKVariableTextType)) |
m_Doc->flag_updateMarksLabels = true; |
// else |
// currItem->invalid = true; |
m_Doc->changed(); |
m_Doc->regionsChanged()->update(QRectF()); |
updateListView(); |
} |
} |
211,17 → 213,17 |
void MarksManager::on_DeleteButton_clicked() |
{ |
Mark* mrk = getMarkFromListView(); |
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(); |
} |
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(); |
} |
void MarksManager::on_listView_doubleClicked(const QModelIndex &index) |